Commit 626b3fed authored by clabby's avatar clabby

Remove `settlementHead` rename

parent b13db0ad
This diff is collapsed.
......@@ -16,6 +16,11 @@
"name": "_genesisBlockNumber",
"type": "uint256"
},
{
"internalType": "Hash",
"name": "_genesisOutputRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "_maxGameDepth",
......@@ -198,6 +203,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "GENESIS_OUTPUT_ROOT",
"outputs": [
{
"internalType": "Hash",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_GAME_DEPTH",
......
......@@ -68,7 +68,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
IBondManager public bondManager;
/// @inheritdoc IOutputBisectionGame
Hash public settlementHead;
Hash public l1Head;
/// @notice An append-only array of all claims made during the dispute game.
ClaimData[] public claimData;
......@@ -295,8 +295,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
IPreimageOracle oracle = VM.oracle();
if (_ident == 1) {
// Load the settlement layer head hash
oracle.loadLocalData(_ident, Hash.unwrap(uuid), Hash.unwrap(settlementHead), 32, _partOffset);
// Load the L1 head hash
oracle.loadLocalData(_ident, Hash.unwrap(uuid), Hash.unwrap(l1Head), 32, _partOffset);
} else if (_ident == 2) {
// Load the starting proposal's output root.
oracle.loadLocalData(_ident, Hash.unwrap(uuid), Claim.unwrap(starting), 32, _partOffset);
......@@ -449,8 +449,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
})
);
// Persist the settlement layer hash of the parent block.
settlementHead = Hash.wrap(blockhash(block.number - 1));
// Persist the blockhash of the parent block.
l1Head = Hash.wrap(blockhash(block.number - 1));
}
/// @notice Returns the length of the `claimData` array.
......
......@@ -61,8 +61,8 @@ interface IOutputBisectionGame is IDisputeGame {
/// @param _claimIndex The index of the subgame root claim to resolve.
function resolveClaim(uint256 _claimIndex) external payable;
/// @notice An block hash on the settlement layer that contains the disputed output root.
function settlementHead() external view returns (Hash settlementHead_);
/// @notice A block hash on the L1 that contains the disputed output root.
function l1Head() external view returns (Hash l1Head_);
/// @notice The l2BlockNumber of the disputed output root in the `L2OutputOracle`.
function l2BlockNumber() external view returns (uint256 l2BlockNumber_);
......
......@@ -144,7 +144,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
assertEq(Timestamp.unwrap(gameProxy.createdAt()), block.timestamp);
// 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
......@@ -493,7 +493,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Expected local data
bytes32[5] memory data = [
Hash.unwrap(gameProxy.settlementHead()),
Hash.unwrap(gameProxy.l1Head()),
startingClaim,
disputedClaim,
bytes32(0),
......@@ -539,7 +539,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Expected local data
bytes32[5] memory data = [
Hash.unwrap(gameProxy.settlementHead()),
Hash.unwrap(gameProxy.l1Head()),
startingClaim,
disputedClaim,
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