Commit 626b3fed authored by clabby's avatar clabby

Remove `settlementHead` rename

parent b13db0ad
This diff is collapsed.
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
"name": "_genesisBlockNumber", "name": "_genesisBlockNumber",
"type": "uint256" "type": "uint256"
}, },
{
"internalType": "Hash",
"name": "_genesisOutputRoot",
"type": "bytes32"
},
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "_maxGameDepth", "name": "_maxGameDepth",
...@@ -198,6 +203,19 @@ ...@@ -198,6 +203,19 @@
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{
"inputs": [],
"name": "GENESIS_OUTPUT_ROOT",
"outputs": [
{
"internalType": "Hash",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [], "inputs": [],
"name": "MAX_GAME_DEPTH", "name": "MAX_GAME_DEPTH",
......
...@@ -68,7 +68,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -68,7 +68,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
IBondManager public bondManager; IBondManager public bondManager;
/// @inheritdoc IOutputBisectionGame /// @inheritdoc IOutputBisectionGame
Hash public settlementHead; Hash public l1Head;
/// @notice An append-only array of all claims made during the dispute game. /// @notice An append-only array of all claims made during the dispute game.
ClaimData[] public claimData; ClaimData[] public claimData;
...@@ -295,8 +295,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -295,8 +295,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
IPreimageOracle oracle = VM.oracle(); IPreimageOracle oracle = VM.oracle();
if (_ident == 1) { if (_ident == 1) {
// Load the settlement layer head hash // Load the L1 head hash
oracle.loadLocalData(_ident, Hash.unwrap(uuid), Hash.unwrap(settlementHead), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Hash.unwrap(l1Head), 32, _partOffset);
} else if (_ident == 2) { } else if (_ident == 2) {
// Load the starting proposal's output root. // Load the starting proposal's output root.
oracle.loadLocalData(_ident, Hash.unwrap(uuid), Claim.unwrap(starting), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Claim.unwrap(starting), 32, _partOffset);
...@@ -449,8 +449,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -449,8 +449,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
}) })
); );
// Persist the settlement layer hash of the parent block. // Persist the blockhash of the parent block.
settlementHead = Hash.wrap(blockhash(block.number - 1)); l1Head = Hash.wrap(blockhash(block.number - 1));
} }
/// @notice Returns the length of the `claimData` array. /// @notice Returns the length of the `claimData` array.
......
...@@ -61,8 +61,8 @@ interface IOutputBisectionGame is IDisputeGame { ...@@ -61,8 +61,8 @@ interface IOutputBisectionGame is IDisputeGame {
/// @param _claimIndex The index of the subgame root claim to resolve. /// @param _claimIndex The index of the subgame root claim to resolve.
function resolveClaim(uint256 _claimIndex) external payable; function resolveClaim(uint256 _claimIndex) external payable;
/// @notice An block hash on the settlement layer that contains the disputed output root. /// @notice A block hash on the L1 that contains the disputed output root.
function settlementHead() external view returns (Hash settlementHead_); function l1Head() external view returns (Hash l1Head_);
/// @notice The l2BlockNumber of the disputed output root in the `L2OutputOracle`. /// @notice The l2BlockNumber of the disputed output root in the `L2OutputOracle`.
function l2BlockNumber() external view returns (uint256 l2BlockNumber_); function l2BlockNumber() external view returns (uint256 l2BlockNumber_);
......
...@@ -144,7 +144,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -144,7 +144,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
assertEq(Timestamp.unwrap(gameProxy.createdAt()), block.timestamp); assertEq(Timestamp.unwrap(gameProxy.createdAt()), block.timestamp);
// Assert that the blockhash provided is correct. // Assert that the blockhash provided is correct.
assertEq(Hash.unwrap(gameProxy.settlementHead()), blockhash(block.number - 1)); assertEq(Hash.unwrap(gameProxy.l1Head()), blockhash(block.number - 1));
} }
/// @dev Tests that a move while the game status is not `IN_PROGRESS` causes the call to revert /// @dev Tests that a move while the game status is not `IN_PROGRESS` causes the call to revert
...@@ -493,7 +493,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -493,7 +493,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Expected local data // Expected local data
bytes32[5] memory data = [ bytes32[5] memory data = [
Hash.unwrap(gameProxy.settlementHead()), Hash.unwrap(gameProxy.l1Head()),
startingClaim, startingClaim,
disputedClaim, disputedClaim,
bytes32(0), bytes32(0),
...@@ -539,7 +539,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -539,7 +539,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Expected local data // Expected local data
bytes32[5] memory data = [ bytes32[5] memory data = [
Hash.unwrap(gameProxy.settlementHead()), Hash.unwrap(gameProxy.l1Head()),
startingClaim, startingClaim,
disputedClaim, disputedClaim,
bytes32(uint256(1) << 0xC0), bytes32(uint256(1) << 0xC0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment