Commit b13db0ad authored by clabby's avatar clabby

Update local key loading + handle attack on genesis

parent ec2667bb
...@@ -30,8 +30,8 @@ var ( ...@@ -30,8 +30,8 @@ var (
// OutputBisectionGameMetaData contains all meta data concerning the OutputBisectionGame contract. // OutputBisectionGameMetaData contains all meta data concerning the OutputBisectionGame contract.
var OutputBisectionGameMetaData = &bind.MetaData{ var OutputBisectionGameMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"GameType\",\"name\":\"_gameType\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_genesisBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxGameDepth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_splitDepth\",\"type\":\"uint256\"},{\"internalType\":\"Duration\",\"name\":\"_gameDuration\",\"type\":\"uint64\"},{\"internalType\":\"contractIBigStepper\",\"name\":\"_vm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotDefendRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAboveSplit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyResolved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockTimeExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameDepthExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameNotInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLocalIdent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrestate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSplitDepth\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfOrderResolution\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim\",\"type\":\"bytes32\"}],\"name\":\"UnexpectedRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValidStep\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"parentIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimant\",\"type\":\"address\"}],\"name\":\"Move\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGameStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"Resolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_PRESTATE\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAME_DURATION\",\"outputs\":[{\"internalType\":\"Duration\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENESIS_BLOCK_NUMBER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_GAME_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SPLIT_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VM\",\"outputs\":[{\"internalType\":\"contractIBigStepper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ident\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_execLeafIdx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"}],\"name\":\"addLocalData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"attack\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bondManager\",\"outputs\":[{\"internalType\":\"contractIBondManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimData\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"parentIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"countered\",\"type\":\"bool\"},{\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"internalType\":\"Position\",\"name\":\"position\",\"type\":\"uint128\"},{\"internalType\":\"Clock\",\"name\":\"clock\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDataLen\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"len_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"defend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameData\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameType\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1Head\",\"outputs\":[{\"internalType\":\"Hash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"l2BlockNumber_\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"}],\"name\":\"move\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"status_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"}],\"name\":\"resolveClaim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolvedAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rootClaim\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[{\"internalType\":\"GameType\",\"name\":\"_gameType\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_genesisBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"Hash\",\"name\":\"_genesisOutputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxGameDepth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_splitDepth\",\"type\":\"uint256\"},{\"internalType\":\"Duration\",\"name\":\"_gameDuration\",\"type\":\"uint64\"},{\"internalType\":\"contractIBigStepper\",\"name\":\"_vm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotDefendRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAboveSplit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyResolved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockTimeExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameDepthExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameNotInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLocalIdent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrestate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSplitDepth\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfOrderResolution\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim\",\"type\":\"bytes32\"}],\"name\":\"UnexpectedRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValidStep\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"parentIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimant\",\"type\":\"address\"}],\"name\":\"Move\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGameStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"Resolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_PRESTATE\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAME_DURATION\",\"outputs\":[{\"internalType\":\"Duration\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENESIS_BLOCK_NUMBER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENESIS_OUTPUT_ROOT\",\"outputs\":[{\"internalType\":\"Hash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_GAME_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SPLIT_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VM\",\"outputs\":[{\"internalType\":\"contractIBigStepper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ident\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_execLeafIdx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"}],\"name\":\"addLocalData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"attack\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bondManager\",\"outputs\":[{\"internalType\":\"contractIBondManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimData\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"parentIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"countered\",\"type\":\"bool\"},{\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"internalType\":\"Position\",\"name\":\"position\",\"type\":\"uint128\"},{\"internalType\":\"Clock\",\"name\":\"clock\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDataLen\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"len_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"defend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameData\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameType\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"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\":\"settlementHead\",\"outputs\":[{\"internalType\":\"Hash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"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: "0x6101606040523480156200001257600080fd5b5060405162002cab38038062002cab833981016040819052620000359162000091565b838310620000565760405163e62ccf3960e01b815260040160405180910390fd5b60ff909616610140526080949094526101209290925260a05260c0526001600160401b031660e0526001600160a01b03166101005262000129565b600080600080600080600060e0888a031215620000ad57600080fd5b875160ff81168114620000bf57600080fd5b602089015160408a015160608b015160808c015160a08d0151949b50929950909750955093506001600160401b0381168114620000fb57600080fd5b60c08901519092506001600160a01b03811681146200011957600080fd5b8091505092959891949750929550565b60805160a05160c05160e051610100516101205161014051612acc620001df600039600081816104d70152611b7c0152600081816104030152611a4a0152600081816104a10152818161145301526117a401526000818161055001528181610c680152611c7301526000818161024901528181610ac9015281816121840152818161228c015261236701526000818161033b015281816109c701526111ec01526000818161028b01526113480152612acc6000f3fe6080604052600436106101ac5760003560e01c80638129fc1c116100ec578063c55cd0c71161008a578063d8cc1a3c11610064578063d8cc1a3c1461060a578063f8f43ff61461062a578063fa24f7431461064a578063fdffbb281461066e57600080fd5b8063c55cd0c714610572578063c6f0308c14610585578063cf09e0d0146105e957600080fd5b806392931298116100c6578063929312981461048f578063bbdc02db146104c3578063bcef3b5514610501578063c31b29ce1461053e57600080fd5b80638129fc1c146104255780638980e0cc1461043a5780638b85902b1461044f57600080fd5b8063363cc42711610159578063609d333411610133578063609d3334146103b3578063632247ea146103c85780636361506d146103db5780636737abeb146103f157600080fd5b8063363cc427146102d75780634778efe81461032957806354fd4d501461035d57600080fd5b8063266198f91161018a578063266198f9146102795780632810e1d6146102ad57806335fef567146102c257600080fd5b806319effeb4146101b1578063200d2ed2146101fc57806324185bc614610237575b600080fd5b3480156101bd57600080fd5b506000546101de9068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561020857600080fd5b5060005461022a90700100000000000000000000000000000000900460ff1681565b6040516101f391906125a0565b34801561024357600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f3565b34801561028557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b957600080fd5b5061022a610681565b6102d56102d03660046125e1565b610852565b005b3480156102e357600080fd5b506001546103049073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b34801561033557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036957600080fd5b506103a66040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101f3919061266e565b3480156103bf57600080fd5b506103a6610862565b6102d56103d636600461269d565b610874565b3480156103e757600080fd5b5061026b60025481565b3480156103fd57600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561043157600080fd5b506102d5610f6d565b34801561044657600080fd5b5060035461026b565b34801561045b57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561026b565b34801561049b57600080fd5b506103047f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b34801561050d57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561026b565b34801561054a57600080fd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b6102d56105803660046125e1565b6110be565b34801561059157600080fd5b506105a56105a03660046126d2565b6110ca565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f3565b3480156105f557600080fd5b506000546101de9067ffffffffffffffff1681565b34801561061657600080fd5b506102d5610625366004612734565b61113b565b34801561063657600080fd5b506102d56106453660046127be565b6116d7565b34801561065657600080fd5b5061065f611b7a565b6040516101f3939291906127ea565b6102d561067c3660046126d2565b611bd7565b600080600054700100000000000000000000000000000000900460ff1660028111156106af576106af612571565b146106e6576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610722576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061073657610736612815565b6000918252602090912060039091020154640100000000900460ff1661075d576002610760565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561081157610811612571565b02179055600281111561082657610826612571565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61085e82826000610874565b5050565b606061086f602080611f11565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108a0576108a0612571565b146108d7576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156108e3575080155b1561091a576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092f5761092f612815565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193506109c391908590611fa816565b90507f0000000000000000000000000000000000000000000000000000000000000000610a82826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610ac4576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aef7f00000000000000000000000000000000000000000000000000000000000000006001612873565b610b8b826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610ba457610ba48486611fb0565b815160009063ffffffff90811614610c04576003836000015163ffffffff1681548110610bd357610bd3612815565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c3d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c519190612873565b610c5b919061288b565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610cce576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d4c576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610ec257610ec2612815565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f239060019061288b565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610ff27ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110b8904361288b565b40600255565b61085e82826001610874565b600381815481106110da57600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561116757611167612571565b1461119e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111b3576111b3612815565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112127f00000000000000000000000000000000000000000000000000000000000000006001612873565b6112ae826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112ef576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080891561137257611313836fffffffffffffffffffffffffffffffff16612009565b67ffffffffffffffff16156113465761133d6113306001866128a2565b865463ffffffff166120af565b60010154611368565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061138c565b8460010154915061138984600161133091906128d3565b90505b600882901b60088a8a6040516113a3929190612907565b6040518091039020901b146113e4576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113f08d61214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a001604051602081830303815290604052805190602001209050600084600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328f8f8f8f886040518663ffffffff1660e01b81526004016114b2959493929190612960565b6020604051808303816000875af11580156114d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f5919061299a565b6002878101549290911492506000916115a0906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163c8b6fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61164691906129b3565b61165091906129d4565b67ffffffffffffffff161590508115158103611698576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505087547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790975550505050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561170357611703612571565b1461173a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806117468461214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a00160405160208183030381529060405280519060200120905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118319190612a22565b9050866001036118f3576002546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061299a565b50611b71565b866002036119705760018401546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b866003036119ed5760018301546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b86600403611ac657600284015473ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad908990859060c090611a3a906fffffffffffffffffffffffffffffffff16612009565b611a6e9067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612873565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945260248401929092521b6044820152600860648201526084810188905260a4016118aa565b86600503611b3f576040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101889052602481018390524660c01b6044820152600860648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bd0610862565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c0357611c03612571565b14611c3a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c4f57611c4f612815565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cbf90700100000000000000000000000000000000900467ffffffffffffffff164261288b565b6002830154611cef9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612873565b11611d26576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d44575060065460ff165b15611d7b576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611d8957508215155b15611dc0576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611e8e576000838281548110611de157611de1612815565b6000918252602080832090910154808352600590915260409091205490915015611e37576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e4c57611e4c612815565b600091825260209091206003909102018054909150640100000000900460ff16611e7b57600193505050611e8e565b505080611e8790612a58565b9050611dc4565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ed791612537565b83600003611f0b57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f4884367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612873565b90508267ffffffffffffffff1667ffffffffffffffff811115611f6d57611f6d612a90565b6040519080825280601f01601f191660200182016040528015611f97576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600082901a6001811480611fc7575060ff81166002145b612004576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810184905260240160405180910390fd5b505050565b600080612096837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120cd846fffffffffffffffffffffffffffffffff1661248b565b9050600383815481106120e2576120e2612815565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461214557815460038054909163ffffffff1690811061213057612130612815565b906000526020600020906003020191506120f3565b5092915050565b600080600083905060006003828154811061216957612169612815565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612240906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612281576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612348906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082146123c357825463ffffffff1661238d7f00000000000000000000000000000000000000000000000000000000000000006001612873565b8303612397578391505b600381815481106123aa576123aa612815565b9060005260206000209060030201935080945050612285565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816123f08460011c90565b6fffffffffffffffffffffffffffffffff1614905080156124495761241f6124196001846128a2565b886120af565b98506003878154811061243457612434612815565b9060005260206000209060030201975061247f565b6003878154811061245c5761245c612815565b9060005260206000209060030201985061247c82600161241991906128d3565b97505b50505050505050915091565b6000811960018301168161251f827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906125559190612558565b50565b5b8082111561256d5760008155600101612559565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106125db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b600080604083850312156125f457600080fd5b50508035926020909101359150565b6000815180845260005b818110156126295760208185018101518683018201520161260d565b8181111561263b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006126816020830184612603565b9392505050565b8035801515811461269857600080fd5b919050565b6000806000606084860312156126b257600080fd5b83359250602084013591506126c960408501612688565b90509250925092565b6000602082840312156126e457600080fd5b5035919050565b60008083601f8401126126fd57600080fd5b50813567ffffffffffffffff81111561271557600080fd5b60208301915083602082850101111561272d57600080fd5b9250929050565b6000806000806000806080878903121561274d57600080fd5b8635955061275d60208801612688565b9450604087013567ffffffffffffffff8082111561277a57600080fd5b6127868a838b016126eb565b9096509450606089013591508082111561279f57600080fd5b506127ac89828a016126eb565b979a9699509497509295939492505050565b6000806000606084860312156127d357600080fd5b505081359360208301359350604090920135919050565b60ff8416815282602082015260606040820152600061280c6060830184612603565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561288657612886612844565b500190565b60008282101561289d5761289d612844565b500390565b60006fffffffffffffffffffffffffffffffff838116908316818110156128cb576128cb612844565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156128fe576128fe612844565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612974606083018789612917565b8281036020840152612987818688612917565b9150508260408301529695505050505050565b6000602082840312156129ac57600080fd5b5051919050565b600067ffffffffffffffff838116908316818110156128cb576128cb612844565b600067ffffffffffffffff80841680612a16577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612a3457600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461268157600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8957612a89612844565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a", Bin: "0x6101806040523480156200001257600080fd5b5060405162002e6938038062002e69833981016040819052620000359162000098565b838310620000565760405163e62ccf3960e01b815260040160405180910390fd5b60ff90971661016052608095909552610120939093526101409190915260a05260c0526001600160401b031660e0526001600160a01b0316610100526200013a565b600080600080600080600080610100898b031215620000b657600080fd5b885160ff81168114620000c857600080fd5b60208a015160408b015160608c015160808d015160a08e015160c08f0151959d50939b509199509750955093506001600160401b03811681146200010b57600080fd5b60e08a01519092506001600160a01b03811681146200012957600080fd5b809150509295985092959890939650565b60805160a05160c05160e05161010051610120516101405161016051612c6062000209600039600081816104e20152611b9a01526000818161060601526124c50152600081816103f8015281816119d20152611a0801526000818161049601528181611438015261174801526000818161055b01528181610ca60152611c9101526000818161025401528181610b08015281816121cf015281816122d701526123b301526000818161034601528181610a06015261122a01526000818161029601526113860152612c606000f3fe6080604052600436106101b75760003560e01c80638b85902b116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638b85902b146104445780639293129814610484578063a85c3381146104b857600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636737abeb146103e65780638129fc1c1461041a5780638980e0cc1461042f57600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612734565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612775565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612802565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612831565b6108b3565b3480156103f257600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561042657600080fd5b506102e0610fab565b34801561043b57600080fd5b50600354610276565b34801561045057600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b34801561049057600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c457600080fd5b5061027660025481565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612775565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612866565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e06106643660046128c8565b611179565b34801561067557600080fd5b506102e0610684366004612952565b6116ba565b34801561069557600080fd5b5061069e611b98565b6040516101fe9392919061297e565b6102e06106bb366004612866565b611bf5565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612705565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600081548110610775576107756129a9565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612705565b02179055600281111561086557610865612705565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f2f565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612705565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e6129a9565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a0291908590611fc616565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612a07565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be284611fce565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c116129a9565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612a07565b610c999190612a1f565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f006129a9565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612a1f565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612a1f565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612705565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f16129a9565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612a07565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113b057611351836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff16156113845761137b61136e600186612a36565b865463ffffffff166120c8565b600101546113a6565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113ca565b846001015491506113c784600161136e9190612a67565b90505b600882901b60088a8a6040516113e1929190612a9b565b6040518091039020901b14611422576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061142d8c612165565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b8152600401611497959493929190612af4565b6020604051808303816000875af11580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612b2e565b600285810154929091149250600091611585906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611621896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61162b9190612b47565b6116359190612b68565b67ffffffffffffffff16159050811515810361167d576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116e6576116e6612705565b1461171d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061172c86612194565b935093509350935060006117428585858561255f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190612bb6565b905088600103611897576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190612b2e565b50611b8d565b8860020361190e576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600303611985576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600403611ae25760006fffffffffffffffffffffffffffffffff861615611a06576119c2866fffffffffffffffffffffffffffffffff16612022565b6119f69067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612a07565b611a01906001612a07565b611a28565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adb9190612b2e565b5050611b8d565b88600503611b5b576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bee6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c2157611c21612705565b14611c58576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c6d57611c6d6129a9565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cdd90700100000000000000000000000000000000900467ffffffffffffffff1642612a1f565b6002830154611d0d9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612a07565b11611d44576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d62575060065460ff165b15611d99576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611da757508215155b15611dde576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611eac576000838281548110611dff57611dff6129a9565b6000918252602080832090910154808352600590915260409091205490915015611e55576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e6a57611e6a6129a9565b600091825260209091206003909102018054909150640100000000900460ff16611e9957600193505050611eac565b505080611ea590612bec565b9050611de2565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ef5916126cb565b83600003611f2957600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f6684367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612a07565b90508267ffffffffffffffff1667ffffffffffffffff811115611f8b57611f8b612c24565b6040519080825280601f01601f191660200182016040528015611fb5576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480611fe5575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6000806120af837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120e6846fffffffffffffffffffffffffffffffff1661261f565b9050600383815481106120fb576120fb6129a9565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461215e57815460038054909163ffffffff16908110612149576121496129a9565b9060005260206000209060030201915061210c565b5092915050565b600080600080600061217686612194565b935093509350935061218a8484848461255f565b9695505050505050565b60008060008060008590506000600382815481106121b4576121b46129a9565b600091825260209091206002600390920201908101549091507f00000000000000000000000000000000000000000000000000000000000000009061228b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116122cc576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612393906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082111561240f57825463ffffffff166123d97f00000000000000000000000000000000000000000000000000000000000000006001612a07565b83036123e3578391505b600381815481106123f6576123f66129a9565b90600052602060002090600302019350809450506122d0565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161243c8460011c90565b6fffffffffffffffffffffffffffffffff16149050801561250d576000612474836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff1611156124c357600061249a612494600185612a36565b896120c8565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506124e79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612551565b600061251d612494846001612a67565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036125c65782826040516020016125a99291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052805190602001209050612617565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081196001830116816126b3827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906126e991906126ec565b50565b5b8082111561270157600081556001016126ed565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061276f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561278857600080fd5b50508035926020909101359150565b6000815180845260005b818110156127bd576020818501810151868301820152016127a1565b818111156127cf576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006128156020830184612797565b9392505050565b8035801515811461282c57600080fd5b919050565b60008060006060848603121561284657600080fd5b833592506020840135915061285d6040850161281c565b90509250925092565b60006020828403121561287857600080fd5b5035919050565b60008083601f84011261289157600080fd5b50813567ffffffffffffffff8111156128a957600080fd5b6020830191508360208285010111156128c157600080fd5b9250929050565b600080600080600080608087890312156128e157600080fd5b863595506128f16020880161281c565b9450604087013567ffffffffffffffff8082111561290e57600080fd5b61291a8a838b0161287f565b9096509450606089013591508082111561293357600080fd5b5061294089828a0161287f565b979a9699509497509295939492505050565b60008060006060848603121561296757600080fd5b505081359360208301359350604090920135919050565b60ff841681528260208201526060604082015260006129a06060830184612797565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a1a57612a1a6129d8565b500190565b600082821015612a3157612a316129d8565b500390565b60006fffffffffffffffffffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612a9257612a926129d8565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612b08606083018789612aab565b8281036020840152612b1b818688612aab565b9150508260408301529695505050505050565b600060208284031215612b4057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b600067ffffffffffffffff80841680612baa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612bc857600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461281557600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c1d57612c1d6129d8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a",
} }
// OutputBisectionGameABI is the input ABI used to generate the binding from. // OutputBisectionGameABI is the input ABI used to generate the binding from.
...@@ -43,7 +43,7 @@ var OutputBisectionGameABI = OutputBisectionGameMetaData.ABI ...@@ -43,7 +43,7 @@ var OutputBisectionGameABI = OutputBisectionGameMetaData.ABI
var OutputBisectionGameBin = OutputBisectionGameMetaData.Bin var OutputBisectionGameBin = OutputBisectionGameMetaData.Bin
// DeployOutputBisectionGame deploys a new Ethereum contract, binding an instance of OutputBisectionGame to it. // DeployOutputBisectionGame deploys a new Ethereum contract, binding an instance of OutputBisectionGame to it.
func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBackend, _gameType uint8, _absolutePrestate [32]byte, _genesisBlockNumber *big.Int, _maxGameDepth *big.Int, _splitDepth *big.Int, _gameDuration uint64, _vm common.Address) (common.Address, *types.Transaction, *OutputBisectionGame, error) { func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBackend, _gameType uint8, _absolutePrestate [32]byte, _genesisBlockNumber *big.Int, _genesisOutputRoot [32]byte, _maxGameDepth *big.Int, _splitDepth *big.Int, _gameDuration uint64, _vm common.Address) (common.Address, *types.Transaction, *OutputBisectionGame, error) {
parsed, err := OutputBisectionGameMetaData.GetAbi() parsed, err := OutputBisectionGameMetaData.GetAbi()
if err != nil { if err != nil {
return common.Address{}, nil, nil, err return common.Address{}, nil, nil, err
...@@ -52,7 +52,7 @@ func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBac ...@@ -52,7 +52,7 @@ func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBac
return common.Address{}, nil, nil, errors.New("GetABI returned nil") return common.Address{}, nil, nil, errors.New("GetABI returned nil")
} }
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OutputBisectionGameBin), backend, _gameType, _absolutePrestate, _genesisBlockNumber, _maxGameDepth, _splitDepth, _gameDuration, _vm) address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OutputBisectionGameBin), backend, _gameType, _absolutePrestate, _genesisBlockNumber, _genesisOutputRoot, _maxGameDepth, _splitDepth, _gameDuration, _vm)
if err != nil { if err != nil {
return common.Address{}, nil, nil, err return common.Address{}, nil, nil, err
} }
...@@ -294,6 +294,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISBLOCKNUMBER ...@@ -294,6 +294,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISBLOCKNUMBER
return _OutputBisectionGame.Contract.GENESISBLOCKNUMBER(&_OutputBisectionGame.CallOpts) return _OutputBisectionGame.Contract.GENESISBLOCKNUMBER(&_OutputBisectionGame.CallOpts)
} }
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCaller) GENESISOUTPUTROOT(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _OutputBisectionGame.contract.Call(opts, &out, "GENESIS_OUTPUT_ROOT")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameSession) GENESISOUTPUTROOT() ([32]byte, error) {
return _OutputBisectionGame.Contract.GENESISOUTPUTROOT(&_OutputBisectionGame.CallOpts)
}
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISOUTPUTROOT() ([32]byte, error) {
return _OutputBisectionGame.Contract.GENESISOUTPUTROOT(&_OutputBisectionGame.CallOpts)
}
// MAXGAMEDEPTH is a free data retrieval call binding the contract method 0x4778efe8. // MAXGAMEDEPTH is a free data retrieval call binding the contract method 0x4778efe8.
// //
// Solidity: function MAX_GAME_DEPTH() view returns(uint256) // Solidity: function MAX_GAME_DEPTH() view returns(uint256)
...@@ -652,37 +683,6 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GameType() (uint8, ...@@ -652,37 +683,6 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GameType() (uint8,
return _OutputBisectionGame.Contract.GameType(&_OutputBisectionGame.CallOpts) return _OutputBisectionGame.Contract.GameType(&_OutputBisectionGame.CallOpts)
} }
// L1Head is a free data retrieval call binding the contract method 0x6361506d.
//
// Solidity: function l1Head() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCaller) L1Head(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _OutputBisectionGame.contract.Call(opts, &out, "l1Head")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// L1Head is a free data retrieval call binding the contract method 0x6361506d.
//
// Solidity: function l1Head() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameSession) L1Head() ([32]byte, error) {
return _OutputBisectionGame.Contract.L1Head(&_OutputBisectionGame.CallOpts)
}
// L1Head is a free data retrieval call binding the contract method 0x6361506d.
//
// Solidity: function l1Head() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCallerSession) L1Head() ([32]byte, error) {
return _OutputBisectionGame.Contract.L1Head(&_OutputBisectionGame.CallOpts)
}
// L2BlockNumber is a free data retrieval call binding the contract method 0x8b85902b. // L2BlockNumber is a free data retrieval call binding the contract method 0x8b85902b.
// //
// Solidity: function l2BlockNumber() pure returns(uint256 l2BlockNumber_) // Solidity: function l2BlockNumber() pure returns(uint256 l2BlockNumber_)
...@@ -776,6 +776,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) RootClaim() ([32]b ...@@ -776,6 +776,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) RootClaim() ([32]b
return _OutputBisectionGame.Contract.RootClaim(&_OutputBisectionGame.CallOpts) return _OutputBisectionGame.Contract.RootClaim(&_OutputBisectionGame.CallOpts)
} }
// SettlementHead is a free data retrieval call binding the contract method 0xa85c3381.
//
// Solidity: function settlementHead() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCaller) SettlementHead(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _OutputBisectionGame.contract.Call(opts, &out, "settlementHead")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// SettlementHead is a free data retrieval call binding the contract method 0xa85c3381.
//
// Solidity: function settlementHead() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameSession) SettlementHead() ([32]byte, error) {
return _OutputBisectionGame.Contract.SettlementHead(&_OutputBisectionGame.CallOpts)
}
// SettlementHead is a free data retrieval call binding the contract method 0xa85c3381.
//
// Solidity: function settlementHead() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCallerSession) SettlementHead() ([32]byte, error) {
return _OutputBisectionGame.Contract.SettlementHead(&_OutputBisectionGame.CallOpts)
}
// Status is a free data retrieval call binding the contract method 0x200d2ed2. // Status is a free data retrieval call binding the contract method 0x200d2ed2.
// //
// Solidity: function status() view returns(uint8) // Solidity: function status() view returns(uint8)
......
...@@ -9,11 +9,11 @@ import ( ...@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const OutputBisectionGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"createdAt\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1017\"},{\"astId\":1001,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"resolvedAt\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1017\"},{\"astId\":1002,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"status\",\"offset\":16,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1010\"},{\"astId\":1003,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"bondManager\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_contract(IBondManager)1009\"},{\"astId\":1004,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"l1Head\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_userDefinedValueType(Hash)1015\"},{\"astId\":1005,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_struct(ClaimData)1011_storage)dyn_storage\"},{\"astId\":1006,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1013,t_bool)\"},{\"astId\":1007,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"subgames\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_uint256,t_array(t_uint256)dyn_storage)\"},{\"astId\":1008,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"subgameAtRootResolved\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bool\"}],\"types\":{\"t_array(t_struct(ClaimData)1011_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IOutputBisectionGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)1011_storage\"},\"t_array(t_uint256)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"uint256[]\",\"numberOfBytes\":\"32\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1009\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1010\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_uint256,t_array(t_uint256)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e uint256[])\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_array(t_uint256)dyn_storage\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1013,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1013\",\"value\":\"t_bool\"},\"t_struct(ClaimData)1011_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IOutputBisectionGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1012\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1013\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1014\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Hash)1015\":{\"encoding\":\"inplace\",\"label\":\"Hash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Position)1016\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1017\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}" const OutputBisectionGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"createdAt\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1017\"},{\"astId\":1001,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"resolvedAt\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1017\"},{\"astId\":1002,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"status\",\"offset\":16,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1010\"},{\"astId\":1003,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"bondManager\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_contract(IBondManager)1009\"},{\"astId\":1004,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"settlementHead\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_userDefinedValueType(Hash)1015\"},{\"astId\":1005,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_array(t_struct(ClaimData)1011_storage)dyn_storage\"},{\"astId\":1006,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1013,t_bool)\"},{\"astId\":1007,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"subgames\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_uint256,t_array(t_uint256)dyn_storage)\"},{\"astId\":1008,\"contract\":\"src/dispute/OutputBisectionGame.sol:OutputBisectionGame\",\"label\":\"subgameAtRootResolved\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_bool\"}],\"types\":{\"t_array(t_struct(ClaimData)1011_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IOutputBisectionGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)1011_storage\"},\"t_array(t_uint256)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"uint256[]\",\"numberOfBytes\":\"32\",\"base\":\"t_uint256\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1009\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1010\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_uint256,t_array(t_uint256)dyn_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e uint256[])\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_array(t_uint256)dyn_storage\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1013,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1013\",\"value\":\"t_bool\"},\"t_struct(ClaimData)1011_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IOutputBisectionGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1012\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1013\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1014\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Hash)1015\":{\"encoding\":\"inplace\",\"label\":\"Hash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Position)1016\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1017\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
var OutputBisectionGameStorageLayout = new(solc.StorageLayout) var OutputBisectionGameStorageLayout = new(solc.StorageLayout)
var OutputBisectionGameDeployedBin = "0x6080604052600436106101ac5760003560e01c80638129fc1c116100ec578063c55cd0c71161008a578063d8cc1a3c11610064578063d8cc1a3c1461060a578063f8f43ff61461062a578063fa24f7431461064a578063fdffbb281461066e57600080fd5b8063c55cd0c714610572578063c6f0308c14610585578063cf09e0d0146105e957600080fd5b806392931298116100c6578063929312981461048f578063bbdc02db146104c3578063bcef3b5514610501578063c31b29ce1461053e57600080fd5b80638129fc1c146104255780638980e0cc1461043a5780638b85902b1461044f57600080fd5b8063363cc42711610159578063609d333411610133578063609d3334146103b3578063632247ea146103c85780636361506d146103db5780636737abeb146103f157600080fd5b8063363cc427146102d75780634778efe81461032957806354fd4d501461035d57600080fd5b8063266198f91161018a578063266198f9146102795780632810e1d6146102ad57806335fef567146102c257600080fd5b806319effeb4146101b1578063200d2ed2146101fc57806324185bc614610237575b600080fd5b3480156101bd57600080fd5b506000546101de9068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561020857600080fd5b5060005461022a90700100000000000000000000000000000000900460ff1681565b6040516101f391906125a0565b34801561024357600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f3565b34801561028557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b957600080fd5b5061022a610681565b6102d56102d03660046125e1565b610852565b005b3480156102e357600080fd5b506001546103049073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b34801561033557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036957600080fd5b506103a66040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101f3919061266e565b3480156103bf57600080fd5b506103a6610862565b6102d56103d636600461269d565b610874565b3480156103e757600080fd5b5061026b60025481565b3480156103fd57600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561043157600080fd5b506102d5610f6d565b34801561044657600080fd5b5060035461026b565b34801561045b57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561026b565b34801561049b57600080fd5b506103047f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b34801561050d57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561026b565b34801561054a57600080fd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b6102d56105803660046125e1565b6110be565b34801561059157600080fd5b506105a56105a03660046126d2565b6110ca565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f3565b3480156105f557600080fd5b506000546101de9067ffffffffffffffff1681565b34801561061657600080fd5b506102d5610625366004612734565b61113b565b34801561063657600080fd5b506102d56106453660046127be565b6116d7565b34801561065657600080fd5b5061065f611b7a565b6040516101f3939291906127ea565b6102d561067c3660046126d2565b611bd7565b600080600054700100000000000000000000000000000000900460ff1660028111156106af576106af612571565b146106e6576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610722576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061073657610736612815565b6000918252602090912060039091020154640100000000900460ff1661075d576002610760565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561081157610811612571565b02179055600281111561082657610826612571565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61085e82826000610874565b5050565b606061086f602080611f11565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108a0576108a0612571565b146108d7576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156108e3575080155b1561091a576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092f5761092f612815565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193506109c391908590611fa816565b90507f0000000000000000000000000000000000000000000000000000000000000000610a82826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610ac4576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aef7f00000000000000000000000000000000000000000000000000000000000000006001612873565b610b8b826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610ba457610ba48486611fb0565b815160009063ffffffff90811614610c04576003836000015163ffffffff1681548110610bd357610bd3612815565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c3d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c519190612873565b610c5b919061288b565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610cce576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d4c576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610ec257610ec2612815565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f239060019061288b565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610ff27ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110b8904361288b565b40600255565b61085e82826001610874565b600381815481106110da57600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561116757611167612571565b1461119e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111b3576111b3612815565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112127f00000000000000000000000000000000000000000000000000000000000000006001612873565b6112ae826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112ef576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080891561137257611313836fffffffffffffffffffffffffffffffff16612009565b67ffffffffffffffff16156113465761133d6113306001866128a2565b865463ffffffff166120af565b60010154611368565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061138c565b8460010154915061138984600161133091906128d3565b90505b600882901b60088a8a6040516113a3929190612907565b6040518091039020901b146113e4576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113f08d61214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a001604051602081830303815290604052805190602001209050600084600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328f8f8f8f886040518663ffffffff1660e01b81526004016114b2959493929190612960565b6020604051808303816000875af11580156114d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f5919061299a565b6002878101549290911492506000916115a0906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163c8b6fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61164691906129b3565b61165091906129d4565b67ffffffffffffffff161590508115158103611698576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505087547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790975550505050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561170357611703612571565b1461173a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806117468461214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a00160405160208183030381529060405280519060200120905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118319190612a22565b9050866001036118f3576002546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061299a565b50611b71565b866002036119705760018401546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b866003036119ed5760018301546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b86600403611ac657600284015473ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad908990859060c090611a3a906fffffffffffffffffffffffffffffffff16612009565b611a6e9067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612873565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945260248401929092521b6044820152600860648201526084810188905260a4016118aa565b86600503611b3f576040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101889052602481018390524660c01b6044820152600860648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bd0610862565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c0357611c03612571565b14611c3a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c4f57611c4f612815565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cbf90700100000000000000000000000000000000900467ffffffffffffffff164261288b565b6002830154611cef9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612873565b11611d26576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d44575060065460ff165b15611d7b576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611d8957508215155b15611dc0576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611e8e576000838281548110611de157611de1612815565b6000918252602080832090910154808352600590915260409091205490915015611e37576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e4c57611e4c612815565b600091825260209091206003909102018054909150640100000000900460ff16611e7b57600193505050611e8e565b505080611e8790612a58565b9050611dc4565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ed791612537565b83600003611f0b57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f4884367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612873565b90508267ffffffffffffffff1667ffffffffffffffff811115611f6d57611f6d612a90565b6040519080825280601f01601f191660200182016040528015611f97576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600082901a6001811480611fc7575060ff81166002145b612004576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810184905260240160405180910390fd5b505050565b600080612096837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120cd846fffffffffffffffffffffffffffffffff1661248b565b9050600383815481106120e2576120e2612815565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461214557815460038054909163ffffffff1690811061213057612130612815565b906000526020600020906003020191506120f3565b5092915050565b600080600083905060006003828154811061216957612169612815565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612240906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612281576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612348906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082146123c357825463ffffffff1661238d7f00000000000000000000000000000000000000000000000000000000000000006001612873565b8303612397578391505b600381815481106123aa576123aa612815565b9060005260206000209060030201935080945050612285565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816123f08460011c90565b6fffffffffffffffffffffffffffffffff1614905080156124495761241f6124196001846128a2565b886120af565b98506003878154811061243457612434612815565b9060005260206000209060030201975061247f565b6003878154811061245c5761245c612815565b9060005260206000209060030201985061247c82600161241991906128d3565b97505b50505050505050915091565b6000811960018301168161251f827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906125559190612558565b50565b5b8082111561256d5760008155600101612559565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106125db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b600080604083850312156125f457600080fd5b50508035926020909101359150565b6000815180845260005b818110156126295760208185018101518683018201520161260d565b8181111561263b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006126816020830184612603565b9392505050565b8035801515811461269857600080fd5b919050565b6000806000606084860312156126b257600080fd5b83359250602084013591506126c960408501612688565b90509250925092565b6000602082840312156126e457600080fd5b5035919050565b60008083601f8401126126fd57600080fd5b50813567ffffffffffffffff81111561271557600080fd5b60208301915083602082850101111561272d57600080fd5b9250929050565b6000806000806000806080878903121561274d57600080fd5b8635955061275d60208801612688565b9450604087013567ffffffffffffffff8082111561277a57600080fd5b6127868a838b016126eb565b9096509450606089013591508082111561279f57600080fd5b506127ac89828a016126eb565b979a9699509497509295939492505050565b6000806000606084860312156127d357600080fd5b505081359360208301359350604090920135919050565b60ff8416815282602082015260606040820152600061280c6060830184612603565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561288657612886612844565b500190565b60008282101561289d5761289d612844565b500390565b60006fffffffffffffffffffffffffffffffff838116908316818110156128cb576128cb612844565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156128fe576128fe612844565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612974606083018789612917565b8281036020840152612987818688612917565b9150508260408301529695505050505050565b6000602082840312156129ac57600080fd5b5051919050565b600067ffffffffffffffff838116908316818110156128cb576128cb612844565b600067ffffffffffffffff80841680612a16577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612a3457600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461268157600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8957612a89612844565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a" var OutputBisectionGameDeployedBin = "0x6080604052600436106101b75760003560e01c80638b85902b116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638b85902b146104445780639293129814610484578063a85c3381146104b857600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636737abeb146103e65780638129fc1c1461041a5780638980e0cc1461042f57600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612734565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612775565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612802565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612831565b6108b3565b3480156103f257600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561042657600080fd5b506102e0610fab565b34801561043b57600080fd5b50600354610276565b34801561045057600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b34801561049057600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c457600080fd5b5061027660025481565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612775565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612866565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e06106643660046128c8565b611179565b34801561067557600080fd5b506102e0610684366004612952565b6116ba565b34801561069557600080fd5b5061069e611b98565b6040516101fe9392919061297e565b6102e06106bb366004612866565b611bf5565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612705565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600081548110610775576107756129a9565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612705565b02179055600281111561086557610865612705565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f2f565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612705565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e6129a9565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a0291908590611fc616565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612a07565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be284611fce565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c116129a9565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612a07565b610c999190612a1f565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f006129a9565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612a1f565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612a1f565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612705565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f16129a9565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612a07565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113b057611351836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff16156113845761137b61136e600186612a36565b865463ffffffff166120c8565b600101546113a6565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113ca565b846001015491506113c784600161136e9190612a67565b90505b600882901b60088a8a6040516113e1929190612a9b565b6040518091039020901b14611422576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061142d8c612165565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b8152600401611497959493929190612af4565b6020604051808303816000875af11580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612b2e565b600285810154929091149250600091611585906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611621896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61162b9190612b47565b6116359190612b68565b67ffffffffffffffff16159050811515810361167d576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116e6576116e6612705565b1461171d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061172c86612194565b935093509350935060006117428585858561255f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190612bb6565b905088600103611897576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190612b2e565b50611b8d565b8860020361190e576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600303611985576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600403611ae25760006fffffffffffffffffffffffffffffffff861615611a06576119c2866fffffffffffffffffffffffffffffffff16612022565b6119f69067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612a07565b611a01906001612a07565b611a28565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adb9190612b2e565b5050611b8d565b88600503611b5b576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bee6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c2157611c21612705565b14611c58576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c6d57611c6d6129a9565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cdd90700100000000000000000000000000000000900467ffffffffffffffff1642612a1f565b6002830154611d0d9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612a07565b11611d44576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d62575060065460ff165b15611d99576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611da757508215155b15611dde576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611eac576000838281548110611dff57611dff6129a9565b6000918252602080832090910154808352600590915260409091205490915015611e55576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e6a57611e6a6129a9565b600091825260209091206003909102018054909150640100000000900460ff16611e9957600193505050611eac565b505080611ea590612bec565b9050611de2565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ef5916126cb565b83600003611f2957600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f6684367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612a07565b90508267ffffffffffffffff1667ffffffffffffffff811115611f8b57611f8b612c24565b6040519080825280601f01601f191660200182016040528015611fb5576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480611fe5575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6000806120af837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120e6846fffffffffffffffffffffffffffffffff1661261f565b9050600383815481106120fb576120fb6129a9565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461215e57815460038054909163ffffffff16908110612149576121496129a9565b9060005260206000209060030201915061210c565b5092915050565b600080600080600061217686612194565b935093509350935061218a8484848461255f565b9695505050505050565b60008060008060008590506000600382815481106121b4576121b46129a9565b600091825260209091206002600390920201908101549091507f00000000000000000000000000000000000000000000000000000000000000009061228b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116122cc576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612393906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082111561240f57825463ffffffff166123d97f00000000000000000000000000000000000000000000000000000000000000006001612a07565b83036123e3578391505b600381815481106123f6576123f66129a9565b90600052602060002090600302019350809450506122d0565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161243c8460011c90565b6fffffffffffffffffffffffffffffffff16149050801561250d576000612474836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff1611156124c357600061249a612494600185612a36565b896120c8565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506124e79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612551565b600061251d612494846001612a67565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036125c65782826040516020016125a99291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052805190602001209050612617565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081196001830116816126b3827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906126e991906126ec565b50565b5b8082111561270157600081556001016126ed565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061276f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561278857600080fd5b50508035926020909101359150565b6000815180845260005b818110156127bd576020818501810151868301820152016127a1565b818111156127cf576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006128156020830184612797565b9392505050565b8035801515811461282c57600080fd5b919050565b60008060006060848603121561284657600080fd5b833592506020840135915061285d6040850161281c565b90509250925092565b60006020828403121561287857600080fd5b5035919050565b60008083601f84011261289157600080fd5b50813567ffffffffffffffff8111156128a957600080fd5b6020830191508360208285010111156128c157600080fd5b9250929050565b600080600080600080608087890312156128e157600080fd5b863595506128f16020880161281c565b9450604087013567ffffffffffffffff8082111561290e57600080fd5b61291a8a838b0161287f565b9096509450606089013591508082111561293357600080fd5b5061294089828a0161287f565b979a9699509497509295939492505050565b60008060006060848603121561296757600080fd5b505081359360208301359350604090920135919050565b60ff841681528260208201526060604082015260006129a06060830184612797565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a1a57612a1a6129d8565b500190565b600082821015612a3157612a316129d8565b500390565b60006fffffffffffffffffffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612a9257612a926129d8565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612b08606083018789612aab565b8281036020840152612b1b818688612aab565b9150508260408301529695505050505050565b600060208284031215612b4057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b600067ffffffffffffffff80841680612baa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612bc857600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461281557600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c1d57612c1d6129d8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
func init() { func init() {
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
"faultGameMaxDepth": 30, "faultGameMaxDepth": 30,
"faultGameMaxDuration": 1200, "faultGameMaxDuration": 1200,
"outputBisectionGameGenesisBlock": 0, "outputBisectionGameGenesisBlock": 0,
"outputBisectionGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"outputBisectionGameSplitDepth": 15, "outputBisectionGameSplitDepth": 15,
"systemConfigStartBlock": 0, "systemConfigStartBlock": 0,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000", "requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
......
...@@ -1106,6 +1106,7 @@ contract Deploy is Deployer { ...@@ -1106,6 +1106,7 @@ contract Deploy is Deployer {
_gameType: _gameType, _gameType: _gameType,
_absolutePrestate: _absolutePrestate, _absolutePrestate: _absolutePrestate,
_genesisBlockNumber: cfg.outputBisectionGameGenesisBlock(), _genesisBlockNumber: cfg.outputBisectionGameGenesisBlock(),
_genesisOutputRoot: Hash.wrap(cfg.outputBisectionGameGenesisOutputRoot()),
_maxGameDepth: _maxGameDepth, _maxGameDepth: _maxGameDepth,
_splitDepth: cfg.outputBisectionGameSplitDepth(), _splitDepth: cfg.outputBisectionGameSplitDepth(),
_gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())), _gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())),
......
...@@ -51,6 +51,7 @@ contract DeployConfig is Script { ...@@ -51,6 +51,7 @@ contract DeployConfig is Script {
uint256 public faultGameMaxDepth; uint256 public faultGameMaxDepth;
uint256 public faultGameMaxDuration; uint256 public faultGameMaxDuration;
uint256 public outputBisectionGameGenesisBlock; uint256 public outputBisectionGameGenesisBlock;
bytes32 public outputBisectionGameGenesisOutputRoot;
uint256 public outputBisectionGameSplitDepth; uint256 public outputBisectionGameSplitDepth;
uint256 public systemConfigStartBlock; uint256 public systemConfigStartBlock;
uint256 public requiredProtocolVersion; uint256 public requiredProtocolVersion;
...@@ -107,6 +108,7 @@ contract DeployConfig is Script { ...@@ -107,6 +108,7 @@ contract DeployConfig is Script {
faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth"); faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth");
faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration"); faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration");
outputBisectionGameGenesisBlock = stdJson.readUint(_json, "$.outputBisectionGameGenesisBlock"); outputBisectionGameGenesisBlock = stdJson.readUint(_json, "$.outputBisectionGameGenesisBlock");
outputBisectionGameGenesisOutputRoot = stdJson.readBytes32(_json, "$.outputBisectionGameGenesisOutputRoot");
outputBisectionGameSplitDepth = stdJson.readUint(_json, "$.outputBisectionGameSplitDepth"); outputBisectionGameSplitDepth = stdJson.readUint(_json, "$.outputBisectionGameSplitDepth");
} }
} }
......
...@@ -46,6 +46,9 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -46,6 +46,9 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice The genesis block number /// @notice The genesis block number
uint256 public immutable GENESIS_BLOCK_NUMBER; uint256 public immutable GENESIS_BLOCK_NUMBER;
/// @notice The genesis output root
Hash public immutable GENESIS_OUTPUT_ROOT;
/// @notice The game type ID /// @notice The game type ID
GameType internal immutable GAME_TYPE; GameType internal immutable GAME_TYPE;
...@@ -86,6 +89,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -86,6 +89,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @param _gameType The type ID of the game. /// @param _gameType The type ID of the game.
/// @param _absolutePrestate The absolute prestate of the instruction trace. /// @param _absolutePrestate The absolute prestate of the instruction trace.
/// @param _genesisBlockNumber The block number of the genesis block. /// @param _genesisBlockNumber The block number of the genesis block.
/// @param _genesisOutputRoot The output root of the genesis block.
/// @param _maxGameDepth The maximum depth of bisection. /// @param _maxGameDepth The maximum depth of bisection.
/// @param _splitDepth The final depth of the output bisection portion of the game. /// @param _splitDepth The final depth of the output bisection portion of the game.
/// @param _gameDuration The duration of the game. /// @param _gameDuration The duration of the game.
...@@ -95,6 +99,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -95,6 +99,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
GameType _gameType, GameType _gameType,
Claim _absolutePrestate, Claim _absolutePrestate,
uint256 _genesisBlockNumber, uint256 _genesisBlockNumber,
Hash _genesisOutputRoot,
uint256 _maxGameDepth, uint256 _maxGameDepth,
uint256 _splitDepth, uint256 _splitDepth,
Duration _gameDuration, Duration _gameDuration,
...@@ -105,6 +110,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -105,6 +110,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
GAME_TYPE = _gameType; GAME_TYPE = _gameType;
ABSOLUTE_PRESTATE = _absolutePrestate; ABSOLUTE_PRESTATE = _absolutePrestate;
GENESIS_BLOCK_NUMBER = _genesisBlockNumber; GENESIS_BLOCK_NUMBER = _genesisBlockNumber;
GENESIS_OUTPUT_ROOT = _genesisOutputRoot;
MAX_GAME_DEPTH = _maxGameDepth; MAX_GAME_DEPTH = _maxGameDepth;
SPLIT_DEPTH = _splitDepth; SPLIT_DEPTH = _splitDepth;
GAME_DURATION = _gameDuration; GAME_DURATION = _gameDuration;
...@@ -157,9 +163,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -157,9 +163,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// indicate the VM Status and is added after the digest is computed. // indicate the VM Status and is added after the digest is computed.
if (keccak256(_stateData) << 8 != Claim.unwrap(preStateClaim) << 8) revert InvalidPrestate(); if (keccak256(_stateData) << 8 != Claim.unwrap(preStateClaim) << 8) revert InvalidPrestate();
// TODO(clabby): Include less context. See Adrian's proposal for the local context salt. // Compute the local preimage context for the step.
(ClaimData storage starting, ClaimData storage disputed) = findStartingAndDisputedOutputs(_claimIndex); Hash uuid = findLocalContext(_claimIndex);
bytes32 uuid = keccak256(abi.encode(starting.claim, starting.parentIndex, disputed.claim, disputed.parentIndex));
// INVARIANT: If a step is an attack, the poststate is valid if the step produces // INVARIANT: If a step is an attack, the poststate is valid if the step produces
// the same poststate hash as the parent claim's value. // the same poststate hash as the parent claim's value.
...@@ -173,7 +178,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -173,7 +178,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// SAFETY: While the `attack` path does not need an extra check for the post // SAFETY: While the `attack` path does not need an extra check for the post
// state's depth in relation to the parent, we don't need another // state's depth in relation to the parent, we don't need another
// branch because (n - n) % 2 == 0. // branch because (n - n) % 2 == 0.
bool validStep = VM.step(_stateData, _proof, uuid) == Claim.unwrap(postState.claim); bool validStep = VM.step(_stateData, _proof, Hash.unwrap(uuid)) == Claim.unwrap(postState.claim);
bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0; bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0;
if (parentPostAgree == validStep) revert ValidStep(); if (parentPostAgree == validStep) revert ValidStep();
...@@ -211,7 +216,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -211,7 +216,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// When the next position surpasses the split depth (i.e., it is the root claim of an execution // When the next position surpasses the split depth (i.e., it is the root claim of an execution
// trace bisection sub-game), we need to perform some extra verification steps. // trace bisection sub-game), we need to perform some extra verification steps.
if (nextPosition.depth() == SPLIT_DEPTH + 1) verifyExecBisectionRoot(_claim, _challengeIndex); if (nextPosition.depth() == SPLIT_DEPTH + 1) verifyExecBisectionRoot(_claim);
// Fetch the grandparent clock, if it exists. // Fetch the grandparent clock, if it exists.
// The grandparent clock should always exist unless the parent is the root claim. // The grandparent clock should always exist unless the parent is the root claim.
...@@ -284,34 +289,34 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -284,34 +289,34 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// INVARIANT: Local data can only be added if the game is currently in progress. // INVARIANT: Local data can only be added if the game is currently in progress.
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress(); if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();
// TODO(clabby): Include less context. See Adrian's proposal for the local context salt. (Claim starting, Position startingPos, Claim disputed, Position disputedPos) =
(ClaimData storage starting, ClaimData storage disputed) = findStartingAndDisputedOutputs(_execLeafIdx); findStartingAndDisputedOutputs(_execLeafIdx);
bytes32 uuid = keccak256(abi.encode(starting.claim, starting.parentIndex, disputed.claim, disputed.parentIndex)); Hash uuid = computeLocalContext(starting, startingPos, disputed, disputedPos);
IPreimageOracle oracle = VM.oracle(); IPreimageOracle oracle = VM.oracle();
if (_ident == 1) { if (_ident == 1) {
// Load the settlement layer head hash // Load the settlement layer head hash
oracle.loadLocalData(_ident, uuid, Hash.unwrap(settlementHead), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Hash.unwrap(settlementHead), 32, _partOffset);
} else if (_ident == 2) { } else if (_ident == 2) {
// Load the starting proposal's output root. // Load the starting proposal's output root.
oracle.loadLocalData(_ident, uuid, Claim.unwrap(starting.claim), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Claim.unwrap(starting), 32, _partOffset);
} else if (_ident == 3) { } else if (_ident == 3) {
// Load the disputed proposal's output root // Load the disputed proposal's output root
oracle.loadLocalData(_ident, uuid, Claim.unwrap(disputed.claim), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Claim.unwrap(disputed), 32, _partOffset);
} else if (_ident == 4) { } else if (_ident == 4) {
// Load the starting proposal's L2 block number as a big-endian uint64 in the // Load the starting proposal's L2 block number as a big-endian uint64 in the
// high order 8 bytes of the word. // high order 8 bytes of the word.
// TODO(clabby): +1? See TODO in natspec of `findStartingAndDisputedOutputs`
oracle.loadLocalData( // If the starting position is 0 (invalid), the starting output root is genesis. Otherwise,
_ident, // we add the index at depth + 1 to the genesis block number to get the L2 block number.
uuid, uint256 l2Number = Position.unwrap(startingPos) == 0
bytes32(uint256(GENESIS_BLOCK_NUMBER + starting.position.indexAtDepth()) << 0xC0), ? GENESIS_BLOCK_NUMBER
8, : GENESIS_BLOCK_NUMBER + startingPos.indexAtDepth() + 1;
_partOffset
); oracle.loadLocalData(_ident, Hash.unwrap(uuid), bytes32(l2Number << 0xC0), 8, _partOffset);
} else if (_ident == 5) { } else if (_ident == 5) {
// Load the chain ID as a big-endian uint64 in the high order 8 bytes of the word. // Load the chain ID as a big-endian uint64 in the high order 8 bytes of the word.
oracle.loadLocalData(_ident, uuid, bytes32(block.chainid << 0xC0), 8, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), bytes32(block.chainid << 0xC0), 8, _partOffset);
} else { } else {
revert InvalidLocalIdent(); revert InvalidLocalIdent();
} }
...@@ -445,9 +450,6 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -445,9 +450,6 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
); );
// Persist the settlement layer hash of the parent block. // Persist the settlement layer hash of the parent block.
// TODO(clabby): There may be a bug here - Do we just allow the dispute game to be invalid? We can
// always just create another, but it is possible to create a game where the data was not
// already available on the settlement layer.
settlementHead = Hash.wrap(blockhash(block.number - 1)); settlementHead = Hash.wrap(blockhash(block.number - 1));
} }
...@@ -463,17 +465,13 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -463,17 +465,13 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice Verifies the integrity of an execution bisection subgame's root claim. Reverts if the claim /// @notice Verifies the integrity of an execution bisection subgame's root claim. Reverts if the claim
/// is invalid. /// is invalid.
/// @param _rootClaim The root claim of the execution bisection subgame. /// @param _rootClaim The root claim of the execution bisection subgame.
function verifyExecBisectionRoot(Claim _rootClaim, uint256 /* _parentIndex */ ) internal pure { function verifyExecBisectionRoot(Claim _rootClaim) internal pure {
// The VMStatus must indicate 'invalid' (1), to argue that disputed thing is invalid. // The VMStatus must indicate 'invalid' (1), to argue that disputed thing is invalid.
// Games that agree with the existing outcome are not allowed. // Games that agree with the existing outcome are not allowed.
// TODO(clabby): This assumption will change in Alpha Chad, and also depending on the split depth! Be careful
// about what we go with here.
uint8 vmStatus = uint8(Claim.unwrap(_rootClaim)[0]); uint8 vmStatus = uint8(Claim.unwrap(_rootClaim)[0]);
if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) { if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) {
revert UnexpectedRootClaim(_rootClaim); revert UnexpectedRootClaim(_rootClaim);
} }
// TODO(clabby): Other verification steps (?)
} }
/// @notice Finds the trace ancestor of a given position within the DAG. /// @notice Finds the trace ancestor of a given position within the DAG.
...@@ -495,16 +493,14 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -495,16 +493,14 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice Finds the starting and disputed output root for a given `ClaimData` within the DAG. This /// @notice Finds the starting and disputed output root for a given `ClaimData` within the DAG. This
/// `ClaimData` must be below the `SPLIT_DEPTH`. /// `ClaimData` must be below the `SPLIT_DEPTH`.
/// @param _start The index within `claimData` of the claim to start searching from. /// @param _start The index within `claimData` of the claim to start searching from.
/// @return starting_ The starting, agreed upon output root claim. /// @return startingClaim_ The starting output root claim.
/// @return disputed_ The disputed output root claim. /// @return startingPos_ The starting output root position.
/// /// @return disputedClaim_ The disputed output root claim.
/// TODO: This function does not account for the case where the starting output root is the absolute /// @return disputedPos_ The disputed output root position.
/// prestate. Need to determine whether or not the first leaf at the split depth is genesis or
/// block #1.
function findStartingAndDisputedOutputs(uint256 _start) function findStartingAndDisputedOutputs(uint256 _start)
internal internal
view view
returns (ClaimData storage starting_, ClaimData storage disputed_) returns (Claim startingClaim_, Position startingPos_, Claim disputedClaim_, Position disputedPos_)
{ {
// Fatch the starting claim. // Fatch the starting claim.
uint256 claimIdx = _start; uint256 claimIdx = _start;
...@@ -521,7 +517,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -521,7 +517,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// Walk up the DAG until the ancestor's depth is equal to the split depth. // Walk up the DAG until the ancestor's depth is equal to the split depth.
uint256 currentDepth; uint256 currentDepth;
ClaimData storage execRootClaim = claim; ClaimData storage execRootClaim = claim;
while ((currentDepth = claim.position.depth()) != SPLIT_DEPTH) { while ((currentDepth = claim.position.depth()) > SPLIT_DEPTH) {
uint256 parentIndex = claim.parentIndex; uint256 parentIndex = claim.parentIndex;
// If we're currently at the split depth + 1, we're at the root of the execution sub-game. // If we're currently at the split depth + 1, we're at the root of the execution sub-game.
...@@ -541,16 +537,62 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -541,16 +537,62 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// Determine the starting and disputed output root indices. // Determine the starting and disputed output root indices.
// 1. If it was an attack, the disputed output root is `claim`, and the starting output root is // 1. If it was an attack, the disputed output root is `claim`, and the starting output root is
// elsewhere in the dag (it must commit to the block # index at depth of `outputPos - 1`). // elsewhere in the DAG (it must commit to the block # index at depth of `outputPos - 1`).
// 2. If it was a defense, the starting output root is `claim`, and the disputed output root is // 2. If it was a defense, the starting output root is `claim`, and the disputed output root is
// elsewhere in the dag (it must commit to the block # index at depth of `outputPos + 1`). // elsewhere in the DAG (it must commit to the block # index at depth of `outputPos + 1`).
if (wasAttack) { if (wasAttack) {
// See TODO in natspec. // If this is an attack on the first output root (the block directly after genesis), the
starting_ = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) - 1), claimIdx); // starting claim nor position exists in the tree. We leave these as 0, which can be easily
disputed_ = claimData[claimIdx]; // identified due to 0 being an invalid Gindex.
if (outputPos.indexAtDepth() > 0) {
ClaimData storage starting = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) - 1), claimIdx);
startingClaim_ = starting.claim;
startingPos_ = starting.position;
} else {
startingClaim_ = Claim.wrap(Hash.unwrap(GENESIS_OUTPUT_ROOT));
}
disputedClaim_ = claim.claim;
disputedPos_ = claim.position;
} else {
ClaimData storage disputed = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) + 1), claimIdx);
startingClaim_ = claim.claim;
startingPos_ = claim.position;
disputedClaim_ = disputed.claim;
disputedPos_ = disputed.position;
}
}
/// @notice Finds the local context hash for a given claim index that is present in an execution trace subgame.
/// @param _claimIndex The index of the claim to find the local context hash for.
/// @return uuid_ The local context hash.
function findLocalContext(uint256 _claimIndex) internal view returns (Hash uuid_) {
(Claim starting, Position startingPos, Claim disputed, Position disputedPos) =
findStartingAndDisputedOutputs(_claimIndex);
uuid_ = computeLocalContext(starting, startingPos, disputed, disputedPos);
}
/// @notice Computes the local context hash for a set of starting/disputed claim values and positions.
/// @param _starting The starting claim.
/// @param _startingPos The starting claim's position.
/// @param _disputed The disputed claim.
/// @param _disputedPos The disputed claim's position.
/// @return uuid_ The local context hash.
function computeLocalContext(
Claim _starting,
Position _startingPos,
Claim _disputed,
Position _disputedPos
)
internal
pure
returns (Hash uuid_)
{
// A position of 0 indicates that the starting claim is the absolute prestate. In this special case,
// we do not include the starting claim within the local context hash.
if (Position.unwrap(_startingPos) == 0) {
uuid_ = Hash.wrap(keccak256(abi.encode(_disputed, _disputedPos)));
} else { } else {
starting_ = claimData[claimIdx]; uuid_ = Hash.wrap(keccak256(abi.encode(_starting, _startingPos, _disputed, _disputedPos)));
disputed_ = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) + 1), claimIdx);
} }
} }
} }
...@@ -27,6 +27,8 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init { ...@@ -27,6 +27,8 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
/// @dev The genesis block number configured for the output bisection portion of the game. /// @dev The genesis block number configured for the output bisection portion of the game.
uint256 internal constant GENESIS_BLOCK_NUMBER = 0; uint256 internal constant GENESIS_BLOCK_NUMBER = 0;
/// @dev The genesis output root commitment
Hash internal constant GENESIS_OUTPUT_ROOT = Hash.wrap(bytes32(0));
/// @dev The implementation of the game. /// @dev The implementation of the game.
OutputBisectionGame internal gameImpl; OutputBisectionGame internal gameImpl;
...@@ -45,21 +47,34 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init { ...@@ -45,21 +47,34 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
// Set the extra data for the game creation // Set the extra data for the game creation
extraData = abi.encode(L2_BLOCK_NUMBER); extraData = abi.encode(L2_BLOCK_NUMBER);
AlphabetVM _vm = new AlphabetVM(absolutePrestate);
// Deploy an implementation of the fault game // Deploy an implementation of the fault game
gameImpl = new OutputBisectionGame({ gameImpl = new OutputBisectionGame({
_gameType: GAME_TYPE, _gameType: GAME_TYPE,
_absolutePrestate: absolutePrestate, _absolutePrestate: absolutePrestate,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER, _genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_maxGameDepth: 2**3, _maxGameDepth: 2**3,
_splitDepth: 2**2, _splitDepth: 2**2,
_gameDuration: Duration.wrap(7 days), _gameDuration: Duration.wrap(7 days),
_vm: new AlphabetVM(absolutePrestate) _vm: _vm
}); });
// Register the game implementation with the factory. // Register the game implementation with the factory.
factory.setImplementation(GAME_TYPE, gameImpl); factory.setImplementation(GAME_TYPE, gameImpl);
// Create a new game. // Create a new game.
gameProxy = OutputBisectionGame(address(factory.create(GAME_TYPE, rootClaim, extraData))); gameProxy = OutputBisectionGame(address(factory.create(GAME_TYPE, rootClaim, extraData)));
// Check immutables
assertEq(GameType.unwrap(gameProxy.gameType()), GameType.unwrap(GAME_TYPE));
assertEq(Claim.unwrap(gameProxy.ABSOLUTE_PRESTATE()), Claim.unwrap(absolutePrestate));
assertEq(gameProxy.GENESIS_BLOCK_NUMBER(), GENESIS_BLOCK_NUMBER);
assertEq(Hash.unwrap(gameProxy.GENESIS_OUTPUT_ROOT()), Hash.unwrap(GENESIS_OUTPUT_ROOT));
assertEq(gameProxy.MAX_GAME_DEPTH(), 2 ** 3);
assertEq(gameProxy.SPLIT_DEPTH(), 2 ** 2);
assertEq(Duration.unwrap(gameProxy.GAME_DURATION()), 7 days);
assertEq(address(gameProxy.VM()), address(_vm));
// Label the proxy // Label the proxy
vm.label(address(gameProxy), "OutputBisectionGame_Clone"); vm.label(address(gameProxy), "OutputBisectionGame_Clone");
} }
...@@ -459,6 +474,99 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -459,6 +474,99 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
gameProxy.addLocalData(_ident, 5, 0); gameProxy.addLocalData(_ident, 5, 0);
} }
/// @dev Tests that local data is loaded into the preimage oracle correctly in the subgame
/// that is disputing the transition from `GENESIS -> GENESIS + 1`
function test_addLocalDataGenesisTransition_static_succeeds() public {
IPreimageOracle oracle = IPreimageOracle(address(gameProxy.VM().oracle()));
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, Claim.wrap(bytes32(i)));
}
gameProxy.attack(4, ROOT_CLAIM);
// Expected start/disputed claims
bytes32 startingClaim = Hash.unwrap(GENESIS_OUTPUT_ROOT);
Position startingPos = LibPosition.wrap(0, 0);
bytes32 disputedClaim = bytes32(uint256(3));
Position disputedPos = LibPosition.wrap(4, 0);
// Expected local data
bytes32[5] memory data = [
Hash.unwrap(gameProxy.settlementHead()),
startingClaim,
disputedClaim,
bytes32(0),
bytes32(block.chainid << 0xC0)
];
for (uint256 i = 1; i <= 5; i++) {
uint256 expectedLen = i > 3 ? 8 : 32;
bytes32 key = _getKey(i, keccak256(abi.encode(disputedClaim, disputedPos)));
gameProxy.addLocalData(i, 5, 0);
(bytes32 dat, uint256 datLen) = oracle.readPreimage(key, 0);
assertEq(dat >> 0xC0, bytes32(expectedLen));
// Account for the length prefix if i > 3 (the data stored
// at identifiers i <= 3 are 32 bytes long, so the expected
// length is already correct. If i > 3, the data is only 8
// bytes long, so the length prefix + the data is 16 bytes
// total.)
assertEq(datLen, expectedLen + (i > 3 ? 8 : 0));
gameProxy.addLocalData(i, 5, 8);
(dat, datLen) = oracle.readPreimage(key, 8);
assertEq(dat, data[i - 1]);
assertEq(datLen, expectedLen);
}
}
/// @dev Tests that local data is loaded into the preimage oracle correctly.
function test_addLocalDataMiddle_static_succeeds() public {
IPreimageOracle oracle = IPreimageOracle(address(gameProxy.VM().oracle()));
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, Claim.wrap(bytes32(i)));
}
gameProxy.defend(4, ROOT_CLAIM);
// Expected start/disputed claims
bytes32 startingClaim = bytes32(uint256(3));
Position startingPos = LibPosition.wrap(4, 0);
bytes32 disputedClaim = bytes32(uint256(2));
Position disputedPos = LibPosition.wrap(3, 0);
// Expected local data
bytes32[5] memory data = [
Hash.unwrap(gameProxy.settlementHead()),
startingClaim,
disputedClaim,
bytes32(uint256(1) << 0xC0),
bytes32(block.chainid << 0xC0)
];
for (uint256 i = 1; i <= 5; i++) {
uint256 expectedLen = i > 3 ? 8 : 32;
bytes32 key = _getKey(i, keccak256(abi.encode(startingClaim, startingPos, disputedClaim, disputedPos)));
gameProxy.addLocalData(i, 5, 0);
(bytes32 dat, uint256 datLen) = oracle.readPreimage(key, 0);
assertEq(dat >> 0xC0, bytes32(expectedLen));
// Account for the length prefix if i > 3 (the data stored
// at identifiers i <= 3 are 32 bytes long, so the expected
// length is already correct. If i > 3, the data is only 8
// bytes long, so the length prefix + the data is 16 bytes
// total.)
assertEq(datLen, expectedLen + (i > 3 ? 8 : 0));
gameProxy.addLocalData(i, 5, 8);
(dat, datLen) = oracle.readPreimage(key, 8);
assertEq(dat, data[i - 1]);
assertEq(datLen, expectedLen);
}
}
/// @dev Helper to get the localized key for an identifier in the context of the game proxy. /// @dev Helper to get the localized key for an identifier in the context of the game proxy.
function _getKey(uint256 _ident, bytes32 _localContext) internal view returns (bytes32) { function _getKey(uint256 _ident, bytes32 _localContext) internal view returns (bytes32) {
bytes32 h = keccak256(abi.encode(_ident | (1 << 248), address(gameProxy), _localContext)); bytes32 h = keccak256(abi.encode(_ident | (1 << 248), address(gameProxy), _localContext));
......
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