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
581b7a17
Unverified
Commit
581b7a17
authored
Dec 04, 2023
by
clabby
Committed by
GitHub
Dec 04, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8351 from ethereum-optimism/cl/ctb/output-bisection-contract
feat(ctb): `OutputBisectionGame`
parents
a413603a
833e3558
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
414 additions
and
133 deletions
+414
-133
outputbisectiongame.go
op-bindings/bindings/outputbisectiongame.go
+35
-4
outputbisectiongame_more.go
op-bindings/bindings/outputbisectiongame_more.go
+1
-1
config.go
op-chain-ops/genesis/config.go
+2
-0
test-deploy-config-full.json
op-chain-ops/genesis/testdata/test-deploy-config-full.json
+1
-0
register.go
op-challenger/game/fault/register.go
+5
-1
output_cannon.go
op-challenger/game/fault/trace/outputs/output_cannon.go
+4
-5
helper.go
op-e2e/e2eutils/disputegame/helper.go
+13
-1
output_game_helper.go
op-e2e/e2eutils/disputegame/output_game_helper.go
+4
-2
output_cannon_test.go
op-e2e/faultproofs/output_cannon_test.go
+2
-6
devnetL1-template.json
...es/contracts-bedrock/deploy-config/devnetL1-template.json
+3
-2
Deploy.s.sol
packages/contracts-bedrock/scripts/Deploy.s.sol
+3
-2
DeployConfig.s.sol
packages/contracts-bedrock/scripts/DeployConfig.s.sol
+2
-0
semver-lock.json
packages/contracts-bedrock/semver-lock.json
+2
-2
OutputBisectionGame.json
.../contracts-bedrock/snapshots/abi/OutputBisectionGame.json
+18
-0
OutputBisectionGame.sol
...ges/contracts-bedrock/src/dispute/OutputBisectionGame.sol
+85
-40
IOutputBisectionGame.sol
...s-bedrock/src/dispute/interfaces/IOutputBisectionGame.sol
+1
-4
OutputBisectionGame.t.sol
.../contracts-bedrock/test/dispute/OutputBisectionGame.t.sol
+233
-63
No files found.
op-bindings/bindings/outputbisectiongame.go
View file @
581b7a17
...
@@ -30,8 +30,8 @@ var (
...
@@ -30,8 +30,8 @@ var (
// OutputBisectionGameMetaData contains all meta data concerning the OutputBisectionGame contract.
// OutputBisectionGameMetaData contains all meta data concerning the OutputBisectionGame contract.
var
OutputBisectionGameMetaData
=
&
bind
.
MetaData
{
var
OutputBisectionGameMetaData
=
&
bind
.
MetaData
{
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
_gameType
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_absolutePrestate
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_genesisBlockNumber
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_maxGameDepth
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_splitDepth
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Duration
\"
,
\"
name
\"
:
\"
_gameDuration
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"
_vm
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
CannotDefendRootClaim
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAboveSplit
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAlreadyExists
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAlreadyResolved
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClockNotExpired
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClockTimeExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameDepthExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameNotInProgress
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidLocalIdent
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidParent
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidPrestate
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidSplitDepth
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
OutOfOrderResolution
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
UnexpectedRootClaim
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ValidStep
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
claimant
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
Move
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
Resolved
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ABSOLUTE_PRESTATE
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GAME_DURATION
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Duration
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GENESIS_BLOCK_NUMBER
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
MAX_GAME_DEPTH
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
SPLIT_DEPTH
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
VM
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_ident
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_execLeafIdx
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_partOffset
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
addLocalData
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_claim
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
attack
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
bondManager
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBondManager
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
claimData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
countered
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
Position
\"
,
\"
name
\"
:
\"
position
\"
,
\"
type
\"
:
\"
uint128
\"
},{
\"
internalType
\"
:
\"
Clock
\"
,
\"
name
\"
:
\"
clock
\"
,
\"
type
\"
:
\"
uint128
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
claimDataLen
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
len_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
createdAt
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_claim
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
defend
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
extraData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameType
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
initialize
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l1Head
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Hash
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l2BlockNumber
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
l2BlockNumber_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_challengeIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
name
\"
:
\"
move
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
resolve
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_claimIndex
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
resolveClaim
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
resolvedAt
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
rootClaim
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
status
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_claimIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_stateData
\"
,
\"
type
\"
:
\"
bytes
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_proof
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
step
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
ABI
:
"[{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
_gameType
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_absolutePrestate
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_genesisBlockNumber
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Hash
\"
,
\"
name
\"
:
\"
_genesisOutputRoot
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_maxGameDepth
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_splitDepth
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Duration
\"
,
\"
name
\"
:
\"
_gameDuration
\"
,
\"
type
\"
:
\"
uint64
\"
},{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"
_vm
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
constructor
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
CannotDefendRootClaim
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAboveSplit
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAlreadyExists
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClaimAlreadyResolved
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClockNotExpired
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ClockTimeExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameDepthExceeded
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GameNotInProgress
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidLocalIdent
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidParent
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidPrestate
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
InvalidSplitDepth
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
OutOfOrderResolution
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
UnexpectedRootClaim
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ValidStep
\"
,
\"
type
\"
:
\"
error
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
address
\"
,
\"
name
\"
:
\"
claimant
\"
,
\"
type
\"
:
\"
address
\"
}],
\"
name
\"
:
\"
Move
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
anonymous
\"
:false,
\"
inputs
\"
:[{
\"
indexed
\"
:true,
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
name
\"
:
\"
Resolved
\"
,
\"
type
\"
:
\"
event
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
ABSOLUTE_PRESTATE
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GAME_DURATION
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Duration
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GENESIS_BLOCK_NUMBER
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
GENESIS_OUTPUT_ROOT
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Hash
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
MAX_GAME_DEPTH
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
SPLIT_DEPTH
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
VM
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBigStepper
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_ident
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_execLeafIdx
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_partOffset
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
addLocalData
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_claim
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
attack
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
bondManager
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
contractIBondManager
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
address
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
claimData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint32
\"
,
\"
name
\"
:
\"
parentIndex
\"
,
\"
type
\"
:
\"
uint32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
countered
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
Position
\"
,
\"
name
\"
:
\"
position
\"
,
\"
type
\"
:
\"
uint128
\"
},{
\"
internalType
\"
:
\"
Clock
\"
,
\"
name
\"
:
\"
clock
\"
,
\"
type
\"
:
\"
uint128
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
claimDataLen
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
len_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
createdAt
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_parentIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_claim
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
name
\"
:
\"
defend
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
extraData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameData
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
extraData_
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
gameType
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
GameType
\"
,
\"
name
\"
:
\"
gameType_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
initialize
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l1Head
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Hash
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
l2BlockNumber
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
l2BlockNumber_
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_challengeIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
_claim
\"
,
\"
type
\"
:
\"
bytes32
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
}],
\"
name
\"
:
\"
move
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
resolve
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"
status_
\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_claimIndex
\"
,
\"
type
\"
:
\"
uint256
\"
}],
\"
name
\"
:
\"
resolveClaim
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
payable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
resolvedAt
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Timestamp
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint64
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
rootClaim
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
Claim
\"
,
\"
name
\"
:
\"
rootClaim_
\"
,
\"
type
\"
:
\"
bytes32
\"
}],
\"
stateMutability
\"
:
\"
pure
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
status
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
enumGameStatus
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
uint8
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[{
\"
internalType
\"
:
\"
uint256
\"
,
\"
name
\"
:
\"
_claimIndex
\"
,
\"
type
\"
:
\"
uint256
\"
},{
\"
internalType
\"
:
\"
bool
\"
,
\"
name
\"
:
\"
_isAttack
\"
,
\"
type
\"
:
\"
bool
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_stateData
\"
,
\"
type
\"
:
\"
bytes
\"
},{
\"
internalType
\"
:
\"
bytes
\"
,
\"
name
\"
:
\"
_proof
\"
,
\"
type
\"
:
\"
bytes
\"
}],
\"
name
\"
:
\"
step
\"
,
\"
outputs
\"
:[],
\"
stateMutability
\"
:
\"
nonpayable
\"
,
\"
type
\"
:
\"
function
\"
},{
\"
inputs
\"
:[],
\"
name
\"
:
\"
version
\"
,
\"
outputs
\"
:[{
\"
internalType
\"
:
\"
string
\"
,
\"
name
\"
:
\"\"
,
\"
type
\"
:
\"
string
\"
}],
\"
stateMutability
\"
:
\"
view
\"
,
\"
type
\"
:
\"
function
\"
}]"
,
Bin
:
"0x6101
606040523480156200001257600080fd5b5060405162002cab38038062002cab833981016040819052620000359162000091565b838310620000565760405163e62ccf3960e01b815260040160405180910390fd5b60ff909616610140526080949094526101209290925260a05260c0526001600160401b031660e0526001600160a01b03166101005262000129565b600080600080600080600060e0888a031215620000ad57600080fd5b875160ff81168114620000bf57600080fd5b602089015160408a015160608b015160808c015160a08d0151949b50929950909750955093506001600160401b0381168114620000fb57600080fd5b60c08901519092506001600160a01b03811681146200011957600080fd5b8091505092959891949750929550565b60805160a05160c05160e051610100516101205161014051612acc620001df600039600081816104d70152611b7c0152600081816104030152611a4a0152600081816104a10152818161145301526117a401526000818161055001528181610c680152611c7301526000818161024901528181610ac9015281816121840152818161228c015261236701526000818161033b015281816109c701526111ec01526000818161028b01526113480152612acc6000f3fe6080604052600436106101ac5760003560e01c80638129fc1c116100ec578063c55cd0c71161008a578063d8cc1a3c11610064578063d8cc1a3c1461060a578063f8f43ff61461062a578063fa24f7431461064a578063fdffbb281461066e57600080fd5b8063c55cd0c714610572578063c6f0308c14610585578063cf09e0d0146105e957600080fd5b806392931298116100c6578063929312981461048f578063bbdc02db146104c3578063bcef3b5514610501578063c31b29ce1461053e57600080fd5b80638129fc1c146104255780638980e0cc1461043a5780638b85902b1461044f57600080fd5b8063363cc42711610159578063609d333411610133578063609d3334146103b3578063632247ea146103c85780636361506d146103db5780636737abeb146103f157600080fd5b8063363cc427146102d75780634778efe81461032957806354fd4d501461035d57600080fd5b8063266198f91161018a578063266198f9146102795780632810e1d6146102ad57806335fef567146102c257600080fd5b806319effeb4146101b1578063200d2ed2146101fc57806324185bc614610237575b600080fd5b3480156101bd57600080fd5b506000546101de9068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561020857600080fd5b5060005461022a90700100000000000000000000000000000000900460ff1681565b6040516101f391906125a0565b34801561024357600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f3565b34801561028557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b957600080fd5b5061022a610681565b6102d56102d03660046125e1565b610852565b005b3480156102e357600080fd5b506001546103049073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b34801561033557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036957600080fd5b506103a66040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101f3919061266e565b3480156103bf57600080fd5b506103a6610862565b6102d56103d636600461269d565b610874565b3480156103e757600080fd5b5061026b60025481565b3480156103fd57600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561043157600080fd5b506102d5610f6d565b34801561044657600080fd5b5060035461026b565b34801561045b57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561026b565b34801561049b57600080fd5b506103047f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b34801561050d57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561026b565b34801561054a57600080fd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b6102d56105803660046125e1565b6110be565b34801561059157600080fd5b506105a56105a03660046126d2565b6110ca565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f3565b3480156105f557600080fd5b506000546101de9067ffffffffffffffff1681565b34801561061657600080fd5b506102d5610625366004612734565b61113b565b34801561063657600080fd5b506102d56106453660046127be565b6116d7565b34801561065657600080fd5b5061065f611b7a565b6040516101f3939291906127ea565b6102d561067c3660046126d2565b611bd7565b600080600054700100000000000000000000000000000000900460ff1660028111156106af576106af612571565b146106e6576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610722576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061073657610736612815565b6000918252602090912060039091020154640100000000900460ff1661075d576002610760565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561081157610811612571565b02179055600281111561082657610826612571565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61085e82826000610874565b5050565b606061086f602080611f11565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108a0576108a0612571565b146108d7576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156108e3575080155b1561091a576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092f5761092f612815565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193506109c391908590611fa816565b90507f0000000000000000000000000000000000000000000000000000000000000000610a82826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610ac4576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aef7f00000000000000000000000000000000000000000000000000000000000000006001612873565b610b8b826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610ba457610ba48486611fb0565b815160009063ffffffff90811614610c04576003836000015163ffffffff1681548110610bd357610bd3612815565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c3d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c519190612873565b610c5b919061288b565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610cce576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d4c576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610ec257610ec2612815565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f239060019061288b565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610ff27ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110b8904361288b565b40600255565b61085e82826001610874565b600381815481106110da57600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561116757611167612571565b1461119e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111b3576111b3612815565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112127f00000000000000000000000000000000000000000000000000000000000000006001612873565b6112ae826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112ef576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080891561137257611313836fffffffffffffffffffffffffffffffff16612009565b67ffffffffffffffff16156113465761133d6113306001866128a2565b865463ffffffff166120af565b60010154611368565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061138c565b8460010154915061138984600161133091906128d3565b90505b600882901b60088a8a6040516113a3929190612907565b6040518091039020901b146113e4576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113f08d61214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a001604051602081830303815290604052805190602001209050600084600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328f8f8f8f886040518663ffffffff1660e01b81526004016114b2959493929190612960565b6020604051808303816000875af11580156114d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f5919061299a565b6002878101549290911492506000916115a0906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163c8b6fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61164691906129b3565b61165091906129d4565b67ffffffffffffffff161590508115158103611698576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505087547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790975550505050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561170357611703612571565b1461173a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806117468461214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a00160405160208183030381529060405280519060200120905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118319190612a22565b9050866001036118f3576002546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061299a565b50611b71565b866002036119705760018401546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b866003036119ed5760018301546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b86600403611ac657600284015473ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad908990859060c090611a3a906fffffffffffffffffffffffffffffffff16612009565b611a6e9067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612873565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945260248401929092521b6044820152600860648201526084810188905260a4016118aa565b86600503611b3f576040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101889052602481018390524660c01b6044820152600860648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bd0610862565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c0357611c03612571565b14611c3a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c4f57611c4f612815565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cbf90700100000000000000000000000000000000900467ffffffffffffffff164261288b565b6002830154611cef9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612873565b11611d26576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d44575060065460ff165b15611d7b576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611d8957508215155b15611dc0576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611e8e576000838281548110611de157611de1612815565b6000918252602080832090910154808352600590915260409091205490915015611e37576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e4c57611e4c612815565b600091825260209091206003909102018054909150640100000000900460ff16611e7b57600193505050611e8e565b505080611e8790612a58565b9050611dc4565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ed791612537565b83600003611f0b57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f4884367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612873565b90508267ffffffffffffffff1667ffffffffffffffff811115611f6d57611f6d612a90565b6040519080825280601f01601f191660200182016040528015611f97576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600082901a6001811480611fc7575060ff81166002145b612004576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810184905260240160405180910390fd5b505050565b600080612096837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120cd846fffffffffffffffffffffffffffffffff1661248b565b9050600383815481106120e2576120e2612815565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461214557815460038054909163ffffffff1690811061213057612130612815565b906000526020600020906003020191506120f3565b5092915050565b600080600083905060006003828154811061216957612169612815565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612240906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612281576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612348906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082146123c357825463ffffffff1661238d7f00000000000000000000000000000000000000000000000000000000000000006001612873565b8303612397578391505b600381815481106123aa576123aa612815565b9060005260206000209060030201935080945050612285565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816123f08460011c90565b6fffffffffffffffffffffffffffffffff1614905080156124495761241f6124196001846128a2565b886120af565b98506003878154811061243457612434612815565b9060005260206000209060030201975061247f565b6003878154811061245c5761245c612815565b9060005260206000209060030201985061247c82600161241991906128d3565b97505b50505050505050915091565b6000811960018301168161251f827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906125559190612558565b50565b5b8082111561256d5760008155600101612559565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106125db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b600080604083850312156125f457600080fd5b50508035926020909101359150565b6000815180845260005b818110156126295760208185018101518683018201520161260d565b8181111561263b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006126816020830184612603565b9392505050565b8035801515811461269857600080fd5b919050565b6000806000606084860312156126b257600080fd5b83359250602084013591506126c960408501612688565b90509250925092565b6000602082840312156126e457600080fd5b5035919050565b60008083601f8401126126fd57600080fd5b50813567ffffffffffffffff81111561271557600080fd5b60208301915083602082850101111561272d57600080fd5b9250929050565b6000806000806000806080878903121561274d57600080fd5b8635955061275d60208801612688565b9450604087013567ffffffffffffffff8082111561277a57600080fd5b6127868a838b016126eb565b9096509450606089013591508082111561279f57600080fd5b506127ac89828a016126eb565b979a9699509497509295939492505050565b6000806000606084860312156127d357600080fd5b505081359360208301359350604090920135919050565b60ff8416815282602082015260606040820152600061280c6060830184612603565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561288657612886612844565b500190565b60008282101561289d5761289d612844565b500390565b60006fffffffffffffffffffffffffffffffff838116908316818110156128cb576128cb612844565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156128fe576128fe612844565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612974606083018789612917565b8281036020840152612987818688612917565b9150508260408301529695505050505050565b6000602082840312156129ac57600080fd5b5051919050565b600067ffffffffffffffff838116908316818110156128cb576128cb612844565b600067ffffffffffffffff80841680612a16577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612a3457600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461268157600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8957612a89612844
565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
,
Bin
:
"0x6101
806040523480156200001257600080fd5b5060405162002ea538038062002ea58339810160408190526200003591620000b1565b83831015806200005057506200004d60028462000153565b15155b156200006f5760405163e62ccf3960e01b815260040160405180910390fd5b60ff90971661016052608095909552610120939093526101409190915260a05260c0526001600160401b031660e0526001600160a01b03166101005262000176565b600080600080600080600080610100898b031215620000cf57600080fd5b885160ff81168114620000e157600080fd5b60208a015160408b015160608c015160808d015160a08e015160c08f0151959d50939b509199509750955093506001600160401b03811681146200012457600080fd5b60e08a01519092506001600160a01b03811681146200014257600080fd5b809150509295985092959890939650565b6000826200017157634e487b7160e01b600052601260045260246000fd5b500690565b60805160a05160c05160e05161010051610120516101405161016051612c6062000245600039600081816104e20152611b9a01526000818161060601526124c501526000818161040e015281816119d20152611a080152600081816104ac01528181611438015261174801526000818161055b01528181610ca60152611c9101526000818161025401528181610b08015281816121cf015281816122d701526123b301526000818161034601528181610a06015261122a01526000818161029601526113860152612c606000f3fe6080604052600436106101b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612734565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612775565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612802565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612831565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610fab565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612775565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612866565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e06106643660046128c8565b611179565b34801561067557600080fd5b506102e0610684366004612952565b6116ba565b34801561069557600080fd5b5061069e611b98565b6040516101fe9392919061297e565b6102e06106bb366004612866565b611bf5565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612705565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600081548110610775576107756129a9565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612705565b02179055600281111561086557610865612705565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f2f565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612705565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e6129a9565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a0291908590611fc616565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612a07565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be284611fce565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c116129a9565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612a07565b610c999190612a1f565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f006129a9565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612a1f565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612a1f565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612705565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f16129a9565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612a07565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113b057611351836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff16156113845761137b61136e600186612a36565b865463ffffffff166120c8565b600101546113a6565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113ca565b846001015491506113c784600161136e9190612a67565b90505b600882901b60088a8a6040516113e1929190612a9b565b6040518091039020901b14611422576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061142d8c612165565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b8152600401611497959493929190612af4565b6020604051808303816000875af11580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612b2e565b600285810154929091149250600091611585906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611621896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61162b9190612b47565b6116359190612b68565b67ffffffffffffffff16159050811515810361167d576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116e6576116e6612705565b1461171d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061172c86612194565b935093509350935060006117428585858561255f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190612bb6565b905088600103611897576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190612b2e565b50611b8d565b8860020361190e576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600303611985576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600403611ae25760006fffffffffffffffffffffffffffffffff861615611a06576119c2866fffffffffffffffffffffffffffffffff16612022565b6119f69067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612a07565b611a01906001612a07565b611a28565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adb9190612b2e565b5050611b8d565b88600503611b5b576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bee6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c2157611c21612705565b14611c58576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c6d57611c6d6129a9565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cdd90700100000000000000000000000000000000900467ffffffffffffffff1642612a1f565b6002830154611d0d9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612a07565b11611d44576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d62575060065460ff165b15611d99576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611da757508215155b15611dde576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611eac576000838281548110611dff57611dff6129a9565b6000918252602080832090910154808352600590915260409091205490915015611e55576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e6a57611e6a6129a9565b600091825260209091206003909102018054909150640100000000900460ff16611e9957600193505050611eac565b505080611ea590612bec565b9050611de2565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ef5916126cb565b83600003611f2957600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f6684367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612a07565b90508267ffffffffffffffff1667ffffffffffffffff811115611f8b57611f8b612c24565b6040519080825280601f01601f191660200182016040528015611fb5576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480611fe5575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6000806120af837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120e6846fffffffffffffffffffffffffffffffff1661261f565b9050600383815481106120fb576120fb6129a9565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461215e57815460038054909163ffffffff16908110612149576121496129a9565b9060005260206000209060030201915061210c565b5092915050565b600080600080600061217686612194565b935093509350935061218a8484848461255f565b9695505050505050565b60008060008060008590506000600382815481106121b4576121b46129a9565b600091825260209091206002600390920201908101549091507f00000000000000000000000000000000000000000000000000000000000000009061228b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116122cc576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612393906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082111561240f57825463ffffffff166123d97f00000000000000000000000000000000000000000000000000000000000000006001612a07565b83036123e3578391505b600381815481106123f6576123f66129a9565b90600052602060002090600302019350809450506122d0565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161243c8460011c90565b6fffffffffffffffffffffffffffffffff16149050801561250d576000612474836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff1611156124c357600061249a612494600185612a36565b896120c8565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506124e79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612551565b600061251d612494846001612a67565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036125c65782826040516020016125a99291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052805190602001209050612617565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081196001830116816126b3827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906126e991906126ec565b50565b5b8082111561270157600081556001016126ed565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061276f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561278857600080fd5b50508035926020909101359150565b6000815180845260005b818110156127bd576020818501810151868301820152016127a1565b818111156127cf576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006128156020830184612797565b9392505050565b8035801515811461282c57600080fd5b919050565b60008060006060848603121561284657600080fd5b833592506020840135915061285d6040850161281c565b90509250925092565b60006020828403121561287857600080fd5b5035919050565b60008083601f84011261289157600080fd5b50813567ffffffffffffffff8111156128a957600080fd5b6020830191508360208285010111156128c157600080fd5b9250929050565b600080600080600080608087890312156128e157600080fd5b863595506128f16020880161281c565b9450604087013567ffffffffffffffff8082111561290e57600080fd5b61291a8a838b0161287f565b9096509450606089013591508082111561293357600080fd5b5061294089828a0161287f565b979a9699509497509295939492505050565b60008060006060848603121561296757600080fd5b505081359360208301359350604090920135919050565b60ff841681528260208201526060604082015260006129a06060830184612797565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a1a57612a1a6129d8565b500190565b600082821015612a3157612a316129d8565b500390565b60006fffffffffffffffffffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612a9257612a926129d8565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612b08606083018789612aab565b8281036020840152612b1b818688612aab565b9150508260408301529695505050505050565b600060208284031215612b4057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b600067ffffffffffffffff80841680612baa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612bc857600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461281557600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c1d57612c1d6129d8
565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
,
}
}
// OutputBisectionGameABI is the input ABI used to generate the binding from.
// OutputBisectionGameABI is the input ABI used to generate the binding from.
...
@@ -43,7 +43,7 @@ var OutputBisectionGameABI = OutputBisectionGameMetaData.ABI
...
@@ -43,7 +43,7 @@ var OutputBisectionGameABI = OutputBisectionGameMetaData.ABI
var
OutputBisectionGameBin
=
OutputBisectionGameMetaData
.
Bin
var
OutputBisectionGameBin
=
OutputBisectionGameMetaData
.
Bin
// DeployOutputBisectionGame deploys a new Ethereum contract, binding an instance of OutputBisectionGame to it.
// DeployOutputBisectionGame deploys a new Ethereum contract, binding an instance of OutputBisectionGame to it.
func
DeployOutputBisectionGame
(
auth
*
bind
.
TransactOpts
,
backend
bind
.
ContractBackend
,
_gameType
uint8
,
_absolutePrestate
[
32
]
byte
,
_genesisBlockNumber
*
big
.
Int
,
_maxGameDepth
*
big
.
Int
,
_splitDepth
*
big
.
Int
,
_gameDuration
uint64
,
_vm
common
.
Address
)
(
common
.
Address
,
*
types
.
Transaction
,
*
OutputBisectionGame
,
error
)
{
func
DeployOutputBisectionGame
(
auth
*
bind
.
TransactOpts
,
backend
bind
.
ContractBackend
,
_gameType
uint8
,
_absolutePrestate
[
32
]
byte
,
_genesisBlockNumber
*
big
.
Int
,
_
genesisOutputRoot
[
32
]
byte
,
_
maxGameDepth
*
big
.
Int
,
_splitDepth
*
big
.
Int
,
_gameDuration
uint64
,
_vm
common
.
Address
)
(
common
.
Address
,
*
types
.
Transaction
,
*
OutputBisectionGame
,
error
)
{
parsed
,
err
:=
OutputBisectionGameMetaData
.
GetAbi
()
parsed
,
err
:=
OutputBisectionGameMetaData
.
GetAbi
()
if
err
!=
nil
{
if
err
!=
nil
{
return
common
.
Address
{},
nil
,
nil
,
err
return
common
.
Address
{},
nil
,
nil
,
err
...
@@ -52,7 +52,7 @@ func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBac
...
@@ -52,7 +52,7 @@ func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBac
return
common
.
Address
{},
nil
,
nil
,
errors
.
New
(
"GetABI returned nil"
)
return
common
.
Address
{},
nil
,
nil
,
errors
.
New
(
"GetABI returned nil"
)
}
}
address
,
tx
,
contract
,
err
:=
bind
.
DeployContract
(
auth
,
*
parsed
,
common
.
FromHex
(
OutputBisectionGameBin
),
backend
,
_gameType
,
_absolutePrestate
,
_genesisBlockNumber
,
_maxGameDepth
,
_splitDepth
,
_gameDuration
,
_vm
)
address
,
tx
,
contract
,
err
:=
bind
.
DeployContract
(
auth
,
*
parsed
,
common
.
FromHex
(
OutputBisectionGameBin
),
backend
,
_gameType
,
_absolutePrestate
,
_genesisBlockNumber
,
_
genesisOutputRoot
,
_
maxGameDepth
,
_splitDepth
,
_gameDuration
,
_vm
)
if
err
!=
nil
{
if
err
!=
nil
{
return
common
.
Address
{},
nil
,
nil
,
err
return
common
.
Address
{},
nil
,
nil
,
err
}
}
...
@@ -294,6 +294,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISBLOCKNUMBER
...
@@ -294,6 +294,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISBLOCKNUMBER
return
_OutputBisectionGame
.
Contract
.
GENESISBLOCKNUMBER
(
&
_OutputBisectionGame
.
CallOpts
)
return
_OutputBisectionGame
.
Contract
.
GENESISBLOCKNUMBER
(
&
_OutputBisectionGame
.
CallOpts
)
}
}
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func
(
_OutputBisectionGame
*
OutputBisectionGameCaller
)
GENESISOUTPUTROOT
(
opts
*
bind
.
CallOpts
)
([
32
]
byte
,
error
)
{
var
out
[]
interface
{}
err
:=
_OutputBisectionGame
.
contract
.
Call
(
opts
,
&
out
,
"GENESIS_OUTPUT_ROOT"
)
if
err
!=
nil
{
return
*
new
([
32
]
byte
),
err
}
out0
:=
*
abi
.
ConvertType
(
out
[
0
],
new
([
32
]
byte
))
.
(
*
[
32
]
byte
)
return
out0
,
err
}
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func
(
_OutputBisectionGame
*
OutputBisectionGameSession
)
GENESISOUTPUTROOT
()
([
32
]
byte
,
error
)
{
return
_OutputBisectionGame
.
Contract
.
GENESISOUTPUTROOT
(
&
_OutputBisectionGame
.
CallOpts
)
}
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func
(
_OutputBisectionGame
*
OutputBisectionGameCallerSession
)
GENESISOUTPUTROOT
()
([
32
]
byte
,
error
)
{
return
_OutputBisectionGame
.
Contract
.
GENESISOUTPUTROOT
(
&
_OutputBisectionGame
.
CallOpts
)
}
// MAXGAMEDEPTH is a free data retrieval call binding the contract method 0x4778efe8.
// MAXGAMEDEPTH is a free data retrieval call binding the contract method 0x4778efe8.
//
//
// Solidity: function MAX_GAME_DEPTH() view returns(uint256)
// Solidity: function MAX_GAME_DEPTH() view returns(uint256)
...
...
op-bindings/bindings/outputbisectiongame_more.go
View file @
581b7a17
...
@@ -13,7 +13,7 @@ const OutputBisectionGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"co
...
@@ -13,7 +13,7 @@ const OutputBisectionGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"co
var
OutputBisectionGameStorageLayout
=
new
(
solc
.
StorageLayout
)
var
OutputBisectionGameStorageLayout
=
new
(
solc
.
StorageLayout
)
var
OutputBisectionGameDeployedBin
=
"0x6080604052600436106101
ac5760003560e01c80638129fc1c116100ec578063c55cd0c71161008a578063d8cc1a3c11610064578063d8cc1a3c1461060a578063f8f43ff61461062a578063fa24f7431461064a578063fdffbb281461066e57600080fd5b8063c55cd0c714610572578063c6f0308c14610585578063cf09e0d0146105e957600080fd5b806392931298116100c6578063929312981461048f578063bbdc02db146104c3578063bcef3b5514610501578063c31b29ce1461053e57600080fd5b80638129fc1c146104255780638980e0cc1461043a5780638b85902b1461044f57600080fd5b8063363cc42711610159578063609d333411610133578063609d3334146103b3578063632247ea146103c85780636361506d146103db5780636737abeb146103f157600080fd5b8063363cc427146102d75780634778efe81461032957806354fd4d501461035d57600080fd5b8063266198f91161018a578063266198f9146102795780632810e1d6146102ad57806335fef567146102c257600080fd5b806319effeb4146101b1578063200d2ed2146101fc57806324185bc614610237575b600080fd5b3480156101bd57600080fd5b506000546101de9068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561020857600080fd5b5060005461022a90700100000000000000000000000000000000900460ff1681565b6040516101f391906125a0565b34801561024357600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f3565b34801561028557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b957600080fd5b5061022a610681565b6102d56102d03660046125e1565b610852565b005b3480156102e357600080fd5b506001546103049073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b34801561033557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036957600080fd5b506103a66040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101f3919061266e565b3480156103bf57600080fd5b506103a6610862565b6102d56103d636600461269d565b610874565b3480156103e757600080fd5b5061026b60025481565b3480156103fd57600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561043157600080fd5b506102d5610f6d565b34801561044657600080fd5b5060035461026b565b34801561045b57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561026b565b34801561049b57600080fd5b506103047f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b34801561050d57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561026b565b34801561054a57600080fd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b6102d56105803660046125e1565b6110be565b34801561059157600080fd5b506105a56105a03660046126d2565b6110ca565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f3565b3480156105f557600080fd5b506000546101de9067ffffffffffffffff1681565b34801561061657600080fd5b506102d5610625366004612734565b61113b565b34801561063657600080fd5b506102d56106453660046127be565b6116d7565b34801561065657600080fd5b5061065f611b7a565b6040516101f3939291906127ea565b6102d561067c3660046126d2565b611bd7565b600080600054700100000000000000000000000000000000900460ff1660028111156106af576106af612571565b146106e6576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610722576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061073657610736612815565b6000918252602090912060039091020154640100000000900460ff1661075d576002610760565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561081157610811612571565b02179055600281111561082657610826612571565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61085e82826000610874565b5050565b606061086f602080611f11565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108a0576108a0612571565b146108d7576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156108e3575080155b1561091a576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092f5761092f612815565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193506109c391908590611fa816565b90507f0000000000000000000000000000000000000000000000000000000000000000610a82826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610ac4576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aef7f00000000000000000000000000000000000000000000000000000000000000006001612873565b610b8b826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610ba457610ba48486611fb0565b815160009063ffffffff90811614610c04576003836000015163ffffffff1681548110610bd357610bd3612815565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c3d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c519190612873565b610c5b919061288b565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610cce576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d4c576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610ec257610ec2612815565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f239060019061288b565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610ff27ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110b8904361288b565b40600255565b61085e82826001610874565b600381815481106110da57600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561116757611167612571565b1461119e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111b3576111b3612815565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112127f00000000000000000000000000000000000000000000000000000000000000006001612873565b6112ae826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112ef576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080891561137257611313836fffffffffffffffffffffffffffffffff16612009565b67ffffffffffffffff16156113465761133d6113306001866128a2565b865463ffffffff166120af565b60010154611368565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061138c565b8460010154915061138984600161133091906128d3565b90505b600882901b60088a8a6040516113a3929190612907565b6040518091039020901b146113e4576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113f08d61214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a001604051602081830303815290604052805190602001209050600084600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328f8f8f8f886040518663ffffffff1660e01b81526004016114b2959493929190612960565b6020604051808303816000875af11580156114d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f5919061299a565b6002878101549290911492506000916115a0906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163c8b6fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61164691906129b3565b61165091906129d4565b67ffffffffffffffff161590508115158103611698576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505087547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790975550505050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561170357611703612571565b1461173a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806117468461214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a00160405160208183030381529060405280519060200120905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118319190612a22565b9050866001036118f3576002546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061299a565b50611b71565b866002036119705760018401546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b866003036119ed5760018301546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b86600403611ac657600284015473ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad908990859060c090611a3a906fffffffffffffffffffffffffffffffff16612009565b611a6e9067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612873565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945260248401929092521b6044820152600860648201526084810188905260a4016118aa565b86600503611b3f576040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101889052602481018390524660c01b6044820152600860648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bd0610862565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c0357611c03612571565b14611c3a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c4f57611c4f612815565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cbf90700100000000000000000000000000000000900467ffffffffffffffff164261288b565b6002830154611cef9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612873565b11611d26576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d44575060065460ff165b15611d7b576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611d8957508215155b15611dc0576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611e8e576000838281548110611de157611de1612815565b6000918252602080832090910154808352600590915260409091205490915015611e37576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e4c57611e4c612815565b600091825260209091206003909102018054909150640100000000900460ff16611e7b57600193505050611e8e565b505080611e8790612a58565b9050611dc4565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ed791612537565b83600003611f0b57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f4884367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612873565b90508267ffffffffffffffff1667ffffffffffffffff811115611f6d57611f6d612a90565b6040519080825280601f01601f191660200182016040528015611f97576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600082901a6001811480611fc7575060ff81166002145b612004576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810184905260240160405180910390fd5b505050565b600080612096837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120cd846fffffffffffffffffffffffffffffffff1661248b565b9050600383815481106120e2576120e2612815565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461214557815460038054909163ffffffff1690811061213057612130612815565b906000526020600020906003020191506120f3565b5092915050565b600080600083905060006003828154811061216957612169612815565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612240906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612281576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612348906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082146123c357825463ffffffff1661238d7f00000000000000000000000000000000000000000000000000000000000000006001612873565b8303612397578391505b600381815481106123aa576123aa612815565b9060005260206000209060030201935080945050612285565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816123f08460011c90565b6fffffffffffffffffffffffffffffffff1614905080156124495761241f6124196001846128a2565b886120af565b98506003878154811061243457612434612815565b9060005260206000209060030201975061247f565b6003878154811061245c5761245c612815565b9060005260206000209060030201985061247c82600161241991906128d3565b97505b50505050505050915091565b6000811960018301168161251f827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906125559190612558565b50565b5b8082111561256d5760008155600101612559565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106125db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b600080604083850312156125f457600080fd5b50508035926020909101359150565b6000815180845260005b818110156126295760208185018101518683018201520161260d565b8181111561263b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006126816020830184612603565b9392505050565b8035801515811461269857600080fd5b919050565b6000806000606084860312156126b257600080fd5b83359250602084013591506126c960408501612688565b90509250925092565b6000602082840312156126e457600080fd5b5035919050565b60008083601f8401126126fd57600080fd5b50813567ffffffffffffffff81111561271557600080fd5b60208301915083602082850101111561272d57600080fd5b9250929050565b6000806000806000806080878903121561274d57600080fd5b8635955061275d60208801612688565b9450604087013567ffffffffffffffff8082111561277a57600080fd5b6127868a838b016126eb565b9096509450606089013591508082111561279f57600080fd5b506127ac89828a016126eb565b979a9699509497509295939492505050565b6000806000606084860312156127d357600080fd5b505081359360208301359350604090920135919050565b60ff8416815282602082015260606040820152600061280c6060830184612603565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561288657612886612844565b500190565b60008282101561289d5761289d612844565b500390565b60006fffffffffffffffffffffffffffffffff838116908316818110156128cb576128cb612844565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156128fe576128fe612844565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612974606083018789612917565b8281036020840152612987818688612917565b9150508260408301529695505050505050565b6000602082840312156129ac57600080fd5b5051919050565b600067ffffffffffffffff838116908316818110156128cb576128cb612844565b600067ffffffffffffffff80841680612a16577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612a3457600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461268157600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8957612a89612844
565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
var
OutputBisectionGameDeployedBin
=
"0x6080604052600436106101
b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612734565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612775565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612802565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612831565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610fab565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612775565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612866565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e06106643660046128c8565b611179565b34801561067557600080fd5b506102e0610684366004612952565b6116ba565b34801561069557600080fd5b5061069e611b98565b6040516101fe9392919061297e565b6102e06106bb366004612866565b611bf5565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612705565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600081548110610775576107756129a9565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612705565b02179055600281111561086557610865612705565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f2f565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612705565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e6129a9565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a0291908590611fc616565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612a07565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be284611fce565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c116129a9565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612a07565b610c999190612a1f565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f006129a9565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612a1f565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612a1f565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612705565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f16129a9565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612a07565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113b057611351836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff16156113845761137b61136e600186612a36565b865463ffffffff166120c8565b600101546113a6565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113ca565b846001015491506113c784600161136e9190612a67565b90505b600882901b60088a8a6040516113e1929190612a9b565b6040518091039020901b14611422576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061142d8c612165565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b8152600401611497959493929190612af4565b6020604051808303816000875af11580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612b2e565b600285810154929091149250600091611585906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611621896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61162b9190612b47565b6116359190612b68565b67ffffffffffffffff16159050811515810361167d576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116e6576116e6612705565b1461171d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061172c86612194565b935093509350935060006117428585858561255f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190612bb6565b905088600103611897576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190612b2e565b50611b8d565b8860020361190e576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600303611985576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600403611ae25760006fffffffffffffffffffffffffffffffff861615611a06576119c2866fffffffffffffffffffffffffffffffff16612022565b6119f69067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612a07565b611a01906001612a07565b611a28565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adb9190612b2e565b5050611b8d565b88600503611b5b576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bee6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c2157611c21612705565b14611c58576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c6d57611c6d6129a9565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cdd90700100000000000000000000000000000000900467ffffffffffffffff1642612a1f565b6002830154611d0d9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612a07565b11611d44576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d62575060065460ff165b15611d99576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611da757508215155b15611dde576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611eac576000838281548110611dff57611dff6129a9565b6000918252602080832090910154808352600590915260409091205490915015611e55576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e6a57611e6a6129a9565b600091825260209091206003909102018054909150640100000000900460ff16611e9957600193505050611eac565b505080611ea590612bec565b9050611de2565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ef5916126cb565b83600003611f2957600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f6684367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612a07565b90508267ffffffffffffffff1667ffffffffffffffff811115611f8b57611f8b612c24565b6040519080825280601f01601f191660200182016040528015611fb5576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480611fe5575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6000806120af837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120e6846fffffffffffffffffffffffffffffffff1661261f565b9050600383815481106120fb576120fb6129a9565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461215e57815460038054909163ffffffff16908110612149576121496129a9565b9060005260206000209060030201915061210c565b5092915050565b600080600080600061217686612194565b935093509350935061218a8484848461255f565b9695505050505050565b60008060008060008590506000600382815481106121b4576121b46129a9565b600091825260209091206002600390920201908101549091507f00000000000000000000000000000000000000000000000000000000000000009061228b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116122cc576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612393906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082111561240f57825463ffffffff166123d97f00000000000000000000000000000000000000000000000000000000000000006001612a07565b83036123e3578391505b600381815481106123f6576123f66129a9565b90600052602060002090600302019350809450506122d0565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161243c8460011c90565b6fffffffffffffffffffffffffffffffff16149050801561250d576000612474836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff1611156124c357600061249a612494600185612a36565b896120c8565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506124e79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612551565b600061251d612494846001612a67565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036125c65782826040516020016125a99291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052805190602001209050612617565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081196001830116816126b3827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906126e991906126ec565b50565b5b8082111561270157600081556001016126ed565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061276f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561278857600080fd5b50508035926020909101359150565b6000815180845260005b818110156127bd576020818501810151868301820152016127a1565b818111156127cf576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006128156020830184612797565b9392505050565b8035801515811461282c57600080fd5b919050565b60008060006060848603121561284657600080fd5b833592506020840135915061285d6040850161281c565b90509250925092565b60006020828403121561287857600080fd5b5035919050565b60008083601f84011261289157600080fd5b50813567ffffffffffffffff8111156128a957600080fd5b6020830191508360208285010111156128c157600080fd5b9250929050565b600080600080600080608087890312156128e157600080fd5b863595506128f16020880161281c565b9450604087013567ffffffffffffffff8082111561290e57600080fd5b61291a8a838b0161287f565b9096509450606089013591508082111561293357600080fd5b5061294089828a0161287f565b979a9699509497509295939492505050565b60008060006060848603121561296757600080fd5b505081359360208301359350604090920135919050565b60ff841681528260208201526060604082015260006129a06060830184612797565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a1a57612a1a6129d8565b500190565b600082821015612a3157612a316129d8565b500390565b60006fffffffffffffffffffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612a9257612a926129d8565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612b08606083018789612aab565b8281036020840152612b1b818688612aab565b9150508260408301529695505050505050565b600060208284031215612b4057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b600067ffffffffffffffff80841680612baa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612bc857600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461281557600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c1d57612c1d6129d8
565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
func
init
()
{
func
init
()
{
...
...
op-chain-ops/genesis/config.go
View file @
581b7a17
...
@@ -214,6 +214,8 @@ type DeployConfig struct {
...
@@ -214,6 +214,8 @@ type DeployConfig struct {
FaultGameMaxDuration
uint64
`json:"faultGameMaxDuration"`
FaultGameMaxDuration
uint64
`json:"faultGameMaxDuration"`
// OutputBisectionGameGenesisBlock is the block number for genesis.
// OutputBisectionGameGenesisBlock is the block number for genesis.
OutputBisectionGameGenesisBlock
uint64
`json:"outputBisectionGameGenesisBlock"`
OutputBisectionGameGenesisBlock
uint64
`json:"outputBisectionGameGenesisBlock"`
// OutputBisectionGameGenesisOutputRoot is the output root for the genesis block.
OutputBisectionGameGenesisOutputRoot
common
.
Hash
`json:"outputBisectionGameGenesisOutputRoot"`
// OutputBisectionGameSplitDepth is the depth at which the output bisection game splits.
// OutputBisectionGameSplitDepth is the depth at which the output bisection game splits.
OutputBisectionGameSplitDepth
uint64
`json:"outputBisectionGameSplitDepth"`
OutputBisectionGameSplitDepth
uint64
`json:"outputBisectionGameSplitDepth"`
// FundDevAccounts configures whether or not to fund the dev accounts. Should only be used
// FundDevAccounts configures whether or not to fund the dev accounts. Should only be used
...
...
op-chain-ops/genesis/testdata/test-deploy-config-full.json
View file @
581b7a17
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
"faultGameMaxDepth"
:
63
,
"faultGameMaxDepth"
:
63
,
"faultGameMaxDuration"
:
604800
,
"faultGameMaxDuration"
:
604800
,
"outputBisectionGameGenesisBlock"
:
0
,
"outputBisectionGameGenesisBlock"
:
0
,
"outputBisectionGameGenesisOutputRoot"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
"outputBisectionGameSplitDepth"
:
0
,
"outputBisectionGameSplitDepth"
:
0
,
"systemConfigStartBlock"
:
0
,
"systemConfigStartBlock"
:
0
,
"requiredProtocolVersion"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
"requiredProtocolVersion"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
...
...
op-challenger/game/fault/register.go
View file @
581b7a17
...
@@ -121,7 +121,11 @@ func registerOutputCannon(
...
@@ -121,7 +121,11 @@ func registerOutputCannon(
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
accessor
,
err
:=
outputs
.
NewOutputCannonTraceAccessor
(
ctx
,
logger
,
m
,
cfg
,
l2Client
,
contract
,
dir
,
gameDepth
,
agreed
,
disputed
)
splitDepth
,
err
:=
contract
.
GetSplitDepth
(
ctx
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to load split depth: %w"
,
err
)
}
accessor
,
err
:=
outputs
.
NewOutputCannonTraceAccessor
(
ctx
,
logger
,
m
,
cfg
,
l2Client
,
contract
,
dir
,
gameDepth
,
splitDepth
,
agreed
,
disputed
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
...
op-challenger/game/fault/trace/outputs/output_cannon.go
View file @
581b7a17
...
@@ -25,13 +25,12 @@ func NewOutputCannonTraceAccessor(
...
@@ -25,13 +25,12 @@ func NewOutputCannonTraceAccessor(
contract
cannon
.
L1HeadSource
,
contract
cannon
.
L1HeadSource
,
dir
string
,
dir
string
,
gameDepth
uint64
,
gameDepth
uint64
,
splitDepth
uint64
,
prestateBlock
uint64
,
prestateBlock
uint64
,
poststateBlock
uint64
,
poststateBlock
uint64
,
)
(
*
trace
.
Accessor
,
error
)
{
)
(
*
trace
.
Accessor
,
error
)
{
// TODO(client-pod#43): Load depths from the contract
bottomDepth
:=
gameDepth
-
splitDepth
topDepth
:=
gameDepth
/
2
outputProvider
,
err
:=
NewTraceProvider
(
ctx
,
logger
,
cfg
.
RollupRpc
,
splitDepth
,
prestateBlock
,
poststateBlock
)
bottomDepth
:=
gameDepth
-
topDepth
outputProvider
,
err
:=
NewTraceProvider
(
ctx
,
logger
,
cfg
.
RollupRpc
,
topDepth
,
prestateBlock
,
poststateBlock
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -48,6 +47,6 @@ func NewOutputCannonTraceAccessor(
...
@@ -48,6 +47,6 @@ func NewOutputCannonTraceAccessor(
}
}
cache
:=
NewProviderCache
(
m
,
"output_cannon_provider"
,
cannonCreator
)
cache
:=
NewProviderCache
(
m
,
"output_cannon_provider"
,
cannonCreator
)
selector
:=
split
.
NewSplitProviderSelector
(
outputProvider
,
int
(
top
Depth
),
OutputRootSplitAdapter
(
outputProvider
,
cache
.
GetOrCreate
))
selector
:=
split
.
NewSplitProviderSelector
(
outputProvider
,
int
(
split
Depth
),
OutputRootSplitAdapter
(
outputProvider
,
cache
.
GetOrCreate
))
return
trace
.
NewAccessor
(
selector
),
nil
return
trace
.
NewAccessor
(
selector
),
nil
}
}
op-e2e/e2eutils/disputegame/helper.go
View file @
581b7a17
...
@@ -143,6 +143,7 @@ func (h *FactoryHelper) StartAlphabetGame(ctx context.Context, claimedAlphabet s
...
@@ -143,6 +143,7 @@ func (h *FactoryHelper) StartAlphabetGame(ctx context.Context, claimedAlphabet s
func
(
h
*
FactoryHelper
)
StartOutputCannonGame
(
ctx
context
.
Context
,
rollupEndpoint
string
,
rootClaim
common
.
Hash
)
*
OutputCannonGameHelper
{
func
(
h
*
FactoryHelper
)
StartOutputCannonGame
(
ctx
context
.
Context
,
rollupEndpoint
string
,
rootClaim
common
.
Hash
)
*
OutputCannonGameHelper
{
rollupClient
,
err
:=
dial
.
DialRollupClientWithTimeout
(
ctx
,
30
*
time
.
Second
,
testlog
.
Logger
(
h
.
t
,
log
.
LvlInfo
),
rollupEndpoint
)
rollupClient
,
err
:=
dial
.
DialRollupClientWithTimeout
(
ctx
,
30
*
time
.
Second
,
testlog
.
Logger
(
h
.
t
,
log
.
LvlInfo
),
rollupEndpoint
)
h
.
require
.
NoError
(
err
)
h
.
require
.
NoError
(
err
)
h
.
t
.
Cleanup
(
rollupClient
.
Close
)
extraData
,
_
:=
h
.
createBisectionGameExtraData
(
ctx
,
rollupClient
)
extraData
,
_
:=
h
.
createBisectionGameExtraData
(
ctx
,
rollupClient
)
...
@@ -279,11 +280,22 @@ func (h *FactoryHelper) createCannonGame(ctx context.Context, rootClaim common.H
...
@@ -279,11 +280,22 @@ func (h *FactoryHelper) createCannonGame(ctx context.Context, rootClaim common.H
}
}
func
(
h
*
FactoryHelper
)
createBisectionGameExtraData
(
ctx
context
.
Context
,
client
*
sources
.
RollupClient
)
(
extraData
[]
byte
,
l2BlockNumber
uint64
)
{
func
(
h
*
FactoryHelper
)
createBisectionGameExtraData
(
ctx
context
.
Context
,
client
*
sources
.
RollupClient
)
(
extraData
[]
byte
,
l2BlockNumber
uint64
)
{
timeoutCtx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
1
*
time
.
Minute
)
defer
cancel
()
err
:=
wait
.
For
(
timeoutCtx
,
time
.
Second
,
func
()
(
bool
,
error
)
{
status
,
err
:=
client
.
SyncStatus
(
ctx
)
if
err
!=
nil
{
return
false
,
err
}
return
status
.
SafeL2
.
Number
>
0
,
nil
})
h
.
require
.
NoError
(
err
,
"Safe head did not progress past genesis"
)
syncStatus
,
err
:=
client
.
SyncStatus
(
ctx
)
syncStatus
,
err
:=
client
.
SyncStatus
(
ctx
)
h
.
require
.
NoError
(
err
,
"failed to get sync status"
)
h
.
require
.
NoError
(
err
,
"failed to get sync status"
)
l2BlockNumber
=
syncStatus
.
SafeL2
.
Number
l2BlockNumber
=
syncStatus
.
SafeL2
.
Number
h
.
t
.
Logf
(
"Creating game with l2 block number: %v"
,
l2BlockNumber
)
extraData
=
make
([]
byte
,
32
)
extraData
=
make
([]
byte
,
32
)
binary
.
BigEndian
.
PutUint64
(
extraData
,
l2BlockNumber
)
binary
.
BigEndian
.
PutUint64
(
extraData
[
24
:
]
,
l2BlockNumber
)
return
return
}
}
...
...
op-e2e/e2eutils/disputegame/output_game_helper.go
View file @
581b7a17
...
@@ -402,10 +402,12 @@ func (g *OutputGameHelper) gameData(ctx context.Context) string {
...
@@ -402,10 +402,12 @@ func (g *OutputGameHelper) gameData(ctx context.Context) string {
info
=
info
+
fmt
.
Sprintf
(
"%v - Position: %v, Depth: %v, IndexAtDepth: %v Trace Index: %v, Value: %v, Countered: %v, ParentIndex: %v
\n
"
,
info
=
info
+
fmt
.
Sprintf
(
"%v - Position: %v, Depth: %v, IndexAtDepth: %v Trace Index: %v, Value: %v, Countered: %v, ParentIndex: %v
\n
"
,
i
,
claim
.
Position
.
Int64
(),
pos
.
Depth
(),
pos
.
IndexAtDepth
(),
pos
.
TraceIndex
(
maxDepth
),
common
.
Hash
(
claim
.
Claim
)
.
Hex
(),
claim
.
Countered
,
claim
.
ParentIndex
)
i
,
claim
.
Position
.
Int64
(),
pos
.
Depth
(),
pos
.
IndexAtDepth
(),
pos
.
TraceIndex
(
maxDepth
),
common
.
Hash
(
claim
.
Claim
)
.
Hex
(),
claim
.
Countered
,
claim
.
ParentIndex
)
}
}
l2BlockNum
,
err
:=
g
.
game
.
L2BlockNumber
(
opts
)
g
.
require
.
NoError
(
err
,
"Load l2 block number"
)
status
,
err
:=
g
.
game
.
Status
(
opts
)
status
,
err
:=
g
.
game
.
Status
(
opts
)
g
.
require
.
NoError
(
err
,
"Load game status"
)
g
.
require
.
NoError
(
err
,
"Load game status"
)
return
fmt
.
Sprintf
(
"Game %v - %v - Split Depth: %v - Max Depth: %v:
\n
%v
\n
"
,
return
fmt
.
Sprintf
(
"Game %v - %v -
L2 Block: %v -
Split Depth: %v - Max Depth: %v:
\n
%v
\n
"
,
g
.
addr
,
Status
(
status
),
splitDepth
,
maxDepth
,
info
)
g
.
addr
,
Status
(
status
),
l2BlockNum
.
Uint64
(),
splitDepth
,
maxDepth
,
info
)
}
}
func
(
g
*
OutputGameHelper
)
LogGameData
(
ctx
context
.
Context
)
{
func
(
g
*
OutputGameHelper
)
LogGameData
(
ctx
context
.
Context
)
{
...
...
op-e2e/faultproofs/output_cannon_test.go
View file @
581b7a17
...
@@ -38,12 +38,8 @@ func TestOutputCannonGame(t *testing.T) {
...
@@ -38,12 +38,8 @@ func TestOutputCannonGame(t *testing.T) {
game
.
Attack
(
ctx
,
i
,
common
.
Hash
{
0xaa
})
game
.
Attack
(
ctx
,
i
,
common
.
Hash
{
0xaa
})
game
.
LogGameData
(
ctx
)
game
.
LogGameData
(
ctx
)
}
}
game
.
WaitForCorrectOutputRoot
(
ctx
,
splitDepth
)
// Post the first cannon output root (with 01 status code to show the output root is invalid)
// Wait for the challenger to post the first claim in the cannon trace
game
.
Attack
(
ctx
,
splitDepth
,
common
.
Hash
{
0x01
})
game
.
WaitForClaimAtDepth
(
ctx
,
int
(
splitDepth
+
1
))
// Challenger should counter
game
.
WaitForClaimAtDepth
(
ctx
,
int
(
splitDepth
+
2
))
game
.
LogGameData
(
ctx
)
game
.
LogGameData
(
ctx
)
}
}
packages/contracts-bedrock/deploy-config/devnetL1-template.json
View file @
581b7a17
...
@@ -47,10 +47,11 @@
...
@@ -47,10 +47,11 @@
"l2GenesisDeltaTimeOffset"
:
null
,
"l2GenesisDeltaTimeOffset"
:
null
,
"l2GenesisCanyonTimeOffset"
:
"0x0"
,
"l2GenesisCanyonTimeOffset"
:
"0x0"
,
"faultGameAbsolutePrestate"
:
"0x03c7ae758795765c6664a5d39bf63841c71ff191e9189522bad8ebff5d4eca98"
,
"faultGameAbsolutePrestate"
:
"0x03c7ae758795765c6664a5d39bf63841c71ff191e9189522bad8ebff5d4eca98"
,
"faultGameMaxDepth"
:
30
,
"faultGameMaxDepth"
:
44
,
"faultGameMaxDuration"
:
1200
,
"faultGameMaxDuration"
:
1200
,
"outputBisectionGameGenesisBlock"
:
0
,
"outputBisectionGameGenesisBlock"
:
0
,
"outputBisectionGameSplitDepth"
:
15
,
"outputBisectionGameGenesisOutputRoot"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
"outputBisectionGameSplitDepth"
:
14
,
"systemConfigStartBlock"
:
0
,
"systemConfigStartBlock"
:
0
,
"requiredProtocolVersion"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
"requiredProtocolVersion"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
,
"recommendedProtocolVersion"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
"recommendedProtocolVersion"
:
"0x0000000000000000000000000000000000000000000000000000000000000000"
...
...
packages/contracts-bedrock/scripts/Deploy.s.sol
View file @
581b7a17
...
@@ -1027,7 +1027,7 @@ contract Deploy is Deployer {
...
@@ -1027,7 +1027,7 @@ contract Deploy is Deployer {
_gameType: GameTypes.FAULT,
_gameType: GameTypes.FAULT,
_absolutePrestate: loadMipsAbsolutePrestate(),
_absolutePrestate: loadMipsAbsolutePrestate(),
_faultVm: IBigStepper(mustGetAddress("Mips")),
_faultVm: IBigStepper(mustGetAddress("Mips")),
_maxGameDepth:
cfg.faultGameMaxDepth()
_maxGameDepth:
30 // Hard code depth for legacy game to keep e2e tests fast
});
});
}
}
...
@@ -1106,6 +1106,7 @@ contract Deploy is Deployer {
...
@@ -1106,6 +1106,7 @@ contract Deploy is Deployer {
_gameType: _gameType,
_gameType: _gameType,
_absolutePrestate: _absolutePrestate,
_absolutePrestate: _absolutePrestate,
_genesisBlockNumber: cfg.outputBisectionGameGenesisBlock(),
_genesisBlockNumber: cfg.outputBisectionGameGenesisBlock(),
_genesisOutputRoot: Hash.wrap(cfg.outputBisectionGameGenesisOutputRoot()),
_maxGameDepth: _maxGameDepth,
_maxGameDepth: _maxGameDepth,
_splitDepth: cfg.outputBisectionGameSplitDepth(),
_splitDepth: cfg.outputBisectionGameSplitDepth(),
_gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())),
_gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())),
...
...
packages/contracts-bedrock/scripts/DeployConfig.s.sol
View file @
581b7a17
...
@@ -51,6 +51,7 @@ contract DeployConfig is Script {
...
@@ -51,6 +51,7 @@ contract DeployConfig is Script {
uint256 public faultGameMaxDepth;
uint256 public faultGameMaxDepth;
uint256 public faultGameMaxDuration;
uint256 public faultGameMaxDuration;
uint256 public outputBisectionGameGenesisBlock;
uint256 public outputBisectionGameGenesisBlock;
bytes32 public outputBisectionGameGenesisOutputRoot;
uint256 public outputBisectionGameSplitDepth;
uint256 public outputBisectionGameSplitDepth;
uint256 public systemConfigStartBlock;
uint256 public systemConfigStartBlock;
uint256 public requiredProtocolVersion;
uint256 public requiredProtocolVersion;
...
@@ -107,6 +108,7 @@ contract DeployConfig is Script {
...
@@ -107,6 +108,7 @@ contract DeployConfig is Script {
faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth");
faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth");
faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration");
faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration");
outputBisectionGameGenesisBlock = stdJson.readUint(_json, "$.outputBisectionGameGenesisBlock");
outputBisectionGameGenesisBlock = stdJson.readUint(_json, "$.outputBisectionGameGenesisBlock");
outputBisectionGameGenesisOutputRoot = stdJson.readBytes32(_json, "$.outputBisectionGameGenesisOutputRoot");
outputBisectionGameSplitDepth = stdJson.readUint(_json, "$.outputBisectionGameSplitDepth");
outputBisectionGameSplitDepth = stdJson.readUint(_json, "$.outputBisectionGameSplitDepth");
}
}
}
}
...
...
packages/contracts-bedrock/semver-lock.json
View file @
581b7a17
...
@@ -100,8 +100,8 @@
...
@@ -100,8 +100,8 @@
"sourceCodeHash"
:
"0x1d0cacaf259aff7802aae91a793e3c7234a4d063614cf9c72176fb04738e7c97"
"sourceCodeHash"
:
"0x1d0cacaf259aff7802aae91a793e3c7234a4d063614cf9c72176fb04738e7c97"
},
},
"src/dispute/OutputBisectionGame.sol"
:
{
"src/dispute/OutputBisectionGame.sol"
:
{
"initCodeHash"
:
"0x
c5ac9d76d7c46ccc073f3e5d74a78253bf2f627b04af9b2e3c86803c44890075
"
,
"initCodeHash"
:
"0x
400a99278755979b815712d1d26598463dd98ed193df8cd1736ae2ae5831d7c7
"
,
"sourceCodeHash"
:
"0x
68df25016fa101a9d40e5d00f839dd053e7b5aa0c73c06c61d483cdfda0be124
"
"sourceCodeHash"
:
"0x
7e267ad18eb946a0242df41ba044c5ee6f0b456e74bef07605a7dd2eb5b3ed01
"
},
},
"src/legacy/DeployerWhitelist.sol"
:
{
"src/legacy/DeployerWhitelist.sol"
:
{
"initCodeHash"
:
"0x8de80fb23b26dd9d849f6328e56ea7c173cd9e9ce1f05c9beea559d1720deb3d"
,
"initCodeHash"
:
"0x8de80fb23b26dd9d849f6328e56ea7c173cd9e9ce1f05c9beea559d1720deb3d"
,
...
...
packages/contracts-bedrock/snapshots/abi/OutputBisectionGame.json
View file @
581b7a17
...
@@ -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 @
581b7a17
...
@@ -46,6 +46,9 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -46,6 +46,9 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice The genesis block number
/// @notice The genesis block number
uint256 public immutable GENESIS_BLOCK_NUMBER;
uint256 public immutable GENESIS_BLOCK_NUMBER;
/// @notice The genesis output root
Hash public immutable GENESIS_OUTPUT_ROOT;
/// @notice The game type ID
/// @notice The game type ID
GameType internal immutable GAME_TYPE;
GameType internal immutable GAME_TYPE;
...
@@ -86,6 +89,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -86,6 +89,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @param _gameType The type ID of the game.
/// @param _gameType The type ID of the game.
/// @param _absolutePrestate The absolute prestate of the instruction trace.
/// @param _absolutePrestate The absolute prestate of the instruction trace.
/// @param _genesisBlockNumber The block number of the genesis block.
/// @param _genesisBlockNumber The block number of the genesis block.
/// @param _genesisOutputRoot The output root of the genesis block.
/// @param _maxGameDepth The maximum depth of bisection.
/// @param _maxGameDepth The maximum depth of bisection.
/// @param _splitDepth The final depth of the output bisection portion of the game.
/// @param _splitDepth The final depth of the output bisection portion of the game.
/// @param _gameDuration The duration of the game.
/// @param _gameDuration The duration of the game.
...
@@ -95,16 +99,20 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -95,16 +99,20 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
GameType _gameType,
GameType _gameType,
Claim _absolutePrestate,
Claim _absolutePrestate,
uint256 _genesisBlockNumber,
uint256 _genesisBlockNumber,
Hash _genesisOutputRoot,
uint256 _maxGameDepth,
uint256 _maxGameDepth,
uint256 _splitDepth,
uint256 _splitDepth,
Duration _gameDuration,
Duration _gameDuration,
IBigStepper _vm
IBigStepper _vm
) {
) {
if (_splitDepth >= _maxGameDepth) revert InvalidSplitDepth();
// The split depth cannot be greater than or equal to the max game depth, and it must
// be even due to the constraint laid out in `verifyExecBisectionRoot`
if (_splitDepth >= _maxGameDepth || _splitDepth % 2 != 0) revert InvalidSplitDepth();
GAME_TYPE = _gameType;
GAME_TYPE = _gameType;
ABSOLUTE_PRESTATE = _absolutePrestate;
ABSOLUTE_PRESTATE = _absolutePrestate;
GENESIS_BLOCK_NUMBER = _genesisBlockNumber;
GENESIS_BLOCK_NUMBER = _genesisBlockNumber;
GENESIS_OUTPUT_ROOT = _genesisOutputRoot;
MAX_GAME_DEPTH = _maxGameDepth;
MAX_GAME_DEPTH = _maxGameDepth;
SPLIT_DEPTH = _splitDepth;
SPLIT_DEPTH = _splitDepth;
GAME_DURATION = _gameDuration;
GAME_DURATION = _gameDuration;
...
@@ -157,9 +165,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -157,9 +165,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// indicate the VM Status and is added after the digest is computed.
// indicate the VM Status and is added after the digest is computed.
if (keccak256(_stateData) << 8 != Claim.unwrap(preStateClaim) << 8) revert InvalidPrestate();
if (keccak256(_stateData) << 8 != Claim.unwrap(preStateClaim) << 8) revert InvalidPrestate();
// TODO(clabby): Include less context. See Adrian's proposal for the local context salt.
// Compute the local preimage context for the step.
(ClaimData storage starting, ClaimData storage disputed) = findStartingAndDisputedOutputs(_claimIndex);
Hash uuid = findLocalContext(_claimIndex);
bytes32 uuid = keccak256(abi.encode(starting.claim, starting.parentIndex, disputed.claim, disputed.parentIndex));
// INVARIANT: If a step is an attack, the poststate is valid if the step produces
// INVARIANT: If a step is an attack, the poststate is valid if the step produces
// the same poststate hash as the parent claim's value.
// the same poststate hash as the parent claim's value.
...
@@ -173,7 +180,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -173,7 +180,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// SAFETY: While the `attack` path does not need an extra check for the post
// SAFETY: While the `attack` path does not need an extra check for the post
// state's depth in relation to the parent, we don't need another
// state's depth in relation to the parent, we don't need another
// branch because (n - n) % 2 == 0.
// branch because (n - n) % 2 == 0.
bool validStep = VM.step(_stateData, _proof,
uuid
) == Claim.unwrap(postState.claim);
bool validStep = VM.step(_stateData, _proof,
Hash.unwrap(uuid)
) == Claim.unwrap(postState.claim);
bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0;
bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0;
if (parentPostAgree == validStep) revert ValidStep();
if (parentPostAgree == validStep) revert ValidStep();
...
@@ -211,7 +218,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -211,7 +218,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// When the next position surpasses the split depth (i.e., it is the root claim of an execution
// When the next position surpasses the split depth (i.e., it is the root claim of an execution
// trace bisection sub-game), we need to perform some extra verification steps.
// trace bisection sub-game), we need to perform some extra verification steps.
if (nextPosition.depth() == SPLIT_DEPTH + 1) verifyExecBisectionRoot(_claim
, _challengeIndex
);
if (nextPosition.depth() == SPLIT_DEPTH + 1) verifyExecBisectionRoot(_claim);
// Fetch the grandparent clock, if it exists.
// Fetch the grandparent clock, if it exists.
// The grandparent clock should always exist unless the parent is the root claim.
// The grandparent clock should always exist unless the parent is the root claim.
...
@@ -284,34 +291,34 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -284,34 +291,34 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// INVARIANT: Local data can only be added if the game is currently in progress.
// INVARIANT: Local data can only be added if the game is currently in progress.
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();
// TODO(clabby): Include less context. See Adrian's proposal for the local context salt.
(Claim starting, Position startingPos, Claim disputed, Position disputedPos) =
(ClaimData storage starting, ClaimData storage disputed) =
findStartingAndDisputedOutputs(_execLeafIdx);
findStartingAndDisputedOutputs(_execLeafIdx);
bytes32 uuid = keccak256(abi.encode(starting.claim, starting.parentIndex, disputed.claim, disputed.parentIndex)
);
Hash uuid = computeLocalContext(starting, startingPos, disputed, disputedPos
);
IPreimageOracle oracle = VM.oracle();
IPreimageOracle oracle = VM.oracle();
if (_ident == 1) {
if (_ident == 1) {
// Load the L1 head hash
// Load the L1 head hash
oracle.loadLocalData(_ident,
uuid
, Hash.unwrap(l1Head), 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,
uuid, Claim.unwrap(starting.claim
), 32, _partOffset);
oracle.loadLocalData(_ident,
Hash.unwrap(uuid), Claim.unwrap(starting
), 32, _partOffset);
} else if (_ident == 3) {
} else if (_ident == 3) {
// Load the disputed proposal's output root
// Load the disputed proposal's output root
oracle.loadLocalData(_ident,
uuid, Claim.unwrap(disputed.claim
), 32, _partOffset);
oracle.loadLocalData(_ident,
Hash.unwrap(uuid), Claim.unwrap(disputed
), 32, _partOffset);
} else if (_ident == 4) {
} else if (_ident == 4) {
// Load the starting proposal's L2 block number as a big-endian uint64 in the
// Load the starting proposal's L2 block number as a big-endian uint64 in the
// high order 8 bytes of the word.
// high order 8 bytes of the word.
// TODO(clabby): +1?
oracle.loadLocalData(
// If the starting position is 0 (invalid), the starting output root is genesis. Otherwise,
_ident,
// we add the index at depth + 1 to the genesis block number to get the L2 block number.
uuid,
uint256 l2Number = Position.unwrap(startingPos) == 0
bytes32(GENESIS_BLOCK_NUMBER + uint256(starting.position.indexAtDepth()) << 0xC0),
? GENESIS_BLOCK_NUMBER
8,
: GENESIS_BLOCK_NUMBER + startingPos.indexAtDepth() + 1;
_partOffset
);
oracle.loadLocalData(_ident, Hash.unwrap(uuid), bytes32(l2Number << 0xC0), 8, _partOffset
);
} else if (_ident == 5) {
} else if (_ident == 5) {
// Load the chain ID as a big-endian uint64 in the high order 8 bytes of the word.
// Load the chain ID as a big-endian uint64 in the high order 8 bytes of the word.
oracle.loadLocalData(_ident,
uuid
, bytes32(block.chainid << 0xC0), 8, _partOffset);
oracle.loadLocalData(_ident,
Hash.unwrap(uuid)
, bytes32(block.chainid << 0xC0), 8, _partOffset);
} else {
} else {
revert InvalidLocalIdent();
revert InvalidLocalIdent();
}
}
...
@@ -444,10 +451,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -444,10 +451,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
})
})
);
);
// Persist the L1 head hash of the parent block.
// Persist the blockhash of the parent block.
// TODO(clabby): There may be a bug here - Do we just allow the dispute game to be invalid? We can
// always just create another, but it is possible to create a game where the data was not
// already available on L1.
l1Head = Hash.wrap(blockhash(block.number - 1));
l1Head = Hash.wrap(blockhash(block.number - 1));
}
}
...
@@ -463,17 +467,13 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -463,17 +467,13 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice Verifies the integrity of an execution bisection subgame's root claim. Reverts if the claim
/// @notice Verifies the integrity of an execution bisection subgame's root claim. Reverts if the claim
/// is invalid.
/// is invalid.
/// @param _rootClaim The root claim of the execution bisection subgame.
/// @param _rootClaim The root claim of the execution bisection subgame.
function verifyExecBisectionRoot(Claim _rootClaim
, uint256 /* _parentIndex */
) internal pure {
function verifyExecBisectionRoot(Claim _rootClaim) internal pure {
// The VMStatus must indicate 'invalid' (1), to argue that disputed thing is invalid.
// The VMStatus must indicate 'invalid' (1), to argue that disputed thing is invalid.
// Games that agree with the existing outcome are not allowed.
// Games that agree with the existing outcome are not allowed.
// TODO(clabby): This assumption will change in Alpha Chad, and also depending on the split depth! Be careful
// about what we go with here.
uint8 vmStatus = uint8(Claim.unwrap(_rootClaim)[0]);
uint8 vmStatus = uint8(Claim.unwrap(_rootClaim)[0]);
if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) {
if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) {
revert UnexpectedRootClaim(_rootClaim);
revert UnexpectedRootClaim(_rootClaim);
}
}
// TODO(clabby): Other verification steps (?)
}
}
/// @notice Finds the trace ancestor of a given position within the DAG.
/// @notice Finds the trace ancestor of a given position within the DAG.
...
@@ -495,12 +495,14 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -495,12 +495,14 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice Finds the starting and disputed output root for a given `ClaimData` within the DAG. This
/// @notice Finds the starting and disputed output root for a given `ClaimData` within the DAG. This
/// `ClaimData` must be below the `SPLIT_DEPTH`.
/// `ClaimData` must be below the `SPLIT_DEPTH`.
/// @param _start The index within `claimData` of the claim to start searching from.
/// @param _start The index within `claimData` of the claim to start searching from.
/// @return starting_ The starting, agreed upon output root claim.
/// @return startingClaim_ The starting output root claim.
/// @return disputed_ The disputed output root claim.
/// @return startingPos_ The starting output root position.
/// @return disputedClaim_ The disputed output root claim.
/// @return disputedPos_ The disputed output root position.
function findStartingAndDisputedOutputs(uint256 _start)
function findStartingAndDisputedOutputs(uint256 _start)
internal
internal
view
view
returns (Claim
Data storage starting_, ClaimData storage disputed
_)
returns (Claim
startingClaim_, Position startingPos_, Claim disputedClaim_, Position disputedPos
_)
{
{
// Fatch the starting claim.
// Fatch the starting claim.
uint256 claimIdx = _start;
uint256 claimIdx = _start;
...
@@ -517,7 +519,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -517,7 +519,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// Walk up the DAG until the ancestor's depth is equal to the split depth.
// Walk up the DAG until the ancestor's depth is equal to the split depth.
uint256 currentDepth;
uint256 currentDepth;
ClaimData storage execRootClaim = claim;
ClaimData storage execRootClaim = claim;
while ((currentDepth = claim.position.depth())
!=
SPLIT_DEPTH) {
while ((currentDepth = claim.position.depth())
>
SPLIT_DEPTH) {
uint256 parentIndex = claim.parentIndex;
uint256 parentIndex = claim.parentIndex;
// If we're currently at the split depth + 1, we're at the root of the execution sub-game.
// If we're currently at the split depth + 1, we're at the root of the execution sub-game.
...
@@ -537,15 +539,58 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
...
@@ -537,15 +539,58 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// Determine the starting and disputed output root indices.
// Determine the starting and disputed output root indices.
// 1. If it was an attack, the disputed output root is `claim`, and the starting output root is
// 1. If it was an attack, the disputed output root is `claim`, and the starting output root is
// elsewhere in the
dag
(it must commit to the block # index at depth of `outputPos - 1`).
// elsewhere in the
DAG
(it must commit to the block # index at depth of `outputPos - 1`).
// 2. If it was a defense, the starting output root is `claim`, and the disputed output root is
// 2. If it was a defense, the starting output root is `claim`, and the disputed output root is
// elsewhere in the
dag
(it must commit to the block # index at depth of `outputPos + 1`).
// elsewhere in the
DAG
(it must commit to the block # index at depth of `outputPos + 1`).
if (wasAttack) {
if (wasAttack) {
starting_ = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) - 1), claimIdx);
// If this is an attack on the first output root (the block directly after genesis), the
disputed_ = claimData[claimIdx];
// starting claim nor position exists in the tree. We leave these as 0, which can be easily
// identified due to 0 being an invalid Gindex.
if (outputPos.indexAtDepth() > 0) {
ClaimData storage starting = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) - 1), claimIdx);
(startingClaim_, startingPos_) = (starting.claim, starting.position);
} else {
startingClaim_ = Claim.wrap(Hash.unwrap(GENESIS_OUTPUT_ROOT));
}
(disputedClaim_, disputedPos_) = (claim.claim, claim.position);
} else {
ClaimData storage disputed = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) + 1), claimIdx);
(startingClaim_, startingPos_) = (claim.claim, claim.position);
(disputedClaim_, disputedPos_) = (disputed.claim, disputed.position);
}
}
/// @notice Finds the local context hash for a given claim index that is present in an execution trace subgame.
/// @param _claimIndex The index of the claim to find the local context hash for.
/// @return uuid_ The local context hash.
function findLocalContext(uint256 _claimIndex) internal view returns (Hash uuid_) {
(Claim starting, Position startingPos, Claim disputed, Position disputedPos) =
findStartingAndDisputedOutputs(_claimIndex);
uuid_ = computeLocalContext(starting, startingPos, disputed, disputedPos);
}
/// @notice Computes the local context hash for a set of starting/disputed claim values and positions.
/// @param _starting The starting claim.
/// @param _startingPos The starting claim's position.
/// @param _disputed The disputed claim.
/// @param _disputedPos The disputed claim's position.
/// @return uuid_ The local context hash.
function computeLocalContext(
Claim _starting,
Position _startingPos,
Claim _disputed,
Position _disputedPos
)
internal
pure
returns (Hash uuid_)
{
// A position of 0 indicates that the starting claim is the absolute prestate. In this special case,
// we do not include the starting claim within the local context hash.
if (Position.unwrap(_startingPos) == 0) {
uuid_ = Hash.wrap(keccak256(abi.encode(_disputed, _disputedPos)));
} else {
} else {
starting_ = claimData[claimIdx];
uuid_ = Hash.wrap(keccak256(abi.encode(_starting, _startingPos, _disputed, _disputedPos)));
disputed_ = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) + 1), claimIdx);
}
}
}
}
}
}
packages/contracts-bedrock/src/dispute/interfaces/IOutputBisectionGame.sol
View file @
581b7a17
...
@@ -61,10 +61,7 @@ interface IOutputBisectionGame is IDisputeGame {
...
@@ -61,10 +61,7 @@ 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 L1 block hash that contains the disputed output root, fetched from the
/// @notice A block hash on the L1 that contains the disputed output root.
/// `BlockOracle` and verified by referencing the timestamp associated with the
/// first L2 Output Proposal in the `L2OutputOracle` that contains the disputed
/// L2 block number.
function l1Head() external view returns (Hash l1Head_);
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`.
...
...
packages/contracts-bedrock/test/dispute/OutputBisectionGame.t.sol
View file @
581b7a17
...
@@ -23,9 +23,12 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
...
@@ -23,9 +23,12 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
/// @dev The type of the game being tested.
/// @dev The type of the game being tested.
GameType internal constant GAME_TYPE = GameType.wrap(0);
GameType internal constant GAME_TYPE = GameType.wrap(0);
/// @dev The L2 Block Number for the game's proposed output (the root claim)
/// @dev The L2 Block Number for the game's proposed output (the root claim)
uint256 internal constant L2_BLOCK_NUMBER = 0x
FFFF
;
uint256 internal constant L2_BLOCK_NUMBER = 0x
0a
;
/// @dev The genesis block number configured for the output bisection portion of the game.
uint256 internal constant GENESIS_BLOCK_NUMBER = 0;
uint256 internal constant GENESIS_BLOCK_NUMBER = 0;
/// @dev The genesis output root commitment
Hash internal constant GENESIS_OUTPUT_ROOT = Hash.wrap(bytes32(0));
/// @dev The implementation of the game.
/// @dev The implementation of the game.
OutputBisectionGame internal gameImpl;
OutputBisectionGame internal gameImpl;
...
@@ -44,21 +47,34 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
...
@@ -44,21 +47,34 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
// Set the extra data for the game creation
// Set the extra data for the game creation
extraData = abi.encode(L2_BLOCK_NUMBER);
extraData = abi.encode(L2_BLOCK_NUMBER);
AlphabetVM _vm = new AlphabetVM(absolutePrestate);
// Deploy an implementation of the fault game
// Deploy an implementation of the fault game
gameImpl = new OutputBisectionGame(
gameImpl = new OutputBisectionGame({
GAME_TYPE,
_gameType: GAME_TYPE,
absolutePrestate,
_absolutePrestate: absolutePrestate,
GENESIS_BLOCK_NUMBER,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
4,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
2,
_maxGameDepth: 2**3,
Duration.wrap(7 days),
_splitDepth: 2**2,
new AlphabetVM(absolutePrestate)
_gameDuration: Duration.wrap(7 days),
);
_vm: _vm
});
// Register the game implementation with the factory.
// Register the game implementation with the factory.
factory.setImplementation(GAME_TYPE, gameImpl);
factory.setImplementation(GAME_TYPE, gameImpl);
// Create a new game.
// Create a new game.
gameProxy = OutputBisectionGame(address(factory.create(GAME_TYPE, rootClaim, extraData)));
gameProxy = OutputBisectionGame(address(factory.create(GAME_TYPE, rootClaim, extraData)));
// Check immutables
assertEq(GameType.unwrap(gameProxy.gameType()), GameType.unwrap(GAME_TYPE));
assertEq(Claim.unwrap(gameProxy.ABSOLUTE_PRESTATE()), Claim.unwrap(absolutePrestate));
assertEq(gameProxy.GENESIS_BLOCK_NUMBER(), GENESIS_BLOCK_NUMBER);
assertEq(Hash.unwrap(gameProxy.GENESIS_OUTPUT_ROOT()), Hash.unwrap(GENESIS_OUTPUT_ROOT));
assertEq(gameProxy.MAX_GAME_DEPTH(), 2 ** 3);
assertEq(gameProxy.SPLIT_DEPTH(), 2 ** 2);
assertEq(Duration.unwrap(gameProxy.GAME_DURATION()), 7 days);
assertEq(address(gameProxy.VM()), address(_vm));
// Label the proxy
// Label the proxy
vm.label(address(gameProxy), "OutputBisectionGame_Clone");
vm.label(address(gameProxy), "OutputBisectionGame_Clone");
}
}
...
@@ -79,6 +95,45 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -79,6 +95,45 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// `IDisputeGame` Implementation Tests //
// `IDisputeGame` Implementation Tests //
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
/// @dev Tests that the constructor of the `OutputBisectionGame` reverts when the `_splitDepth`
/// parameter is either:
/// 1. Greater than or equal to the `MAX_GAME_DEPTH`
/// 2. Odd
function test_constructor_wrongArgs_reverts(uint256 _splitDepth) public {
AlphabetVM alphabetVM = new AlphabetVM(ABSOLUTE_PRESTATE);
// Test that the constructor reverts when the `_splitDepth` parameter is greater than or equal
// to the `MAX_GAME_DEPTH` parameter.
_splitDepth = bound(_splitDepth, 2 ** 3, type(uint256).max);
vm.expectRevert(InvalidSplitDepth.selector);
new OutputBisectionGame({
_gameType: GAME_TYPE,
_absolutePrestate: ABSOLUTE_PRESTATE,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_maxGameDepth: 2**3,
_splitDepth: _splitDepth,
_gameDuration: Duration.wrap(7 days),
_vm: alphabetVM
});
// Test that the constructor reverts when the `_splitDepth` parameter is odd.
_splitDepth = bound(_splitDepth, 0, 2 ** 3 - 1);
if (_splitDepth % 2 == 0) _splitDepth += 1;
vm.expectRevert(InvalidSplitDepth.selector);
new OutputBisectionGame({
_gameType: GAME_TYPE,
_absolutePrestate: ABSOLUTE_PRESTATE,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_maxGameDepth: 2**3,
_splitDepth: _splitDepth,
_gameDuration: Duration.wrap(7 days),
_vm: alphabetVM
});
}
/// @dev Tests that the game's root claim is set correctly.
/// @dev Tests that the game's root claim is set correctly.
function test_rootClaim_succeeds() public {
function test_rootClaim_succeeds() public {
assertEq(Claim.unwrap(gameProxy.rootClaim()), Claim.unwrap(ROOT_CLAIM));
assertEq(Claim.unwrap(gameProxy.rootClaim()), Claim.unwrap(ROOT_CLAIM));
...
@@ -142,7 +197,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -142,7 +197,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
uint256 mask = 0xFF << offset;
uint256 mask = 0xFF << offset;
// Replace the byte in the slot value with the challenger wins status.
// Replace the byte in the slot value with the challenger wins status.
slot = (slot & ~mask) | (chalWins << offset);
slot = (slot & ~mask) | (chalWins << offset);
vm.store(address(gameProxy), bytes32(
uint256(0)
), bytes32(slot));
vm.store(address(gameProxy), bytes32(
0
), bytes32(slot));
// Ensure that the game status was properly updated.
// Ensure that the game status was properly updated.
GameStatus status = gameProxy.status();
GameStatus status = gameProxy.status();
...
@@ -156,19 +211,19 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -156,19 +211,19 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that an attempt to defend the root claim reverts with the `CannotDefendRootClaim` error.
/// @dev Tests that an attempt to defend the root claim reverts with the `CannotDefendRootClaim` error.
function test_move_defendRoot_reverts() public {
function test_move_defendRoot_reverts() public {
vm.expectRevert(CannotDefendRootClaim.selector);
vm.expectRevert(CannotDefendRootClaim.selector);
gameProxy.defend(0,
Claim.wrap(bytes32(uint256(5))
));
gameProxy.defend(0,
_dummyClaim(
));
}
}
/// @dev Tests that an attempt to move against a claim that does not exist reverts with the
/// @dev Tests that an attempt to move against a claim that does not exist reverts with the
/// `ParentDoesNotExist` error.
/// `ParentDoesNotExist` error.
function test_move_nonExistentParent_reverts() public {
function test_move_nonExistentParent_reverts() public {
Claim claim =
Claim.wrap(bytes32(uint256(5))
);
Claim claim =
_dummyClaim(
);
// Expect an out of bounds revert for an attack
// Expect an out of bounds revert for an attack
vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32));
vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32));
gameProxy.attack(1, claim);
gameProxy.attack(1, claim);
// Expect an out of bounds revert for a
n attack
// Expect an out of bounds revert for a
defense
vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32));
vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32));
gameProxy.defend(1, claim);
gameProxy.defend(1, claim);
}
}
...
@@ -176,7 +231,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -176,7 +231,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that an attempt to move at the maximum game depth reverts with the
/// @dev Tests that an attempt to move at the maximum game depth reverts with the
/// `GameDepthExceeded` error.
/// `GameDepthExceeded` error.
function test_move_gameDepthExceeded_reverts() public {
function test_move_gameDepthExceeded_reverts() public {
Claim claim =
Claim.wrap(bytes32(uint256(5))
);
Claim claim =
_changeClaimStatus(_dummyClaim(), VMStatuses.PANIC
);
uint256 maxDepth = gameProxy.MAX_GAME_DEPTH();
uint256 maxDepth = gameProxy.MAX_GAME_DEPTH();
...
@@ -185,8 +240,6 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -185,8 +240,6 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// the `GameDepthExceeded` error.
// the `GameDepthExceeded` error.
if (i == maxDepth) {
if (i == maxDepth) {
vm.expectRevert(GameDepthExceeded.selector);
vm.expectRevert(GameDepthExceeded.selector);
} else if (i == 2) {
claim = changeClaimStatus(claim, VMStatuses.PANIC);
}
}
gameProxy.attack(i, claim);
gameProxy.attack(i, claim);
}
}
...
@@ -198,7 +251,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -198,7 +251,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Warp ahead past the clock time for the first move (3 1/2 days)
// Warp ahead past the clock time for the first move (3 1/2 days)
vm.warp(block.timestamp + 3 days + 12 hours + 1);
vm.warp(block.timestamp + 3 days + 12 hours + 1);
vm.expectRevert(ClockTimeExceeded.selector);
vm.expectRevert(ClockTimeExceeded.selector);
gameProxy.attack(0,
Claim.wrap(bytes32(uint256(5))
));
gameProxy.attack(0,
_dummyClaim(
));
}
}
/// @notice Static unit test for the correctness of the chess clock incrementation.
/// @notice Static unit test for the correctness of the chess clock incrementation.
...
@@ -208,7 +261,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -208,7 +261,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
Clock.unwrap(clock), Clock.unwrap(LibClock.wrap(Duration.wrap(0), Timestamp.wrap(uint64(block.timestamp))))
Clock.unwrap(clock), Clock.unwrap(LibClock.wrap(Duration.wrap(0), Timestamp.wrap(uint64(block.timestamp))))
);
);
Claim claim =
Claim.wrap(bytes32(uint256(5))
);
Claim claim =
_dummyClaim(
);
vm.warp(block.timestamp + 15);
vm.warp(block.timestamp + 15);
gameProxy.attack(0, claim);
gameProxy.attack(0, claim);
...
@@ -226,7 +279,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -226,7 +279,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// We are at the split depth, so we need to set the status byte of the claim
// We are at the split depth, so we need to set the status byte of the claim
// for the next move.
// for the next move.
claim = changeClaimStatus(claim, VMStatuses.PANIC);
claim =
_
changeClaimStatus(claim, VMStatuses.PANIC);
vm.warp(block.timestamp + 10);
vm.warp(block.timestamp + 10);
gameProxy.attack(2, claim);
gameProxy.attack(2, claim);
...
@@ -246,7 +299,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -246,7 +299,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that an identical claim cannot be made twice. The duplicate claim attempt should
/// @dev Tests that an identical claim cannot be made twice. The duplicate claim attempt should
/// revert with the `ClaimAlreadyExists` error.
/// revert with the `ClaimAlreadyExists` error.
function test_move_duplicateClaim_reverts() public {
function test_move_duplicateClaim_reverts() public {
Claim claim =
Claim.wrap(bytes32(uint256(5))
);
Claim claim =
_dummyClaim(
);
// Make the first move. This should succeed.
// Make the first move. This should succeed.
gameProxy.attack(0, claim);
gameProxy.attack(0, claim);
...
@@ -258,14 +311,16 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -258,14 +311,16 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test asserting that identical claims at the same position can be made in different subgames.
/// @dev Static unit test asserting that identical claims at the same position can be made in different subgames.
function test_move_duplicateClaimsDifferentSubgames_succeeds() public {
function test_move_duplicateClaimsDifferentSubgames_succeeds() public {
Claim claimA =
Claim.wrap(bytes32(uint256(5))
);
Claim claimA =
_dummyClaim(
);
Claim claimB =
Claim.wrap(bytes32(uint256(6))
);
Claim claimB =
_dummyClaim(
);
// Make the first move. This should succeed.
// Make the first move
s
. This should succeed.
gameProxy.attack(0, claimA);
gameProxy.attack(0, claimA);
gameProxy.attack(0, claimB);
gameProxy.attack(0, claimB);
gameProxy.attack(1, claimB);
// Perform an attack at the same position with the same claim value in both subgames.
// These both should succeed.
gameProxy.attack(1, claimA);
gameProxy.attack(2, claimA);
gameProxy.attack(2, claimA);
}
}
...
@@ -274,7 +329,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -274,7 +329,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Warp ahead 5 seconds.
// Warp ahead 5 seconds.
vm.warp(block.timestamp + 5);
vm.warp(block.timestamp + 5);
Claim counter =
Claim.wrap(bytes32(uint256(5))
);
Claim counter =
_dummyClaim(
);
// Perform the attack.
// Perform the attack.
vm.expectEmit(true, true, true, false);
vm.expectEmit(true, true, true, false);
...
@@ -307,6 +362,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -307,6 +362,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
);
);
}
}
/// @dev Tests that making a claim at the execution trace bisection root level with an invalid status
/// byte reverts with the `UnexpectedRootClaim` error.
function test_move_incorrectStatusExecRoot_reverts() public {
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, _dummyClaim());
}
vm.expectRevert(abi.encodeWithSelector(UnexpectedRootClaim.selector, bytes32(0)));
gameProxy.attack(4, Claim.wrap(bytes32(0)));
}
/// @dev Tests that making a claim at the execution trace bisection root level with a valid status
/// byte succeeds.
function test_move_correctStatusExecRoot_succeeds() public {
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, _dummyClaim());
}
gameProxy.attack(4, _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC));
}
/// @dev Static unit test for the correctness an uncontested root resolution.
/// @dev Static unit test for the correctness an uncontested root resolution.
function test_resolve_rootUncontested_succeeds() public {
function test_resolve_rootUncontested_succeeds() public {
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...
@@ -348,7 +423,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -348,7 +423,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a single attack game state.
/// @dev Static unit test for the correctness of resolving a single attack game state.
function test_resolve_rootContested_succeeds() public {
function test_resolve_rootContested_succeeds() public {
gameProxy.attack(0,
Claim.wrap(bytes32(uint256(5))
));
gameProxy.attack(0,
_dummyClaim(
));
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...
@@ -358,8 +433,8 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -358,8 +433,8 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a game with a contested challenge claim.
/// @dev Static unit test for the correctness of resolving a game with a contested challenge claim.
function test_resolve_challengeContested_succeeds() public {
function test_resolve_challengeContested_succeeds() public {
gameProxy.attack(0,
Claim.wrap(bytes32(uint256(5))
));
gameProxy.attack(0,
_dummyClaim(
));
gameProxy.defend(1,
Claim.wrap(bytes32(uint256(6))
));
gameProxy.defend(1,
_dummyClaim(
));
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...
@@ -370,10 +445,10 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -370,10 +445,10 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a game with multiplayer moves.
/// @dev Static unit test for the correctness of resolving a game with multiplayer moves.
function test_resolve_teamDeathmatch_succeeds() public {
function test_resolve_teamDeathmatch_succeeds() public {
gameProxy.attack(0,
Claim.wrap(bytes32(uint256(5))
));
gameProxy.attack(0,
_dummyClaim(
));
gameProxy.attack(0,
Claim.wrap(bytes32(uint256(4))
));
gameProxy.attack(0,
_dummyClaim(
));
gameProxy.defend(1,
Claim.wrap(bytes32(uint256(6))
));
gameProxy.defend(1,
_dummyClaim(
));
gameProxy.defend(1,
Claim.wrap(bytes32(uint256(7))
));
gameProxy.defend(1,
_dummyClaim(
));
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...
@@ -384,29 +459,30 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -384,29 +459,30 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a game that reaches max game depth.
/// @dev Static unit test for the correctness of resolving a game that reaches max game depth.
function test_resolve_stepReached_succeeds() public {
function test_resolve_stepReached_succeeds() public {
Claim dummyClaim = Claim.wrap(bytes32(uint256(5)));
Claim claim = _dummyClaim();
gameProxy.attack(0, dummyClaim);
for (uint256 i; i < gameProxy.SPLIT_DEPTH(); i++) {
gameProxy.attack(1, dummyClaim);
gameProxy.attack(i, claim);
}
dummyClaim = changeClaimStatus(dummyClaim, VMStatuses.PANIC);
gameProxy.attack(2, dummyClaim);
claim = _changeClaimStatus(claim, VMStatuses.PANIC);
gameProxy.attack(3, dummyClaim);
for (uint256 i = gameProxy.claimDataLen() - 1; i < gameProxy.MAX_GAME_DEPTH(); i++) {
gameProxy.attack(i, claim);
}
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// resolving claim at 4 isn't necessary
// resolving claim at 8 isn't necessary
gameProxy.resolveClaim(3);
for (uint256 i = 8; i > 0; i--) {
gameProxy.resolveClaim(2);
gameProxy.resolveClaim(i - 1);
gameProxy.resolveClaim(1);
}
gameProxy.resolveClaim(0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
}
}
/// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame multiple times
/// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame multiple times
function test_resolve_claimAlreadyResolved_reverts() public {
function test_resolve_claimAlreadyResolved_reverts() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
Claim claim = _dummyClaim();
gameProxy.attack(1, Claim.wrap(bytes32(uint256(5))));
gameProxy.attack(0, claim);
gameProxy.attack(1, claim);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...
@@ -417,25 +493,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -417,25 +493,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame at max depth
/// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame at max depth
function test_resolve_claimAtMaxDepthAlreadyResolved_reverts() public {
function test_resolve_claimAtMaxDepthAlreadyResolved_reverts() public {
Claim dummyClaim = Claim.wrap(bytes32(uint256(5)));
Claim claim = _dummyClaim();
gameProxy.attack(0, dummyClaim);
for (uint256 i; i < gameProxy.SPLIT_DEPTH(); i++) {
gameProxy.attack(1, dummyClaim);
gameProxy.attack(i, claim);
}
dummyClaim = changeClaimStatus(dummyClaim, VMStatuses.PANIC);
gameProxy.attack(2, dummyClaim);
claim = _changeClaimStatus(claim, VMStatuses.PANIC);
gameProxy.attack(3, dummyClaim);
for (uint256 i = gameProxy.claimDataLen() - 1; i < gameProxy.MAX_GAME_DEPTH(); i++) {
gameProxy.attack(i, claim);
}
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.expectRevert(ClaimAlreadyResolved.selector);
vm.expectRevert(ClaimAlreadyResolved.selector);
gameProxy.resolveClaim(
4
);
gameProxy.resolveClaim(
8
);
}
}
/// @dev Static unit test asserting that resolve reverts when attempting to resolve subgames out of order
/// @dev Static unit test asserting that resolve reverts when attempting to resolve subgames out of order
function test_resolve_outOfOrderResolution_reverts() public {
function test_resolve_outOfOrderResolution_reverts() public {
gameProxy.attack(0,
Claim.wrap(bytes32(uint256(5))
));
gameProxy.attack(0,
_dummyClaim(
));
gameProxy.attack(1,
Claim.wrap(bytes32(uint256(5))
));
gameProxy.attack(1,
_dummyClaim(
));
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...
@@ -446,15 +523,108 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -446,15 +523,108 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that adding local data with an out of bounds identifier reverts.
/// @dev Tests that adding local data with an out of bounds identifier reverts.
function testFuzz_addLocalData_oob_reverts(uint256 _ident) public {
function testFuzz_addLocalData_oob_reverts(uint256 _ident) public {
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5))));
for (uint256 i; i < 4; i++) {
gameProxy.attack(1, Claim.wrap(bytes32(uint256(5))));
gameProxy.attack(i, _dummyClaim());
gameProxy.attack(2, ROOT_CLAIM);
}
gameProxy.attack(4, _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC));
// [1, 5] are valid local data identifiers.
// [1, 5] are valid local data identifiers.
if (_ident <= 5) _ident = 0;
if (_ident <= 5) _ident = 0;
vm.expectRevert(InvalidLocalIdent.selector);
vm.expectRevert(InvalidLocalIdent.selector);
gameProxy.addLocalData(_ident, 3, 0);
gameProxy.addLocalData(_ident, 5, 0);
}
/// @dev Tests that local data is loaded into the preimage oracle correctly in the subgame
/// that is disputing the transition from `GENESIS -> GENESIS + 1`
function test_addLocalDataGenesisTransition_static_succeeds() public {
IPreimageOracle oracle = IPreimageOracle(address(gameProxy.VM().oracle()));
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, Claim.wrap(bytes32(i)));
}
gameProxy.attack(4, _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC));
// Expected start/disputed claims
bytes32 startingClaim = Hash.unwrap(GENESIS_OUTPUT_ROOT);
bytes32 disputedClaim = bytes32(uint256(3));
Position disputedPos = LibPosition.wrap(4, 0);
// Expected local data
bytes32[5] memory data =
[Hash.unwrap(gameProxy.l1Head()), startingClaim, disputedClaim, bytes32(0), bytes32(block.chainid << 0xC0)];
for (uint256 i = 1; i <= 5; i++) {
uint256 expectedLen = i > 3 ? 8 : 32;
bytes32 key = _getKey(i, keccak256(abi.encode(disputedClaim, disputedPos)));
gameProxy.addLocalData(i, 5, 0);
(bytes32 dat, uint256 datLen) = oracle.readPreimage(key, 0);
assertEq(dat >> 0xC0, bytes32(expectedLen));
// Account for the length prefix if i > 3 (the data stored
// at identifiers i <= 3 are 32 bytes long, so the expected
// length is already correct. If i > 3, the data is only 8
// bytes long, so the length prefix + the data is 16 bytes
// total.)
assertEq(datLen, expectedLen + (i > 3 ? 8 : 0));
gameProxy.addLocalData(i, 5, 8);
(dat, datLen) = oracle.readPreimage(key, 8);
assertEq(dat, data[i - 1]);
assertEq(datLen, expectedLen);
}
}
/// @dev Tests that local data is loaded into the preimage oracle correctly.
function test_addLocalDataMiddle_static_succeeds() public {
IPreimageOracle oracle = IPreimageOracle(address(gameProxy.VM().oracle()));
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, Claim.wrap(bytes32(i)));
}
gameProxy.defend(4, ROOT_CLAIM);
// Expected start/disputed claims
bytes32 startingClaim = bytes32(uint256(3));
Position startingPos = LibPosition.wrap(4, 0);
bytes32 disputedClaim = bytes32(uint256(2));
Position disputedPos = LibPosition.wrap(3, 0);
// Expected local data
bytes32[5] memory data = [
Hash.unwrap(gameProxy.l1Head()),
startingClaim,
disputedClaim,
bytes32(uint256(1) << 0xC0),
bytes32(block.chainid << 0xC0)
];
for (uint256 i = 1; i <= 5; i++) {
uint256 expectedLen = i > 3 ? 8 : 32;
bytes32 key = _getKey(i, keccak256(abi.encode(startingClaim, startingPos, disputedClaim, disputedPos)));
gameProxy.addLocalData(i, 5, 0);
(bytes32 dat, uint256 datLen) = oracle.readPreimage(key, 0);
assertEq(dat >> 0xC0, bytes32(expectedLen));
// Account for the length prefix if i > 3 (the data stored
// at identifiers i <= 3 are 32 bytes long, so the expected
// length is already correct. If i > 3, the data is only 8
// bytes long, so the length prefix + the data is 16 bytes
// total.)
assertEq(datLen, expectedLen + (i > 3 ? 8 : 0));
gameProxy.addLocalData(i, 5, 8);
(dat, datLen) = oracle.readPreimage(key, 8);
assertEq(dat, data[i - 1]);
assertEq(datLen, expectedLen);
}
}
/// @dev Helper to return a pseudo-random claim
function _dummyClaim() internal view returns (Claim) {
return Claim.wrap(keccak256(abi.encode(gasleft())));
}
}
/// @dev Helper to get the localized key for an identifier in the context of the game proxy.
/// @dev Helper to get the localized key for an identifier in the context of the game proxy.
...
@@ -464,7 +634,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
...
@@ -464,7 +634,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
}
}
/// @dev Helper to change the VM status byte of a claim.
/// @dev Helper to change the VM status byte of a claim.
function changeClaimStatus(Claim _claim, VMStatus _status) public pure returns (Claim out_) {
function
_
changeClaimStatus(Claim _claim, VMStatus _status) public pure returns (Claim out_) {
assembly {
assembly {
out_ := or(and(not(shl(248, 0xFF)), _claim), shl(248, _status))
out_ := or(and(not(shl(248, 0xFF)), _claim), shl(248, _status))
}
}
...
...
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