Commit 0d221da6 authored by clabby's avatar clabby Committed by GitHub

feat(ctb): Allow for checkpointing in claim resolution (#10248)

* feat(ctb): Allow for checkpointing in claim resolution

Introduces checkpointing to the `resolveClaim` function in the
`FaultDisputeGame`, allowing for the pagination of subgame resolution.

fix

* review

* feat(challenger): Resolution checkpointing support (#10253)

* feat(challenger): Resolution checkpointing support

Adds support for resolution checkpointing

* op-challenger: Use a simple maximum number of child claims to resolve per call.

---------
Co-authored-by: default avatarAdrian Sutton <adrian@oplabs.co>

---------
Co-authored-by: default avatarAdrian Sutton <adrian@oplabs.co>
parent caf41c55
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"createdAt\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1018\"},{\"astId\":1001,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"resolvedAt\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1018\"},{\"astId\":1002,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":16,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1010\"},{\"astId\":1003,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"initialized\",\"offset\":17,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1004,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_struct(ClaimData)1011_storage)dyn_storage\"},{\"astId\":1005,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"credit\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1006,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1014,t_bool)\"},{\"astId\":1007,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"subgames\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_mapping(t_uint256,t_array(t_uint256)dyn_storage)\"},{\"astId\":1008,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"resolvedSubgames\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_uint256,t_bool)\"},{\"astId\":1009,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"startingOutputRoot\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_struct(OutputRoot)1012_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_struct(ClaimData)1011_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.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_enum(GameStatus)1010\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"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_uint256,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_bool\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1014,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1014\",\"value\":\"t_bool\"},\"t_struct(ClaimData)1011_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"160\"},\"t_struct(OutputRoot)1012_storage\":{\"encoding\":\"inplace\",\"label\":\"struct OutputRoot\",\"numberOfBytes\":\"64\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1013\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1014\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1015\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Hash)1016\":{\"encoding\":\"inplace\",\"label\":\"Hash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Position)1017\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1018\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"createdAt\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1020\"},{\"astId\":1001,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"resolvedAt\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1020\"},{\"astId\":1002,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":16,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1011\"},{\"astId\":1003,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"initialized\",\"offset\":17,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1004,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_struct(ClaimData)1012_storage)dyn_storage\"},{\"astId\":1005,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"credit\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_address,t_uint256)\"},{\"astId\":1006,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1016,t_bool)\"},{\"astId\":1007,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"subgames\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_mapping(t_uint256,t_array(t_uint256)dyn_storage)\"},{\"astId\":1008,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"resolvedSubgames\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_mapping(t_uint256,t_bool)\"},{\"astId\":1009,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"resolutionCheckpoints\",\"offset\":0,\"slot\":\"6\",\"type\":\"t_mapping(t_uint256,t_struct(ResolutionCheckpoint)1014_storage)\"},{\"astId\":1010,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"startingOutputRoot\",\"offset\":0,\"slot\":\"7\",\"type\":\"t_struct(OutputRoot)1013_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_struct(ClaimData)1012_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)1012_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_enum(GameStatus)1011\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_address,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint256\"},\"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_uint256,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_bool\"},\"t_mapping(t_uint256,t_struct(ResolutionCheckpoint)1014_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint256 =\u003e struct IFaultDisputeGame.ResolutionCheckpoint)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint256\",\"value\":\"t_struct(ResolutionCheckpoint)1014_storage\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1016,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1016\",\"value\":\"t_bool\"},\"t_struct(ClaimData)1012_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"160\"},\"t_struct(OutputRoot)1013_storage\":{\"encoding\":\"inplace\",\"label\":\"struct OutputRoot\",\"numberOfBytes\":\"64\"},\"t_struct(ResolutionCheckpoint)1014_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ResolutionCheckpoint\",\"numberOfBytes\":\"64\"},\"t_uint128\":{\"encoding\":\"inplace\",\"label\":\"uint128\",\"numberOfBytes\":\"16\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1015\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1016\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1017\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Hash)1018\":{\"encoding\":\"inplace\",\"label\":\"Hash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Position)1019\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1020\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
var FaultDisputeGameStorageLayout = new(solc.StorageLayout)
var FaultDisputeGameDeployedBin = "0x6080604052600436106102bb5760003560e01c80638b85902b1161016e578063d6ae3cd5116100cb578063f8f43ff61161007f578063fa315aa911610064578063fa315aa914610978578063fdffbb28146109ab578063fe2bbeb2146109cb57600080fd5b8063f8f43ff614610934578063fa24f7431461095457600080fd5b8063dabd396d116100b0578063dabd396d1461088e578063ec5e6308146108c1578063eff0f592146108f457600080fd5b8063d6ae3cd51461083b578063d8cc1a3c1461086e57600080fd5b8063c395e1ca11610122578063c6f0308c11610107578063c6f0308c14610763578063cf09e0d0146107ed578063d5d44d801461080e57600080fd5b8063c395e1ca14610730578063c55cd0c71461075057600080fd5b8063bbdc02db11610153578063bbdc02db1461068f578063bcef3b55146106d0578063bd8da9561461071057600080fd5b80638b85902b1461061c5780638d450a951461065c57600080fd5b806357da950e1161021c5780636361506d116101d057806370872aa5116101b557806370872aa5146105ea5780638129fc1c146105ff5780638980e0cc1461060757600080fd5b80636361506d146105775780636b6716c0146105b757600080fd5b8063609d333411610201578063609d33341461052f57806360e2746414610544578063632247ea1461056457600080fd5b806357da950e146104cc5780635c0cba33146104fc57600080fd5b806335fef567116102735780633a768463116102585780633a768463146104105780633fc8cef31461044357806354fd4d501461047657600080fd5b806335fef5671461039a57806337b1b229146103af57600080fd5b806325fc2ace116102a457806325fc2ace146103465780632810e1d6146103655780632ad69aeb1461037a57600080fd5b806319effeb4146102c0578063200d2ed21461030b575b600080fd5b3480156102cc57600080fd5b506000546102ed9068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561031757600080fd5b5060005461033990700100000000000000000000000000000000900460ff1681565b60405161030291906142b6565b34801561035257600080fd5b506006545b604051908152602001610302565b34801561037157600080fd5b506103396109fb565b34801561038657600080fd5b506103576103953660046142f7565b610ca0565b6103ad6103a83660046142f7565b610cd1565b005b3480156103bb57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560601c5b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610302565b34801561041c57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006103eb565b34801561044f57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006103eb565b34801561048257600080fd5b506104bf6040518060400160405280600681526020017f302e31372e30000000000000000000000000000000000000000000000000000081525081565b6040516103029190614384565b3480156104d857600080fd5b506006546007546104e7919082565b60408051928352602083019190915201610302565b34801561050857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006103eb565b34801561053b57600080fd5b506104bf610ce6565b34801561055057600080fd5b506103ad61055f3660046143bc565b610cf4565b6103ad6105723660046143f5565b610ea0565b34801561058357600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360340135610357565b3480156105c357600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102ed565b3480156105f657600080fd5b50600754610357565b6103ad6117a0565b34801561061357600080fd5b50600154610357565b34801561062857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360540135610357565b34801561066857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610357565b34801561069b57600080fd5b5060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610302565b3480156106dc57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360140135610357565b34801561071c57600080fd5b506102ed61072b36600461442a565b611cf8565b34801561073c57600080fd5b5061035761074b366004614443565b611ed8565b6103ad61075e3660046142f7565b6120bb565b34801561076f57600080fd5b5061078361077e36600461442a565b6120c7565b6040805163ffffffff909816885273ffffffffffffffffffffffffffffffffffffffff968716602089015295909416948601949094526fffffffffffffffffffffffffffffffff9182166060860152608085015291821660a08401521660c082015260e001610302565b3480156107f957600080fd5b506000546102ed9067ffffffffffffffff1681565b34801561081a57600080fd5b506103576108293660046143bc565b60026020526000908152604090205481565b34801561084757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610357565b34801561087a57600080fd5b506103ad6108893660046144be565b61215e565b34801561089a57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006102ed565b3480156108cd57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610357565b34801561090057600080fd5b5061092461090f36600461442a565b60036020526000908152604090205460ff1681565b6040519015158152602001610302565b34801561094057600080fd5b506103ad61094f366004614548565b61278d565b34801561096057600080fd5b50610969612bed565b60405161030293929190614574565b34801561098457600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610357565b3480156109b757600080fd5b506103ad6109c636600461442a565b612c4d565b3480156109d757600080fd5b506109246109e636600461442a565b60056020526000908152604090205460ff1681565b600080600054700100000000000000000000000000000000900460ff166002811115610a2957610a29614287565b14610a60576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5460ff16610ac4576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166001600081548110610af057610af0614599565b6000918252602090912060059091020154640100000000900473ffffffffffffffffffffffffffffffffffffffff1614610b2b576001610b2e565b60025b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff90911617700100000000000000000000000000000000836002811115610bdf57610bdf614287565b021790556002811115610bf457610bf4614287565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a27f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663838c2d1e6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610c8557600080fd5b505af1158015610c99573d6000803e3d6000fd5b5050505090565b60046020528160005260406000208181548110610cbc57600080fd5b90600052602060002001600091509150505481565b610cdd82826000610ea0565b5050565b905090565b6060610ce16054602061305f565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040812080549082905590819003610d59576040517f17bfe5f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517ff3fef3a300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063f3fef3a390604401600060405180830381600087803b158015610de957600080fd5b505af1158015610dfd573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114610e5b576040519150601f19603f3d011682016040523d82523d6000602084013e610e60565b606091505b5050905080610e9b576040517f83e6cc6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60008054700100000000000000000000000000000000900460ff166002811115610ecc57610ecc614287565b14610f03576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018481548110610f1857610f18614599565b600091825260208083206040805160e0810182526005909402909101805463ffffffff808216865273ffffffffffffffffffffffffffffffffffffffff6401000000009092048216948601949094526001820154169184019190915260028101546fffffffffffffffffffffffffffffffff90811660608501526003820154608085015260049091015480821660a0850181905270010000000000000000000000000000000090910490911660c0840152919350909190610fdd90839086906130b116565b9050600061107d826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1690508615806110b857506110b57f000000000000000000000000000000000000000000000000000000000000000060026145f7565b81145b80156110c2575084155b156110f9576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000811115611153576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61117e7f000000000000000000000000000000000000000000000000000000000000000060016145f7565b810361119057611190868885886130b9565b3461119a83611ed8565b146111d1576040517f8620aa1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006111dc88611cf8565b905067ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811690821603611244576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001667ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166112a4919061460f565b67ffffffffffffffff166112bf8267ffffffffffffffff1690565b67ffffffffffffffff1611156113a15760006112fc60017f0000000000000000000000000000000000000000000000000000000000000000614638565b83146113325767ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016611367565b6113677f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16600261464f565b905061139d817f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff1661460f565b9150505b6000604082901b42176000898152608086901b6fffffffffffffffffffffffffffffffff8c1617602052604081209192509060008181526003602052604090205490915060ff161561141f576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016003600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060016040518060e001604052808c63ffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152602001346fffffffffffffffffffffffffffffffff1681526020018b8152602001876fffffffffffffffffffffffffffffffff168152602001846fffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160020160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506080820151816003015560a08201518160040160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060c08201518160040160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505050600460008b8152602001908152602001600020600180805490506116b49190614638565b81546001810183556000928352602083200155604080517fd0e30db0000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169263d0e30db09234926004808301939282900301818588803b15801561174c57600080fd5b505af1158015611760573d6000803e3d6000fd5b50506040513393508c92508d91507f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be90600090a450505050505050505050565b60005471010000000000000000000000000000000000900460ff16156117f2576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f7258a80700000000000000000000000000000000000000000000000000000000815263ffffffff7f0000000000000000000000000000000000000000000000000000000000000000166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690637258a807906024016040805180830381865afa1580156118a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ca919061467f565b909250905081611906576040517f6a6bc3b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091528281526020018190526006829055600781905536607a1461193957639824bdab6000526004601cfd5b80367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360540135116119d3576040517ff40239db000000000000000000000000000000000000000000000000000000008152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036014013560048201526024015b60405180910390fd5b6040805160e08101825263ffffffff8082526000602083018181527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90038035606090811c868801908152346fffffffffffffffffffffffffffffffff81811693890193845260149094013560808901908152600160a08a0181815242871660c08c0190815282548084018455928a529a5160059092027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf681018054995173ffffffffffffffffffffffffffffffffffffffff908116640100000000027fffffffffffffffff000000000000000000000000000000000000000000000000909b1694909c16939093179890981790915592517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf787018054918a167fffffffffffffffffffffffff000000000000000000000000000000000000000090921691909117905592517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8860180549186167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921691909117905591517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf985015551955182167001000000000000000000000000000000000295909116949094177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa9091015580547fffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffff167101000000000000000000000000000000000017815583517fd0e30db000000000000000000000000000000000000000000000000000000000815293517f00000000000000000000000000000000000000000000000000000000000000009092169363d0e30db093926004828101939282900301818588803b158015611ca757600080fd5b505af1158015611cbb573d6000803e3d6000fd5b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161790555050505050565b600080600054700100000000000000000000000000000000900460ff166002811115611d2657611d26614287565b14611d5d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018381548110611d7257611d72614599565b600091825260208220600590910201805490925063ffffffff90811614611de157815460018054909163ffffffff16908110611db057611db0614599565b906000526020600020906005020160040160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b6004820154600090611e1990700100000000000000000000000000000000900467ffffffffffffffff165b67ffffffffffffffff1690565b611e2d9067ffffffffffffffff1642614638565b611e4c611e0c846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16611e6091906145f7565b905067ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001667ffffffffffffffff168167ffffffffffffffff1611611ead5780611ecf565b7f00000000000000000000000000000000000000000000000000000000000000005b95945050505050565b600080611f77836fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1690507f0000000000000000000000000000000000000000000000000000000000000000811115611fd6576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b642e90edd00062061a80630bebc2006000611ff183836146d2565b9050670de0b6b3a76400006000612028827f00000000000000000000000000000000000000000000000000000000000000006146e6565b90506000612046612041670de0b6b3a7640000866146e6565b613273565b9050600061205484846134ce565b90506000612062838361351d565b9050600061206f8261354b565b9050600061208e82612089670de0b6b3a76400008f6146e6565b613733565b9050600061209c8b8361351d565b90506120a8818d6146e6565b9f9e505050505050505050505050505050565b610cdd82826001610ea0565b600181815481106120d757600080fd5b60009182526020909120600590910201805460018201546002830154600384015460049094015463ffffffff8416955064010000000090930473ffffffffffffffffffffffffffffffffffffffff908116949216926fffffffffffffffffffffffffffffffff91821692918082169170010000000000000000000000000000000090041687565b60008054700100000000000000000000000000000000900460ff16600281111561218a5761218a614287565b146121c1576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600187815481106121d6576121d6614599565b6000918252602082206005919091020160048101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506122357f000000000000000000000000000000000000000000000000000000000000000060016145f7565b6122d1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff161461230b576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156124025761235e7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000614638565b6001901b61237d846fffffffffffffffffffffffffffffffff1661376d565b6fffffffffffffffffffffffffffffffff166123999190614723565b156123d6576123cd6123be60016fffffffffffffffffffffffffffffffff8716614737565b865463ffffffff16600061380c565b600301546123f8565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061242c565b600385015491506124296123be6fffffffffffffffffffffffffffffffff86166001614760565b90505b600882901b60088a8a604051612443929190614794565b6040518091039020901b14612484576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061248f8c6138f0565b9050600061249e836003015490565b6040517fe14ced320000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063e14ced3290612518908f908f908f908f908a906004016147ed565b6020604051808303816000875af1158015612537573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255b9190614827565b600485015491149150600090600290612606906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6126a2896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6126ac9190614840565b6126b69190614863565b60ff1615905081151581036126f7576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8754640100000000900473ffffffffffffffffffffffffffffffffffffffff161561274e576040517f9071e6af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffff0000000000000000000000000000000000000000ffffffff163364010000000002179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156127b9576127b9614287565b146127f0576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806000806127ff8661391f565b9350935093509350600061281585858585613d28565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128a89190614885565b9050600189036129a35773ffffffffffffffffffffffffffffffffffffffff81166352f0f3ad8a84612907367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036034013590565b90565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815260048101939093526024830191909152604482015260206064820152608481018a905260a4015b6020604051808303816000875af1158015612979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299d9190614827565b50612be2565b600289036129cf5773ffffffffffffffffffffffffffffffffffffffff81166352f0f3ad8a8489612907565b600389036129fb5773ffffffffffffffffffffffffffffffffffffffff81166352f0f3ad8a8487612907565b60048903612b17576000612a416fffffffffffffffffffffffffffffffff85167f0000000000000000000000000000000000000000000000000000000000000000613de2565b600754612a4e91906145f7565b612a599060016145f7565b905073ffffffffffffffffffffffffffffffffffffffff82166352f0f3ad8b8560405160e084901b7fffffffff000000000000000000000000000000000000000000000000000000001681526004810192909252602482015260c084901b604482015260086064820152608481018b905260a4016020604051808303816000875af1158015612aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b109190614827565b5050612be2565b60058903612bb0576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390527f000000000000000000000000000000000000000000000000000000000000000060c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161295a565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003601401356060612c46610ce6565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115612c7957612c79614287565b14612cb0576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018281548110612cc557612cc5614599565b906000526020600020906005020190506000612ce083611cf8565b905067ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169082161015612d49576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526005602052604090205460ff1615612d92576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600460205260409020805480158015612daf57508415155b15612e49578354640100000000900473ffffffffffffffffffffffffffffffffffffffff1660008115612de25781612dfe565b600186015473ffffffffffffffffffffffffffffffffffffffff165b9050612e0a8187613e90565b505050600093845250506005602052506040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60006fffffffffffffffffffffffffffffffff815b83811015612f91576000858281548110612e7a57612e7a614599565b6000918252602080832090910154808352600590915260409091205490915060ff16612ed2576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018281548110612ee757612ee7614599565b600091825260209091206005909102018054909150640100000000900473ffffffffffffffffffffffffffffffffffffffff16158015612f40575060048101546fffffffffffffffffffffffffffffffff908116908516115b15612f7e576001810154600482015473ffffffffffffffffffffffffffffffffffffffff90911695506fffffffffffffffffffffffffffffffff1693505b505080612f8a906148a2565b9050612e5e565b50612fd973ffffffffffffffffffffffffffffffffffffffff831615612fb75782612fd3565b600187015473ffffffffffffffffffffffffffffffffffffffff165b87613e90565b50845473ffffffffffffffffffffffffffffffffffffffff909116640100000000027fffffffffffffffff0000000000000000000000000000000000000000ffffffff90911617909355505050600090815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b604051818152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90038284820160208401378260208301016000815260208101604052505092915050565b151760011b90565b60006130d86fffffffffffffffffffffffffffffffff84166001614760565b905060006130e88286600161380c565b9050600086901a83806131d4575061312160027f0000000000000000000000000000000000000000000000000000000000000000614723565b60048301546002906131c5906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6131cf9190614863565b60ff16145b1561322c5760ff8116600114806131ee575060ff81166002145b613227576040517ff40239db000000000000000000000000000000000000000000000000000000008152600481018890526024016119ca565b61326a565b60ff81161561326a576040517ff40239db000000000000000000000000000000000000000000000000000000008152600481018890526024016119ca565b50505050505050565b6fffffffffffffffffffffffffffffffff811160071b81811c67ffffffffffffffff1060061b1781811c63ffffffff1060051b1781811c61ffff1060041b1781811c60ff1060031b17600082136132d257631615e6386000526004601cfd5b7ff8f9f9faf9fdfafbf9fdfcfdfafbfcfef9fafdfafcfcfbfefafafcfbffffffff6f8421084210842108cc6318c6db6d54be83831c1c601f161a1890811b609f90811c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506029190037d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b302017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d90565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f218311670de0b6b3a76400000215820261350b57637c5f487d6000526004601cfd5b50670de0b6b3a7640000919091020490565b60008160001904831182021561353b5763bac65e5b6000526004601cfd5b50670de0b6b3a764000091020490565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdc0d0570925a462d7821361357957919050565b680755bf798b4a1bf1e582126135975763a37bfec96000526004601cfd5b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b6000613764670de0b6b3a76400008361374b86613273565b61375591906148da565b61375f9190614996565b61354b565b90505b92915050565b6000806137fa837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600160ff919091161b90920392915050565b60008082613855576138506fffffffffffffffffffffffffffffffff86167f0000000000000000000000000000000000000000000000000000000000000000613f89565b613870565b613870856fffffffffffffffffffffffffffffffff16614139565b90506001848154811061388557613885614599565b906000526020600020906005020191505b60048201546fffffffffffffffffffffffffffffffff8281169116146138e857815460018054909163ffffffff169081106138d3576138d3614599565b90600052602060002090600502019150613896565b509392505050565b60008060008060006139018661391f565b935093509350935061391584848484613d28565b9695505050505050565b600080600080600085905060006001828154811061393f5761393f614599565b600091825260209091206004600590920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090613a16906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1611613a50576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60048301547f000000000000000000000000000000000000000000000000000000000000000090613b17906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff169250821115613b8c57825463ffffffff16613b567f000000000000000000000000000000000000000000000000000000000000000060016145f7565b8303613b60578391505b60018181548110613b7357613b73614599565b9060005260206000209060050201935080945050613a54565b600481810154908401546fffffffffffffffffffffffffffffffff91821691166000816fffffffffffffffffffffffffffffffff16613bf5613be0856fffffffffffffffffffffffffffffffff1660011c90565b6fffffffffffffffffffffffffffffffff1690565b6fffffffffffffffffffffffffffffffff161490508015613cc4576000613c2d836fffffffffffffffffffffffffffffffff1661376d565b6fffffffffffffffffffffffffffffffff161115613c98576000613c6f613c6760016fffffffffffffffffffffffffffffffff8616614737565b89600161380c565b6003810154600490910154909c506fffffffffffffffffffffffffffffffff169a50613c9e9050565b6006549a505b600386015460048701549099506fffffffffffffffffffffffffffffffff169750613d1a565b6000613ce6613c676fffffffffffffffffffffffffffffffff85166001614760565b6003808901546004808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b60006fffffffffffffffffffffffffffffffff841615613d955760408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a00160405160208183030381529060405280519060200120611ecf565b8282604051602001613dc39291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b6040516020818303038152906040528051906020012095945050505050565b600080613e6f847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1690508083036001841b600180831b0386831b17039250505092915050565b60028082015473ffffffffffffffffffffffffffffffffffffffff841660009081526020929092526040822080546fffffffffffffffffffffffffffffffff909216928392613ee09084906145f7565b90915550506040517f7eee288d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690637eee288d90604401600060405180830381600087803b158015613f7557600080fd5b505af115801561326a573d6000803e3d6000fd5b600081614028846fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1611614062576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61406b83614139565b90508161410a826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1611613767576137646141208360016145f7565b6fffffffffffffffffffffffffffffffff8316906141de565b600081196001830116816141cd827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff169390931c8015179392505050565b60008061426b847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff169050808303600180821b0385821b179250505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106142f1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561430a57600080fd5b50508035926020909101359150565b6000815180845260005b8181101561433f57602081850181015186830182015201614323565b81811115614351576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006137646020830184614319565b73ffffffffffffffffffffffffffffffffffffffff811681146143b957600080fd5b50565b6000602082840312156143ce57600080fd5b81356143d981614397565b9392505050565b803580151581146143f057600080fd5b919050565b60008060006060848603121561440a57600080fd5b8335925060208401359150614421604085016143e0565b90509250925092565b60006020828403121561443c57600080fd5b5035919050565b60006020828403121561445557600080fd5b81356fffffffffffffffffffffffffffffffff811681146143d957600080fd5b60008083601f84011261448757600080fd5b50813567ffffffffffffffff81111561449f57600080fd5b6020830191508360208285010111156144b757600080fd5b9250929050565b600080600080600080608087890312156144d757600080fd5b863595506144e7602088016143e0565b9450604087013567ffffffffffffffff8082111561450457600080fd5b6145108a838b01614475565b9096509450606089013591508082111561452957600080fd5b5061453689828a01614475565b979a9699509497509295939492505050565b60008060006060848603121561455d57600080fd5b505081359360208301359350604090920135919050565b63ffffffff84168152826020820152606060408201526000611ecf6060830184614319565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561460a5761460a6145c8565b500190565b600067ffffffffffffffff83811690831681811015614630576146306145c8565b039392505050565b60008282101561464a5761464a6145c8565b500390565b600067ffffffffffffffff80831681851681830481118215151615614676576146766145c8565b02949350505050565b6000806040838503121561469257600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826146e1576146e16146a3565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561471e5761471e6145c8565b500290565b600082614732576147326146a3565b500690565b60006fffffffffffffffffffffffffffffffff83811690831681811015614630576146306145c8565b60006fffffffffffffffffffffffffffffffff80831681851680830382111561478b5761478b6145c8565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6060815260006148016060830187896147a4565b82810360208401526148148186886147a4565b9150508260408301529695505050505050565b60006020828403121561483957600080fd5b5051919050565b600060ff821660ff84168082101561485a5761485a6145c8565b90039392505050565b600060ff831680614876576148766146a3565b8060ff84160691505092915050565b60006020828403121561489757600080fd5b81516143d981614397565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036148d3576148d36145c8565b5060010190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60008413600084138583048511828216161561491b5761491b6145c8565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615614956576149566145c8565b60008712925087820587128484161615614972576149726145c8565b87850587128184161615614988576149886145c8565b505050929093029392505050565b6000826149a5576149a56146a3565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f8000000000000000000000000000000000000000000000000000000000000000831416156149f9576149f96145c8565b50059056fea164736f6c634300080f000a"
var FaultDisputeGameDeployedBin = "0x6080604052600436106102d15760003560e01c80638980e0cc11610179578063cf09e0d0116100d6578063ec5e63081161008a578063fa24f74311610064578063fa24f74314610a76578063fa315aa914610a9a578063fe2bbeb214610acd57600080fd5b8063ec5e6308146109e3578063eff0f59214610a16578063f8f43ff614610a5657600080fd5b8063d6ae3cd5116100bb578063d6ae3cd51461095d578063d8cc1a3c14610990578063dabd396d146109b057600080fd5b8063cf09e0d01461090f578063d5d44d801461093057600080fd5b8063bcef3b551161012d578063c395e1ca11610112578063c395e1ca14610852578063c55cd0c714610872578063c6f0308c1461088557600080fd5b8063bcef3b55146107f2578063bd8da9561461083257600080fd5b80638d450a951161015e5780638d450a95146106b2578063a445ece6146106e5578063bbdc02db146107b157600080fd5b80638980e0cc1461065d5780638b85902b1461067257600080fd5b806354fd4d501161023257806360e27464116101e65780636b6716c0116101c05780636b6716c01461060d57806370872aa5146106405780638129fc1c1461065557600080fd5b806360e274641461059a578063632247ea146105ba5780636361506d146105cd57600080fd5b80635a5fa2d9116102175780635a5fa2d9146105325780635c0cba3314610552578063609d33341461058557600080fd5b806354fd4d50146104ac57806357da950e1461050257600080fd5b80632ad69aeb1161028957806337b1b2291161026e57806337b1b229146103e55780633a768463146104465780633fc8cef31461047957600080fd5b80632ad69aeb146103b257806335fef567146103d257600080fd5b8063200d2ed2116102ba578063200d2ed21461034357806325fc2ace1461037e5780632810e1d61461039d57600080fd5b806303c2924d146102d657806319effeb4146102f8575b600080fd5b3480156102e257600080fd5b506102f66102f136600461459e565b610afd565b005b34801561030457600080fd5b506000546103259068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561034f57600080fd5b5060005461037190700100000000000000000000000000000000900460ff1681565b60405161033a91906145ef565b34801561038a57600080fd5b506007545b60405190815260200161033a565b3480156103a957600080fd5b506103716110f6565b3480156103be57600080fd5b5061038f6103cd36600461459e565b61139b565b6102f66103e036600461459e565b6113cc565b3480156103f157600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033560601c5b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161033a565b34801561045257600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610421565b34801561048557600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610421565b3480156104b857600080fd5b506104f56040518060400160405280600681526020017f302e31382e30000000000000000000000000000000000000000000000000000081525081565b60405161033a919061469b565b34801561050e57600080fd5b5060075460085461051d919082565b6040805192835260208301919091520161033a565b34801561053e57600080fd5b5061038f61054d3660046146ae565b6113e1565b34801561055e57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610421565b34801561059157600080fd5b506104f561141b565b3480156105a657600080fd5b506102f66105b53660046146ec565b611429565b6102f66105c8366004614725565b6115d5565b3480156105d957600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036034013561038f565b34801561061957600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610325565b34801561064c57600080fd5b5060085461038f565b6102f6611ed5565b34801561066957600080fd5b5060015461038f565b34801561067e57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036054013561038f565b3480156106be57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061038f565b3480156106f157600080fd5b5061075d6107003660046146ae565b6006602052600090815260409020805460019091015460ff821691610100810463ffffffff1691650100000000009091046fffffffffffffffffffffffffffffffff169073ffffffffffffffffffffffffffffffffffffffff1684565b60408051941515855263ffffffff90931660208501526fffffffffffffffffffffffffffffffff9091169183019190915273ffffffffffffffffffffffffffffffffffffffff16606082015260800161033a565b3480156107bd57600080fd5b5060405163ffffffff7f000000000000000000000000000000000000000000000000000000000000000016815260200161033a565b3480156107fe57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036014013561038f565b34801561083e57600080fd5b5061032561084d3660046146ae565b61242d565b34801561085e57600080fd5b5061038f61086d36600461475a565b61260c565b6102f661088036600461459e565b6127ef565b34801561089157600080fd5b506108a56108a03660046146ae565b6127fb565b6040805163ffffffff909816885273ffffffffffffffffffffffffffffffffffffffff968716602089015295909416948601949094526fffffffffffffffffffffffffffffffff9182166060860152608085015291821660a08401521660c082015260e00161033a565b34801561091b57600080fd5b506000546103259067ffffffffffffffff1681565b34801561093c57600080fd5b5061038f61094b3660046146ec565b60026020526000908152604090205481565b34801561096957600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061038f565b34801561099c57600080fd5b506102f66109ab3660046147d5565b612892565b3480156109bc57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610325565b3480156109ef57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061038f565b348015610a2257600080fd5b50610a46610a313660046146ae565b60036020526000908152604090205460ff1681565b604051901515815260200161033a565b348015610a6257600080fd5b506102f6610a7136600461485f565b612ec1565b348015610a8257600080fd5b50610a8b613316565b60405161033a9392919061488b565b348015610aa657600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061038f565b348015610ad957600080fd5b50610a46610ae83660046146ae565b60056020526000908152604090205460ff1681565b60008054700100000000000000000000000000000000900460ff166002811115610b2957610b296145c0565b14610b60576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018381548110610b7557610b756148b0565b906000526020600020906005020190506000610b908461242d565b905067ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169082161015610bf9576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526005602052604090205460ff1615610c42576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848152600460205260409020805480158015610c5f57508515155b15610cfa578354640100000000900473ffffffffffffffffffffffffffffffffffffffff1660008115610c925781610cae565b600186015473ffffffffffffffffffffffffffffffffffffffff165b9050610cba8187613376565b50505060009485525050600560205250506040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6000868152600660209081526040918290208251608081018452815460ff81161515808352610100820463ffffffff16948301949094526501000000000090046fffffffffffffffffffffffffffffffff16938101939093526001015473ffffffffffffffffffffffffffffffffffffffff166060830152610d9d576fffffffffffffffffffffffffffffffff6040820152600181526000869003610d9d578195505b600086826020015163ffffffff16610db5919061490e565b90506000838211610dc65781610dc8565b835b602084015190915063ffffffff165b81811015610f14576000868281548110610df357610df36148b0565b6000918252602080832090910154808352600590915260409091205490915060ff16610e4b576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018281548110610e6057610e606148b0565b600091825260209091206005909102018054909150640100000000900473ffffffffffffffffffffffffffffffffffffffff16158015610ebd5750600481015460408701516fffffffffffffffffffffffffffffffff9182169116115b15610eff57600181015473ffffffffffffffffffffffffffffffffffffffff16606087015260048101546fffffffffffffffffffffffffffffffff1660408701525b50508080610f0c90614926565b915050610dd7565b5063ffffffff818116602085810191825260008c81526006909152604090819020865181549351928801517fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009094169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000ff161761010092909416918202939093177fffffffffffffffffffffff00000000000000000000000000000000ffffffffff16650100000000006fffffffffffffffffffffffffffffffff909316929092029190911782556060850151600190920180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909316929092179091558490036110eb57606083015187547fffffffffffffffff0000000000000000000000000000000000000000ffffffff1664010000000073ffffffffffffffffffffffffffffffffffffffff831690810291909117895560008b815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556110e990156110c757816110e3565b600189015473ffffffffffffffffffffffffffffffffffffffff165b89613376565b505b505050505050505050565b600080600054700100000000000000000000000000000000900460ff166002811115611124576111246145c0565b1461115b576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805260056020527f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bc5460ff166111bf576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660016000815481106111eb576111eb6148b0565b6000918252602090912060059091020154640100000000900473ffffffffffffffffffffffffffffffffffffffff1614611226576001611229565b60025b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff909116177001000000000000000000000000000000008360028111156112da576112da6145c0565b0217905560028111156112ef576112ef6145c0565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a27f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663838c2d1e6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561138057600080fd5b505af1158015611394573d6000803e3d6000fd5b5050505090565b600460205281600052604060002081815481106113b757600080fd5b90600052602060002001600091509150505481565b6113d8828260006115d5565b5050565b905090565b6000818152600660209081526040808320600490925282208054825461141290610100900463ffffffff168261495e565b95945050505050565b60606113dc60546020613478565b73ffffffffffffffffffffffffffffffffffffffff811660009081526002602052604081208054908290559081900361148e576040517f17bfe5f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517ff3fef3a300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063f3fef3a390604401600060405180830381600087803b15801561151e57600080fd5b505af1158015611532573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114611590576040519150601f19603f3d011682016040523d82523d6000602084013e611595565b606091505b50509050806115d0576040517f83e6cc6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b60008054700100000000000000000000000000000000900460ff166002811115611601576116016145c0565b14611638576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001848154811061164d5761164d6148b0565b600091825260208083206040805160e0810182526005909402909101805463ffffffff808216865273ffffffffffffffffffffffffffffffffffffffff6401000000009092048216948601949094526001820154169184019190915260028101546fffffffffffffffffffffffffffffffff90811660608501526003820154608085015260049091015480821660a0850181905270010000000000000000000000000000000090910490911660c084015291935090919061171290839086906134ca16565b905060006117b2826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1690508615806117ed57506117ea7f0000000000000000000000000000000000000000000000000000000000000000600261490e565b81145b80156117f7575084155b1561182e576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000811115611888576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118b37f0000000000000000000000000000000000000000000000000000000000000000600161490e565b81036118c5576118c5868885886134d2565b346118cf8361260c565b14611906576040517f8620aa1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006119118861242d565b905067ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811690821603611979576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001667ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166119d99190614975565b67ffffffffffffffff166119f48267ffffffffffffffff1690565b67ffffffffffffffff161115611ad6576000611a3160017f000000000000000000000000000000000000000000000000000000000000000061495e565b8314611a675767ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016611a9c565b611a9c7f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16600261499e565b9050611ad2817f000000000000000000000000000000000000000000000000000000000000000067ffffffffffffffff16614975565b9150505b6000604082901b42176000898152608086901b6fffffffffffffffffffffffffffffffff8c1617602052604081209192509060008181526003602052604090205490915060ff1615611b54576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016003600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060016040518060e001604052808c63ffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152602001346fffffffffffffffffffffffffffffffff1681526020018b8152602001876fffffffffffffffffffffffffffffffff168152602001846fffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160020160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506080820151816003015560a08201518160040160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060c08201518160040160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505050600460008b815260200190815260200160002060018080549050611de9919061495e565b81546001810183556000928352602083200155604080517fd0e30db0000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169263d0e30db09234926004808301939282900301818588803b158015611e8157600080fd5b505af1158015611e95573d6000803e3d6000fd5b50506040513393508c92508d91507f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be90600090a450505050505050505050565b60005471010000000000000000000000000000000000900460ff1615611f27576040517f0dc149f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f7258a80700000000000000000000000000000000000000000000000000000000815263ffffffff7f0000000000000000000000000000000000000000000000000000000000000000166004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690637258a807906024016040805180830381865afa158015611fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fff91906149ce565b90925090508161203b576040517f6a6bc3b200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080518082019091528281526020018190526007829055600881905536607a1461206e57639824bdab6000526004601cfd5b80367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036054013511612108576040517ff40239db000000000000000000000000000000000000000000000000000000008152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036014013560048201526024015b60405180910390fd5b6040805160e08101825263ffffffff8082526000602083018181527ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90038035606090811c868801908152346fffffffffffffffffffffffffffffffff81811693890193845260149094013560808901908152600160a08a0181815242871660c08c0190815282548084018455928a529a5160059092027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf681018054995173ffffffffffffffffffffffffffffffffffffffff908116640100000000027fffffffffffffffff000000000000000000000000000000000000000000000000909b1694909c16939093179890981790915592517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf787018054918a167fffffffffffffffffffffffff000000000000000000000000000000000000000090921691909117905592517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8860180549186167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921691909117905591517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf985015551955182167001000000000000000000000000000000000295909116949094177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cfa9091015580547fffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffff167101000000000000000000000000000000000017815583517fd0e30db000000000000000000000000000000000000000000000000000000000815293517f00000000000000000000000000000000000000000000000000000000000000009092169363d0e30db093926004828101939282900301818588803b1580156123dc57600080fd5b505af11580156123f0573d6000803e3d6000fd5b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161790555050505050565b600080600054700100000000000000000000000000000000900460ff16600281111561245b5761245b6145c0565b14612492576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600183815481106124a7576124a76148b0565b600091825260208220600590910201805490925063ffffffff9081161461251657815460018054909163ffffffff169081106124e5576124e56148b0565b906000526020600020906005020160040160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b600482015460009061254e90700100000000000000000000000000000000900467ffffffffffffffff165b67ffffffffffffffff1690565b6125629067ffffffffffffffff164261495e565b612581612541846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16612595919061490e565b905067ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001667ffffffffffffffff168167ffffffffffffffff16116125e25780611412565b7f000000000000000000000000000000000000000000000000000000000000000095945050505050565b6000806126ab836fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1690507f000000000000000000000000000000000000000000000000000000000000000081111561270a576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b642e90edd00062061a80630bebc20060006127258383614a21565b9050670de0b6b3a7640000600061275c827f0000000000000000000000000000000000000000000000000000000000000000614a35565b9050600061277a612775670de0b6b3a764000086614a35565b613683565b9050600061278884846138de565b90506000612796838361392d565b905060006127a38261395b565b905060006127c2826127bd670de0b6b3a76400008f614a35565b613b43565b905060006127d08b8361392d565b90506127dc818d614a35565b9f9e505050505050505050505050505050565b6113d8828260016115d5565b6001818154811061280b57600080fd5b60009182526020909120600590910201805460018201546002830154600384015460049094015463ffffffff8416955064010000000090930473ffffffffffffffffffffffffffffffffffffffff908116949216926fffffffffffffffffffffffffffffffff91821692918082169170010000000000000000000000000000000090041687565b60008054700100000000000000000000000000000000900460ff1660028111156128be576128be6145c0565b146128f5576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001878154811061290a5761290a6148b0565b6000918252602082206005919091020160048101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506129697f0000000000000000000000000000000000000000000000000000000000000000600161490e565b612a05826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1614612a3f576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808915612b3657612a927f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061495e565b6001901b612ab1846fffffffffffffffffffffffffffffffff16613b7d565b6fffffffffffffffffffffffffffffffff16612acd9190614a72565b15612b0a57612b01612af260016fffffffffffffffffffffffffffffffff8716614a86565b865463ffffffff166000613c1c565b60030154612b2c565b7f00000000000000000000000000000000000000000000000000000000000000005b9150849050612b60565b60038501549150612b5d612af26fffffffffffffffffffffffffffffffff86166001614aaf565b90505b600882901b60088a8a604051612b77929190614ae3565b6040518091039020901b14612bb8576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612bc38c613d00565b90506000612bd2836003015490565b6040517fe14ced320000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063e14ced3290612c4c908f908f908f908f908a90600401614b3c565b6020604051808303816000875af1158015612c6b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c8f9190614b76565b600485015491149150600090600290612d3a906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b612dd6896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b612de09190614b8f565b612dea9190614bb2565b60ff161590508115158103612e2b576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8754640100000000900473ffffffffffffffffffffffffffffffffffffffff1615612e82576040517f9071e6af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffff0000000000000000000000000000000000000000ffffffff163364010000000002179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff166002811115612eed57612eed6145c0565b14612f24576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600080612f3386613d2f565b93509350935093506000612f4985858585614138565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612fb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fdc9190614bd4565b9050600189036130d75773ffffffffffffffffffffffffffffffffffffffff81166352f0f3ad8a8461303b367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036034013590565b90565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b16815260048101939093526024830191909152604482015260206064820152608481018a905260a4015b6020604051808303816000875af11580156130ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d19190614b76565b506110eb565b600289036131035773ffffffffffffffffffffffffffffffffffffffff81166352f0f3ad8a848961303b565b6003890361312f5773ffffffffffffffffffffffffffffffffffffffff81166352f0f3ad8a848761303b565b6004890361324b5760006131756fffffffffffffffffffffffffffffffff85167f00000000000000000000000000000000000000000000000000000000000000006141f2565b600854613182919061490e565b61318d90600161490e565b905073ffffffffffffffffffffffffffffffffffffffff82166352f0f3ad8b8560405160e084901b7fffffffff000000000000000000000000000000000000000000000000000000001681526004810192909252602482015260c084901b604482015260086064820152608481018b905260a4016020604051808303816000875af1158015613220573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132449190614b76565b50506110eb565b600589036132e4576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390527f000000000000000000000000000000000000000000000000000000000000000060c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161308e565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360140135606061336f61141b565b9050909192565b60028082015473ffffffffffffffffffffffffffffffffffffffff841660009081526020929092526040822080546fffffffffffffffffffffffffffffffff9092169283926133c690849061490e565b90915550506040517f7eee288d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018390527f00000000000000000000000000000000000000000000000000000000000000001690637eee288d90604401600060405180830381600087803b15801561345b57600080fd5b505af115801561346f573d6000803e3d6000fd5b50505050505050565b604051818152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90038284820160208401378260208301016000815260208101604052505092915050565b151760011b90565b60006134f16fffffffffffffffffffffffffffffffff84166001614aaf565b9050600061350182866001613c1c565b9050600086901a83806135ed575061353a60027f0000000000000000000000000000000000000000000000000000000000000000614a72565b60048301546002906135de906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6135e89190614bb2565b60ff16145b156136455760ff811660011480613607575060ff81166002145b613640576040517ff40239db000000000000000000000000000000000000000000000000000000008152600481018890526024016120ff565b61346f565b60ff81161561346f576040517ff40239db000000000000000000000000000000000000000000000000000000008152600481018890526024016120ff565b6fffffffffffffffffffffffffffffffff811160071b81811c67ffffffffffffffff1060061b1781811c63ffffffff1060051b1781811c61ffff1060041b1781811c60ff1060031b17600082136136e257631615e6386000526004601cfd5b7ff8f9f9faf9fdfafbf9fdfcfdfafbfcfef9fafdfafcfcfbfefafafcfbffffffff6f8421084210842108cc6318c6db6d54be83831c1c601f161a1890811b609f90811c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d7fffffffffffffffffffffffffffffffffffffff73c0c716a594e00d54e3c4cbc9018302821d7ffffffffffffffffffffffffffffffffffffffdc7b88c420e53a9890533129f6f01830290911d7fffffffffffffffffffffffffffffffffffffff465fda27eb4d63ded474e5f832019091027ffffffffffffffff5f6af8f7b3396644f18e157960000000000000000000000000105711340daa0d5f769dba1915cef59f0815a5506029190037d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b302017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d90565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f218311670de0b6b3a76400000215820261391b57637c5f487d6000526004601cfd5b50670de0b6b3a7640000919091020490565b60008160001904831182021561394b5763bac65e5b6000526004601cfd5b50670de0b6b3a764000091020490565b60007ffffffffffffffffffffffffffffffffffffffffffffffffdc0d0570925a462d7821361398957919050565b680755bf798b4a1bf1e582126139a75763a37bfec96000526004601cfd5b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056b80000000000000000000000001901d6bb17217f7d1cf79abc9e3b39881029093037fffffffffffffffffffffffffffffffffffffffdbf3ccf1604d263450f02a550481018102606090811d6d0277594991cfc85f6e2461837cd9018202811d7fffffffffffffffffffffffffffffffffffffe5adedaa1cb095af9e4da10e363c018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d7ffffffffffffffffffffffffffffffffffffd38dc772608b0ae56cce01296c0eb018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084017ffffffffffffffffffffffffffffffffffffffe2c69812cf03b0763fd454a8f7e010290911d6e0587f503bb6ea29d25fcb7401964500190910279d835ebba824c98fb31b83b2ca45c000000000000000000000000010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b6000613b74670de0b6b3a764000083613b5b86613683565b613b659190614bf1565b613b6f9190614cad565b61395b565b90505b92915050565b600080613c0a837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600160ff919091161b90920392915050565b60008082613c6557613c606fffffffffffffffffffffffffffffffff86167f00000000000000000000000000000000000000000000000000000000000000006142a0565b613c80565b613c80856fffffffffffffffffffffffffffffffff16614450565b905060018481548110613c9557613c956148b0565b906000526020600020906005020191505b60048201546fffffffffffffffffffffffffffffffff828116911614613cf857815460018054909163ffffffff16908110613ce357613ce36148b0565b90600052602060002090600502019150613ca6565b509392505050565b6000806000806000613d1186613d2f565b9350935093509350613d2584848484614138565b9695505050505050565b6000806000806000859050600060018281548110613d4f57613d4f6148b0565b600091825260209091206004600590920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090613e26906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1611613e60576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60048301547f000000000000000000000000000000000000000000000000000000000000000090613f27906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff169250821115613f9c57825463ffffffff16613f667f0000000000000000000000000000000000000000000000000000000000000000600161490e565b8303613f70578391505b60018181548110613f8357613f836148b0565b9060005260206000209060050201935080945050613e64565b600481810154908401546fffffffffffffffffffffffffffffffff91821691166000816fffffffffffffffffffffffffffffffff16614005613ff0856fffffffffffffffffffffffffffffffff1660011c90565b6fffffffffffffffffffffffffffffffff1690565b6fffffffffffffffffffffffffffffffff1614905080156140d457600061403d836fffffffffffffffffffffffffffffffff16613b7d565b6fffffffffffffffffffffffffffffffff1611156140a857600061407f61407760016fffffffffffffffffffffffffffffffff8616614a86565b896001613c1c565b6003810154600490910154909c506fffffffffffffffffffffffffffffffff169a506140ae9050565b6007549a505b600386015460048701549099506fffffffffffffffffffffffffffffffff16975061412a565b60006140f66140776fffffffffffffffffffffffffffffffff85166001614aaf565b6003808901546004808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b60006fffffffffffffffffffffffffffffffff8416156141a55760408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a00160405160208183030381529060405280519060200120611412565b82826040516020016141d39291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b6040516020818303038152906040528051906020012095945050505050565b60008061427f847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1690508083036001841b600180831b0386831b17039250505092915050565b60008161433f846fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1611614379576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61438283614450565b905081614421826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff1611613b7757613b7461443783600161490e565b6fffffffffffffffffffffffffffffffff8316906144f5565b600081196001830116816144e4827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff169390931c8015179392505050565b600080614582847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60ff169050808303600180821b0385821b179250505092915050565b600080604083850312156145b157600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061462a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000815180845260005b818110156146565760208185018101518683018201520161463a565b81811115614668576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613b746020830184614630565b6000602082840312156146c057600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff811681146146e957600080fd5b50565b6000602082840312156146fe57600080fd5b8135614709816146c7565b9392505050565b8035801515811461472057600080fd5b919050565b60008060006060848603121561473a57600080fd5b833592506020840135915061475160408501614710565b90509250925092565b60006020828403121561476c57600080fd5b81356fffffffffffffffffffffffffffffffff8116811461470957600080fd5b60008083601f84011261479e57600080fd5b50813567ffffffffffffffff8111156147b657600080fd5b6020830191508360208285010111156147ce57600080fd5b9250929050565b600080600080600080608087890312156147ee57600080fd5b863595506147fe60208801614710565b9450604087013567ffffffffffffffff8082111561481b57600080fd5b6148278a838b0161478c565b9096509450606089013591508082111561484057600080fd5b5061484d89828a0161478c565b979a9699509497509295939492505050565b60008060006060848603121561487457600080fd5b505081359360208301359350604090920135919050565b63ffffffff841681528260208201526060604082015260006114126060830184614630565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115614921576149216148df565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614957576149576148df565b5060010190565b600082821015614970576149706148df565b500390565b600067ffffffffffffffff83811690831681811015614996576149966148df565b039392505050565b600067ffffffffffffffff808316818516818304811182151516156149c5576149c56148df565b02949350505050565b600080604083850312156149e157600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614a3057614a306149f2565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614a6d57614a6d6148df565b500290565b600082614a8157614a816149f2565b500690565b60006fffffffffffffffffffffffffffffffff83811690831681811015614996576149966148df565b60006fffffffffffffffffffffffffffffffff808316818516808303821115614ada57614ada6148df565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000614b50606083018789614af3565b8281036020840152614b63818688614af3565b9150508260408301529695505050505050565b600060208284031215614b8857600080fd5b5051919050565b600060ff821660ff841680821015614ba957614ba96148df565b90039392505050565b600060ff831680614bc557614bc56149f2565b8060ff84160691505092915050565b600060208284031215614be657600080fd5b8151614709816146c7565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615614c3257614c326148df565b7f80000000000000000000000000000000000000000000000000000000000000006000871286820588128184161615614c6d57614c6d6148df565b60008712925087820587128484161615614c8957614c896148df565b87850587128184161615614c9f57614c9f6148df565b505050929093029392505050565b600082614cbc57614cbc6149f2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83147f800000000000000000000000000000000000000000000000000000000000000083141615614d1057614d106148df565b50059056fea164736f6c634300080f000a"
func init() {
......
......@@ -18,6 +18,9 @@ import (
"github.com/ethereum/go-ethereum/common"
)
// The maximum number of children that will be processed during a call to `resolveClaim`
var maxChildChecks = big.NewInt(512)
var (
methodMaxClockDuration = "maxClockDuration"
methodMaxGameDepth = "maxGameDepth"
......@@ -408,7 +411,7 @@ func (f *FaultDisputeGameContract) ResolveClaimTx(claimIdx uint64) (txmgr.TxCand
}
func (f *FaultDisputeGameContract) resolveClaimCall(claimIdx uint64) *batching.ContractCall {
return f.contract.Call(methodResolveClaim, new(big.Int).SetUint64(claimIdx))
return f.contract.Call(methodResolveClaim, new(big.Int).SetUint64(claimIdx), maxChildChecks)
}
func (f *FaultDisputeGameContract) CallResolve(ctx context.Context) (gameTypes.GameStatus, error) {
......
......@@ -250,14 +250,14 @@ func TestGetBalance(t *testing.T) {
func TestCallResolveClaim(t *testing.T) {
stubRpc, game := setupFaultDisputeGameTest(t)
stubRpc.SetResponse(fdgAddr, methodResolveClaim, rpcblock.Latest, []interface{}{big.NewInt(123)}, nil)
stubRpc.SetResponse(fdgAddr, methodResolveClaim, rpcblock.Latest, []interface{}{big.NewInt(123), maxChildChecks}, nil)
err := game.CallResolveClaim(context.Background(), 123)
require.NoError(t, err)
}
func TestResolveClaimTxTest(t *testing.T) {
stubRpc, game := setupFaultDisputeGameTest(t)
stubRpc.SetResponse(fdgAddr, methodResolveClaim, rpcblock.Latest, []interface{}{big.NewInt(123)}, nil)
stubRpc.SetResponse(fdgAddr, methodResolveClaim, rpcblock.Latest, []interface{}{big.NewInt(123), maxChildChecks}, nil)
tx, err := game.ResolveClaimTx(123)
require.NoError(t, err)
stubRpc.VerifyTxCandidate(tx)
......
......@@ -569,7 +569,7 @@ func (s *CrossLayerUser) ResolveClaim(t Testing, l2TxHash common.Hash) common.Ha
require.Nil(t, err)
time.Sleep(time.Duration(expiry) * time.Second)
resolveClaimTx, err := game.ResolveClaim(&s.L1.txOpts, common.Big0)
resolveClaimTx, err := game.ResolveClaim(&s.L1.txOpts, common.Big0, common.Big0)
require.Nil(t, err)
err = s.L1.env.EthCl.SendTransaction(t.Ctx(), resolveClaimTx)
......
......@@ -334,7 +334,7 @@ func (g *FaultGameHelper) StepFails(claimIdx int64, isAttack bool, stateData []b
// ResolveClaim resolves a single subgame
func (g *FaultGameHelper) ResolveClaim(ctx context.Context, claimIdx int64) {
tx, err := g.game.ResolveClaim(g.opts, big.NewInt(claimIdx))
tx, err := g.game.ResolveClaim(g.opts, big.NewInt(claimIdx), common.Big0)
g.require.NoError(err, "ResolveClaim transaction did not send")
_, err = wait.ForReceiptOK(ctx, g.client, tx.Hash())
g.require.NoError(err, "ResolveClaim transaction was not OK")
......
......@@ -620,7 +620,7 @@ func (g *OutputGameHelper) StepFails(claimIdx int64, isAttack bool, stateData []
// ResolveClaim resolves a single subgame
func (g *OutputGameHelper) ResolveClaim(ctx context.Context, claimIdx int64) {
tx, err := g.game.ResolveClaim(g.opts, big.NewInt(claimIdx))
tx, err := g.game.ResolveClaim(g.opts, big.NewInt(claimIdx), common.Big0)
g.require.NoError(err, "ResolveClaim transaction did not send")
_, err = wait.ForReceiptOK(ctx, g.client, tx.Hash())
g.require.NoError(err, "ResolveClaim transaction was not OK")
......
......@@ -205,7 +205,7 @@ func FinalizeWithdrawal(t *testing.T, cfg SystemConfig, l1Client *ethclient.Clie
require.Nil(t, err)
time.Sleep(time.Duration(expiry) * time.Second)
resolveClaimTx, err := proxy.ResolveClaim(opts, common.Big0)
resolveClaimTx, err := proxy.ResolveClaim(opts, common.Big0, common.Big0)
require.Nil(t, err)
resolveClaimReceipt, err = wait.ForReceiptOK(ctx, l1Client, resolveClaimTx.Hash())
......
......@@ -116,8 +116,8 @@
"sourceCodeHash": "0xc4dbd17217b63f8117f56f78c213e57dda304fee7577fe296e1d804ebe049542"
},
"src/dispute/FaultDisputeGame.sol": {
"initCodeHash": "0x8b8be450739ffdc236e5cbad7d59140d5c1f80cfc096c75260fb7224701fa3f3",
"sourceCodeHash": "0xe5bcdc2d310c46445a1f420db76225e0b5446671ba1c9a2f0b73e2a522faf967"
"initCodeHash": "0x614fc47be249e9e2278acfff13f4167c48db77bee9dd188e0514f67fbe6d2cd2",
"sourceCodeHash": "0xf7d3b1188f08c0bcb089db41f45622a08d71bccdcaf0479ebc71f65178f75c21"
},
"src/dispute/weth/DelayedWETH.sol": {
"initCodeHash": "0x7b6ec89eaec09e369426e73161a9c6932223bb1f974377190c3f6f552995da35",
......
......@@ -360,6 +360,25 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_claimIndex",
"type": "uint256"
}
],
"name": "getNumToResolve",
"outputs": [
{
"internalType": "uint256",
"name": "numRemainingChildren_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
......@@ -474,6 +493,40 @@
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "resolutionCheckpoints",
"outputs": [
{
"internalType": "bool",
"name": "initialCheckpointComplete",
"type": "bool"
},
{
"internalType": "uint32",
"name": "subgameIndex",
"type": "uint32"
},
{
"internalType": "Position",
"name": "leftmostPosition",
"type": "uint128"
},
{
"internalType": "address",
"name": "counteredBy",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "resolve",
......@@ -493,6 +546,11 @@
"internalType": "uint256",
"name": "_claimIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_numToResolve",
"type": "uint256"
}
],
"name": "resolveClaim",
......
......@@ -383,6 +383,25 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_claimIndex",
"type": "uint256"
}
],
"name": "getNumToResolve",
"outputs": [
{
"internalType": "uint256",
"name": "numRemainingChildren_",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
......@@ -510,6 +529,40 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "resolutionCheckpoints",
"outputs": [
{
"internalType": "bool",
"name": "initialCheckpointComplete",
"type": "bool"
},
{
"internalType": "uint32",
"name": "subgameIndex",
"type": "uint32"
},
{
"internalType": "Position",
"name": "leftmostPosition",
"type": "uint128"
},
{
"internalType": "address",
"name": "counteredBy",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "resolve",
......@@ -529,6 +582,11 @@
"internalType": "uint256",
"name": "_claimIndex",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_numToResolve",
"type": "uint256"
}
],
"name": "resolveClaim",
......
......@@ -62,11 +62,18 @@
"slot": "5",
"type": "mapping(uint256 => bool)"
},
{
"bytes": "32",
"label": "resolutionCheckpoints",
"offset": 0,
"slot": "6",
"type": "mapping(uint256 => struct IFaultDisputeGame.ResolutionCheckpoint)"
},
{
"bytes": "64",
"label": "startingOutputRoot",
"offset": 0,
"slot": "6",
"slot": "7",
"type": "struct OutputRoot"
}
]
\ No newline at end of file
......@@ -62,11 +62,18 @@
"slot": "5",
"type": "mapping(uint256 => bool)"
},
{
"bytes": "32",
"label": "resolutionCheckpoints",
"offset": 0,
"slot": "6",
"type": "mapping(uint256 => struct IFaultDisputeGame.ResolutionCheckpoint)"
},
{
"bytes": "64",
"label": "startingOutputRoot",
"offset": 0,
"slot": "6",
"slot": "7",
"type": "struct OutputRoot"
}
]
\ No newline at end of file
......@@ -62,8 +62,8 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
Position internal constant ROOT_POSITION = Position.wrap(1);
/// @notice Semantic version.
/// @custom:semver 0.17.0
string public constant version = "0.17.0";
/// @custom:semver 0.18.0
string public constant version = "0.18.0";
/// @notice The starting timestamp of the game
Timestamp public createdAt;
......@@ -89,9 +89,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
/// @notice A mapping of subgames rooted at a claim index to other claim indices in the subgame.
mapping(uint256 => uint256[]) public subgames;
/// @notice An interneal mapping of resolved subgames rooted at a claim index.
/// @notice A mapping of resolved subgames rooted at a claim index.
mapping(uint256 => bool) public resolvedSubgames;
/// @notice A mapping of claim indices to resolution checkpoints.
mapping(uint256 => ResolutionCheckpoint) public resolutionCheckpoints;
/// @notice The latest finalized output root, serving as the anchor for output bisection.
OutputRoot public startingOutputRoot;
......@@ -436,6 +439,15 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
}
}
/// @inheritdoc IFaultDisputeGame
function getNumToResolve(uint256 _claimIndex) public view returns (uint256 numRemainingChildren_) {
ResolutionCheckpoint storage checkpoint = resolutionCheckpoints[_claimIndex];
uint256[] storage challengeIndices = subgames[_claimIndex];
uint256 challengeIndicesLen = challengeIndices.length;
numRemainingChildren_ = challengeIndicesLen - checkpoint.subgameIndex;
}
/// @inheritdoc IFaultDisputeGame
function l2BlockNumber() public pure returns (uint256 l2BlockNumber_) {
l2BlockNumber_ = _getArgUint256(0x54);
......@@ -475,7 +487,7 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
}
/// @inheritdoc IFaultDisputeGame
function resolveClaim(uint256 _claimIndex) external {
function resolveClaim(uint256 _claimIndex, uint256 _numToResolve) external {
// INVARIANT: Resolution cannot occur unless the game is currently in progress.
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();
......@@ -507,10 +519,22 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
return;
}
// Fetch the resolution checkpoint from storage.
ResolutionCheckpoint memory checkpoint = resolutionCheckpoints[_claimIndex];
// If the checkpoint does not currently exist, initialize the current left most position as max u128.
if (!checkpoint.initialCheckpointComplete) {
checkpoint.leftmostPosition = Position.wrap(type(uint128).max);
checkpoint.initialCheckpointComplete = true;
// If `_numToResolve == 0`, assume that we can check all child subgames in this one callframe.
if (_numToResolve == 0) _numToResolve = challengeIndicesLen;
}
// Assume parent is honest until proven otherwise
address countered = address(0);
Position leftmostCounter = Position.wrap(type(uint128).max);
for (uint256 i = 0; i < challengeIndicesLen; ++i) {
uint256 lastToResolve = checkpoint.subgameIndex + _numToResolve;
uint256 finalCursor = lastToResolve > challengeIndicesLen ? challengeIndicesLen : lastToResolve;
for (uint256 i = checkpoint.subgameIndex; i < finalCursor; i++) {
uint256 challengeIndex = challengeIndices[i];
// INVARIANT: Cannot resolve a subgame containing an unresolved claim
......@@ -524,15 +548,23 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
// from countering invalid subgame roots via an invalid defense position. As such positions
// cannot be correctly countered.
// Note that correctly positioned defense, but invalid claimes can still be successfully countered.
if (claim.counteredBy == address(0) && leftmostCounter.raw() > claim.position.raw()) {
countered = claim.claimant;
leftmostCounter = claim.position;
if (claim.counteredBy == address(0) && checkpoint.leftmostPosition.raw() > claim.position.raw()) {
checkpoint.counteredBy = claim.claimant;
checkpoint.leftmostPosition = claim.position;
}
}
// If the parent was not successfully countered, pay out the parent's bond to the claimant.
// If the parent was successfully countered, pay out the parent's bond to the challenger.
_distributeBond(countered == address(0) ? subgameRootClaim.claimant : countered, subgameRootClaim);
// Increase the checkpoint's cursor position by the number of children that were checked.
checkpoint.subgameIndex = uint32(finalCursor);
// Persist the checkpoint and allow for continuing in a separate transaction, if resolution is not already
// complete.
resolutionCheckpoints[_claimIndex] = checkpoint;
// If all children have been traversed in the above loop, the subgame may be resolved. Otherwise, persist the
// checkpoint and allow for continuation in a separate transaction.
if (checkpoint.subgameIndex == challengeIndicesLen) {
address countered = checkpoint.counteredBy;
// Once a subgame is resolved, we percolate the result up the DAG so subsequent calls to
// resolveClaim will not need to traverse this subgame.
......@@ -540,6 +572,11 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, ISemver {
// Mark the subgame as resolved.
resolvedSubgames[_claimIndex] = true;
// If the parent was not successfully countered, pay out the parent's bond to the claimant.
// If the parent was successfully countered, pay out the parent's bond to the challenger.
_distributeBond(countered == address(0) ? subgameRootClaim.claimant : countered, subgameRootClaim);
}
}
/// @inheritdoc IDisputeGame
......
......@@ -19,6 +19,14 @@ interface IFaultDisputeGame is IDisputeGame {
Clock clock;
}
/// @notice The `ResolutionCheckpoint` struct represents the data associated with an in-progress claim resolution.
struct ResolutionCheckpoint {
bool initialCheckpointComplete;
uint32 subgameIndex;
Position leftmostPosition;
address counteredBy;
}
/// @notice Emitted when a new claim is added to the DAG by `claimant`
/// @param parentIndex The index within the `claimData` array of the parent claim
/// @param claim The claim being added
......@@ -54,13 +62,24 @@ interface IFaultDisputeGame is IDisputeGame {
/// @param _partOffset The offset of the data to post.
function addLocalData(uint256 _ident, uint256 _execLeafIdx, uint256 _partOffset) external;
/// @notice Resolves the subgame rooted at the given claim index.
/// @notice Resolves the subgame rooted at the given claim index. `_numToResolve` specifies how many children of
/// the subgame will be checked in this call. If `_numToResolve` is less than the number of children, an
/// internal cursor will be updated and this function may be called again to complete resolution of the
/// subgame.
/// @dev This function must be called bottom-up in the DAG
/// A subgame is a tree of claims that has a maximum depth of 1.
/// A subgame root claims is valid if, and only if, all of its child claims are invalid.
/// At the deepest level in the DAG, a claim is invalid if there's a successful step against it.
/// @param _claimIndex The index of the subgame root claim to resolve.
function resolveClaim(uint256 _claimIndex) external;
/// @param _numToResolve The number of subgames to resolve in this call. If the input is `0`, and this is the first
/// page, this function will attempt to check all of the subgame's children at once.
function resolveClaim(uint256 _claimIndex, uint256 _numToResolve) external;
/// @notice Returns the number of children that still need to be resolved in order to fully resolve a subgame rooted
/// at `_claimIndex`.
/// @param _claimIndex The subgame root claim's index within `claimData`.
/// @return numRemainingChildren_ The number of children that still need to be checked to resolve the subgame.
function getNumToResolve(uint256 _claimIndex) external view returns (uint256 numRemainingChildren_);
/// @notice The l2BlockNumber of the disputed output root in the `L2OutputOracle`.
function l2BlockNumber() external view returns (uint256 l2BlockNumber_);
......
......@@ -631,7 +631,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
});
// Warp and resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1 seconds);
......@@ -659,7 +659,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
});
// Warp and resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1 seconds);
......@@ -709,7 +709,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
});
// Warp and resolve the original dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1 seconds);
......@@ -836,7 +836,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
});
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1);
......@@ -860,7 +860,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
});
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1);
......@@ -908,7 +908,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
});
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1);
......@@ -950,7 +950,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
optimismPortal2.proveWithdrawalTransaction(_testTx, _proposedGameIndex, outputRootProof, withdrawalProof);
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1);
......@@ -1025,7 +1025,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
assertTrue(_game.rootClaim().raw() != bytes32(0));
// Resolve the dispute game
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
// Warp past the finalization period
......@@ -1049,7 +1049,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
});
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.prank(optimismPortal2.guardian());
......@@ -1077,7 +1077,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1);
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
// Attempt to finalize the withdrawal directly after the game resolves. This should fail.
......@@ -1106,7 +1106,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1);
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
// Change the respected game type in the portal.
......@@ -1133,7 +1133,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
vm.warp(block.timestamp + optimismPortal2.proofMaturityDelaySeconds() + 1);
// Resolve the dispute game.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
// Change the respected game type in the portal.
......@@ -1172,7 +1172,7 @@ contract OptimismPortal2_FinalizeWithdrawal_Test is CommonTest {
// Finalize the dispute game and attempt to finalize the withdrawal again. This should also fail, since the
// air gap dispute game delay has not elapsed.
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
vm.warp(block.timestamp + optimismPortal2.disputeGameFinalityDelaySeconds());
vm.expectRevert("OptimismPortal: output proposal in air-gap");
......
......@@ -536,7 +536,8 @@ contract Specification_Test is CommonTest {
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("move(uint256,bytes32,bool)") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("proposer()") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("resolve()") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("resolveClaim(uint256)") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("getNumToResolve(uint256)") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("resolveClaim(uint256,uint256)") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("resolvedAt()") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("resolvedSubgames(uint256)") });
_addSpec({ _name: "FaultDisputeGame", _sel: _getSel("rootClaim()") });
......
......@@ -712,7 +712,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
/// @dev Static unit test for the correctness an uncontested root resolution.
function test_resolve_rootUncontested_succeeds() public {
vm.warp(block.timestamp + 3 days + 12 hours);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
}
......@@ -720,7 +720,57 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
function test_resolve_rootUncontestedClockNotExpired_succeeds() public {
vm.warp(block.timestamp + 3 days + 12 hours - 1 seconds);
vm.expectRevert(ClockNotExpired.selector);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
}
/// @dev Static unit test for the correctness of a multi-part resolution of a single claim.
function test_resolve_multiPart_succeeds() public {
vm.deal(address(this), 10_000 ether);
uint256 bond = _getRequiredBond(0);
for (uint256 i = 0; i < 2048; i++) {
gameProxy.attack{ value: bond }(0, Claim.wrap(bytes32(i)));
}
// Warp past the clock period.
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// Resolve all children of the root subgame. Every single one of these will be uncontested.
for (uint256 i = 1; i <= 2048; i++) {
gameProxy.resolveClaim(i, 0);
}
// Resolve the first half of the root claim subgame.
gameProxy.resolveClaim(0, 1024);
// Fetch the resolution checkpoint for the root subgame and assert correctness.
(bool initCheckpoint, uint32 subgameIndex, Position leftmostPosition, address counteredBy) =
gameProxy.resolutionCheckpoints(0);
assertTrue(initCheckpoint);
assertEq(subgameIndex, 1024);
assertEq(leftmostPosition.raw(), Position.wrap(1).move(true).raw());
assertEq(counteredBy, address(this));
// The root subgame should not be resolved.
assertFalse(gameProxy.resolvedSubgames(0));
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolve();
// Resolve the second half of the root claim subgame.
uint256 numToResolve = gameProxy.getNumToResolve(0);
assertEq(numToResolve, 1024);
gameProxy.resolveClaim(0, numToResolve);
// Fetch the resolution checkpoint for the root subgame and assert correctness.
(initCheckpoint, subgameIndex, leftmostPosition, counteredBy) = gameProxy.resolutionCheckpoints(0);
assertTrue(initCheckpoint);
assertEq(subgameIndex, 2048);
assertEq(leftmostPosition.raw(), Position.wrap(1).move(true).raw());
assertEq(counteredBy, address(this));
// The root subgame should now be resolved
assertTrue(gameProxy.resolvedSubgames(0));
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.CHALLENGER_WINS));
}
/// @dev Static unit test asserting that resolve reverts when the absolute root
......@@ -745,7 +795,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
vm.store(address(gameProxy), bytes32(uint256(0)), bytes32(slot));
vm.expectRevert(GameNotInProgress.selector);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
}
/// @dev Static unit test for the correctness of resolving a single attack game state.
......@@ -754,8 +804,8 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
vm.warp(block.timestamp + 3 days + 12 hours);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(1, 0);
gameProxy.resolveClaim(0, 0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.CHALLENGER_WINS));
}
......@@ -766,9 +816,9 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
vm.warp(block.timestamp + 3 days + 12 hours);
gameProxy.resolveClaim(2);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(2, 0);
gameProxy.resolveClaim(1, 0);
gameProxy.resolveClaim(0, 0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
}
......@@ -781,11 +831,11 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
vm.warp(block.timestamp + 3 days + 12 hours);
gameProxy.resolveClaim(4);
gameProxy.resolveClaim(3);
gameProxy.resolveClaim(2);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(4, 0);
gameProxy.resolveClaim(3, 0);
gameProxy.resolveClaim(2, 0);
gameProxy.resolveClaim(1, 0);
gameProxy.resolveClaim(0, 0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.CHALLENGER_WINS));
}
......@@ -804,7 +854,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
vm.warp(block.timestamp + 3 days + 12 hours);
for (uint256 i = 9; i > 0; i--) {
gameProxy.resolveClaim(i - 1);
gameProxy.resolveClaim(i - 1, 0);
}
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
}
......@@ -822,8 +872,8 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
vm.warp(block.timestamp + 3 days + 12 hours);
assertEq(address(this).balance, 0);
gameProxy.resolveClaim(2);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(2, 0);
gameProxy.resolveClaim(1, 0);
// Wait for the withdrawal delay.
vm.warp(block.timestamp + delayedWeth.delay() + 1 seconds);
......@@ -832,7 +882,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
assertEq(address(this).balance, firstBond + secondBond);
vm.expectRevert(ClaimAlreadyResolved.selector);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(1, 0);
assertEq(address(this).balance, firstBond + secondBond);
}
......@@ -853,7 +903,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Resolve to claim bond
uint256 balanceBefore = address(this).balance;
gameProxy.resolveClaim(8);
gameProxy.resolveClaim(8, 0);
// Wait for the withdrawal delay.
vm.warp(block.timestamp + delayedWeth.delay() + 1 seconds);
......@@ -862,7 +912,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
assertEq(address(this).balance, balanceBefore + _getRequiredBond(7));
vm.expectRevert(ClaimAlreadyResolved.selector);
gameProxy.resolveClaim(8);
gameProxy.resolveClaim(8, 0);
}
/// @dev Static unit test asserting that resolve reverts when attempting to resolve subgames out of order
......@@ -873,7 +923,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
vm.warp(block.timestamp + 3 days + 12 hours);
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
}
/// @dev Static unit test asserting that resolve pays out bonds on step, output bisection, and execution trace
......@@ -923,7 +973,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Resolve all claims
vm.warp(block.timestamp + 3 days + 12 hours);
for (uint256 i = gameProxy.claimDataLen(); i > 0; i--) {
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1)));
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1, 0)));
assertTrue(success);
}
gameProxy.resolve();
......@@ -1004,7 +1054,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Resolve all claims
vm.warp(block.timestamp + 3 days + 12 hours);
for (uint256 i = gameProxy.claimDataLen(); i > 0; i--) {
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1)));
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1, 0)));
assertTrue(success);
}
gameProxy.resolve();
......@@ -1061,7 +1111,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Resolve all claims
vm.warp(block.timestamp + 3 days + 12 hours);
for (uint256 i = gameProxy.claimDataLen(); i > 0; i--) {
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1)));
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1, 0)));
assertTrue(success);
}
gameProxy.resolve();
......@@ -1099,7 +1149,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Resolve the game.
vm.warp(block.timestamp + 3 days + 12 hours);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
// Confirm that the anchor state is now the same as the game state.
......@@ -1121,7 +1171,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Resolve the game.
vm.mockCall(address(gameProxy), abi.encodeWithSelector(gameProxy.l2BlockNumber.selector), abi.encode(0));
vm.warp(block.timestamp + 3 days + 12 hours);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
// Confirm that the anchor state is the same as the initial anchor state.
......@@ -1140,8 +1190,8 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Challenge the claim and resolve it.
gameProxy.attack{ value: _getRequiredBond(0) }(0, _dummyClaim());
vm.warp(block.timestamp + 3 days + 12 hours);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(1, 0);
gameProxy.resolveClaim(0, 0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.CHALLENGER_WINS));
// Confirm that the anchor state is the same as the initial anchor state.
......@@ -1179,10 +1229,10 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
assertEq(delayedWeth.balanceOf(address(gameProxy)), reenterBond);
// Resolve the claim at index 2 first so that index 1 can be resolved.
gameProxy.resolveClaim(2);
gameProxy.resolveClaim(2, 0);
// Resolve the claim at index 1 and claim the reenter contract's credit.
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(1, 0);
// Ensure that the game registered the `reenter` contract's credit.
assertEq(gameProxy.credit(address(reenter)), reenterBond);
......@@ -1343,9 +1393,9 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Should not be able to resolve the root claim or second counter yet.
vm.expectRevert(ClockNotExpired.selector);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(1, 0);
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
// Warp to the last second of the root claim defender clock.
vm.warp(block.timestamp + 3.5 days - 2 seconds);
......@@ -1358,21 +1408,21 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
// Should not be able to resolve any claims yet.
vm.expectRevert(ClockNotExpired.selector);
gameProxy.resolveClaim(2);
gameProxy.resolveClaim(2, 0);
vm.expectRevert(ClockNotExpired.selector);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(1, 0);
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
vm.warp(block.timestamp + gameProxy.clockExtension().raw() - 1 seconds);
// Should not be able to resolve any claims yet.
vm.expectRevert(ClockNotExpired.selector);
gameProxy.resolveClaim(2);
gameProxy.resolveClaim(2, 0);
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(1, 0);
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
// Chess clock time accumulated:
assertEq(gameProxy.getChallengerDuration(0).raw(), 3.5 days);
......@@ -1393,14 +1443,14 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
assertEq(gameProxy.getChallengerDuration(2).raw(), 3.5 days);
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolveClaim(1);
gameProxy.resolveClaim(1, 0);
vm.expectRevert(OutOfOrderResolution.selector);
gameProxy.resolveClaim(0);
gameProxy.resolveClaim(0, 0);
// All clocks are expired. Resolve the game.
gameProxy.resolveClaim(2); // Node 2 is resolved as UNCOUNTERED by default since it has no children
gameProxy.resolveClaim(1); // Node 1 is resolved as COUNTERED since it has an UNCOUNTERED child
gameProxy.resolveClaim(0); // Node 0 is resolved as UNCOUNTERED since it has no UNCOUNTERED children
gameProxy.resolveClaim(2, 0); // Node 2 is resolved as UNCOUNTERED by default since it has no children
gameProxy.resolveClaim(1, 0); // Node 1 is resolved as COUNTERED since it has an UNCOUNTERED child
gameProxy.resolveClaim(0, 0); // Node 0 is resolved as UNCOUNTERED since it has no UNCOUNTERED children
// Defender wins game since the root claim is uncountered
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
......@@ -1954,7 +2004,7 @@ contract FaultDispute_1v1_Actors_Test is FaultDisputeGame_Init {
// `resolveClaim`. There's also a check in `resolve` to ensure all children have been
// resolved before global resolution, which catches any unresolved subgames here.
for (uint256 i = gameProxy.claimDataLen(); i > 0; i--) {
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1)));
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1, 0)));
assertTrue(success);
}
gameProxy.resolve();
......
......@@ -36,7 +36,7 @@ contract FaultDisputeGame_Solvency_Invariant is FaultDisputeGame_Init {
(,,, uint256 rootBond,,,) = gameProxy.claimData(0);
for (uint256 i = gameProxy.claimDataLen(); i > 0; i--) {
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1)));
(bool success,) = address(gameProxy).call(abi.encodeCall(gameProxy.resolveClaim, (i - 1, 0)));
assertTrue(success);
}
gameProxy.resolve();
......
......@@ -128,7 +128,7 @@ contract OptimismPortal2_Invariant_Harness is CommonTest {
// Warp beyond the finalization period for the dispute game and resolve it.
vm.warp(block.timestamp + (game.maxClockDuration().raw() * 2) + 1 seconds);
game.resolveClaim(0);
game.resolveClaim(0, 0);
game.resolve();
// Fund the portal so that we can withdraw ETH.
......
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