ethereum-optimism / ethereum-optimism/optimism
Remove IFaultDisputeGame dependency from AnchorStateRegistry
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 145
Description
The AnchorStateRegistry checks that the anchorStateRegistry() from the dispute game matches the AnchorStateRegistry itself via a cast to `IFaultDisputeGame`. This won't work for any game type that doesn't have a `anchorStateRegistry()` method.
https://github.com/ethereum-optimism/optimism/blob/578622ccebb1b83210026f72fa9875097f4362ce/packages/contracts-bedrock/src/dispute/AnchorStateRegistry.sol#L199-L201
We should review if this is really necessary (we're trusting the game's `wasRespectedGameTypeWhenCreated()` method anyway so seems odd to not just require that the game was created via the DisputeGameFactory). If it is we need to add `anchorStateRegistry()` to the `IDisputeGame` interface and implement it in all game types.
Contributor guide
Research direction
Start in packages/contracts-bedrock/src/dispute/AnchorStateRegistry.sol around the anchorStateRegistry() check, then inspect the IDisputeGame interface, DisputeGameFactory, and all game types. Determine whether the registry check is required given wasRespectedGameTypeWhenCreated(), and document or implement the chosen approach across the affected contracts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- solidity
- Domain
- blockchain
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100