Commit 5fb16e2f authored by Adrian Sutton's avatar Adrian Sutton Committed by GitHub

Merge pull request #8536 from ethereum-optimism/cl/ctb/ob-actor-tests

feat(ctb): `OutputBisection` actor tests
parents 5b9bff7b 8e658809
......@@ -30,8 +30,8 @@ var (
// AlphabetVM2MetaData contains all meta data concerning the AlphabetVM2 contract.
var AlphabetVM2MetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contractIPreimageOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_localContext\",\"type\":\"bytes32\"}],\"name\":\"step\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"postState_\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Bin: "0x60a060405234801561001057600080fd5b50604051610b55380380610b5583398101604081905261002f91610090565b608081905260405161004090610083565b604051809103906000f08015801561005c573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392909216919091179055506100a9565b61065c806104f983390190565b6000602082840312156100a257600080fd5b5051919050565b6080516104366100c3600039600060af01526104366000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637dc0d1d01461003b578063e14ced3214610085575b600080fd5b60005461005b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100986100933660046102d2565b6100a6565b60405190815260200161007c565b600080600060087f0000000000000000000000000000000000000000000000000000000000000000901b600889896040516100e2929190610346565b6040518091039020901b036101c7576000915061010187890189610356565b600080546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600480820152602481018890526044810183905260206064820152608481019290925291925073ffffffffffffffffffffffffffffffffffffffff909116906352f0f3ad9060a4016020604051808303816000875af1158015610192573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b6919061036f565b6101c090826103b7565b90506101e6565b6101d3878901896103cf565b9092509050816101e2816103f1565b9250505b816101f28260016103b7565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001798975050505050505050565b60008083601f84011261029b57600080fd5b50813567ffffffffffffffff8111156102b357600080fd5b6020830191508360208285010111156102cb57600080fd5b9250929050565b6000806000806000606086880312156102ea57600080fd5b853567ffffffffffffffff8082111561030257600080fd5b61030e89838a01610289565b9097509550602088013591508082111561032757600080fd5b5061033488828901610289565b96999598509660400135949350505050565b8183823760009101908152919050565b60006020828403121561036857600080fd5b5035919050565b60006020828403121561038157600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156103ca576103ca610388565b500190565b600080604083850312156103e257600080fd5b50508035926020909101359150565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361042257610422610388565b506001019056fea164736f6c634300080f000a608060405234801561001057600080fd5b5061063c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063e03110e111610050578063e03110e114610106578063e15926111461012e578063fef2b4ed1461014357600080fd5b806352f0f3ad1461007757806361238bde1461009d5780638542cf50146100c8575b600080fd5b61008a6100853660046104df565b610163565b6040519081526020015b60405180910390f35b61008a6100ab36600461051a565b600160209081526000928352604080842090915290825290205481565b6100f66100d636600461051a565b600260209081526000928352604080842090915290825290205460ff1681565b6040519015158152602001610094565b61011961011436600461051a565b610238565b60408051928352602083019190915201610094565b61014161013c36600461053c565b610329565b005b61008a6101513660046105b8565b60006020819052908152604090205481565b600061016f8686610432565b905061017c836008610600565b8211806101895750602083115b156101c0576040517ffe25498700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602081815260c085901b82526008959095528251828252600286526040808320858452875280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558484528752808320948352938652838220558181529384905292205592915050565b6000828152600260209081526040808320848452909152812054819060ff166102c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f7072652d696d616765206d757374206578697374000000000000000000000000604482015260640160405180910390fd5b50600083815260208181526040909120546102dd816008610600565b6102e8856020610600565b1061030657836102f9826008610600565b6103039190610618565b91505b506000938452600160209081526040808620948652939052919092205492909150565b604435600080600883018611156103485763fe2549876000526004601cfd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8316176104d8818360408051600093845233602052918152606090922091527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b9392505050565b600080600080600060a086880312156104f757600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561052d57600080fd5b50508035926020909101359150565b60008060006040848603121561055157600080fd5b83359250602084013567ffffffffffffffff8082111561057057600080fd5b818601915086601f83011261058457600080fd5b81358181111561059357600080fd5b8760208285010111156105a557600080fd5b6020830194508093505050509250925092565b6000602082840312156105ca57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610613576106136105d1565b500190565b60008282101561062a5761062a6105d1565b50039056fea164736f6c634300080f000a",
ABI: "[{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contractIPreimageOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"_localContext\",\"type\":\"bytes32\"}],\"name\":\"step\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"postState_\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x60a060405234801561001057600080fd5b50604051610c23380380610c2383398101604081905261002f91610090565b608081905260405161004090610083565b604051809103906000f08015801561005c573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b0392909216919091179055506100a9565b61065c806105c783390190565b6000602082840312156100a257600080fd5b5051919050565b6080516105046100c3600039600060af01526105046000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637dc0d1d01461003b578063e14ced3214610085575b600080fd5b60005461005b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610098610093366004610395565b6100a6565b60405190815260200161007c565b600080600060087f0000000000000000000000000000000000000000000000000000000000000000901b600889896040516100e2929190610409565b6040518091039020901b036101d9576000805473ffffffffffffffffffffffffffffffffffffffff1663e03110e161011b60048861029f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526004810191909152600060248201526044016040805180830381865afa158015610175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101999190610419565b50640ffffffff0607c82901c169350905063ffffffff608082901c1660006101c38a8c018c61043d565b90506101cf8582610485565b9350505050610206565b6101e58789018961049d565b9092509050816101f4816104bf565b9250508080610202906104bf565b9150505b6040805160208101849052908101829052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001798975050505050505050565b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831617610345818360408051600093845233602052918152606090922091527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b9392505050565b60008083601f84011261035e57600080fd5b50813567ffffffffffffffff81111561037657600080fd5b60208301915083602082850101111561038e57600080fd5b9250929050565b6000806000806000606086880312156103ad57600080fd5b853567ffffffffffffffff808211156103c557600080fd5b6103d189838a0161034c565b909750955060208801359150808211156103ea57600080fd5b506103f78882890161034c565b96999598509660400135949350505050565b8183823760009101908152919050565b6000806040838503121561042c57600080fd5b505080516020909101519092909150565b60006020828403121561044f57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561049857610498610456565b500190565b600080604083850312156104b057600080fd5b50508035926020909101359150565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036104f0576104f0610456565b506001019056fea164736f6c634300080f000a608060405234801561001057600080fd5b5061063c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063e03110e111610050578063e03110e114610106578063e15926111461012e578063fef2b4ed1461014357600080fd5b806352f0f3ad1461007757806361238bde1461009d5780638542cf50146100c8575b600080fd5b61008a6100853660046104df565b610163565b6040519081526020015b60405180910390f35b61008a6100ab36600461051a565b600160209081526000928352604080842090915290825290205481565b6100f66100d636600461051a565b600260209081526000928352604080842090915290825290205460ff1681565b6040519015158152602001610094565b61011961011436600461051a565b610238565b60408051928352602083019190915201610094565b61014161013c36600461053c565b610329565b005b61008a6101513660046105b8565b60006020819052908152604090205481565b600061016f8686610432565b905061017c836008610600565b8211806101895750602083115b156101c0576040517ffe25498700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602081815260c085901b82526008959095528251828252600286526040808320858452875280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558484528752808320948352938652838220558181529384905292205592915050565b6000828152600260209081526040808320848452909152812054819060ff166102c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f7072652d696d616765206d757374206578697374000000000000000000000000604482015260640160405180910390fd5b50600083815260208181526040909120546102dd816008610600565b6102e8856020610600565b1061030657836102f9826008610600565b6103039190610618565b91505b506000938452600160209081526040808620948652939052919092205492909150565b604435600080600883018611156103485763fe2549876000526004601cfd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8316176104d8818360408051600093845233602052918152606090922091527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b9392505050565b600080600080600060a086880312156104f757600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b6000806040838503121561052d57600080fd5b50508035926020909101359150565b60008060006040848603121561055157600080fd5b83359250602084013567ffffffffffffffff8082111561057057600080fd5b818601915086601f83011261058457600080fd5b81358181111561059357600080fd5b8760208285010111156105a557600080fd5b6020830194508093505050509250925092565b6000602082840312156105ca57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610613576106136105d1565b500190565b60008282101561062a5761062a6105d1565b50039056fea164736f6c634300080f000a",
}
// AlphabetVM2ABI is the input ABI used to generate the binding from.
......@@ -232,23 +232,33 @@ func (_AlphabetVM2 *AlphabetVM2CallerSession) Oracle() (common.Address, error) {
return _AlphabetVM2.Contract.Oracle(&_AlphabetVM2.CallOpts)
}
// Step is a paid mutator transaction binding the contract method 0xe14ced32.
// Step is a free data retrieval call binding the contract method 0xe14ced32.
//
// Solidity: function step(bytes _stateData, bytes , bytes32 _localContext) returns(bytes32 postState_)
func (_AlphabetVM2 *AlphabetVM2Transactor) Step(opts *bind.TransactOpts, _stateData []byte, arg1 []byte, _localContext [32]byte) (*types.Transaction, error) {
return _AlphabetVM2.contract.Transact(opts, "step", _stateData, arg1, _localContext)
// Solidity: function step(bytes _stateData, bytes , bytes32 _localContext) view returns(bytes32 postState_)
func (_AlphabetVM2 *AlphabetVM2Caller) Step(opts *bind.CallOpts, _stateData []byte, arg1 []byte, _localContext [32]byte) ([32]byte, error) {
var out []interface{}
err := _AlphabetVM2.contract.Call(opts, &out, "step", _stateData, arg1, _localContext)
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// Step is a paid mutator transaction binding the contract method 0xe14ced32.
// Step is a free data retrieval call binding the contract method 0xe14ced32.
//
// Solidity: function step(bytes _stateData, bytes , bytes32 _localContext) returns(bytes32 postState_)
func (_AlphabetVM2 *AlphabetVM2Session) Step(_stateData []byte, arg1 []byte, _localContext [32]byte) (*types.Transaction, error) {
return _AlphabetVM2.Contract.Step(&_AlphabetVM2.TransactOpts, _stateData, arg1, _localContext)
// Solidity: function step(bytes _stateData, bytes , bytes32 _localContext) view returns(bytes32 postState_)
func (_AlphabetVM2 *AlphabetVM2Session) Step(_stateData []byte, arg1 []byte, _localContext [32]byte) ([32]byte, error) {
return _AlphabetVM2.Contract.Step(&_AlphabetVM2.CallOpts, _stateData, arg1, _localContext)
}
// Step is a paid mutator transaction binding the contract method 0xe14ced32.
// Step is a free data retrieval call binding the contract method 0xe14ced32.
//
// Solidity: function step(bytes _stateData, bytes , bytes32 _localContext) returns(bytes32 postState_)
func (_AlphabetVM2 *AlphabetVM2TransactorSession) Step(_stateData []byte, arg1 []byte, _localContext [32]byte) (*types.Transaction, error) {
return _AlphabetVM2.Contract.Step(&_AlphabetVM2.TransactOpts, _stateData, arg1, _localContext)
// Solidity: function step(bytes _stateData, bytes , bytes32 _localContext) view returns(bytes32 postState_)
func (_AlphabetVM2 *AlphabetVM2CallerSession) Step(_stateData []byte, arg1 []byte, _localContext [32]byte) ([32]byte, error) {
return _AlphabetVM2.Contract.Step(&_AlphabetVM2.CallOpts, _stateData, arg1, _localContext)
}
......@@ -13,7 +13,7 @@ const AlphabetVM2StorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\"
var AlphabetVM2StorageLayout = new(solc.StorageLayout)
var AlphabetVM2DeployedBin = "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80637dc0d1d01461003b578063e14ced3214610085575b600080fd5b60005461005b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100986100933660046102d2565b6100a6565b60405190815260200161007c565b600080600060087f0000000000000000000000000000000000000000000000000000000000000000901b600889896040516100e2929190610346565b6040518091039020901b036101c7576000915061010187890189610356565b600080546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600480820152602481018890526044810183905260206064820152608481019290925291925073ffffffffffffffffffffffffffffffffffffffff909116906352f0f3ad9060a4016020604051808303816000875af1158015610192573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101b6919061036f565b6101c090826103b7565b90506101e6565b6101d3878901896103cf565b9092509050816101e2816103f1565b9250505b816101f28260016103b7565b604080516020810193909352820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001798975050505050505050565b60008083601f84011261029b57600080fd5b50813567ffffffffffffffff8111156102b357600080fd5b6020830191508360208285010111156102cb57600080fd5b9250929050565b6000806000806000606086880312156102ea57600080fd5b853567ffffffffffffffff8082111561030257600080fd5b61030e89838a01610289565b9097509550602088013591508082111561032757600080fd5b5061033488828901610289565b96999598509660400135949350505050565b8183823760009101908152919050565b60006020828403121561036857600080fd5b5035919050565b60006020828403121561038157600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156103ca576103ca610388565b500190565b600080604083850312156103e257600080fd5b50508035926020909101359150565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361042257610422610388565b506001019056fea164736f6c634300080f000a"
var AlphabetVM2DeployedBin = "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80637dc0d1d01461003b578063e14ced3214610085575b600080fd5b60005461005b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610098610093366004610395565b6100a6565b60405190815260200161007c565b600080600060087f0000000000000000000000000000000000000000000000000000000000000000901b600889896040516100e2929190610409565b6040518091039020901b036101d9576000805473ffffffffffffffffffffffffffffffffffffffff1663e03110e161011b60048861029f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526004810191909152600060248201526044016040805180830381865afa158015610175573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101999190610419565b50640ffffffff0607c82901c169350905063ffffffff608082901c1660006101c38a8c018c61043d565b90506101cf8582610485565b9350505050610206565b6101e58789018961049d565b9092509050816101f4816104bf565b9250508080610202906104bf565b9150505b6040805160208101849052908101829052606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291905280516020909101207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001798975050505050505050565b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831617610345818360408051600093845233602052918152606090922091527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b9392505050565b60008083601f84011261035e57600080fd5b50813567ffffffffffffffff81111561037657600080fd5b60208301915083602082850101111561038e57600080fd5b9250929050565b6000806000806000606086880312156103ad57600080fd5b853567ffffffffffffffff808211156103c557600080fd5b6103d189838a0161034c565b909750955060208801359150808211156103ea57600080fd5b506103f78882890161034c565b96999598509660400135949350505050565b8183823760009101908152919050565b6000806040838503121561042c57600080fd5b505080516020909101519092909150565b60006020828403121561044f57600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561049857610498610456565b500190565b600080604083850312156104b057600080fd5b50508035926020909101359150565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036104f0576104f0610456565b506001019056fea164736f6c634300080f000a"
func init() {
......
......@@ -31,7 +31,7 @@ var (
// OutputBisectionGameMetaData contains all meta data concerning the OutputBisectionGame contract.
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\":\"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: "0x6101806040523480156200001257600080fd5b50604051620033d5380380620033d58339810160408190526200003591620000b1565b83831015806200005057506200004d60028462000153565b15155b156200006f5760405163e62ccf3960e01b815260040160405180910390fd5b60ff90971661016052608095909552610120939093526101409190915260a05260c0526001600160401b031660e0526001600160a01b03166101005262000176565b600080600080600080600080610100898b031215620000cf57600080fd5b885160ff81168114620000e157600080fd5b60208a015160408b015160608c015160808d015160a08e015160c08f0151959d50939b509199509750955093506001600160401b03811681146200012457600080fd5b60e08a01519092506001600160a01b03811681146200014257600080fd5b809150509295985092959890939650565b6000826200017157634e487b7160e01b600052601260045260246000fd5b500690565b60805160a05160c05160e0516101005161012051610140516101605161317b6200025a600039600081816104e20152611bfb015260008181610606015261256f01526000818161040e01528181611a330152611a690152600081816104ac0152818161149901526117a901526000818161055b01528181610ca60152611cf201526000818161025401528181610b080152818161133b01528181612149015281816122770152818161237f015261245b01526000818161034601528181610a060152818161122a015261135c01526000818161029601526113e7015261317b6000f3fe6080604052600436106101b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612b05565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612b46565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3134000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612bd3565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612c02565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610fab565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612b46565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612c37565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e0610664366004612c99565b611179565b34801561067557600080fd5b506102e0610684366004612d23565b61171b565b34801561069557600080fd5b5061069e611bf9565b6040516101fe93929190612d4f565b6102e06106bb366004612c37565b611c56565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612ad6565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061077557610775612d7a565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612ad6565b02179055600281111561086557610865612ad6565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f90565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612ad6565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e612d7a565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a029190859061202716565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612dd8565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be28461202f565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c11612d7a565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612dd8565b610c999190612df0565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f00612d7a565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612df0565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612df0565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612ad6565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f1612d7a565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612dd8565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808915611411576113807f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612df0565b61138b906002612f29565b6113a6846fffffffffffffffffffffffffffffffff16612083565b67ffffffffffffffff166113ba9190612f64565b156113e5576113dc6113cd600186612f78565b865463ffffffff166000612129565b60010154611407565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061142b565b846001015491506114288460016113cd9190612fa9565b90505b600882901b60088a8a604051611442929190612fdd565b6040518091039020901b14611483576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061148e8c61220d565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b81526004016114f8959493929190613036565b6020604051808303816000875af1158015611517573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153b9190613070565b6002858101549290911492506000916115e6906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611682896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61168c9190613089565b61169691906130aa565b67ffffffffffffffff1615905081151581036116de576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561174757611747612ad6565b1461177e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061178d8661223c565b935093509350935060006117a385858585612609565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611812573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183691906130d1565b9050600189036118f8576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f29190613070565b50611bee565b6002890361196f576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118af565b600389036119e6576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118af565b60048903611b435760006fffffffffffffffffffffffffffffffff861615611a6757611a23866fffffffffffffffffffffffffffffffff16612083565b611a579067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612dd8565b611a62906001612dd8565b611a89565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3c9190613070565b5050611bee565b60058903611bbc576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118af565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611c4f6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c8257611c82612ad6565b14611cb9576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611cce57611cce612d7a565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611d3e90700100000000000000000000000000000000900467ffffffffffffffff1642612df0565b6002830154611d6e9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612dd8565b11611da5576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611dc3575060065460ff165b15611dfa576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611e0857508215155b15611e3f576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611f0d576000838281548110611e6057611e60612d7a565b6000918252602080832090910154808352600590915260409091205490915015611eb6576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611ecb57611ecb612d7a565b600091825260209091206003909102018054909150640100000000900460ff16611efa57600193505050611f0d565b505080611f0690613107565b9050611e43565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611f5691612a9c565b83600003611f8a57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611fc784367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612dd8565b90508267ffffffffffffffff1667ffffffffffffffff811115611fec57611fec61313f565b6040519080825280601f01601f191660200182016040528015612016576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480612046575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b600080612110837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080826121725761216d6fffffffffffffffffffffffffffffffff86167f00000000000000000000000000000000000000000000000000000000000000006126c9565b61218d565b61218d856fffffffffffffffffffffffffffffffff16612940565b9050600384815481106121a2576121a2612d7a565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461220557815460038054909163ffffffff169081106121f0576121f0612d7a565b906000526020600020906003020191506121b3565b509392505050565b600080600080600061221e8661223c565b935093509350935061223284848484612609565b9695505050505050565b600080600080600085905060006003828154811061225c5761225c612d7a565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612333906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612374576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f00000000000000000000000000000000000000000000000000000000000000009061243b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1692508211156124b757825463ffffffff166124817f00000000000000000000000000000000000000000000000000000000000000006001612dd8565b830361248b578391505b6003818154811061249e5761249e612d7a565b9060005260206000209060030201935080945050612378565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816124e48460011c90565b6fffffffffffffffffffffffffffffffff1614905080156125b757600061251c836fffffffffffffffffffffffffffffffff16612083565b67ffffffffffffffff16111561256d57600061254461253c600185612f78565b896001612129565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506125919050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff1697506125fb565b60006125c761253c846001612fa9565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036126705782826040516020016126539291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b6040516020818303038152906040528051906020012090506126c1565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081612768846fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116127a9576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82196001840116600061284e6fffffffffffffffffffffffffffffffff83167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1685811c80151793509050836128ff6fffffffffffffffffffffffffffffffff85167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116129385761293561291c856001612dd8565b6fffffffffffffffffffffffffffffffff8516906129ec565b92505b505092915050565b600081196001830116816129d4827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b600080612a79847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b5080546000825590600052602060002090810190612aba9190612abd565b50565b5b80821115612ad25760008155600101612abe565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612b40577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215612b5957600080fd5b50508035926020909101359150565b6000815180845260005b81811015612b8e57602081850181015186830182015201612b72565b81811115612ba0576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612be66020830184612b68565b9392505050565b80358015158114612bfd57600080fd5b919050565b600080600060608486031215612c1757600080fd5b8335925060208401359150612c2e60408501612bed565b90509250925092565b600060208284031215612c4957600080fd5b5035919050565b60008083601f840112612c6257600080fd5b50813567ffffffffffffffff811115612c7a57600080fd5b602083019150836020828501011115612c9257600080fd5b9250929050565b60008060008060008060808789031215612cb257600080fd5b86359550612cc260208801612bed565b9450604087013567ffffffffffffffff80821115612cdf57600080fd5b612ceb8a838b01612c50565b90965094506060890135915080821115612d0457600080fd5b50612d1189828a01612c50565b979a9699509497509295939492505050565b600080600060608486031215612d3857600080fd5b505081359360208301359350604090920135919050565b60ff84168152826020820152606060408201526000612d716060830184612b68565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612deb57612deb612da9565b500190565b600082821015612e0257612e02612da9565b500390565b600181815b80851115612e6057817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612e4657612e46612da9565b80851615612e5357918102915b93841c9390800290612e0c565b509250929050565b600082612e7757506001612f23565b81612e8457506000612f23565b8160018114612e9a5760028114612ea457612ec0565b6001915050612f23565b60ff841115612eb557612eb5612da9565b50506001821b612f23565b5060208310610133831016604e8410600b8410161715612ee3575081810a612f23565b612eed8383612e07565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612f1f57612f1f612da9565b0290505b92915050565b6000612be68383612e68565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612f7357612f73612f35565b500690565b60006fffffffffffffffffffffffffffffffff83811690831681811015612fa157612fa1612da9565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612fd457612fd4612da9565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60608152600061304a606083018789612fed565b828103602084015261305d818688612fed565b9150508260408301529695505050505050565b60006020828403121561308257600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612fa157612fa1612da9565b600067ffffffffffffffff808416806130c5576130c5612f35565b92169190910692915050565b6000602082840312156130e357600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114612be657600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361313857613138612da9565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a",
Bin: "0x6101806040523480156200001257600080fd5b50604051620033e7380380620033e78339810160408190526200003591620000b1565b83831015806200005057506200004d60028462000153565b15155b156200006f5760405163e62ccf3960e01b815260040160405180910390fd5b60ff90971661016052608095909552610120939093526101409190915260a05260c0526001600160401b031660e0526001600160a01b03166101005262000176565b600080600080600080600080610100898b031215620000cf57600080fd5b885160ff81168114620000e157600080fd5b60208a015160408b015160608c015160808d015160a08e015160c08f0151959d50939b509199509750955093506001600160401b03811681146200012457600080fd5b60e08a01519092506001600160a01b03811681146200014257600080fd5b809150509295985092959890939650565b6000826200017157634e487b7160e01b600052601260045260246000fd5b500690565b60805160a05160c05160e051610100516101205161014051610160516131786200026f600039600081816104e20152611bc3015260008181610606015261269501526000818161040e015281816119fb0152611a310152600081816104ac0152818161144a015261175a01526000818161055b01528181610c410152611cba01526000818161025401528181610a7c01528181610b45015281816112f3015281816119d1015281816120290152818161226f0152818161239d015281816124a5015261258101526000818161034601528181610ae8015281816111e20152611314015260008181610296015261139801526131786000f3fe6080604052600436106101b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612c30565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612c71565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3135000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612cfe565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612d26565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610f63565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612c71565b6110b4565b34801561059c57600080fd5b506105b06105ab366004612d5b565b6110c0565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e0610664366004612dbd565b611131565b34801561067557600080fd5b506102e0610684366004612e47565b6116cc565b34801561069557600080fd5b5061069e611bc1565b6040516101fe93929190612e73565b6102e06106bb366004612d5b565b611c1e565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612c01565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061077557610775612e9e565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612c01565b02179055600281111561086557610865612c01565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f58565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612c01565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092b5761092b612e9e565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193509091906109c39083908690611fef16565b90506000610a63826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050861580610aa55750610aa27f00000000000000000000000000000000000000000000000000000000000000006002612efc565b81145b8015610aaf575084155b15610ae6576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000811115610b40576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b6b7f00000000000000000000000000000000000000000000000000000000000000006001612efc565b8103610b7d57610b7d86888588611ff7565b835160009063ffffffff90811614610bdd576003856000015163ffffffff1681548110610bac57610bac612e9e565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608085015160009067ffffffffffffffff1667ffffffffffffffff1642610c16846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c2a9190612efc565b610c349190612f14565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610ca7576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421760008a8152608087901b6fffffffffffffffffffffffffffffffff8d1617602052604081209192509060008181526004602052604090205490915060ff1615610d25576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060036040518060a001604052808d63ffffffff1681526020016000151581526020018c8152602001886fffffffffffffffffffffffffffffffff168152602001846fffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548160ff0219169083151502179055506040820151816001015560608201518160020160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060808201518160020160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505050600160038c81548110610eb657610eb6612e9e565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558d82526005909252604090209054610f1790600190612f14565b8154600181018355600092835260208320015560405133918c918e917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a45050505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610fe87ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110ae9043612f14565b40600255565b61089d828260016108b3565b600381815481106110d057600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561115d5761115d612c01565b14611194576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111a9576111a9612e9e565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112087f00000000000000000000000000000000000000000000000000000000000000006001612efc565b6112a4826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112e5576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113c2576113387f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612f14565b6001901b611357846fffffffffffffffffffffffffffffffff166121a9565b67ffffffffffffffff1661136b9190612f5a565b156113965761138d61137e600186612f6e565b865463ffffffff16600061224f565b600101546113b8565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113dc565b846001015491506113d984600161137e9190612f9f565b90505b600882901b60088a8a6040516113f3929190612fd3565b6040518091039020901b14611434576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061143f8c612333565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b81526004016114a995949392919061302c565b6020604051808303816000875af11580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec9190613066565b600285810154929091149250600091611597906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611633896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163d919061307f565b61164791906130a0565b67ffffffffffffffff16159050811515810361168f576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116f8576116f8612c01565b1461172f576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061173e86612362565b935093509350935060006117548585858561272f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e791906130c7565b9050600189036118a9576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561187f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a39190613066565b50611bb6565b60028903611920576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a401611860565b60038903611997576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a401611860565b60048903611b0b5760006fffffffffffffffffffffffffffffffff861615611a2f576119f56fffffffffffffffffffffffffffffffff87167f00000000000000000000000000000000000000000000000000000000000000006127ef565b611a1f907f0000000000000000000000000000000000000000000000000000000000000000612efc565b611a2a906001612efc565b611a51565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b049190613066565b5050611bb6565b60058903611b84576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a401611860565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611c176108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c4a57611c4a612c01565b14611c81576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c9657611c96612e9e565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611d0690700100000000000000000000000000000000900467ffffffffffffffff1642612f14565b6002830154611d369190700100000000000000000000000000000000900460401c67ffffffffffffffff16612efc565b11611d6d576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d8b575060065460ff165b15611dc2576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611dd057508215155b15611e07576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611ed5576000838281548110611e2857611e28612e9e565b6000918252602080832090910154808352600590915260409091205490915015611e7e576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e9357611e93612e9e565b600091825260209091206003909102018054909150640100000000900460ff16611ec257600193505050611ed5565b505080611ece90613104565b9050611e0b565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611f1e91612bc7565b83600003611f5257600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f8f84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612efc565b90508267ffffffffffffffff1667ffffffffffffffff811115611fb457611fb461313c565b6040519080825280601f01601f191660200182016040528015611fde576020820181803683370190505b509150828160208401375092915050565b151760011b90565b6000612004836001612f9f565b905060006120148286600161224f565b9050600086901a8380612105575061204d60027f0000000000000000000000000000000000000000000000000000000000000000612f5a565b6002838101546120ef906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6120f991906130a0565b67ffffffffffffffff16145b156121625760ff81166001148061211f575060ff81166002145b61215d576040517ff40239db000000000000000000000000000000000000000000000000000000008152600481018890526024015b60405180910390fd5b6121a0565b60ff8116156121a0576040517ff40239db00000000000000000000000000000000000000000000000000000000815260048101889052602401612154565b50505050505050565b600080612236837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b60008082612298576122936fffffffffffffffffffffffffffffffff86167f00000000000000000000000000000000000000000000000000000000000000006128a4565b6122b3565b6122b3856fffffffffffffffffffffffffffffffff16612a6b565b9050600384815481106122c8576122c8612e9e565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461232b57815460038054909163ffffffff1690811061231657612316612e9e565b906000526020600020906003020191506122d9565b509392505050565b600080600080600061234486612362565b93509350935093506123588484848461272f565b9695505050505050565b600080600080600085905060006003828154811061238257612382612e9e565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612459906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161161249a576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612561906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1692508211156125dd57825463ffffffff166125a77f00000000000000000000000000000000000000000000000000000000000000006001612efc565b83036125b1578391505b600381815481106125c4576125c4612e9e565b906000526020600020906003020193508094505061249e565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161260a8460011c90565b6fffffffffffffffffffffffffffffffff1614905080156126dd576000612642836fffffffffffffffffffffffffffffffff166121a9565b67ffffffffffffffff16111561269357600061266a612662600185612f6e565b89600161224f565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506126b79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612721565b60006126ed612662846001612f9f565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036127965782826040516020016127799291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b6040516020818303038152906040528051906020012090506127e7565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b60008061287c847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b600081612943846fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612984576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61298d83612a6b565b905081612a2c826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612a6557612a62612a49836001612efc565b6fffffffffffffffffffffffffffffffff831690612b17565b90505b92915050565b60008119600183011681612aff827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b600080612ba4847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b5080546000825590600052602060002090810190612be59190612be8565b50565b5b80821115612bfd5760008155600101612be9565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612c6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215612c8457600080fd5b50508035926020909101359150565b6000815180845260005b81811015612cb957602081850181015186830182015201612c9d565b81811115612ccb576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a626020830184612c93565b80358015158114612d2157600080fd5b919050565b600080600060608486031215612d3b57600080fd5b8335925060208401359150612d5260408501612d11565b90509250925092565b600060208284031215612d6d57600080fd5b5035919050565b60008083601f840112612d8657600080fd5b50813567ffffffffffffffff811115612d9e57600080fd5b602083019150836020828501011115612db657600080fd5b9250929050565b60008060008060008060808789031215612dd657600080fd5b86359550612de660208801612d11565b9450604087013567ffffffffffffffff80821115612e0357600080fd5b612e0f8a838b01612d74565b90965094506060890135915080821115612e2857600080fd5b50612e3589828a01612d74565b979a9699509497509295939492505050565b600080600060608486031215612e5c57600080fd5b505081359360208301359350604090920135919050565b60ff84168152826020820152606060408201526000612e956060830184612c93565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612f0f57612f0f612ecd565b500190565b600082821015612f2657612f26612ecd565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612f6957612f69612f2b565b500690565b60006fffffffffffffffffffffffffffffffff83811690831681811015612f9757612f97612ecd565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612fca57612fca612ecd565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000613040606083018789612fe3565b8281036020840152613053818688612fe3565b9150508260408301529695505050505050565b60006020828403121561307857600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612f9757612f97612ecd565b600067ffffffffffffffff808416806130bb576130bb612f2b565b92169190910692915050565b6000602082840312156130d957600080fd5b815173ffffffffffffffffffffffffffffffffffffffff811681146130fd57600080fd5b9392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361313557613135612ecd565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a",
}
// OutputBisectionGameABI is the input ABI used to generate the binding from.
......
......@@ -13,7 +13,7 @@ const OutputBisectionGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"co
var OutputBisectionGameStorageLayout = new(solc.StorageLayout)
var OutputBisectionGameDeployedBin = "0x6080604052600436106101b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612b05565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612b46565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3134000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612bd3565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612c02565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610fab565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612b46565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612c37565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e0610664366004612c99565b611179565b34801561067557600080fd5b506102e0610684366004612d23565b61171b565b34801561069557600080fd5b5061069e611bf9565b6040516101fe93929190612d4f565b6102e06106bb366004612c37565b611c56565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612ad6565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061077557610775612d7a565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612ad6565b02179055600281111561086557610865612ad6565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f90565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612ad6565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e612d7a565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a029190859061202716565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612dd8565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be28461202f565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c11612d7a565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612dd8565b610c999190612df0565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f00612d7a565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612df0565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612df0565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612ad6565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f1612d7a565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612dd8565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808915611411576113807f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612df0565b61138b906002612f29565b6113a6846fffffffffffffffffffffffffffffffff16612083565b67ffffffffffffffff166113ba9190612f64565b156113e5576113dc6113cd600186612f78565b865463ffffffff166000612129565b60010154611407565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061142b565b846001015491506114288460016113cd9190612fa9565b90505b600882901b60088a8a604051611442929190612fdd565b6040518091039020901b14611483576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061148e8c61220d565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b81526004016114f8959493929190613036565b6020604051808303816000875af1158015611517573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153b9190613070565b6002858101549290911492506000916115e6906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611682896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61168c9190613089565b61169691906130aa565b67ffffffffffffffff1615905081151581036116de576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561174757611747612ad6565b1461177e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061178d8661223c565b935093509350935060006117a385858585612609565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611812573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061183691906130d1565b9050600189036118f8576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f29190613070565b50611bee565b6002890361196f576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118af565b600389036119e6576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118af565b60048903611b435760006fffffffffffffffffffffffffffffffff861615611a6757611a23866fffffffffffffffffffffffffffffffff16612083565b611a579067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612dd8565b611a62906001612dd8565b611a89565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611b18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3c9190613070565b5050611bee565b60058903611bbc576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118af565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611c4f6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c8257611c82612ad6565b14611cb9576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611cce57611cce612d7a565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611d3e90700100000000000000000000000000000000900467ffffffffffffffff1642612df0565b6002830154611d6e9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612dd8565b11611da5576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611dc3575060065460ff165b15611dfa576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611e0857508215155b15611e3f576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611f0d576000838281548110611e6057611e60612d7a565b6000918252602080832090910154808352600590915260409091205490915015611eb6576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611ecb57611ecb612d7a565b600091825260209091206003909102018054909150640100000000900460ff16611efa57600193505050611f0d565b505080611f0690613107565b9050611e43565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611f5691612a9c565b83600003611f8a57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611fc784367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612dd8565b90508267ffffffffffffffff1667ffffffffffffffff811115611fec57611fec61313f565b6040519080825280601f01601f191660200182016040528015612016576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480612046575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b600080612110837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080826121725761216d6fffffffffffffffffffffffffffffffff86167f00000000000000000000000000000000000000000000000000000000000000006126c9565b61218d565b61218d856fffffffffffffffffffffffffffffffff16612940565b9050600384815481106121a2576121a2612d7a565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461220557815460038054909163ffffffff169081106121f0576121f0612d7a565b906000526020600020906003020191506121b3565b509392505050565b600080600080600061221e8661223c565b935093509350935061223284848484612609565b9695505050505050565b600080600080600085905060006003828154811061225c5761225c612d7a565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612333906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612374576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f00000000000000000000000000000000000000000000000000000000000000009061243b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1692508211156124b757825463ffffffff166124817f00000000000000000000000000000000000000000000000000000000000000006001612dd8565b830361248b578391505b6003818154811061249e5761249e612d7a565b9060005260206000209060030201935080945050612378565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816124e48460011c90565b6fffffffffffffffffffffffffffffffff1614905080156125b757600061251c836fffffffffffffffffffffffffffffffff16612083565b67ffffffffffffffff16111561256d57600061254461253c600185612f78565b896001612129565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506125919050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff1697506125fb565b60006125c761253c846001612fa9565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036126705782826040516020016126539291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b6040516020818303038152906040528051906020012090506126c1565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081612768846fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116127a9576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82196001840116600061284e6fffffffffffffffffffffffffffffffff83167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1685811c80151793509050836128ff6fffffffffffffffffffffffffffffffff85167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116129385761293561291c856001612dd8565b6fffffffffffffffffffffffffffffffff8516906129ec565b92505b505092915050565b600081196001830116816129d4827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b600080612a79847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b5080546000825590600052602060002090810190612aba9190612abd565b50565b5b80821115612ad25760008155600101612abe565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612b40577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215612b5957600080fd5b50508035926020909101359150565b6000815180845260005b81811015612b8e57602081850181015186830182015201612b72565b81811115612ba0576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612be66020830184612b68565b9392505050565b80358015158114612bfd57600080fd5b919050565b600080600060608486031215612c1757600080fd5b8335925060208401359150612c2e60408501612bed565b90509250925092565b600060208284031215612c4957600080fd5b5035919050565b60008083601f840112612c6257600080fd5b50813567ffffffffffffffff811115612c7a57600080fd5b602083019150836020828501011115612c9257600080fd5b9250929050565b60008060008060008060808789031215612cb257600080fd5b86359550612cc260208801612bed565b9450604087013567ffffffffffffffff80821115612cdf57600080fd5b612ceb8a838b01612c50565b90965094506060890135915080821115612d0457600080fd5b50612d1189828a01612c50565b979a9699509497509295939492505050565b600080600060608486031215612d3857600080fd5b505081359360208301359350604090920135919050565b60ff84168152826020820152606060408201526000612d716060830184612b68565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612deb57612deb612da9565b500190565b600082821015612e0257612e02612da9565b500390565b600181815b80851115612e6057817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612e4657612e46612da9565b80851615612e5357918102915b93841c9390800290612e0c565b509250929050565b600082612e7757506001612f23565b81612e8457506000612f23565b8160018114612e9a5760028114612ea457612ec0565b6001915050612f23565b60ff841115612eb557612eb5612da9565b50506001821b612f23565b5060208310610133831016604e8410600b8410161715612ee3575081810a612f23565b612eed8383612e07565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612f1f57612f1f612da9565b0290505b92915050565b6000612be68383612e68565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612f7357612f73612f35565b500690565b60006fffffffffffffffffffffffffffffffff83811690831681811015612fa157612fa1612da9565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612fd457612fd4612da9565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60608152600061304a606083018789612fed565b828103602084015261305d818688612fed565b9150508260408301529695505050505050565b60006020828403121561308257600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612fa157612fa1612da9565b600067ffffffffffffffff808416806130c5576130c5612f35565b92169190910692915050565b6000602082840312156130e357600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114612be657600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361313857613138612da9565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
var OutputBisectionGameDeployedBin = "0x6080604052600436106101b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612c30565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612c71565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3135000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612cfe565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612d26565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610f63565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612c71565b6110b4565b34801561059c57600080fd5b506105b06105ab366004612d5b565b6110c0565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e0610664366004612dbd565b611131565b34801561067557600080fd5b506102e0610684366004612e47565b6116cc565b34801561069557600080fd5b5061069e611bc1565b6040516101fe93929190612e73565b6102e06106bb366004612d5b565b611c1e565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612c01565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061077557610775612e9e565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612c01565b02179055600281111561086557610865612c01565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f58565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612c01565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092b5761092b612e9e565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193509091906109c39083908690611fef16565b90506000610a63826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050861580610aa55750610aa27f00000000000000000000000000000000000000000000000000000000000000006002612efc565b81145b8015610aaf575084155b15610ae6576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000811115610b40576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b6b7f00000000000000000000000000000000000000000000000000000000000000006001612efc565b8103610b7d57610b7d86888588611ff7565b835160009063ffffffff90811614610bdd576003856000015163ffffffff1681548110610bac57610bac612e9e565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608085015160009067ffffffffffffffff1667ffffffffffffffff1642610c16846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c2a9190612efc565b610c349190612f14565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610ca7576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421760008a8152608087901b6fffffffffffffffffffffffffffffffff8d1617602052604081209192509060008181526004602052604090205490915060ff1615610d25576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060036040518060a001604052808d63ffffffff1681526020016000151581526020018c8152602001886fffffffffffffffffffffffffffffffff168152602001846fffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548160ff0219169083151502179055506040820151816001015560608201518160020160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060808201518160020160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505050600160038c81548110610eb657610eb6612e9e565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558d82526005909252604090209054610f1790600190612f14565b8154600181018355600092835260208320015560405133918c918e917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a45050505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610fe87ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110ae9043612f14565b40600255565b61089d828260016108b3565b600381815481106110d057600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561115d5761115d612c01565b14611194576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111a9576111a9612e9e565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112087f00000000000000000000000000000000000000000000000000000000000000006001612efc565b6112a4826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112e5576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113c2576113387f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612f14565b6001901b611357846fffffffffffffffffffffffffffffffff166121a9565b67ffffffffffffffff1661136b9190612f5a565b156113965761138d61137e600186612f6e565b865463ffffffff16600061224f565b600101546113b8565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113dc565b846001015491506113d984600161137e9190612f9f565b90505b600882901b60088a8a6040516113f3929190612fd3565b6040518091039020901b14611434576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061143f8c612333565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b81526004016114a995949392919061302c565b6020604051808303816000875af11580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec9190613066565b600285810154929091149250600091611597906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611633896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163d919061307f565b61164791906130a0565b67ffffffffffffffff16159050811515810361168f576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116f8576116f8612c01565b1461172f576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061173e86612362565b935093509350935060006117548585858561272f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e791906130c7565b9050600189036118a9576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561187f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a39190613066565b50611bb6565b60028903611920576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a401611860565b60038903611997576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a401611860565b60048903611b0b5760006fffffffffffffffffffffffffffffffff861615611a2f576119f56fffffffffffffffffffffffffffffffff87167f00000000000000000000000000000000000000000000000000000000000000006127ef565b611a1f907f0000000000000000000000000000000000000000000000000000000000000000612efc565b611a2a906001612efc565b611a51565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ae0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b049190613066565b5050611bb6565b60058903611b84576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a401611860565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611c176108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c4a57611c4a612c01565b14611c81576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c9657611c96612e9e565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611d0690700100000000000000000000000000000000900467ffffffffffffffff1642612f14565b6002830154611d369190700100000000000000000000000000000000900460401c67ffffffffffffffff16612efc565b11611d6d576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d8b575060065460ff165b15611dc2576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611dd057508215155b15611e07576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611ed5576000838281548110611e2857611e28612e9e565b6000918252602080832090910154808352600590915260409091205490915015611e7e576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e9357611e93612e9e565b600091825260209091206003909102018054909150640100000000900460ff16611ec257600193505050611ed5565b505080611ece90613104565b9050611e0b565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611f1e91612bc7565b83600003611f5257600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f8f84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612efc565b90508267ffffffffffffffff1667ffffffffffffffff811115611fb457611fb461313c565b6040519080825280601f01601f191660200182016040528015611fde576020820181803683370190505b509150828160208401375092915050565b151760011b90565b6000612004836001612f9f565b905060006120148286600161224f565b9050600086901a8380612105575061204d60027f0000000000000000000000000000000000000000000000000000000000000000612f5a565b6002838101546120ef906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6120f991906130a0565b67ffffffffffffffff16145b156121625760ff81166001148061211f575060ff81166002145b61215d576040517ff40239db000000000000000000000000000000000000000000000000000000008152600481018890526024015b60405180910390fd5b6121a0565b60ff8116156121a0576040517ff40239db00000000000000000000000000000000000000000000000000000000815260048101889052602401612154565b50505050505050565b600080612236837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b60008082612298576122936fffffffffffffffffffffffffffffffff86167f00000000000000000000000000000000000000000000000000000000000000006128a4565b6122b3565b6122b3856fffffffffffffffffffffffffffffffff16612a6b565b9050600384815481106122c8576122c8612e9e565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461232b57815460038054909163ffffffff1690811061231657612316612e9e565b906000526020600020906003020191506122d9565b509392505050565b600080600080600061234486612362565b93509350935093506123588484848461272f565b9695505050505050565b600080600080600085905060006003828154811061238257612382612e9e565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612459906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161161249a576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612561906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1692508211156125dd57825463ffffffff166125a77f00000000000000000000000000000000000000000000000000000000000000006001612efc565b83036125b1578391505b600381815481106125c4576125c4612e9e565b906000526020600020906003020193508094505061249e565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161260a8460011c90565b6fffffffffffffffffffffffffffffffff1614905080156126dd576000612642836fffffffffffffffffffffffffffffffff166121a9565b67ffffffffffffffff16111561269357600061266a612662600185612f6e565b89600161224f565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506126b79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612721565b60006126ed612662846001612f9f565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036127965782826040516020016127799291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b6040516020818303038152906040528051906020012090506127e7565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b60008061287c847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b600081612943846fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612984576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61298d83612a6b565b905081612a2c826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612a6557612a62612a49836001612efc565b6fffffffffffffffffffffffffffffffff831690612b17565b90505b92915050565b60008119600183011681612aff827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b600080612ba4847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169050808303600180821b0385821b179250505092915050565b5080546000825590600052602060002090810190612be59190612be8565b50565b5b80821115612bfd5760008155600101612be9565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612c6b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215612c8457600080fd5b50508035926020909101359150565b6000815180845260005b81811015612cb957602081850181015186830182015201612c9d565b81811115612ccb576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612a626020830184612c93565b80358015158114612d2157600080fd5b919050565b600080600060608486031215612d3b57600080fd5b8335925060208401359150612d5260408501612d11565b90509250925092565b600060208284031215612d6d57600080fd5b5035919050565b60008083601f840112612d8657600080fd5b50813567ffffffffffffffff811115612d9e57600080fd5b602083019150836020828501011115612db657600080fd5b9250929050565b60008060008060008060808789031215612dd657600080fd5b86359550612de660208801612d11565b9450604087013567ffffffffffffffff80821115612e0357600080fd5b612e0f8a838b01612d74565b90965094506060890135915080821115612e2857600080fd5b50612e3589828a01612d74565b979a9699509497509295939492505050565b600080600060608486031215612e5c57600080fd5b505081359360208301359350604090920135919050565b60ff84168152826020820152606060408201526000612e956060830184612c93565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612f0f57612f0f612ecd565b500190565b600082821015612f2657612f26612ecd565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612f6957612f69612f2b565b500690565b60006fffffffffffffffffffffffffffffffff83811690831681811015612f9757612f97612ecd565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612fca57612fca612ecd565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000613040606083018789612fe3565b8281036020840152613053818688612fe3565b9150508260408301529695505050505050565b60006020828403121561307857600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612f9757612f97612ecd565b600067ffffffffffffffff808416806130bb576130bb612f2b565b92169190910692915050565b6000602082840312156130d957600080fd5b815173ffffffffffffffffffffffffffffffffffffffff811681146130fd57600080fd5b9392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361313557613135612ecd565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
func init() {
......
......@@ -100,8 +100,8 @@
"sourceCodeHash": "0xa995b54dce03ddf5c9c47451bd7181996b91398ad66b54ab0b8cbf582863a33e"
},
"src/dispute/OutputBisectionGame.sol": {
"initCodeHash": "0x6efe83410be6fd58eb07a5297492c6a45598d1f0f84d4ec286d93beade28f40f",
"sourceCodeHash": "0x1cc70ebc403581213a4853e1ef1579abeb63496d0625424fa5b9ac8351b2eeca"
"initCodeHash": "0xd354d78579c42a9f0f8a8c9b5ef04f570fa3bd088f88102b431aca8d48fddaae",
"sourceCodeHash": "0x98f65f2f2f07a525d360eba87e624f1cb44c52326f3b3f2bf7b6ee41a7ec4a2c"
},
"src/legacy/DeployerWhitelist.sol": {
"initCodeHash": "0x8de80fb23b26dd9d849f6328e56ea7c173cd9e9ce1f05c9beea559d1720deb3d",
......
......@@ -808,11 +808,11 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "contract",
"name": "OutputBisectionGame",
"start": 1092,
"length": 28651,
"length": 30503,
"filename_relative": "src/dispute/OutputBisectionGame.sol"
},
{
......@@ -820,7 +820,7 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "function",
"name": "attack",
"start": 1139,
......@@ -832,7 +832,7 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "function",
"name": "defend",
"start": 1412,
......@@ -844,7 +844,7 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "function",
"name": "resolveClaim",
"start": 3429,
......@@ -856,11 +856,11 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "function",
"name": "move",
"start": 9840,
"length": 4211,
"length": 4512,
"filename_relative": "src/dispute/OutputBisectionGame.sol"
},
{
......@@ -868,10 +868,10 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "function",
"name": "attack",
"start": 14098,
"start": 14399,
"length": 118,
"filename_relative": "src/dispute/OutputBisectionGame.sol"
},
......@@ -880,10 +880,10 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "function",
"name": "defend",
"start": 14263,
"start": 14564,
"length": 119,
"filename_relative": "src/dispute/OutputBisectionGame.sol"
},
......@@ -892,10 +892,10 @@
"impact": "Medium",
"confidence": "High",
"check": "locked-ether",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-612) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#284-286)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#289-291)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\tBut does not have a function to withdraw the ether\n",
"description": "Contract locking ether found:\n\tContract OutputBisectionGame (src/dispute/OutputBisectionGame.sol#24-644) has payable functions:\n\t - IOutputBisectionGame.attack(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#30)\n\t - IOutputBisectionGame.defend(uint256,Claim) (src/dispute/interfaces/IOutputBisectionGame.sol#35)\n\t - IOutputBisectionGame.resolveClaim(uint256) (src/dispute/interfaces/IOutputBisectionGame.sol#62)\n\t - OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t - OutputBisectionGame.attack(uint256,Claim) (src/dispute/OutputBisectionGame.sol#290-292)\n\t - OutputBisectionGame.defend(uint256,Claim) (src/dispute/OutputBisectionGame.sol#295-297)\n\t - OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\tBut does not have a function to withdraw the ether\n",
"type": "function",
"name": "resolveClaim",
"start": 17921,
"start": 18231,
"length": 2043,
"filename_relative": "src/dispute/OutputBisectionGame.sol"
},
......@@ -1180,7 +1180,7 @@
"impact": "Medium",
"confidence": "Medium",
"check": "reentrancy-no-eth",
"description": "Reentrancy in OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194):\n\tExternal calls:\n\t- validStep = VM.step(_stateData,_proof,Hash.unwrap(uuid)) == Claim.unwrap(postState.claim) (src/dispute/OutputBisectionGame.sol#187)\n\tState variables written after the call(s):\n\t- parent.countered = true (src/dispute/OutputBisectionGame.sol#193)\n\tOutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74) can be used in cross function reentrancies:\n\t- OutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74)\n\t- OutputBisectionGame.claimDataLen() (src/dispute/OutputBisectionGame.sol#463-465)\n\t- OutputBisectionGame.findStartingAndDisputedOutputs(uint256) (src/dispute/OutputBisectionGame.sol#516-577)\n\t- OutputBisectionGame.findTraceAncestor(Position,uint256,bool) (src/dispute/OutputBisectionGame.sol#489-507)\n\t- OutputBisectionGame.initialize() (src/dispute/OutputBisectionGame.sol#437-460)\n\t- OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t- OutputBisectionGame.resolve() (src/dispute/OutputBisectionGame.sol#346-358)\n\t- OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\t- OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194)\n",
"description": "Reentrancy in OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194):\n\tExternal calls:\n\t- validStep = VM.step(_stateData,_proof,Hash.unwrap(uuid)) == Claim.unwrap(postState.claim) (src/dispute/OutputBisectionGame.sol#187)\n\tState variables written after the call(s):\n\t- parent.countered = true (src/dispute/OutputBisectionGame.sol#193)\n\tOutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74) can be used in cross function reentrancies:\n\t- OutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74)\n\t- OutputBisectionGame.claimDataLen() (src/dispute/OutputBisectionGame.sol#469-471)\n\t- OutputBisectionGame.findStartingAndDisputedOutputs(uint256) (src/dispute/OutputBisectionGame.sol#548-609)\n\t- OutputBisectionGame.findTraceAncestor(Position,uint256,bool) (src/dispute/OutputBisectionGame.sol#521-539)\n\t- OutputBisectionGame.initialize() (src/dispute/OutputBisectionGame.sol#443-466)\n\t- OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t- OutputBisectionGame.resolve() (src/dispute/OutputBisectionGame.sol#352-364)\n\t- OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\t- OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194)\n",
"type": "function",
"name": "step",
"start": 5273,
......@@ -1192,7 +1192,7 @@
"impact": "Medium",
"confidence": "Medium",
"check": "reentrancy-no-eth",
"description": "Reentrancy in OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194):\n\tExternal calls:\n\t- validStep = VM.step(_stateData,_proof,Hash.unwrap(uuid)) == Claim.unwrap(postState.claim) (src/dispute/OutputBisectionGame.sol#187)\n\tState variables written after the call(s):\n\t- parent.countered = true (src/dispute/OutputBisectionGame.sol#193)\n\tOutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74) can be used in cross function reentrancies:\n\t- OutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74)\n\t- OutputBisectionGame.claimDataLen() (src/dispute/OutputBisectionGame.sol#463-465)\n\t- OutputBisectionGame.findStartingAndDisputedOutputs(uint256) (src/dispute/OutputBisectionGame.sol#516-577)\n\t- OutputBisectionGame.findTraceAncestor(Position,uint256,bool) (src/dispute/OutputBisectionGame.sol#489-507)\n\t- OutputBisectionGame.initialize() (src/dispute/OutputBisectionGame.sol#437-460)\n\t- OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t- OutputBisectionGame.resolve() (src/dispute/OutputBisectionGame.sol#346-358)\n\t- OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\t- OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194)\n",
"description": "Reentrancy in OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194):\n\tExternal calls:\n\t- validStep = VM.step(_stateData,_proof,Hash.unwrap(uuid)) == Claim.unwrap(postState.claim) (src/dispute/OutputBisectionGame.sol#187)\n\tState variables written after the call(s):\n\t- parent.countered = true (src/dispute/OutputBisectionGame.sol#193)\n\tOutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74) can be used in cross function reentrancies:\n\t- OutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74)\n\t- OutputBisectionGame.claimDataLen() (src/dispute/OutputBisectionGame.sol#469-471)\n\t- OutputBisectionGame.findStartingAndDisputedOutputs(uint256) (src/dispute/OutputBisectionGame.sol#548-609)\n\t- OutputBisectionGame.findTraceAncestor(Position,uint256,bool) (src/dispute/OutputBisectionGame.sol#521-539)\n\t- OutputBisectionGame.initialize() (src/dispute/OutputBisectionGame.sol#443-466)\n\t- OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t- OutputBisectionGame.resolve() (src/dispute/OutputBisectionGame.sol#352-364)\n\t- OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\t- OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194)\n",
"type": "node",
"name": "validStep = VM.step(_stateData,_proof,Hash.unwrap(uuid)) == Claim.unwrap(postState.claim)",
"start": 9080,
......@@ -1204,7 +1204,7 @@
"impact": "Medium",
"confidence": "Medium",
"check": "reentrancy-no-eth",
"description": "Reentrancy in OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194):\n\tExternal calls:\n\t- validStep = VM.step(_stateData,_proof,Hash.unwrap(uuid)) == Claim.unwrap(postState.claim) (src/dispute/OutputBisectionGame.sol#187)\n\tState variables written after the call(s):\n\t- parent.countered = true (src/dispute/OutputBisectionGame.sol#193)\n\tOutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74) can be used in cross function reentrancies:\n\t- OutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74)\n\t- OutputBisectionGame.claimDataLen() (src/dispute/OutputBisectionGame.sol#463-465)\n\t- OutputBisectionGame.findStartingAndDisputedOutputs(uint256) (src/dispute/OutputBisectionGame.sol#516-577)\n\t- OutputBisectionGame.findTraceAncestor(Position,uint256,bool) (src/dispute/OutputBisectionGame.sol#489-507)\n\t- OutputBisectionGame.initialize() (src/dispute/OutputBisectionGame.sol#437-460)\n\t- OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-281)\n\t- OutputBisectionGame.resolve() (src/dispute/OutputBisectionGame.sol#346-358)\n\t- OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#361-411)\n\t- OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194)\n",
"description": "Reentrancy in OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194):\n\tExternal calls:\n\t- validStep = VM.step(_stateData,_proof,Hash.unwrap(uuid)) == Claim.unwrap(postState.claim) (src/dispute/OutputBisectionGame.sol#187)\n\tState variables written after the call(s):\n\t- parent.countered = true (src/dispute/OutputBisectionGame.sol#193)\n\tOutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74) can be used in cross function reentrancies:\n\t- OutputBisectionGame.claimData (src/dispute/OutputBisectionGame.sol#74)\n\t- OutputBisectionGame.claimDataLen() (src/dispute/OutputBisectionGame.sol#469-471)\n\t- OutputBisectionGame.findStartingAndDisputedOutputs(uint256) (src/dispute/OutputBisectionGame.sol#548-609)\n\t- OutputBisectionGame.findTraceAncestor(Position,uint256,bool) (src/dispute/OutputBisectionGame.sol#521-539)\n\t- OutputBisectionGame.initialize() (src/dispute/OutputBisectionGame.sol#443-466)\n\t- OutputBisectionGame.move(uint256,Claim,bool) (src/dispute/OutputBisectionGame.sol#200-287)\n\t- OutputBisectionGame.resolve() (src/dispute/OutputBisectionGame.sol#352-364)\n\t- OutputBisectionGame.resolveClaim(uint256) (src/dispute/OutputBisectionGame.sol#367-417)\n\t- OutputBisectionGame.step(uint256,bool,bytes,bytes) (src/dispute/OutputBisectionGame.sol#127-194)\n",
"type": "node",
"name": "parent.countered = true",
"start": 9505,
......@@ -1300,10 +1300,10 @@
"impact": "Medium",
"confidence": "Medium",
"check": "uninitialized-local",
"description": "OutputBisectionGame.findStartingAndDisputedOutputs(uint256).currentDepth (src/dispute/OutputBisectionGame.sol#534) is a local variable never initialized\n",
"description": "OutputBisectionGame.findStartingAndDisputedOutputs(uint256).currentDepth (src/dispute/OutputBisectionGame.sol#566) is a local variable never initialized\n",
"type": "variable",
"name": "currentDepth",
"start": 25470,
"start": 27322,
"length": 20,
"filename_relative": "src/dispute/OutputBisectionGame.sol"
},
......@@ -1312,10 +1312,10 @@
"impact": "Medium",
"confidence": "Medium",
"check": "uninitialized-local",
"description": "OutputBisectionGame.move(uint256,Claim,bool).grandparentClock (src/dispute/OutputBisectionGame.sol#229) is a local variable never initialized\n",
"description": "OutputBisectionGame.move(uint256,Claim,bool).grandparentClock (src/dispute/OutputBisectionGame.sol#235) is a local variable never initialized\n",
"type": "variable",
"name": "grandparentClock",
"start": 11713,
"start": 12014,
"length": 22,
"filename_relative": "src/dispute/OutputBisectionGame.sol"
},
......
......@@ -83,8 +83,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
bool internal subgameAtRootResolved;
/// @notice Semantic version.
/// @custom:semver 0.0.14
string public constant version = "0.0.14";
/// @custom:semver 0.0.15
string public constant version = "0.0.15";
/// @param _gameType The type ID of the game.
/// @param _absolutePrestate The absolute prestate of the instruction trace.
......@@ -151,7 +151,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// the remainder of the index at depth divided by 2 ** (MAX_GAME_DEPTH - SPLIT_DEPTH),
// which is the number of leaves in each execution trace subgame. This is so that we can
// determine whether or not the step position is represents the `ABSOLUTE_PRESTATE`.
preStateClaim = (stepPos.indexAtDepth() % (2 ** (MAX_GAME_DEPTH - SPLIT_DEPTH))) == 0
preStateClaim = (stepPos.indexAtDepth() % (1 << (MAX_GAME_DEPTH - SPLIT_DEPTH))) == 0
? ABSOLUTE_PRESTATE
: findTraceAncestor(Position.wrap(Position.unwrap(parentPos) - 1), parent.parentIndex, false).claim;
// For all attacks, the poststate is the parent claim.
......@@ -201,28 +201,34 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// INVARIANT: Moves cannot be made unless the game is currently in progress.
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();
// INVARIANT: A defense can never be made against the root claim. This is because the root
// claim commits to the entire state. Therefore, the only valid defense is to
// do nothing if it is agreed with.
if (_challengeIndex == 0 && !_isAttack) revert CannotDefendRootClaim();
// Get the parent. If it does not exist, the call will revert with OOB.
ClaimData memory parent = claimData[_challengeIndex];
// Compute the position that the claim commits to. Because the parent's position is already
// known, we can compute the next position by moving left or right depending on whether
// or not the move is an attack or defense.
Position nextPosition = parent.position.move(_isAttack);
Position parentPos = parent.position;
Position nextPosition = parentPos.move(_isAttack);
uint256 nextPositionDepth = nextPosition.depth();
// INVARIANT: A defense can never be made against the root claim of either the output root game or any
// of the execution trace bisection subgames. This is because the root claim commits to the
// entire state. Therefore, the only valid defense is to do nothing if it is agreed with.
if ((_challengeIndex == 0 || nextPositionDepth == SPLIT_DEPTH + 2) && !_isAttack) {
revert CannotDefendRootClaim();
}
// INVARIANT: A move can never surpass the `MAX_GAME_DEPTH`. The only option to counter a
// claim at this depth is to perform a single instruction step on-chain via
// the `step` function to prove that the state transition produces an unexpected
// post-state.
if (nextPosition.depth() > MAX_GAME_DEPTH) revert GameDepthExceeded();
if (nextPositionDepth > MAX_GAME_DEPTH) revert GameDepthExceeded();
// 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.
if (nextPosition.depth() == SPLIT_DEPTH + 1) verifyExecBisectionRoot(_claim);
if (nextPositionDepth == SPLIT_DEPTH + 1) {
verifyExecBisectionRoot(_claim, _challengeIndex, parentPos, _isAttack);
}
// Fetch the grandparent clock, if it exists.
// The grandparent clock should always exist unless the parent is the root claim.
......@@ -317,7 +323,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// we add the index at depth + 1 to the genesis block number to get the L2 block number.
uint256 l2Number = Position.unwrap(startingPos) == 0
? GENESIS_BLOCK_NUMBER
: GENESIS_BLOCK_NUMBER + startingPos.indexAtDepth() + 1;
: GENESIS_BLOCK_NUMBER + startingPos.traceIndex(SPLIT_DEPTH) + 1;
oracle.loadLocalData(_ident, Hash.unwrap(uuid), bytes32(l2Number << 0xC0), 8, _partOffset);
} else if (_ident == LocalPreimageKey.CHAIN_ID) {
......@@ -471,11 +477,37 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice Verifies the integrity of an execution bisection subgame's root claim. Reverts if the claim
/// is invalid.
/// @param _rootClaim The root claim of the execution bisection subgame.
function verifyExecBisectionRoot(Claim _rootClaim) internal pure {
// The VMStatus must indicate 'invalid' (1), to argue that disputed thing is invalid.
// Games that agree with the existing outcome are not allowed.
function verifyExecBisectionRoot(
Claim _rootClaim,
uint256 _parentIdx,
Position _parentPos,
bool _isAttack
)
internal
view
{
// The root claim of an execution trace bisection sub-game must:
// 1. Signal that the VM panicked or resulted in an invalid transition if the disputed output root
// was made by the opposing party.
// 2. Signal that the VM resulted in a valid transition if the disputed output root was made by the same party.
// If the move is a defense, the disputed output could have been made by either party. In this case, we
// need to search for the parent output to determine what the expected status byte should be.
Position disputedLeafPos = Position.wrap(Position.unwrap(_parentPos) + 1);
ClaimData storage disputed = findTraceAncestor({ _pos: disputedLeafPos, _start: _parentIdx, _global: true });
uint8 vmStatus = uint8(Claim.unwrap(_rootClaim)[0]);
if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) {
if (_isAttack || disputed.position.depth() % 2 == SPLIT_DEPTH % 2) {
// If the move is an attack, the parent output is always deemed to be disputed. In this case, we only need
// to check that the root claim signals that the VM panicked or resulted in an invalid transition.
// If the move is a defense, and the disputed output and creator of the execution trace subgame disagree,
// the root claim should also signal that the VM panicked or resulted in an invalid transition.
if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) {
revert UnexpectedRootClaim(_rootClaim);
}
} else if (vmStatus != VMStatus.unwrap(VMStatuses.VALID)) {
// The disputed output and the creator of the execution trace subgame agree. The status byte should
// have signaled that the VM succeeded.
revert UnexpectedRootClaim(_rootClaim);
}
}
......@@ -496,12 +528,12 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
returns (ClaimData storage ancestor_)
{
// Grab the trace ancestor's expected position.
Position preStateTraceAncestor = _global ? _pos.traceAncestor() : _pos.traceAncestorBounded(SPLIT_DEPTH);
Position traceAncestorPos = _global ? _pos.traceAncestor() : _pos.traceAncestorBounded(SPLIT_DEPTH);
// Walk up the DAG to find a claim that commits to the same trace index as `_pos`. It is
// guaranteed that such a claim exists.
ancestor_ = claimData[_start];
while (Position.unwrap(ancestor_.position) != Position.unwrap(preStateTraceAncestor)) {
while (Position.unwrap(ancestor_.position) != Position.unwrap(traceAncestorPos)) {
ancestor_ = claimData[ancestor_.parentIndex];
}
}
......
......@@ -154,18 +154,8 @@ library LibPosition {
// This function only works for positions that are below the upper bound.
if (_position.depth() <= _upperBoundExclusive) revert ClaimAboveSplit();
// Create a field with only the lowest unset bit of `_position` set.
Position lsb;
assembly {
lsb := and(not(_position), add(_position, 1))
}
// Find the index of the lowest unset bit within the field.
uint256 msb = lsb.depth();
assembly {
let a := shr(msb, _position)
// Bound the ancestor to the minimum gindex, 1.
ancestor_ := or(a, iszero(a))
}
// Grab the global trace ancestor.
ancestor_ = traceAncestor(_position);
// If the ancestor is above or at the upper bound, shift it to be below the upper bound.
// This should be a special case that only covers positions that commit to the final leaf
......
......@@ -16,12 +16,20 @@ import "src/libraries/DisputeTypes.sol";
abstract contract GameSolver is CommonBase {
/// @notice The `OutputBisectionGame` proxy that the `GameSolver` will be solving.
OutputBisectionGame public immutable GAME;
/// @notice The maximum length of the execution trace, in bytes. Enforced by the depth of the
/// execution trace bisection game.
uint256 internal immutable MAX_TRACE_LENGTH;
/// @notice The split depth of the game
uint256 internal immutable SPLIT_DEPTH;
/// @notice The max depth of the game
uint256 internal immutable MAX_DEPTH;
/// @notice The maximum L2 block number that the output bisection portion of the position tree
/// can handle.
uint256 internal immutable MAX_L2_BLOCK_NUMBER;
/// @notice The L2 outputs that the `GameSolver` will be representing, keyed by L2 block number - 1.
uint256[] public l2Outputs;
/// @notice The execution trace that the `GameSolver` will be representing.
bytes public trace;
/// @notice The raw absolute prestate data.
bytes public absolutePrestateData;
/// @notice The offset of previously processed claims in the `GAME` contract's `claimData` array.
/// Starts at 0 and increments by 1 for each claim processed.
uint256 public processedBuf;
......@@ -34,9 +42,7 @@ abstract contract GameSolver is CommonBase {
Attack,
Defend,
Step,
AddLocalData,
ResolveLocal,
ResolveGlobal
AddLocalData
}
/// @notice The `Move` struct represents a move in the game, and contains information
......@@ -44,14 +50,23 @@ abstract contract GameSolver is CommonBase {
/// to the `OutputBisectionGame` contract by a consumer of this contract.
struct Move {
MoveKind kind;
address sender;
bytes data;
}
constructor(OutputBisectionGame _gameProxy, bytes memory _trace) {
constructor(
OutputBisectionGame _gameProxy,
uint256[] memory _l2Outputs,
bytes memory _trace,
bytes memory _preStateData
) {
GAME = _gameProxy;
MAX_TRACE_LENGTH = 2 ** (_gameProxy.MAX_GAME_DEPTH() - _gameProxy.SPLIT_DEPTH());
SPLIT_DEPTH = GAME.SPLIT_DEPTH();
MAX_DEPTH = GAME.MAX_GAME_DEPTH();
MAX_L2_BLOCK_NUMBER = 2 ** (MAX_DEPTH - SPLIT_DEPTH);
l2Outputs = _l2Outputs;
trace = _trace;
absolutePrestateData = _preStateData;
}
/// @notice Returns an array of `Move`s that can be taken from the perspective of an honest
......@@ -72,12 +87,17 @@ contract HonestGameSolver is GameSolver {
Noop
}
constructor(OutputBisectionGame _gameProxy, bytes memory _trace) GameSolver(_gameProxy, _trace) {
constructor(
OutputBisectionGame _gameProxy,
uint256[] memory _l2Outputs,
bytes memory _trace,
bytes memory _preStateData
)
GameSolver(_gameProxy, _l2Outputs, _trace, _preStateData)
{
// Mark agreement with the root claim if the local opinion of the root claim is the same as the
// observed root claim.
if (Claim.unwrap(outputAt(MAX_TRACE_LENGTH)) == Claim.unwrap(_gameProxy.rootClaim())) {
agreeWithRoot = true;
}
agreeWithRoot = Claim.unwrap(outputAt(MAX_L2_BLOCK_NUMBER)) == Claim.unwrap(_gameProxy.rootClaim());
}
////////////////////////////////////////////////////////////////
......@@ -91,9 +111,9 @@ contract HonestGameSolver is GameSolver {
// Pre-allocate the `moves_` array to the maximum possible length. Test environment, so
// over-allocation is fine, and more easy to read than making a linked list in asm.
uint256 movesLen = 0;
moves_ = new Move[](numClaims - processedBuf);
uint256 numMoves = 0;
for (uint256 i = processedBuf; i < numClaims; i++) {
// Grab the observed claim.
IOutputBisectionGame.ClaimData memory observed = getClaimData(i);
......@@ -104,21 +124,19 @@ contract HonestGameSolver is GameSolver {
// Continue if there is no move to be taken against the observed claim.
if (moveDirection == Direction.Noop) continue;
if (movePos.depth() <= GAME.SPLIT_DEPTH()) {
// output bisection
moves_[movesLen++] = handleOutputBisectionMove(moveDirection, movePos, i);
} else if (movePos.depth() <= GAME.MAX_GAME_DEPTH()) {
// execution trace bisection
moves_[movesLen++] = handleExecutionTraceBisectionMove(moveDirection, movePos, i);
if (movePos.depth() <= MAX_DEPTH) {
// bisection
moves_[numMoves++] = handleBisectionMove(moveDirection, movePos, i);
} else {
// instruction step
moves_[movesLen++] = handleStepMove(moveDirection, movePos, i);
moves_[numMoves++] = handleStepMove(moveDirection, observed.position, movePos, i);
}
}
// Update the length of the `moves_` array to the number of moves that were added.
// Update the length of the `moves_` array to the number of moves that were added. This is
// always a no-op or a truncation operation.
assembly {
mstore(moves_, movesLen)
mstore(moves_, numMoves)
}
// Increment `processedBuf` by the number of claims processed, so that next time around,
......@@ -136,9 +154,11 @@ contract HonestGameSolver is GameSolver {
view
returns (Direction direction_, Position movePos_)
{
bool rightLevel = isRightLevel(_claimData.position);
bool localAgree = Claim.unwrap(claimAt(_claimData.position)) == Claim.unwrap(_claimData.claim);
if (_claimData.parentIndex == type(uint32).max) {
// If we agree with the parent claim and it is on a level we agree with, ignore it.
if (Claim.unwrap(claimAt(_claimData.position)) == Claim.unwrap(_claimData.claim)) {
if (localAgree && rightLevel) {
return (Direction.Noop, Position.wrap(0));
}
......@@ -146,63 +166,46 @@ contract HonestGameSolver is GameSolver {
direction_ = Direction.Attack;
movePos_ = _claimData.position.move(true);
} else {
// If the parent claim is not the root claim, check if we disagree with it and/or its grandparent
// to determine our next move.
// Fetch the local opinion of the parent claim.
Claim localParent = claimAt(_claimData.position);
// Fetch the local opinion of the grandparent claim and the grandparent claim's metadata.
IOutputBisectionGame.ClaimData memory grandparentClaimData = getClaimData(_claimData.parentIndex);
Claim localGrandparent = claimAt(grandparentClaimData.position);
if (Claim.unwrap(localParent) != Claim.unwrap(_claimData.claim)) {
// If we disagree with the observed claim, we must attack it.
movePos_ = _claimData.position.move(true);
direction_ = Direction.Attack;
} else if (
Claim.unwrap(localParent) == Claim.unwrap(_claimData.claim)
&& Claim.unwrap(localGrandparent) != Claim.unwrap(grandparentClaimData.claim)
) {
// Never defend a claim that the solver would have made.
if (isRightLevel(_claimData.position)) {
return (Direction.Noop, Position.wrap(0));
}
// Never attempt to defend an execution trace subgame root. Only attack if we disagree with it,
// otherwise do nothing.
// NOTE: This is not correct behavior in the context of the honest actor; The alphabet game has
// a constant status byte, and is not safe from someone being dishonest in output bisection
// and then posting a correct execution trace bisection root claim.
if (_claimData.position.depth() == SPLIT_DEPTH + 1 && localAgree) {
return (Direction.Noop, Position.wrap(0));
}
// If we agree with the observed claim, but disagree with the grandparent claim, we must defend
// the observed claim.
movePos_ = _claimData.position.move(false);
direction_ = Direction.Defend;
// If the parent claim is not the root claim, first check if the observed claim is on a level that
// agrees with the local view of the root claim. If it is, noop. If it is not, perform an attack or
// defense depending on the local view of the observed claim.
if (rightLevel) {
// Never move against a claim on the right level. Even if it's wrong, if it's uncountered, it furthers
// our goals.
return (Direction.Noop, Position.wrap(0));
} else {
// Fetch the local opinion of the parent claim.
Claim localParent = claimAt(_claimData.position);
// NOTE: Poison not handled.
if (Claim.unwrap(localParent) != Claim.unwrap(_claimData.claim)) {
// If we disagree with the observed claim, we must attack it.
movePos_ = _claimData.position.move(true);
direction_ = Direction.Attack;
} else {
// If we agree with the observed claim, we must defend the observed claim.
movePos_ = _claimData.position.move(false);
direction_ = Direction.Defend;
}
}
}
}
/// @notice Returns a `Move` struct that represents an attack or defense move in the output bisection
/// portion of the dispute game.
/// @notice Returns a `Move` struct that represents an attack or defense move in the bisection portion
/// of the game.
///
/// @dev Note: This function assumes that the `movePos` and `challengeIndex` are valid within the
/// output bisection context. This is enforced by the `solveGame` function.
function handleOutputBisectionMove(
Direction _direction,
Position _movePos,
uint256 _challengeIndex
)
internal
view
returns (Move memory move_)
{
bool isAttack = _direction == Direction.Attack;
move_ = Move({
kind: isAttack ? MoveKind.Attack : MoveKind.Defend,
sender: address(this), // TODO: Change to allow for alt actors?
data: abi.encodeCall(OutputBisectionGame.move, (_challengeIndex, outputAt(_movePos), isAttack))
});
}
/// @notice Returns a `Move` struct that represents an attack or defense move in the execution trace
/// bisection portion of the dispute game.
/// @dev Note: This function assumes that the `movePos` and `challengeIndex` are valid within the
/// execution trace bisection context. This is enforced by the `solveGame` function.
function handleExecutionTraceBisectionMove(
function handleBisectionMove(
Direction _direction,
Position _movePos,
uint256 _challengeIndex
......@@ -214,7 +217,6 @@ contract HonestGameSolver is GameSolver {
bool isAttack = _direction == Direction.Attack;
move_ = Move({
kind: isAttack ? MoveKind.Attack : MoveKind.Defend,
sender: address(this), // TODO: Change to allow for alt actors?
data: abi.encodeCall(OutputBisectionGame.move, (_challengeIndex, claimAt(_movePos), isAttack))
});
}
......@@ -223,9 +225,9 @@ contract HonestGameSolver is GameSolver {
/// bisection portion of the dispute game.
/// @dev Note: This function assumes that the `movePos` and `challengeIndex` are valid within the
/// execution trace bisection context. This is enforced by the `solveGame` function.
/// @dev TODO: Handle new format for `AlphabetVM` once it's been refactored for Output Bisection.
function handleStepMove(
Direction _direction,
Position _parentPos,
Position _movePos,
uint256 _challengeIndex
)
......@@ -234,32 +236,26 @@ contract HonestGameSolver is GameSolver {
returns (Move memory move_)
{
bool isAttack = _direction == Direction.Attack;
Position parentPos = _movePos.parent();
bytes memory preStateTrace;
// First, we need to find the pre/post state index depending on whether we
// are making an attack step or a defense step. If the index at depth of the
// are making an attack step or a defense step. If the relative index at depth of the
// move position is 0, the prestate is the absolute prestate and we need to
// do nothing.
if (_movePos.indexAtDepth() > 0) {
Position leafPos =
isAttack ? Position.wrap(Position.unwrap(parentPos) - 1) : Position.wrap(Position.unwrap(parentPos) + 1);
Position statePos = leafPos.traceAncestor();
if ((_movePos.indexAtDepth() % (2 ** (MAX_DEPTH - SPLIT_DEPTH))) != 0) {
// Grab the trace up to the prestate's trace index.
if (isAttack) {
preStateTrace = abi.encode(statePos.traceIndex(GAME.MAX_GAME_DEPTH()), traceAt(statePos));
Position leafPos = Position.wrap(Position.unwrap(_parentPos) - 1);
preStateTrace = abi.encode(leafPos.traceIndex(MAX_DEPTH), stateAt(leafPos));
} else {
preStateTrace = abi.encode(parentPos.traceIndex(GAME.MAX_GAME_DEPTH()), traceAt(parentPos));
preStateTrace = abi.encode(_parentPos.traceIndex(MAX_DEPTH), stateAt(_parentPos));
}
} else {
// TODO: Prestate trace value.
preStateTrace = abi.encode(0xdead);
preStateTrace = absolutePrestateData;
}
move_ = Move({
kind: MoveKind.Step,
sender: address(this), // TODO: Change to allow for alt actors?
data: abi.encodeCall(OutputBisectionGame.step, (_challengeIndex, isAttack, preStateTrace, hex""))
});
}
......@@ -286,56 +282,121 @@ contract HonestGameSolver is GameSolver {
});
}
/// @notice Returns the player's claim that commits to a given position, swapping between
/// output bisection claims and execution trace bisection claims depending on the depth.
/// @dev Prefer this function over `outputAt` or `statehashAt` directly.
function claimAt(Position _position) internal view returns (Claim claim_) {
return _position.depth() > SPLIT_DEPTH ? statehashAt(_position) : outputAt(_position);
}
/// @notice Returns the mock output at the given position.
/// @dev TODO: Variability for malicious actors?
function outputAt(Position _position) public view returns (Claim claim_) {
function outputAt(Position _position) internal view returns (Claim claim_) {
// Don't allow for positions that are deeper than the split depth.
if (_position.depth() > GAME.SPLIT_DEPTH()) {
if (_position.depth() > SPLIT_DEPTH) {
revert("GameSolver: invalid position depth");
}
return outputAt(_position.traceIndex(GAME.SPLIT_DEPTH()));
return outputAt(_position.traceIndex(SPLIT_DEPTH) + 1);
}
/// @notice Returns the mock output at the given L2 block number.
/// @dev TODO: Variability for malicious actors?
function outputAt(uint256 _l2BlockNumber) public pure returns (Claim claim_) {
return Claim.wrap(bytes32(_l2BlockNumber));
}
/// @notice Returns the state at the trace index within the player's trace.
/// @dev TODO: Separate traces per execution trace game.
function traceAt(Position _position) public view returns (uint256 state_) {
return traceAt(_position.traceIndex(GAME.MAX_GAME_DEPTH()));
}
/// @notice Returns the state at the trace index within the player's trace.
/// @dev TODO: Separate traces per execution trace game.
function traceAt(uint256 _traceIndex) public view returns (uint256 state_) {
return uint256(uint8(_traceIndex >= trace.length ? trace[trace.length - 1] : trace[_traceIndex]));
function outputAt(uint256 _l2BlockNumber) internal view returns (Claim claim_) {
return Claim.wrap(bytes32(l2Outputs[_l2BlockNumber - 1]));
}
/// @notice Returns the player's claim that commits to a given trace index.
function claimAt(uint256 _traceIndex) public view returns (Claim claim_) {
function statehashAt(uint256 _traceIndex) internal view returns (Claim claim_) {
bytes32 hash =
keccak256(abi.encode(_traceIndex >= trace.length ? trace.length - 1 : _traceIndex, traceAt(_traceIndex)));
keccak256(abi.encode(_traceIndex >= trace.length ? trace.length - 1 : _traceIndex, stateAt(_traceIndex)));
assembly {
claim_ := or(and(hash, not(shl(248, 0xFF))), shl(248, 1))
}
}
/// @notice Returns the player's claim that commits to a given trace index.
function claimAt(Position _position) public view returns (Claim claim_) {
return claimAt(_position.traceIndex(GAME.MAX_GAME_DEPTH()));
function statehashAt(Position _position) internal view returns (Claim claim_) {
return statehashAt(_position.traceIndex(MAX_DEPTH));
}
/// @notice Returns the state at the trace index within the player's trace.
function stateAt(Position _position) internal view returns (uint256 state_) {
return stateAt(_position.traceIndex(MAX_DEPTH));
}
/// @notice Returns the state at the trace index within the player's trace.
function stateAt(uint256 _traceIndex) internal view returns (uint256 state_) {
return uint256(uint8(_traceIndex >= trace.length ? trace[trace.length - 1] : trace[_traceIndex]));
}
/// @notice Returns whether or not the position is on a level which opposes the local opinion of the
/// root claim.
function isRightLevel(Position _position) public view returns (bool isRightLevel_) {
return _position.depth() % 2 == 0 && agreeWithRoot;
function isRightLevel(Position _position) internal view returns (bool isRightLevel_) {
isRightLevel_ = agreeWithRoot == (_position.depth() % 2 == 0);
}
}
// TODO: `DishonestGameSolver`. Can remove a lot of the cruft and just throw bad claims
// at the wall.
// TODO: Actors that utilize the `HonestGameSolver`
/// @title DisputeActor
/// @notice The `DisputeActor` contract is an abstract contract that represents an actor
/// that consumes the suggested moves from a `GameSolver` contract.
abstract contract DisputeActor {
/// @notice The `GameSolver` contract used to determine the moves to be taken.
GameSolver public solver;
/// @notice Performs all available moves deemed by the attached solver.
/// @return numMoves_ The number of moves that the actor took.
/// @return success_ True if all moves were successful, false otherwise.
function move() external virtual returns (uint256 numMoves_, bool success_);
}
/// @title HonestDisputeActor
/// @notice An actor that consumes the suggested moves from an `HonestGameSolver` contract. Note
/// that this actor *can* be dishonest if the trace is faulty, but it will always follow
/// the rules of the honest actor.
contract HonestDisputeActor is DisputeActor {
OutputBisectionGame public immutable GAME;
constructor(
OutputBisectionGame _gameProxy,
uint256[] memory _l2Outputs,
bytes memory _trace,
bytes memory _preStateData
) {
GAME = _gameProxy;
solver = GameSolver(new HonestGameSolver(_gameProxy, _l2Outputs, _trace, _preStateData));
}
/// @inheritdoc DisputeActor
function move() external override returns (uint256 numMoves_, bool success_) {
GameSolver.Move[] memory moves = solver.solveGame();
numMoves_ = moves.length;
// Optimistically assume success, will be set to false if any move fails.
success_ = true;
// Perform all available moves given to the actor by the solver.
for (uint256 i = 0; i < moves.length; i++) {
GameSolver.Move memory localMove = moves[i];
// If the move is a step, we first need to add the starting L2 block number to the `PreimageOracle`
// via the `OutputBisectionGame` contract.
// TODO: This is leaky. Could be another move kind.
if (localMove.kind == GameSolver.MoveKind.Step) {
bytes memory moveData = localMove.data;
uint256 challengeIndex;
assembly {
challengeIndex := mload(add(moveData, 0x24))
}
GAME.addLocalData({
_ident: LocalPreimageKey.STARTING_L2_BLOCK_NUMBER,
_execLeafIdx: challengeIndex,
_partOffset: 0
});
}
(bool innerSuccess,) = address(GAME).call(localMove.data);
assembly {
success_ := and(success_, innerSuccess)
}
}
}
}
......@@ -19,16 +19,11 @@ import { LibPosition } from "src/dispute/lib/LibPosition.sol";
import { IBigStepper, IPreimageOracle } from "src/dispute/interfaces/IBigStepper.sol";
import { AlphabetVM2 } from "test/mocks/AlphabetVM2.sol";
import { DisputeActor, HonestDisputeActor } from "test/actors/OutputBisectionActors.sol";
contract OutputBisectionGame_Init is DisputeGameFactory_Init {
/// @dev The type of the game being tested.
GameType internal constant GAME_TYPE = GameType.wrap(0);
/// @dev The L2 Block Number for the game's proposed output (the root claim)
uint256 internal constant L2_BLOCK_NUMBER = 0x0a;
/// @dev The genesis block number configured for the output bisection portion of the game.
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.
OutputBisectionGame internal gameImpl;
......@@ -40,12 +35,20 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
event Move(uint256 indexed parentIndex, Claim indexed pivot, address indexed claimant);
function init(Claim rootClaim, Claim absolutePrestate) public {
function init(
Claim rootClaim,
Claim absolutePrestate,
uint256 l2BlockNumber,
uint256 genesisBlockNumber,
Hash genesisOutputRoot
)
public
{
// Set the time to a realistic date.
vm.warp(1690906994);
// Set the extra data for the game creation
extraData = abi.encode(L2_BLOCK_NUMBER);
extraData = abi.encode(l2BlockNumber);
AlphabetVM2 _vm = new AlphabetVM2(absolutePrestate);
......@@ -53,8 +56,8 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
gameImpl = new OutputBisectionGame({
_gameType: GAME_TYPE,
_absolutePrestate: absolutePrestate,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_genesisBlockNumber: genesisBlockNumber,
_genesisOutputRoot: genesisOutputRoot,
_maxGameDepth: 2 ** 3,
_splitDepth: 2 ** 2,
_gameDuration: Duration.wrap(7 days),
......@@ -68,8 +71,8 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
// 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.GENESIS_BLOCK_NUMBER(), genesisBlockNumber);
assertEq(Hash.unwrap(gameProxy.GENESIS_OUTPUT_ROOT()), Hash.unwrap(genesisOutputRoot));
assertEq(gameProxy.MAX_GAME_DEPTH(), 2 ** 3);
assertEq(gameProxy.SPLIT_DEPTH(), 2 ** 2);
assertEq(Duration.unwrap(gameProxy.GAME_DURATION()), 7 days);
......@@ -88,7 +91,13 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
function setUp() public override {
super.setUp();
super.init(ROOT_CLAIM, ABSOLUTE_PRESTATE);
super.init({
rootClaim: ROOT_CLAIM,
absolutePrestate: ABSOLUTE_PRESTATE,
l2BlockNumber: 0x10,
genesisBlockNumber: 0,
genesisOutputRoot: Hash.wrap(bytes32(0))
});
}
////////////////////////////////////////////////////////////////
......@@ -109,8 +118,8 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
new OutputBisectionGame({
_gameType: GAME_TYPE,
_absolutePrestate: ABSOLUTE_PRESTATE,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_genesisBlockNumber: 0,
_genesisOutputRoot: Hash.wrap(bytes32(0)),
_maxGameDepth: 2 ** 3,
_splitDepth: _splitDepth,
_gameDuration: Duration.wrap(7 days),
......@@ -125,9 +134,9 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
new OutputBisectionGame({
_gameType: GAME_TYPE,
_absolutePrestate: ABSOLUTE_PRESTATE,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_maxGameDepth: 2 ** 3,
_genesisBlockNumber: 0,
_genesisOutputRoot: Hash.wrap(bytes32(0)),
_splitDepth: _splitDepth,
_gameDuration: Duration.wrap(7 days),
_vm: alphabetVM
......@@ -547,7 +556,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
gameProxy.attack(4, _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC));
// Expected start/disputed claims
bytes32 startingClaim = Hash.unwrap(GENESIS_OUTPUT_ROOT);
bytes32 startingClaim = Hash.unwrap(gameProxy.GENESIS_OUTPUT_ROOT());
bytes32 disputedClaim = bytes32(uint256(3));
Position disputedPos = LibPosition.wrap(4, 0);
......@@ -584,7 +593,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, Claim.wrap(bytes32(i)));
}
gameProxy.defend(4, ROOT_CLAIM);
gameProxy.defend(4, _changeClaimStatus(ROOT_CLAIM, VMStatuses.VALID));
// Expected start/disputed claims
bytes32 startingClaim = bytes32(uint256(3));
......@@ -632,11 +641,551 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
bytes32 h = keccak256(abi.encode(_ident | (1 << 248), address(gameProxy), _localContext));
return bytes32((uint256(h) & ~uint256(0xFF << 248)) | (1 << 248));
}
}
contract OutputBisection_1v1_Actors_Test is OutputBisectionGame_Init {
/// @dev The honest actor
DisputeActor internal honest;
/// @dev The dishonest actor
DisputeActor internal dishonest;
function setUp() public override {
// Setup the `OutputBisectionGame`
super.setUp();
}
/// @notice Fuzz test for a 1v1 output bisection dispute.
/// @dev The alphabet game has a constant status byte, and is not safe from someone being dishonest in
/// output bisection and then posting a correct execution trace bisection root claim. This test
/// does not cover this case (i.e. root claim of output bisection is dishonest, root claim of
/// execution trace bisection is made by the dishonest actor but is honest, honest actor cannot
/// attack it without risk of losing).
function testFuzz_outputBisection1v1honestRoot_succeeds(uint8 _divergeOutput, uint8 _divergeStep) public {
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
uint256 divergeAtOutput = bound(_divergeOutput, 0, 15);
uint256 divergeAtStep = bound(_divergeStep, 0, 7);
uint256 divergeStepOffset = (divergeAtOutput << 4) + divergeAtStep;
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i >= divergeAtOutput ? 0xFF : i + 1;
}
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = i >= divergeStepOffset ? bytes1(uint8(0xFF)) : bytes1(uint8(i));
}
// Run the actor test
_actorTest({
_rootClaim: 16,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.DEFENDER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1honestRootGenesisAbsolutePrestate_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are from [2, 17] in this game.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i + 2;
}
// The dishonest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of all set bits.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = bytes1(0xFF);
}
// Run the actor test
_actorTest({
_rootClaim: 16,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.DEFENDER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1dishonestRootGenesisAbsolutePrestate_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are from [2, 17] in this game.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i + 2;
}
// The dishonest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of all set bits.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = bytes1(0xFF);
}
// Run the actor test
_actorTest({
_rootClaim: 17,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.CHALLENGER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1honestRoot_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are from [2, 17] in this game.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i + 2;
}
// The dishonest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of all zeros.
bytes memory dishonestTrace = new bytes(256);
// Run the actor test
_actorTest({
_rootClaim: 16,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.DEFENDER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1dishonestRoot_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are from [2, 17] in this game.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i + 2;
}
// The dishonest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of all zeros.
bytes memory dishonestTrace = new bytes(256);
// Run the actor test
_actorTest({
_rootClaim: 17,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.CHALLENGER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1correctRootHalfWay_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are half correct, half incorrect.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i > 7 ? 0xFF : i + 1;
}
// The dishonest trace is half correct, half incorrect.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = i > (127 + 4) ? bytes1(0xFF) : bytes1(uint8(i));
}
// Run the actor test
_actorTest({
_rootClaim: 16,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.DEFENDER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1dishonestRootHalfWay_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are half correct, half incorrect.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i > 7 ? 0xFF : i + 1;
}
// The dishonest trace is half correct, half incorrect.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = i > (127 + 4) ? bytes1(0xFF) : bytes1(uint8(i));
}
// Run the actor test
_actorTest({
_rootClaim: 0xFF,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.CHALLENGER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1correctAbsolutePrestate_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are half correct, half incorrect.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i > 7 ? 0xFF : i + 1;
}
// The dishonest trace correct is half correct, half incorrect.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = i > 127 ? bytes1(0xFF) : bytes1(uint8(i));
}
// Run the actor test
_actorTest({
_rootClaim: 16,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.DEFENDER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1dishonestAbsolutePrestate_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are half correct, half incorrect.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i > 7 ? 0xFF : i + 1;
}
// The dishonest trace correct is half correct, half incorrect.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = i > 127 ? bytes1(0xFF) : bytes1(uint8(i));
}
// Run the actor test
_actorTest({
_rootClaim: 0xFF,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.CHALLENGER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1honestRootFinalInstruction_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are half correct, half incorrect.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i > 7 ? 0xFF : i + 1;
}
// The dishonest trace is half correct, and correct all the way up to the final instruction of the exec
// subgame.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = i > (127 + 7) ? bytes1(0xFF) : bytes1(uint8(i));
}
// Run the actor test
_actorTest({
_rootClaim: 16,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.DEFENDER_WINS
});
}
/// @notice Static unit test for a 1v1 output bisection dispute.
function test_static_1v1dishonestRootFinalInstruction_succeeds() public {
// The honest l2 outputs are from [1, 16] in this game.
uint256[] memory honestL2Outputs = new uint256[](16);
for (uint256 i; i < honestL2Outputs.length; i++) {
honestL2Outputs[i] = i + 1;
}
// The honest trace covers all block -> block + 1 transitions, and is 256 bytes long, consisting
// of bytes [0, 255].
bytes memory honestTrace = new bytes(256);
for (uint256 i; i < honestTrace.length; i++) {
honestTrace[i] = bytes1(uint8(i));
}
// The dishonest l2 outputs are half correct, half incorrect.
uint256[] memory dishonestL2Outputs = new uint256[](16);
for (uint256 i; i < dishonestL2Outputs.length; i++) {
dishonestL2Outputs[i] = i > 7 ? 0xFF : i + 1;
}
// The dishonest trace is half correct, and correct all the way up to the final instruction of the exec
// subgame.
bytes memory dishonestTrace = new bytes(256);
for (uint256 i; i < dishonestTrace.length; i++) {
dishonestTrace[i] = i > (127 + 7) ? bytes1(0xFF) : bytes1(uint8(i));
}
// Run the actor test
_actorTest({
_rootClaim: 0xFF,
_absolutePrestateData: 0,
_honestTrace: honestTrace,
_honestL2Outputs: honestL2Outputs,
_dishonestTrace: dishonestTrace,
_dishonestL2Outputs: dishonestL2Outputs,
_expectedStatus: GameStatus.CHALLENGER_WINS
});
}
////////////////////////////////////////////////////////////////
// HELPERS //
////////////////////////////////////////////////////////////////
/// @dev Helper to run a 1v1 actor test
function _actorTest(
uint256 _rootClaim,
uint256 _absolutePrestateData,
bytes memory _honestTrace,
uint256[] memory _honestL2Outputs,
bytes memory _dishonestTrace,
uint256[] memory _dishonestL2Outputs,
GameStatus _expectedStatus
)
internal
{
// Setup the environment
bytes memory absolutePrestateData =
_setup({ _absolutePrestateData: _absolutePrestateData, _rootClaim: _rootClaim });
// Create actors
_createActors({
_honestTrace: _honestTrace,
_honestPreStateData: absolutePrestateData,
_honestL2Outputs: _honestL2Outputs,
_dishonestTrace: _dishonestTrace,
_dishonestPreStateData: absolutePrestateData,
_dishonestL2Outputs: _dishonestL2Outputs
});
// Exhaust all moves from both actors
_exhaustMoves();
// Resolve the game and assert that the defender won
_warpAndResolve();
assertEq(uint8(gameProxy.status()), uint8(_expectedStatus));
}
/// @dev Helper to setup the 1v1 test
function _setup(
uint256 _absolutePrestateData,
uint256 _rootClaim
)
internal
returns (bytes memory absolutePrestateData_)
{
absolutePrestateData_ = abi.encode(_absolutePrestateData);
Claim absolutePrestateExec =
_changeClaimStatus(Claim.wrap(keccak256(absolutePrestateData_)), VMStatuses.UNFINISHED);
Claim rootClaim = Claim.wrap(bytes32(uint256(_rootClaim)));
super.init({
rootClaim: rootClaim,
absolutePrestate: absolutePrestateExec,
l2BlockNumber: _rootClaim,
genesisBlockNumber: 0,
genesisOutputRoot: Hash.wrap(bytes32(0))
});
}
/// @dev Helper to change the VM status byte of a claim.
function _changeClaimStatus(Claim _claim, VMStatus _status) public pure returns (Claim out_) {
assembly {
out_ := or(and(not(shl(248, 0xFF)), _claim), shl(248, _status))
/// @dev Helper to create actors for the 1v1 dispute.
function _createActors(
bytes memory _honestTrace,
bytes memory _honestPreStateData,
uint256[] memory _honestL2Outputs,
bytes memory _dishonestTrace,
bytes memory _dishonestPreStateData,
uint256[] memory _dishonestL2Outputs
)
internal
{
honest = new HonestDisputeActor({
_gameProxy: gameProxy,
_l2Outputs: _honestL2Outputs,
_trace: _honestTrace,
_preStateData: _honestPreStateData
});
dishonest = new HonestDisputeActor({
_gameProxy: gameProxy,
_l2Outputs: _dishonestL2Outputs,
_trace: _dishonestTrace,
_preStateData: _dishonestPreStateData
});
vm.label(address(honest), "HonestActor");
vm.label(address(dishonest), "DishonestActor");
}
/// @dev Helper to exhaust all moves from both actors.
function _exhaustMoves() internal {
while (true) {
// Allow the dishonest actor to make their moves, and then the honest actor.
(uint256 numMovesA,) = dishonest.move();
(uint256 numMovesB, bool success) = honest.move();
require(success, "Honest actor's moves should always be successful");
// If both actors have run out of moves, we're done.
if (numMovesA == 0 && numMovesB == 0) break;
}
}
/// @dev Helper to warp past the chess clock and resolve all claims within the dispute game.
function _warpAndResolve() internal {
// Warp past the chess clock
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve all claims in reverse order. We allow `resolveClaim` calls to fail due to
// the check that prevents claims with no subgames attached from being passed to
// `resolveClaim`. There's also a check in `resolve` to ensure all children have been
// resolved before global resolution, which catches any unresolved subgames here.
for (uint256 i = gameProxy.claimDataLen(); i > 0; i--) {
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1)));
success;
}
gameProxy.resolve();
}
}
/// @dev Helper to change the VM status byte of a claim.
function _changeClaimStatus(Claim _claim, VMStatus _status) pure returns (Claim out_) {
assembly {
out_ := or(and(not(shl(248, 0xFF)), _claim), shl(248, _status))
}
}
......@@ -2,11 +2,12 @@
pragma solidity ^0.8.15;
import { IBigStepper, IPreimageOracle } from "src/dispute/interfaces/IBigStepper.sol";
import { PreimageOracle } from "src/cannon/PreimageOracle.sol";
import { PreimageOracle, PreimageKeyLib } from "src/cannon/PreimageOracle.sol";
import "src/libraries/DisputeTypes.sol";
/// @title AlphabetVM2
/// @dev A mock VM for the purpose of testing the dispute game infrastructure.
/// @dev A mock VM for the purpose of testing the dispute game infrastructure. Note that this only works
/// for games with an execution trace subgame max depth of 3 (8 instructions per subgame).
contract AlphabetVM2 is IBigStepper {
Claim internal immutable ABSOLUTE_PRESTATE;
IPreimageOracle public oracle;
......@@ -23,23 +24,29 @@ contract AlphabetVM2 is IBigStepper {
bytes32 _localContext
)
external
view
returns (bytes32 postState_)
{
uint256 traceIndex;
uint256 claim;
if ((keccak256(_stateData) << 8) == (Claim.unwrap(ABSOLUTE_PRESTATE) << 8)) {
// If the state data is empty, then the absolute prestate is the claim.
traceIndex = 0;
(claim) = abi.decode(_stateData, (uint256));
claim = claim + uint256(oracle.loadLocalData(4, _localContext, 0, 32, 0));
(bytes32 dat,) = oracle.readPreimage(
PreimageKeyLib.localizeIdent(LocalPreimageKey.STARTING_L2_BLOCK_NUMBER, _localContext), 0
);
uint256 startingL2BlockNumber = (uint256(dat) >> 128) & 0xFFFFFFFF;
traceIndex = startingL2BlockNumber << 4;
(uint256 absolutePrestateClaim) = abi.decode(_stateData, (uint256));
claim = absolutePrestateClaim + traceIndex;
} else {
// Otherwise, decode the state data.
(traceIndex, claim) = abi.decode(_stateData, (uint256, uint256));
traceIndex++;
claim++;
}
// STF: n -> n + 1
postState_ = keccak256(abi.encode(traceIndex, claim + 1));
postState_ = keccak256(abi.encode(traceIndex, claim));
assembly {
postState_ := or(and(postState_, not(shl(248, 0xFF))), shl(248, 1))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment