diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 833338f..2c48fdf 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -17,20 +17,12 @@ jobs: go-version: ^1.19 id: go - - name: Install geth - run: | - sudo add-apt-repository -y ppa:ethereum/ethereum - sudo apt-get update - sudo apt-get install ethereum - - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Build binary - run: make all - - name: Fill tests - run: ./rpctestgen + run: make fill + lint: name: Lint runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 3de8a6b..a53bec0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ tests/ ethash/ -rpctestgen -openrpc.json +/rpctestgen +/geth +/openrpc.json + diff --git a/Makefile b/Makefile index 00ec492..a4a9115 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,12 @@ +.PHONY: all clean build buildgeth test lint fill + all: clean build build: - go build . + go build . + +buildgeth: + go build github.com/ethereum/go-ethereum/cmd/geth clean: rm -rf rpctestgen tests @@ -14,5 +19,5 @@ lint: go vet ./... staticcheck ./... -fill: build - ./rpctestgen +fill: build buildgeth + ./rpctestgen --bin ./geth -chain ./chain diff --git a/blockgen.go b/blockgen.go deleted file mode 100644 index 59e5826..0000000 --- a/blockgen.go +++ /dev/null @@ -1,145 +0,0 @@ -package main - -import ( - "fmt" - "math/big" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/consensus" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/params" - "github.com/ethereum/go-ethereum/trie" -) - -// genSimpleChain generates a short chain with a few basic transactions. -func genSimpleChain(engine consensus.Engine) (*core.Genesis, []*types.Block, *types.Block) { - var ( - keyHex = "9c647b8b7c4e7c3490668fb6c11473619db80c93704c70893d3813af4090c39c" - key, _ = crypto.HexToECDSA(keyHex) - address = crypto.PubkeyToAddress(key.PublicKey) // 658bdf435d810c91414ec09147daa6db62406379 - aa = common.Address{0xaa} - bb = common.Address{0xbb} - funds = big.NewInt(0).Mul(big.NewInt(1337), big.NewInt(params.Ether)) - contract = common.HexToAddress("0000000000000000000000000000000000031ec7") - gspec = &core.Genesis{ - Config: params.AllEthashProtocolChanges, - Alloc: core.GenesisAlloc{address: {Balance: funds}}, - BaseFee: big.NewInt(params.InitialBaseFee), - Difficulty: common.Big1, - GasLimit: 5_000_000, - } - gendb = rawdb.NewMemoryDatabase() - signer = types.LatestSigner(gspec.Config) - ) - gspec.Config.TerminalTotalDifficultyPassed = true - gspec.Config.TerminalTotalDifficulty = common.Big0 - gspec.Config.ShanghaiTime = uintptr(0) - - // init 0xaa with some storage elements - storage := make(map[common.Hash]common.Hash) - storage[common.Hash{0x00}] = common.Hash{0x00} - storage[common.Hash{0x01}] = common.Hash{0x01} - storage[common.Hash{0x02}] = common.Hash{0x02} - storage[common.Hash{0x03}] = common.HexToHash("0303") - gspec.Alloc[aa] = core.GenesisAccount{ - Balance: common.Big1, - Nonce: 1, - Storage: storage, - Code: common.Hex2Bytes("6042"), - } - gspec.Alloc[bb] = core.GenesisAccount{ - Balance: common.Big2, - Nonce: 1, - Storage: storage, - Code: common.Hex2Bytes("600154600354"), - } - - // // SPDX-License-Identifier: GPL-3.0 - // pragma solidity >=0.7.0 <0.9.0; - // - // contract Token { - // event Transfer(address indexed from, address indexed to, uint256 value); - // function transfer(address to, uint256 value) public returns (bool) { - // emit Transfer(msg.sender, to, value); - // return true; - // } - // } - gspec.Alloc[contract] = core.GenesisAccount{ - Balance: big.NewInt(params.Ether), - Code: common.FromHex("0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a9059cbb14610030575b600080fd5b61004a6004803603810190610045919061016a565b610060565b60405161005791906101c5565b60405180910390f35b60008273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516100bf91906101ef565b60405180910390a36001905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610101826100d6565b9050919050565b610111816100f6565b811461011c57600080fd5b50565b60008135905061012e81610108565b92915050565b6000819050919050565b61014781610134565b811461015257600080fd5b50565b6000813590506101648161013e565b92915050565b60008060408385031215610181576101806100d1565b5b600061018f8582860161011f565b92505060206101a085828601610155565b9150509250929050565b60008115159050919050565b6101bf816101aa565b82525050565b60006020820190506101da60008301846101b6565b92915050565b6101e981610134565b82525050565b600060208201905061020460008301846101e0565b9291505056fea2646970667358221220b469033f4b77b9565ee84e0a2f04d496b18160d26034d54f9487e57788fd36d564736f6c63430008120033"), - } - - genesis := gspec.MustCommit(gendb, trie.NewDatabase(gendb, trie.HashDefaults)) - - chain, _ := core.GenerateChain(gspec.Config, genesis, engine, gendb, 10, func(i int, gen *core.BlockGen) { - var ( - tx *types.Transaction - err error - ) - switch i { - case 2: - // create contract - tx, err = types.SignTx(types.NewTx(&types.LegacyTx{Nonce: uint64(i), To: nil, Gas: 53100, GasPrice: gen.BaseFee(), Data: common.FromHex("0x60806040")}), signer, key) - case 3: - // with logs - // transfer(address to, uint256 value) - data := fmt.Sprintf("0xa9059cbb%s%s", common.HexToHash(common.BigToAddress(big.NewInt(int64(i + 1))).Hex()).String()[2:], common.BytesToHash([]byte{byte(i + 11)}).String()[2:]) - tx, err = types.SignTx(types.NewTx(&types.LegacyTx{Nonce: uint64(i), To: &contract, Gas: 60000, GasPrice: gen.BaseFee(), Data: common.FromHex(data)}), signer, key) - case 4: - // dynamic fee with logs - // transfer(address to, uint256 value) - data := fmt.Sprintf("0xa9059cbb%s%s", common.HexToHash(common.BigToAddress(big.NewInt(int64(i + 1))).Hex()).String()[2:], common.BytesToHash([]byte{byte(i + 11)}).String()[2:]) - fee := big.NewInt(500) - fee.Add(fee, gen.BaseFee()) - tx, err = types.SignTx(types.NewTx(&types.DynamicFeeTx{Nonce: uint64(i), To: &contract, Gas: 60000, Value: big.NewInt(1), GasTipCap: big.NewInt(500), GasFeeCap: fee, Data: common.FromHex(data)}), signer, key) - case 5: - // access list with contract create - accessList := types.AccessList{{ - Address: contract, - StorageKeys: []common.Hash{{0}}, - }} - tx, err = types.SignTx(types.NewTx(&types.AccessListTx{Nonce: uint64(i), To: nil, Gas: 58100, GasPrice: gen.BaseFee(), Data: common.FromHex("0x60806040"), AccessList: accessList}), signer, key) - default: - tx, err = types.SignTx(types.NewTransaction(gen.TxNonce(address), address, big.NewInt(1000), params.TxGas, new(big.Int).Add(gen.BaseFee(), common.Big1), nil), signer, key) - } - if err != nil { - panic(err) - } - - gen.AddTx(tx) - if i == 1 { - gen.AddWithdrawal(&types.Withdrawal{ - Index: 123, - Validator: 42, - Address: common.Address{0xee}, - Amount: 1337, - }) - gen.AddWithdrawal(&types.Withdrawal{ - Index: 124, - Validator: 13, - Address: common.Address{0xee}, - Amount: 1, - }) - } - }) - - // Modify block so that recorded gas used does not equal actual. - bad := chain[len(chain)-1] - h := bad.Header() - h.GasUsed += 1 - bad.WithSeal(h) - sealedBlock := make(chan *types.Block, 1) - if err := engine.Seal(nil, bad, sealedBlock, nil); err != nil { - panic(err) - } - - chain = chain[:len(chain)-1] - return gspec, chain, bad -} - -func uintptr(x uint64) *uint64 { - return &x -} diff --git a/chain/accounts.json b/chain/accounts.json new file mode 100644 index 0000000..c966623 --- /dev/null +++ b/chain/accounts.json @@ -0,0 +1,62 @@ +{ + "0x0c2c51a0990aee1d73c1228de158688341557508": { + "key": "0xbfcd0e032489319f4e5ca03e643b2025db624be6cf99cbfed90c4502e3754850" + }, + "0x14e46043e63d0e3cdcf2530519f4cfaf35058cb2": { + "key": "0x457075f6822ac29481154792f65c5f1ec335b4fea9ca20f3fea8fa1d78a12c68" + }, + "0x16c57edf7fa9d9525378b0b81bf8a3ced0620c1c": { + "key": "0x865898edcf43206d138c93f1bbd86311f4657b057658558888aa5ac4309626a6" + }, + "0x1f4924b14f34e24159387c0a4cdbaa32f3ddb0cf": { + "key": "0xee7f7875d826d7443ccc5c174e38b2c436095018774248a8074ee92d8914dcdb" + }, + "0x1f5bde34b4afc686f136c7a3cb6ec376f7357759": { + "key": "0x25e6ce8611cefb5cd338aeaa9292ed2139714668d123a4fb156cabb42051b5b7" + }, + "0x2d389075be5be9f2246ad654ce152cf05990b209": { + "key": "0x19168cd7767604b3d19b99dc3da1302b9ccb6ee9ad61660859e07acd4a2625dd" + }, + "0x3ae75c08b4c907eb63a8960c45b86e1e9ab6123c": { + "key": "0x71aa7d299c7607dabfc3d0e5213d612b5e4a97455b596c2f642daac43fa5eeaa" + }, + "0x4340ee1b812acb40a1eb561c019c327b243b92df": { + "key": "0x47f666f20e2175606355acec0ea1b37870c15e5797e962340da7ad7972a537e8" + }, + "0x4a0f1452281bcec5bd90c3dce6162a5995bfe9df": { + "key": "0xa88293fefc623644969e2ce6919fb0dbd0fd64f640293b4bf7e1a81c97e7fc7f" + }, + "0x4dde844b71bcdf95512fb4dc94e84fb67b512ed8": { + "key": "0x6e1e16a9c15641c73bf6e237f9293ab1d4e7c12b9adf83cfc94bcf969670f72d" + }, + "0x5f552da00dfb4d3749d9e62dcee3c918855a86a0": { + "key": "0x41be4e00aac79f7ffbb3455053ec05e971645440d594c047cdcc56a3c7458bd6" + }, + "0x654aa64f5fbefb84c270ec74211b81ca8c44a72e": { + "key": "0xc825f31cd8792851e33a290b3d749e553983111fc1f36dfbbdb45f101973f6a9" + }, + "0x717f8aa2b982bee0e29f573d31df288663e1ce16": { + "key": "0x8d0faa04ae0f9bc3cd4c890aa025d5f40916f4729538b19471c0beefe11d9e19" + }, + "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f": { + "key": "0x4552dbe6ca4699322b5d923d0c9bcdd24644f5db8bf89a085b67c6c49b8a1b91" + }, + "0x83c7e323d189f18725ac510004fdc2941f8c4a78": { + "key": "0x34391cbbf06956bb506f45ec179cdd84df526aa364e27bbde65db9c15d866d00" + }, + "0x84e75c28348fb86acea1a93a39426d7d60f4cc46": { + "key": "0xf6a8f1603b8368f3ca373292b7310c53bec7b508aecacd442554ebc1c5d0c856" + }, + "0xc7b99a164efd027a93f147376cc7da7c67c6bbe0": { + "key": "0x8d56bcbcf2c1b7109e1396a28d7a0234e33544ade74ea32c460ce4a443b239b1" + }, + "0xd803681e487e6ac18053afc5a6cd813c86ec3e4d": { + "key": "0xfc39d1c9ddbba176d806ebb42d7460189fe56ca163ad3eb6143bfc6beb6f6f72" + }, + "0xe7d13f7aa2a838d24c59b40186a0aca1e21cffcc": { + "key": "0x9ee3fd550664b246ad7cdba07162dd25530a3b1d51476dd1d85bbc29f0592684" + }, + "0xeda8645ba6948855e3b3cd596bbb07596d59c603": { + "key": "0x14cdde09d1640eb8c3cda063891b0453073f57719583381ff78811efa6d4199f" + } +} \ No newline at end of file diff --git a/chain/chain.rlp b/chain/chain.rlp new file mode 100644 index 0000000..57c4161 Binary files /dev/null and b/chain/chain.rlp differ diff --git a/chain/forkenv.json b/chain/forkenv.json new file mode 100644 index 0000000..f25bf48 --- /dev/null +++ b/chain/forkenv.json @@ -0,0 +1,20 @@ +{ + "HIVE_CANCUN_TIMESTAMP": "0", + "HIVE_CHAIN_ID": "3503995874084926", + "HIVE_FORK_ARROW_GLACIER": "0", + "HIVE_FORK_BERLIN": "0", + "HIVE_FORK_BYZANTIUM": "0", + "HIVE_FORK_CONSTANTINOPLE": "0", + "HIVE_FORK_GRAY_GLACIER": "0", + "HIVE_FORK_HOMESTEAD": "0", + "HIVE_FORK_ISTANBUL": "0", + "HIVE_FORK_LONDON": "0", + "HIVE_FORK_MUIR_GLACIER": "0", + "HIVE_FORK_PETERSBURG": "0", + "HIVE_FORK_SPURIOUS": "0", + "HIVE_FORK_TANGERINE": "0", + "HIVE_MERGE_BLOCK_ID": "0", + "HIVE_NETWORK_ID": "3503995874084926", + "HIVE_SHANGHAI_TIMESTAMP": "0", + "HIVE_TERMINAL_TOTAL_DIFFICULTY": "131072" +} \ No newline at end of file diff --git a/chain/genesis.json b/chain/genesis.json new file mode 100644 index 0000000..96e91f7 --- /dev/null +++ b/chain/genesis.json @@ -0,0 +1,116 @@ +{ + "config": { + "chainId": 3503995874084926, + "homesteadBlock": 0, + "eip150Block": 0, + "eip155Block": 0, + "eip158Block": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "istanbulBlock": 0, + "muirGlacierBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "arrowGlacierBlock": 0, + "grayGlacierBlock": 0, + "mergeNetsplitBlock": 0, + "shanghaiTime": 0, + "cancunTime": 0, + "terminalTotalDifficulty": 131072, + "terminalTotalDifficultyPassed": true, + "ethash": {} + }, + "nonce": "0x0", + "timestamp": "0x0", + "extraData": "0x68697665636861696e", + "gasLimit": "0x23f3e20", + "difficulty": "0x20000", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "000f3df6d732807ef1319fb7b8bb8522d0beac02": { + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500", + "balance": "0x2a" + }, + "0c2c51a0990aee1d73c1228de158688341557508": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "14e46043e63d0e3cdcf2530519f4cfaf35058cb2": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "16c57edf7fa9d9525378b0b81bf8a3ced0620c1c": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "1f4924b14f34e24159387c0a4cdbaa32f3ddb0cf": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "1f5bde34b4afc686f136c7a3cb6ec376f7357759": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "2d389075be5be9f2246ad654ce152cf05990b209": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "3ae75c08b4c907eb63a8960c45b86e1e9ab6123c": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "4340ee1b812acb40a1eb561c019c327b243b92df": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "4a0f1452281bcec5bd90c3dce6162a5995bfe9df": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "4dde844b71bcdf95512fb4dc94e84fb67b512ed8": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "5f552da00dfb4d3749d9e62dcee3c918855a86a0": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "654aa64f5fbefb84c270ec74211b81ca8c44a72e": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "717f8aa2b982bee0e29f573d31df288663e1ce16": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "7435ed30a8b4aeb0877cef0c6e8cffe834eb865f": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "7dcd17433742f4c0ca53122ab541d0ba67fc27df": { + "code": "0x3680600080376000206000548082558060010160005560005263656d697460206000a2", + "balance": "0x0" + }, + "83c7e323d189f18725ac510004fdc2941f8c4a78": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "84e75c28348fb86acea1a93a39426d7d60f4cc46": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "8bebc8ba651aee624937e7d897853ac30c95a067": { + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002": "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000003": "0x0000000000000000000000000000000000000000000000000000000000000003" + }, + "balance": "0x1", + "nonce": "0x1" + }, + "c7b99a164efd027a93f147376cc7da7c67c6bbe0": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "d803681e487e6ac18053afc5a6cd813c86ec3e4d": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "e7d13f7aa2a838d24c59b40186a0aca1e21cffcc": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + }, + "eda8645ba6948855e3b3cd596bbb07596d59c603": { + "balance": "0xc097ce7bc90715b34b9f1000000000" + } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "baseFeePerGas": "0x3b9aca00", + "excessBlobGas": null, + "blobGasUsed": null +} \ No newline at end of file diff --git a/chain/headstate.json b/chain/headstate.json new file mode 100644 index 0000000..a1d1705 --- /dev/null +++ b/chain/headstate.json @@ -0,0 +1,465 @@ +{ + "root": "5ecd3199a7bbfd931736b92d5447d80610c6eaff932819eb3e2379d1d931f972", + "accounts": { + "0x0000000000000000000000000000000000000000": { + "balance": "4123588", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5380c7b7ae81a58eb98d9c78de4a1fd7fd9535fc953ed2be602daaa41767312a" + }, + "0x000f3df6d732807ef1319fb7b8bb8522d0beac02": { + "balance": "42", + "nonce": 0, + "root": "0xe7d2c457128f403b07449806199f5c32c7069967dcc184c13a1a8ef0a537a6d3", + "codeHash": "0xf57acd40259872606d76197ef052f3d35588dadf919ee1f0e3cb9b62d3f4b02c", + "code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000a": "0a", + "0x0000000000000000000000000000000000000000000000000000000000000014": "14", + "0x000000000000000000000000000000000000000000000000000000000000001e": "1e", + "0x0000000000000000000000000000000000000000000000000000000000000028": "28", + "0x0000000000000000000000000000000000000000000000000000000000000032": "32", + "0x000000000000000000000000000000000000000000000000000000000000003c": "3c", + "0x0000000000000000000000000000000000000000000000000000000000000046": "46", + "0x0000000000000000000000000000000000000000000000000000000000000050": "50", + "0x000000000000000000000000000000000000000000000000000000000000005a": "5a", + "0x0000000000000000000000000000000000000000000000000000000000000064": "64", + "0x000000000000000000000000000000000000000000000000000000000000006e": "6e", + "0x0000000000000000000000000000000000000000000000000000000000000078": "78", + "0x0000000000000000000000000000000000000000000000000000000000000082": "82", + "0x000000000000000000000000000000000000000000000000000000000000008c": "8c", + "0x0000000000000000000000000000000000000000000000000000000000000096": "96", + "0x00000000000000000000000000000000000000000000000000000000000000a0": "a0", + "0x00000000000000000000000000000000000000000000000000000000000000aa": "aa", + "0x00000000000000000000000000000000000000000000000000000000000000b4": "b4", + "0x00000000000000000000000000000000000000000000000000000000000000be": "be", + "0x00000000000000000000000000000000000000000000000000000000000000c8": "c8", + "0x0000000000000000000000000000000000000000000000000000000000002009": "83472eda6eb475906aeeb7f09e757ba9f6663b9f6a5bf8611d6306f677f67ebd", + "0x0000000000000000000000000000000000000000000000000000000000002013": "2c809fbc7e3991c8ab560d1431fa8b6f25be4ab50977f0294dfeca9677866b6e", + "0x000000000000000000000000000000000000000000000000000000000000201d": "756e335a8778f6aadb2cc18c5bc68892da05a4d8b458eee5ce3335a024000c67", + "0x0000000000000000000000000000000000000000000000000000000000002027": "4b118bd31ed2c4eeb81dc9e3919e9989994333fe36f147c2930f12c53f0d3c78", + "0x0000000000000000000000000000000000000000000000000000000000002031": "d0122166752d729620d41114ff5a94d36e5d3e01b449c23844900c023d1650a5", + "0x000000000000000000000000000000000000000000000000000000000000203b": "60c606c4c44709ac87b367f42d2453744639fc5bee099a11f170de98408c8089", + "0x0000000000000000000000000000000000000000000000000000000000002045": "6ee04e1c27edad89a8e5a2253e4d9cca06e4f57d063ed4fe7cc1c478bb57eeca", + "0x000000000000000000000000000000000000000000000000000000000000204f": "36616354a17658eb3c3e8e5adda6253660e3744cb8b213006f04302b723749a8", + "0x0000000000000000000000000000000000000000000000000000000000002059": "c13802d4378dcb9c616f0c60ea0edd90e6c2dacf61f39ca06add0eaa67473b94", + "0x0000000000000000000000000000000000000000000000000000000000002063": "8b345497936c51d077f414534be3f70472e4df101dee8820eaaff91a6624557b", + "0x000000000000000000000000000000000000000000000000000000000000206d": "e958485d4b3e47b38014cc4eaeb75f13228072e7b362a56fc3ffe10155882629", + "0x0000000000000000000000000000000000000000000000000000000000002077": "3346706b38a2331556153113383581bc6f66f209fdef502f9fc9b6daf6ea555e", + "0x0000000000000000000000000000000000000000000000000000000000002081": "346910f7e777c596be32f0dcf46ccfda2efe8d6c5d3abbfe0f76dba7437f5dad", + "0x000000000000000000000000000000000000000000000000000000000000208b": "e62a7bd9263534b752176d1ff1d428fcc370a3b176c4a6312b6016c2d5f8d546", + "0x0000000000000000000000000000000000000000000000000000000000002095": "ffe267d11268388fd0426a627dedddeb075d68327df9172c0445cd2979ec7e4d", + "0x000000000000000000000000000000000000000000000000000000000000209f": "23cc648c9cd82c08214882b7e28e026d6eb56920f90f64731bb09b6acf515427", + "0x00000000000000000000000000000000000000000000000000000000000020a9": "47c896f5986ec29f58ec60eec56ed176910779e9fc9cf45c3c090126aeb21acd", + "0x00000000000000000000000000000000000000000000000000000000000020b3": "6d19894928a3ab44077bb85dcb47e0865ce1c4c187bba26bad059aa774c03cfe", + "0x00000000000000000000000000000000000000000000000000000000000020bd": "efc50f4fc1430b6d5d043065201692a4a02252fef0699394631f5213a5667547", + "0x00000000000000000000000000000000000000000000000000000000000020c7": "3cc9f65fc1f46927eb46fbf6d14bc94af078fe8ff982a984bdd117152cd1549f" + }, + "key": "0x37d65eaa92c6bc4c13a5ec45527f0c18ea8932588728769ec7aecfe6d9f32e42" + }, + "0x0c2c51a0990aee1d73c1228de158688341557508": { + "balance": "1000000000000000000000000000000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x28f25652ec67d8df6a2e33730e5d0983443e3f759792a0128c06756e8eb6c37f" + }, + "0x0ee3ab1371c93e7c0c281cc0c2107cdebc8b1930": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0x247cc3b27208cdf8036ec9c5aa16ae2aa005255b13aaf0e79824fc6d69e2df61", + "code": "0x60003515156036577f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b7f08c379a0000000000000000000000000000000000000000000000000000000006000526020600452600a6024527f75736572206572726f7200000000000000000000000000000000000000000000604452604e6000fd", + "key": "0x9afc282e9868fb95921af24218a3612a16ad8e7329530b5be184a6507bbddecc" + }, + "0x14e46043e63d0e3cdcf2530519f4cfaf35058cb2": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x9feaf0bd45df0fbf327c964c243b2fbc2f0a3cb48fedfeea1ae87ac1e66bc02f" + }, + "0x16c57edf7fa9d9525378b0b81bf8a3ced0620c1c": { + "balance": "1000000000000000000000000100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xda81833ff053aff243d305449775c3fb1bd7f62c4a3c95dc9fb91b85e032faee" + }, + "0x17e7eedce4ac02ef114a7ed9fe6e2f33feba1667": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0x975f732458c1f6c2dd22b866b031cc509c6d4f788b1f020e351c1cdba48dacca", + "code": "0x366002146022577177726f6e672d63616c6c6461746173697a656000526012600efd5b60003560f01c61ff01146047576d77726f6e672d63616c6c64617461600052600e6012fd5b61ffee6000526002601ef3", + "key": "0x69bf6d72df9e6b88306eb4e4624996e919f0433ba63520aa9a1d3f9888e09b1f" + }, + "0x1f4924b14f34e24159387c0a4cdbaa32f3ddb0cf": { + "balance": "1000000000000000000000000000000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x7963685967117ffb6fd019663dc9e782ebb1234a38501bffc2eb5380f8dc303b" + }, + "0x1f5bde34b4afc686f136c7a3cb6ec376f7357759": { + "balance": "1000000000000000000000000200000000002", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xc3791fc487a84f3731eb5a8129a7e26f357089971657813b48a821f5582514b3" + }, + "0x2c1287779024c3a2f0924b54816d79b7e378907d": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xe17883cd7e9721414f209408a0a0e1fe27bd1a9e0f0e7b72fd8077450d1e4068", + "code": "0xada5013122d395ba3c54772283fb069b10426056ef8ca54750cb9bb552a59e7dcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792fe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0a15bc60c955c405d20d9149c709e2460f1c2d9a497496a7f46004d1772c3054cabd6e7cb50984ff9c2f3e18a2660c3353dadf4e3291deeb275dae2cd1e44fe051471eb6eb2c5e789fc3de43f8ce62938c7d1836ec861730447e2ada8fd81017b3e5fec24aa4dc4e5aee2e025e51e1392c72a2500577559fae9665c6d52bd6a31b39221ace053465ec3453ce2b36430bd138b997ecea25c1043da0c366812b828", + "key": "0x09d6e6745d272389182a510994e2b54d14b731fac96b9c9ef434bc1924315371" + }, + "0x2d389075be5be9f2246ad654ce152cf05990b209": { + "balance": "1000000000000000000000000000000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xa9233a729f0468c9c309c48b82934c99ba1fd18447947b3bc0621adb7a5fc643" + }, + "0x2f01c1c8c735a9a1b89898d3f14bbf61c91bf0fd": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xdc443b3e953eaa80fc5b5ae5ed28a3771bb30b13eed51dcc72ca2b3ee6f12441", + "code": "0x1cb7ce0668e72b96f704af9e1445a9dc6f6ac599eec355bfcfe4d3befbb001be40165e7164257b249280bf839a50283d248062ed7b0e6d8820cb6c506bfcf7d3c0c7c7c9a2a6655862feea3cc7ff13629582293fcfe0e1094efb20897bb02a656a2b6bffaca788160f671fa62d34758b717f75a90ad5a468757c50d61f33c4437f6fa3f34639ea1891363ca773619dbd5f652d7ab50411111dde2f57e3ae13add1ccbf1f9f869f51cd81e6f099f905636b057f682c706fe990614b1120516928ee4750d043edce57577a49a1f0c4b389e3b8c38c27dc693bc6b7154c07280771f2e2385bc2a5be32198cd1e425186910eb1a233b2b2a22be149cee4dc72d0162", + "key": "0xd2f394b4549b085fb9b9a8b313a874ea660808a4323ab2598ee15ddd1eb7e897" + }, + "0x312e8fca5ac7dfc591031831bff6fede6ecf12a8": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xa0beac0b7fe18462854e5a271e13c5e67ed378319ee17efca15caf2625aa95bb", + "code": "0xd0a75bf7ea87fba36ff8a17b4519c45fb727609e6c9161b106680b25b3e2705f23bf72df16f8335be9a3eddfb5ef1c739b12847d13a384ec83f578699d38eb89bd814762a7e35d5c162a7570d14baa68bd622cabb1ad83d40dd70f8a88aa67c0d56a60595ebefebed7f22dcee6c2acc61b06cf8c68e84c88677840365d1ff92b140aabff1a85df08546c9a350c79ae18341bde4a2cef5d2fd460885c0128ce26f907e7e6656fa73566b18c1215272fe9fca2c55c552e62c923e21e000ac4b4e60b94fa1b86997cc1f1148bfbe25b674e8cefc7cc6f976aa8d7c7966bd4cca34774b6357e277c778e8ad9a2761a935d45336ec91439b9e1b117eda2efdfe38fad", + "key": "0x64bfba8a4688bdee41c4b998e101567b8b56fea53d30ab85393f2d5b70c5da90" + }, + "0x3ae75c08b4c907eb63a8960c45b86e1e9ab6123c": { + "balance": "1000000000000000000000000000000000003", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x878040f46b1b4a065e6b82abd35421eb69eededc0c9598b82e3587ae47c8a651" + }, + "0x4055cae5c7d838cda10d40f9d07106c7f5f3be1c": { + "balance": "0", + "nonce": 1, + "root": "0xe22af78ee9815b318712241c4adc80063a8598446701dfc8ea0e3631baaf79e8", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000002": "02", + "0x0000000000000000000000000000000000000000000000000000000000000003": "03", + "0x0000000000000000000000000000000000000000000000000000000000000004": "04" + }, + "key": "0x6b9ff41fb13fc66c4e1c4f85d59c52608698715472b7cce609bdbf75976a438b" + }, + "0x4340ee1b812acb40a1eb561c019c327b243b92df": { + "balance": "1000000000000000000000000000000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xa13bfef92e05edee891599aa5e447ff2baa1708d9a6473a04ef66ab94f2a11e4" + }, + "0x4a0f1452281bcec5bd90c3dce6162a5995bfe9df": { + "balance": "1000000000000000000000000000000000003", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5c1d92594d6377fe6423257781b382f94dffcde4fadbf571aa328f6eb18f8fcd" + }, + "0x4bc336bbce2f241ab658214f44aab1cbe4cb8335": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xbe1fa08bc91e8829cee159efe23236d54f009cb119f2685588cb4d78945236ea", + "code": "0x52d75039926638d3c558b2bdefb945d5be8dae29dedd1c313212a4d472d9fde5edc95719e9a3b28dd8e80877cb5880a9be7de1a13fc8b05e7999683b6b567643ee60d0579bcffd98e668647d59fec1ff86a7fb340ce572e844f234ae73a6918f83ec6a1f0257b830b5e016457c9cf1435391bf56cc98f369a58a54fe937724651a1e6821cde7d0159c0d293177871e09677b4e42307c7db3ba94f8648a5a050f3eec716f11ba9e820c81ca75eb978ffb45831ef8b7a53e5e422c26008e1ca6d5c5069e24aaadb2addc3e52e868fcf3f4f8acf5a87e24300992fd4540c2a87eedb805995a7ec585a251200611a61d179cfd7fb105e1ab17dc415a7336783786f7", + "key": "0x529525da9c1b4df0a5955af20ceb21ba6c11431a6d8a48dabdd0edb19b5ff5e6" + }, + "0x4dde844b71bcdf95512fb4dc94e84fb67b512ed8": { + "balance": "1000000000000000000000000000000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5602444769b5fd1ddfca48e3c38f2ecad326fe2433f22b90f6566a38496bd426" + }, + "0x517d8fbf706e6b73e0025e65ee711a55593f7c40": { + "balance": "0", + "nonce": 1, + "root": "0xe157409dc04fd61a85510c013db6fc4e0d7851ff5e72ac546da85479edf06be1", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000007": "07", + "0x0000000000000000000000000000000000000000000000000000000000000008": "08", + "0x0000000000000000000000000000000000000000000000000000000000000009": "09" + }, + "key": "0x2cb839672fcfe776432d72e63be7927df5c6a6e995ea096c38015303f4a0f474" + }, + "0x5f552da00dfb4d3749d9e62dcee3c918855a86a0": { + "balance": "1000000000000000000000000100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xd52564daf6d32a6ae29470732726859261f5a7409b4858101bd233ed5cc2f662" + }, + "0x654aa64f5fbefb84c270ec74211b81ca8c44a72e": { + "balance": "1000000000000000000000000100000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x00aa781aff39a8284ef43790e3a511b2caa50803613c5096bc782e8de08fa4c5" + }, + "0x66378d2edcc2176820e951f080dd6e9e15a0e695": { + "balance": "0", + "nonce": 1, + "root": "0x207f6c3e450546b0d1f3bc6a6faf5bfa0bff80396c55d567b834cf0e7c760347", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000a": "0a", + "0x000000000000000000000000000000000000000000000000000000000000000b": "0b", + "0x000000000000000000000000000000000000000000000000000000000000000c": "0c" + }, + "key": "0xa02c8b02efb52fad3056fc96029467937c38c96d922250f6d2c0f77b923c85aa" + }, + "0x717f8aa2b982bee0e29f573d31df288663e1ce16": { + "balance": "1000000000000000000000000100000000002", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xc3c8e2dc64e67baa83b844263fe31bfe24de17bb72bfed790ab345b97b007816" + }, + "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f": { + "balance": "999999999999999999998533324998171168", + "nonce": 73, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x4363d332a0d4df8582a84932729892387c623fe1ec42e2cfcbe85c183ed98e0e" + }, + "0x7dcd17433742f4c0ca53122ab541d0ba67fc27df": { + "balance": "63", + "nonce": 0, + "root": "0xc59e2f9ab665cb405160bd9d8d1f90214b681740f2c161a9f493f417b010660c", + "codeHash": "0xa3216dd3ef46a63d518ef54e482cecac68a077f70fca0e5fb900be63f41d54a2", + "code": "0x3680600080376000206000548082558060010160005560005263656d697460206000a2", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "1c", + "0x042665eeb0d766d5f5d586872131a59639bdb3122f57882590c508846c9138c1": "0c", + "0x0588df43087493fd84fa37ef37152cacefd4db3823315da90e65dd785434ff14": "05", + "0x0921e35d2dc9980c8ba6910f8f63ab4b0cc99b9b50423dbb4dcb3bed4939c5f5": "0a", + "0x09d9f86815d3c33738fdcb1e2e78d8a32c9ead8e6d7992be1021673b36b31224": "0f", + "0x0cd195b06772467a81ae8f240f4e89a31d8df89304f1eae57062a8843725cc1c": "1a", + "0x1f76693b644f8fc7411ace4f84517e75a88f15a84636b1c09c5a72b321d64a76": "16", + "0x34556f916cdba7f72334f11b8a4b19b21da16050346f8cf0a332ca35594f79cf": "07", + "0x40ca9fbee0c902d46ae74609fc9a942d8495d331bd4716636c34a44d2373cc74": "19", + "0x412bed56e188784e4df3c612e4b91c6f0fac4895418434692cd1095d6bb82dff": "12", + "0x45e0e3b8ce4a6607eaab73f10c7150b227e36353fc55dabc862966451d93682c": "0d", + "0x462708a3c1cd03b21605715d090136df64e227f7e7792f74bb1bd7a8288f8801": "02", + "0x54a0a17756eb92101e5a2d04fcf14e4364de07cf3b8b36bc9cab62725d08788e": "06", + "0x5d52ea6d567653dd5d8033b761206d4acc235efab149097930ab763f2db0adee": "17", + "0x7da2e3417d225fdc7c68195dd06c5393304ab25a8a7e7dbebf7020994f2a4565": "1b", + "0x881a8434f98b103a2ee48727304618ca54234f1474c44bef70c21accc4dbc0a7": "08", + "0xa3d07a7d68fbd49ec2f8e6befdd86c885f86c272819f6f345f365dec35ae6707": "01", + "0xaa329948b0d0fb07bf27aa4d4a09110f0bc6de02464ada14ffc99c501c78dee9": "09", + "0xb4e96958d2d766459753583339e9fcc65273729d67c217b6a44835136e70c26b": "0b", + "0xb52248fb459b43720abbf1d5218c4ede9036a623653b31c2077991e04da9a456": "03", + "0xb7d8142d0042b2cc68975e8ff2e077a47d0ff14b60d314c6527ddc7e781f6718": "15", + "0xbfa747d6e89af8f9758c426da82bdec1dfe2f5142424b13fa00918e499419808": "0e", + "0xcabd86c6b1457417ec6ef454f265a6553e3c3760db2ace5cbf6a6de0475effca": "10", + "0xcad398eccd12aa694ba255d69defbf78fd51d2acec863d3ad859a64ca3bbc6b7": "18", + "0xd3277aabe8e6db5b865aa3c871851283442e8395000e4beb819a680f7351959d": "13", + "0xd52732c4c7ae8c709d859bb3e0ffcad7cc62972d3155c6270ba3e3493c07046a": "04", + "0xdee5e2a8d5dee05b615f9d83a47faa67f184cf8297d34d2cc3312261c8b970d7": "14", + "0xe62171ee0398c4f842bb3e3e2c36da99f4a9251dcbac6afb2683bcfd3d66a337": "11" + }, + "key": "0xbf1f52c702c40589735c4b038bd94e04268a58c35afad63bb16c071d62d2e23d" + }, + "0x8120ff763f8283e574fc767702056b57fcc89003": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x48e291f8a256ab15da8401c8cae555d5417a992dff3848926fa5b71655740059" + }, + "0x83c7e323d189f18725ac510004fdc2941f8c4a78": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xb17ea61d092bd5d77edd9d5214e9483607689cdcc35a30f7ea49071b3be88c64" + }, + "0x84e75c28348fb86acea1a93a39426d7d60f4cc46": { + "balance": "1000000000000000000000000000000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5162f18d40405c59ef279ad71d87fbec2bbfedc57139d56986fbf47daf8bcbf2" + }, + "0x870d4a1af4e4f80bc8c6a7f4cf7484f77be117c9": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0x59adfad51ac35f1983440f3da676e7f89fa00d680b6e144a976fbf80feca8f17", + "code": "0x3e9abaca0aad9ede81f4474766c846d8539f70688e1c8f521bbe1597874e3dc42a32391a76c35a36352b711f9152c0d0a340cd686850c8ef25fbb11c71b89e7bd3604db978f6137b0d18816b77b2ce810487a3af08a922e0b184963be5f3adfc9dcb9783ba5cd0b54745f65f4f918525e461e91888c334e5342cb380ac558d535c6b02db8b672415ffad906d7ccee10bd53dbad7d0b29e2bc0e50c93d5f31093a18b128af1c8fc61ff46f02d146e54546f34d340574cf2cef6a753cba6b6701d4da38fc8e544afc56a4c2a17752b8ddb67d8e23ac4583c9029d2e2d1dbe6c9883ed157e83ab1bb1f6b7b3760b3368106283d4e15d1f1b08e20d06576445a9994", + "key": "0x5ca23f91fefb93f286e7e245a0fe4d7018dfbfc71d39f9d80ff6ae95a304165f" + }, + "0x882e7e5d12617c267a72948e716f231fa79e6d51": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xd2501ae11a14bf0c2283a24b7e77c846c00a63e71908c6a5e1caff201bad0762" + }, + "0x8bebc8ba651aee624937e7d897853ac30c95a067": { + "balance": "1", + "nonce": 1, + "root": "0xbe3d75a1729be157e79c3b77f00206db4d54e3ea14375a015451c88ec067c790", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "01", + "0x0000000000000000000000000000000000000000000000000000000000000002": "02", + "0x0000000000000000000000000000000000000000000000000000000000000003": "03" + }, + "key": "0x445cb5c1278fdce2f9cbdb681bdd76c52f8e50e41dbd9e220242a69ba99ac099" + }, + "0x8c71c88762ecaf1c5f0c06fdfec6d1c86ee62174": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x272de2ea3ace35fa88acd34a8f7c9c0c236439eafc0509f2a6d66d1dda7225d0" + }, + "0x9344b07175800259691961298ca11c824e65032d": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0x8e0388ecf64cfa76b3a6af159f77451519a7f9bb862e4cce24175c791fdcb0df", + "code": "0x60004381526020014681526020014181526020014881526020014481526020013281526020013481526020016000f3", + "key": "0x2e6fe1362b3e388184fd7bf08e99e74170b26361624ffd1c5f646da7067b58b6" + }, + "0xaceac762ff518b4cf93a6eebbc55987e7b79b2ce": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0x6b48000f6019b583ca362b0dc6bb651649385624e568bd3588ccc7135cb7462b", + "code": "0x870253054e3d98b71abec8fff9ebf8a15d167f15909091a800d4acaab9266d2bdc686ec4a0ff239c70e7c7c36e8f853eced3bc8618f48d2b816da2a74311237eacd8ef244210bb6898e73c48bf820ed8ecc857a3bab8d79c10e4fa92b1e9ca65f2c49132ed1cee2a7e75bde50d332a2f81f1d01e5456d8a19d1df09bd561dbd2beb3bad75134cb432e5707980e3245c52c5998a1125ee30f2f0dbf3925b1e551eddb6698d7c569ff62ff64f1f1492bf14a54594835ba0faac91f84b4f5d814604ced6d0d36392b04cc5d8761b1327b3bbba6e1089c77f60a9a9ca18e05e4f00eb7c49cceb9f85950584035457a41ebbd8cf93b9b612733ad25aa9731ac43aad6", + "key": "0x1960414a11f8896c7fc4243aba7ed8179b0bc6979b7c25da7557b17f5dee7bf7" + }, + "0xbfea86423c99ad2bf0e04bf48f132ef15afbffca": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x8fbe75b43640d6ad7867fdbc62ba143fbf5804c70eb7d391dd6d67b8c761408c" + }, + "0xc7b99a164efd027a93f147376cc7da7c67c6bbe0": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x8e11480987056c309d7064ebbd887f086d815353cdbaadb796891ed25f8dcf61" + }, + "0xc8af91c25ccef6303aba6b35389c32344c8846b1": { + "balance": "0", + "nonce": 1, + "root": "0xbe8ec2d17b60d9f97cea6c173b3dbd770087f5a6e60d19a298b95394c21f0518", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000012": "12", + "0x0000000000000000000000000000000000000000000000000000000000000013": "13", + "0x0000000000000000000000000000000000000000000000000000000000000014": "14" + }, + "key": "0x80c81c55c3ae6c05094c394ac0a30c6d4251e5b4df001347a3fbd502729690a9" + }, + "0xd803681e487e6ac18053afc5a6cd813c86ec3e4d": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xe5302e42ca6111d3515cbbb2225265077da41d997f069a6c492fa3fcb0fdf284" + }, + "0xe75db02929f3d5d7c28ecdb064ece929602c06bd": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x600a7a5f41a67f6f759dcb664198f1c5d9b657fb51a870ce9e234e686dff008e" + }, + "0xe7d13f7aa2a838d24c59b40186a0aca1e21cffcc": { + "balance": "1000000000000000000000000000000000003", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xec3e92967d10ac66eff64a5697258b8acf87e661962b2938a0edcd78788f360d" + }, + "0xe7d6c630bd79f8cbb837221aed4538ea6b23fbe6": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x1189e6016e8e221cc4fc4f2ac243e8829959de8b935313559ace4a1207d9bf11" + }, + "0xebf37af41b6d7913aed3b9cc650d1e8f58a3d785": { + "balance": "0", + "nonce": 1, + "root": "0x4f08891e57abc451d1e27af22b8a2366ea4fa8e5f6219b168af6c449e954a8df", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000010": "10", + "0x0000000000000000000000000000000000000000000000000000000000000011": "11", + "0x0000000000000000000000000000000000000000000000000000000000000012": "12" + }, + "key": "0x209b102e507b8dfc6acfe2cf55f4133b9209357af679a6d507e6ee87112bfe10" + }, + "0xec3ee750e2748ae2cbae35e469185e4824824e1f": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0x38e0aa88c386479a946efa989a1b57f89baf9adb61e4b6fd9c0f7f7f744c2678", + "code": "0x7536f03fc5db63ca945db399fd3b92bff9b5879a5c0d7d84d2973ef5c841ea0612bd632ff333b55931f9f8bda8b4ed27e86687f88c95871969d72474fb428c140353061a88c0592f32d7468be32ff6e5e91e49a3ea3ffb3c4fbe417c36501ba2f60b7f6a315ec68a6ac240e69dca53652b38627f709a2caa217d9e18af4d7a6066b61daf77b854ca6ba000a8d4b340eafcdb71b6583753b4af89fceb54988fff58f00e8ecc6f5419941dd0bafec65a4cc188d31713fb1fe224257460930df8aff130046d53bc87538ab17e4752ba5f5082985eecc06ccb932c5a55e8242dd5026695255c0c22b4090576b0ff35e852eba3dd4afabff28976da48e1280061728d", + "key": "0xbb841424e9b3ab772d99521cc155b53eab8c4d915d030f21d790ec2cb8d8e7d4" + }, + "0xeda8645ba6948855e3b3cd596bbb07596d59c603": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xabd8afe9fbf5eaa36c506d7c8a2d48a35d013472f8182816be9c833be35e50da" + }, + "0xf28e98dd61d8c712a49a49e189837d8888271158": { + "balance": "0", + "nonce": 1, + "root": "0xf89ff8be1802270db3941dd47496598c56b040a61641168961390dcdea73ca1b", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000d": "0d", + "0x000000000000000000000000000000000000000000000000000000000000000e": "0e", + "0x000000000000000000000000000000000000000000000000000000000000000f": "0f" + }, + "key": "0x2a975bb8885dd321fb0d12b073fc5b9c7833242f2241f8df7dc9b5fe4f68f6bd" + }, + "0xf5347043ae5fca9412ca2c72aee17a1d3ba37691": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xa5541b637a896d30688a80b7affda987d9597aac7ccd9799c15999a1d7d094e2" + }, + "0xf7eaadcf76ffcf006a86deb2f17d0b8fe0b211a8": { + "balance": "0", + "nonce": 1, + "root": "0x491b2cfba976b2e78bd9be3bc15c9964927205fc34c9954a4d61bbe8170ba533", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000005": "05", + "0x0000000000000000000000000000000000000000000000000000000000000006": "06", + "0x0000000000000000000000000000000000000000000000000000000000000007": "07" + }, + "key": "0x1dff76635b74ddba16bba3054cc568eed2571ea6becaabd0592b980463f157e2" + } + } +} \ No newline at end of file diff --git a/chain/txinfo.json b/chain/txinfo.json new file mode 100644 index 0000000..f9f6d60 --- /dev/null +++ b/chain/txinfo.json @@ -0,0 +1,453 @@ +{ + "deploy-callenv": { + "contract": "0x9344b07175800259691961298ca11c824e65032d", + "block": "0x1" + }, + "deploy-callme": { + "contract": "0x17e7eedce4ac02ef114a7ed9fe6e2f33feba1667", + "block": "0x1" + }, + "deploy-callrevert": { + "contract": "0x0ee3ab1371c93e7c0c281cc0c2107cdebc8b1930", + "block": "0x1" + }, + "randomcode": null, + "randomlogs": null, + "randomstorage": null, + "tx-emit-eip1559": [ + { + "txhash": "0x847f7a3261988dc4a34be85f4c28d5d534d47775792e9d25e1d9250cb2fb77eb", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x2", + "indexInBlock": 2, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xf4da19d6c17928e683661a52829cf391d3dc26d581152b81ce595a1207944f09" + }, + { + "txhash": "0x6a6460e4abc656cd9ad542f9c6fe59dfd3ce2a25e9b6247abca8ffc257b46cbe", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x5", + "indexInBlock": 1, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xd52732c4c7ae8c709d859bb3e0ffcad7cc62972d3155c6270ba3e3493c07046a" + }, + { + "txhash": "0x4f7772583939db8110f0930a2248c94c65f89c9ad4606e52927f530af55e4a98", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x8", + "indexInBlock": 0, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x881a8434f98b103a2ee48727304618ca54234f1474c44bef70c21accc4dbc0a7" + }, + { + "txhash": "0xbbede8270a12dfb1f5b4a3ef9f5a30f83ba042f37f35c6a33f3ce6dd64091ba2", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xa", + "indexInBlock": 3, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x042665eeb0d766d5f5d586872131a59639bdb3122f57882590c508846c9138c1" + }, + { + "txhash": "0xa32828cbff25ecdd619542451409c4592cbb088c3da4b7cdda47f2448828eb80", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xd", + "indexInBlock": 2, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xcabd86c6b1457417ec6ef454f265a6553e3c3760db2ace5cbf6a6de0475effca" + }, + { + "txhash": "0xf381b54bcbce83dd9ff466b9447332d4ccdd7ba1259daefd98fd5eba8a0c29c9", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x10", + "indexInBlock": 1, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xdee5e2a8d5dee05b615f9d83a47faa67f184cf8297d34d2cc3312261c8b970d7" + }, + { + "txhash": "0x7f99273934a4f7960510bbb425505ca96fc964c583d285530391837bcc8c5144", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x13", + "indexInBlock": 0, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xcad398eccd12aa694ba255d69defbf78fd51d2acec863d3ad859a64ca3bbc6b7" + } + ], + "tx-emit-eip2930": [ + { + "txhash": "0xa0762610d794acddd2dca15fb7c437ada3611c886f3bea675d53d8da8a6c41b2", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x2", + "indexInBlock": 3, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xa3d07a7d68fbd49ec2f8e6befdd86c885f86c272819f6f345f365dec35ae6707" + }, + { + "txhash": "0x547b7995f807f718eed9f1f444a9679f481893c5cde7a12074acc1dbdf45e439", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x5", + "indexInBlock": 2, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x0588df43087493fd84fa37ef37152cacefd4db3823315da90e65dd785434ff14" + }, + { + "txhash": "0xc474d9965957bf2bdd95f5af75a63819a7816a2b3149b559249ab7e81c770c6f", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x8", + "indexInBlock": 1, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xaa329948b0d0fb07bf27aa4d4a09110f0bc6de02464ada14ffc99c501c78dee9" + }, + { + "txhash": "0xd20455b5629d13a12bef88fff29805449f87ae2c01766cd4e870f576e26d5bdc", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xb", + "indexInBlock": 0, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x45e0e3b8ce4a6607eaab73f10c7150b227e36353fc55dabc862966451d93682c" + }, + { + "txhash": "0x48efff5382104b20cbefb7f5c0e39d02c8e4f86ddef3821447719ca355df6243", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xd", + "indexInBlock": 3, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xe62171ee0398c4f842bb3e3e2c36da99f4a9251dcbac6afb2683bcfd3d66a337" + }, + { + "txhash": "0x7898e591fcc0fd129219ae4b06350c6173a85ca97e4869ed0f8d62ef87840c73", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x10", + "indexInBlock": 2, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xb7d8142d0042b2cc68975e8ff2e077a47d0ff14b60d314c6527ddc7e781f6718" + }, + { + "txhash": "0x69a86c0f03360f59cb2ca84ab977b0078896b696167ad5014d3395dfd51694ae", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x13", + "indexInBlock": 1, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x40ca9fbee0c902d46ae74609fc9a942d8495d331bd4716636c34a44d2373cc74" + } + ], + "tx-emit-eip4844": [ + { + "txhash": "0xb0ebf0d8fca6724d5111d0be9ac61f0e7bf174208e0fafcb653f337c72465b83", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x3", + "indexInBlock": 0, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x462708a3c1cd03b21605715d090136df64e227f7e7792f74bb1bd7a8288f8801" + }, + { + "txhash": "0x2f428805b3bb35d3c89393bcb9bf999c9cd50132f51582a970919391a34345eb", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x5", + "indexInBlock": 3, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x54a0a17756eb92101e5a2d04fcf14e4364de07cf3b8b36bc9cab62725d08788e" + }, + { + "txhash": "0xc6edd79bf23bd84e2ac4c2994ee1fac706432668ba5c181e8efecb4075caf84a", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x8", + "indexInBlock": 2, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x0921e35d2dc9980c8ba6910f8f63ab4b0cc99b9b50423dbb4dcb3bed4939c5f5" + }, + { + "txhash": "0x51d7dd00b1fdb400114a66cf15c4a129d24d4abc31b6ee4d9ca7598adc274dc6", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xb", + "indexInBlock": 1, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xbfa747d6e89af8f9758c426da82bdec1dfe2f5142424b13fa00918e499419808" + }, + { + "txhash": "0xc5dd328a4855ad10777c80afc957a65e9acce97756fd667b9facae3c7c639837", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xe", + "indexInBlock": 0, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x412bed56e188784e4df3c612e4b91c6f0fac4895418434692cd1095d6bb82dff" + }, + { + "txhash": "0x93c4e61be57dfa9045d3a0d1682de6a935dac2e566c14b355d5e86c201e306fa", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x10", + "indexInBlock": 3, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x1f76693b644f8fc7411ace4f84517e75a88f15a84636b1c09c5a72b321d64a76" + }, + { + "txhash": "0x4cb20440c03d63be0b3e2d4c5e5364fd7ad1af60109b725982fd9aaa551d50b1", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x13", + "indexInBlock": 2, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x0cd195b06772467a81ae8f240f4e89a31d8df89304f1eae57062a8843725cc1c" + } + ], + "tx-emit-legacy": [ + { + "txhash": "0x8acb279f66e5fa56b6718166c0296dfd4bfaf7be6757d35cbbcc40367f2904ba", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x3", + "indexInBlock": 1, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xb52248fb459b43720abbf1d5218c4ede9036a623653b31c2077991e04da9a456" + }, + { + "txhash": "0xd3cdc952f843c6bf22f7b22d4cc2393cb2692a8f9353e1019d43ea29917d9712", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x6", + "indexInBlock": 0, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x34556f916cdba7f72334f11b8a4b19b21da16050346f8cf0a332ca35594f79cf" + }, + { + "txhash": "0xfcd941cf7165b61ffe11480cab12558dae365a6c78345d566c49b667c6dce33e", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x8", + "indexInBlock": 3, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xb4e96958d2d766459753583339e9fcc65273729d67c217b6a44835136e70c26b" + }, + { + "txhash": "0xdbde9e58d25f6341fbdb8a1da0d86ff00d6225fb0f1efdba6c2484b5047b0bf7", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xb", + "indexInBlock": 2, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x09d9f86815d3c33738fdcb1e2e78d8a32c9ead8e6d7992be1021673b36b31224" + }, + { + "txhash": "0x535bd570d234561de98aeb4a1f99656606ee48c6b276a7545a95b5f63840b48c", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xe", + "indexInBlock": 1, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0xd3277aabe8e6db5b865aa3c871851283442e8395000e4beb819a680f7351959d" + }, + { + "txhash": "0x7d64d00f0c3c497e1cd58782b2e205e8bb538e7401476708fc03fa270f345825", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x11", + "indexInBlock": 0, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x5d52ea6d567653dd5d8033b761206d4acc235efab149097930ab763f2db0adee" + }, + { + "txhash": "0xded1fe344b5a55bf2fbc2c7f6ab4cc26a9f251384cadb1818709951d9577210a", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x13", + "indexInBlock": 3, + "logtopic0": "0x00000000000000000000000000000000000000000000000000000000656d6974", + "logtopic1": "0x7da2e3417d225fdc7c68195dd06c5393304ab25a8a7e7dbebf7020994f2a4565" + } + ], + "tx-transfer-eip1559": [ + { + "txhash": "0x67f5b16e70007375fa4ac8d7c7a0ac14bb437f7fa8fba0bc5fbf492204023b86", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x3", + "indexInBlock": 2 + }, + { + "txhash": "0xfa86d93b76ab4f8a4a877d8a7d53637a253ead30250959026293acd04aeba2e1", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x6", + "indexInBlock": 1 + }, + { + "txhash": "0xb8856e106b5358aa0fda9d27a5e13d94a4e43df2da8fcf9758ffa27d7d3de38a", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x9", + "indexInBlock": 0 + }, + { + "txhash": "0x019ec44a437d02109c3b82807cd861eae0721f89fea526b6f59bc0897931f778", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xb", + "indexInBlock": 3 + }, + { + "txhash": "0xe98279fb2c68deea0945020468295f172578570dc4f1931ebf4b0c3085312fe8", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xe", + "indexInBlock": 2 + }, + { + "txhash": "0x35fbabc2b8bc8938e57d676e1057d301e569ea7dd5677b061853492f67055a3d", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x11", + "indexInBlock": 1 + }, + { + "txhash": "0x523c9eee4fbad0c69269e9cf5191e87328b85da67a93a2927eca72f52b839acf", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x14", + "indexInBlock": 0 + } + ], + "tx-transfer-eip2930": [ + { + "txhash": "0x4bf957b2a119b0a89daf91eb473c87b3f8eaa8efc9ff2473386a437fc6775f8b", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x3", + "indexInBlock": 3 + }, + { + "txhash": "0x43ad03f7e9116c61676c9013f593d877c210b75f4b3e00850d52029cc78f597a", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x6", + "indexInBlock": 2 + }, + { + "txhash": "0x1a6a390331ba247f861decfc99e5b5a188c1b5876f88b9750ba05507343d9d04", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x9", + "indexInBlock": 1 + }, + { + "txhash": "0x1a59fc0b9f191b75c0ce4fb15ec9ec1603cb4205c598bf6235e35e20d8bd544a", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xc", + "indexInBlock": 0 + }, + { + "txhash": "0xe45a2f510309c474ac404e24c5d61d263a5561c4542e3a41b39d16cdd44c440c", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xe", + "indexInBlock": 3 + }, + { + "txhash": "0x42f72c17c02d2438a33c41827c50e48a651fd3c252a9ea7ed2a00ce5017666f2", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x11", + "indexInBlock": 2 + }, + { + "txhash": "0x89ac54352b14d3ab8d206c9c77f7081630ce2f06c9afeef6febc6c773594bf2b", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x14", + "indexInBlock": 1 + } + ], + "tx-transfer-legacy": [ + { + "txhash": "0x3f38cdc805c02e152bfed34471a3a13a786fed436b3aec0c3eca35d23e2cdd2c", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x4", + "indexInBlock": 0 + }, + { + "txhash": "0x5a12a77957fd8c865eece0da256970f92a0492f92153a1512d46d3fded03151a", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x6", + "indexInBlock": 3 + }, + { + "txhash": "0xeddd07ae41f4b2ea85845f791fc1fe7a3058220037fe36fb94e1f3e9c6fa8cc7", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x9", + "indexInBlock": 2 + }, + { + "txhash": "0x741971bc6828fcca55777a7c12f031dd73453a06938671e6f4c47312baf2a413", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xc", + "indexInBlock": 1 + }, + { + "txhash": "0x5e46c2d4f3d4d2c5974919d5185d9013423217ad068107d1e2a810549a8d6314", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0xf", + "indexInBlock": 0 + }, + { + "txhash": "0xd096dc3f72fc3118a667d499b2ef9024d7cef9295cf801b5b9e6f9f5c10dbaa2", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x11", + "indexInBlock": 3 + }, + { + "txhash": "0xcc1e8ab47dc46bee11fe02aaa3954dc62f5eeeef4e785868f652bde0d7727486", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "block": "0x14", + "indexInBlock": 2 + } + ], + "withdrawals": { + "12": { + "withdrawals": [ + { + "index": "0x3", + "validatorIndex": "0x5", + "address": "0x16c57edf7fa9d9525378b0b81bf8a3ced0620c1c", + "amount": "0x64" + } + ] + }, + "15": { + "withdrawals": [ + { + "index": "0x4", + "validatorIndex": "0x5", + "address": "0x717f8aa2b982bee0e29f573d31df288663e1ce16", + "amount": "0x64" + } + ] + }, + "18": { + "withdrawals": [ + { + "index": "0x5", + "validatorIndex": "0x5", + "address": "0x1f5bde34b4afc686f136c7a3cb6ec376f7357759", + "amount": "0x64" + } + ] + }, + "20": { + "withdrawals": [ + { + "index": "0x6", + "validatorIndex": "0x5", + "address": "0x1f5bde34b4afc686f136c7a3cb6ec376f7357759", + "amount": "0x64" + } + ] + }, + "4": { + "withdrawals": [ + { + "index": "0x0", + "validatorIndex": "0x5", + "address": "0x654aa64f5fbefb84c270ec74211b81ca8c44a72e", + "amount": "0x64" + } + ] + }, + "7": { + "withdrawals": [ + { + "index": "0x1", + "validatorIndex": "0x5", + "address": "0x5f552da00dfb4d3749d9e62dcee3c918855a86a0", + "amount": "0x64" + } + ] + }, + "9": { + "withdrawals": [ + { + "index": "0x2", + "validatorIndex": "0x5", + "address": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "amount": "0x64" + } + ] + } + } +} \ No newline at end of file diff --git a/client.go b/client.go index d33d3ac..e32e18b 100644 --- a/client.go +++ b/client.go @@ -3,20 +3,16 @@ package main import ( "context" "crypto/rand" - "encoding/json" "fmt" - "io" "os" "os/exec" + "path/filepath" "github.com/ethereum/go-ethereum/beacon/engine" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/node" - "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" ) @@ -28,8 +24,7 @@ type Client interface { // AfterStart is called after the client has been fully started. AfterStart(ctx context.Context) error - // HttpAddr returns the address where the client is servering its - // JSON-RPC. + // HttpAddr returns the address where the client is serving JSON-RPC. HttpAddr() string // Close closes the client. @@ -41,8 +36,6 @@ type gethClient struct { cmd *exec.Cmd path string workdir string - blocks []*types.Block - genesis *core.Genesis jwt []byte } @@ -50,17 +43,11 @@ type gethClient struct { // // The client's data directory is set to a temporary location and it // initializes with the genesis and the provided blocks. -func newGethClient(ctx context.Context, path string, genesis *core.Genesis, blocks []*types.Block, verbose bool) (*gethClient, error) { +func newGethClient(ctx context.Context, geth string, chaindir string, verbose bool) (*gethClient, error) { tmp, err := os.MkdirTemp("", "rpctestgen-*") if err != nil { return nil, err } - if err := writeGenesis(fmt.Sprintf("%s/genesis.json", tmp), genesis); err != nil { - return nil, err - } - if err := writeChain(fmt.Sprintf("%s/chain.rlp", tmp), blocks); err != nil { - return nil, err - } var ( args = ctx.Value(ARGS).(*Args) @@ -70,15 +57,15 @@ func newGethClient(ctx context.Context, path string, genesis *core.Genesis, bloc ) // Run geth init. - options := []string{datadir, gcmode, loglevel, "init", fmt.Sprintf("%s/genesis.json", tmp)} - err = runCmd(ctx, path, verbose, options...) + options := []string{datadir, gcmode, loglevel, "init", filepath.Join(chaindir, "genesis.json")} + err = runCmd(ctx, geth, verbose, options...) if err != nil { return nil, err } // Run geth import. - options = []string{datadir, gcmode, loglevel, "import", fmt.Sprintf("%s/chain.rlp", tmp)} - err = runCmd(ctx, path, verbose, options...) + options = []string{datadir, gcmode, loglevel, "import", filepath.Join(chaindir, "chain.rlp")} + err = runCmd(ctx, geth, verbose, options...) if err != nil { return nil, err } @@ -89,7 +76,7 @@ func newGethClient(ctx context.Context, path string, genesis *core.Genesis, bloc return nil, err } - return &gethClient{path: path, genesis: genesis, blocks: blocks, workdir: tmp, jwt: jwt}, nil + return &gethClient{path: geth, workdir: tmp, jwt: jwt}, nil } // Start starts geth, but does not wait for the command to exit. @@ -183,55 +170,3 @@ func runCmd(ctx context.Context, path string, verbose bool, args ...string) erro } return nil } - -// writeGenesis writes the genesis to disk. -func writeGenesis(filename string, genesis *core.Genesis) error { - out, err := json.MarshalIndent(genesis, "", " ") - if err != nil { - return err - } - if err := os.WriteFile(filename, out, 0644); err != nil { - return err - } - return nil -} - -// writeChain writes a chain to disk. -func writeChain(filename string, blocks []*types.Block) error { - w, err := os.OpenFile(filename, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644) - if err != nil { - return err - } - defer w.Close() - for _, block := range blocks { - if err := rlp.Encode(w, block); err != nil { - return err - } - } - return nil -} - -// readChain reads a chain.rlp file to a slice of Block. -func readChain(filename string) ([]*types.Block, error) { - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer f.Close() - var ( - stream = rlp.NewStream(f, 0) - blocks = make([]*types.Block, 0) - i = 0 - ) - for { - var b types.Block - if err := stream.Decode(&b); err == io.EOF { - break - } else if err != nil { - return nil, fmt.Errorf("at block %d: %v", i, err) - } - blocks = append(blocks, &b) - i++ - } - return blocks, nil -} diff --git a/cmd/speccheck/check.go b/cmd/speccheck/check.go index 438cb28..586442f 100644 --- a/cmd/speccheck/check.go +++ b/cmd/speccheck/check.go @@ -37,14 +37,18 @@ func checkSpec(methods map[string]*methodSchema, rts []*roundTrip, re *regexp.Re return fmt.Errorf("missing required parameter %s.param[%d]", rt.method, i) } if err := validate(&method.params[i].schema, rt.params[i], fmt.Sprintf("%s.param[%d]", rt.method, i)); err != nil { - return fmt.Errorf("unable to validate parameter: %s", err) + return fmt.Errorf("unable to validate parameter in %s: %s", rt.name, err) } } - if err := validate(&method.result.schema, rt.response, fmt.Sprintf("%s.result", rt.method)); err != nil { + if rt.response.Result == nil && rt.response.Error != nil { + // skip validation of errors, they haven't been standardized + continue + } + if err := validate(&method.result.schema, rt.response.Result, fmt.Sprintf("%s.result", rt.method)); err != nil { // Print out the value and schema if there is an error to further debug. buf, _ := json.Marshal(method.result.schema) fmt.Println(string(buf)) - fmt.Println(string(rt.response)) + fmt.Println(string(rt.response.Result)) fmt.Println() return fmt.Errorf("invalid result %s\n%#v", rt.name, err) } diff --git a/cmd/speccheck/roundtrips.go b/cmd/speccheck/roundtrips.go index 57f1d39..eb7b473 100644 --- a/cmd/speccheck/roundtrips.go +++ b/cmd/speccheck/roundtrips.go @@ -30,7 +30,7 @@ type roundTrip struct { method string name string params [][]byte - response []byte + response *jsonrpcMessage } // readRtts walks a root directory and parses round trip HTTP exchanges @@ -99,7 +99,7 @@ func readTest(testname string, filename string) ([]*roundTrip, error) { if err != nil { return nil, fmt.Errorf("unable to parse params: %s %v", err, req.Params) } - rts = append(rts, &roundTrip{req.Method, testname, params, resp.Result}) + rts = append(rts, &roundTrip{req.Method, testname, params, &resp}) req = nil default: return nil, fmt.Errorf("invalid line in test: %s", line) diff --git a/ethclient.go b/ethclient.go index 1cf6f71..c9e6edb 100644 --- a/ethclient.go +++ b/ethclient.go @@ -8,17 +8,13 @@ import ( "net/http" "os" - "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/ethclient/gethclient" "github.com/ethereum/go-ethereum/rpc" ) type ethclientHandler struct { - ethclient *ethclient.Client - gethclient *gethclient.Client - rpc *rpc.Client - logFile *os.File - transport *loggingRoundTrip + rpc *rpc.Client + logFile *os.File + transport *loggingRoundTrip } func newEthclientHandler(addr string) (*ethclientHandler, error) { @@ -32,11 +28,10 @@ func newEthclientHandler(addr string) (*ethclientHandler, error) { return nil, err } return ðclientHandler{ - ethclient.NewClient(rpcClient), - gethclient.New(rpcClient), - rpcClient, - nil, - rt}, nil + rpc: rpcClient, + logFile: nil, + transport: rt, + }, nil } func (l *ethclientHandler) RotateLog(filename string) error { diff --git a/generate.go b/generate.go index bc5a321..14fdd70 100644 --- a/generate.go +++ b/generate.go @@ -2,21 +2,15 @@ package main import ( "context" - "encoding/json" "errors" "fmt" "os" + "path/filepath" "time" - "github.com/ethereum/go-ethereum/consensus/beacon" - "github.com/ethereum/go-ethereum/consensus/ethash" - "github.com/ethereum/go-ethereum/core" - "github.com/ethereum/go-ethereum/core/rawdb" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/core/vm" + "github.com/cespare/cp" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/trie" "github.com/lightclient/rpctestgen/testgen" ) @@ -26,13 +20,16 @@ func runGenerator(ctx context.Context) error { args := ctx.Value(ARGS).(*Args) // Initialize generated chain. - chain, err := initChain(ctx, args) + chain, err := testgen.NewChain(args.ChainDir) if err != nil { return err } + if err := copyChainFiles(args.ChainDir, args.OutDir); err != nil { + return err + } // Start Ethereum client. - client, err := spawnClient(ctx, args, chain) + client, err := spawnClient(ctx, args) if err != nil { return err } @@ -47,6 +44,7 @@ func runGenerator(ctx context.Context) error { // outputDir/methodName/testName.io fmt.Println("filling tests...") tests := testgen.AllMethods + fails := 0 for _, methodTest := range tests { // Skip tests that don't match regexp. if !args.tests.MatchString(methodTest.Name) { @@ -75,83 +73,29 @@ func runGenerator(ctx context.Context) error { ctx, cancel := context.WithTimeout(ctx, 3*time.Second) defer cancel() - err = test.Run(ctx, testgen.NewT(handler.ethclient, handler.gethclient, handler.rpc, chain.bc)) + err = test.Run(ctx, testgen.NewT(handler.rpc, chain)) if err != nil { fmt.Println(" fail.") fmt.Fprintf(os.Stderr, "failed to fill %s/%s: %s\n", methodTest.Name, test.Name, err) + fails++ continue } fmt.Println(" done.") handler.Close() } } - return nil -} - -type chainData struct { - bc *core.BlockChain - gspec *core.Genesis - blocks []*types.Block - // bad *types.Block -} - -// initChain either attempts to read the chain config from args.ChainDir or it -// generates a fresh test chain. -func initChain(ctx context.Context, args *Args) (*chainData, error) { - var chain chainData - if args.ChainDir != "" { - chain.gspec = &core.Genesis{} - if g, err := os.ReadFile(fmt.Sprintf("%s/genesis.json", args.ChainDir)); err != nil { - return nil, err - } else if err := json.Unmarshal(g, chain.gspec); err != nil { - return nil, err - } - b, err := readChain(fmt.Sprintf("%s/chain.rlp", args.ChainDir)) - if err != nil { - return nil, err - } - chain.blocks = b - } else { - // Make consensus engine. - engine := beacon.NewFaker() - - // Generate test chain and write to output directory. - var bad *types.Block - chain.gspec, chain.blocks, bad = genSimpleChain(engine) - if err := mkdir(args.OutDir); err != nil { - return nil, err - } - if err := writeGenesis(fmt.Sprintf("%s/genesis.json", args.OutDir), chain.gspec); err != nil { - return nil, err - } - if err := writeChain(fmt.Sprintf("%s/chain.rlp", args.OutDir), chain.blocks); err != nil { - return nil, err - } - if err := writeChain(fmt.Sprintf("%s/bad.rlp", args.OutDir), []*types.Block{bad}); err != nil { - return nil, err - } - } - - // Create BlockChain to verify client responses against. - db := rawdb.NewMemoryDatabase() - chain.gspec.MustCommit(db, trie.NewDatabase(db, trie.HashDefaults)) - var err error - chain.bc, err = core.NewBlockChain(db, nil, chain.gspec, nil, beacon.New(ethash.NewFaker()), vm.Config{}, nil, nil) - if err != nil { - return nil, err + if fails > 0 { + return fmt.Errorf("%d tests failed to fill", fails) } - if _, err := chain.bc.InsertChain(chain.blocks); err != nil { - return nil, err - } - return &chain, nil + return nil } // spawnClient starts an Ethereum client on a separate thread. // // It waits until the client is responding to JSON-RPC requests // before returning. -func spawnClient(ctx context.Context, args *Args, chain *chainData) (Client, error) { +func spawnClient(ctx context.Context, args *Args) (Client, error) { var ( client Client err error @@ -160,7 +104,7 @@ func spawnClient(ctx context.Context, args *Args, chain *chainData) (Client, err // Initialize specified client and start it in a separate thread. switch args.ClientType { case "geth": - client, err = newGethClient(ctx, args.ClientBin, chain.gspec, chain.blocks, args.Verbose) + client, err = newGethClient(ctx, args.ClientBin, args.ChainDir, args.Verbose) if err != nil { return nil, err } @@ -191,6 +135,24 @@ func mkdir(path string) error { return nil } +func copyChainFiles(chainDir, outDir string) error { + err := os.MkdirAll(outDir, 0755) + if err != nil { + return err + } + fmt.Println("copying genesis.json") + err = cp.CopyFileOverwrite(filepath.Join(outDir, "genesis.json"), filepath.Join(chainDir, "genesis.json")) + if err != nil { + return err + } + fmt.Println("copying chain.rlp") + err = cp.CopyFileOverwrite(filepath.Join(outDir, "chain.rlp"), filepath.Join(chainDir, "chain.rlp")) + if err != nil { + return err + } + return nil +} + // tryConnection checks if a client's JSON-RPC API is accepting requests. func tryConnection(ctx context.Context, addr string, waitTime time.Duration) error { c, err := rpc.DialOptions(ctx, addr) diff --git a/gethdependency.go b/gethdependency.go new file mode 100644 index 0000000..17b6d88 --- /dev/null +++ b/gethdependency.go @@ -0,0 +1,8 @@ +//go:build tools +// +build tools + +package main + +// This adds a dependency on the geth command so that we can build it with go build +// within the rpctestgen module. +import _ "github.com/ethereum/go-ethereum/cmd/geth" diff --git a/go.mod b/go.mod index 87820d8..a3c3d79 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( github.com/alexflint/go-arg v1.4.3 - github.com/ethereum/go-ethereum v1.13.1 + github.com/ethereum/go-ethereum v1.13.8 github.com/open-rpc/meta-schema v0.0.0-20210416041958-626a15d0a618 github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 ) @@ -13,72 +13,103 @@ require ( github.com/DataDog/zstd v1.5.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/VictoriaMetrics/fastcache v1.6.0 // indirect + github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/alexflint/go-scalar v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.5.0 // indirect + github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect + github.com/cespare/cp v1.1.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.9.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06 // indirect + github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect github.com/cockroachdb/redact v1.1.3 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.10.0 // indirect + github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect + github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 // indirect + github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.1.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect - github.com/ethereum/c-kzg-4844 v0.3.1 // indirect + github.com/deepmap/oapi-codegen v1.6.0 // indirect + github.com/dlclark/regexp2 v1.7.0 // indirect + github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 // indirect + github.com/ethereum/c-kzg-4844 v0.4.0 // indirect + github.com/fatih/color v1.13.0 // indirect github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect + github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/getsentry/sentry-go v0.18.0 // indirect github.com/go-ole/go-ole v1.2.5 // indirect - github.com/go-stack/stack v1.8.1 // indirect + github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.3.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect + github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/hashicorp/go-bexpr v0.1.10 // indirect + github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.3 // indirect + github.com/holiman/uint256 v1.2.4 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect + github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect + github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 // indirect + github.com/karalabe/usb v0.0.2 // indirect github.com/klauspost/compress v1.15.15 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-runewidth v0.0.9 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/naoina/go-stringutil v0.1.0 // indirect + github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/opentracing/opentracing-go v1.1.0 // indirect + github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.39.0 // indirect github.com/prometheus/procfs v0.9.0 // indirect + github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/rs/cors v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/status-im/keycard-go v0.2.0 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/urfave/cli/v2 v2.25.7 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - golang.org/x/crypto v0.12.0 // indirect - golang.org/x/exp v0.0.0-20230810033253-352e893a4cad // indirect - golang.org/x/mod v0.11.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect - golang.org/x/tools v0.9.1 // indirect + go.uber.org/automaxprocs v1.5.2 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.17.0 // indirect google.golang.org/protobuf v1.28.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/go.sum b/go.sum index 33effa2..0ad22eb 100644 --- a/go.sum +++ b/go.sum @@ -12,8 +12,8 @@ github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5 github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= +github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/alexflint/go-arg v1.4.3 h1:9rwwEBpMXfKQKceuZfYcwuc/7YY7tWJbFsgG5cAU/uo= github.com/alexflint/go-arg v1.4.3/go.mod h1:3PZ/wp/8HuqRZMUUgu7I+e1qcpUbvmS258mRXkFH4IA= @@ -25,42 +25,52 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.5.0 h1:NpE8frKRLGHIcEzkR+gZhiioW1+WbYV6fKwD6ZIpQT8= -github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= +github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k= github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v1.1.1 h1:nCb6ZLdB7NRaqsm91JtQTAme2SKJzXVsdPIPkyJr1MU= +github.com/cespare/cp v1.1.1/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/datadriven v1.0.3-0.20230801171734-e384cf455877 h1:1MLK4YpFtIEo3ZtMA5C795Wtv5VuUnrXX7mQG+aHg6o= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06 h1:T+Np/xtzIjYM/P5NAw0e2Rf1FGvzDau1h54MKvx8G7w= -github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06/go.mod h1:bynZ3gvVyhlvjLI7PT6dmZ7g76xzJ7HpxfjgkzCGz6s= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= +github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.10.0 h1:zRh22SR7o4K35SoNqouS9J/TKHTyU2QWaj5ldehyXtA= -github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= +github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-kzg-4844 v0.3.0 h1:UBlWE0CgyFqqzTI+IFyCzA7A3Zw4iip6uzRv5NIXG0A= -github.com/crate-crypto/go-kzg-4844 v0.3.0/go.mod h1:SBP7ikXEgDnUPONgm33HtuDZEDtWa3L4QtN1ocJSEQ4= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233 h1:d28BXYi+wUpz1KBmiF9bWrjEMacUEREV6MBi2ODnrfQ= +github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233/go.mod h1:geZJZH3SzKCqnz5VT0q/DyIG/tvu/dZk+VIfXicupJs= +github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= +github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -70,8 +80,19 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= +github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= +github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 h1:qwcF+vdFrvPSEUDSX5RVoRccG8a5DhOdWdQ4zN62zzo= +github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= +github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -79,32 +100,43 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/c-kzg-4844 v0.3.1 h1:sR65+68+WdnMKxseNWxSJuAv2tsUrihTpVBTfM/U5Zg= -github.com/ethereum/c-kzg-4844 v0.3.1/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.13.1 h1:UF2FaUKPIy5jeZk3X06ait3y2Q4wI+vJ1l7+UARp+60= -github.com/ethereum/go-ethereum v1.13.1/go.mod h1:xHQKzwkHSl0gnSjZK1mWa06XEdm9685AHqhRknOzqGQ= +github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= +github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= +github.com/ethereum/go-ethereum v1.13.8 h1:1od+thJel3tM52ZUNQwvpYOeRHlbkVFZ5S8fhi0Lgsg= +github.com/ethereum/go-ethereum v1.13.8/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= +github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= @@ -117,8 +149,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -133,12 +165,13 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -149,28 +182,43 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7 h1:3JQNjnMRil1yD0IfZKHF9GxxWKDJGj8I0IqOUol//sw= +github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= +github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= +github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= +github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= @@ -178,10 +226,14 @@ github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0Gqw github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267 h1:TMtDYDHKYY15rFihtRfck/bfFqNfvcabqvXAFQfAUpY= +github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/karalabe/usb v0.0.2 h1:M6QQBNxF+CQ8OFvxrT90BA0qBOXymndZnk5q235mFc4= +github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= @@ -195,6 +247,7 @@ github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7y github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= @@ -203,12 +256,18 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= @@ -217,10 +276,13 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= @@ -240,6 +302,10 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416 h1:shk/vn9oCoOTmwcouEdwIeOtOGA/ELRUw/GwvxwfT+0= +github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= @@ -258,7 +324,11 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/open-rpc/meta-schema v0.0.0-20210416041958-626a15d0a618 h1:EoH8oqYGi6BElF3PnUr65GoPVTtaDlnYkrVZct1Q/Sg= github.com/open-rpc/meta-schema v0.0.0-20210416041958-626a15d0a618/go.mod h1:Ag6rSXkHIckQmjFBCweJEEt1mrTPBv8b9W4aU/NQWfI= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= @@ -267,6 +337,7 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -276,6 +347,8 @@ github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8u github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= @@ -302,13 +375,14 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= @@ -318,6 +392,7 @@ github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0h github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= 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/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -343,19 +418,28 @@ github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME= +go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= +golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -364,8 +448,9 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -381,11 +466,17 @@ golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -395,8 +486,11 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -408,15 +502,17 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -426,21 +522,34 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -450,12 +559,16 @@ golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -491,6 +604,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= @@ -505,6 +619,7 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/mkchain.sh b/mkchain.sh new file mode 100644 index 0000000..c8038e4 --- /dev/null +++ b/mkchain.sh @@ -0,0 +1,9 @@ +mkdir -p chain/ +~/bin/hivechain generate \ + -outdir chain/ \ + -length 20 \ + -tx-count 4 \ + -tx-interval 1 \ + -fork-interval 0 \ + -lastfork cancun \ + -outputs genesis,chain,forkenv,headstate,txinfo,accounts diff --git a/testgen/chain.go b/testgen/chain.go new file mode 100644 index 0000000..29298d5 --- /dev/null +++ b/testgen/chain.go @@ -0,0 +1,309 @@ +package testgen + +import ( + "bytes" + "compress/gzip" + "crypto/ecdsa" + "encoding/json" + "fmt" + "io" + "math/big" + "os" + "path" + "sort" + "strings" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/rlp" +) + +// Chain is a lightweight blockchain-like store, based on hivechain output files. +// This mostly exists to provide some convenient accessors for the chain. +type Chain struct { + genesis core.Genesis + blocks []*types.Block + state map[common.Address]state.DumpAccount // state of head block + senders map[common.Address]*senderInfo + txinfo *ChainTxInfo + config *params.ChainConfig +} + +// ChainTxInfo is the structure of txinfo.json from hivechain. +type ChainTxInfo struct { + LegacyTransfers []TxInfo `json:"tx-transfer-legacy"` + AccessListTransfers []TxInfo `json:"tx-transfer-eip2930"` + DynamicFeeTransfers []TxInfo `json:"tx-transfer-eip1559"` + LegacyEmit []TxInfo `json:"tx-emit-legacy"` + AccessListEmit []TxInfo `json:"tx-emit-eip2930"` + DynamicFeeEmit []TxInfo `json:"tx-emit-eip1559"` + CallMeContract *ContractInfo `json:"deploy-callme"` + CallEnvContract *ContractInfo `json:"deploy-callenv"` + CallRevertContract *ContractInfo `json:"deploy-callrevert"` +} + +// TxInfo is a transaction record created by hivechain. +type TxInfo struct { + TxHash common.Hash `json:"txhash"` + Sender common.Address `json:"sender"` + Block hexutil.Uint64 `json:"block"` + Index int `json:"indexInBlock"` + // for emit contract txs + LogTopic0 *common.Hash `json:"logtopic0"` + LogTopic1 *common.Hash `json:"logtopic1"` +} + +// ContactInfo is a contract deployment record created by hivechain. +type ContractInfo struct { + Addr common.Address `json:"contract"` + Block hexutil.Uint64 `json:"block"` +} + +// NewChain takes the given chain.rlp file, decodes it, and returns +// the blocks from the file. +func NewChain(dir string) (*Chain, error) { + gen, err := loadGenesis(path.Join(dir, "genesis.json")) + if err != nil { + return nil, err + } + gblock := gen.ToBlock() + + blocks, err := blocksFromFile(path.Join(dir, "chain.rlp"), gblock) + if err != nil { + return nil, err + } + state, err := readState(path.Join(dir, "headstate.json")) + if err != nil { + return nil, err + } + accounts, err := readAccounts(path.Join(dir, "accounts.json")) + if err != nil { + return nil, err + } + txinfo, err := readTxInfo(path.Join(dir, "txinfo.json")) + if err != nil { + return nil, err + } + return &Chain{ + genesis: gen, + blocks: blocks, + state: state, + senders: accounts, + txinfo: txinfo, + config: gen.Config, + }, nil +} + +// senderInfo is an account record as output in the "accounts.json" file from +// hivechain. +type senderInfo struct { + Key *ecdsa.PrivateKey `json:"key"` + Nonce uint64 `json:"nonce"` +} + +// Head returns the chain head. +func (c *Chain) Head() *types.Block { + return c.blocks[len(c.blocks)-1] +} + +func (c *Chain) Config() *params.ChainConfig { + return c.genesis.Config +} + +// GetBlock returns the block at the specified number. +func (c *Chain) GetBlock(number int) *types.Block { + return c.blocks[number] +} + +// BlockWithTransactions returns a block that has a matching transaction. +func (c *Chain) BlockWithTransactions(matchdesc string, match func(int, *types.Transaction) bool) *types.Block { + for _, b := range c.blocks { + for i, tx := range b.Transactions() { + if match == nil || match(i, tx) { + return b + } + } + } + panic(fmt.Sprintf("no block with matching transactions (%s) in chain", matchdesc)) +} + +// FindTransaction returns a matching transaction. +func (c *Chain) FindTransaction(matchdesc string, match func(int, *types.Transaction) bool) (m *types.Transaction) { + c.BlockWithTransactions(matchdesc, func(i int, tx *types.Transaction) bool { + if match == nil || match(i, tx) { + m = tx + return true + } + return false + }) + return m +} + +// GetSender returns the address associated with account at the index in the +// pre-funded accounts list. +func (c *Chain) GetSender(idx int) (common.Address, uint64) { + var accounts Addresses + for addr := range c.senders { + accounts = append(accounts, addr) + } + sort.Sort(accounts) + addr := accounts[idx] + return addr, c.senders[addr].Nonce +} + +// IncNonce increases the specified signing account's pending nonce. +func (c *Chain) IncNonce(addr common.Address, amt uint64) { + if _, ok := c.senders[addr]; !ok { + panic("nonce increment for non-signer") + } + c.senders[addr].Nonce += amt +} + +// Balance returns the balance of an account at the head of the chain. +func (c *Chain) Balance(addr common.Address) *big.Int { + bal := new(big.Int) + if acc, ok := c.state[addr]; ok { + bal, _ = bal.SetString(acc.Balance, 10) + } + return bal +} + +// Balance returns the balance of an account at the head of the chain. +func (c *Chain) Storage(addr common.Address, slot common.Hash) []byte { + v, ok := c.state[addr].Storage[slot] + if ok { + return common.LeftPadBytes(hexutil.MustDecode("0x"+v), 32) + } + return nil +} + +// SignTx signs a transaction for the specified from account, so long as that +// account was in the hivechain accounts dump. +func (c *Chain) MustSignTx(from common.Address, txdata types.TxData) *types.Transaction { + signer := types.LatestSigner(c.config) + acc, ok := c.senders[from] + if !ok { + panic(fmt.Errorf("account not available for signing: %s", from)) + } + return types.MustSignNewTx(acc.Key, signer, txdata) +} + +func loadGenesis(genesisFile string) (core.Genesis, error) { + chainConfig, err := os.ReadFile(genesisFile) + if err != nil { + return core.Genesis{}, err + } + var gen core.Genesis + if err := json.Unmarshal(chainConfig, &gen); err != nil { + return core.Genesis{}, err + } + return gen, nil +} + +type Addresses []common.Address + +func (a Addresses) Len() int { + return len(a) +} + +func (a Addresses) Less(i, j int) bool { + return bytes.Compare(a[i][:], a[j][:]) < 0 +} + +func (a Addresses) Swap(i, j int) { + tmp := a[i] + a[i] = a[j] + a[j] = tmp +} + +func blocksFromFile(chainfile string, gblock *types.Block) ([]*types.Block, error) { + // Load chain.rlp. + fh, err := os.Open(chainfile) + if err != nil { + return nil, err + } + defer fh.Close() + var reader io.Reader = fh + if strings.HasSuffix(chainfile, ".gz") { + if reader, err = gzip.NewReader(reader); err != nil { + return nil, err + } + } + stream := rlp.NewStream(reader, 0) + var blocks = make([]*types.Block, 1) + blocks[0] = gblock + for i := 0; ; i++ { + var b types.Block + if err := stream.Decode(&b); err == io.EOF { + break + } else if err != nil { + return nil, fmt.Errorf("at block index %d: %v", i, err) + } + if b.NumberU64() != uint64(i+1) { + return nil, fmt.Errorf("block at index %d has wrong number %d", i, b.NumberU64()) + } + blocks = append(blocks, &b) + } + return blocks, nil +} + +func readState(file string) (map[common.Address]state.DumpAccount, error) { + f, err := os.ReadFile(file) + if err != nil { + return nil, fmt.Errorf("unable to read state: %v", err) + } + var dump state.Dump + if err := json.Unmarshal(f, &dump); err != nil { + return nil, fmt.Errorf("unable to unmarshal state: %v", err) + } + + state := make(map[common.Address]state.DumpAccount) + for key, acct := range dump.Accounts { + var addr common.Address + if err := addr.UnmarshalText([]byte(key)); err != nil { + return nil, fmt.Errorf("invalid address %q", key) + } + state[addr] = acct + } + return state, nil +} + +func readAccounts(file string) (map[common.Address]*senderInfo, error) { + f, err := os.ReadFile(file) + if err != nil { + return nil, fmt.Errorf("unable to read accounts: %v", err) + } + type account struct { + Key hexutil.Bytes `json:"key"` + } + keys := make(map[common.Address]account) + if err := json.Unmarshal(f, &keys); err != nil { + return nil, fmt.Errorf("unable to unmarshal accounts: %v", err) + } + accounts := make(map[common.Address]*senderInfo) + for addr, acc := range keys { + pk, err := crypto.HexToECDSA(common.Bytes2Hex(acc.Key)) + if err != nil { + return nil, fmt.Errorf("unable to read private key for %s: %v", err, addr) + } + accounts[addr] = &senderInfo{Key: pk, Nonce: 0} + } + return accounts, nil +} + +func readTxInfo(file string) (*ChainTxInfo, error) { + f, err := os.ReadFile(file) + if err != nil { + return nil, fmt.Errorf("unable to read txinfo: %v", err) + } + var txinfo ChainTxInfo + if err := json.Unmarshal(f, &txinfo); err != nil { + return nil, err + } + return &txinfo, nil +} diff --git a/testgen/generators.go b/testgen/generators.go index a450b5b..4f8d06c 100644 --- a/testgen/generators.go +++ b/testgen/generators.go @@ -3,46 +3,42 @@ package testgen import ( "bytes" "context" - "crypto/ecdsa" "errors" "fmt" "math/big" "reflect" + "slices" "strings" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/ethclient/gethclient" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" + "github.com/holiman/uint256" + "golang.org/x/exp/maps" ) var ( - addr common.Address - pk *ecdsa.PrivateKey - - contract = common.HexToAddress("0000000000000000000000000000000000031ec7") + emitContract = common.HexToAddress("0x7dcd17433742f4c0ca53122ab541d0ba67fc27df") + nonAccount = common.HexToAddress("0xc1cadaffffffffffffffffffffffffffffffffff") ) -func init() { - pk, _ = crypto.HexToECDSA("9c647b8b7c4e7c3490668fb6c11473619db80c93704c70893d3813af4090c39c") - addr = crypto.PubkeyToAddress(pk.PublicKey) // 658bdf435d810c91414ec09147daa6db62406379 -} - type T struct { eth *ethclient.Client geth *gethclient.Client rpc *rpc.Client - chain *core.BlockChain + chain *Chain } -func NewT(eth *ethclient.Client, geth *gethclient.Client, rpc *rpc.Client, chain *core.BlockChain) *T { - return &T{eth, geth, rpc, chain} +func NewT(client *rpc.Client, chain *Chain) *T { + eth := ethclient.NewClient(client) + geth := gethclient.New(client) + return &T{eth, geth, client, chain} } // MethodTests is a collection of tests for a certain JSON-RPC method. @@ -64,8 +60,6 @@ var AllMethods = []MethodTests{ EthBlockNumber, EthGetBlockByNumber, EthGetBlockByHash, - // EthGetHeaderByNumber, - // EthGetHeaderByHash, EthGetProof, EthChainID, EthGetBalance, @@ -83,15 +77,24 @@ var AllMethods = []MethodTests{ EthGetTransactionReceipt, EthGetBlockReceipts, EthSendRawTransaction, - EthGasPrice, - EthMaxPriorityFeePerGas, EthSyncing, EthFeeHistory, - // EthGetUncleByBlockNumberAndIndex, + EthGetLogs, DebugGetRawHeader, DebugGetRawBlock, DebugGetRawReceipts, DebugGetRawTransaction, + + // -- header requests are not in the spec yet + // EthGetHeaderByNumber, + // EthGetHeaderByHash, + + // -- gas price tests are disabled because of non-determinism + // EthGasPrice, + // EthMaxPriorityFeePerGas, + + // -- uncle APIs are not required anymore after the merge + // EthGetUncleByBlockNumberAndIndex, } // EthBlockNumber stores a list of all tests against the method. @@ -105,7 +108,7 @@ var EthBlockNumber = MethodTests{ got, err := t.eth.BlockNumber(ctx) if err != nil { return err - } else if want := t.chain.CurrentHeader().Number.Uint64(); got != want { + } else if want := t.chain.Head().NumberU64(); got != want { return fmt.Errorf("unexpect current block number (got: %d, want: %d)", got, want) } return nil @@ -142,13 +145,13 @@ var EthGetHeaderByNumber = MethodTests{ "get-header-by-number", "gets a header by number", func(ctx context.Context, t *T) error { - var got *types.Header - err := t.rpc.CallContext(ctx, got, "eth_getHeaderByNumber", "0x1") + var got types.Header + err := t.rpc.CallContext(ctx, &got, "eth_getHeaderByNumber", "0x1") if err != nil { return err } - want := t.chain.GetHeaderByNumber(1) - if reflect.DeepEqual(got, want) { + want := t.chain.GetBlock(1) + if reflect.DeepEqual(got, want.Header()) { return fmt.Errorf("unexpected header (got: %s, want: %s)", got.Hash(), want.Hash()) } return nil @@ -165,9 +168,9 @@ var EthGetHeaderByHash = MethodTests{ "get-header-by-hash", "gets a header by hash", func(ctx context.Context, t *T) error { - want := t.chain.GetHeaderByNumber(1) - var got *types.Header - err := t.rpc.CallContext(ctx, got, "eth_getHeaderByHash", want.Hash()) + want := t.chain.GetBlock(1).Header() + var got types.Header + err := t.rpc.CallContext(ctx, &got, "eth_getHeaderByHash", want.Hash()) if err != nil { return err } @@ -186,44 +189,100 @@ var EthGetCode = MethodTests{ []Test{ { "get-code", - "gets code for 0xaa", + "requests code of an existing contract", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} var got hexutil.Bytes - err := t.rpc.CallContext(ctx, &got, "eth_getCode", addr, "latest") + err := t.rpc.CallContext(ctx, &got, "eth_getCode", emitContract, "latest") if err != nil { return err } - state, _ := t.chain.State() - want := state.GetCode(addr) + want := t.chain.state[emitContract].Code if !bytes.Equal(got, want) { return fmt.Errorf("unexpected code (got: %s, want %s)", got, want) } return nil }, }, + { + "get-code-unknown-account", + "requests code of a non-existent account", + func(ctx context.Context, t *T) error { + var got hexutil.Bytes + err := t.rpc.CallContext(ctx, &got, "eth_getCode", nonAccount, "latest") + if err != nil { + return err + } + if len(got) > 0 { + return fmt.Errorf("account %v has non-empty code", nonAccount) + } + return nil + }, + }, }, } // EthGetStorage stores a list of all tests against the method. var EthGetStorage = MethodTests{ - "eth_getStorage", + "eth_getStorageAt", []Test{ { "get-storage", - "gets storage for 0xaa", + "gets storage of a contract", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} - key := common.Hash{0x01} + addr := emitContract + key := common.Hash{} got, err := t.eth.StorageAt(ctx, addr, key, nil) if err != nil { return err } - state, _ := t.chain.State() - want := state.GetState(addr, key) - if !bytes.Equal(got, want.Bytes()) { + want := t.chain.Storage(addr, key) + if !bytes.Equal(got, want) { return fmt.Errorf("unexpected storage value (got: %s, want %s)", got, want) } + // Check for any non-zero byte in the value. + // If it's all-zero, the slot doesn't really exist, indicating a problem with the test itself. + nz := slices.ContainsFunc(got, func(b byte) bool { return b != 0 }) + if !nz { + return fmt.Errorf("requested storage slot is zero") + } + return nil + }, + }, + { + "get-storage-unknown-account", + "gets storage of a non-existent account", + func(ctx context.Context, t *T) error { + key := common.Hash{1} + got, err := t.eth.StorageAt(ctx, nonAccount, key, nil) + if err != nil { + return err + } + nz := slices.ContainsFunc(got, func(b byte) bool { return b != 0 }) + if nz { + return fmt.Errorf("storage is non-empty") + } + return nil + }, + }, + { + "get-storage-invalid-key-too-large", + "requests an invalid storage key", + func(ctx context.Context, t *T) error { + err := t.rpc.CallContext(ctx, nil, "eth_getStorageAt", "0xaa00000000000000000000000000000000000000", "0x00000000000000000000000000000000000000000000000000000000000000000", "latest") + if err == nil { + return fmt.Errorf("expected error") + } + return nil + }, + }, + { + "get-storage-invalid-key", + "requests an invalid storage key", + func(ctx context.Context, t *T) error { + err := t.rpc.CallContext(ctx, nil, "eth_getStorageAt", "0xaa00000000000000000000000000000000000000", "0xasdf", "latest") + if err == nil { + return fmt.Errorf("expected error") + } return nil }, }, @@ -238,7 +297,7 @@ var EthGetBlockByHash = MethodTests{ "get-block-by-hash", "gets block 1", func(ctx context.Context, t *T) error { - want := t.chain.GetHeaderByNumber(1) + want := t.chain.GetBlock(1).Header() got, err := t.eth.BlockByHash(ctx, want.Hash()) if err != nil { return err @@ -280,37 +339,50 @@ var EthGetBalance = MethodTests{ []Test{ { "get-balance", - "retrieves the an account's balance", + "retrieves the an account balance", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} + addr := emitContract got, err := t.eth.BalanceAt(ctx, addr, nil) if err != nil { return err } - state, _ := t.chain.State() - want := state.GetBalance(addr) - if got.Uint64() != want.Uint64() { + want := t.chain.Balance(addr) + if got.Cmp(want) != 0 { return fmt.Errorf("unexpect balance (got: %d, want: %d)", got, want) } return nil }, }, + { + "get-balance-unknown-account", + "requests the balance of a non-existent account", + func(ctx context.Context, t *T) error { + got, err := t.eth.BalanceAt(ctx, nonAccount, nil) + if err != nil { + return err + } + if got.Sign() > 0 { + return fmt.Errorf("account %v has non-zero balance", nonAccount) + } + return nil + }, + }, { "get-balance-blockhash", "retrieves the an account's balance at a specific blockhash", func(ctx context.Context, t *T) error { var ( - block = t.chain.GetBlockByNumber(1) - addr = common.Address{0xaa} + block = t.chain.GetBlock(int(t.chain.Head().NumberU64()) - 10) + addr = emitContract got hexutil.Big ) if err := t.rpc.CallContext(ctx, &got, "eth_getBalance", addr, block.Hash()); err != nil { return err } - state, _ := t.chain.StateAt(block.Root()) - want := state.GetBalance(addr) - if got.ToInt().Uint64() != want.Uint64() { - return fmt.Errorf("unexpect balance (got: %d, want: %d)", got.ToInt(), want) + // We can't really check the result here because there is no state, but the + // balance shouldn't be zero. + if got.ToInt().Sign() <= 0 { + return errors.New("invalid historical balance, should be > zero") } return nil }, @@ -326,7 +398,7 @@ var EthGetBlockByNumber = MethodTests{ "get-genesis", "gets block 0", func(ctx context.Context, t *T) error { - block, err := t.eth.BlockByNumber(ctx, common.Big0) + block, err := t.eth.BlockByNumber(ctx, big.NewInt(0)) if err != nil { return err } @@ -344,8 +416,9 @@ var EthGetBlockByNumber = MethodTests{ if err != nil { return err } - if n := block.Number().Uint64(); n != 9 { - return fmt.Errorf("expected block 9, got block %d", n) + head := t.chain.Head().NumberU64() + if n := block.Number().Uint64(); n != head { + return fmt.Errorf("expected block %d, got block %d", head, n) } return nil }, @@ -358,8 +431,9 @@ var EthGetBlockByNumber = MethodTests{ if err != nil { return err } - if n := block.Number().Uint64(); n != 9 { - return fmt.Errorf("expected block 9, got block %d", n) + head := t.chain.Head().NumberU64() + if n := block.Number().Uint64(); n != head { + return fmt.Errorf("expected block %d, got block %d", head, n) } return nil }, @@ -372,8 +446,9 @@ var EthGetBlockByNumber = MethodTests{ if err != nil { return err } - if n := block.Number().Uint64(); n != 9 { - return fmt.Errorf("expected block 9, got block %d", n) + head := t.chain.Head().NumberU64() + if n := block.Number().Uint64(); n != head { + return fmt.Errorf("expected block %d, got block %d", head, n) } return nil }, @@ -382,7 +457,7 @@ var EthGetBlockByNumber = MethodTests{ "get-block-n", "gets block 2", func(ctx context.Context, t *T) error { - block, err := t.eth.BlockByNumber(ctx, common.Big2) + block, err := t.eth.BlockByNumber(ctx, big.NewInt(2)) if err != nil { return err } @@ -411,33 +486,107 @@ var EthCall = MethodTests{ "eth_call", []Test{ { - "call-simple-transfer", - "simulates a simple transfer", + "call-contract", + "performs a basic contract call with default settings", func(ctx context.Context, t *T) error { - msg := ethereum.CallMsg{From: common.Address{0xaa}, To: &common.Address{0x01}, Gas: 100000} - got, err := t.eth.CallContract(ctx, msg, nil) + msg := ethereum.CallMsg{ + To: &t.chain.txinfo.CallMeContract.Addr, + // This is the expected input that makes the call pass. + // See https://github.com/ethereum/hive/blob/master/cmd/hivechain/contracts/callme.eas + Data: []byte{0xff, 0x01}, + } + result, err := t.eth.CallContract(ctx, msg, nil) if err != nil { return err } - if len(got) != 0 { - return fmt.Errorf("unexpected return value (got: %s, want: nil)", hexutil.Bytes(got)) + want := []byte{0xff, 0xee} + if !bytes.Equal(result, want) { + return fmt.Errorf("unexpected return value (got: %#x, want: %#x)", result, want) } return nil }, }, { - "call-simple-contract", - "simulates a simple contract call with no return", + "call-callenv", + `Performs a call to the callenv contract, which echoes the EVM transaction environment. +See https://github.com/ethereum/hive/tree/master/cmd/hivechain/contracts/callenv.eas for the output structure.`, func(ctx context.Context, t *T) error { - aa := common.Address{0xaa} - msg := ethereum.CallMsg{From: aa, To: &aa} - got, err := t.eth.CallContract(ctx, msg, nil) + msg := ethereum.CallMsg{ + To: &t.chain.txinfo.CallEnvContract.Addr, + } + result, err := t.eth.CallContract(ctx, msg, nil) + if err != nil { + return err + } + if len(result) == 0 { + return fmt.Errorf("empty call result") + } + return nil + }, + }, + { + "call-callenv-options-eip1559", + `Performs a call to the callenv contract, which echoes the EVM transaction environment. +This call uses EIP1559 transaction options. +See https://github.com/ethereum/hive/tree/master/cmd/hivechain/contracts/callenv.eas for the output structure.`, + func(ctx context.Context, t *T) error { + sender, _ := t.chain.GetSender(1) + basefee := t.chain.Head().BaseFee() + basefee.Add(basefee, big.NewInt(1)) + msg := ethereum.CallMsg{ + From: sender, + To: &t.chain.txinfo.CallEnvContract.Addr, + Gas: 60000, + GasFeeCap: basefee, + GasTipCap: big.NewInt(11), + Value: big.NewInt(23), + Data: []byte{0x33, 0x34, 0x35}, + } + result, err := t.eth.CallContract(ctx, msg, nil) if err != nil { return err } + if len(result) == 0 { + return fmt.Errorf("empty call result") + } + return nil + }, + }, + { + "call-revert-abi-panic", + "calls a contract that reverts with an ABI-encoded Panic(uint) value", + func(ctx context.Context, t *T) error { + msg := ethereum.CallMsg{ + To: &t.chain.txinfo.CallRevertContract.Addr, + Gas: 100000, + Data: []byte{0}, // triggers panic(uint) revert + } + got, err := t.eth.CallContract(ctx, msg, nil) if len(got) != 0 { return fmt.Errorf("unexpected return value (got: %s, want: nil)", hexutil.Bytes(got)) } + if err == nil { + return fmt.Errorf("expected error for reverting call") + } + return nil + }, + }, + { + "call-revert-abi-error", + "calls a contract that reverts with an ABI-encoded Error(string) value", + func(ctx context.Context, t *T) error { + msg := ethereum.CallMsg{ + To: &t.chain.txinfo.CallRevertContract.Addr, + Gas: 100000, + Data: []byte{1}, // triggers error(string) revert + } + got, err := t.eth.CallContract(ctx, msg, nil) + if len(got) != 0 { + return fmt.Errorf("unexpected return value (got: %s, want: nil)", hexutil.Bytes(got)) + } + if err == nil { + return fmt.Errorf("expected error for reverting call") + } return nil }, }, @@ -464,22 +613,47 @@ var EthEstimateGas = MethodTests{ }, }, { - "estimate-simple-contract", - "estimates a simple contract call with no return", + "estimate-successful-call", + "estimates a successful contract call", func(ctx context.Context, t *T) error { - aa := common.Address{0xaa} - msg := ethereum.CallMsg{From: aa, To: &aa} + caller := common.Address{1, 2, 3} + callme := t.chain.txinfo.CallMeContract.Addr + msg := ethereum.CallMsg{ + From: caller, + To: &callme, + // This is the expected input that makes the call pass. + // See https://github.com/ethereum/hive/blob/master/cmd/hivechain/contracts/callme.eas + Data: []byte{0xff, 0x01}, + } got, err := t.eth.EstimateGas(ctx, msg) if err != nil { return err } - want := params.TxGas + 3 + want := uint64(21270) if got != want { return fmt.Errorf("unexpected return value (got: %d, want: %d)", got, want) } return nil }, }, + { + "estimate-failed-call", + "estimates a contract call that reverts", + func(ctx context.Context, t *T) error { + caller := common.Address{1, 2, 3} + callme := t.chain.txinfo.CallMeContract.Addr + msg := ethereum.CallMsg{ + From: caller, + To: &callme, + Data: []byte{0xff, 0x03, 0x04, 0x05}, + } + _, err := t.eth.EstimateGas(ctx, msg) + if err == nil { + return fmt.Errorf("expected error for failed contract call") + } + return nil + }, + }, }, } @@ -488,15 +662,18 @@ var EthCreateAccessList = MethodTests{ "eth_createAccessList", []Test{ { - "create-al-simple-transfer", + "create-al-value-transfer", "estimates a simple transfer", func(ctx context.Context, t *T) error { - msg := make(map[string]interface{}) - msg["from"] = addr - msg["to"] = common.Address{0x01} - - got := make(map[string]interface{}) - err := t.rpc.CallContext(ctx, &got, "eth_createAccessList", msg, "latest") + sender, nonce := t.chain.GetSender(0) + msg := map[string]any{ + "from": sender, + "to": common.Address{0x01}, + "value": hexutil.Uint64(10), + "nonce": hexutil.Uint64(nonce), + } + result := make(map[string]any) + err := t.rpc.CallContext(ctx, &result, "eth_createAccessList", msg, "latest") if err != nil { return err } @@ -504,34 +681,70 @@ var EthCreateAccessList = MethodTests{ }, }, { - "create-al-simple-contract", - "estimates a simple contract call with no return", + "create-al-contract", + "creates an access list for a contract invocation that accesses storage", func(ctx context.Context, t *T) error { - msg := make(map[string]interface{}) - msg["from"] = addr - msg["to"] = common.Address{0xaa} - - got := make(map[string]interface{}) - err := t.rpc.CallContext(ctx, &got, "eth_createAccessList", msg, "latest") + gasprice := t.chain.Head().BaseFee() + sender, nonce := t.chain.GetSender(0) + msg := map[string]any{ + "from": sender, + "to": emitContract, + "nonce": hexutil.Uint64(nonce), + "gas": hexutil.Uint64(60000), + "gasPrice": (*hexutil.Big)(gasprice), + "input": "0x010203040506", + } + var result struct { + AccessList types.AccessList + } + err := t.rpc.CallContext(ctx, &result, "eth_createAccessList", msg, "latest") if err != nil { return err } + if len(result.AccessList) == 0 { + return fmt.Errorf("empty access list") + } + if result.AccessList[0].Address != emitContract { + return fmt.Errorf("wrong address in access list entry") + } + if len(result.AccessList[0].StorageKeys) == 0 { + return fmt.Errorf("no storage keys in access list entry") + } return nil }, }, { - "create-al-multiple-reads", - "estimates a simple contract call with no return", + "create-al-contract-eip1559", + `Creates an access list for a contract invocation that accesses storage. +This invocation uses EIP-1559 fields to specify the gas price.`, func(ctx context.Context, t *T) error { - msg := make(map[string]interface{}) - msg["from"] = addr - msg["to"] = common.Address{0xbb} - - got := make(map[string]interface{}) - err := t.rpc.CallContext(ctx, &got, "eth_createAccessList", msg, "latest") + gasprice := t.chain.Head().BaseFee() + sender, nonce := t.chain.GetSender(0) + msg := map[string]any{ + "from": sender, + "to": emitContract, + "nonce": hexutil.Uint64(nonce), + "gas": hexutil.Uint64(60000), + "maxFeePerGas": (*hexutil.Big)(gasprice), + "maxPriorityFeePerGas": (*hexutil.Big)(big.NewInt(3)), + "input": "0x010203040506", + } + var result struct { + AccessList types.AccessList + } + err := t.rpc.CallContext(ctx, &result, "eth_createAccessList", msg, "latest") if err != nil { return err } + if len(result.AccessList) == 0 { + return fmt.Errorf("empty access list") + } + if result.AccessList[0].Address != emitContract { + return fmt.Errorf("wrong address in access list entry") + } + if len(result.AccessList[0].StorageKeys) == 0 { + return fmt.Errorf("no storage keys in access list entry") + } return nil }, }, @@ -551,23 +764,23 @@ var EthGetBlockTransactionCountByNumber = MethodTests{ if err != nil { return err } - want := len(t.chain.GetBlockByNumber(0).Transactions()) - if int(got) != want { - return fmt.Errorf("tx counts don't match (got: %d, want: %d)", int(got), want) + if int(got) != 0 { + return fmt.Errorf("tx counts don't match (got: %d, want: %d)", int(got), 0) } return nil }, }, { "get-block-n", - "gets tx count in block 2", + "gets tx count in a non-empty block", func(ctx context.Context, t *T) error { + block := t.chain.BlockWithTransactions("", nil) var got hexutil.Uint - err := t.rpc.CallContext(ctx, &got, "eth_getBlockTransactionCountByNumber", hexutil.Uint(2)) + err := t.rpc.CallContext(ctx, &got, "eth_getBlockTransactionCountByNumber", hexutil.Uint64(block.NumberU64())) if err != nil { return err } - want := len(t.chain.GetBlockByNumber(2).Transactions()) + want := len(block.Transactions()) if int(got) != want { return fmt.Errorf("tx counts don't match (got: %d, want: %d)", int(got), want) } @@ -585,30 +798,29 @@ var EthGetBlockTransactionCountByHash = MethodTests{ "get-genesis", "gets tx count in block 0", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(0) + block := t.chain.GetBlock(0) var got hexutil.Uint err := t.rpc.CallContext(ctx, &got, "eth_getBlockTransactionCountByHash", block.Hash()) if err != nil { return err } - want := len(t.chain.GetBlockByNumber(0).Transactions()) - if int(got) != want { - return fmt.Errorf("tx counts don't match (got: %d, want: %d)", int(got), want) + if int(got) != 0 { + return fmt.Errorf("tx counts don't match (got: %d, want: %d)", int(got), 0) } return nil }, }, { "get-block-n", - "gets tx count in block 2", + "gets tx count in a non-empty block", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(2) + block := t.chain.BlockWithTransactions("any", nil) var got hexutil.Uint err := t.rpc.CallContext(ctx, &got, "eth_getBlockTransactionCountByHash", block.Hash()) if err != nil { return err } - want := len(t.chain.GetBlockByNumber(2).Transactions()) + want := len(block.Transactions()) if int(got) != want { return fmt.Errorf("tx counts don't match (got: %d, want: %d)", int(got), want) } @@ -624,14 +836,15 @@ var EthGetTransactionByBlockHashAndIndex = MethodTests{ []Test{ { "get-block-n", - "gets tx 0 in block 2", + "gets tx 0 in a non-empty block", func(ctx context.Context, t *T) error { + block := t.chain.BlockWithTransactions("", nil) var got types.Transaction - err := t.rpc.CallContext(ctx, &got, "eth_getTransactionByBlockNumberAndIndex", hexutil.Uint(2), hexutil.Uint(0)) + err := t.rpc.CallContext(ctx, &got, "eth_getTransactionByBlockNumberAndIndex", hexutil.Uint64(block.NumberU64()), hexutil.Uint(0)) if err != nil { return err } - want := t.chain.GetBlockByNumber(2).Transactions()[0] + want := block.Transactions()[0] if got.Hash() != want.Hash() { return fmt.Errorf("tx don't match (got: %d, want: %d)", got.Hash(), want.Hash()) } @@ -647,15 +860,15 @@ var EthGetTransactionByBlockNumberAndIndex = MethodTests{ []Test{ { "get-block-n", - "gets tx 0 in block 2", + "gets tx 0 in a non-empty block", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(2) + block := t.chain.BlockWithTransactions("", nil) var got types.Transaction err := t.rpc.CallContext(ctx, &got, "eth_getTransactionByBlockHashAndIndex", block.Hash(), hexutil.Uint(0)) if err != nil { return err } - want := t.chain.GetBlockByNumber(2).Transactions()[0] + want := block.Transactions()[0] if got.Hash() != want.Hash() { return fmt.Errorf("tx don't match (got: %d, want: %d)", got.Hash(), want.Hash()) } @@ -670,25 +883,68 @@ var EthGetTransactionCount = MethodTests{ "eth_getTransactionCount", []Test{ { - "get-account-nonce", - "gets nonce for a certain account", + "get-nonce", + "gets nonce for a known account", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} + addr := findAccountWithNonce(t.chain) got, err := t.eth.NonceAt(ctx, addr, nil) if err != nil { return err } - state, _ := t.chain.State() - want := state.GetNonce(addr) + want := t.chain.state[addr].Nonce if got != want { return fmt.Errorf("unexpected nonce (got: %d, want: %d)", got, want) } + if want == 0 { + return fmt.Errorf("nonce for account %v is zero", addr) + } + return nil + }, + }, + { + "get-nonce-unknown-account", + "gets nonce for a non-existent account", + func(ctx context.Context, t *T) error { + got, err := t.eth.NonceAt(ctx, nonAccount, nil) + if err != nil { + return err + } + want := t.chain.state[nonAccount].Nonce + if got != want { + return fmt.Errorf("unexpected nonce (got: %d, want: %d)", got, want) + } + if want != 0 { + return fmt.Errorf("nonce for account %v is non-zero", nonAccount) + } return nil }, }, }, } +func findAccountWithNonce(c *Chain) common.Address { + accounts := maps.Keys(c.state) + slices.SortFunc(accounts, common.Address.Cmp) + for _, acc := range accounts { + if c.state[acc].Nonce > 0 { + return acc + } + } + panic("no account with non-zero nonce found in state") +} + +func matchLegacyValueTransfer(i int, tx *types.Transaction) bool { + return tx.Type() == types.LegacyTxType && tx.To() != nil && len(tx.Data()) == 0 +} + +func matchLegacyCreate(i int, tx *types.Transaction) bool { + return tx.Type() == types.LegacyTxType && tx.To() == nil +} + +func matchLegacyTxWithInput(i int, tx *types.Transaction) bool { + return tx.Type() == types.LegacyTxType && len(tx.Data()) > 0 +} + // EthGetTransactionByHash stores a list of all tests against the method. var EthGetTransactionByHash = MethodTests{ "eth_getTransactionByHash", @@ -697,7 +953,7 @@ var EthGetTransactionByHash = MethodTests{ "get-legacy-tx", "gets a legacy transaction", func(ctx context.Context, t *T) error { - want := t.chain.GetBlockByNumber(2).Transactions()[0] + want := t.chain.FindTransaction("legacy tx", matchLegacyValueTransfer) got, _, err := t.eth.TransactionByHash(ctx, want.Hash()) if err != nil { return err @@ -712,7 +968,7 @@ var EthGetTransactionByHash = MethodTests{ "get-legacy-create", "gets a legacy contract create transaction", func(ctx context.Context, t *T) error { - want := t.chain.GetBlockByNumber(3).Transactions()[0] + want := t.chain.FindTransaction("legacy create", matchLegacyCreate) got, _, err := t.eth.TransactionByHash(ctx, want.Hash()) if err != nil { return err @@ -727,7 +983,7 @@ var EthGetTransactionByHash = MethodTests{ "get-legacy-input", "gets a legacy transaction with input data", func(ctx context.Context, t *T) error { - want := t.chain.GetBlockByNumber(4).Transactions()[0] + want := t.chain.FindTransaction("legacy tx w/ input", matchLegacyTxWithInput) got, _, err := t.eth.TransactionByHash(ctx, want.Hash()) if err != nil { return err @@ -742,7 +998,9 @@ var EthGetTransactionByHash = MethodTests{ "get-dynamic-fee", "gets a dynamic fee transaction", func(ctx context.Context, t *T) error { - want := t.chain.GetBlockByNumber(5).Transactions()[0] + want := t.chain.FindTransaction("dynamic fee tx", func(i int, tx *types.Transaction) bool { + return tx.Type() == types.DynamicFeeTxType + }) got, _, err := t.eth.TransactionByHash(ctx, want.Hash()) if err != nil { return err @@ -757,7 +1015,9 @@ var EthGetTransactionByHash = MethodTests{ "get-access-list", "gets an access list transaction", func(ctx context.Context, t *T) error { - want := t.chain.GetBlockByNumber(6).Transactions()[0] + want := t.chain.FindTransaction("access list tx", func(i int, tx *types.Transaction) bool { + return tx.Type() == types.AccessListTxType + }) got, _, err := t.eth.TransactionByHash(ctx, want.Hash()) if err != nil { return err @@ -768,9 +1028,26 @@ var EthGetTransactionByHash = MethodTests{ return nil }, }, + { + "get-blob-tx", + "gets a blob transaction", + func(ctx context.Context, t *T) error { + tx := t.chain.FindTransaction("blob tx", func(i int, tx *types.Transaction) bool { + return tx.Type() == types.BlobTxType + }) + got, _, err := t.eth.TransactionByHash(ctx, tx.Hash()) + if err != nil { + return err + } + if got.Hash() != tx.Hash() { + return fmt.Errorf("tx mismatch (got: %s, want: %s)", got.Hash(), tx.Hash()) + } + return nil + }, + }, { "get-empty-tx", - "gets an empty transaction", + "requests the zero transaction hash", func(ctx context.Context, t *T) error { _, _, err := t.eth.TransactionByHash(ctx, common.Hash{}) if !errors.Is(err, ethereum.NotFound) { @@ -781,7 +1058,7 @@ var EthGetTransactionByHash = MethodTests{ }, { "get-notfound-tx", - "gets a not exist transaction", + "gets a non-existent transaction", func(ctx context.Context, t *T) error { _, _, err := t.eth.TransactionByHash(ctx, common.HexToHash("deadbeef")) if !errors.Is(err, ethereum.NotFound) { @@ -799,17 +1076,15 @@ var EthGetTransactionReceipt = MethodTests{ []Test{ { "get-legacy-receipt", - "gets a receipt for a legacy transaction", + "gets the receipt for a legacy value transfer tx", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(2) - receipt, err := t.eth.TransactionReceipt(ctx, block.Transactions()[0].Hash()) + tx := t.chain.FindTransaction("legacy tx", matchLegacyValueTransfer) + receipt, err := t.eth.TransactionReceipt(ctx, tx.Hash()) if err != nil { return err } - got, _ := receipt.MarshalBinary() - want, _ := t.chain.GetReceiptsByHash(block.Hash())[0].MarshalBinary() - if !bytes.Equal(got, want) { - return fmt.Errorf("receipt mismatch (got: %s, want: %s)", hexutil.Bytes(got), hexutil.Bytes(want)) + if receipt.TxHash != tx.Hash() { + return fmt.Errorf("wrong receipt returned") } return nil }, @@ -818,15 +1093,16 @@ var EthGetTransactionReceipt = MethodTests{ "get-legacy-contract", "gets a legacy contract create transaction", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(3) - receipt, err := t.eth.TransactionReceipt(ctx, block.Transactions()[0].Hash()) + tx := t.chain.FindTransaction("legacy create", matchLegacyCreate) + receipt, err := t.eth.TransactionReceipt(ctx, tx.Hash()) if err != nil { return err } - got, _ := receipt.MarshalBinary() - want, _ := t.chain.GetReceiptsByHash(block.Hash())[0].MarshalBinary() - if !bytes.Equal(got, want) { - return fmt.Errorf("receipt mismatch (got: %s, want: %s)", hexutil.Bytes(got), hexutil.Bytes(want)) + if receipt.TxHash != tx.Hash() { + return fmt.Errorf("wrong receipt returned") + } + if receipt.ContractAddress == (common.Address{}) { + return fmt.Errorf("missing created address in receipt") } return nil }, @@ -835,15 +1111,13 @@ var EthGetTransactionReceipt = MethodTests{ "get-legacy-input", "gets a legacy transaction with input data", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(4) - receipt, err := t.eth.TransactionReceipt(ctx, block.Transactions()[0].Hash()) + tx := t.chain.FindTransaction("legacy tx w/ input", matchLegacyTxWithInput) + receipt, err := t.eth.TransactionReceipt(ctx, tx.Hash()) if err != nil { return err } - got, _ := receipt.MarshalBinary() - want, _ := t.chain.GetReceiptsByHash(block.Hash())[0].MarshalBinary() - if !bytes.Equal(got, want) { - return fmt.Errorf("receipt mismatch (got: %s, want: %s)", hexutil.Bytes(got), hexutil.Bytes(want)) + if receipt.TxHash != tx.Hash() { + return fmt.Errorf("wrong receipt returned") } return nil }, @@ -852,15 +1126,18 @@ var EthGetTransactionReceipt = MethodTests{ "get-dynamic-fee", "gets a dynamic fee transaction", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(5) - receipt, err := t.eth.TransactionReceipt(ctx, block.Transactions()[0].Hash()) + tx := t.chain.FindTransaction("dynamic fee tx", func(i int, tx *types.Transaction) bool { + return tx.Type() == types.DynamicFeeTxType + }) + receipt, err := t.eth.TransactionReceipt(ctx, tx.Hash()) if err != nil { return err } - got, _ := receipt.MarshalBinary() - want, _ := t.chain.GetReceiptsByHash(block.Hash())[0].MarshalBinary() - if !bytes.Equal(got, want) { - return fmt.Errorf("receipt mismatch (got: %s, want: %s)", hexutil.Bytes(got), hexutil.Bytes(want)) + if receipt.TxHash != tx.Hash() { + return fmt.Errorf("wrong receipt returned") + } + if receipt.Type != types.DynamicFeeTxType { + return fmt.Errorf("wrong tx type in receipt") } return nil }, @@ -869,22 +1146,45 @@ var EthGetTransactionReceipt = MethodTests{ "get-access-list", "gets an access list transaction", func(ctx context.Context, t *T) error { - block := t.chain.GetBlockByNumber(6) - receipt, err := t.eth.TransactionReceipt(ctx, block.Transactions()[0].Hash()) + tx := t.chain.FindTransaction("access list tx", func(i int, tx *types.Transaction) bool { + return tx.Type() == types.AccessListTxType + }) + receipt, err := t.eth.TransactionReceipt(ctx, tx.Hash()) if err != nil { return err } - got, _ := receipt.MarshalBinary() - want, _ := t.chain.GetReceiptsByHash(block.Hash())[0].MarshalBinary() - if !bytes.Equal(got, want) { - return fmt.Errorf("receipt mismatch (got: %s, want: %s)", hexutil.Bytes(got), hexutil.Bytes(want)) + if receipt.TxHash != tx.Hash() { + return fmt.Errorf("wrong receipt returned") + } + if receipt.Type != types.AccessListTxType { + return fmt.Errorf("wrong tx type in receipt") + } + return nil + }, + }, + { + "get-blob-tx", + "gets a blob transaction", + func(ctx context.Context, t *T) error { + tx := t.chain.FindTransaction("blob tx", func(i int, tx *types.Transaction) bool { + return tx.Type() == types.BlobTxType + }) + receipt, err := t.eth.TransactionReceipt(ctx, tx.Hash()) + if err != nil { + return err + } + if receipt.TxHash != tx.Hash() { + return fmt.Errorf("wrong receipt returned") + } + if receipt.Type != types.BlobTxType { + return fmt.Errorf("wrong tx type in receipt") } return nil }, }, { "get-empty-tx", - "gets an empty transaction", + "requests the receipt for the zero tx hash", func(ctx context.Context, t *T) error { _, err := t.eth.TransactionReceipt(ctx, common.Hash{}) if !errors.Is(err, ethereum.NotFound) { @@ -895,7 +1195,7 @@ var EthGetTransactionReceipt = MethodTests{ }, { "get-notfound-tx", - "gets a not exist transaction", + "requests the receipt for a non-existent tx hash", func(ctx context.Context, t *T) error { _, err := t.eth.TransactionReceipt(ctx, common.HexToHash("deadbeef")) if !errors.Is(err, ethereum.NotFound) { @@ -918,18 +1218,20 @@ var EthGetBlockReceipts = MethodTests{ if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", hexutil.Uint64(0)); err != nil { return err } - return checkBlockReceipts(t, 0, receipts) + // Unfortunately, receipts cannot be checked for correctness. + return nil }, }, { "get-block-receipts-n", "gets receipts non-zero block", func(ctx context.Context, t *T) error { + block := t.chain.BlockWithTransactions("", nil) var receipts []*types.Receipt - if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", hexutil.Uint64(3)); err != nil { + if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", hexutil.Uint64(block.NumberU64())); err != nil { return err } - return checkBlockReceipts(t, 3, receipts) + return nil }, }, { @@ -938,7 +1240,7 @@ var EthGetBlockReceipts = MethodTests{ func(ctx context.Context, t *T) error { var ( receipts []*types.Receipt - future = t.chain.CurrentHeader().Number.Uint64() + 1 + future = t.chain.Head().NumberU64() + 1 ) if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", hexutil.Uint64(future)); err != nil { return err @@ -957,7 +1259,7 @@ var EthGetBlockReceipts = MethodTests{ if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", "earliest"); err != nil { return err } - return checkBlockReceipts(t, 0, receipts) + return nil }, }, { @@ -968,7 +1270,7 @@ var EthGetBlockReceipts = MethodTests{ if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", "latest"); err != nil { return err } - return checkBlockReceipts(t, t.chain.CurrentHeader().Number.Uint64(), receipts) + return nil }, }, { @@ -1003,11 +1305,12 @@ var EthGetBlockReceipts = MethodTests{ "get-block-receipts-by-hash", "gets receipts for normal block hash", func(ctx context.Context, t *T) error { + block := t.chain.BlockWithTransactions("", nil) var receipts []*types.Receipt - if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", t.chain.GetCanonicalHash(5)); err != nil { + if err := t.rpc.CallContext(ctx, &receipts, "eth_getBlockReceipts", block.Hash()); err != nil { return err } - return checkBlockReceipts(t, 5, receipts) + return nil }, }, }, @@ -1021,46 +1324,45 @@ var EthSendRawTransaction = MethodTests{ "send-legacy-transaction", "sends a raw legacy transaction", func(ctx context.Context, t *T) error { - genesis := t.chain.Genesis() - state, _ := t.chain.State() + sender, nonce := t.chain.GetSender(0) + head := t.chain.Head() txdata := &types.LegacyTx{ - Nonce: state.GetNonce(addr), + Nonce: nonce, To: &common.Address{0xaa}, Value: big.NewInt(10), Gas: 25000, - GasPrice: new(big.Int).Add(genesis.BaseFee(), big.NewInt(1)), + GasPrice: new(big.Int).Add(head.BaseFee(), big.NewInt(1)), Data: common.FromHex("5544"), } - s := types.LatestSigner(t.chain.Config()) - tx, _ := types.SignNewTx(pk, s, txdata) + tx := t.chain.MustSignTx(sender, txdata) if err := t.eth.SendTransaction(ctx, tx); err != nil { return err } + t.chain.IncNonce(sender, 1) return nil }, }, { "send-dynamic-fee-transaction", - "sends a transaction with dynamic fee", + "sends a create transaction with dynamic fee", func(ctx context.Context, t *T) error { - genesis := t.chain.Genesis() - state, _ := t.chain.State() - fee := big.NewInt(500) - fee.Add(fee, genesis.BaseFee()) + sender, nonce := t.chain.GetSender(0) + basefee := t.chain.Head().BaseFee() + basefee.Add(basefee, big.NewInt(500)) txdata := &types.DynamicFeeTx{ - Nonce: state.GetNonce(addr) + 1, + Nonce: nonce, To: nil, Gas: 60000, Value: big.NewInt(42), GasTipCap: big.NewInt(500), - GasFeeCap: fee, + GasFeeCap: basefee, Data: common.FromHex("0x3d602d80600a3d3981f3363d3d373d3d3d363d734d11c446473105a02b5c1ab9ebe9b03f33902a295af43d82803e903d91602b57fd5bf3"), // eip1167.minimal.proxy } - s := types.LatestSigner(t.chain.Config()) - tx, _ := types.SignNewTx(pk, s, txdata) + tx := t.chain.MustSignTx(sender, txdata) if err := t.eth.SendTransaction(ctx, tx); err != nil { return err } + t.chain.IncNonce(sender, 1) return nil }, }, @@ -1068,23 +1370,24 @@ var EthSendRawTransaction = MethodTests{ "send-access-list-transaction", "sends a transaction with access list", func(ctx context.Context, t *T) error { - genesis := t.chain.Genesis() - state, _ := t.chain.State() + sender, nonce := t.chain.GetSender(0) + basefee := t.chain.Head().BaseFee() + basefee.Add(basefee, big.NewInt(500)) txdata := &types.AccessListTx{ - Nonce: state.GetNonce(addr) + 2, - To: &contract, + Nonce: nonce, + To: &emitContract, Gas: 90000, - GasPrice: genesis.BaseFee(), - Data: common.FromHex("0xa9059cbb000000000000000000000000cff33720980c026cc155dcb366861477e988fd870000000000000000000000000000000000000000000000000000000002fd6892"), // transfer(address to, uint256 value) + GasPrice: basefee, + Data: common.FromHex("0x010203"), AccessList: types.AccessList{ - {Address: contract, StorageKeys: []common.Hash{{0}, {1}}}, + {Address: emitContract, StorageKeys: []common.Hash{{0}, {1}}}, }, } - s := types.LatestSigner(t.chain.Config()) - tx, _ := types.SignNewTx(pk, s, txdata) + tx := t.chain.MustSignTx(sender, txdata) if err := t.eth.SendTransaction(ctx, tx); err != nil { return err } + t.chain.IncNonce(sender, 1) return nil }, }, @@ -1092,26 +1395,66 @@ var EthSendRawTransaction = MethodTests{ "send-dynamic-fee-access-list-transaction", "sends a transaction with dynamic fee and access list", func(ctx context.Context, t *T) error { - genesis := t.chain.Genesis() - state, _ := t.chain.State() - fee := big.NewInt(500) - fee.Add(fee, genesis.BaseFee()) + sender, nonce := t.chain.GetSender(0) + basefee := t.chain.Head().BaseFee() + basefee.Add(basefee, big.NewInt(500)) txdata := &types.DynamicFeeTx{ - Nonce: state.GetNonce(addr) + 3, - To: &contract, + Nonce: nonce, + To: &emitContract, Gas: 80000, GasTipCap: big.NewInt(500), + GasFeeCap: basefee, + Data: common.FromHex("0x01020304"), + AccessList: types.AccessList{ + {Address: emitContract, StorageKeys: []common.Hash{{0}, {1}}}, + }, + } + tx := t.chain.MustSignTx(sender, txdata) + if err := t.eth.SendTransaction(ctx, tx); err != nil { + return err + } + t.chain.IncNonce(sender, 1) + return nil + }, + }, + { + "send-blob-tx", + "sends a blob transaction", + func(ctx context.Context, t *T) error { + var ( + sender, nonce = t.chain.GetSender(3) + basefee = uint256.MustFromBig(t.chain.Head().BaseFee()) + fee = uint256.NewInt(500) + emptyBlob = kzg4844.Blob{} + emptyBlobCommit, _ = kzg4844.BlobToCommitment(emptyBlob) + emptyBlobProof, _ = kzg4844.ComputeBlobProof(emptyBlob, emptyBlobCommit) + ) + fee.Add(basefee, fee) + sidecar := &types.BlobTxSidecar{ + Blobs: []kzg4844.Blob{emptyBlob}, + Commitments: []kzg4844.Commitment{emptyBlobCommit}, + Proofs: []kzg4844.Proof{emptyBlobProof}, + } + + txdata := &types.BlobTx{ + Nonce: nonce, + To: emitContract, + Gas: 80000, + GasTipCap: uint256.NewInt(500), GasFeeCap: fee, Data: common.FromHex("0xa9059cbb000000000000000000000000cff33720980c026cc155dcb366861477e988fd870000000000000000000000000000000000000000000000000000000002fd6892"), // transfer(address to, uint256 value) AccessList: types.AccessList{ - {Address: contract, StorageKeys: []common.Hash{{0}, {1}}}, + {Address: emitContract, StorageKeys: []common.Hash{{0}, {1}}}, }, + BlobHashes: sidecar.BlobHashes(), + BlobFeeCap: uint256.NewInt(params.BlobTxBlobGasPerBlob), + Sidecar: sidecar, } - s := types.LatestSigner(t.chain.Config()) - tx, _ := types.SignNewTx(pk, s, txdata) + tx := t.chain.MustSignTx(sender, txdata) if err := t.eth.SendTransaction(ctx, tx); err != nil { return err } + t.chain.IncNonce(sender, 1) return nil }, }, @@ -1160,12 +1503,20 @@ var EthFeeHistory = MethodTests{ "fee-history", "gets fee history information", func(ctx context.Context, t *T) error { - got, err := t.eth.FeeHistory(ctx, 1, big.NewInt(2), []float64{95, 99}) + // Find a block/tx where the London fork is enabled. + var dftx *types.Transaction + block := t.chain.BlockWithTransactions("dynamic fee tx", func(i int, tx *types.Transaction) bool { + if tx.Type() == types.DynamicFeeTxType { + dftx = tx + return true + } + return false + }) + got, err := t.eth.FeeHistory(ctx, 1, block.Number(), []float64{95, 99}) if err != nil { return err } - block := t.chain.GetBlockByNumber(2) - tip, err := block.Transactions()[0].EffectiveGasTip(block.BaseFee()) + tip, err := dftx.EffectiveGasTip(block.BaseFee()) if err != nil { return fmt.Errorf("unable to get effective tip: %w", err) } @@ -1210,7 +1561,7 @@ var EthGetUncleByBlockNumberAndIndex = MethodTests{ func(ctx context.Context, t *T) error { var got *types.Header t.rpc.CallContext(ctx, got, "eth_getUncleByBlockNumberAndIndex", hexutil.Uint(2), hexutil.Uint(0)) - want := t.chain.GetBlockByNumber(2).Uncles()[0] + want := t.chain.GetBlock(2).Uncles()[0] if got.Hash() != want.Hash() { return fmt.Errorf("mismatch uncle hash (got: %s, want: %s", got.Hash(), want.Hash()) } @@ -1225,19 +1576,20 @@ var EthGetProof = MethodTests{ "eth_getProof", []Test{ { - "get-account-proof", - "gets proof for a certain account", + "get-account-proof-latest", + "requests the account proof for a known account", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} - result, err := t.geth.GetProof(ctx, addr, []string{}, big.NewInt(3)) + result, err := t.geth.GetProof(ctx, emitContract, []string{}, nil) if err != nil { return err } - state, _ := t.chain.State() - balance := state.GetBalance(addr) + balance := t.chain.Balance(emitContract) if result.Balance.Cmp(balance) != 0 { return fmt.Errorf("unexpected balance (got: %s, want: %s)", result.Balance, balance) } + if result.Balance.Sign() == 0 { + return fmt.Errorf("balance is zero, does the account exist?") + } return nil }, }, @@ -1245,19 +1597,20 @@ var EthGetProof = MethodTests{ "get-account-proof-blockhash", "gets proof for a certain account at the specified blockhash", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} type accountResult struct { Balance *hexutil.Big `json:"balance"` } var result accountResult - if err := t.rpc.CallContext(ctx, &result, "eth_getProof", addr, []string{}, t.chain.CurrentHeader().Hash()); err != nil { + if err := t.rpc.CallContext(ctx, &result, "eth_getProof", emitContract, []string{}, t.chain.Head().Hash()); err != nil { return err } - state, _ := t.chain.State() - balance := state.GetBalance(addr) + balance := t.chain.Balance(emitContract) if result.Balance.ToInt().Cmp(balance) != 0 { return fmt.Errorf("unexpected balance (got: %s, want: %s)", result.Balance, balance) } + if result.Balance.ToInt().Sign() == 0 { + return fmt.Errorf("balance is zero, does the account exist?") + } return nil }, }, @@ -1265,13 +1618,11 @@ var EthGetProof = MethodTests{ "get-account-proof-with-storage", "gets proof for a certain account", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} - result, err := t.geth.GetProof(ctx, addr, []string{"0x01"}, big.NewInt(3)) + result, err := t.geth.GetProof(ctx, emitContract, []string{"0x00"}, nil) if err != nil { return err } - state, _ := t.chain.State() - balance := state.GetBalance(addr) + balance := t.chain.Balance(emitContract) if result.Balance.Cmp(balance) != 0 { return fmt.Errorf("unexpected balance (got: %s, want: %s)", result.Balance, balance) } @@ -1284,6 +1635,109 @@ var EthGetProof = MethodTests{ }, } +var EthGetLogs = MethodTests{ + "eth_getLogs", + []Test{ + { + "no-topics", + "queries for all logs across a range of blocks", + func(ctx context.Context, t *T) error { + result, err := t.eth.FilterLogs(ctx, ethereum.FilterQuery{ + FromBlock: big.NewInt(1), + ToBlock: big.NewInt(3), + }) + if err != nil { + return err + } + if len(result) == 0 { + return fmt.Errorf("no logs returned") + } + return nil + }, + }, + { + "contract-addr", + "queries for logs from a specific contract across a range of blocks", + func(ctx context.Context, t *T) error { + result, err := t.eth.FilterLogs(ctx, ethereum.FilterQuery{ + FromBlock: big.NewInt(1), + ToBlock: big.NewInt(4), + Addresses: []common.Address{emitContract}, + }) + if err != nil { + return err + } + if len(result) == 0 { + return fmt.Errorf("no logs returned") + } + bad := slices.ContainsFunc(result, func(l types.Log) bool { + return l.Address != emitContract + }) + if bad { + return fmt.Errorf("result contains log for unrequested contract") + } + return nil + }, + }, + { + "topic-exact-match", + "queries for logs with two topics, with both topics set explictly", + func(ctx context.Context, t *T) error { + // Find a topic. + i := slices.IndexFunc(t.chain.txinfo.LegacyEmit, func(tx TxInfo) bool { + return tx.Block > 2 + }) + if i == -1 { + return fmt.Errorf("no suitable tx found") + } + info := t.chain.txinfo.LegacyEmit[i] + startBlock := uint64(info.Block - 1) + endBlock := uint64(info.Block + 2) + result, err := t.eth.FilterLogs(ctx, ethereum.FilterQuery{ + FromBlock: new(big.Int).SetUint64(startBlock), + ToBlock: new(big.Int).SetUint64(endBlock), + Topics: [][]common.Hash{{*info.LogTopic0}, {*info.LogTopic1}}, + }) + if err != nil { + return err + } + if len(result) != 1 { + return fmt.Errorf("result contains %d logs, want 1", len(result)) + } + return nil + }, + }, + { + "topic-wildcard", + "queries for logs with two topics, performing a wildcard match in topic position zero", + func(ctx context.Context, t *T) error { + // Find a topic. + i := slices.IndexFunc(t.chain.txinfo.LegacyEmit, func(tx TxInfo) bool { + return tx.Block > 2 + }) + if i == -1 { + return fmt.Errorf("no suitable tx found") + } + info := t.chain.txinfo.LegacyEmit[i] + startBlock := uint64(info.Block - 1) + endBlock := uint64(info.Block + 2) + result, err := t.eth.FilterLogs(ctx, ethereum.FilterQuery{ + FromBlock: new(big.Int).SetUint64(startBlock), + ToBlock: new(big.Int).SetUint64(endBlock), + Topics: [][]common.Hash{{}, {*info.LogTopic1}}, + }) + if err != nil { + return err + } + if len(result) != 1 { + return fmt.Errorf("result contains %d logs, want 1", len(result)) + } + return nil + }, + }, + }, +} + var DebugGetRawHeader = MethodTests{ "debug_getRawHeader", []Test{ @@ -1400,7 +1854,8 @@ var DebugGetRawTransaction = MethodTests{ "get-tx", "gets tx rlp by hash", func(ctx context.Context, t *T) error { - tx := t.chain.GetBlockByNumber(1).Transactions()[0] + block := t.chain.BlockWithTransactions("", nil) + tx := block.Transactions()[0] var got hexutil.Bytes if err := t.rpc.CallContext(ctx, &got, "debug_getRawTransaction", tx.Hash().Hex()); err != nil { return err diff --git a/testgen/utils.go b/testgen/utils.go index 0fa87fc..857b063 100644 --- a/testgen/utils.go +++ b/testgen/utils.go @@ -1,16 +1,14 @@ package testgen import ( - "bytes" "fmt" "github.com/ethereum/go-ethereum/common/hexutil" - "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" ) func checkHeaderRLP(t *T, n uint64, got []byte) error { - head := t.chain.GetHeaderByNumber(n) + head := t.chain.GetBlock(int(n)).Header() if head == nil { return fmt.Errorf("unable to load block %d from test chain", n) } @@ -25,7 +23,7 @@ func checkHeaderRLP(t *T, n uint64, got []byte) error { } func checkBlockRLP(t *T, n uint64, got []byte) error { - head := t.chain.GetBlockByNumber(n) + head := t.chain.GetBlock(int(n)) if head == nil { return fmt.Errorf("unable to load block %d from test chain", n) } @@ -38,22 +36,3 @@ func checkBlockRLP(t *T, n uint64, got []byte) error { } return nil } - -func checkBlockReceipts(t *T, n uint64, got []*types.Receipt) error { - b := t.chain.GetBlockByNumber(n) - if b == nil { - return fmt.Errorf("block number %d not found", n) - } - want := t.chain.GetReceiptsByHash(b.Hash()) - if len(got) != len(want) { - return fmt.Errorf("receipts length mismatch (got: %d, want: %d)", len(got), len(want)) - } - for i := range got { - got, _ := got[i].MarshalBinary() - want, _ := want[i].MarshalBinary() - if !bytes.Equal(got, want) { - return fmt.Errorf("receipt %d mismatch (got: %x, want: %x)", i, got, want) - } - } - return nil -}