Skip to content

Commit

Permalink
Remove subgameAtRootResolved
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Apr 15, 2024
1 parent 10238f7 commit d650e7b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 30 deletions.
2 changes: 1 addition & 1 deletion op-bindings/bindings/faultdisputegame.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions op-bindings/bindings/faultdisputegame_more.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/contracts-bedrock/semver-lock.json
Expand Up @@ -112,8 +112,8 @@
"sourceCodeHash": "0x8545910bdb40f5e706a0ae5ed274cabc6d1f17be92d497a490d5732d74ac9c59"
},
"src/dispute/FaultDisputeGame.sol": {
"initCodeHash": "0x7127e4ee17a05e117a02ed94b16994b025c891bf5f8015513fcc1f14a4347f11",
"sourceCodeHash": "0x8c7ff6666362d4c112b1f7f68880740f64990bd2e8643a411b4c2356eaf6e5b8"
"initCodeHash": "0x4ea53ec8274b7a25012aab6655cd84a60b4cbcdba95ad199085fd81910731bee",
"sourceCodeHash": "0x778aafed19b2d8dddd61a44d39e94fb3139a89e416a314572534064ab8823ee1"
},
"src/dispute/weth/DelayedWETH.sol": {
"initCodeHash": "0x7b6ec89eaec09e369426e73161a9c6932223bb1f974377190c3f6f552995da35",
Expand Down
Expand Up @@ -55,17 +55,10 @@
"slot": "5",
"type": "mapping(uint256 => bool)"
},
{
"bytes": "1",
"label": "subgameAtRootResolved",
"offset": 0,
"slot": "6",
"type": "bool"
},
{
"bytes": "1",
"label": "initialized",
"offset": 1,
"offset": 0,
"slot": "6",
"type": "bool"
},
Expand Down
Expand Up @@ -55,17 +55,10 @@
"slot": "5",
"type": "mapping(uint256 => bool)"
},
{
"bytes": "1",
"label": "subgameAtRootResolved",
"offset": 0,
"slot": "6",
"type": "bool"
},
{
"bytes": "1",
"label": "initialized",
"offset": 1,
"offset": 0,
"slot": "6",
"type": "bool"
},
Expand Down
10 changes: 1 addition & 9 deletions packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol
Expand Up @@ -81,9 +81,6 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
/// @notice An interneal mapping of resolved subgames rooted at a claim index.
mapping(uint256 => bool) internal resolvedSubgames;

/// @notice Indicates whether the subgame rooted at the root claim has been resolved.
bool internal subgameAtRootResolved;

/// @notice Flag for the `initialize` function to prevent re-initialization.
bool internal initialized;

Expand Down Expand Up @@ -373,7 +370,7 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();

// INVARIANT: Resolution cannot occur unless the absolute root subgame has been resolved.
if (!subgameAtRootResolved) revert OutOfOrderResolution();
if (!resolvedSubgames[0]) revert OutOfOrderResolution();

// Update the global game status; The dispute has concluded.
status_ = claimData[0].counteredBy == address(0) ? GameStatus.DEFENDER_WINS : GameStatus.CHALLENGER_WINS;
Expand Down Expand Up @@ -452,11 +449,6 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {

// Mark the subgame as resolved.
resolvedSubgames[_claimIndex] = true;

// Indicate the game is ready to be resolved globally.
if (_claimIndex == 0) {
subgameAtRootResolved = true;
}
}

/// @inheritdoc IDisputeGame
Expand Down

0 comments on commit d650e7b

Please sign in to comment.