Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
626b3fed
Commit
626b3fed
authored
Nov 30, 2023
by
clabby
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `settlementHead` rename
parent
b13db0ad
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
45 deletions
+63
-45
outputbisectiongame.go
op-bindings/bindings/outputbisectiongame.go
+33
-33
outputbisectiongame_more.go
op-bindings/bindings/outputbisectiongame_more.go
+2
-2
OutputBisectionGame.json
.../contracts-bedrock/snapshots/abi/OutputBisectionGame.json
+18
-0
OutputBisectionGame.sol
...ges/contracts-bedrock/src/dispute/OutputBisectionGame.sol
+5
-5
IOutputBisectionGame.sol
...s-bedrock/src/dispute/interfaces/IOutputBisectionGame.sol
+2
-2
OutputBisectionGame.t.sol
.../contracts-bedrock/test/dispute/OutputBisectionGame.t.sol
+3
-3
No files found.
op-bindings/bindings/outputbisectiongame.go
View file @
626b3fed
This diff is collapsed.
Click to expand it.
op-bindings/bindings/outputbisectiongame_more.go
View file @
626b3fed
This diff is collapsed.
Click to expand it.
packages/contracts-bedrock/snapshots/abi/OutputBisectionGame.json
View file @
626b3fed
...
@@ -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"
,
...
...
packages/contracts-bedrock/src/dispute/OutputBisectionGame.sol
View file @
626b3fed
...
@@ -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
settlement
Head;
Hash public
l1
Head;
/// @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(
settlement
Head), 32, _partOffset);
oracle.loadLocalData(_ident, Hash.unwrap(uuid), Hash.unwrap(
l1
Head), 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
block
hash of the parent block.
settlement
Head = Hash.wrap(blockhash(block.number - 1));
l1
Head = Hash.wrap(blockhash(block.number - 1));
}
}
/// @notice Returns the length of the `claimData` array.
/// @notice Returns the length of the `claimData` array.
...
...
packages/contracts-bedrock/src/dispute/interfaces/IOutputBisectionGame.sol
View file @
626b3fed
...
@@ -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 A
n 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 settlement
Head_);
function
l1Head() external view returns (Hash l1
Head_);
/// @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_);
...
...
packages/contracts-bedrock/test/dispute/OutputBisectionGame.t.sol
View file @
626b3fed
...
@@ -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.
settlement
Head()), blockhash(block.number - 1));
assertEq(Hash.unwrap(gameProxy.
l1
Head()), 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.
settlement
Head()),
Hash.unwrap(gameProxy.
l1
Head()),
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.
settlement
Head()),
Hash.unwrap(gameProxy.
l1
Head()),
startingClaim,
startingClaim,
disputedClaim,
disputedClaim,
bytes32(uint256(1) << 0xC0),
bytes32(uint256(1) << 0xC0),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment