Commit 64058146 authored by protolambda's avatar protolambda

Merge branch 'develop' into tip/spanbatch-logs-metrics

parents 0d78ad65 301e996d
...@@ -63,7 +63,7 @@ acts as an example of using `cast` to manually call `attack` and `defend`. ...@@ -63,7 +63,7 @@ acts as an example of using `cast` to manually call `attack` and `defend`.
### Performing Steps ### Performing Steps
Attacking or defending are teh only available actions before the maximum depth of the game is reached. To counter claims Attacking or defending are the only available actions before the maximum depth of the game is reached. To counter claims
at the maximum depth, a step must be performed instead. Calling the `step` method in the `FaultDisputeGame` contract at the maximum depth, a step must be performed instead. Calling the `step` method in the `FaultDisputeGame` contract
counters a claim at the maximum depth by running a single step of the cannon VM on chain. The `step` method will revert counters a claim at the maximum depth by running a single step of the cannon VM on chain. The `step` method will revert
unless the cannon execution confirms the claim being countered is invalid. Note, if an actor's clock runs out at any unless the cannon execution confirms the claim being countered is invalid. Note, if an actor's clock runs out at any
......
...@@ -38,7 +38,7 @@ require ( ...@@ -38,7 +38,7 @@ require (
github.com/pkg/profile v1.7.0 github.com/pkg/profile v1.7.0
github.com/prometheus/client_golang v1.17.0 github.com/prometheus/client_golang v1.17.0
github.com/stretchr/testify v1.8.4 github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.25.7 github.com/urfave/cli/v2 v2.26.0
golang.org/x/crypto v0.16.0 golang.org/x/crypto v0.16.0
golang.org/x/exp v0.0.0-20231006140011-7918f672742d golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/sync v0.5.0 golang.org/x/sync v0.5.0
......
...@@ -699,8 +699,8 @@ github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9f ...@@ -699,8 +699,8 @@ github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9f
github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=
github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=
github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.26.0 h1:3f3AMg3HpThFNT4I++TKOejZO8yU55t3JnnSr4S4QEI=
github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/urfave/cli/v2 v2.26.0/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
......
...@@ -34,6 +34,6 @@ ...@@ -34,6 +34,6 @@
}, },
"devDependencies": { "devDependencies": {
"tsup": "^8.0.1", "tsup": "^8.0.1",
"vitest": "^0.34.4" "vitest": "^1.0.1"
} }
} }
...@@ -30,8 +30,8 @@ var ( ...@@ -30,8 +30,8 @@ var (
// OutputBisectionGameMetaData contains all meta data concerning the OutputBisectionGame contract. // OutputBisectionGameMetaData contains all meta data concerning the OutputBisectionGame contract.
var OutputBisectionGameMetaData = &bind.MetaData{ var OutputBisectionGameMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"GameType\",\"name\":\"_gameType\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_genesisBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxGameDepth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_splitDepth\",\"type\":\"uint256\"},{\"internalType\":\"Duration\",\"name\":\"_gameDuration\",\"type\":\"uint64\"},{\"internalType\":\"contractIBigStepper\",\"name\":\"_vm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotDefendRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAboveSplit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyResolved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockTimeExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameDepthExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameNotInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLocalIdent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrestate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSplitDepth\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfOrderResolution\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim\",\"type\":\"bytes32\"}],\"name\":\"UnexpectedRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValidStep\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"parentIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimant\",\"type\":\"address\"}],\"name\":\"Move\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGameStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"Resolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_PRESTATE\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAME_DURATION\",\"outputs\":[{\"internalType\":\"Duration\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENESIS_BLOCK_NUMBER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_GAME_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SPLIT_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VM\",\"outputs\":[{\"internalType\":\"contractIBigStepper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ident\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_execLeafIdx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"}],\"name\":\"addLocalData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"attack\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bondManager\",\"outputs\":[{\"internalType\":\"contractIBondManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimData\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"parentIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"countered\",\"type\":\"bool\"},{\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"internalType\":\"Position\",\"name\":\"position\",\"type\":\"uint128\"},{\"internalType\":\"Clock\",\"name\":\"clock\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDataLen\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"len_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"defend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameData\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameType\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1Head\",\"outputs\":[{\"internalType\":\"Hash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"l2BlockNumber_\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"}],\"name\":\"move\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"status_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"}],\"name\":\"resolveClaim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolvedAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rootClaim\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", ABI: "[{\"inputs\":[{\"internalType\":\"GameType\",\"name\":\"_gameType\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_genesisBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"Hash\",\"name\":\"_genesisOutputRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxGameDepth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_splitDepth\",\"type\":\"uint256\"},{\"internalType\":\"Duration\",\"name\":\"_gameDuration\",\"type\":\"uint64\"},{\"internalType\":\"contractIBigStepper\",\"name\":\"_vm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotDefendRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAboveSplit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyResolved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockTimeExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameDepthExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameNotInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLocalIdent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrestate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSplitDepth\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfOrderResolution\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim\",\"type\":\"bytes32\"}],\"name\":\"UnexpectedRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValidStep\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"parentIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimant\",\"type\":\"address\"}],\"name\":\"Move\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGameStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"Resolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_PRESTATE\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAME_DURATION\",\"outputs\":[{\"internalType\":\"Duration\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENESIS_BLOCK_NUMBER\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GENESIS_OUTPUT_ROOT\",\"outputs\":[{\"internalType\":\"Hash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_GAME_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SPLIT_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VM\",\"outputs\":[{\"internalType\":\"contractIBigStepper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ident\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_execLeafIdx\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"}],\"name\":\"addLocalData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"attack\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bondManager\",\"outputs\":[{\"internalType\":\"contractIBondManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimData\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"parentIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"countered\",\"type\":\"bool\"},{\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"internalType\":\"Position\",\"name\":\"position\",\"type\":\"uint128\"},{\"internalType\":\"Clock\",\"name\":\"clock\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDataLen\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"len_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"defend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameData\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameType\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1Head\",\"outputs\":[{\"internalType\":\"Hash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"l2BlockNumber_\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"}],\"name\":\"move\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"status_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"}],\"name\":\"resolveClaim\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolvedAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rootClaim\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x6101606040523480156200001257600080fd5b5060405162002cab38038062002cab833981016040819052620000359162000091565b838310620000565760405163e62ccf3960e01b815260040160405180910390fd5b60ff909616610140526080949094526101209290925260a05260c0526001600160401b031660e0526001600160a01b03166101005262000129565b600080600080600080600060e0888a031215620000ad57600080fd5b875160ff81168114620000bf57600080fd5b602089015160408a015160608b015160808c015160a08d0151949b50929950909750955093506001600160401b0381168114620000fb57600080fd5b60c08901519092506001600160a01b03811681146200011957600080fd5b8091505092959891949750929550565b60805160a05160c05160e051610100516101205161014051612acc620001df600039600081816104d70152611b7c0152600081816104030152611a4a0152600081816104a10152818161145301526117a401526000818161055001528181610c680152611c7301526000818161024901528181610ac9015281816121840152818161228c015261236701526000818161033b015281816109c701526111ec01526000818161028b01526113480152612acc6000f3fe6080604052600436106101ac5760003560e01c80638129fc1c116100ec578063c55cd0c71161008a578063d8cc1a3c11610064578063d8cc1a3c1461060a578063f8f43ff61461062a578063fa24f7431461064a578063fdffbb281461066e57600080fd5b8063c55cd0c714610572578063c6f0308c14610585578063cf09e0d0146105e957600080fd5b806392931298116100c6578063929312981461048f578063bbdc02db146104c3578063bcef3b5514610501578063c31b29ce1461053e57600080fd5b80638129fc1c146104255780638980e0cc1461043a5780638b85902b1461044f57600080fd5b8063363cc42711610159578063609d333411610133578063609d3334146103b3578063632247ea146103c85780636361506d146103db5780636737abeb146103f157600080fd5b8063363cc427146102d75780634778efe81461032957806354fd4d501461035d57600080fd5b8063266198f91161018a578063266198f9146102795780632810e1d6146102ad57806335fef567146102c257600080fd5b806319effeb4146101b1578063200d2ed2146101fc57806324185bc614610237575b600080fd5b3480156101bd57600080fd5b506000546101de9068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561020857600080fd5b5060005461022a90700100000000000000000000000000000000900460ff1681565b6040516101f391906125a0565b34801561024357600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f3565b34801561028557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b957600080fd5b5061022a610681565b6102d56102d03660046125e1565b610852565b005b3480156102e357600080fd5b506001546103049073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b34801561033557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036957600080fd5b506103a66040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101f3919061266e565b3480156103bf57600080fd5b506103a6610862565b6102d56103d636600461269d565b610874565b3480156103e757600080fd5b5061026b60025481565b3480156103fd57600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561043157600080fd5b506102d5610f6d565b34801561044657600080fd5b5060035461026b565b34801561045b57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561026b565b34801561049b57600080fd5b506103047f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b34801561050d57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561026b565b34801561054a57600080fd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b6102d56105803660046125e1565b6110be565b34801561059157600080fd5b506105a56105a03660046126d2565b6110ca565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f3565b3480156105f557600080fd5b506000546101de9067ffffffffffffffff1681565b34801561061657600080fd5b506102d5610625366004612734565b61113b565b34801561063657600080fd5b506102d56106453660046127be565b6116d7565b34801561065657600080fd5b5061065f611b7a565b6040516101f3939291906127ea565b6102d561067c3660046126d2565b611bd7565b600080600054700100000000000000000000000000000000900460ff1660028111156106af576106af612571565b146106e6576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610722576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061073657610736612815565b6000918252602090912060039091020154640100000000900460ff1661075d576002610760565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561081157610811612571565b02179055600281111561082657610826612571565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61085e82826000610874565b5050565b606061086f602080611f11565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108a0576108a0612571565b146108d7576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156108e3575080155b1561091a576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092f5761092f612815565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193506109c391908590611fa816565b90507f0000000000000000000000000000000000000000000000000000000000000000610a82826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610ac4576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aef7f00000000000000000000000000000000000000000000000000000000000000006001612873565b610b8b826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610ba457610ba48486611fb0565b815160009063ffffffff90811614610c04576003836000015163ffffffff1681548110610bd357610bd3612815565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c3d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c519190612873565b610c5b919061288b565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610cce576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d4c576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610ec257610ec2612815565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f239060019061288b565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610ff27ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110b8904361288b565b40600255565b61085e82826001610874565b600381815481106110da57600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561116757611167612571565b1461119e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111b3576111b3612815565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112127f00000000000000000000000000000000000000000000000000000000000000006001612873565b6112ae826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112ef576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080891561137257611313836fffffffffffffffffffffffffffffffff16612009565b67ffffffffffffffff16156113465761133d6113306001866128a2565b865463ffffffff166120af565b60010154611368565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061138c565b8460010154915061138984600161133091906128d3565b90505b600882901b60088a8a6040516113a3929190612907565b6040518091039020901b146113e4576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113f08d61214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a001604051602081830303815290604052805190602001209050600084600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328f8f8f8f886040518663ffffffff1660e01b81526004016114b2959493929190612960565b6020604051808303816000875af11580156114d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f5919061299a565b6002878101549290911492506000916115a0906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163c8b6fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61164691906129b3565b61165091906129d4565b67ffffffffffffffff161590508115158103611698576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505087547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790975550505050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561170357611703612571565b1461173a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806117468461214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a00160405160208183030381529060405280519060200120905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118319190612a22565b9050866001036118f3576002546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061299a565b50611b71565b866002036119705760018401546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b866003036119ed5760018301546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b86600403611ac657600284015473ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad908990859060c090611a3a906fffffffffffffffffffffffffffffffff16612009565b611a6e9067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612873565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945260248401929092521b6044820152600860648201526084810188905260a4016118aa565b86600503611b3f576040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101889052602481018390524660c01b6044820152600860648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bd0610862565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c0357611c03612571565b14611c3a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c4f57611c4f612815565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cbf90700100000000000000000000000000000000900467ffffffffffffffff164261288b565b6002830154611cef9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612873565b11611d26576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d44575060065460ff165b15611d7b576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611d8957508215155b15611dc0576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611e8e576000838281548110611de157611de1612815565b6000918252602080832090910154808352600590915260409091205490915015611e37576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e4c57611e4c612815565b600091825260209091206003909102018054909150640100000000900460ff16611e7b57600193505050611e8e565b505080611e8790612a58565b9050611dc4565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ed791612537565b83600003611f0b57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f4884367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612873565b90508267ffffffffffffffff1667ffffffffffffffff811115611f6d57611f6d612a90565b6040519080825280601f01601f191660200182016040528015611f97576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600082901a6001811480611fc7575060ff81166002145b612004576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810184905260240160405180910390fd5b505050565b600080612096837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120cd846fffffffffffffffffffffffffffffffff1661248b565b9050600383815481106120e2576120e2612815565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461214557815460038054909163ffffffff1690811061213057612130612815565b906000526020600020906003020191506120f3565b5092915050565b600080600083905060006003828154811061216957612169612815565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612240906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612281576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612348906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082146123c357825463ffffffff1661238d7f00000000000000000000000000000000000000000000000000000000000000006001612873565b8303612397578391505b600381815481106123aa576123aa612815565b9060005260206000209060030201935080945050612285565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816123f08460011c90565b6fffffffffffffffffffffffffffffffff1614905080156124495761241f6124196001846128a2565b886120af565b98506003878154811061243457612434612815565b9060005260206000209060030201975061247f565b6003878154811061245c5761245c612815565b9060005260206000209060030201985061247c82600161241991906128d3565b97505b50505050505050915091565b6000811960018301168161251f827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906125559190612558565b50565b5b8082111561256d5760008155600101612559565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106125db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b600080604083850312156125f457600080fd5b50508035926020909101359150565b6000815180845260005b818110156126295760208185018101518683018201520161260d565b8181111561263b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006126816020830184612603565b9392505050565b8035801515811461269857600080fd5b919050565b6000806000606084860312156126b257600080fd5b83359250602084013591506126c960408501612688565b90509250925092565b6000602082840312156126e457600080fd5b5035919050565b60008083601f8401126126fd57600080fd5b50813567ffffffffffffffff81111561271557600080fd5b60208301915083602082850101111561272d57600080fd5b9250929050565b6000806000806000806080878903121561274d57600080fd5b8635955061275d60208801612688565b9450604087013567ffffffffffffffff8082111561277a57600080fd5b6127868a838b016126eb565b9096509450606089013591508082111561279f57600080fd5b506127ac89828a016126eb565b979a9699509497509295939492505050565b6000806000606084860312156127d357600080fd5b505081359360208301359350604090920135919050565b60ff8416815282602082015260606040820152600061280c6060830184612603565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561288657612886612844565b500190565b60008282101561289d5761289d612844565b500390565b60006fffffffffffffffffffffffffffffffff838116908316818110156128cb576128cb612844565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156128fe576128fe612844565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612974606083018789612917565b8281036020840152612987818688612917565b9150508260408301529695505050505050565b6000602082840312156129ac57600080fd5b5051919050565b600067ffffffffffffffff838116908316818110156128cb576128cb612844565b600067ffffffffffffffff80841680612a16577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612a3457600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461268157600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8957612a89612844565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a", Bin: "0x6101806040523480156200001257600080fd5b5060405162002ea538038062002ea58339810160408190526200003591620000b1565b83831015806200005057506200004d60028462000153565b15155b156200006f5760405163e62ccf3960e01b815260040160405180910390fd5b60ff90971661016052608095909552610120939093526101409190915260a05260c0526001600160401b031660e0526001600160a01b03166101005262000176565b600080600080600080600080610100898b031215620000cf57600080fd5b885160ff81168114620000e157600080fd5b60208a015160408b015160608c015160808d015160a08e015160c08f0151959d50939b509199509750955093506001600160401b03811681146200012457600080fd5b60e08a01519092506001600160a01b03811681146200014257600080fd5b809150509295985092959890939650565b6000826200017157634e487b7160e01b600052601260045260246000fd5b500690565b60805160a05160c05160e05161010051610120516101405161016051612c6062000245600039600081816104e20152611b9a01526000818161060601526124c501526000818161040e015281816119d20152611a080152600081816104ac01528181611438015261174801526000818161055b01528181610ca60152611c9101526000818161025401528181610b08015281816121cf015281816122d701526123b301526000818161034601528181610a06015261122a01526000818161029601526113860152612c606000f3fe6080604052600436106101b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612734565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612775565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612802565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612831565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610fab565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612775565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612866565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e06106643660046128c8565b611179565b34801561067557600080fd5b506102e0610684366004612952565b6116ba565b34801561069557600080fd5b5061069e611b98565b6040516101fe9392919061297e565b6102e06106bb366004612866565b611bf5565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612705565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600081548110610775576107756129a9565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612705565b02179055600281111561086557610865612705565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f2f565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612705565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e6129a9565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a0291908590611fc616565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612a07565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be284611fce565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c116129a9565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612a07565b610c999190612a1f565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f006129a9565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612a1f565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612a1f565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612705565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f16129a9565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612a07565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113b057611351836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff16156113845761137b61136e600186612a36565b865463ffffffff166120c8565b600101546113a6565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113ca565b846001015491506113c784600161136e9190612a67565b90505b600882901b60088a8a6040516113e1929190612a9b565b6040518091039020901b14611422576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061142d8c612165565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b8152600401611497959493929190612af4565b6020604051808303816000875af11580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612b2e565b600285810154929091149250600091611585906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611621896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61162b9190612b47565b6116359190612b68565b67ffffffffffffffff16159050811515810361167d576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116e6576116e6612705565b1461171d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061172c86612194565b935093509350935060006117428585858561255f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190612bb6565b905088600103611897576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190612b2e565b50611b8d565b8860020361190e576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600303611985576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600403611ae25760006fffffffffffffffffffffffffffffffff861615611a06576119c2866fffffffffffffffffffffffffffffffff16612022565b6119f69067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612a07565b611a01906001612a07565b611a28565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adb9190612b2e565b5050611b8d565b88600503611b5b576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bee6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c2157611c21612705565b14611c58576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c6d57611c6d6129a9565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cdd90700100000000000000000000000000000000900467ffffffffffffffff1642612a1f565b6002830154611d0d9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612a07565b11611d44576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d62575060065460ff165b15611d99576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611da757508215155b15611dde576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611eac576000838281548110611dff57611dff6129a9565b6000918252602080832090910154808352600590915260409091205490915015611e55576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e6a57611e6a6129a9565b600091825260209091206003909102018054909150640100000000900460ff16611e9957600193505050611eac565b505080611ea590612bec565b9050611de2565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ef5916126cb565b83600003611f2957600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f6684367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612a07565b90508267ffffffffffffffff1667ffffffffffffffff811115611f8b57611f8b612c24565b6040519080825280601f01601f191660200182016040528015611fb5576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480611fe5575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6000806120af837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120e6846fffffffffffffffffffffffffffffffff1661261f565b9050600383815481106120fb576120fb6129a9565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461215e57815460038054909163ffffffff16908110612149576121496129a9565b9060005260206000209060030201915061210c565b5092915050565b600080600080600061217686612194565b935093509350935061218a8484848461255f565b9695505050505050565b60008060008060008590506000600382815481106121b4576121b46129a9565b600091825260209091206002600390920201908101549091507f00000000000000000000000000000000000000000000000000000000000000009061228b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116122cc576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612393906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082111561240f57825463ffffffff166123d97f00000000000000000000000000000000000000000000000000000000000000006001612a07565b83036123e3578391505b600381815481106123f6576123f66129a9565b90600052602060002090600302019350809450506122d0565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161243c8460011c90565b6fffffffffffffffffffffffffffffffff16149050801561250d576000612474836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff1611156124c357600061249a612494600185612a36565b896120c8565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506124e79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612551565b600061251d612494846001612a67565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036125c65782826040516020016125a99291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052805190602001209050612617565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081196001830116816126b3827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906126e991906126ec565b50565b5b8082111561270157600081556001016126ed565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061276f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561278857600080fd5b50508035926020909101359150565b6000815180845260005b818110156127bd576020818501810151868301820152016127a1565b818111156127cf576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006128156020830184612797565b9392505050565b8035801515811461282c57600080fd5b919050565b60008060006060848603121561284657600080fd5b833592506020840135915061285d6040850161281c565b90509250925092565b60006020828403121561287857600080fd5b5035919050565b60008083601f84011261289157600080fd5b50813567ffffffffffffffff8111156128a957600080fd5b6020830191508360208285010111156128c157600080fd5b9250929050565b600080600080600080608087890312156128e157600080fd5b863595506128f16020880161281c565b9450604087013567ffffffffffffffff8082111561290e57600080fd5b61291a8a838b0161287f565b9096509450606089013591508082111561293357600080fd5b5061294089828a0161287f565b979a9699509497509295939492505050565b60008060006060848603121561296757600080fd5b505081359360208301359350604090920135919050565b60ff841681528260208201526060604082015260006129a06060830184612797565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a1a57612a1a6129d8565b500190565b600082821015612a3157612a316129d8565b500390565b60006fffffffffffffffffffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612a9257612a926129d8565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612b08606083018789612aab565b8281036020840152612b1b818688612aab565b9150508260408301529695505050505050565b600060208284031215612b4057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b600067ffffffffffffffff80841680612baa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612bc857600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461281557600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c1d57612c1d6129d8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a",
} }
// OutputBisectionGameABI is the input ABI used to generate the binding from. // OutputBisectionGameABI is the input ABI used to generate the binding from.
...@@ -43,7 +43,7 @@ var OutputBisectionGameABI = OutputBisectionGameMetaData.ABI ...@@ -43,7 +43,7 @@ var OutputBisectionGameABI = OutputBisectionGameMetaData.ABI
var OutputBisectionGameBin = OutputBisectionGameMetaData.Bin var OutputBisectionGameBin = OutputBisectionGameMetaData.Bin
// DeployOutputBisectionGame deploys a new Ethereum contract, binding an instance of OutputBisectionGame to it. // DeployOutputBisectionGame deploys a new Ethereum contract, binding an instance of OutputBisectionGame to it.
func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBackend, _gameType uint8, _absolutePrestate [32]byte, _genesisBlockNumber *big.Int, _maxGameDepth *big.Int, _splitDepth *big.Int, _gameDuration uint64, _vm common.Address) (common.Address, *types.Transaction, *OutputBisectionGame, error) { func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBackend, _gameType uint8, _absolutePrestate [32]byte, _genesisBlockNumber *big.Int, _genesisOutputRoot [32]byte, _maxGameDepth *big.Int, _splitDepth *big.Int, _gameDuration uint64, _vm common.Address) (common.Address, *types.Transaction, *OutputBisectionGame, error) {
parsed, err := OutputBisectionGameMetaData.GetAbi() parsed, err := OutputBisectionGameMetaData.GetAbi()
if err != nil { if err != nil {
return common.Address{}, nil, nil, err return common.Address{}, nil, nil, err
...@@ -52,7 +52,7 @@ func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBac ...@@ -52,7 +52,7 @@ func DeployOutputBisectionGame(auth *bind.TransactOpts, backend bind.ContractBac
return common.Address{}, nil, nil, errors.New("GetABI returned nil") return common.Address{}, nil, nil, errors.New("GetABI returned nil")
} }
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OutputBisectionGameBin), backend, _gameType, _absolutePrestate, _genesisBlockNumber, _maxGameDepth, _splitDepth, _gameDuration, _vm) address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(OutputBisectionGameBin), backend, _gameType, _absolutePrestate, _genesisBlockNumber, _genesisOutputRoot, _maxGameDepth, _splitDepth, _gameDuration, _vm)
if err != nil { if err != nil {
return common.Address{}, nil, nil, err return common.Address{}, nil, nil, err
} }
...@@ -294,6 +294,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISBLOCKNUMBER ...@@ -294,6 +294,37 @@ func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISBLOCKNUMBER
return _OutputBisectionGame.Contract.GENESISBLOCKNUMBER(&_OutputBisectionGame.CallOpts) return _OutputBisectionGame.Contract.GENESISBLOCKNUMBER(&_OutputBisectionGame.CallOpts)
} }
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCaller) GENESISOUTPUTROOT(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _OutputBisectionGame.contract.Call(opts, &out, "GENESIS_OUTPUT_ROOT")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameSession) GENESISOUTPUTROOT() ([32]byte, error) {
return _OutputBisectionGame.Contract.GENESISOUTPUTROOT(&_OutputBisectionGame.CallOpts)
}
// GENESISOUTPUTROOT is a free data retrieval call binding the contract method 0xcaa4ba2d.
//
// Solidity: function GENESIS_OUTPUT_ROOT() view returns(bytes32)
func (_OutputBisectionGame *OutputBisectionGameCallerSession) GENESISOUTPUTROOT() ([32]byte, error) {
return _OutputBisectionGame.Contract.GENESISOUTPUTROOT(&_OutputBisectionGame.CallOpts)
}
// MAXGAMEDEPTH is a free data retrieval call binding the contract method 0x4778efe8. // MAXGAMEDEPTH is a free data retrieval call binding the contract method 0x4778efe8.
// //
// Solidity: function MAX_GAME_DEPTH() view returns(uint256) // Solidity: function MAX_GAME_DEPTH() view returns(uint256)
......
...@@ -13,7 +13,7 @@ const OutputBisectionGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"co ...@@ -13,7 +13,7 @@ const OutputBisectionGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"co
var OutputBisectionGameStorageLayout = new(solc.StorageLayout) var OutputBisectionGameStorageLayout = new(solc.StorageLayout)
var OutputBisectionGameDeployedBin = "0x6080604052600436106101ac5760003560e01c80638129fc1c116100ec578063c55cd0c71161008a578063d8cc1a3c11610064578063d8cc1a3c1461060a578063f8f43ff61461062a578063fa24f7431461064a578063fdffbb281461066e57600080fd5b8063c55cd0c714610572578063c6f0308c14610585578063cf09e0d0146105e957600080fd5b806392931298116100c6578063929312981461048f578063bbdc02db146104c3578063bcef3b5514610501578063c31b29ce1461053e57600080fd5b80638129fc1c146104255780638980e0cc1461043a5780638b85902b1461044f57600080fd5b8063363cc42711610159578063609d333411610133578063609d3334146103b3578063632247ea146103c85780636361506d146103db5780636737abeb146103f157600080fd5b8063363cc427146102d75780634778efe81461032957806354fd4d501461035d57600080fd5b8063266198f91161018a578063266198f9146102795780632810e1d6146102ad57806335fef567146102c257600080fd5b806319effeb4146101b1578063200d2ed2146101fc57806324185bc614610237575b600080fd5b3480156101bd57600080fd5b506000546101de9068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561020857600080fd5b5060005461022a90700100000000000000000000000000000000900460ff1681565b6040516101f391906125a0565b34801561024357600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f3565b34801561028557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102b957600080fd5b5061022a610681565b6102d56102d03660046125e1565b610852565b005b3480156102e357600080fd5b506001546103049073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f3565b34801561033557600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561036957600080fd5b506103a66040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101f3919061266e565b3480156103bf57600080fd5b506103a6610862565b6102d56103d636600461269d565b610874565b3480156103e757600080fd5b5061026b60025481565b3480156103fd57600080fd5b5061026b7f000000000000000000000000000000000000000000000000000000000000000081565b34801561043157600080fd5b506102d5610f6d565b34801561044657600080fd5b5060035461026b565b34801561045b57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561026b565b34801561049b57600080fd5b506103047f000000000000000000000000000000000000000000000000000000000000000081565b3480156104cf57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101f3565b34801561050d57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561026b565b34801561054a57600080fd5b506101de7f000000000000000000000000000000000000000000000000000000000000000081565b6102d56105803660046125e1565b6110be565b34801561059157600080fd5b506105a56105a03660046126d2565b6110ca565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f3565b3480156105f557600080fd5b506000546101de9067ffffffffffffffff1681565b34801561061657600080fd5b506102d5610625366004612734565b61113b565b34801561063657600080fd5b506102d56106453660046127be565b6116d7565b34801561065657600080fd5b5061065f611b7a565b6040516101f3939291906127ea565b6102d561067c3660046126d2565b611bd7565b600080600054700100000000000000000000000000000000900460ff1660028111156106af576106af612571565b146106e6576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610722576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008154811061073657610736612815565b6000918252602090912060039091020154640100000000900460ff1661075d576002610760565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561081157610811612571565b02179055600281111561082657610826612571565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61085e82826000610874565b5050565b606061086f602080611f11565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108a0576108a0612571565b146108d7576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b821580156108e3575080155b1561091a576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061092f5761092f612815565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff808216606085018190527001000000000000000000000000000000009092041660808401529193506109c391908590611fa816565b90507f0000000000000000000000000000000000000000000000000000000000000000610a82826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610ac4576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aef7f00000000000000000000000000000000000000000000000000000000000000006001612873565b610b8b826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610ba457610ba48486611fb0565b815160009063ffffffff90811614610c04576003836000015163ffffffff1681548110610bd357610bd3612815565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c3d846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c519190612873565b610c5b919061288b565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610cce576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d4c576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610ec257610ec2612815565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f239060019061288b565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff81526020810192909252600391908101610ff27ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110b8904361288b565b40600255565b61085e82826001610874565b600381815481106110da57600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff16600281111561116757611167612571565b1461119e576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111b3576111b3612815565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112127f00000000000000000000000000000000000000000000000000000000000000006001612873565b6112ae826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16146112ef576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080891561137257611313836fffffffffffffffffffffffffffffffff16612009565b67ffffffffffffffff16156113465761133d6113306001866128a2565b865463ffffffff166120af565b60010154611368565b7f00000000000000000000000000000000000000000000000000000000000000005b915084905061138c565b8460010154915061138984600161133091906128d3565b90505b600882901b60088a8a6040516113a3929190612907565b6040518091039020901b146113e4576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806113f08d61214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a001604051602081830303815290604052805190602001209050600084600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328f8f8f8f886040518663ffffffff1660e01b81526004016114b2959493929190612960565b6020604051808303816000875af11580156114d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f5919061299a565b6002878101549290911492506000916115a0906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61163c8b6fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61164691906129b3565b61165091906129d4565b67ffffffffffffffff161590508115158103611698576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505087547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790975550505050505050505050505050565b60008054700100000000000000000000000000000000900460ff16600281111561170357611703612571565b1461173a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806117468461214c565b600182810154835491830154835460408051602081019490945263ffffffff948516908401526060830191909152919091166080820152919350915060009060a00160405160208183030381529060405280519060200120905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561180d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118319190612a22565b9050866001036118f3576002546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af11580156118c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ed919061299a565b50611b71565b866002036119705760018401546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b866003036119ed5760018301546040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101899052602481018490526044810191909152602060648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b86600403611ac657600284015473ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad908990859060c090611a3a906fffffffffffffffffffffffffffffffff16612009565b611a6e9067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612873565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e087901b168152600481019490945260248401929092521b6044820152600860648201526084810188905260a4016118aa565b86600503611b3f576040517f52f0f3ad00000000000000000000000000000000000000000000000000000000815260048101889052602481018390524660c01b6044820152600860648201526084810186905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4016118aa565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bd0610862565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c0357611c03612571565b14611c3a576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c4f57611c4f612815565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cbf90700100000000000000000000000000000000900467ffffffffffffffff164261288b565b6002830154611cef9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612873565b11611d26576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d44575060065460ff165b15611d7b576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611d8957508215155b15611dc0576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611e8e576000838281548110611de157611de1612815565b6000918252602080832090910154808352600590915260409091205490915015611e37576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e4c57611e4c612815565b600091825260209091206003909102018054909150640100000000900460ff16611e7b57600193505050611e8e565b505080611e8790612a58565b9050611dc4565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ed791612537565b83600003611f0b57600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f4884367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612873565b90508267ffffffffffffffff1667ffffffffffffffff811115611f6d57611f6d612a90565b6040519080825280601f01601f191660200182016040528015611f97576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600082901a6001811480611fc7575060ff81166002145b612004576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810184905260240160405180910390fd5b505050565b600080612096837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120cd846fffffffffffffffffffffffffffffffff1661248b565b9050600383815481106120e2576120e2612815565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461214557815460038054909163ffffffff1690811061213057612130612815565b906000526020600020906003020191506120f3565b5092915050565b600080600083905060006003828154811061216957612169612815565b600091825260209091206002600390920201908101549091507f000000000000000000000000000000000000000000000000000000000000000090612240906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1611612281576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612348906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082146123c357825463ffffffff1661238d7f00000000000000000000000000000000000000000000000000000000000000006001612873565b8303612397578391505b600381815481106123aa576123aa612815565b9060005260206000209060030201935080945050612285565b600280820154908401546fffffffffffffffffffffffffffffffff91821691166000816123f08460011c90565b6fffffffffffffffffffffffffffffffff1614905080156124495761241f6124196001846128a2565b886120af565b98506003878154811061243457612434612815565b9060005260206000209060030201975061247f565b6003878154811061245c5761245c612815565b9060005260206000209060030201985061247c82600161241991906128d3565b97505b50505050505050915091565b6000811960018301168161251f827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906125559190612558565b50565b5b8082111561256d5760008155600101612559565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600383106125db577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b600080604083850312156125f457600080fd5b50508035926020909101359150565b6000815180845260005b818110156126295760208185018101518683018201520161260d565b8181111561263b576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006126816020830184612603565b9392505050565b8035801515811461269857600080fd5b919050565b6000806000606084860312156126b257600080fd5b83359250602084013591506126c960408501612688565b90509250925092565b6000602082840312156126e457600080fd5b5035919050565b60008083601f8401126126fd57600080fd5b50813567ffffffffffffffff81111561271557600080fd5b60208301915083602082850101111561272d57600080fd5b9250929050565b6000806000806000806080878903121561274d57600080fd5b8635955061275d60208801612688565b9450604087013567ffffffffffffffff8082111561277a57600080fd5b6127868a838b016126eb565b9096509450606089013591508082111561279f57600080fd5b506127ac89828a016126eb565b979a9699509497509295939492505050565b6000806000606084860312156127d357600080fd5b505081359360208301359350604090920135919050565b60ff8416815282602082015260606040820152600061280c6060830184612603565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561288657612886612844565b500190565b60008282101561289d5761289d612844565b500390565b60006fffffffffffffffffffffffffffffffff838116908316818110156128cb576128cb612844565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156128fe576128fe612844565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612974606083018789612917565b8281036020840152612987818688612917565b9150508260408301529695505050505050565b6000602082840312156129ac57600080fd5b5051919050565b600067ffffffffffffffff838116908316818110156128cb576128cb612844565b600067ffffffffffffffff80841680612a16577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612a3457600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461268157600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a8957612a89612844565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a" var OutputBisectionGameDeployedBin = "0x6080604052600436106101b75760003560e01c80638980e0cc116100ec578063c6f0308c1161008a578063d8cc1a3c11610064578063d8cc1a3c14610649578063f8f43ff614610669578063fa24f74314610689578063fdffbb28146106ad57600080fd5b8063c6f0308c14610590578063caa4ba2d146105f4578063cf09e0d01461062857600080fd5b8063bbdc02db116100c6578063bbdc02db146104ce578063bcef3b551461050c578063c31b29ce14610549578063c55cd0c71461057d57600080fd5b80638980e0cc146104455780638b85902b1461045a578063929312981461049a57600080fd5b80634778efe811610159578063632247ea11610133578063632247ea146103d35780636361506d146103e65780636737abeb146103fc5780638129fc1c1461043057600080fd5b80634778efe81461033457806354fd4d5014610368578063609d3334146103be57600080fd5b8063266198f911610195578063266198f9146102845780632810e1d6146102b857806335fef567146102cd578063363cc427146102e257600080fd5b806319effeb4146101bc578063200d2ed21461020757806324185bc614610242575b600080fd5b3480156101c857600080fd5b506000546101e99068010000000000000000900467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561021357600080fd5b5060005461023590700100000000000000000000000000000000900460ff1681565b6040516101fe9190612734565b34801561024e57600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101fe565b34801561029057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b3480156102c457600080fd5b506102356106c0565b6102e06102db366004612775565b610891565b005b3480156102ee57600080fd5b5060015461030f9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fe565b34801561034057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561037457600080fd5b506103b16040518060400160405280600681526020017f302e302e3133000000000000000000000000000000000000000000000000000081525081565b6040516101fe9190612802565b3480156103ca57600080fd5b506103b16108a1565b6102e06103e1366004612831565b6108b3565b3480156103f257600080fd5b5061027660025481565b34801561040857600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561043c57600080fd5b506102e0610fab565b34801561045157600080fd5b50600354610276565b34801561046657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135610276565b3480156104a657600080fd5b5061030f7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104da57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020016101fe565b34801561051857600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335610276565b34801561055557600080fd5b506101e97f000000000000000000000000000000000000000000000000000000000000000081565b6102e061058b366004612775565b6110fc565b34801561059c57600080fd5b506105b06105ab366004612866565b611108565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101fe565b34801561060057600080fd5b506102767f000000000000000000000000000000000000000000000000000000000000000081565b34801561063457600080fd5b506000546101e99067ffffffffffffffff1681565b34801561065557600080fd5b506102e06106643660046128c8565b611179565b34801561067557600080fd5b506102e0610684366004612952565b6116ba565b34801561069557600080fd5b5061069e611b98565b6040516101fe9392919061297e565b6102e06106bb366004612866565b611bf5565b600080600054700100000000000000000000000000000000900460ff1660028111156106ee576106ee612705565b14610725576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60065460ff16610761576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003600081548110610775576107756129a9565b6000918252602090912060039091020154640100000000900460ff1661079c57600261079f565b60015b6000805467ffffffffffffffff421668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff82168117835592935083927fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffff000000000000000000ffffffffffffffff9091161770010000000000000000000000000000000083600281111561085057610850612705565b02179055600281111561086557610865612705565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b61089d828260006108b3565b5050565b60606108ae602080611f2f565b905090565b60008054700100000000000000000000000000000000900460ff1660028111156108df576108df612705565b14610916576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610922575080155b15610959576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006003848154811061096e5761096e6129a9565b600091825260208083206040805160a081018252600394909402909101805463ffffffff808216865264010000000090910460ff16151593850193909352600181015491840191909152600201546fffffffffffffffffffffffffffffffff80821660608501819052700100000000000000000000000000000000909204166080840152919350610a0291908590611fc616565b90507f0000000000000000000000000000000000000000000000000000000000000000610ac1826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610b03576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b2e7f00000000000000000000000000000000000000000000000000000000000000006001612a07565b610bca826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1603610be257610be284611fce565b815160009063ffffffff90811614610c42576003836000015163ffffffff1681548110610c1157610c116129a9565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610c7b846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610c8f9190612a07565b610c999190612a1f565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610d0c576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b42176000888152608086901b6fffffffffffffffffffffffffffffffff8b1617602052604081209192509060008181526004602052604090205490915060ff1615610d8a576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581529281018d81526fffffffffffffffffffffffffffffffff808c1660608401908152898216608085019081526003805480880182559981905294519885027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b8101805498511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009099169a909916999099179690961790965590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8701559351925184167001000000000000000000000000000000000292909316919091177fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d9093019290925580548b908110610f0057610f006129a9565b600091825260208083206003928302018054941515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909516949094179093558b82526005909252604090209054610f6190600190612a1f565b8154600181018355600092835260208320015560405133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526003919081016110307ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff90931692909217949094178155604083015181850155606083015160809093015182167001000000000000000000000000000000000292909116919091176002909101556110f69043612a1f565b40600255565b61089d828260016108b3565b6003818154811061111857600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b60008054700100000000000000000000000000000000900460ff1660028111156111a5576111a5612705565b146111dc576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600387815481106111f1576111f16129a9565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112507f00000000000000000000000000000000000000000000000000000000000000006001612a07565b6112ec826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461132d576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113b057611351836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff16156113845761137b61136e600186612a36565b865463ffffffff166120c8565b600101546113a6565b7f00000000000000000000000000000000000000000000000000000000000000005b91508490506113ca565b846001015491506113c784600161136e9190612a67565b90505b600882901b60088a8a6040516113e1929190612a9b565b6040518091039020901b14611422576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061142d8c612165565b9050600082600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e14ced328d8d8d8d886040518663ffffffff1660e01b8152600401611497959493929190612af4565b6020604051808303816000875af11580156114b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114da9190612b2e565b600285810154929091149250600091611585906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611621896fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61162b9190612b47565b6116359190612b68565b67ffffffffffffffff16159050811515810361167d576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505085547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000179095555050505050505050505050565b60008054700100000000000000000000000000000000900460ff1660028111156116e6576116e6612705565b1461171d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008061172c86612194565b935093509350935060006117428585858561255f565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190612bb6565b905088600103611897576002546040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018b9052602481018490526044810191909152602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a4015b6020604051808303816000875af115801561186d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118919190612b2e565b50611b8d565b8860020361190e576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101879052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600303611985576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a90526024810183905260448101859052602060648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b88600403611ae25760006fffffffffffffffffffffffffffffffff861615611a06576119c2866fffffffffffffffffffffffffffffffff16612022565b6119f69067ffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000612a07565b611a01906001612a07565b611a28565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018c90526024810185905260c082901b604482015260086064820152608481018a905290915073ffffffffffffffffffffffffffffffffffffffff8316906352f0f3ad9060a4016020604051808303816000875af1158015611ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adb9190612b2e565b5050611b8d565b88600503611b5b576040517f52f0f3ad000000000000000000000000000000000000000000000000000000008152600481018a9052602481018390524660c01b6044820152600860648201526084810188905273ffffffffffffffffffffffffffffffffffffffff8216906352f0f3ad9060a40161184e565b6040517fff137e6500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b7f0000000000000000000000000000000000000000000000000000000000000000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611bee6108a1565b9050909192565b60008054700100000000000000000000000000000000900460ff166002811115611c2157611c21612705565b14611c58576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611c6d57611c6d6129a9565b60009182526020909120600260039092020190810154909150677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1690611cdd90700100000000000000000000000000000000900467ffffffffffffffff1642612a1f565b6002830154611d0d9190700100000000000000000000000000000000900460401c67ffffffffffffffff16612a07565b11611d44576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260056020526040902082158015611d62575060065460ff165b15611d99576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8054158015611da757508215155b15611dde576040517ff1a9458100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8254811015611eac576000838281548110611dff57611dff6129a9565b6000918252602080832090910154808352600590915260409091205490915015611e55576040517f9a07664600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060038281548110611e6a57611e6a6129a9565b600091825260209091206003909102018054909150640100000000900460ff16611e9957600193505050611eac565b505080611ea590612bec565b9050611de2565b5082547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000821515021783556000848152600560205260408120611ef5916126cb565b83600003611f2957600680547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b50505050565b60606000611f6684367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003612a07565b90508267ffffffffffffffff1667ffffffffffffffff811115611f8b57611f8b612c24565b6040519080825280601f01601f191660200182016040528015611fb5576020820181803683370190505b509150828160208401375092915050565b151760011b90565b600081901a6001811480611fe5575060ff81166002145b61089d576040517ff40239db0000000000000000000000000000000000000000000000000000000081526004810183905260240160405180910390fd5b6000806120af837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b6000806120e6846fffffffffffffffffffffffffffffffff1661261f565b9050600383815481106120fb576120fb6129a9565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff82811691161461215e57815460038054909163ffffffff16908110612149576121496129a9565b9060005260206000209060030201915061210c565b5092915050565b600080600080600061217686612194565b935093509350935061218a8484848461255f565b9695505050505050565b60008060008060008590506000600382815481106121b4576121b46129a9565b600091825260209091206002600390920201908101549091507f00000000000000000000000000000000000000000000000000000000000000009061228b906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16116122cc576040517fb34b5c2200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000815b60028301547f000000000000000000000000000000000000000000000000000000000000000090612393906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff16925082111561240f57825463ffffffff166123d97f00000000000000000000000000000000000000000000000000000000000000006001612a07565b83036123e3578391505b600381815481106123f6576123f66129a9565b90600052602060002090600302019350809450506122d0565b600280820154908401546fffffffffffffffffffffffffffffffff918216911660008161243c8460011c90565b6fffffffffffffffffffffffffffffffff16149050801561250d576000612474836fffffffffffffffffffffffffffffffff16612022565b67ffffffffffffffff1611156124c357600061249a612494600185612a36565b896120c8565b6001810154600290910154909c506fffffffffffffffffffffffffffffffff169a506124e79050565b7f00000000000000000000000000000000000000000000000000000000000000009a505b600186015460028701549099506fffffffffffffffffffffffffffffffff169750612551565b600061251d612494846001612a67565b6001808901546002808b015492840154930154909e506fffffffffffffffffffffffffffffffff9182169d50919b50169850505b505050505050509193509193565b6000836fffffffffffffffffffffffffffffffff166000036125c65782826040516020016125a99291909182526fffffffffffffffffffffffffffffffff16602082015260400190565b604051602081830303815290604052805190602001209050612617565b60408051602081018790526fffffffffffffffffffffffffffffffff8087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012090505b949350505050565b600081196001830116816126b3827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b50805460008255906000526020600020908101906126e991906126ec565b50565b5b8082111561270157600081556001016126ed565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061276f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b6000806040838503121561278857600080fd5b50508035926020909101359150565b6000815180845260005b818110156127bd576020818501810151868301820152016127a1565b818111156127cf576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006128156020830184612797565b9392505050565b8035801515811461282c57600080fd5b919050565b60008060006060848603121561284657600080fd5b833592506020840135915061285d6040850161281c565b90509250925092565b60006020828403121561287857600080fd5b5035919050565b60008083601f84011261289157600080fd5b50813567ffffffffffffffff8111156128a957600080fd5b6020830191508360208285010111156128c157600080fd5b9250929050565b600080600080600080608087890312156128e157600080fd5b863595506128f16020880161281c565b9450604087013567ffffffffffffffff8082111561290e57600080fd5b61291a8a838b0161287f565b9096509450606089013591508082111561293357600080fd5b5061294089828a0161287f565b979a9699509497509295939492505050565b60008060006060848603121561296757600080fd5b505081359360208301359350604090920135919050565b60ff841681528260208201526060604082015260006129a06060830184612797565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115612a1a57612a1a6129d8565b500190565b600082821015612a3157612a316129d8565b500390565b60006fffffffffffffffffffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115612a9257612a926129d8565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081526000612b08606083018789612aab565b8281036020840152612b1b818688612aab565b9150508260408301529695505050505050565b600060208284031215612b4057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015612a5f57612a5f6129d8565b600067ffffffffffffffff80841680612baa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910692915050565b600060208284031215612bc857600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461281557600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612c1d57612c1d6129d8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c634300080f000a"
func init() { func init() {
......
...@@ -214,6 +214,8 @@ type DeployConfig struct { ...@@ -214,6 +214,8 @@ type DeployConfig struct {
FaultGameMaxDuration uint64 `json:"faultGameMaxDuration"` FaultGameMaxDuration uint64 `json:"faultGameMaxDuration"`
// OutputBisectionGameGenesisBlock is the block number for genesis. // OutputBisectionGameGenesisBlock is the block number for genesis.
OutputBisectionGameGenesisBlock uint64 `json:"outputBisectionGameGenesisBlock"` OutputBisectionGameGenesisBlock uint64 `json:"outputBisectionGameGenesisBlock"`
// OutputBisectionGameGenesisOutputRoot is the output root for the genesis block.
OutputBisectionGameGenesisOutputRoot common.Hash `json:"outputBisectionGameGenesisOutputRoot"`
// OutputBisectionGameSplitDepth is the depth at which the output bisection game splits. // OutputBisectionGameSplitDepth is the depth at which the output bisection game splits.
OutputBisectionGameSplitDepth uint64 `json:"outputBisectionGameSplitDepth"` OutputBisectionGameSplitDepth uint64 `json:"outputBisectionGameSplitDepth"`
// FundDevAccounts configures whether or not to fund the dev accounts. Should only be used // FundDevAccounts configures whether or not to fund the dev accounts. Should only be used
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
"faultGameMaxDepth": 63, "faultGameMaxDepth": 63,
"faultGameMaxDuration": 604800, "faultGameMaxDuration": 604800,
"outputBisectionGameGenesisBlock": 0, "outputBisectionGameGenesisBlock": 0,
"outputBisectionGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"outputBisectionGameSplitDepth": 0, "outputBisectionGameSplitDepth": 0,
"systemConfigStartBlock": 0, "systemConfigStartBlock": 0,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000", "requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
......
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
var ( var (
cannonGameType = uint8(0) cannonGameType = uint8(0)
outputCannonGameType = uint8(253) // TODO(client-pod#43): Switch the output cannon game type to 1 outputCannonGameType = uint8(1)
outputAlphabetGameType = uint8(254) outputAlphabetGameType = uint8(254)
alphabetGameType = uint8(255) alphabetGameType = uint8(255)
) )
...@@ -121,7 +121,11 @@ func registerOutputCannon( ...@@ -121,7 +121,11 @@ func registerOutputCannon(
if err != nil { if err != nil {
return nil, err return nil, err
} }
accessor, err := outputs.NewOutputCannonTraceAccessor(ctx, logger, m, cfg, l2Client, contract, dir, gameDepth, agreed, disputed) splitDepth, err := contract.GetSplitDepth(ctx)
if err != nil {
return nil, fmt.Errorf("failed to load split depth: %w", err)
}
accessor, err := outputs.NewOutputCannonTraceAccessor(ctx, logger, m, cfg, l2Client, contract, dir, gameDepth, splitDepth, agreed, disputed)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
...@@ -25,13 +25,12 @@ func NewOutputCannonTraceAccessor( ...@@ -25,13 +25,12 @@ func NewOutputCannonTraceAccessor(
contract cannon.L1HeadSource, contract cannon.L1HeadSource,
dir string, dir string,
gameDepth uint64, gameDepth uint64,
splitDepth uint64,
prestateBlock uint64, prestateBlock uint64,
poststateBlock uint64, poststateBlock uint64,
) (*trace.Accessor, error) { ) (*trace.Accessor, error) {
// TODO(client-pod#43): Load depths from the contract bottomDepth := gameDepth - splitDepth
topDepth := gameDepth / 2 outputProvider, err := NewTraceProvider(ctx, logger, cfg.RollupRpc, splitDepth, prestateBlock, poststateBlock)
bottomDepth := gameDepth - topDepth
outputProvider, err := NewTraceProvider(ctx, logger, cfg.RollupRpc, topDepth, prestateBlock, poststateBlock)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -48,6 +47,6 @@ func NewOutputCannonTraceAccessor( ...@@ -48,6 +47,6 @@ func NewOutputCannonTraceAccessor(
} }
cache := NewProviderCache(m, "output_cannon_provider", cannonCreator) cache := NewProviderCache(m, "output_cannon_provider", cannonCreator)
selector := split.NewSplitProviderSelector(outputProvider, int(topDepth), OutputRootSplitAdapter(outputProvider, cache.GetOrCreate)) selector := split.NewSplitProviderSelector(outputProvider, int(splitDepth), OutputRootSplitAdapter(outputProvider, cache.GetOrCreate))
return trace.NewAccessor(selector), nil return trace.NewAccessor(selector), nil
} }
...@@ -35,7 +35,7 @@ import ( ...@@ -35,7 +35,7 @@ import (
const alphabetGameType uint8 = 255 const alphabetGameType uint8 = 255
const cannonGameType uint8 = 0 const cannonGameType uint8 = 0
const outputCannonGameType uint8 = 253 // TODO(client-pod#43): Switch this game type to 1 const outputCannonGameType uint8 = 1
const alphabetGameDepth = 4 const alphabetGameDepth = 4
var lastAlphabetTraceIndex = big.NewInt(1<<alphabetGameDepth - 1) var lastAlphabetTraceIndex = big.NewInt(1<<alphabetGameDepth - 1)
...@@ -143,6 +143,7 @@ func (h *FactoryHelper) StartAlphabetGame(ctx context.Context, claimedAlphabet s ...@@ -143,6 +143,7 @@ func (h *FactoryHelper) StartAlphabetGame(ctx context.Context, claimedAlphabet s
func (h *FactoryHelper) StartOutputCannonGame(ctx context.Context, rollupEndpoint string, rootClaim common.Hash) *OutputCannonGameHelper { func (h *FactoryHelper) StartOutputCannonGame(ctx context.Context, rollupEndpoint string, rootClaim common.Hash) *OutputCannonGameHelper {
rollupClient, err := dial.DialRollupClientWithTimeout(ctx, 30*time.Second, testlog.Logger(h.t, log.LvlInfo), rollupEndpoint) rollupClient, err := dial.DialRollupClientWithTimeout(ctx, 30*time.Second, testlog.Logger(h.t, log.LvlInfo), rollupEndpoint)
h.require.NoError(err) h.require.NoError(err)
h.t.Cleanup(rollupClient.Close)
extraData, _ := h.createBisectionGameExtraData(ctx, rollupClient) extraData, _ := h.createBisectionGameExtraData(ctx, rollupClient)
...@@ -279,11 +280,22 @@ func (h *FactoryHelper) createCannonGame(ctx context.Context, rootClaim common.H ...@@ -279,11 +280,22 @@ func (h *FactoryHelper) createCannonGame(ctx context.Context, rootClaim common.H
} }
func (h *FactoryHelper) createBisectionGameExtraData(ctx context.Context, client *sources.RollupClient) (extraData []byte, l2BlockNumber uint64) { func (h *FactoryHelper) createBisectionGameExtraData(ctx context.Context, client *sources.RollupClient) (extraData []byte, l2BlockNumber uint64) {
timeoutCtx, cancel := context.WithTimeout(ctx, 1*time.Minute)
defer cancel()
err := wait.For(timeoutCtx, time.Second, func() (bool, error) {
status, err := client.SyncStatus(ctx)
if err != nil {
return false, err
}
return status.SafeL2.Number > 0, nil
})
h.require.NoError(err, "Safe head did not progress past genesis")
syncStatus, err := client.SyncStatus(ctx) syncStatus, err := client.SyncStatus(ctx)
h.require.NoError(err, "failed to get sync status") h.require.NoError(err, "failed to get sync status")
l2BlockNumber = syncStatus.SafeL2.Number l2BlockNumber = syncStatus.SafeL2.Number
h.t.Logf("Creating game with l2 block number: %v", l2BlockNumber)
extraData = make([]byte, 32) extraData = make([]byte, 32)
binary.BigEndian.PutUint64(extraData, l2BlockNumber) binary.BigEndian.PutUint64(extraData[24:], l2BlockNumber)
return return
} }
......
...@@ -402,10 +402,12 @@ func (g *OutputGameHelper) gameData(ctx context.Context) string { ...@@ -402,10 +402,12 @@ func (g *OutputGameHelper) gameData(ctx context.Context) string {
info = info + fmt.Sprintf("%v - Position: %v, Depth: %v, IndexAtDepth: %v Trace Index: %v, Value: %v, Countered: %v, ParentIndex: %v\n", info = info + fmt.Sprintf("%v - Position: %v, Depth: %v, IndexAtDepth: %v Trace Index: %v, Value: %v, Countered: %v, ParentIndex: %v\n",
i, claim.Position.Int64(), pos.Depth(), pos.IndexAtDepth(), pos.TraceIndex(maxDepth), common.Hash(claim.Claim).Hex(), claim.Countered, claim.ParentIndex) i, claim.Position.Int64(), pos.Depth(), pos.IndexAtDepth(), pos.TraceIndex(maxDepth), common.Hash(claim.Claim).Hex(), claim.Countered, claim.ParentIndex)
} }
l2BlockNum, err := g.game.L2BlockNumber(opts)
g.require.NoError(err, "Load l2 block number")
status, err := g.game.Status(opts) status, err := g.game.Status(opts)
g.require.NoError(err, "Load game status") g.require.NoError(err, "Load game status")
return fmt.Sprintf("Game %v - %v - Split Depth: %v - Max Depth: %v:\n%v\n", return fmt.Sprintf("Game %v - %v - L2 Block: %v - Split Depth: %v - Max Depth: %v:\n%v\n",
g.addr, Status(status), splitDepth, maxDepth, info) g.addr, Status(status), l2BlockNum.Uint64(), splitDepth, maxDepth, info)
} }
func (g *OutputGameHelper) LogGameData(ctx context.Context) { func (g *OutputGameHelper) LogGameData(ctx context.Context) {
......
...@@ -138,7 +138,7 @@ func (f *fakePoS) Start() error { ...@@ -138,7 +138,7 @@ func (f *fakePoS) Start() error {
tim.Stop() tim.Stop()
return nil return nil
} }
envelope, err := f.engineAPI.GetPayloadV2(*res.PayloadID) envelope, err := f.engineAPI.GetPayloadV3(*res.PayloadID)
if err != nil { if err != nil {
f.log.Error("failed to finish building L1 block", "err", err) f.log.Error("failed to finish building L1 block", "err", err)
continue continue
...@@ -178,7 +178,7 @@ func (f *fakePoS) Start() error { ...@@ -178,7 +178,7 @@ func (f *fakePoS) Start() error {
continue continue
} }
} }
if _, err := f.engineAPI.ForkchoiceUpdatedV2(engine.ForkchoiceStateV1{ if _, err := f.engineAPI.ForkchoiceUpdatedV3(engine.ForkchoiceStateV1{
HeadBlockHash: envelope.ExecutionPayload.BlockHash, HeadBlockHash: envelope.ExecutionPayload.BlockHash,
SafeBlockHash: safe.Hash(), SafeBlockHash: safe.Hash(),
FinalizedBlockHash: finalized.Hash(), FinalizedBlockHash: finalized.Hash(),
......
package e2eutils
import (
"fmt"
"os"
"strings"
"testing"
"unicode"
"unicode/utf8"
"github.com/stretchr/testify/require"
)
func TempDir(t *testing.T) string {
// Drop unusual characters (such as path separators or
// characters interacting with globs) from the directory name to
// avoid surprising os.MkdirTemp behavior.
// Taken from the t.TempDir() implementation in the standard library.
mapper := func(r rune) rune {
if r < utf8.RuneSelf {
const allowed = "!#$%&()+,-.=@^_{}~ "
if '0' <= r && r <= '9' ||
'a' <= r && r <= 'z' ||
'A' <= r && r <= 'Z' {
return r
}
if strings.ContainsRune(allowed, r) {
return r
}
} else if unicode.IsLetter(r) || unicode.IsNumber(r) {
return r
}
return -1
}
dir, err := os.MkdirTemp("", strings.Map(mapper, fmt.Sprintf("op-e2e-%s", t.Name())))
require.NoError(t, err)
t.Cleanup(func() {
err := os.RemoveAll(dir)
if err != nil {
t.Logf("Error removing temp dir %s: %s", dir, err)
}
})
return dir
}
package transactions
import (
"crypto/ecdsa"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto/kzg4844"
"github.com/holiman/uint256"
)
var (
emptyBlob kzg4844.Blob
emptyBlobCommit kzg4844.Commitment
emptyBlobProof kzg4844.Proof
)
func init() {
var err error
emptyBlob = kzg4844.Blob{}
emptyBlobCommit, err = kzg4844.BlobToCommitment(emptyBlob)
if err != nil {
panic("failed to create empty blob commitment: " + err.Error())
}
emptyBlobProof, err = kzg4844.ComputeBlobProof(emptyBlob, emptyBlobCommit)
if err != nil {
panic("failed to create empty blob proof: " + err.Error())
}
}
// with thanks to fjl
// https://github.com/ethereum/go-ethereum/commit/2a6beb6a39d7cb3c5906dd4465d65da6efcc73cd
func CreateEmptyBlobTx(key *ecdsa.PrivateKey, withSidecar bool, chainID uint64) *types.BlobTx {
sidecar := &types.BlobTxSidecar{
Blobs: []kzg4844.Blob{emptyBlob},
Commitments: []kzg4844.Commitment{emptyBlobCommit},
Proofs: []kzg4844.Proof{emptyBlobProof},
}
blobTx := &types.BlobTx{
ChainID: uint256.NewInt(chainID),
Nonce: 0,
GasTipCap: uint256.NewInt(2200000000000),
GasFeeCap: uint256.NewInt(5000000000000),
Gas: 25000,
To: common.Address{0x03, 0x04, 0x05},
Value: uint256.NewInt(99),
Data: make([]byte, 50),
BlobFeeCap: uint256.NewInt(150000000000),
BlobHashes: sidecar.BlobHashes(),
}
if withSidecar {
blobTx.Sidecar = sidecar
}
return blobTx
}
...@@ -2,12 +2,15 @@ package main ...@@ -2,12 +2,15 @@ package main
import ( import (
"encoding/json" "encoding/json"
"errors"
"flag" "flag"
"fmt" "fmt"
"os" "os"
"os/exec" "os/exec"
"os/signal"
"path/filepath" "path/filepath"
"strconv" "strconv"
"syscall"
"time" "time"
"github.com/ethereum-optimism/optimism/op-e2e/external" "github.com/ethereum-optimism/optimism/op-e2e/external"
...@@ -67,11 +70,39 @@ func run(configPath string) error { ...@@ -67,11 +70,39 @@ func run(configPath string) error {
} }
fmt.Printf("================== op-geth shim awaiting termination ==========================\n") fmt.Printf("================== op-geth shim awaiting termination ==========================\n")
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
select { select {
case <-sigs:
fmt.Printf("================== op-geth shim caught signal, killing ==========================\n")
sess.session.Terminate()
return awaitExit(sess.session)
case <-sess.session.Exited: case <-sess.session.Exited:
return fmt.Errorf("geth exited") return fmt.Errorf("geth exited with code %d", sess.session.ExitCode())
case <-time.After(30 * time.Minute): case <-time.After(30 * time.Minute):
return fmt.Errorf("exiting after 30 minute timeout") fmt.Printf("================== op-geth shim timed out, killing ==========================\n")
sess.session.Terminate()
if err := awaitExit(sess.session); err != nil {
fmt.Printf("error killing geth: %v\n", err)
}
return errors.New("geth timed out after 30 minutes")
}
}
func awaitExit(sess *gexec.Session) error {
select {
case <-sess.Exited:
return nil
case <-time.After(5 * time.Second):
sess.Kill()
select {
case <-sess.Exited:
return nil
case <-time.After(30 * time.Second):
return fmt.Errorf("exiting after 30 second timeout")
}
} }
} }
......
...@@ -38,12 +38,8 @@ func TestOutputCannonGame(t *testing.T) { ...@@ -38,12 +38,8 @@ func TestOutputCannonGame(t *testing.T) {
game.Attack(ctx, i, common.Hash{0xaa}) game.Attack(ctx, i, common.Hash{0xaa})
game.LogGameData(ctx) game.LogGameData(ctx)
} }
game.WaitForCorrectOutputRoot(ctx, splitDepth)
// Post the first cannon output root (with 01 status code to show the output root is invalid) // Wait for the challenger to post the first claim in the cannon trace
game.Attack(ctx, splitDepth, common.Hash{0x01}) game.WaitForClaimAtDepth(ctx, int(splitDepth+1))
// Challenger should counter
game.WaitForClaimAtDepth(ctx, int(splitDepth+2))
game.LogGameData(ctx) game.LogGameData(ctx)
} }
...@@ -47,6 +47,7 @@ type OpGeth struct { ...@@ -47,6 +47,7 @@ type OpGeth struct {
L1Head eth.BlockInfo L1Head eth.BlockInfo
L2Head *eth.ExecutionPayload L2Head *eth.ExecutionPayload
sequenceNum uint64 sequenceNum uint64
lgr log.Logger
} }
func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, error) { func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, error) {
...@@ -117,11 +118,14 @@ func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, e ...@@ -117,11 +118,14 @@ func NewOpGeth(t *testing.T, ctx context.Context, cfg *SystemConfig) (*OpGeth, e
L2ChainConfig: l2Genesis.Config, L2ChainConfig: l2Genesis.Config,
L1Head: eth.BlockToInfo(l1Block), L1Head: eth.BlockToInfo(l1Block),
L2Head: genesisPayload, L2Head: genesisPayload,
lgr: logger,
}, nil }, nil
} }
func (d *OpGeth) Close() { func (d *OpGeth) Close() {
_ = d.node.Close() if err := d.node.Close(); err != nil {
d.lgr.Error("error closing node", "err", err)
}
d.l2Engine.Close() d.l2Engine.Close()
d.L2Client.Close() d.L2Client.Close()
} }
......
...@@ -31,6 +31,8 @@ import ( ...@@ -31,6 +31,8 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/bindings" "github.com/ethereum-optimism/optimism/op-bindings/bindings"
"github.com/ethereum-optimism/optimism/op-bindings/predeploys" "github.com/ethereum-optimism/optimism/op-bindings/predeploys"
"github.com/ethereum-optimism/optimism/op-e2e/config" "github.com/ethereum-optimism/optimism/op-e2e/config"
gethutils "github.com/ethereum-optimism/optimism/op-e2e/e2eutils/geth"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/transactions"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum-optimism/optimism/op-node/metrics" "github.com/ethereum-optimism/optimism/op-node/metrics"
rollupNode "github.com/ethereum-optimism/optimism/op-node/node" rollupNode "github.com/ethereum-optimism/optimism/op-node/node"
...@@ -171,6 +173,42 @@ func TestSystemE2EDencunAtGenesis(t *testing.T) { ...@@ -171,6 +173,42 @@ func TestSystemE2EDencunAtGenesis(t *testing.T) {
require.NotNil(t, head.ExcessBlobGas(), "L1 is building dencun blocks since genesis") require.NotNil(t, head.ExcessBlobGas(), "L1 is building dencun blocks since genesis")
} }
// TestSystemE2EDencunAtGenesis tests if L2 finalizes when blobs are present on L1
func TestSystemE2EDencunAtGenesisWithBlobs(t *testing.T) {
InitParallel(t)
cfg := DefaultSystemConfig(t)
//cancun is on from genesis:
genesisActivation := uint64(0)
cfg.DeployConfig.L1CancunTimeOffset = &genesisActivation // i.e. turn cancun on at genesis time + 0
sys, err := cfg.Start(t)
require.Nil(t, err, "Error starting up system")
defer sys.Close()
// send a blob-containing txn on l1
ethPrivKey := sys.Cfg.Secrets.Alice
txData := transactions.CreateEmptyBlobTx(ethPrivKey, true, sys.Cfg.L1ChainIDBig().Uint64())
tx := types.MustSignNewTx(ethPrivKey, types.LatestSignerForChainID(cfg.L1ChainIDBig()), txData)
// send blob-containing txn
sendCtx, sendCancel := context.WithTimeout(context.Background(), 15*time.Second)
defer sendCancel()
l1Client := sys.Clients["l1"]
err = l1Client.SendTransaction(sendCtx, tx)
require.NoError(t, err, "Sending L1 empty blob tx")
// Wait for transaction on L1
blockContainsBlob, err := geth.WaitForTransaction(tx.Hash(), l1Client, 30*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for blob tx on L1")
// end sending blob-containing txns on l1
l2Client := sys.Clients["sequencer"]
finalizedBlock, err := gethutils.WaitForL1OriginOnL2(blockContainsBlob.BlockNumber.Uint64(), l2Client, 30*time.Duration(cfg.DeployConfig.L1BlockTime)*time.Second)
require.Nil(t, err, "Waiting for L1 origin of blob tx on L2")
finalizationTimeout := 30 * time.Duration(cfg.DeployConfig.L1BlockTime) * time.Second
_, err = gethutils.WaitForBlockToBeSafe(finalizedBlock.Header().Number, l2Client, finalizationTimeout)
require.Nil(t, err, "Waiting for safety of L2 block")
}
// TestSystemE2E sets up a L1 Geth node, a rollup node, and a L2 geth node and then confirms that L1 deposits are reflected on L2. // TestSystemE2E sets up a L1 Geth node, a rollup node, and a L2 geth node and then confirms that L1 deposits are reflected on L2.
// All nodes are run in process (but are the full nodes, not mocked or stubbed). // All nodes are run in process (but are the full nodes, not mocked or stubbed).
func TestSystemE2E(t *testing.T) { func TestSystemE2E(t *testing.T) {
......
...@@ -24,7 +24,12 @@ the transaction hash. ...@@ -24,7 +24,12 @@ the transaction hash.
`batch_decoder reassemble` goes through all of the found frames in the cache & then turns them `batch_decoder reassemble` goes through all of the found frames in the cache & then turns them
into channels. It then stores the channels with metadata on disk where the file name is the Channel ID. into channels. It then stores the channels with metadata on disk where the file name is the Channel ID.
Each channel can contain multiple batches.
If the batch is span batch, `batch_decoder` derives span batch using `L2BlockTime`, `L2GenesisTime`, and `L2ChainID`.
These arguments can be provided to the binary using flags.
If the batch is a singular batch, `batch_decoder` does not derive and stores the batch as is.
### Force Close ### Force Close
...@@ -45,7 +50,7 @@ those frames need to be generated differently than simply closing the channel. ...@@ -45,7 +50,7 @@ those frames need to be generated differently than simply closing the channel.
jq . $JSON_FILE jq . $JSON_FILE
# Print the number of valid & invalid transactions # Print the number of valid & invalid transactions
jq .valid_data $TX_DIR/* | sort | uniq -c jq .valid_data $TX_DIR/* | sort | uniq -c
# Select all transactions that have invalid data & then print the transaction hash # Select all transactions that have invalid data & then print the transaction hash
jq "select(.valid_data == false)|.tx.hash" $TX_DIR jq "select(.valid_data == false)|.tx.hash" $TX_DIR
......
...@@ -4,11 +4,13 @@ import ( ...@@ -4,11 +4,13 @@ import (
"context" "context"
"fmt" "fmt"
"log" "log"
"math/big"
"os" "os"
"time" "time"
"github.com/ethereum-optimism/optimism/op-node/cmd/batch_decoder/fetch" "github.com/ethereum-optimism/optimism/op-node/cmd/batch_decoder/fetch"
"github.com/ethereum-optimism/optimism/op-node/cmd/batch_decoder/reassemble" "github.com/ethereum-optimism/optimism/op-node/cmd/batch_decoder/reassemble"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive" "github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient"
...@@ -77,7 +79,7 @@ func main() { ...@@ -77,7 +79,7 @@ func main() {
End: uint64(cliCtx.Int("end")), End: uint64(cliCtx.Int("end")),
ChainID: chainID, ChainID: chainID,
BatchSenders: map[common.Address]struct{}{ BatchSenders: map[common.Address]struct{}{
common.HexToAddress(cliCtx.String("sender")): struct{}{}, common.HexToAddress(cliCtx.String("sender")): {},
}, },
BatchInbox: common.HexToAddress(cliCtx.String("inbox")), BatchInbox: common.HexToAddress(cliCtx.String("inbox")),
OutDirectory: cliCtx.String("out"), OutDirectory: cliCtx.String("out"),
...@@ -92,13 +94,8 @@ func main() { ...@@ -92,13 +94,8 @@ func main() {
}, },
{ {
Name: "reassemble", Name: "reassemble",
Usage: "Reassembles channels from fetched batches", Usage: "Reassembles channels from fetched batch transactions and decode batches",
Flags: []cli.Flag{ Flags: []cli.Flag{
&cli.StringFlag{
Name: "inbox",
Value: "0xff00000000000000000000000000000000000420",
Usage: "Batch Inbox Address",
},
&cli.StringFlag{ &cli.StringFlag{
Name: "in", Name: "in",
Value: "/tmp/batch_decoder/transactions_cache", Value: "/tmp/batch_decoder/transactions_cache",
...@@ -109,12 +106,60 @@ func main() { ...@@ -109,12 +106,60 @@ func main() {
Value: "/tmp/batch_decoder/channel_cache", Value: "/tmp/batch_decoder/channel_cache",
Usage: "Cache directory for the found channels", Usage: "Cache directory for the found channels",
}, },
&cli.Uint64Flag{
Name: "l2-chain-id",
Value: 10,
Usage: "L2 chain id for span batch derivation. Default value from op-mainnet.",
},
&cli.Uint64Flag{
Name: "l2-genesis-timestamp",
Value: 1686068903,
Usage: "L2 genesis time for span batch derivation. Default value from op-mainnet. " +
"Superchain-registry prioritized when given value is inconsistent.",
},
&cli.Uint64Flag{
Name: "l2-block-time",
Value: 2,
Usage: "L2 block time for span batch derivation. Default value from op-mainnet. " +
"Superchain-registry prioritized when given value is inconsistent.",
},
&cli.StringFlag{
Name: "inbox",
Value: "0xFF00000000000000000000000000000000000010",
Usage: "Batch Inbox Address. Default value from op-mainnet. " +
"Superchain-registry prioritized when given value is inconsistent.",
},
}, },
Action: func(cliCtx *cli.Context) error { Action: func(cliCtx *cli.Context) error {
var (
L2GenesisTime uint64 = cliCtx.Uint64("l2-genesis-timestamp")
L2BlockTime uint64 = cliCtx.Uint64("l2-block-time")
BatchInboxAddress common.Address = common.HexToAddress(cliCtx.String("inbox"))
)
L2ChainID := new(big.Int).SetUint64(cliCtx.Uint64("l2-chain-id"))
rollupCfg, err := rollup.LoadOPStackRollupConfig(L2ChainID.Uint64())
if err == nil {
// prioritize superchain config
if L2GenesisTime != rollupCfg.Genesis.L2Time {
L2GenesisTime = rollupCfg.Genesis.L2Time
fmt.Printf("L2GenesisTime overridden: %v\n", L2GenesisTime)
}
if L2BlockTime != rollupCfg.BlockTime {
L2BlockTime = rollupCfg.BlockTime
fmt.Printf("L2BlockTime overridden: %v\n", L2BlockTime)
}
if BatchInboxAddress != rollupCfg.BatchInboxAddress {
BatchInboxAddress = rollupCfg.BatchInboxAddress
fmt.Printf("BatchInboxAddress overridden: %v\n", BatchInboxAddress)
}
}
config := reassemble.Config{ config := reassemble.Config{
BatchInbox: common.HexToAddress(cliCtx.String("inbox")), BatchInbox: BatchInboxAddress,
InDirectory: cliCtx.String("in"), InDirectory: cliCtx.String("in"),
OutDirectory: cliCtx.String("out"), OutDirectory: cliCtx.String("out"),
L2ChainID: L2ChainID,
L2GenesisTime: L2GenesisTime,
L2BlockTime: L2BlockTime,
} }
reassemble.Channels(config) reassemble.Channels(config)
return nil return nil
......
...@@ -5,13 +5,11 @@ import ( ...@@ -5,13 +5,11 @@ import (
"fmt" "fmt"
"io" "io"
"log" "log"
"math/big"
"os" "os"
"path" "path"
"sort" "sort"
"github.com/ethereum-optimism/optimism/op-node/chaincfg"
"github.com/ethereum-optimism/optimism/op-node/rollup"
"github.com/ethereum-optimism/optimism/op-node/cmd/batch_decoder/fetch" "github.com/ethereum-optimism/optimism/op-node/cmd/batch_decoder/fetch"
"github.com/ethereum-optimism/optimism/op-node/rollup/derive" "github.com/ethereum-optimism/optimism/op-node/rollup/derive"
"github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum-optimism/optimism/op-service/eth"
...@@ -24,7 +22,8 @@ type ChannelWithMetadata struct { ...@@ -24,7 +22,8 @@ type ChannelWithMetadata struct {
InvalidFrames bool `json:"invalid_frames"` InvalidFrames bool `json:"invalid_frames"`
InvalidBatches bool `json:"invalid_batches"` InvalidBatches bool `json:"invalid_batches"`
Frames []FrameWithMetadata `json:"frames"` Frames []FrameWithMetadata `json:"frames"`
Batches []derive.BatchData `json:"batches"` Batches []derive.Batch `json:"batches"`
BatchTypes []int `json:"batch_types"`
} }
type FrameWithMetadata struct { type FrameWithMetadata struct {
...@@ -36,9 +35,12 @@ type FrameWithMetadata struct { ...@@ -36,9 +35,12 @@ type FrameWithMetadata struct {
} }
type Config struct { type Config struct {
BatchInbox common.Address BatchInbox common.Address
InDirectory string InDirectory string
OutDirectory string OutDirectory string
L2ChainID *big.Int
L2GenesisTime uint64
L2BlockTime uint64
} }
func LoadFrames(directory string, inbox common.Address) []FrameWithMetadata { func LoadFrames(directory string, inbox common.Address) []FrameWithMetadata {
...@@ -68,9 +70,8 @@ func Channels(config Config) { ...@@ -68,9 +70,8 @@ func Channels(config Config) {
for _, frame := range frames { for _, frame := range frames {
framesByChannel[frame.Frame.ID] = append(framesByChannel[frame.Frame.ID], frame) framesByChannel[frame.Frame.ID] = append(framesByChannel[frame.Frame.ID], frame)
} }
cfg := chaincfg.Mainnet
for id, frames := range framesByChannel { for id, frames := range framesByChannel {
ch := processFrames(cfg, id, frames) ch := processFrames(config, id, frames)
filename := path.Join(config.OutDirectory, fmt.Sprintf("%s.json", id.String())) filename := path.Join(config.OutDirectory, fmt.Sprintf("%s.json", id.String()))
if err := writeChannel(ch, filename); err != nil { if err := writeChannel(ch, filename); err != nil {
log.Fatal(err) log.Fatal(err)
...@@ -88,7 +89,7 @@ func writeChannel(ch ChannelWithMetadata, filename string) error { ...@@ -88,7 +89,7 @@ func writeChannel(ch ChannelWithMetadata, filename string) error {
return enc.Encode(ch) return enc.Encode(ch)
} }
func processFrames(cfg *rollup.Config, id derive.ChannelID, frames []FrameWithMetadata) ChannelWithMetadata { func processFrames(cfg Config, id derive.ChannelID, frames []FrameWithMetadata) ChannelWithMetadata {
ch := derive.NewChannel(id, eth.L1BlockRef{Number: frames[0].InclusionBlock}) ch := derive.NewChannel(id, eth.L1BlockRef{Number: frames[0].InclusionBlock})
invalidFrame := false invalidFrame := false
...@@ -104,17 +105,39 @@ func processFrames(cfg *rollup.Config, id derive.ChannelID, frames []FrameWithMe ...@@ -104,17 +105,39 @@ func processFrames(cfg *rollup.Config, id derive.ChannelID, frames []FrameWithMe
} }
} }
var batches []derive.BatchData var batches []derive.Batch
var batchTypes []int
invalidBatches := false invalidBatches := false
if ch.IsReady() { if ch.IsReady() {
br, err := derive.BatchReader(ch.Reader()) br, err := derive.BatchReader(ch.Reader())
if err == nil { if err == nil {
for batch, err := br(); err != io.EOF; batch, err = br() { for batchData, err := br(); err != io.EOF; batchData, err = br() {
if err != nil { if err != nil {
fmt.Printf("Error reading batch for channel %v. Err: %v\n", id.String(), err) fmt.Printf("Error reading batchData for channel %v. Err: %v\n", id.String(), err)
invalidBatches = true invalidBatches = true
} else { } else {
batches = append(batches, *batch) batchType := batchData.GetBatchType()
batchTypes = append(batchTypes, int(batchType))
switch batchType {
case derive.SingularBatchType:
singularBatch, err := derive.GetSingularBatch(batchData)
if err != nil {
invalidBatches = true
fmt.Printf("Error converting singularBatch from batchData for channel %v. Err: %v\n", id.String(), err)
}
// singularBatch will be nil when errored
batches = append(batches, singularBatch)
case derive.SpanBatchType:
spanBatch, err := derive.DeriveSpanBatch(batchData, cfg.L2BlockTime, cfg.L2GenesisTime, cfg.L2ChainID)
if err != nil {
invalidBatches = true
fmt.Printf("Error deriving spanBatch from batchData for channel %v. Err: %v\n", id.String(), err)
}
// spanBatch will be nil when errored
batches = append(batches, spanBatch)
default:
fmt.Printf("unrecognized batch type: %d for channel %v.\n", batchData.GetBatchType(), id.String())
}
} }
} }
} else { } else {
...@@ -131,6 +154,7 @@ func processFrames(cfg *rollup.Config, id derive.ChannelID, frames []FrameWithMe ...@@ -131,6 +154,7 @@ func processFrames(cfg *rollup.Config, id derive.ChannelID, frames []FrameWithMe
InvalidFrames: invalidFrame, InvalidFrames: invalidFrame,
InvalidBatches: invalidBatches, InvalidBatches: invalidBatches,
Batches: batches, Batches: batches,
BatchTypes: batchTypes,
} }
} }
......
...@@ -172,9 +172,7 @@ func TestBatchRoundTrip(t *testing.T) { ...@@ -172,9 +172,7 @@ func TestBatchRoundTrip(t *testing.T) {
err = dec.UnmarshalBinary(enc) err = dec.UnmarshalBinary(enc)
require.NoError(t, err) require.NoError(t, err)
if dec.GetBatchType() == SpanBatchType { if dec.GetBatchType() == SpanBatchType {
rawSpanBatch, ok := dec.inner.(*RawSpanBatch) _, err := DeriveSpanBatch(&dec, blockTime, genesisTimestamp, chainID)
require.True(t, ok)
_, err := rawSpanBatch.derive(blockTime, genesisTimestamp, chainID)
require.NoError(t, err) require.NoError(t, err)
} }
require.Equal(t, batch, &dec, "Batch not equal test case %v", i) require.Equal(t, batch, &dec, "Batch not equal test case %v", i)
...@@ -222,9 +220,7 @@ func TestBatchRoundTripRLP(t *testing.T) { ...@@ -222,9 +220,7 @@ func TestBatchRoundTripRLP(t *testing.T) {
err = dec.DecodeRLP(s) err = dec.DecodeRLP(s)
require.NoError(t, err) require.NoError(t, err)
if dec.GetBatchType() == SpanBatchType { if dec.GetBatchType() == SpanBatchType {
rawSpanBatch, ok := dec.inner.(*RawSpanBatch) _, err = DeriveSpanBatch(&dec, blockTime, genesisTimestamp, chainID)
require.True(t, ok)
_, err := rawSpanBatch.derive(blockTime, genesisTimestamp, chainID)
require.NoError(t, err) require.NoError(t, err)
} }
require.Equal(t, batch, &dec, "Batch not equal test case %v", i) require.Equal(t, batch, &dec, "Batch not equal test case %v", i)
......
...@@ -3,7 +3,6 @@ package derive ...@@ -3,7 +3,6 @@ package derive
import ( import (
"bytes" "bytes"
"context" "context"
"errors"
"fmt" "fmt"
"io" "io"
...@@ -92,13 +91,9 @@ func (cr *ChannelInReader) NextBatch(ctx context.Context) (Batch, error) { ...@@ -92,13 +91,9 @@ func (cr *ChannelInReader) NextBatch(ctx context.Context) (Batch, error) {
} }
switch batchData.GetBatchType() { switch batchData.GetBatchType() {
case SingularBatchType: case SingularBatchType:
singularBatch, ok := batchData.inner.(*SingularBatch)
if !ok {
return nil, NewCriticalError(errors.New("failed type assertion to SingularBatch"))
}
cr.log.Debug("decoded singular batch from channel") cr.log.Debug("decoded singular batch from channel")
cr.metrics.RecordDerivedBatches("singular") cr.metrics.RecordDerivedBatches("singular")
return singularBatch, nil return GetSingularBatch(batchData)
case SpanBatchType: case SpanBatchType:
if origin := cr.Origin(); !cr.cfg.IsDelta(origin.Time) { if origin := cr.Origin(); !cr.cfg.IsDelta(origin.Time) {
// Check hard fork activation with the L1 inclusion block time instead of the L1 origin block time. // Check hard fork activation with the L1 inclusion block time instead of the L1 origin block time.
...@@ -106,18 +101,9 @@ func (cr *ChannelInReader) NextBatch(ctx context.Context) (Batch, error) { ...@@ -106,18 +101,9 @@ func (cr *ChannelInReader) NextBatch(ctx context.Context) (Batch, error) {
// This is just for early dropping invalid batches as soon as possible. // This is just for early dropping invalid batches as soon as possible.
return nil, NewTemporaryError(fmt.Errorf("cannot accept span batch in L1 block %s at time %d", origin, origin.Time)) return nil, NewTemporaryError(fmt.Errorf("cannot accept span batch in L1 block %s at time %d", origin, origin.Time))
} }
rawSpanBatch, ok := batchData.inner.(*RawSpanBatch)
if !ok {
return nil, NewCriticalError(errors.New("failed type assertion to SpanBatch"))
}
// If the batch type is Span batch, derive block inputs from RawSpanBatch.
spanBatch, err := rawSpanBatch.derive(cr.cfg.BlockTime, cr.cfg.Genesis.L2Time, cr.cfg.L2ChainID)
if err != nil {
return nil, err
}
cr.log.Debug("decoded span batch from channel") cr.log.Debug("decoded span batch from channel")
cr.metrics.RecordDerivedBatches("span") cr.metrics.RecordDerivedBatches("span")
return spanBatch, nil return DeriveSpanBatch(batchData, cr.cfg.BlockTime, cr.cfg.Genesis.L2Time, cr.cfg.L2ChainID)
default: default:
// error is bubbled up to user, but pipeline can skip the batch and continue after. // error is bubbled up to user, but pipeline can skip the batch and continue after.
return nil, NewTemporaryError(fmt.Errorf("unrecognized batch type: %d", batchData.GetBatchType())) return nil, NewTemporaryError(fmt.Errorf("unrecognized batch type: %d", batchData.GetBatchType()))
......
...@@ -2,6 +2,7 @@ package derive ...@@ -2,6 +2,7 @@ package derive
import ( import (
"bytes" "bytes"
"errors"
"io" "io"
"github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-node/rollup"
...@@ -66,3 +67,12 @@ func (b *SingularBatch) encode(w io.Writer) error { ...@@ -66,3 +67,12 @@ func (b *SingularBatch) encode(w io.Writer) error {
func (b *SingularBatch) decode(r *bytes.Reader) error { func (b *SingularBatch) decode(r *bytes.Reader) error {
return rlp.Decode(r, b) return rlp.Decode(r, b)
} }
// GetSingularBatch retrieves SingularBatch from batchData
func GetSingularBatch(batchData *BatchData) (*SingularBatch, error) {
singularBatch, ok := batchData.inner.(*SingularBatch)
if !ok {
return nil, NewCriticalError(errors.New("failed type assertion to SingularBatch"))
}
return singularBatch, nil
}
...@@ -3,6 +3,7 @@ package derive ...@@ -3,6 +3,7 @@ package derive
import ( import (
"bytes" "bytes"
"encoding/binary" "encoding/binary"
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"io" "io"
...@@ -377,7 +378,7 @@ func (b *RawSpanBatch) encode(w io.Writer) error { ...@@ -377,7 +378,7 @@ func (b *RawSpanBatch) encode(w io.Writer) error {
return nil return nil
} }
// derive converts RawSpanBatch into SpanBatch, which has a list of spanBatchElement. // derive converts RawSpanBatch into SpanBatch, which has a list of SpanBatchElement.
// We need chain config constants to derive values for making payload attributes. // We need chain config constants to derive values for making payload attributes.
func (b *RawSpanBatch) derive(blockTime, genesisTimestamp uint64, chainID *big.Int) (*SpanBatch, error) { func (b *RawSpanBatch) derive(blockTime, genesisTimestamp uint64, chainID *big.Int) (*SpanBatch, error) {
if b.blockCount == 0 { if b.blockCount == 0 {
...@@ -401,35 +402,45 @@ func (b *RawSpanBatch) derive(blockTime, genesisTimestamp uint64, chainID *big.I ...@@ -401,35 +402,45 @@ func (b *RawSpanBatch) derive(blockTime, genesisTimestamp uint64, chainID *big.I
} }
spanBatch := SpanBatch{ spanBatch := SpanBatch{
parentCheck: b.parentCheck, ParentCheck: b.parentCheck,
l1OriginCheck: b.l1OriginCheck, L1OriginCheck: b.l1OriginCheck,
} }
txIdx := 0 txIdx := 0
for i := 0; i < int(b.blockCount); i++ { for i := 0; i < int(b.blockCount); i++ {
batch := spanBatchElement{} batch := SpanBatchElement{}
batch.Timestamp = genesisTimestamp + b.relTimestamp + blockTime*uint64(i) batch.Timestamp = genesisTimestamp + b.relTimestamp + blockTime*uint64(i)
batch.EpochNum = rollup.Epoch(blockOriginNums[i]) batch.EpochNum = rollup.Epoch(blockOriginNums[i])
for j := 0; j < int(b.blockTxCounts[i]); j++ { for j := 0; j < int(b.blockTxCounts[i]); j++ {
batch.Transactions = append(batch.Transactions, fullTxs[txIdx]) batch.Transactions = append(batch.Transactions, fullTxs[txIdx])
txIdx++ txIdx++
} }
spanBatch.batches = append(spanBatch.batches, &batch) spanBatch.Batches = append(spanBatch.Batches, &batch)
} }
return &spanBatch, nil return &spanBatch, nil
} }
// spanBatchElement is a derived form of input to build a L2 block. // ToSpanBatch converts RawSpanBatch to SpanBatch,
// which implements a wrapper of derive method of RawSpanBatch
func (b *RawSpanBatch) ToSpanBatch(blockTime, genesisTimestamp uint64, chainID *big.Int) (*SpanBatch, error) {
spanBatch, err := b.derive(blockTime, genesisTimestamp, chainID)
if err != nil {
return nil, err
}
return spanBatch, nil
}
// SpanBatchElement is a derived form of input to build a L2 block.
// similar to SingularBatch, but does not have ParentHash and EpochHash // similar to SingularBatch, but does not have ParentHash and EpochHash
// because Span batch spec does not contain parent hash and epoch hash of every block in the span. // because Span batch spec does not contain parent hash and epoch hash of every block in the span.
type spanBatchElement struct { type SpanBatchElement struct {
EpochNum rollup.Epoch // aka l1 num EpochNum rollup.Epoch // aka l1 num
Timestamp uint64 Timestamp uint64
Transactions []hexutil.Bytes Transactions []hexutil.Bytes
} }
// singularBatchToElement converts a SingularBatch to a spanBatchElement // singularBatchToElement converts a SingularBatch to a SpanBatchElement
func singularBatchToElement(singularBatch *SingularBatch) *spanBatchElement { func singularBatchToElement(singularBatch *SingularBatch) *SpanBatchElement {
return &spanBatchElement{ return &SpanBatchElement{
EpochNum: singularBatch.EpochNum, EpochNum: singularBatch.EpochNum,
Timestamp: singularBatch.Timestamp, Timestamp: singularBatch.Timestamp,
Transactions: singularBatch.Transactions, Transactions: singularBatch.Transactions,
...@@ -437,11 +448,27 @@ func singularBatchToElement(singularBatch *SingularBatch) *spanBatchElement { ...@@ -437,11 +448,27 @@ func singularBatchToElement(singularBatch *SingularBatch) *spanBatchElement {
} }
// SpanBatch is an implementation of Batch interface, // SpanBatch is an implementation of Batch interface,
// containing the input to build a span of L2 blocks in derived form (spanBatchElement) // containing the input to build a span of L2 blocks in derived form (SpanBatchElement)
type SpanBatch struct { type SpanBatch struct {
parentCheck [20]byte // First 20 bytes of the first block's parent hash ParentCheck [20]byte // First 20 bytes of the first block's parent hash
l1OriginCheck [20]byte // First 20 bytes of the last block's L1 origin hash L1OriginCheck [20]byte // First 20 bytes of the last block's L1 origin hash
batches []*spanBatchElement // List of block input in derived form Batches []*SpanBatchElement // List of block input in derived form
}
// spanBatchMarshaling is a helper type used for JSON marshaling.
type spanBatchMarshaling struct {
ParentCheck []hexutil.Bytes `json:"parent_check"`
L1OriginCheck []hexutil.Bytes `json:"l1_origin_check"`
Batches []*SpanBatchElement `json:"span_batch_elements"`
}
func (b *SpanBatch) MarshalJSON() ([]byte, error) {
spanBatch := spanBatchMarshaling{
ParentCheck: []hexutil.Bytes{b.ParentCheck[:]},
L1OriginCheck: []hexutil.Bytes{b.L1OriginCheck[:]},
Batches: b.Batches,
}
return json.Marshal(spanBatch)
} }
// GetBatchType returns its batch type (batch_version) // GetBatchType returns its batch type (batch_version)
...@@ -451,101 +478,101 @@ func (b *SpanBatch) GetBatchType() int { ...@@ -451,101 +478,101 @@ func (b *SpanBatch) GetBatchType() int {
// GetTimestamp returns timestamp of the first block in the span // GetTimestamp returns timestamp of the first block in the span
func (b *SpanBatch) GetTimestamp() uint64 { func (b *SpanBatch) GetTimestamp() uint64 {
return b.batches[0].Timestamp return b.Batches[0].Timestamp
} }
// LogContext creates a new log context that contains information of the batch // LogContext creates a new log context that contains information of the batch
func (b *SpanBatch) LogContext(log log.Logger) log.Logger { func (b *SpanBatch) LogContext(log log.Logger) log.Logger {
if len(b.batches) == 0 { if len(b.Batches) == 0 {
return log.New("block_count", 0) return log.New("block_count", 0)
} }
return log.New( return log.New(
"batch_type", "SpanBatch", "batch_type", "SpanBatch",
"batch_timestamp", b.batches[0].Timestamp, "batch_timestamp", b.Batches[0].Timestamp,
"parent_check", hexutil.Encode(b.parentCheck[:]), "parent_check", hexutil.Encode(b.ParentCheck[:]),
"origin_check", hexutil.Encode(b.l1OriginCheck[:]), "origin_check", hexutil.Encode(b.L1OriginCheck[:]),
"start_epoch_number", b.GetStartEpochNum(), "start_epoch_number", b.GetStartEpochNum(),
"end_epoch_number", b.GetBlockEpochNum(len(b.batches)-1), "end_epoch_number", b.GetBlockEpochNum(len(b.Batches)-1),
"block_count", len(b.batches), "block_count", len(b.Batches),
) )
} }
// GetStartEpochNum returns epoch number(L1 origin block number) of the first block in the span // GetStartEpochNum returns epoch number(L1 origin block number) of the first block in the span
func (b *SpanBatch) GetStartEpochNum() rollup.Epoch { func (b *SpanBatch) GetStartEpochNum() rollup.Epoch {
return b.batches[0].EpochNum return b.Batches[0].EpochNum
} }
// CheckOriginHash checks if the l1OriginCheck matches the first 20 bytes of given hash, probably L1 block hash from the current canonical L1 chain. // CheckOriginHash checks if the l1OriginCheck matches the first 20 bytes of given hash, probably L1 block hash from the current canonical L1 chain.
func (b *SpanBatch) CheckOriginHash(hash common.Hash) bool { func (b *SpanBatch) CheckOriginHash(hash common.Hash) bool {
return bytes.Equal(b.l1OriginCheck[:], hash.Bytes()[:20]) return bytes.Equal(b.L1OriginCheck[:], hash.Bytes()[:20])
} }
// CheckParentHash checks if the parentCheck matches the first 20 bytes of given hash, probably the current L2 safe head. // CheckParentHash checks if the parentCheck matches the first 20 bytes of given hash, probably the current L2 safe head.
func (b *SpanBatch) CheckParentHash(hash common.Hash) bool { func (b *SpanBatch) CheckParentHash(hash common.Hash) bool {
return bytes.Equal(b.parentCheck[:], hash.Bytes()[:20]) return bytes.Equal(b.ParentCheck[:], hash.Bytes()[:20])
} }
// GetBlockEpochNum returns the epoch number(L1 origin block number) of the block at the given index in the span. // GetBlockEpochNum returns the epoch number(L1 origin block number) of the block at the given index in the span.
func (b *SpanBatch) GetBlockEpochNum(i int) uint64 { func (b *SpanBatch) GetBlockEpochNum(i int) uint64 {
return uint64(b.batches[i].EpochNum) return uint64(b.Batches[i].EpochNum)
} }
// GetBlockTimestamp returns the timestamp of the block at the given index in the span. // GetBlockTimestamp returns the timestamp of the block at the given index in the span.
func (b *SpanBatch) GetBlockTimestamp(i int) uint64 { func (b *SpanBatch) GetBlockTimestamp(i int) uint64 {
return b.batches[i].Timestamp return b.Batches[i].Timestamp
} }
// GetBlockTransactions returns the encoded transactions of the block at the given index in the span. // GetBlockTransactions returns the encoded transactions of the block at the given index in the span.
func (b *SpanBatch) GetBlockTransactions(i int) []hexutil.Bytes { func (b *SpanBatch) GetBlockTransactions(i int) []hexutil.Bytes {
return b.batches[i].Transactions return b.Batches[i].Transactions
} }
// GetBlockCount returns the number of blocks in the span // GetBlockCount returns the number of blocks in the span
func (b *SpanBatch) GetBlockCount() int { func (b *SpanBatch) GetBlockCount() int {
return len(b.batches) return len(b.Batches)
} }
// AppendSingularBatch appends a SingularBatch into the span batch // AppendSingularBatch appends a SingularBatch into the span batch
// updates l1OriginCheck or parentCheck if needed. // updates l1OriginCheck or parentCheck if needed.
func (b *SpanBatch) AppendSingularBatch(singularBatch *SingularBatch) { func (b *SpanBatch) AppendSingularBatch(singularBatch *SingularBatch) {
if len(b.batches) == 0 { if len(b.Batches) == 0 {
copy(b.parentCheck[:], singularBatch.ParentHash.Bytes()[:20]) copy(b.ParentCheck[:], singularBatch.ParentHash.Bytes()[:20])
} }
b.batches = append(b.batches, singularBatchToElement(singularBatch)) b.Batches = append(b.Batches, singularBatchToElement(singularBatch))
copy(b.l1OriginCheck[:], singularBatch.EpochHash.Bytes()[:20]) copy(b.L1OriginCheck[:], singularBatch.EpochHash.Bytes()[:20])
} }
// ToRawSpanBatch merges SingularBatch List and initialize single RawSpanBatch // ToRawSpanBatch merges SingularBatch List and initialize single RawSpanBatch
func (b *SpanBatch) ToRawSpanBatch(originChangedBit uint, genesisTimestamp uint64, chainID *big.Int) (*RawSpanBatch, error) { func (b *SpanBatch) ToRawSpanBatch(originChangedBit uint, genesisTimestamp uint64, chainID *big.Int) (*RawSpanBatch, error) {
if len(b.batches) == 0 { if len(b.Batches) == 0 {
return nil, errors.New("cannot merge empty singularBatch list") return nil, errors.New("cannot merge empty singularBatch list")
} }
raw := RawSpanBatch{} raw := RawSpanBatch{}
// Sort by timestamp of L2 block // Sort by timestamp of L2 block
sort.Slice(b.batches, func(i, j int) bool { sort.Slice(b.Batches, func(i, j int) bool {
return b.batches[i].Timestamp < b.batches[j].Timestamp return b.Batches[i].Timestamp < b.Batches[j].Timestamp
}) })
// spanBatchPrefix // spanBatchPrefix
span_start := b.batches[0] span_start := b.Batches[0]
span_end := b.batches[len(b.batches)-1] span_end := b.Batches[len(b.Batches)-1]
raw.relTimestamp = span_start.Timestamp - genesisTimestamp raw.relTimestamp = span_start.Timestamp - genesisTimestamp
raw.l1OriginNum = uint64(span_end.EpochNum) raw.l1OriginNum = uint64(span_end.EpochNum)
raw.parentCheck = b.parentCheck raw.parentCheck = b.ParentCheck
raw.l1OriginCheck = b.l1OriginCheck raw.l1OriginCheck = b.L1OriginCheck
// spanBatchPayload // spanBatchPayload
raw.blockCount = uint64(len(b.batches)) raw.blockCount = uint64(len(b.Batches))
raw.originBits = new(big.Int) raw.originBits = new(big.Int)
raw.originBits.SetBit(raw.originBits, 0, originChangedBit) raw.originBits.SetBit(raw.originBits, 0, originChangedBit)
for i := 1; i < len(b.batches); i++ { for i := 1; i < len(b.Batches); i++ {
bit := uint(0) bit := uint(0)
if b.batches[i-1].EpochNum < b.batches[i].EpochNum { if b.Batches[i-1].EpochNum < b.Batches[i].EpochNum {
bit = 1 bit = 1
} }
raw.originBits.SetBit(raw.originBits, i, bit) raw.originBits.SetBit(raw.originBits, i, bit)
} }
var blockTxCounts []uint64 var blockTxCounts []uint64
var txs [][]byte var txs [][]byte
for _, batch := range b.batches { for _, batch := range b.Batches {
blockTxCount := uint64(len(batch.Transactions)) blockTxCount := uint64(len(batch.Transactions))
blockTxCounts = append(blockTxCounts, blockTxCount) blockTxCounts = append(blockTxCounts, blockTxCount)
for _, rawTx := range batch.Transactions { for _, rawTx := range batch.Transactions {
...@@ -561,13 +588,13 @@ func (b *SpanBatch) ToRawSpanBatch(originChangedBit uint, genesisTimestamp uint6 ...@@ -561,13 +588,13 @@ func (b *SpanBatch) ToRawSpanBatch(originChangedBit uint, genesisTimestamp uint6
return &raw, nil return &raw, nil
} }
// GetSingularBatches converts spanBatchElements after L2 safe head to SingularBatches. // GetSingularBatches converts SpanBatchElements after L2 safe head to SingularBatches.
// Since spanBatchElement does not contain EpochHash, set EpochHash from the given L1 blocks. // Since SpanBatchElement does not contain EpochHash, set EpochHash from the given L1 blocks.
// The result SingularBatches do not contain ParentHash yet. It must be set by BatchQueue. // The result SingularBatches do not contain ParentHash yet. It must be set by BatchQueue.
func (b *SpanBatch) GetSingularBatches(l1Origins []eth.L1BlockRef, l2SafeHead eth.L2BlockRef) ([]*SingularBatch, error) { func (b *SpanBatch) GetSingularBatches(l1Origins []eth.L1BlockRef, l2SafeHead eth.L2BlockRef) ([]*SingularBatch, error) {
var singularBatches []*SingularBatch var singularBatches []*SingularBatch
originIdx := 0 originIdx := 0
for _, batch := range b.batches { for _, batch := range b.Batches {
if batch.Timestamp <= l2SafeHead.Time { if batch.Timestamp <= l2SafeHead.Time {
continue continue
} }
...@@ -593,20 +620,30 @@ func (b *SpanBatch) GetSingularBatches(l1Origins []eth.L1BlockRef, l2SafeHead et ...@@ -593,20 +620,30 @@ func (b *SpanBatch) GetSingularBatches(l1Origins []eth.L1BlockRef, l2SafeHead et
return singularBatches, nil return singularBatches, nil
} }
// NewSpanBatch converts given singularBatches into spanBatchElements, and creates a new SpanBatch. // NewSpanBatch converts given singularBatches into SpanBatchElements, and creates a new SpanBatch.
func NewSpanBatch(singularBatches []*SingularBatch) *SpanBatch { func NewSpanBatch(singularBatches []*SingularBatch) *SpanBatch {
spanBatch := &SpanBatch{} spanBatch := &SpanBatch{}
if len(singularBatches) == 0 { if len(singularBatches) == 0 {
return spanBatch return spanBatch
} }
copy(spanBatch.parentCheck[:], singularBatches[0].ParentHash.Bytes()[:20]) copy(spanBatch.ParentCheck[:], singularBatches[0].ParentHash.Bytes()[:20])
copy(spanBatch.l1OriginCheck[:], singularBatches[len(singularBatches)-1].EpochHash.Bytes()[:20]) copy(spanBatch.L1OriginCheck[:], singularBatches[len(singularBatches)-1].EpochHash.Bytes()[:20])
for _, singularBatch := range singularBatches { for _, singularBatch := range singularBatches {
spanBatch.batches = append(spanBatch.batches, singularBatchToElement(singularBatch)) spanBatch.Batches = append(spanBatch.Batches, singularBatchToElement(singularBatch))
} }
return spanBatch return spanBatch
} }
// DeriveSpanBatch derives SpanBatch from BatchData.
func DeriveSpanBatch(batchData *BatchData, blockTime, genesisTimestamp uint64, chainID *big.Int) (*SpanBatch, error) {
rawSpanBatch, ok := batchData.inner.(*RawSpanBatch)
if !ok {
return nil, NewCriticalError(errors.New("failed type assertion to SpanBatch"))
}
// If the batch type is Span batch, derive block inputs from RawSpanBatch.
return rawSpanBatch.ToSpanBatch(blockTime, genesisTimestamp, chainID)
}
// SpanBatchBuilder is a utility type to build a SpanBatch by adding a SingularBatch one by one. // SpanBatchBuilder is a utility type to build a SpanBatch by adding a SingularBatch one by one.
// makes easier to stack SingularBatches and convert to RawSpanBatch for encoding. // makes easier to stack SingularBatches and convert to RawSpanBatch for encoding.
type SpanBatchBuilder struct { type SpanBatchBuilder struct {
...@@ -643,7 +680,7 @@ func (b *SpanBatchBuilder) GetRawSpanBatch() (*RawSpanBatch, error) { ...@@ -643,7 +680,7 @@ func (b *SpanBatchBuilder) GetRawSpanBatch() (*RawSpanBatch, error) {
} }
func (b *SpanBatchBuilder) GetBlockCount() int { func (b *SpanBatchBuilder) GetBlockCount() int {
return len(b.spanBatch.batches) return len(b.spanBatch.Batches)
} }
func (b *SpanBatchBuilder) Reset() { func (b *SpanBatchBuilder) Reset() {
......
...@@ -331,18 +331,18 @@ func TestSpanBatchDerive(t *testing.T) { ...@@ -331,18 +331,18 @@ func TestSpanBatchDerive(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
blockCount := len(singularBatches) blockCount := len(singularBatches)
require.Equal(t, safeL2Head.Hash.Bytes()[:20], spanBatchDerived.parentCheck[:]) require.Equal(t, safeL2Head.Hash.Bytes()[:20], spanBatchDerived.ParentCheck[:])
require.Equal(t, singularBatches[blockCount-1].Epoch().Hash.Bytes()[:20], spanBatchDerived.l1OriginCheck[:]) require.Equal(t, singularBatches[blockCount-1].Epoch().Hash.Bytes()[:20], spanBatchDerived.L1OriginCheck[:])
require.Equal(t, len(singularBatches), int(rawSpanBatch.blockCount)) require.Equal(t, len(singularBatches), int(rawSpanBatch.blockCount))
for i := 1; i < len(singularBatches); i++ { for i := 1; i < len(singularBatches); i++ {
require.Equal(t, spanBatchDerived.batches[i].Timestamp, spanBatchDerived.batches[i-1].Timestamp+l2BlockTime) require.Equal(t, spanBatchDerived.Batches[i].Timestamp, spanBatchDerived.Batches[i-1].Timestamp+l2BlockTime)
} }
for i := 0; i < len(singularBatches); i++ { for i := 0; i < len(singularBatches); i++ {
require.Equal(t, singularBatches[i].EpochNum, spanBatchDerived.batches[i].EpochNum) require.Equal(t, singularBatches[i].EpochNum, spanBatchDerived.Batches[i].EpochNum)
require.Equal(t, singularBatches[i].Timestamp, spanBatchDerived.batches[i].Timestamp) require.Equal(t, singularBatches[i].Timestamp, spanBatchDerived.Batches[i].Timestamp)
require.Equal(t, singularBatches[i].Transactions, spanBatchDerived.batches[i].Transactions) require.Equal(t, singularBatches[i].Transactions, spanBatchDerived.Batches[i].Transactions)
} }
} }
} }
...@@ -511,8 +511,8 @@ func TestSpanBatchBuilder(t *testing.T) { ...@@ -511,8 +511,8 @@ func TestSpanBatchBuilder(t *testing.T) {
for i := 0; i < len(singularBatches); i++ { for i := 0; i < len(singularBatches); i++ {
spanBatchBuilder.AppendSingularBatch(singularBatches[i], seqNum) spanBatchBuilder.AppendSingularBatch(singularBatches[i], seqNum)
require.Equal(t, i+1, spanBatchBuilder.GetBlockCount()) require.Equal(t, i+1, spanBatchBuilder.GetBlockCount())
require.Equal(t, singularBatches[0].ParentHash.Bytes()[:20], spanBatchBuilder.spanBatch.parentCheck[:]) require.Equal(t, singularBatches[0].ParentHash.Bytes()[:20], spanBatchBuilder.spanBatch.ParentCheck[:])
require.Equal(t, singularBatches[i].EpochHash.Bytes()[:20], spanBatchBuilder.spanBatch.l1OriginCheck[:]) require.Equal(t, singularBatches[i].EpochHash.Bytes()[:20], spanBatchBuilder.spanBatch.L1OriginCheck[:])
} }
rawSpanBatch, err := spanBatchBuilder.GetRawSpanBatch() rawSpanBatch, err := spanBatchBuilder.GetRawSpanBatch()
......
...@@ -8,6 +8,18 @@ SHA=$(cat ./.foundryrc) ...@@ -8,6 +8,18 @@ SHA=$(cat ./.foundryrc)
# Check if there is a nightly tag corresponding to the `.foundryrc` commit hash # Check if there is a nightly tag corresponding to the `.foundryrc` commit hash
TAG="nightly-$SHA" TAG="nightly-$SHA"
# If the foundry repository exists and a branch is checked out, we need to abort
# any changes inside ~/.foundry/foundry-rs/foundry. This is because foundryup will
# attempt to pull the latest changes from the remote repository, which will fail
# if there are any uncommitted changes.
if [ -d ~/.foundry/foundry-rs/foundry ]; then
echo "Foundry repository exists! Aborting any changes..."
cd ~/.foundry/foundry-rs/foundry
git reset --hard
git clean -fd
cd -
fi
# Create a temporary directory # Create a temporary directory
TMP_DIR=$(mktemp -d) TMP_DIR=$(mktemp -d)
echo "Created tempdir @ $TMP_DIR" echo "Created tempdir @ $TMP_DIR"
......
...@@ -47,10 +47,11 @@ ...@@ -47,10 +47,11 @@
"l2GenesisDeltaTimeOffset": null, "l2GenesisDeltaTimeOffset": null,
"l2GenesisCanyonTimeOffset": "0x0", "l2GenesisCanyonTimeOffset": "0x0",
"faultGameAbsolutePrestate": "0x03c7ae758795765c6664a5d39bf63841c71ff191e9189522bad8ebff5d4eca98", "faultGameAbsolutePrestate": "0x03c7ae758795765c6664a5d39bf63841c71ff191e9189522bad8ebff5d4eca98",
"faultGameMaxDepth": 30, "faultGameMaxDepth": 44,
"faultGameMaxDuration": 1200, "faultGameMaxDuration": 1200,
"outputBisectionGameGenesisBlock": 0, "outputBisectionGameGenesisBlock": 0,
"outputBisectionGameSplitDepth": 15, "outputBisectionGameGenesisOutputRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"outputBisectionGameSplitDepth": 14,
"systemConfigStartBlock": 0, "systemConfigStartBlock": 0,
"requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000", "requiredProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000" "recommendedProtocolVersion": "0x0000000000000000000000000000000000000000000000000000000000000000"
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -1024,11 +1024,11 @@ contract Deploy is Deployer { ...@@ -1024,11 +1024,11 @@ contract Deploy is Deployer {
// Set the Cannon FaultDisputeGame implementation in the factory. // Set the Cannon FaultDisputeGame implementation in the factory.
_setFaultGameImplementation({ _setFaultGameImplementation({
_factory: factory, _factory: factory,
_gameType: GameTypes.FAULT, _gameType: GameTypes.CANNON,
_absolutePrestate: loadMipsAbsolutePrestate(), _absolutePrestate: loadMipsAbsolutePrestate(),
_faultVm: IBigStepper(mustGetAddress("Mips")), _faultVm: IBigStepper(mustGetAddress("Mips")),
_maxGameDepth: cfg.faultGameMaxDepth() _maxGameDepth: 30 // Hard code depth for legacy game to keep e2e tests fast
}); });
} }
/// @notice Sets the implementation for the `OUTPUT_CANNON` game type in the `DisputeGameFactory` /// @notice Sets the implementation for the `OUTPUT_CANNON` game type in the `DisputeGameFactory`
...@@ -1106,6 +1106,7 @@ contract Deploy is Deployer { ...@@ -1106,6 +1106,7 @@ contract Deploy is Deployer {
_gameType: _gameType, _gameType: _gameType,
_absolutePrestate: _absolutePrestate, _absolutePrestate: _absolutePrestate,
_genesisBlockNumber: cfg.outputBisectionGameGenesisBlock(), _genesisBlockNumber: cfg.outputBisectionGameGenesisBlock(),
_genesisOutputRoot: Hash.wrap(cfg.outputBisectionGameGenesisOutputRoot()),
_maxGameDepth: _maxGameDepth, _maxGameDepth: _maxGameDepth,
_splitDepth: cfg.outputBisectionGameSplitDepth(), _splitDepth: cfg.outputBisectionGameSplitDepth(),
_gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())), _gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())),
...@@ -1130,13 +1131,13 @@ contract Deploy is Deployer { ...@@ -1130,13 +1131,13 @@ contract Deploy is Deployer {
uint8 rawGameType = GameType.unwrap(_gameType); uint8 rawGameType = GameType.unwrap(_gameType);
string memory gameTypeString; string memory gameTypeString;
if (rawGameType == 0) { if (rawGameType == GameType.unwrap(GameTypes.CANNON)) {
gameTypeString = "Cannon"; gameTypeString = "Cannon";
} else if (rawGameType == 253) { } else if (rawGameType == GameType.unwrap(GameTypes.OUTPUT_CANNON)) {
gameTypeString = "OutputBisectionCannon"; gameTypeString = "OutputBisectionCannon";
} else if (rawGameType == 254) { } else if (rawGameType == GameType.unwrap(GameTypes.OUTPUT_ALPHABET)) {
gameTypeString = "OutputBisectionAlphabet"; gameTypeString = "OutputBisectionAlphabet";
} else if (rawGameType == 255) { } else if (rawGameType == GameType.unwrap(GameTypes.ALPHABET)) {
gameTypeString = "Alphabet"; gameTypeString = "Alphabet";
} else { } else {
gameTypeString = "Unknown"; gameTypeString = "Unknown";
......
...@@ -51,6 +51,7 @@ contract DeployConfig is Script { ...@@ -51,6 +51,7 @@ contract DeployConfig is Script {
uint256 public faultGameMaxDepth; uint256 public faultGameMaxDepth;
uint256 public faultGameMaxDuration; uint256 public faultGameMaxDuration;
uint256 public outputBisectionGameGenesisBlock; uint256 public outputBisectionGameGenesisBlock;
bytes32 public outputBisectionGameGenesisOutputRoot;
uint256 public outputBisectionGameSplitDepth; uint256 public outputBisectionGameSplitDepth;
uint256 public systemConfigStartBlock; uint256 public systemConfigStartBlock;
uint256 public requiredProtocolVersion; uint256 public requiredProtocolVersion;
...@@ -107,6 +108,7 @@ contract DeployConfig is Script { ...@@ -107,6 +108,7 @@ contract DeployConfig is Script {
faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth"); faultGameMaxDepth = stdJson.readUint(_json, "$.faultGameMaxDepth");
faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration"); faultGameMaxDuration = stdJson.readUint(_json, "$.faultGameMaxDuration");
outputBisectionGameGenesisBlock = stdJson.readUint(_json, "$.outputBisectionGameGenesisBlock"); outputBisectionGameGenesisBlock = stdJson.readUint(_json, "$.outputBisectionGameGenesisBlock");
outputBisectionGameGenesisOutputRoot = stdJson.readBytes32(_json, "$.outputBisectionGameGenesisOutputRoot");
outputBisectionGameSplitDepth = stdJson.readUint(_json, "$.outputBisectionGameSplitDepth"); outputBisectionGameSplitDepth = stdJson.readUint(_json, "$.outputBisectionGameSplitDepth");
} }
} }
......
...@@ -18,30 +18,59 @@ TESTDATA_DIR="$CONTRACTS_DIR/.testdata" ...@@ -18,30 +18,59 @@ TESTDATA_DIR="$CONTRACTS_DIR/.testdata"
OUTFILE_L2="$TESTDATA_DIR/genesis.json" OUTFILE_L2="$TESTDATA_DIR/genesis.json"
OUTFILE_ROLLUP="$TESTDATA_DIR/rollup.json" OUTFILE_ROLLUP="$TESTDATA_DIR/rollup.json"
mkdir -p "$TESTDATA_DIR"
LOCKDIR="/tmp/lock-generate-l2-genesis"
if [ ! -f "$DEPLOY_ARTIFACT" ]; then
forge script $CONTRACTS_DIR/scripts/Deploy.s.sol:Deploy > /dev/null 2>&1 cleanup() {
fi rm -rf -- "$LOCKDIR"
}
if [ ! -f "$OUTFILE_L2" ]; then
go run $OP_NODE genesis l2 \ # Wait for the L2 outfile to be over 8M for up to $2 iterations
--deploy-config "$CONTRACTS_DIR/deploy-config/hardhat.json" \ # of $1 seconds. This is a hack to ensure that the outfile is fully
--l1-deployments "$DEPLOY_ARTIFACT" \ # written before the solidity tests try to read it
--l1-starting-block "$L1_STARTING_BLOCK_PATH" \ wait_l2_outfile() {
--outfile.l2 "$OUTFILE_L2" \ i=1
--outfile.rollup "$OUTFILE_ROLLUP" > /dev/null 2>&1 while [ $i -le $2 ]; do
fi i=$(($i + 1))
# Wait for the L2 outfile to be over 8M for up to 2 seconds if [ ! -f "$OUTFILE_L2" ]; then
# This is a hack to ensure that the outfile is fully written sleep $1
# before the solidity tests try to read it continue
for i in {1..8}; do fi
if [ $(du -m "$OUTFILE_L2" | cut -f1) -ge 8 ]; then
if [ $(du -m "$OUTFILE_L2" | cut -f1) -lt 8 ]; then
sleep $1
continue
fi
exit 0 exit 0
done
echo "L2 genesis file not generated in time. Exiting."
exit 1
}
# Directory creations are atomic, so we can use mkdir to
# create a lockfile that prevents subsequent invocations
# of the script from running concurrently.
if mkdir -- "$LOCKDIR" > /dev/null 2>&1; then
trap 'cleanup' EXIT
mkdir -p "$TESTDATA_DIR"
if [ ! -f "$DEPLOY_ARTIFACT" ]; then
forge script $CONTRACTS_DIR/scripts/Deploy.s.sol:Deploy > /dev/null 2>&1
fi fi
sleep 0.25
done
echo "L2 genesis file not generated in time. Exiting." if [ ! -f "$OUTFILE_L2" ]; then
exit 1 go run $OP_NODE genesis l2 \
\ No newline at end of file --deploy-config "$CONTRACTS_DIR/deploy-config/hardhat.json" \
--l1-deployments "$DEPLOY_ARTIFACT" \
--l1-starting-block "$L1_STARTING_BLOCK_PATH" \
--outfile.l2 "$OUTFILE_L2" \
--outfile.rollup "$OUTFILE_ROLLUP" > /dev/null 2>&1
fi
else
# Wait up to 5 minutes for the lock to be released
wait_l2_outfile 0.25 1200
fi
\ No newline at end of file
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
"sourceCodeHash": "0x1d0cacaf259aff7802aae91a793e3c7234a4d063614cf9c72176fb04738e7c97" "sourceCodeHash": "0x1d0cacaf259aff7802aae91a793e3c7234a4d063614cf9c72176fb04738e7c97"
}, },
"src/dispute/OutputBisectionGame.sol": { "src/dispute/OutputBisectionGame.sol": {
"initCodeHash": "0xc5ac9d76d7c46ccc073f3e5d74a78253bf2f627b04af9b2e3c86803c44890075", "initCodeHash": "0x400a99278755979b815712d1d26598463dd98ed193df8cd1736ae2ae5831d7c7",
"sourceCodeHash": "0x68df25016fa101a9d40e5d00f839dd053e7b5aa0c73c06c61d483cdfda0be124" "sourceCodeHash": "0x7e267ad18eb946a0242df41ba044c5ee6f0b456e74bef07605a7dd2eb5b3ed01"
}, },
"src/legacy/DeployerWhitelist.sol": { "src/legacy/DeployerWhitelist.sol": {
"initCodeHash": "0x8de80fb23b26dd9d849f6328e56ea7c173cd9e9ce1f05c9beea559d1720deb3d", "initCodeHash": "0x8de80fb23b26dd9d849f6328e56ea7c173cd9e9ce1f05c9beea559d1720deb3d",
......
...@@ -16,6 +16,11 @@ ...@@ -16,6 +16,11 @@
"name": "_genesisBlockNumber", "name": "_genesisBlockNumber",
"type": "uint256" "type": "uint256"
}, },
{
"internalType": "Hash",
"name": "_genesisOutputRoot",
"type": "bytes32"
},
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "_maxGameDepth", "name": "_maxGameDepth",
...@@ -198,6 +203,19 @@ ...@@ -198,6 +203,19 @@
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{
"inputs": [],
"name": "GENESIS_OUTPUT_ROOT",
"outputs": [
{
"internalType": "Hash",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{ {
"inputs": [], "inputs": [],
"name": "MAX_GAME_DEPTH", "name": "MAX_GAME_DEPTH",
......
...@@ -46,6 +46,9 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -46,6 +46,9 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice The genesis block number /// @notice The genesis block number
uint256 public immutable GENESIS_BLOCK_NUMBER; uint256 public immutable GENESIS_BLOCK_NUMBER;
/// @notice The genesis output root
Hash public immutable GENESIS_OUTPUT_ROOT;
/// @notice The game type ID /// @notice The game type ID
GameType internal immutable GAME_TYPE; GameType internal immutable GAME_TYPE;
...@@ -86,6 +89,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -86,6 +89,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @param _gameType The type ID of the game. /// @param _gameType The type ID of the game.
/// @param _absolutePrestate The absolute prestate of the instruction trace. /// @param _absolutePrestate The absolute prestate of the instruction trace.
/// @param _genesisBlockNumber The block number of the genesis block. /// @param _genesisBlockNumber The block number of the genesis block.
/// @param _genesisOutputRoot The output root of the genesis block.
/// @param _maxGameDepth The maximum depth of bisection. /// @param _maxGameDepth The maximum depth of bisection.
/// @param _splitDepth The final depth of the output bisection portion of the game. /// @param _splitDepth The final depth of the output bisection portion of the game.
/// @param _gameDuration The duration of the game. /// @param _gameDuration The duration of the game.
...@@ -95,16 +99,20 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -95,16 +99,20 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
GameType _gameType, GameType _gameType,
Claim _absolutePrestate, Claim _absolutePrestate,
uint256 _genesisBlockNumber, uint256 _genesisBlockNumber,
Hash _genesisOutputRoot,
uint256 _maxGameDepth, uint256 _maxGameDepth,
uint256 _splitDepth, uint256 _splitDepth,
Duration _gameDuration, Duration _gameDuration,
IBigStepper _vm IBigStepper _vm
) { ) {
if (_splitDepth >= _maxGameDepth) revert InvalidSplitDepth(); // The split depth cannot be greater than or equal to the max game depth, and it must
// be even due to the constraint laid out in `verifyExecBisectionRoot`
if (_splitDepth >= _maxGameDepth || _splitDepth % 2 != 0) revert InvalidSplitDepth();
GAME_TYPE = _gameType; GAME_TYPE = _gameType;
ABSOLUTE_PRESTATE = _absolutePrestate; ABSOLUTE_PRESTATE = _absolutePrestate;
GENESIS_BLOCK_NUMBER = _genesisBlockNumber; GENESIS_BLOCK_NUMBER = _genesisBlockNumber;
GENESIS_OUTPUT_ROOT = _genesisOutputRoot;
MAX_GAME_DEPTH = _maxGameDepth; MAX_GAME_DEPTH = _maxGameDepth;
SPLIT_DEPTH = _splitDepth; SPLIT_DEPTH = _splitDepth;
GAME_DURATION = _gameDuration; GAME_DURATION = _gameDuration;
...@@ -157,9 +165,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -157,9 +165,8 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// indicate the VM Status and is added after the digest is computed. // indicate the VM Status and is added after the digest is computed.
if (keccak256(_stateData) << 8 != Claim.unwrap(preStateClaim) << 8) revert InvalidPrestate(); if (keccak256(_stateData) << 8 != Claim.unwrap(preStateClaim) << 8) revert InvalidPrestate();
// TODO(clabby): Include less context. See Adrian's proposal for the local context salt. // Compute the local preimage context for the step.
(ClaimData storage starting, ClaimData storage disputed) = findStartingAndDisputedOutputs(_claimIndex); Hash uuid = findLocalContext(_claimIndex);
bytes32 uuid = keccak256(abi.encode(starting.claim, starting.parentIndex, disputed.claim, disputed.parentIndex));
// INVARIANT: If a step is an attack, the poststate is valid if the step produces // INVARIANT: If a step is an attack, the poststate is valid if the step produces
// the same poststate hash as the parent claim's value. // the same poststate hash as the parent claim's value.
...@@ -173,7 +180,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -173,7 +180,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// SAFETY: While the `attack` path does not need an extra check for the post // SAFETY: While the `attack` path does not need an extra check for the post
// state's depth in relation to the parent, we don't need another // state's depth in relation to the parent, we don't need another
// branch because (n - n) % 2 == 0. // branch because (n - n) % 2 == 0.
bool validStep = VM.step(_stateData, _proof, uuid) == Claim.unwrap(postState.claim); bool validStep = VM.step(_stateData, _proof, Hash.unwrap(uuid)) == Claim.unwrap(postState.claim);
bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0; bool parentPostAgree = (parentPos.depth() - postState.position.depth()) % 2 == 0;
if (parentPostAgree == validStep) revert ValidStep(); if (parentPostAgree == validStep) revert ValidStep();
...@@ -211,7 +218,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -211,7 +218,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// When the next position surpasses the split depth (i.e., it is the root claim of an execution // When the next position surpasses the split depth (i.e., it is the root claim of an execution
// trace bisection sub-game), we need to perform some extra verification steps. // trace bisection sub-game), we need to perform some extra verification steps.
if (nextPosition.depth() == SPLIT_DEPTH + 1) verifyExecBisectionRoot(_claim, _challengeIndex); if (nextPosition.depth() == SPLIT_DEPTH + 1) verifyExecBisectionRoot(_claim);
// Fetch the grandparent clock, if it exists. // Fetch the grandparent clock, if it exists.
// The grandparent clock should always exist unless the parent is the root claim. // The grandparent clock should always exist unless the parent is the root claim.
...@@ -284,34 +291,34 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -284,34 +291,34 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// INVARIANT: Local data can only be added if the game is currently in progress. // INVARIANT: Local data can only be added if the game is currently in progress.
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress(); if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();
// TODO(clabby): Include less context. See Adrian's proposal for the local context salt. (Claim starting, Position startingPos, Claim disputed, Position disputedPos) =
(ClaimData storage starting, ClaimData storage disputed) = findStartingAndDisputedOutputs(_execLeafIdx); findStartingAndDisputedOutputs(_execLeafIdx);
bytes32 uuid = keccak256(abi.encode(starting.claim, starting.parentIndex, disputed.claim, disputed.parentIndex)); Hash uuid = computeLocalContext(starting, startingPos, disputed, disputedPos);
IPreimageOracle oracle = VM.oracle(); IPreimageOracle oracle = VM.oracle();
if (_ident == 1) { if (_ident == 1) {
// Load the L1 head hash // Load the L1 head hash
oracle.loadLocalData(_ident, uuid, Hash.unwrap(l1Head), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Hash.unwrap(l1Head), 32, _partOffset);
} else if (_ident == 2) { } else if (_ident == 2) {
// Load the starting proposal's output root. // Load the starting proposal's output root.
oracle.loadLocalData(_ident, uuid, Claim.unwrap(starting.claim), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Claim.unwrap(starting), 32, _partOffset);
} else if (_ident == 3) { } else if (_ident == 3) {
// Load the disputed proposal's output root // Load the disputed proposal's output root
oracle.loadLocalData(_ident, uuid, Claim.unwrap(disputed.claim), 32, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), Claim.unwrap(disputed), 32, _partOffset);
} else if (_ident == 4) { } else if (_ident == 4) {
// Load the starting proposal's L2 block number as a big-endian uint64 in the // Load the starting proposal's L2 block number as a big-endian uint64 in the
// high order 8 bytes of the word. // high order 8 bytes of the word.
// TODO(clabby): +1?
oracle.loadLocalData( // If the starting position is 0 (invalid), the starting output root is genesis. Otherwise,
_ident, // we add the index at depth + 1 to the genesis block number to get the L2 block number.
uuid, uint256 l2Number = Position.unwrap(startingPos) == 0
bytes32(GENESIS_BLOCK_NUMBER + uint256(starting.position.indexAtDepth()) << 0xC0), ? GENESIS_BLOCK_NUMBER
8, : GENESIS_BLOCK_NUMBER + startingPos.indexAtDepth() + 1;
_partOffset
); oracle.loadLocalData(_ident, Hash.unwrap(uuid), bytes32(l2Number << 0xC0), 8, _partOffset);
} else if (_ident == 5) { } else if (_ident == 5) {
// Load the chain ID as a big-endian uint64 in the high order 8 bytes of the word. // Load the chain ID as a big-endian uint64 in the high order 8 bytes of the word.
oracle.loadLocalData(_ident, uuid, bytes32(block.chainid << 0xC0), 8, _partOffset); oracle.loadLocalData(_ident, Hash.unwrap(uuid), bytes32(block.chainid << 0xC0), 8, _partOffset);
} else { } else {
revert InvalidLocalIdent(); revert InvalidLocalIdent();
} }
...@@ -444,10 +451,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -444,10 +451,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
}) })
); );
// Persist the L1 head hash of the parent block. // Persist the blockhash of the parent block.
// TODO(clabby): There may be a bug here - Do we just allow the dispute game to be invalid? We can
// always just create another, but it is possible to create a game where the data was not
// already available on L1.
l1Head = Hash.wrap(blockhash(block.number - 1)); l1Head = Hash.wrap(blockhash(block.number - 1));
} }
...@@ -463,17 +467,13 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -463,17 +467,13 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice Verifies the integrity of an execution bisection subgame's root claim. Reverts if the claim /// @notice Verifies the integrity of an execution bisection subgame's root claim. Reverts if the claim
/// is invalid. /// is invalid.
/// @param _rootClaim The root claim of the execution bisection subgame. /// @param _rootClaim The root claim of the execution bisection subgame.
function verifyExecBisectionRoot(Claim _rootClaim, uint256 /* _parentIndex */ ) internal pure { function verifyExecBisectionRoot(Claim _rootClaim) internal pure {
// The VMStatus must indicate 'invalid' (1), to argue that disputed thing is invalid. // The VMStatus must indicate 'invalid' (1), to argue that disputed thing is invalid.
// Games that agree with the existing outcome are not allowed. // Games that agree with the existing outcome are not allowed.
// TODO(clabby): This assumption will change in Alpha Chad, and also depending on the split depth! Be careful
// about what we go with here.
uint8 vmStatus = uint8(Claim.unwrap(_rootClaim)[0]); uint8 vmStatus = uint8(Claim.unwrap(_rootClaim)[0]);
if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) { if (!(vmStatus == VMStatus.unwrap(VMStatuses.INVALID) || vmStatus == VMStatus.unwrap(VMStatuses.PANIC))) {
revert UnexpectedRootClaim(_rootClaim); revert UnexpectedRootClaim(_rootClaim);
} }
// TODO(clabby): Other verification steps (?)
} }
/// @notice Finds the trace ancestor of a given position within the DAG. /// @notice Finds the trace ancestor of a given position within the DAG.
...@@ -495,12 +495,14 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -495,12 +495,14 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
/// @notice Finds the starting and disputed output root for a given `ClaimData` within the DAG. This /// @notice Finds the starting and disputed output root for a given `ClaimData` within the DAG. This
/// `ClaimData` must be below the `SPLIT_DEPTH`. /// `ClaimData` must be below the `SPLIT_DEPTH`.
/// @param _start The index within `claimData` of the claim to start searching from. /// @param _start The index within `claimData` of the claim to start searching from.
/// @return starting_ The starting, agreed upon output root claim. /// @return startingClaim_ The starting output root claim.
/// @return disputed_ The disputed output root claim. /// @return startingPos_ The starting output root position.
/// @return disputedClaim_ The disputed output root claim.
/// @return disputedPos_ The disputed output root position.
function findStartingAndDisputedOutputs(uint256 _start) function findStartingAndDisputedOutputs(uint256 _start)
internal internal
view view
returns (ClaimData storage starting_, ClaimData storage disputed_) returns (Claim startingClaim_, Position startingPos_, Claim disputedClaim_, Position disputedPos_)
{ {
// Fatch the starting claim. // Fatch the starting claim.
uint256 claimIdx = _start; uint256 claimIdx = _start;
...@@ -517,7 +519,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -517,7 +519,7 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// Walk up the DAG until the ancestor's depth is equal to the split depth. // Walk up the DAG until the ancestor's depth is equal to the split depth.
uint256 currentDepth; uint256 currentDepth;
ClaimData storage execRootClaim = claim; ClaimData storage execRootClaim = claim;
while ((currentDepth = claim.position.depth()) != SPLIT_DEPTH) { while ((currentDepth = claim.position.depth()) > SPLIT_DEPTH) {
uint256 parentIndex = claim.parentIndex; uint256 parentIndex = claim.parentIndex;
// If we're currently at the split depth + 1, we're at the root of the execution sub-game. // If we're currently at the split depth + 1, we're at the root of the execution sub-game.
...@@ -537,15 +539,58 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver { ...@@ -537,15 +539,58 @@ contract OutputBisectionGame is IOutputBisectionGame, Clone, ISemver {
// Determine the starting and disputed output root indices. // Determine the starting and disputed output root indices.
// 1. If it was an attack, the disputed output root is `claim`, and the starting output root is // 1. If it was an attack, the disputed output root is `claim`, and the starting output root is
// elsewhere in the dag (it must commit to the block # index at depth of `outputPos - 1`). // elsewhere in the DAG (it must commit to the block # index at depth of `outputPos - 1`).
// 2. If it was a defense, the starting output root is `claim`, and the disputed output root is // 2. If it was a defense, the starting output root is `claim`, and the disputed output root is
// elsewhere in the dag (it must commit to the block # index at depth of `outputPos + 1`). // elsewhere in the DAG (it must commit to the block # index at depth of `outputPos + 1`).
if (wasAttack) { if (wasAttack) {
starting_ = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) - 1), claimIdx); // If this is an attack on the first output root (the block directly after genesis), the
disputed_ = claimData[claimIdx]; // starting claim nor position exists in the tree. We leave these as 0, which can be easily
// identified due to 0 being an invalid Gindex.
if (outputPos.indexAtDepth() > 0) {
ClaimData storage starting = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) - 1), claimIdx);
(startingClaim_, startingPos_) = (starting.claim, starting.position);
} else {
startingClaim_ = Claim.wrap(Hash.unwrap(GENESIS_OUTPUT_ROOT));
}
(disputedClaim_, disputedPos_) = (claim.claim, claim.position);
} else {
ClaimData storage disputed = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) + 1), claimIdx);
(startingClaim_, startingPos_) = (claim.claim, claim.position);
(disputedClaim_, disputedPos_) = (disputed.claim, disputed.position);
}
}
/// @notice Finds the local context hash for a given claim index that is present in an execution trace subgame.
/// @param _claimIndex The index of the claim to find the local context hash for.
/// @return uuid_ The local context hash.
function findLocalContext(uint256 _claimIndex) internal view returns (Hash uuid_) {
(Claim starting, Position startingPos, Claim disputed, Position disputedPos) =
findStartingAndDisputedOutputs(_claimIndex);
uuid_ = computeLocalContext(starting, startingPos, disputed, disputedPos);
}
/// @notice Computes the local context hash for a set of starting/disputed claim values and positions.
/// @param _starting The starting claim.
/// @param _startingPos The starting claim's position.
/// @param _disputed The disputed claim.
/// @param _disputedPos The disputed claim's position.
/// @return uuid_ The local context hash.
function computeLocalContext(
Claim _starting,
Position _startingPos,
Claim _disputed,
Position _disputedPos
)
internal
pure
returns (Hash uuid_)
{
// A position of 0 indicates that the starting claim is the absolute prestate. In this special case,
// we do not include the starting claim within the local context hash.
if (Position.unwrap(_startingPos) == 0) {
uuid_ = Hash.wrap(keccak256(abi.encode(_disputed, _disputedPos)));
} else { } else {
starting_ = claimData[claimIdx]; uuid_ = Hash.wrap(keccak256(abi.encode(_starting, _startingPos, _disputed, _disputedPos)));
disputed_ = findTraceAncestor(Position.wrap(Position.unwrap(outputPos) + 1), claimIdx);
} }
} }
} }
...@@ -61,10 +61,7 @@ interface IOutputBisectionGame is IDisputeGame { ...@@ -61,10 +61,7 @@ interface IOutputBisectionGame is IDisputeGame {
/// @param _claimIndex The index of the subgame root claim to resolve. /// @param _claimIndex The index of the subgame root claim to resolve.
function resolveClaim(uint256 _claimIndex) external payable; function resolveClaim(uint256 _claimIndex) external payable;
/// @notice An L1 block hash that contains the disputed output root, fetched from the /// @notice A block hash on the L1 that contains the disputed output root.
/// `BlockOracle` and verified by referencing the timestamp associated with the
/// first L2 Output Proposal in the `L2OutputOracle` that contains the disputed
/// L2 block number.
function l1Head() external view returns (Hash l1Head_); function l1Head() external view returns (Hash l1Head_);
/// @notice The l2BlockNumber of the disputed output root in the `L2OutputOracle`. /// @notice The l2BlockNumber of the disputed output root in the `L2OutputOracle`.
......
...@@ -79,17 +79,11 @@ enum GameStatus ...@@ -79,17 +79,11 @@ enum GameStatus
/// @title GameTypes /// @title GameTypes
/// @notice A library that defines the IDs of games that can be played. /// @notice A library that defines the IDs of games that can be played.
library GameTypes { library GameTypes {
/// @dev The game will use a `IDisputeGame` implementation that utilizes fault proofs. /// @dev A dispute game type the uses the cannon vm.
GameType internal constant FAULT = GameType.wrap(0); GameType internal constant CANNON = GameType.wrap(0);
/// @dev The game will use a `IDisputeGame` implementation that utilizes validity proofs.
GameType internal constant VALIDITY = GameType.wrap(1);
/// @dev The game will use a `IDisputeGame` implementation that utilizes attestation proofs.
GameType internal constant ATTESTATION = GameType.wrap(2);
/// @dev A dispute game type that performs output bisection and then uses the cannon vm. /// @dev A dispute game type that performs output bisection and then uses the cannon vm.
GameType internal constant OUTPUT_CANNON = GameType.wrap(253); GameType internal constant OUTPUT_CANNON = GameType.wrap(1);
/// @dev A dispute game type that performs output bisection and then uses an alphabet vm. /// @dev A dispute game type that performs output bisection and then uses an alphabet vm.
/// Note intended for production use. /// Note intended for production use.
......
...@@ -116,17 +116,17 @@ contract DisputeGameFactory_Create_Test is DisputeGameFactory_Init { ...@@ -116,17 +116,17 @@ contract DisputeGameFactory_Create_Test is DisputeGameFactory_Init {
contract DisputeGameFactory_SetImplementation_Test is DisputeGameFactory_Init { contract DisputeGameFactory_SetImplementation_Test is DisputeGameFactory_Init {
/// @dev Tests that the `setImplementation` function properly sets the implementation for a given `GameType`. /// @dev Tests that the `setImplementation` function properly sets the implementation for a given `GameType`.
function test_setImplementation_succeeds() public { function test_setImplementation_succeeds() public {
// There should be no implementation for the `GameTypes.FAULT` enum value, it has not been set. // There should be no implementation for the `GameTypes.CANNON` enum value, it has not been set.
assertEq(address(factory.gameImpls(GameTypes.FAULT)), address(0)); assertEq(address(factory.gameImpls(GameTypes.CANNON)), address(0));
vm.expectEmit(true, true, true, true, address(factory)); vm.expectEmit(true, true, true, true, address(factory));
emit ImplementationSet(address(1), GameTypes.FAULT); emit ImplementationSet(address(1), GameTypes.CANNON);
// Set the implementation for the `GameTypes.FAULT` enum value. // Set the implementation for the `GameTypes.CANNON` enum value.
factory.setImplementation(GameTypes.FAULT, IDisputeGame(address(1))); factory.setImplementation(GameTypes.CANNON, IDisputeGame(address(1)));
// Ensure that the implementation for the `GameTypes.FAULT` enum value is set. // Ensure that the implementation for the `GameTypes.CANNON` enum value is set.
assertEq(address(factory.gameImpls(GameTypes.FAULT)), address(1)); assertEq(address(factory.gameImpls(GameTypes.CANNON)), address(1));
} }
/// @dev Tests that the `setImplementation` function reverts when called by a non-owner. /// @dev Tests that the `setImplementation` function reverts when called by a non-owner.
...@@ -134,7 +134,7 @@ contract DisputeGameFactory_SetImplementation_Test is DisputeGameFactory_Init { ...@@ -134,7 +134,7 @@ contract DisputeGameFactory_SetImplementation_Test is DisputeGameFactory_Init {
// Ensure that the `setImplementation` function reverts when called by a non-owner. // Ensure that the `setImplementation` function reverts when called by a non-owner.
vm.prank(address(0)); vm.prank(address(0));
vm.expectRevert("Ownable: caller is not the owner"); vm.expectRevert("Ownable: caller is not the owner");
factory.setImplementation(GameTypes.FAULT, IDisputeGame(address(1))); factory.setImplementation(GameTypes.CANNON, IDisputeGame(address(1)));
} }
} }
......
...@@ -152,7 +152,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init { ...@@ -152,7 +152,7 @@ contract FaultDisputeGame_Test is FaultDisputeGame_Init {
if (vmStatus == 1 || vmStatus == 2) rootClaim = changeClaimStatus(rootClaim, VMStatuses.VALID); if (vmStatus == 1 || vmStatus == 2) rootClaim = changeClaimStatus(rootClaim, VMStatuses.VALID);
vm.expectRevert(abi.encodeWithSelector(UnexpectedRootClaim.selector, rootClaim)); vm.expectRevert(abi.encodeWithSelector(UnexpectedRootClaim.selector, rootClaim));
factory.create(GameTypes.FAULT, rootClaim, extraData); factory.create(GameTypes.CANNON, rootClaim, extraData);
} }
/// @dev Tests that the game is initialized with the correct data. /// @dev Tests that the game is initialized with the correct data.
......
...@@ -23,9 +23,12 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init { ...@@ -23,9 +23,12 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
/// @dev The type of the game being tested. /// @dev The type of the game being tested.
GameType internal constant GAME_TYPE = GameType.wrap(0); GameType internal constant GAME_TYPE = GameType.wrap(0);
/// @dev The L2 Block Number for the game's proposed output (the root claim) /// @dev The L2 Block Number for the game's proposed output (the root claim)
uint256 internal constant L2_BLOCK_NUMBER = 0xFFFF; uint256 internal constant L2_BLOCK_NUMBER = 0x0a;
/// @dev The genesis block number configured for the output bisection portion of the game.
uint256 internal constant GENESIS_BLOCK_NUMBER = 0; uint256 internal constant GENESIS_BLOCK_NUMBER = 0;
/// @dev The genesis output root commitment
Hash internal constant GENESIS_OUTPUT_ROOT = Hash.wrap(bytes32(0));
/// @dev The implementation of the game. /// @dev The implementation of the game.
OutputBisectionGame internal gameImpl; OutputBisectionGame internal gameImpl;
...@@ -44,21 +47,34 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init { ...@@ -44,21 +47,34 @@ contract OutputBisectionGame_Init is DisputeGameFactory_Init {
// Set the extra data for the game creation // Set the extra data for the game creation
extraData = abi.encode(L2_BLOCK_NUMBER); extraData = abi.encode(L2_BLOCK_NUMBER);
AlphabetVM _vm = new AlphabetVM(absolutePrestate);
// Deploy an implementation of the fault game // Deploy an implementation of the fault game
gameImpl = new OutputBisectionGame( gameImpl = new OutputBisectionGame({
GAME_TYPE, _gameType: GAME_TYPE,
absolutePrestate, _absolutePrestate: absolutePrestate,
GENESIS_BLOCK_NUMBER, _genesisBlockNumber: GENESIS_BLOCK_NUMBER,
4, _genesisOutputRoot: GENESIS_OUTPUT_ROOT,
2, _maxGameDepth: 2**3,
Duration.wrap(7 days), _splitDepth: 2**2,
new AlphabetVM(absolutePrestate) _gameDuration: Duration.wrap(7 days),
); _vm: _vm
});
// Register the game implementation with the factory. // Register the game implementation with the factory.
factory.setImplementation(GAME_TYPE, gameImpl); factory.setImplementation(GAME_TYPE, gameImpl);
// Create a new game. // Create a new game.
gameProxy = OutputBisectionGame(address(factory.create(GAME_TYPE, rootClaim, extraData))); gameProxy = OutputBisectionGame(address(factory.create(GAME_TYPE, rootClaim, extraData)));
// Check immutables
assertEq(GameType.unwrap(gameProxy.gameType()), GameType.unwrap(GAME_TYPE));
assertEq(Claim.unwrap(gameProxy.ABSOLUTE_PRESTATE()), Claim.unwrap(absolutePrestate));
assertEq(gameProxy.GENESIS_BLOCK_NUMBER(), GENESIS_BLOCK_NUMBER);
assertEq(Hash.unwrap(gameProxy.GENESIS_OUTPUT_ROOT()), Hash.unwrap(GENESIS_OUTPUT_ROOT));
assertEq(gameProxy.MAX_GAME_DEPTH(), 2 ** 3);
assertEq(gameProxy.SPLIT_DEPTH(), 2 ** 2);
assertEq(Duration.unwrap(gameProxy.GAME_DURATION()), 7 days);
assertEq(address(gameProxy.VM()), address(_vm));
// Label the proxy // Label the proxy
vm.label(address(gameProxy), "OutputBisectionGame_Clone"); vm.label(address(gameProxy), "OutputBisectionGame_Clone");
} }
...@@ -79,6 +95,45 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -79,6 +95,45 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// `IDisputeGame` Implementation Tests // // `IDisputeGame` Implementation Tests //
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
/// @dev Tests that the constructor of the `OutputBisectionGame` reverts when the `_splitDepth`
/// parameter is either:
/// 1. Greater than or equal to the `MAX_GAME_DEPTH`
/// 2. Odd
function test_constructor_wrongArgs_reverts(uint256 _splitDepth) public {
AlphabetVM alphabetVM = new AlphabetVM(ABSOLUTE_PRESTATE);
// Test that the constructor reverts when the `_splitDepth` parameter is greater than or equal
// to the `MAX_GAME_DEPTH` parameter.
_splitDepth = bound(_splitDepth, 2 ** 3, type(uint256).max);
vm.expectRevert(InvalidSplitDepth.selector);
new OutputBisectionGame({
_gameType: GAME_TYPE,
_absolutePrestate: ABSOLUTE_PRESTATE,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_maxGameDepth: 2**3,
_splitDepth: _splitDepth,
_gameDuration: Duration.wrap(7 days),
_vm: alphabetVM
});
// Test that the constructor reverts when the `_splitDepth` parameter is odd.
_splitDepth = bound(_splitDepth, 0, 2 ** 3 - 1);
if (_splitDepth % 2 == 0) _splitDepth += 1;
vm.expectRevert(InvalidSplitDepth.selector);
new OutputBisectionGame({
_gameType: GAME_TYPE,
_absolutePrestate: ABSOLUTE_PRESTATE,
_genesisBlockNumber: GENESIS_BLOCK_NUMBER,
_genesisOutputRoot: GENESIS_OUTPUT_ROOT,
_maxGameDepth: 2**3,
_splitDepth: _splitDepth,
_gameDuration: Duration.wrap(7 days),
_vm: alphabetVM
});
}
/// @dev Tests that the game's root claim is set correctly. /// @dev Tests that the game's root claim is set correctly.
function test_rootClaim_succeeds() public { function test_rootClaim_succeeds() public {
assertEq(Claim.unwrap(gameProxy.rootClaim()), Claim.unwrap(ROOT_CLAIM)); assertEq(Claim.unwrap(gameProxy.rootClaim()), Claim.unwrap(ROOT_CLAIM));
...@@ -109,7 +164,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -109,7 +164,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
} }
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// `IOutputBisectionGame` Implementation Tests // // `IOutputBisectionGame` Implementation Tests //
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
/// @dev Tests that the game is initialized with the correct data. /// @dev Tests that the game is initialized with the correct data.
...@@ -142,7 +197,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -142,7 +197,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
uint256 mask = 0xFF << offset; uint256 mask = 0xFF << offset;
// Replace the byte in the slot value with the challenger wins status. // Replace the byte in the slot value with the challenger wins status.
slot = (slot & ~mask) | (chalWins << offset); slot = (slot & ~mask) | (chalWins << offset);
vm.store(address(gameProxy), bytes32(uint256(0)), bytes32(slot)); vm.store(address(gameProxy), bytes32(0), bytes32(slot));
// Ensure that the game status was properly updated. // Ensure that the game status was properly updated.
GameStatus status = gameProxy.status(); GameStatus status = gameProxy.status();
...@@ -156,19 +211,19 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -156,19 +211,19 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that an attempt to defend the root claim reverts with the `CannotDefendRootClaim` error. /// @dev Tests that an attempt to defend the root claim reverts with the `CannotDefendRootClaim` error.
function test_move_defendRoot_reverts() public { function test_move_defendRoot_reverts() public {
vm.expectRevert(CannotDefendRootClaim.selector); vm.expectRevert(CannotDefendRootClaim.selector);
gameProxy.defend(0, Claim.wrap(bytes32(uint256(5)))); gameProxy.defend(0, _dummyClaim());
} }
/// @dev Tests that an attempt to move against a claim that does not exist reverts with the /// @dev Tests that an attempt to move against a claim that does not exist reverts with the
/// `ParentDoesNotExist` error. /// `ParentDoesNotExist` error.
function test_move_nonExistentParent_reverts() public { function test_move_nonExistentParent_reverts() public {
Claim claim = Claim.wrap(bytes32(uint256(5))); Claim claim = _dummyClaim();
// Expect an out of bounds revert for an attack // Expect an out of bounds revert for an attack
vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32)); vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32));
gameProxy.attack(1, claim); gameProxy.attack(1, claim);
// Expect an out of bounds revert for an attack // Expect an out of bounds revert for a defense
vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32)); vm.expectRevert(abi.encodeWithSignature("Panic(uint256)", 0x32));
gameProxy.defend(1, claim); gameProxy.defend(1, claim);
} }
...@@ -176,7 +231,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -176,7 +231,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that an attempt to move at the maximum game depth reverts with the /// @dev Tests that an attempt to move at the maximum game depth reverts with the
/// `GameDepthExceeded` error. /// `GameDepthExceeded` error.
function test_move_gameDepthExceeded_reverts() public { function test_move_gameDepthExceeded_reverts() public {
Claim claim = Claim.wrap(bytes32(uint256(5))); Claim claim = _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC);
uint256 maxDepth = gameProxy.MAX_GAME_DEPTH(); uint256 maxDepth = gameProxy.MAX_GAME_DEPTH();
...@@ -185,8 +240,6 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -185,8 +240,6 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// the `GameDepthExceeded` error. // the `GameDepthExceeded` error.
if (i == maxDepth) { if (i == maxDepth) {
vm.expectRevert(GameDepthExceeded.selector); vm.expectRevert(GameDepthExceeded.selector);
} else if (i == 2) {
claim = changeClaimStatus(claim, VMStatuses.PANIC);
} }
gameProxy.attack(i, claim); gameProxy.attack(i, claim);
} }
...@@ -198,7 +251,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -198,7 +251,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Warp ahead past the clock time for the first move (3 1/2 days) // Warp ahead past the clock time for the first move (3 1/2 days)
vm.warp(block.timestamp + 3 days + 12 hours + 1); vm.warp(block.timestamp + 3 days + 12 hours + 1);
vm.expectRevert(ClockTimeExceeded.selector); vm.expectRevert(ClockTimeExceeded.selector);
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(0, _dummyClaim());
} }
/// @notice Static unit test for the correctness of the chess clock incrementation. /// @notice Static unit test for the correctness of the chess clock incrementation.
...@@ -208,7 +261,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -208,7 +261,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
Clock.unwrap(clock), Clock.unwrap(LibClock.wrap(Duration.wrap(0), Timestamp.wrap(uint64(block.timestamp)))) Clock.unwrap(clock), Clock.unwrap(LibClock.wrap(Duration.wrap(0), Timestamp.wrap(uint64(block.timestamp))))
); );
Claim claim = Claim.wrap(bytes32(uint256(5))); Claim claim = _dummyClaim();
vm.warp(block.timestamp + 15); vm.warp(block.timestamp + 15);
gameProxy.attack(0, claim); gameProxy.attack(0, claim);
...@@ -226,7 +279,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -226,7 +279,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// We are at the split depth, so we need to set the status byte of the claim // We are at the split depth, so we need to set the status byte of the claim
// for the next move. // for the next move.
claim = changeClaimStatus(claim, VMStatuses.PANIC); claim = _changeClaimStatus(claim, VMStatuses.PANIC);
vm.warp(block.timestamp + 10); vm.warp(block.timestamp + 10);
gameProxy.attack(2, claim); gameProxy.attack(2, claim);
...@@ -246,7 +299,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -246,7 +299,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that an identical claim cannot be made twice. The duplicate claim attempt should /// @dev Tests that an identical claim cannot be made twice. The duplicate claim attempt should
/// revert with the `ClaimAlreadyExists` error. /// revert with the `ClaimAlreadyExists` error.
function test_move_duplicateClaim_reverts() public { function test_move_duplicateClaim_reverts() public {
Claim claim = Claim.wrap(bytes32(uint256(5))); Claim claim = _dummyClaim();
// Make the first move. This should succeed. // Make the first move. This should succeed.
gameProxy.attack(0, claim); gameProxy.attack(0, claim);
...@@ -258,14 +311,16 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -258,14 +311,16 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test asserting that identical claims at the same position can be made in different subgames. /// @dev Static unit test asserting that identical claims at the same position can be made in different subgames.
function test_move_duplicateClaimsDifferentSubgames_succeeds() public { function test_move_duplicateClaimsDifferentSubgames_succeeds() public {
Claim claimA = Claim.wrap(bytes32(uint256(5))); Claim claimA = _dummyClaim();
Claim claimB = Claim.wrap(bytes32(uint256(6))); Claim claimB = _dummyClaim();
// Make the first move. This should succeed. // Make the first moves. This should succeed.
gameProxy.attack(0, claimA); gameProxy.attack(0, claimA);
gameProxy.attack(0, claimB); gameProxy.attack(0, claimB);
gameProxy.attack(1, claimB); // Perform an attack at the same position with the same claim value in both subgames.
// These both should succeed.
gameProxy.attack(1, claimA);
gameProxy.attack(2, claimA); gameProxy.attack(2, claimA);
} }
...@@ -274,7 +329,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -274,7 +329,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
// Warp ahead 5 seconds. // Warp ahead 5 seconds.
vm.warp(block.timestamp + 5); vm.warp(block.timestamp + 5);
Claim counter = Claim.wrap(bytes32(uint256(5))); Claim counter = _dummyClaim();
// Perform the attack. // Perform the attack.
vm.expectEmit(true, true, true, false); vm.expectEmit(true, true, true, false);
...@@ -307,6 +362,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -307,6 +362,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
); );
} }
/// @dev Tests that making a claim at the execution trace bisection root level with an invalid status
/// byte reverts with the `UnexpectedRootClaim` error.
function test_move_incorrectStatusExecRoot_reverts() public {
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, _dummyClaim());
}
vm.expectRevert(abi.encodeWithSelector(UnexpectedRootClaim.selector, bytes32(0)));
gameProxy.attack(4, Claim.wrap(bytes32(0)));
}
/// @dev Tests that making a claim at the execution trace bisection root level with a valid status
/// byte succeeds.
function test_move_correctStatusExecRoot_succeeds() public {
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, _dummyClaim());
}
gameProxy.attack(4, _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC));
}
/// @dev Static unit test for the correctness an uncontested root resolution. /// @dev Static unit test for the correctness an uncontested root resolution.
function test_resolve_rootUncontested_succeeds() public { function test_resolve_rootUncontested_succeeds() public {
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...@@ -348,7 +423,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -348,7 +423,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a single attack game state. /// @dev Static unit test for the correctness of resolving a single attack game state.
function test_resolve_rootContested_succeeds() public { function test_resolve_rootContested_succeeds() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(0, _dummyClaim());
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...@@ -358,8 +433,8 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -358,8 +433,8 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a game with a contested challenge claim. /// @dev Static unit test for the correctness of resolving a game with a contested challenge claim.
function test_resolve_challengeContested_succeeds() public { function test_resolve_challengeContested_succeeds() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(0, _dummyClaim());
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6)))); gameProxy.defend(1, _dummyClaim());
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...@@ -370,10 +445,10 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -370,10 +445,10 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a game with multiplayer moves. /// @dev Static unit test for the correctness of resolving a game with multiplayer moves.
function test_resolve_teamDeathmatch_succeeds() public { function test_resolve_teamDeathmatch_succeeds() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(0, _dummyClaim());
gameProxy.attack(0, Claim.wrap(bytes32(uint256(4)))); gameProxy.attack(0, _dummyClaim());
gameProxy.defend(1, Claim.wrap(bytes32(uint256(6)))); gameProxy.defend(1, _dummyClaim());
gameProxy.defend(1, Claim.wrap(bytes32(uint256(7)))); gameProxy.defend(1, _dummyClaim());
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...@@ -384,29 +459,30 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -384,29 +459,30 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test for the correctness of resolving a game that reaches max game depth. /// @dev Static unit test for the correctness of resolving a game that reaches max game depth.
function test_resolve_stepReached_succeeds() public { function test_resolve_stepReached_succeeds() public {
Claim dummyClaim = Claim.wrap(bytes32(uint256(5))); Claim claim = _dummyClaim();
gameProxy.attack(0, dummyClaim); for (uint256 i; i < gameProxy.SPLIT_DEPTH(); i++) {
gameProxy.attack(1, dummyClaim); gameProxy.attack(i, claim);
}
dummyClaim = changeClaimStatus(dummyClaim, VMStatuses.PANIC);
gameProxy.attack(2, dummyClaim); claim = _changeClaimStatus(claim, VMStatuses.PANIC);
gameProxy.attack(3, dummyClaim); for (uint256 i = gameProxy.claimDataLen() - 1; i < gameProxy.MAX_GAME_DEPTH(); i++) {
gameProxy.attack(i, claim);
}
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
// resolving claim at 4 isn't necessary // resolving claim at 8 isn't necessary
gameProxy.resolveClaim(3); for (uint256 i = 8; i > 0; i--) {
gameProxy.resolveClaim(2); gameProxy.resolveClaim(i - 1);
gameProxy.resolveClaim(1); }
gameProxy.resolveClaim(0);
assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS)); assertEq(uint8(gameProxy.resolve()), uint8(GameStatus.DEFENDER_WINS));
} }
/// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame multiple times /// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame multiple times
function test_resolve_claimAlreadyResolved_reverts() public { function test_resolve_claimAlreadyResolved_reverts() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5)))); Claim claim = _dummyClaim();
gameProxy.attack(1, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(0, claim);
gameProxy.attack(1, claim);
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...@@ -417,25 +493,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -417,25 +493,26 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame at max depth /// @dev Static unit test asserting that resolve reverts when attempting to resolve a subgame at max depth
function test_resolve_claimAtMaxDepthAlreadyResolved_reverts() public { function test_resolve_claimAtMaxDepthAlreadyResolved_reverts() public {
Claim dummyClaim = Claim.wrap(bytes32(uint256(5))); Claim claim = _dummyClaim();
gameProxy.attack(0, dummyClaim); for (uint256 i; i < gameProxy.SPLIT_DEPTH(); i++) {
gameProxy.attack(1, dummyClaim); gameProxy.attack(i, claim);
}
dummyClaim = changeClaimStatus(dummyClaim, VMStatuses.PANIC);
gameProxy.attack(2, dummyClaim); claim = _changeClaimStatus(claim, VMStatuses.PANIC);
gameProxy.attack(3, dummyClaim); for (uint256 i = gameProxy.claimDataLen() - 1; i < gameProxy.MAX_GAME_DEPTH(); i++) {
gameProxy.attack(i, claim);
}
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
vm.expectRevert(ClaimAlreadyResolved.selector); vm.expectRevert(ClaimAlreadyResolved.selector);
gameProxy.resolveClaim(4); gameProxy.resolveClaim(8);
} }
/// @dev Static unit test asserting that resolve reverts when attempting to resolve subgames out of order /// @dev Static unit test asserting that resolve reverts when attempting to resolve subgames out of order
function test_resolve_outOfOrderResolution_reverts() public { function test_resolve_outOfOrderResolution_reverts() public {
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(0, _dummyClaim());
gameProxy.attack(1, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(1, _dummyClaim());
vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds); vm.warp(block.timestamp + 3 days + 12 hours + 1 seconds);
...@@ -446,15 +523,108 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -446,15 +523,108 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
/// @dev Tests that adding local data with an out of bounds identifier reverts. /// @dev Tests that adding local data with an out of bounds identifier reverts.
function testFuzz_addLocalData_oob_reverts(uint256 _ident) public { function testFuzz_addLocalData_oob_reverts(uint256 _ident) public {
// Get a claim below the split depth so that we can add local data for an execution trace subgame. // Get a claim below the split depth so that we can add local data for an execution trace subgame.
gameProxy.attack(0, Claim.wrap(bytes32(uint256(5)))); for (uint256 i; i < 4; i++) {
gameProxy.attack(1, Claim.wrap(bytes32(uint256(5)))); gameProxy.attack(i, _dummyClaim());
gameProxy.attack(2, ROOT_CLAIM); }
gameProxy.attack(4, _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC));
// [1, 5] are valid local data identifiers. // [1, 5] are valid local data identifiers.
if (_ident <= 5) _ident = 0; if (_ident <= 5) _ident = 0;
vm.expectRevert(InvalidLocalIdent.selector); vm.expectRevert(InvalidLocalIdent.selector);
gameProxy.addLocalData(_ident, 3, 0); gameProxy.addLocalData(_ident, 5, 0);
}
/// @dev Tests that local data is loaded into the preimage oracle correctly in the subgame
/// that is disputing the transition from `GENESIS -> GENESIS + 1`
function test_addLocalDataGenesisTransition_static_succeeds() public {
IPreimageOracle oracle = IPreimageOracle(address(gameProxy.VM().oracle()));
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, Claim.wrap(bytes32(i)));
}
gameProxy.attack(4, _changeClaimStatus(_dummyClaim(), VMStatuses.PANIC));
// Expected start/disputed claims
bytes32 startingClaim = Hash.unwrap(GENESIS_OUTPUT_ROOT);
bytes32 disputedClaim = bytes32(uint256(3));
Position disputedPos = LibPosition.wrap(4, 0);
// Expected local data
bytes32[5] memory data =
[Hash.unwrap(gameProxy.l1Head()), startingClaim, disputedClaim, bytes32(0), bytes32(block.chainid << 0xC0)];
for (uint256 i = 1; i <= 5; i++) {
uint256 expectedLen = i > 3 ? 8 : 32;
bytes32 key = _getKey(i, keccak256(abi.encode(disputedClaim, disputedPos)));
gameProxy.addLocalData(i, 5, 0);
(bytes32 dat, uint256 datLen) = oracle.readPreimage(key, 0);
assertEq(dat >> 0xC0, bytes32(expectedLen));
// Account for the length prefix if i > 3 (the data stored
// at identifiers i <= 3 are 32 bytes long, so the expected
// length is already correct. If i > 3, the data is only 8
// bytes long, so the length prefix + the data is 16 bytes
// total.)
assertEq(datLen, expectedLen + (i > 3 ? 8 : 0));
gameProxy.addLocalData(i, 5, 8);
(dat, datLen) = oracle.readPreimage(key, 8);
assertEq(dat, data[i - 1]);
assertEq(datLen, expectedLen);
}
}
/// @dev Tests that local data is loaded into the preimage oracle correctly.
function test_addLocalDataMiddle_static_succeeds() public {
IPreimageOracle oracle = IPreimageOracle(address(gameProxy.VM().oracle()));
// Get a claim below the split depth so that we can add local data for an execution trace subgame.
for (uint256 i; i < 4; i++) {
gameProxy.attack(i, Claim.wrap(bytes32(i)));
}
gameProxy.defend(4, ROOT_CLAIM);
// Expected start/disputed claims
bytes32 startingClaim = bytes32(uint256(3));
Position startingPos = LibPosition.wrap(4, 0);
bytes32 disputedClaim = bytes32(uint256(2));
Position disputedPos = LibPosition.wrap(3, 0);
// Expected local data
bytes32[5] memory data = [
Hash.unwrap(gameProxy.l1Head()),
startingClaim,
disputedClaim,
bytes32(uint256(1) << 0xC0),
bytes32(block.chainid << 0xC0)
];
for (uint256 i = 1; i <= 5; i++) {
uint256 expectedLen = i > 3 ? 8 : 32;
bytes32 key = _getKey(i, keccak256(abi.encode(startingClaim, startingPos, disputedClaim, disputedPos)));
gameProxy.addLocalData(i, 5, 0);
(bytes32 dat, uint256 datLen) = oracle.readPreimage(key, 0);
assertEq(dat >> 0xC0, bytes32(expectedLen));
// Account for the length prefix if i > 3 (the data stored
// at identifiers i <= 3 are 32 bytes long, so the expected
// length is already correct. If i > 3, the data is only 8
// bytes long, so the length prefix + the data is 16 bytes
// total.)
assertEq(datLen, expectedLen + (i > 3 ? 8 : 0));
gameProxy.addLocalData(i, 5, 8);
(dat, datLen) = oracle.readPreimage(key, 8);
assertEq(dat, data[i - 1]);
assertEq(datLen, expectedLen);
}
}
/// @dev Helper to return a pseudo-random claim
function _dummyClaim() internal view returns (Claim) {
return Claim.wrap(keccak256(abi.encode(gasleft())));
} }
/// @dev Helper to get the localized key for an identifier in the context of the game proxy. /// @dev Helper to get the localized key for an identifier in the context of the game proxy.
...@@ -464,7 +634,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init { ...@@ -464,7 +634,7 @@ contract OutputBisectionGame_Test is OutputBisectionGame_Init {
} }
/// @dev Helper to change the VM status byte of a claim. /// @dev Helper to change the VM status byte of a claim.
function changeClaimStatus(Claim _claim, VMStatus _status) public pure returns (Claim out_) { function _changeClaimStatus(Claim _claim, VMStatus _status) public pure returns (Claim out_) {
assembly { assembly {
out_ := or(and(not(shl(248, 0xFF)), _claim), shl(248, _status)) out_ := or(and(not(shl(248, 0xFF)), _claim), shl(248, _status))
} }
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
"tsup": "^8.0.1", "tsup": "^8.0.1",
"typescript": "^5.3.2", "typescript": "^5.3.2",
"vite": "^5.0.4", "vite": "^5.0.4",
"vitest": "^0.34.2" "vitest": "^1.0.1"
}, },
"peerDependencies": { "peerDependencies": {
"@wagmi/core": ">1.0.0", "@wagmi/core": ">1.0.0",
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
"node-fetch": "^2.6.7" "node-fetch": "^2.6.7"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.10.2", "@types/node": "^20.10.3",
"mocha": "^10.2.0" "mocha": "^10.2.0"
} }
} }
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"typescript": "^5.3.2", "typescript": "^5.3.2",
"viem": "^1.19.11", "viem": "^1.19.11",
"vite": "^5.0.4", "vite": "^5.0.4",
"vitest": "^0.34.2" "vitest": "^1.0.1"
}, },
"peerDependencies": { "peerDependencies": {
"viem": "^0.3.30" "viem": "^0.3.30"
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"@types/chai": "^4.3.11", "@types/chai": "^4.3.11",
"@types/chai-as-promised": "^7.1.8", "@types/chai-as-promised": "^7.1.8",
"@types/mocha": "^10.0.6", "@types/mocha": "^10.0.6",
"@types/node": "^20.10.2", "@types/node": "^20.10.3",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"ethereum-waffle": "^4.0.10", "ethereum-waffle": "^4.0.10",
"ethers": "^5.7.2", "ethers": "^5.7.2",
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
"typedoc": "^0.25.4", "typedoc": "^0.25.4",
"typescript": "^5.3.2", "typescript": "^5.3.2",
"viem": "^1.19.11", "viem": "^1.19.11",
"vitest": "^0.34.2", "vitest": "^1.0.1",
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
"dependencies": { "dependencies": {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"typescript": "^5.3.2", "typescript": "^5.3.2",
"viem": "^1.19.11", "viem": "^1.19.11",
"vite": "^5.0.4", "vite": "^5.0.4",
"vitest": "^0.34.1", "vitest": "^1.0.1",
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
"dependencies": { "dependencies": {
......
...@@ -31,8 +31,8 @@ importers: ...@@ -31,8 +31,8 @@ importers:
specifier: ^10.0.6 specifier: ^10.0.6
version: 10.0.6 version: 10.0.6
'@types/node': '@types/node':
specifier: ^20.10.2 specifier: ^20.10.3
version: 20.10.2 version: 20.10.3
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
specifier: ^6.13.1 specifier: ^6.13.1
version: 6.13.1(@typescript-eslint/parser@6.13.1)(eslint@8.54.0)(typescript@5.3.2) version: 6.13.1(@typescript-eslint/parser@6.13.1)(eslint@8.54.0)(typescript@5.3.2)
...@@ -129,8 +129,8 @@ importers: ...@@ -129,8 +129,8 @@ importers:
specifier: ^8.0.1 specifier: ^8.0.1
version: 8.0.1(@swc/core@1.3.100)(typescript@5.3.2) version: 8.0.1(@swc/core@1.3.100)(typescript@5.3.2)
vitest: vitest:
specifier: ^0.34.4 specifier: ^1.0.1
version: 0.34.4 version: 1.0.1(@types/node@20.10.3)(jsdom@23.0.1)
op-exporter: {} op-exporter: {}
...@@ -181,7 +181,7 @@ importers: ...@@ -181,7 +181,7 @@ importers:
version: 2.19.1(ts-node@10.9.1)(typescript@5.3.2) version: 2.19.1(ts-node@10.9.1)(typescript@5.3.2)
ts-node: ts-node:
specifier: ^10.9.1 specifier: ^10.9.1
version: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) version: 10.9.1(@types/node@20.10.3)(typescript@5.3.2)
tsx: tsx:
specifier: ^4.6.1 specifier: ^4.6.1
version: 4.6.1 version: 4.6.1
...@@ -306,7 +306,7 @@ importers: ...@@ -306,7 +306,7 @@ importers:
version: link:../contracts-bedrock version: link:../contracts-bedrock
'@testing-library/jest-dom': '@testing-library/jest-dom':
specifier: ^6.1.5 specifier: ^6.1.5
version: 6.1.5(vitest@0.34.2) version: 6.1.5(vitest@1.0.1)
'@testing-library/react-hooks': '@testing-library/react-hooks':
specifier: ^8.0.1 specifier: ^8.0.1
version: 8.0.1(react-dom@18.2.0)(react@18.2.0) version: 8.0.1(react-dom@18.2.0)(react@18.2.0)
...@@ -315,7 +315,7 @@ importers: ...@@ -315,7 +315,7 @@ importers:
version: 8.1.0 version: 8.1.0
'@vitest/coverage-istanbul': '@vitest/coverage-istanbul':
specifier: ^0.34.6 specifier: ^0.34.6
version: 0.34.6(vitest@0.34.2) version: 0.34.6(vitest@1.0.1)
'@wagmi/cli': '@wagmi/cli':
specifier: ^1.5.2 specifier: ^1.5.2
version: 1.5.2(@wagmi/core@1.4.7)(typescript@5.3.2)(wagmi@1.0.1) version: 1.5.2(@wagmi/core@1.4.7)(typescript@5.3.2)(wagmi@1.0.1)
...@@ -345,10 +345,10 @@ importers: ...@@ -345,10 +345,10 @@ importers:
version: 5.3.2 version: 5.3.2
vite: vite:
specifier: ^5.0.4 specifier: ^5.0.4
version: 5.0.4(@types/node@20.10.2) version: 5.0.4(@types/node@20.10.3)
vitest: vitest:
specifier: ^0.34.2 specifier: ^1.0.1
version: 0.34.2(jsdom@23.0.1) version: 1.0.1(@types/node@20.10.3)(jsdom@23.0.1)
packages/core-utils: packages/core-utils:
dependencies: dependencies:
...@@ -396,8 +396,8 @@ importers: ...@@ -396,8 +396,8 @@ importers:
version: 2.6.7 version: 2.6.7
devDependencies: devDependencies:
'@types/node': '@types/node':
specifier: ^20.10.2 specifier: ^20.10.3
version: 20.10.2 version: 20.10.3
mocha: mocha:
specifier: ^10.2.0 specifier: ^10.2.0
version: 10.2.0 version: 10.2.0
...@@ -409,13 +409,13 @@ importers: ...@@ -409,13 +409,13 @@ importers:
version: link:../contracts-ts version: link:../contracts-ts
'@testing-library/jest-dom': '@testing-library/jest-dom':
specifier: ^6.1.5 specifier: ^6.1.5
version: 6.1.5(vitest@0.34.2) version: 6.1.5(vitest@1.0.1)
'@testing-library/react-hooks': '@testing-library/react-hooks':
specifier: ^8.0.1 specifier: ^8.0.1
version: 8.0.1(react@17.0.2) version: 8.0.1(react@17.0.2)
'@vitest/coverage-istanbul': '@vitest/coverage-istanbul':
specifier: ^0.34.6 specifier: ^0.34.6
version: 0.34.6(vitest@0.34.2) version: 0.34.6(vitest@1.0.1)
abitype: abitype:
specifier: ^0.10.3 specifier: ^0.10.3
version: 0.10.3(typescript@5.3.2) version: 0.10.3(typescript@5.3.2)
...@@ -439,10 +439,10 @@ importers: ...@@ -439,10 +439,10 @@ importers:
version: 1.19.11(typescript@5.3.2)(zod@3.22.4) version: 1.19.11(typescript@5.3.2)(zod@3.22.4)
vite: vite:
specifier: ^5.0.4 specifier: ^5.0.4
version: 5.0.4(@types/node@20.10.2) version: 5.0.4(@types/node@20.10.3)
vitest: vitest:
specifier: ^0.34.2 specifier: ^1.0.1
version: 0.34.2(jsdom@23.0.1) version: 1.0.1(@types/node@20.10.3)(jsdom@23.0.1)
packages/sdk: packages/sdk:
dependencies: dependencies:
...@@ -490,8 +490,8 @@ importers: ...@@ -490,8 +490,8 @@ importers:
specifier: ^10.0.6 specifier: ^10.0.6
version: 10.0.6 version: 10.0.6
'@types/node': '@types/node':
specifier: ^20.10.2 specifier: ^20.10.3
version: 20.10.2 version: 20.10.3
chai-as-promised: chai-as-promised:
specifier: ^7.1.1 specifier: ^7.1.1
version: 7.1.1(chai@4.3.10) version: 7.1.1(chai@4.3.10)
...@@ -518,7 +518,7 @@ importers: ...@@ -518,7 +518,7 @@ importers:
version: 15.1.0 version: 15.1.0
ts-node: ts-node:
specifier: ^10.9.1 specifier: ^10.9.1
version: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) version: 10.9.1(@types/node@20.10.3)(typescript@5.3.2)
typedoc: typedoc:
specifier: ^0.25.4 specifier: ^0.25.4
version: 0.25.4(typescript@5.3.2) version: 0.25.4(typescript@5.3.2)
...@@ -529,8 +529,8 @@ importers: ...@@ -529,8 +529,8 @@ importers:
specifier: ^1.19.11 specifier: ^1.19.11
version: 1.19.11(typescript@5.3.2)(zod@3.22.4) version: 1.19.11(typescript@5.3.2)(zod@3.22.4)
vitest: vitest:
specifier: ^0.34.2 specifier: ^1.0.1
version: 0.34.2 version: 1.0.1(@types/node@20.10.3)(jsdom@23.0.1)
zod: zod:
specifier: ^3.22.4 specifier: ^3.22.4
version: 3.22.4 version: 3.22.4
...@@ -558,7 +558,7 @@ importers: ...@@ -558,7 +558,7 @@ importers:
version: 1.3.100 version: 1.3.100
'@vitest/coverage-istanbul': '@vitest/coverage-istanbul':
specifier: ^0.34.6 specifier: ^0.34.6
version: 0.34.6(vitest@0.34.1) version: 0.34.6(vitest@1.0.1)
tsup: tsup:
specifier: ^8.0.1 specifier: ^8.0.1
version: 8.0.1(@swc/core@1.3.100)(typescript@5.3.2) version: 8.0.1(@swc/core@1.3.100)(typescript@5.3.2)
...@@ -570,10 +570,10 @@ importers: ...@@ -570,10 +570,10 @@ importers:
version: 1.19.11(typescript@5.3.2)(zod@3.22.4) version: 1.19.11(typescript@5.3.2)(zod@3.22.4)
vite: vite:
specifier: ^5.0.4 specifier: ^5.0.4
version: 5.0.4(@types/node@20.10.2) version: 5.0.4(@types/node@20.10.3)
vitest: vitest:
specifier: ^0.34.1 specifier: ^1.0.1
version: 0.34.1 version: 1.0.1(@types/node@20.10.3)(jsdom@23.0.1)
zod: zod:
specifier: ^3.22.4 specifier: ^3.22.4
version: 3.22.4 version: 3.22.4
...@@ -3725,7 +3725,7 @@ packages: ...@@ -3725,7 +3725,7 @@ packages:
pretty-format: 27.5.1 pretty-format: 27.5.1
dev: false dev: false
/@testing-library/jest-dom@6.1.5(vitest@0.34.2): /@testing-library/jest-dom@6.1.5(vitest@1.0.1):
resolution: {integrity: sha512-3y04JLW+EceVPy2Em3VwNr95dOKqA8DhR0RJHhHKDZNYXcVXnEK7WIrpj4eYU8SVt/qYZ2aRWt/WgQ+grNES8g==} resolution: {integrity: sha512-3y04JLW+EceVPy2Em3VwNr95dOKqA8DhR0RJHhHKDZNYXcVXnEK7WIrpj4eYU8SVt/qYZ2aRWt/WgQ+grNES8g==}
engines: {node: '>=14', npm: '>=6', yarn: '>=1'} engines: {node: '>=14', npm: '>=6', yarn: '>=1'}
peerDependencies: peerDependencies:
...@@ -3751,7 +3751,7 @@ packages: ...@@ -3751,7 +3751,7 @@ packages:
dom-accessibility-api: 0.5.16 dom-accessibility-api: 0.5.16
lodash: 4.17.21 lodash: 4.17.21
redent: 3.0.0 redent: 3.0.0
vitest: 0.34.2(jsdom@23.0.1) vitest: 1.0.1(@types/node@20.10.3)(jsdom@23.0.1)
dev: true dev: true
/@testing-library/react-hooks@8.0.1(react-dom@18.2.0)(react@18.2.0): /@testing-library/react-hooks@8.0.1(react-dom@18.2.0)(react@18.2.0):
...@@ -3892,20 +3892,20 @@ packages: ...@@ -3892,20 +3892,20 @@ packages:
/@types/bn.js@4.11.6: /@types/bn.js@4.11.6:
resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/bn.js@5.1.0: /@types/bn.js@5.1.0:
resolution: {integrity: sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==} resolution: {integrity: sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/body-parser@1.19.1: /@types/body-parser@1.19.1:
resolution: {integrity: sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==} resolution: {integrity: sha512-a6bTJ21vFOGIkwM0kzh9Yr89ziVxq4vYH2fQ6N8AeipEzai/cFK6aGMArIkUeIdRIgpwQa+2bXiLuUJCpSf2Cg==}
dependencies: dependencies:
'@types/connect': 3.4.35 '@types/connect': 3.4.35
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/chai-as-promised@7.1.8: /@types/chai-as-promised@7.1.8:
...@@ -3914,16 +3914,6 @@ packages: ...@@ -3914,16 +3914,6 @@ packages:
'@types/chai': 4.3.11 '@types/chai': 4.3.11
dev: true dev: true
/@types/chai-subset@1.3.3:
resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==}
dependencies:
'@types/chai': 4.3.11
dev: true
/@types/chai@4.3.10:
resolution: {integrity: sha512-of+ICnbqjmFCiixUnqRulbylyXQrPqIGf/B3Jax1wIF3DvSheysQxAWvqHhZiW3IQrycvokcLcFQlveGp+vyNg==}
dev: true
/@types/chai@4.3.11: /@types/chai@4.3.11:
resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==} resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==}
dev: true dev: true
...@@ -3938,7 +3928,7 @@ packages: ...@@ -3938,7 +3928,7 @@ packages:
/@types/connect@3.4.35: /@types/connect@3.4.35:
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
/@types/dateformat@5.0.0: /@types/dateformat@5.0.0:
resolution: {integrity: sha512-SZg4JdHIWHQGEokbYGZSDvo5wA4TLYPXaqhigs/wH+REDOejcJzgH+qyY+HtEUtWOZxEUkbhbdYPqQDiEgrXeA==} resolution: {integrity: sha512-SZg4JdHIWHQGEokbYGZSDvo5wA4TLYPXaqhigs/wH+REDOejcJzgH+qyY+HtEUtWOZxEUkbhbdYPqQDiEgrXeA==}
...@@ -3952,7 +3942,7 @@ packages: ...@@ -3952,7 +3942,7 @@ packages:
/@types/express-serve-static-core@4.17.35: /@types/express-serve-static-core@4.17.35:
resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
'@types/qs': 6.9.7 '@types/qs': 6.9.7
'@types/range-parser': 1.2.4 '@types/range-parser': 1.2.4
'@types/send': 0.17.1 '@types/send': 0.17.1
...@@ -3971,7 +3961,7 @@ packages: ...@@ -3971,7 +3961,7 @@ packages:
resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==} resolution: {integrity: sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==}
dependencies: dependencies:
'@types/minimatch': 5.1.2 '@types/minimatch': 5.1.2
'@types/node': 20.10.1 '@types/node': 20.10.2
dev: true dev: true
/@types/is-ci@3.0.0: /@types/is-ci@3.0.0:
...@@ -3998,7 +3988,7 @@ packages: ...@@ -3998,7 +3988,7 @@ packages:
dependencies: dependencies:
'@types/abstract-leveldown': 5.0.2 '@types/abstract-leveldown': 5.0.2
'@types/level-errors': 3.0.0 '@types/level-errors': 3.0.0
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/lru-cache@5.1.1: /@types/lru-cache@5.1.1:
...@@ -4030,7 +4020,7 @@ packages: ...@@ -4030,7 +4020,7 @@ packages:
/@types/mkdirp@0.5.2: /@types/mkdirp@0.5.2:
resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/mocha@10.0.6: /@types/mocha@10.0.6:
...@@ -4040,7 +4030,7 @@ packages: ...@@ -4040,7 +4030,7 @@ packages:
/@types/morgan@1.9.9: /@types/morgan@1.9.9:
resolution: {integrity: sha512-iRYSDKVaC6FkGSpEVVIvrRGw0DfJMiQzIn3qr2G5B3C//AWkulhXgaBd7tS9/J79GWSYMTHGs7PfI5b3Y8m+RQ==} resolution: {integrity: sha512-iRYSDKVaC6FkGSpEVVIvrRGw0DfJMiQzIn3qr2G5B3C//AWkulhXgaBd7tS9/J79GWSYMTHGs7PfI5b3Y8m+RQ==}
dependencies: dependencies:
'@types/node': 20.10.1 '@types/node': 20.10.2
dev: true dev: true
/@types/ms@0.7.31: /@types/ms@0.7.31:
...@@ -4049,7 +4039,7 @@ packages: ...@@ -4049,7 +4039,7 @@ packages:
/@types/node-fetch@2.6.4: /@types/node-fetch@2.6.4:
resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
form-data: 3.0.1 form-data: 3.0.1
dev: true dev: true
...@@ -4060,14 +4050,14 @@ packages: ...@@ -4060,14 +4050,14 @@ packages:
/@types/node@12.20.55: /@types/node@12.20.55:
resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==}
/@types/node@20.10.1: /@types/node@20.10.2:
resolution: {integrity: sha512-T2qwhjWwGH81vUEx4EXmBKsTJRXFXNZTL4v0gi01+zyBmCwzE6TyHszqX01m+QHTEq+EZNo13NeJIdEqf+Myrg==} resolution: {integrity: sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw==}
dependencies: dependencies:
undici-types: 5.26.5 undici-types: 5.26.5
dev: true dev: true
/@types/node@20.10.2: /@types/node@20.10.3:
resolution: {integrity: sha512-37MXfxkb0vuIlRKHNxwCkb60PNBpR94u4efQuN4JgIAm66zfCDXGSAFCef9XUWFovX2R1ok6Z7MHhtdVXXkkIw==} resolution: {integrity: sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==}
dependencies: dependencies:
undici-types: 5.26.5 undici-types: 5.26.5
...@@ -4081,7 +4071,7 @@ packages: ...@@ -4081,7 +4071,7 @@ packages:
/@types/pbkdf2@3.1.0: /@types/pbkdf2@3.1.0:
resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==} resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/pino-multi-stream@5.1.6: /@types/pino-multi-stream@5.1.6:
...@@ -4099,13 +4089,13 @@ packages: ...@@ -4099,13 +4089,13 @@ packages:
/@types/pino-std-serializers@2.4.1: /@types/pino-std-serializers@2.4.1:
resolution: {integrity: sha512-17XcksO47M24IVTVKPeAByWUd3Oez7EbIjXpSbzMPhXVzgjGtrOa49gKBwxH9hb8dKv58OelsWQ+A1G1l9S3wQ==} resolution: {integrity: sha512-17XcksO47M24IVTVKPeAByWUd3Oez7EbIjXpSbzMPhXVzgjGtrOa49gKBwxH9hb8dKv58OelsWQ+A1G1l9S3wQ==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/pino@6.3.11: /@types/pino@6.3.11:
resolution: {integrity: sha512-S7+fLONqSpHeW9d7TApUqO6VN47KYgOXhCNKwGBVLHObq8HhaAYlVqUNdfnvoXjCMiwE5xcPm/5R2ZUh8bgaXQ==} resolution: {integrity: sha512-S7+fLONqSpHeW9d7TApUqO6VN47KYgOXhCNKwGBVLHObq8HhaAYlVqUNdfnvoXjCMiwE5xcPm/5R2ZUh8bgaXQ==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
'@types/pino-pretty': 4.7.1 '@types/pino-pretty': 4.7.1
'@types/pino-std-serializers': 2.4.1 '@types/pino-std-serializers': 2.4.1
sonic-boom: 2.8.0 sonic-boom: 2.8.0
...@@ -4151,7 +4141,7 @@ packages: ...@@ -4151,7 +4141,7 @@ packages:
/@types/readable-stream@2.3.15: /@types/readable-stream@2.3.15:
resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==} resolution: {integrity: sha512-oM5JSKQCcICF1wvGgmecmHldZ48OZamtMxcGGVICOJA8o8cahXC1zEVAif8iwoc5j8etxFaRFnf095+CDsuoFQ==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
safe-buffer: 5.1.2 safe-buffer: 5.1.2
dev: true dev: true
...@@ -4162,7 +4152,7 @@ packages: ...@@ -4162,7 +4152,7 @@ packages:
/@types/secp256k1@4.0.3: /@types/secp256k1@4.0.3:
resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==} resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/seedrandom@3.0.1: /@types/seedrandom@3.0.1:
...@@ -4181,14 +4171,14 @@ packages: ...@@ -4181,14 +4171,14 @@ packages:
resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==}
dependencies: dependencies:
'@types/mime': 1.3.2 '@types/mime': 1.3.2
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/serve-static@1.13.10: /@types/serve-static@1.13.10:
resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==} resolution: {integrity: sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==}
dependencies: dependencies:
'@types/mime': 1.3.2 '@types/mime': 1.3.2
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: true dev: true
/@types/sinon-chai@3.2.5: /@types/sinon-chai@3.2.5:
...@@ -4225,12 +4215,12 @@ packages: ...@@ -4225,12 +4215,12 @@ packages:
/@types/ws@7.4.7: /@types/ws@7.4.7:
resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
/@types/ws@8.5.3: /@types/ws@8.5.3:
resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==}
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
dev: false dev: false
/@typescript-eslint/eslint-plugin@6.13.1(@typescript-eslint/parser@6.13.1)(eslint@8.54.0)(typescript@5.3.2): /@typescript-eslint/eslint-plugin@6.13.1(@typescript-eslint/parser@6.13.1)(eslint@8.54.0)(typescript@5.3.2):
...@@ -4368,7 +4358,7 @@ packages: ...@@ -4368,7 +4358,7 @@ packages:
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
dev: true dev: true
/@vitest/coverage-istanbul@0.34.6(vitest@0.34.1): /@vitest/coverage-istanbul@0.34.6(vitest@1.0.1):
resolution: {integrity: sha512-5KaBNZPDSk2ybavC3rZ1pWGniw7sJ5usuwVGRUYzJwiBfWvnLpuUer7bjw7qUCRGdKJXrBgb/Dsgif9rkwMX/A==} resolution: {integrity: sha512-5KaBNZPDSk2ybavC3rZ1pWGniw7sJ5usuwVGRUYzJwiBfWvnLpuUer7bjw7qUCRGdKJXrBgb/Dsgif9rkwMX/A==}
peerDependencies: peerDependencies:
vitest: '>=0.32.0 <1' vitest: '>=0.32.0 <1'
...@@ -4380,139 +4370,46 @@ packages: ...@@ -4380,139 +4370,46 @@ packages:
istanbul-reports: 3.1.5 istanbul-reports: 3.1.5
picocolors: 1.0.0 picocolors: 1.0.0
test-exclude: 6.0.0 test-exclude: 6.0.0
vitest: 0.34.1 vitest: 1.0.1(@types/node@20.10.3)(jsdom@23.0.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/@vitest/coverage-istanbul@0.34.6(vitest@0.34.2): /@vitest/expect@1.0.1:
resolution: {integrity: sha512-5KaBNZPDSk2ybavC3rZ1pWGniw7sJ5usuwVGRUYzJwiBfWvnLpuUer7bjw7qUCRGdKJXrBgb/Dsgif9rkwMX/A==} resolution: {integrity: sha512-3cdrb/eKD/0tygDX75YscuHEHMUJ70u3UoLSq2eqhWks57AyzvsDQbyn53IhZ0tBN7gA8Jj2VhXiOV2lef7thw==}
peerDependencies:
vitest: '>=0.32.0 <1'
dependencies: dependencies:
istanbul-lib-coverage: 3.2.0 '@vitest/spy': 1.0.1
istanbul-lib-instrument: 6.0.0 '@vitest/utils': 1.0.1
istanbul-lib-report: 3.0.1
istanbul-lib-source-maps: 4.0.1
istanbul-reports: 3.1.5
picocolors: 1.0.0
test-exclude: 6.0.0
vitest: 0.34.2(jsdom@23.0.1)
transitivePeerDependencies:
- supports-color
dev: true
/@vitest/expect@0.34.1:
resolution: {integrity: sha512-q2CD8+XIsQ+tHwypnoCk8Mnv5e6afLFvinVGCq3/BOT4kQdVQmY6rRfyKkwcg635lbliLPqbunXZr+L1ssUWiQ==}
dependencies:
'@vitest/spy': 0.34.1
'@vitest/utils': 0.34.1
chai: 4.3.10 chai: 4.3.10
dev: true dev: true
/@vitest/expect@0.34.2: /@vitest/runner@1.0.1:
resolution: {integrity: sha512-EZm2dMNlLyIfDMha17QHSQcg2KjeAZaXd65fpPzXY5bvnfx10Lcaz3N55uEe8PhF+w4pw+hmrlHLLlRn9vkBJg==} resolution: {integrity: sha512-/+z0vhJ0MfRPT3AyTvAK6m57rzlew/ct8B2a4LMv7NhpPaiI2QLGyOBMB3lcioWdJHjRuLi9aYppfOv0B5aRQA==}
dependencies: dependencies:
'@vitest/spy': 0.34.2 '@vitest/utils': 1.0.1
'@vitest/utils': 0.34.2 p-limit: 5.0.0
chai: 4.3.10
dev: true
/@vitest/expect@0.34.4:
resolution: {integrity: sha512-XlMKX8HyYUqB8dsY8Xxrc64J2Qs9pKMt2Z8vFTL4mBWXJsg4yoALHzJfDWi8h5nkO4Zua4zjqtapQ/IluVkSnA==}
dependencies:
'@vitest/spy': 0.34.4
'@vitest/utils': 0.34.4
chai: 4.3.10
dev: true
/@vitest/runner@0.34.1:
resolution: {integrity: sha512-YfQMpYzDsYB7yqgmlxZ06NI4LurHWfrH7Wy3Pvf/z/vwUSgq1zLAb1lWcItCzQG+NVox+VvzlKQrYEXb47645g==}
dependencies:
'@vitest/utils': 0.34.1
p-limit: 4.0.0
pathe: 1.1.1
dev: true
/@vitest/runner@0.34.2:
resolution: {integrity: sha512-8ydGPACVX5tK3Dl0SUwxfdg02h+togDNeQX3iXVFYgzF5odxvaou7HnquALFZkyVuYskoaHUOqOyOLpOEj5XTA==}
dependencies:
'@vitest/utils': 0.34.2
p-limit: 4.0.0
pathe: 1.1.1
dev: true
/@vitest/runner@0.34.4:
resolution: {integrity: sha512-hwwdB1StERqUls8oV8YcpmTIpVeJMe4WgYuDongVzixl5hlYLT2G8afhcdADeDeqCaAmZcSgLTLtqkjPQF7x+w==}
dependencies:
'@vitest/utils': 0.34.4
p-limit: 4.0.0
pathe: 1.1.1 pathe: 1.1.1
dev: true dev: true
/@vitest/snapshot@0.34.1: /@vitest/snapshot@1.0.1:
resolution: {integrity: sha512-0O9LfLU0114OqdF8lENlrLsnn024Tb1CsS9UwG0YMWY2oGTQfPtkW+B/7ieyv0X9R2Oijhi3caB1xgGgEgclSQ==} resolution: {integrity: sha512-wIPtPDGSxEZ+DpNMc94AsybX6LV6uN6sosf5TojyP1m2QbKwiRuLV/5RSsjt1oWViHsTj8mlcwrQQ1zHGO0fMw==}
dependencies: dependencies:
magic-string: 0.30.1 magic-string: 0.30.5
pathe: 1.1.1 pathe: 1.1.1
pretty-format: 29.7.0 pretty-format: 29.7.0
dev: true dev: true
/@vitest/snapshot@0.34.2: /@vitest/spy@1.0.1:
resolution: {integrity: sha512-qhQ+xy3u4mwwLxltS4Pd4SR+XHv4EajiTPNY3jkIBLUApE6/ce72neJPSUQZ7bL3EBuKI+NhvzhGj3n5baRQUQ==} resolution: {integrity: sha512-yXwm1uKhBVr/5MhVeSmtNqK+0q2RXIchJt8kokEKdrWLtkPeDgdbZ6SjR1VQGZuNdWL6sSBnLayIyVvcS0qLfA==}
dependencies: dependencies:
magic-string: 0.30.1 tinyspy: 2.2.0
pathe: 1.1.1
pretty-format: 29.7.0
dev: true
/@vitest/snapshot@0.34.4:
resolution: {integrity: sha512-GCsh4coc3YUSL/o+BPUo7lHQbzpdttTxL6f4q0jRx2qVGoYz/cyTRDJHbnwks6TILi6560bVWoBpYC10PuTLHw==}
dependencies:
magic-string: 0.30.1
pathe: 1.1.1
pretty-format: 29.7.0
dev: true
/@vitest/spy@0.34.1:
resolution: {integrity: sha512-UT4WcI3EAPUNO8n6y9QoEqynGGEPmmRxC+cLzneFFXpmacivjHZsNbiKD88KUScv5DCHVDgdBsLD7O7s1enFcQ==}
dependencies:
tinyspy: 2.1.1
dev: true dev: true
/@vitest/spy@0.34.2: /@vitest/utils@1.0.1:
resolution: {integrity: sha512-yd4L9OhfH6l0Av7iK3sPb3MykhtcRN5c5K5vm1nTbuN7gYn+yvUVVsyvzpHrjqS7EWqn9WsPJb7+0c3iuY60tA==} resolution: {integrity: sha512-MGPCHkzXbbAyscrhwGzh8uP1HPrTYLWaj1WTDtWSGrpe2yJWLRN9mF9ooKawr6NMOg9vTBtg2JqWLfuLC7Dknw==}
dependencies:
tinyspy: 2.1.1
dev: true
/@vitest/spy@0.34.4:
resolution: {integrity: sha512-PNU+fd7DUPgA3Ya924b1qKuQkonAW6hL7YUjkON3wmBwSTIlhOSpy04SJ0NrRsEbrXgMMj6Morh04BMf8k+w0g==}
dependencies:
tinyspy: 2.1.1
dev: true
/@vitest/utils@0.34.1:
resolution: {integrity: sha512-/ql9dsFi4iuEbiNcjNHQWXBum7aL8pyhxvfnD9gNtbjR9fUKAjxhj4AA3yfLXg6gJpMGGecvtF8Au2G9y3q47Q==}
dependencies:
diff-sequences: 29.6.3
loupe: 2.3.6
pretty-format: 29.7.0
dev: true
/@vitest/utils@0.34.2:
resolution: {integrity: sha512-Lzw+kAsTPubhoQDp1uVAOP6DhNia1GMDsI9jgB0yMn+/nDaPieYQ88lKqz/gGjSHL4zwOItvpehec9OY+rS73w==}
dependencies:
diff-sequences: 29.6.3
loupe: 2.3.6
pretty-format: 29.7.0
dev: true
/@vitest/utils@0.34.4:
resolution: {integrity: sha512-yR2+5CHhp/K4ySY0Qtd+CAL9f5Yh1aXrKfAT42bq6CtlGPh92jIDDDSg7ydlRow1CP+dys4TrOrbELOyNInHSg==}
dependencies: dependencies:
diff-sequences: 29.6.3 diff-sequences: 29.6.3
loupe: 2.3.6 loupe: 2.3.7
pretty-format: 29.7.0 pretty-format: 29.7.0
dev: true dev: true
...@@ -4542,7 +4439,7 @@ packages: ...@@ -4542,7 +4439,7 @@ packages:
'@vue/reactivity-transform': 3.3.4 '@vue/reactivity-transform': 3.3.4
'@vue/shared': 3.3.4 '@vue/shared': 3.3.4
estree-walker: 2.0.2 estree-walker: 2.0.2
magic-string: 0.30.1 magic-string: 0.30.5
postcss: 8.4.31 postcss: 8.4.31
source-map-js: 1.0.2 source-map-js: 1.0.2
dev: true dev: true
...@@ -4561,7 +4458,7 @@ packages: ...@@ -4561,7 +4458,7 @@ packages:
'@vue/compiler-core': 3.3.4 '@vue/compiler-core': 3.3.4
'@vue/shared': 3.3.4 '@vue/shared': 3.3.4
estree-walker: 2.0.2 estree-walker: 2.0.2
magic-string: 0.30.1 magic-string: 0.30.5
dev: true dev: true
/@vue/shared@3.3.4: /@vue/shared@3.3.4:
...@@ -5418,6 +5315,11 @@ packages: ...@@ -5418,6 +5315,11 @@ packages:
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
dev: true dev: true
/acorn-walk@8.3.0:
resolution: {integrity: sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==}
engines: {node: '>=0.4.0'}
dev: true
/acorn@8.10.0: /acorn@8.10.0:
resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==}
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
...@@ -6272,19 +6174,6 @@ packages: ...@@ -6272,19 +6174,6 @@ packages:
pathval: 1.1.1 pathval: 1.1.1
type-detect: 4.0.8 type-detect: 4.0.8
/chai@4.3.9:
resolution: {integrity: sha512-tH8vhfA1CfuYMkALXj+wmZcqiwqOfshU9Gry+NYiiLqIddrobkBhALv6XD4yDz68qapphYI4vSaqhqAdThCAAA==}
engines: {node: '>=4'}
dependencies:
assertion-error: 1.1.0
check-error: 1.0.3
deep-eql: 4.1.3
get-func-name: 2.0.2
loupe: 2.3.6
pathval: 1.1.1
type-detect: 4.0.8
dev: true
/chalk@2.4.2: /chalk@2.4.2:
resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
engines: {node: '>=4'} engines: {node: '>=4'}
...@@ -8984,7 +8873,7 @@ packages: ...@@ -8984,7 +8873,7 @@ packages:
solc: 0.7.3(debug@4.3.4) solc: 0.7.3(debug@4.3.4)
source-map-support: 0.5.21 source-map-support: 0.5.21
stacktrace-parser: 0.1.10 stacktrace-parser: 0.1.10
ts-node: 10.9.1(@types/node@20.10.2)(typescript@5.3.2) ts-node: 10.9.1(@types/node@20.10.3)(typescript@5.3.2)
tsort: 0.0.1 tsort: 0.0.1
typescript: 5.3.2 typescript: 5.3.2
undici: 5.24.0 undici: 5.24.0
...@@ -10307,9 +10196,12 @@ packages: ...@@ -10307,9 +10196,12 @@ packages:
strip-bom: 3.0.0 strip-bom: 3.0.0
dev: false dev: false
/local-pkg@0.4.3: /local-pkg@0.5.0:
resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==}
engines: {node: '>=14'} engines: {node: '>=14'}
dependencies:
mlly: 1.4.2
pkg-types: 1.0.3
dev: true dev: true
/locate-path@2.0.0: /locate-path@2.0.0:
...@@ -10411,6 +10303,12 @@ packages: ...@@ -10411,6 +10303,12 @@ packages:
dependencies: dependencies:
get-func-name: 2.0.2 get-func-name: 2.0.2
/loupe@2.3.7:
resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}
dependencies:
get-func-name: 2.0.2
dev: true
/lower-case@2.0.2: /lower-case@2.0.2:
resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==}
dependencies: dependencies:
...@@ -10457,8 +10355,8 @@ packages: ...@@ -10457,8 +10355,8 @@ packages:
hasBin: true hasBin: true
dev: false dev: false
/magic-string@0.30.1: /magic-string@0.30.5:
resolution: {integrity: sha512-mbVKXPmS0z0G4XqFDCTllmDQ6coZzn94aMlb0o/A4HEHJCKcanlDZwYJgwnkmgD3jyWhUgj9VsPrfd972yPffA==} resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==}
engines: {node: '>=12'} engines: {node: '>=12'}
dependencies: dependencies:
'@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/sourcemap-codec': 1.4.15
...@@ -11012,13 +10910,13 @@ packages: ...@@ -11012,13 +10910,13 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
/mlly@1.4.0: /mlly@1.4.2:
resolution: {integrity: sha512-ua8PAThnTwpprIaU47EPeZ/bPUVp2QYBbWMphUQpVdBI3Lgqzm5KZQ45Agm3YJedHXaIHl6pBGabaLSUPPSptg==} resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==}
dependencies: dependencies:
acorn: 8.10.0 acorn: 8.10.0
pathe: 1.1.1 pathe: 1.1.1
pkg-types: 1.0.3 pkg-types: 1.0.3
ufo: 1.1.2 ufo: 1.3.2
dev: true dev: true
/mnemonist@0.38.3: /mnemonist@0.38.3:
...@@ -11643,6 +11541,13 @@ packages: ...@@ -11643,6 +11541,13 @@ packages:
yocto-queue: 1.0.0 yocto-queue: 1.0.0
dev: true dev: true
/p-limit@5.0.0:
resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==}
engines: {node: '>=18'}
dependencies:
yocto-queue: 1.0.0
dev: true
/p-locate@2.0.0: /p-locate@2.0.0:
resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==} resolution: {integrity: sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==}
engines: {node: '>=4'} engines: {node: '>=4'}
...@@ -12020,7 +11925,7 @@ packages: ...@@ -12020,7 +11925,7 @@ packages:
resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
dependencies: dependencies:
jsonc-parser: 3.2.0 jsonc-parser: 3.2.0
mlly: 1.4.0 mlly: 1.4.2
pathe: 1.1.1 pathe: 1.1.1
dev: true dev: true
...@@ -12731,14 +12636,6 @@ packages: ...@@ -12731,14 +12636,6 @@ packages:
dependencies: dependencies:
bn.js: 5.2.1 bn.js: 5.2.1
/rollup@3.28.0:
resolution: {integrity: sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==}
engines: {node: '>=14.18.0', npm: '>=8.0.0'}
hasBin: true
optionalDependencies:
fsevents: 2.3.3
dev: true
/rollup@4.5.1: /rollup@4.5.1:
resolution: {integrity: sha512-0EQribZoPKpb5z1NW/QYm3XSR//Xr8BeEXU49Lc/mQmpmVVG5jPUVrpc2iptup/0WMrY9mzas0fxH+TjYvG2CA==} resolution: {integrity: sha512-0EQribZoPKpb5z1NW/QYm3XSR//Xr8BeEXU49Lc/mQmpmVVG5jPUVrpc2iptup/0WMrY9mzas0fxH+TjYvG2CA==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'} engines: {node: '>=18.0.0', npm: '>=8.0.0'}
...@@ -13205,8 +13102,8 @@ packages: ...@@ -13205,8 +13102,8 @@ packages:
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
engines: {node: '>= 0.8'} engines: {node: '>= 0.8'}
/std-env@3.3.3: /std-env@3.6.0:
resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} resolution: {integrity: sha512-aFZ19IgVmhdB2uX599ve2kE6BIE3YMnQ6Gp6BURhW/oIzpXGKr878TQfAQZn1+i0Flcc/UKUy1gOlcfaUBCryg==}
dev: true dev: true
/stdin-discarder@0.1.0: /stdin-discarder@0.1.0:
...@@ -13400,8 +13297,8 @@ packages: ...@@ -13400,8 +13297,8 @@ packages:
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dev: true dev: true
/strip-literal@1.0.1: /strip-literal@1.3.0:
resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==}
dependencies: dependencies:
acorn: 8.10.0 acorn: 8.10.0
dev: true dev: true
...@@ -13597,17 +13494,17 @@ packages: ...@@ -13597,17 +13494,17 @@ packages:
/through@2.3.8: /through@2.3.8:
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
/tinybench@2.5.0: /tinybench@2.5.1:
resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==}
dev: true dev: true
/tinypool@0.7.0: /tinypool@0.8.1:
resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} resolution: {integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
dev: true dev: true
/tinyspy@2.1.1: /tinyspy@2.2.0:
resolution: {integrity: sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==} resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
dev: true dev: true
...@@ -13746,7 +13643,7 @@ packages: ...@@ -13746,7 +13643,7 @@ packages:
tsconfig-paths: 3.14.2 tsconfig-paths: 3.14.2
dev: true dev: true
/ts-node@10.9.1(@types/node@20.10.2)(typescript@5.3.2): /ts-node@10.9.1(@types/node@20.10.3)(typescript@5.3.2):
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
...@@ -13765,7 +13662,7 @@ packages: ...@@ -13765,7 +13662,7 @@ packages:
'@tsconfig/node12': 1.0.11 '@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3 '@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4 '@tsconfig/node16': 1.0.4
'@types/node': 20.10.2 '@types/node': 20.10.3
acorn: 8.10.0 acorn: 8.10.0
acorn-walk: 8.2.0 acorn-walk: 8.2.0
arg: 4.1.3 arg: 4.1.3
...@@ -14068,8 +13965,8 @@ packages: ...@@ -14068,8 +13965,8 @@ packages:
resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==}
dev: true dev: true
/ufo@1.1.2: /ufo@1.3.2:
resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==}
dev: true dev: true
/uint8arrays@3.1.1: /uint8arrays@3.1.1:
...@@ -14369,83 +14266,16 @@ packages: ...@@ -14369,83 +14266,16 @@ packages:
- utf-8-validate - utf-8-validate
- zod - zod
/vite-node@0.34.1(@types/node@20.10.2): /vite-node@1.0.1(@types/node@20.10.3):
resolution: {integrity: sha512-odAZAL9xFMuAg8aWd7nSPT+hU8u2r9gU3LRm9QKjxBEF2rRdWpMuqkrkjvyVQEdNFiBctqr2Gg4uJYizm5Le6w==} resolution: {integrity: sha512-Y2Jnz4cr2azsOMMYuVPrQkp3KMnS/0WV8ezZjCy4hU7O5mUHCAVOnFmoEvs1nvix/4mYm74Len8bYRWZJMNP6g==}
engines: {node: '>=v14.18.0'} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1)
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
vite: 4.5.0(@types/node@20.10.2)
transitivePeerDependencies:
- '@types/node'
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vite-node@0.34.2(@types/node@20.10.1):
resolution: {integrity: sha512-JtW249Zm3FB+F7pQfH56uWSdlltCo1IOkZW5oHBzeQo0iX4jtC7o1t9aILMGd9kVekXBP2lfJBEQt9rBh07ebA==}
engines: {node: '>=v14.18.0'}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1)
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
vite: 4.5.0(@types/node@20.10.1)
transitivePeerDependencies:
- '@types/node'
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vite-node@0.34.2(@types/node@20.10.2):
resolution: {integrity: sha512-JtW249Zm3FB+F7pQfH56uWSdlltCo1IOkZW5oHBzeQo0iX4jtC7o1t9aILMGd9kVekXBP2lfJBEQt9rBh07ebA==}
engines: {node: '>=v14.18.0'}
hasBin: true
dependencies:
cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1)
mlly: 1.4.0
pathe: 1.1.1
picocolors: 1.0.0
vite: 4.5.0(@types/node@20.10.2)
transitivePeerDependencies:
- '@types/node'
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vite-node@0.34.4(@types/node@20.10.1):
resolution: {integrity: sha512-ho8HtiLc+nsmbwZMw8SlghESEE3KxJNp04F/jPUCLVvaURwt0d+r9LxEqCX5hvrrOQ0GSyxbYr5ZfRYhQ0yVKQ==}
engines: {node: '>=v14.18.0'}
hasBin: true hasBin: true
dependencies: dependencies:
cac: 6.7.14 cac: 6.7.14
debug: 4.3.4(supports-color@8.1.1) debug: 4.3.4(supports-color@8.1.1)
mlly: 1.4.0
pathe: 1.1.1 pathe: 1.1.1
picocolors: 1.0.0 picocolors: 1.0.0
vite: 4.5.0(@types/node@20.10.1) vite: 5.0.4(@types/node@20.10.3)
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node' - '@types/node'
- less - less
...@@ -14457,115 +14287,7 @@ packages: ...@@ -14457,115 +14287,7 @@ packages:
- terser - terser
dev: true dev: true
/vite@4.5.0(@types/node@20.10.1): /vite@5.0.4(@types/node@20.10.3):
resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
'@types/node': '>= 14'
less: '*'
lightningcss: ^1.21.0
sass: '*'
stylus: '*'
sugarss: '*'
terser: ^5.4.0
peerDependenciesMeta:
'@types/node':
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
dependencies:
'@types/node': 20.10.1
esbuild: 0.18.20
postcss: 8.4.31
rollup: 3.28.0
optionalDependencies:
fsevents: 2.3.3
dev: true
/vite@4.5.0(@types/node@20.10.2):
resolution: {integrity: sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
'@types/node': '>= 14'
less: '*'
lightningcss: ^1.21.0
sass: '*'
stylus: '*'
sugarss: '*'
terser: ^5.4.0
peerDependenciesMeta:
'@types/node':
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
dependencies:
'@types/node': 20.10.2
esbuild: 0.18.20
postcss: 8.4.31
rollup: 3.28.0
optionalDependencies:
fsevents: 2.3.3
dev: true
/vite@5.0.2(@types/node@20.10.1):
resolution: {integrity: sha512-6CCq1CAJCNM1ya2ZZA7+jS2KgnhbzvxakmlIjN24cF/PXhRMzpM/z8QgsVJA/Dm5fWUWnVEsmtBoMhmerPxT0g==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@types/node': ^18.0.0 || >=20.0.0
less: '*'
lightningcss: ^1.21.0
sass: '*'
stylus: '*'
sugarss: '*'
terser: ^5.4.0
peerDependenciesMeta:
'@types/node':
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
dependencies:
'@types/node': 20.10.1
esbuild: 0.19.7
postcss: 8.4.31
rollup: 4.5.1
optionalDependencies:
fsevents: 2.3.3
dev: true
/vite@5.0.4(@types/node@20.10.2):
resolution: {integrity: sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==} resolution: {integrity: sha512-RzAr8LSvM8lmhB4tQ5OPcBhpjOZRZjuxv9zO5UcxeoY2bd3kP3Ticd40Qma9/BqZ8JS96Ll/jeBX9u+LJZrhVg==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
...@@ -14593,7 +14315,7 @@ packages: ...@@ -14593,7 +14315,7 @@ packages:
terser: terser:
optional: true optional: true
dependencies: dependencies:
'@types/node': 20.10.2 '@types/node': 20.10.3
esbuild: 0.19.7 esbuild: 0.19.7
postcss: 8.4.31 postcss: 8.4.31
rollup: 4.5.1 rollup: 4.5.1
...@@ -14601,151 +14323,21 @@ packages: ...@@ -14601,151 +14323,21 @@ packages:
fsevents: 2.3.3 fsevents: 2.3.3
dev: true dev: true
/vitest@0.34.1: /vitest@1.0.1(@types/node@20.10.3)(jsdom@23.0.1):
resolution: {integrity: sha512-G1PzuBEq9A75XSU88yO5G4vPT20UovbC/2osB2KEuV/FisSIIsw7m5y2xMdB7RsAGHAfg2lPmp2qKr3KWliVlQ==} resolution: {integrity: sha512-MHsOj079S28hDsvdDvyD1pRj4dcS51EC5Vbe0xvOYX+WryP8soiK2dm8oULi+oA/8Xa/h6GoJEMTmcmBy5YM+Q==}
engines: {node: '>=v14.18.0'} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@vitest/browser': '*'
'@vitest/ui': '*'
happy-dom: '*'
jsdom: '*'
playwright: '*'
safaridriver: '*'
webdriverio: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true
'@vitest/browser':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
playwright:
optional: true
safaridriver:
optional: true
webdriverio:
optional: true
dependencies:
'@types/chai': 4.3.11
'@types/chai-subset': 1.3.3
'@types/node': 20.10.2
'@vitest/expect': 0.34.1
'@vitest/runner': 0.34.1
'@vitest/snapshot': 0.34.1
'@vitest/spy': 0.34.1
'@vitest/utils': 0.34.1
acorn: 8.10.0
acorn-walk: 8.2.0
cac: 6.7.14
chai: 4.3.10
debug: 4.3.4(supports-color@8.1.1)
local-pkg: 0.4.3
magic-string: 0.30.1
pathe: 1.1.1
picocolors: 1.0.0
std-env: 3.3.3
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.5.0(@types/node@20.10.2)
vite-node: 0.34.1(@types/node@20.10.2)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vitest@0.34.2:
resolution: {integrity: sha512-WgaIvBbjsSYMq/oiMlXUI7KflELmzM43BEvkdC/8b5CAod4ryAiY2z8uR6Crbi5Pjnu5oOmhKa9sy7uk6paBxQ==}
engines: {node: '>=v14.18.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
'@edge-runtime/vm': '*' '@edge-runtime/vm': '*'
'@vitest/browser': '*' '@types/node': ^18.0.0 || >=20.0.0
'@vitest/ui': '*' '@vitest/browser': ^1.0.0
'@vitest/ui': ^1.0.0
happy-dom: '*' happy-dom: '*'
jsdom: '*' jsdom: '*'
playwright: '*'
safaridriver: '*'
webdriverio: '*'
peerDependenciesMeta: peerDependenciesMeta:
'@edge-runtime/vm': '@edge-runtime/vm':
optional: true optional: true
'@vitest/browser': '@types/node':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
playwright:
optional: true
safaridriver:
optional: true
webdriverio:
optional: true
dependencies:
'@types/chai': 4.3.11
'@types/chai-subset': 1.3.3
'@types/node': 20.10.2
'@vitest/expect': 0.34.2
'@vitest/runner': 0.34.2
'@vitest/snapshot': 0.34.2
'@vitest/spy': 0.34.2
'@vitest/utils': 0.34.2
acorn: 8.10.0
acorn-walk: 8.2.0
cac: 6.7.14
chai: 4.3.10
debug: 4.3.4(supports-color@8.1.1)
local-pkg: 0.4.3
magic-string: 0.30.1
pathe: 1.1.1
picocolors: 1.0.0
std-env: 3.3.3
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.5.0(@types/node@20.10.2)
vite-node: 0.34.2(@types/node@20.10.2)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vitest@0.34.2(jsdom@23.0.1):
resolution: {integrity: sha512-WgaIvBbjsSYMq/oiMlXUI7KflELmzM43BEvkdC/8b5CAod4ryAiY2z8uR6Crbi5Pjnu5oOmhKa9sy7uk6paBxQ==}
engines: {node: '>=v14.18.0'}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@vitest/browser': '*'
'@vitest/ui': '*'
happy-dom: '*'
jsdom: '*'
playwright: '*'
safaridriver: '*'
webdriverio: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true optional: true
'@vitest/browser': '@vitest/browser':
optional: true optional: true
...@@ -14755,102 +14347,29 @@ packages: ...@@ -14755,102 +14347,29 @@ packages:
optional: true optional: true
jsdom: jsdom:
optional: true optional: true
playwright:
optional: true
safaridriver:
optional: true
webdriverio:
optional: true
dependencies: dependencies:
'@types/chai': 4.3.10 '@types/node': 20.10.3
'@types/chai-subset': 1.3.3 '@vitest/expect': 1.0.1
'@types/node': 20.10.1 '@vitest/runner': 1.0.1
'@vitest/expect': 0.34.2 '@vitest/snapshot': 1.0.1
'@vitest/runner': 0.34.2 '@vitest/spy': 1.0.1
'@vitest/snapshot': 0.34.2 '@vitest/utils': 1.0.1
'@vitest/spy': 0.34.2 acorn-walk: 8.3.0
'@vitest/utils': 0.34.2
acorn: 8.10.0
acorn-walk: 8.2.0
cac: 6.7.14 cac: 6.7.14
chai: 4.3.10 chai: 4.3.10
debug: 4.3.4(supports-color@8.1.1) debug: 4.3.4(supports-color@8.1.1)
execa: 8.0.1
jsdom: 23.0.1 jsdom: 23.0.1
local-pkg: 0.4.3 local-pkg: 0.5.0
magic-string: 0.30.1 magic-string: 0.30.5
pathe: 1.1.1
picocolors: 1.0.0
std-env: 3.3.3
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.7.0
vite: 4.5.0(@types/node@20.10.1)
vite-node: 0.34.2(@types/node@20.10.1)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
- lightningcss
- sass
- stylus
- sugarss
- supports-color
- terser
dev: true
/vitest@0.34.4:
resolution: {integrity: sha512-SE/laOsB6995QlbSE6BtkpXDeVNLJc1u2LHRG/OpnN4RsRzM3GQm4nm3PQCK5OBtrsUqnhzLdnT7se3aeNGdlw==}
engines: {node: '>=v14.18.0'}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@vitest/browser': '*'
'@vitest/ui': '*'
happy-dom: '*'
jsdom: '*'
playwright: '*'
safaridriver: '*'
webdriverio: '*'
peerDependenciesMeta:
'@edge-runtime/vm':
optional: true
'@vitest/browser':
optional: true
'@vitest/ui':
optional: true
happy-dom:
optional: true
jsdom:
optional: true
playwright:
optional: true
safaridriver:
optional: true
webdriverio:
optional: true
dependencies:
'@types/chai': 4.3.10
'@types/chai-subset': 1.3.3
'@types/node': 20.10.1
'@vitest/expect': 0.34.4
'@vitest/runner': 0.34.4
'@vitest/snapshot': 0.34.4
'@vitest/spy': 0.34.4
'@vitest/utils': 0.34.4
acorn: 8.10.0
acorn-walk: 8.2.0
cac: 6.7.14
chai: 4.3.9
debug: 4.3.4(supports-color@8.1.1)
local-pkg: 0.4.3
magic-string: 0.30.1
pathe: 1.1.1 pathe: 1.1.1
picocolors: 1.0.0 picocolors: 1.0.0
std-env: 3.3.3 std-env: 3.6.0
strip-literal: 1.0.1 strip-literal: 1.3.0
tinybench: 2.5.0 tinybench: 2.5.1
tinypool: 0.7.0 tinypool: 0.8.1
vite: 5.0.2(@types/node@20.10.1) vite: 5.0.4(@types/node@20.10.3)
vite-node: 0.34.4(@types/node@20.10.1) vite-node: 1.0.1(@types/node@20.10.3)
why-is-node-running: 2.2.2 why-is-node-running: 2.2.2
transitivePeerDependencies: transitivePeerDependencies:
- less - less
......
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