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..0bb0330 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..f1ce241 --- /dev/null +++ b/chain/forkenv.json @@ -0,0 +1,21 @@ +{ + "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_PRAGUE_TIMESTAMP": "0", + "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..03f2964 --- /dev/null +++ b/chain/genesis.json @@ -0,0 +1,113 @@ +{ + "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, + "pragueTime": 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" + }, + "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..71cda0f --- /dev/null +++ b/chain/headstate.json @@ -0,0 +1,659 @@ +{ + "root": "99079f9ccd34a6f1831f0eafa0e8158c515f1c304e435c7f4fa0a9511b9c0e8e", + "accounts": { + "0x0000000000000000000000000000000000000000": { + "balance": "4730293", + "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" + }, + "0x01ba4719c80b6fe911b091a7c05124b64eeece96": { + "balance": "100000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x7828a6439c0a99a66493f5cec15c8fe404f76336ee77b4f5d6b2cd92179cd603" + }, + "0x04b85539570fb9501f65453dbfad410a467becdd": { + "balance": "0", + "nonce": 1, + "root": "0xe157409dc04fd61a85510c013db6fc4e0d7851ff5e72ac546da85479edf06be1", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000007": "07", + "0x0000000000000000000000000000000000000000000000000000000000000008": "08", + "0x0000000000000000000000000000000000000000000000000000000000000009": "09" + }, + "key": "0xd84f7711be2f8eca69c742153230995afb483855b7c555b08da330139cdb9579" + }, + "0x084fed08b978af4d7d196a7446a86b58009e636b": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x24f03d67300f3a23ee20f840785f9e4579e8f40d67ac7429714a9cc1f2bed3b8" + }, + "0x0badc617ca1bcb1cb1d5272f64b168cbf0e8f86f": { + "balance": "0", + "nonce": 1, + "root": "0x24111a061419edc3afa83e8824963922dbe7a7d78f5bde939d03f470a0054dcc", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000c": "0c", + "0x000000000000000000000000000000000000000000000000000000000000000d": "0d", + "0x000000000000000000000000000000000000000000000000000000000000000e": "0e" + }, + "key": "0xc250f30c01f4b7910c2eb8cdcd697cf493f6417bb2ed61d637d625a85a400912" + }, + "0x0c2c51a0990aee1d73c1228de158688341557508": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x28f25652ec67d8df6a2e33730e5d0983443e3f759792a0128c06756e8eb6c37f" + }, + "0x14e46043e63d0e3cdcf2530519f4cfaf35058cb2": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x9feaf0bd45df0fbf327c964c243b2fbc2f0a3cb48fedfeea1ae87ac1e66bc02f" + }, + "0x16c57edf7fa9d9525378b0b81bf8a3ced0620c1c": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xda81833ff053aff243d305449775c3fb1bd7f62c4a3c95dc9fb91b85e032faee" + }, + "0x196d4a4c50eb47562596429fdecb4e3ac6b2a5fd": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x4e258aa445a0e2a8704cbc57bbe32b859a502cd6f99190162236300fabd86c4a" + }, + "0x1e8ce8258fb47f55bf2c1473acb89a10074b9d0e": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xfb2ab315988de92dcf6ba848e756676265b56e4b84778a2c955fb2b3c848c51c" + }, + "0x1f4924b14f34e24159387c0a4cdbaa32f3ddb0cf": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x7963685967117ffb6fd019663dc9e782ebb1234a38501bffc2eb5380f8dc303b" + }, + "0x1f5bde34b4afc686f136c7a3cb6ec376f7357759": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xc3791fc487a84f3731eb5a8129a7e26f357089971657813b48a821f5582514b3" + }, + "0x23b17315554bd2928c1f86dd526f7ee065a9607d": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x12e394ad62e51261b4b95c431496e46a39055d7ada7dbf243f938b6d79054630" + }, + "0x2aac4746638ae1457010747a5b0fd2380a388f4f": { + "balance": "0", + "nonce": 1, + "root": "0x5a25afca240ed3f1756a12b178c2875f75a1ebd4e7942a550856d04b61d424b1", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000013": "13", + "0x0000000000000000000000000000000000000000000000000000000000000014": "14", + "0x0000000000000000000000000000000000000000000000000000000000000015": "15" + }, + "key": "0x96c43ef9dce3410b78df97be69e7ccef8ed40d6e5bfe6582ea4cd7d577aa4569" + }, + "0x2b4c342f5433ebe591a1da77e013d1b72475562d": { + "balance": "1", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x7fbb01fd6bdb66f62c4bc1f514919e81d98f22bdb391b82fd6d1502d479b1ead" + }, + "0x2c1287779024c3a2f0924b54816d79b7e378907d": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x09d6e6745d272389182a510994e2b54d14b731fac96b9c9ef434bc1924315371" + }, + "0x2d389075be5be9f2246ad654ce152cf05990b209": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xa9233a729f0468c9c309c48b82934c99ba1fd18447947b3bc0621adb7a5fc643" + }, + "0x2f01c1c8c735a9a1b89898d3f14bbf61c91bf0fd": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xd2f394b4549b085fb9b9a8b313a874ea660808a4323ab2598ee15ddd1eb7e897" + }, + "0x312e8fca5ac7dfc591031831bff6fede6ecf12a8": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x64bfba8a4688bdee41c4b998e101567b8b56fea53d30ab85393f2d5b70c5da90" + }, + "0x3ae75c08b4c907eb63a8960c45b86e1e9ab6123c": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x878040f46b1b4a065e6b82abd35421eb69eededc0c9598b82e3587ae47c8a651" + }, + "0x3cf2e7052ebd484a8d6fbca579ddb3cf920de9d3": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xa95c88d7dc0f2373287c3b2407ba8e7419063833c424b06d8bb3b29181bb632e" + }, + "0x417fe11f58b6a2d089826b60722fbed1d2db96dd": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xd5e252ab2fba10107258010f154445cf7dffc42b7d8c5476de9a7adb533d73f1" + }, + "0x4340ee1b812acb40a1eb561c019c327b243b92df": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xa13bfef92e05edee891599aa5e447ff2baa1708d9a6473a04ef66ab94f2a11e4" + }, + "0x4a0f1452281bcec5bd90c3dce6162a5995bfe9df": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5c1d92594d6377fe6423257781b382f94dffcde4fadbf571aa328f6eb18f8fcd" + }, + "0x4a64a107f0cb32536e5bce6c98c393db21cca7f4": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xf16522fc36907ee1e9948240b0c1d1d105a75cc63b71006f16c20d79ad469bd7" + }, + "0x4d7b3ef7300acf70c892d8327db8272f54434adb": { + "balance": "1", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xc5d7330b850af4236196e9d361d18cfecf0472bcef97bb4127096f31f1868176" + }, + "0x4dde844b71bcdf95512fb4dc94e84fb67b512ed8": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5602444769b5fd1ddfca48e3c38f2ecad326fe2433f22b90f6566a38496bd426" + }, + "0x5371ac01baa0b8aa9cbfcd36a49e0b5f7fb7109d": { + "balance": "0", + "nonce": 1, + "root": "0x207f6c3e450546b0d1f3bc6a6faf5bfa0bff80396c55d567b834cf0e7c760347", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000a": "0a", + "0x000000000000000000000000000000000000000000000000000000000000000b": "0b", + "0x000000000000000000000000000000000000000000000000000000000000000c": "0c" + }, + "key": "0x7a08bb8417e6b18da3ba926568f1022c15553b2b0f1a32f2fd9e5a605469e54f" + }, + "0x56d3f289b889e65c4268a1b56b3da2d3860d0afb": { + "balance": "0", + "nonce": 1, + "root": "0x3acb80dd5656a2a14e33dde2484f5fcb75bb8a1ddbf25f3f77e67e4905d5701c", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000003": "03", + "0x0000000000000000000000000000000000000000000000000000000000000004": "04", + "0x0000000000000000000000000000000000000000000000000000000000000005": "05" + }, + "key": "0xdc9ea08bdea052acab7c990edbb85551f2af3e1f1a236356ab345ac5bcc84562" + }, + "0x5c23d95614dce3317e7be72de3c81479c3172a8a": { + "balance": "0", + "nonce": 1, + "root": "0x0d41dd9489495103da310ff753051228a51fc03c3f5ffc369e8fab53c4685f40", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000004": "04", + "0x0000000000000000000000000000000000000000000000000000000000000005": "05", + "0x0000000000000000000000000000000000000000000000000000000000000006": "06" + }, + "key": "0x34a715e08b77afd68cde30b62e222542f3db90758370400c94d0563959a1d1a0" + }, + "0x5f552da00dfb4d3749d9e62dcee3c918855a86a0": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xd52564daf6d32a6ae29470732726859261f5a7409b4858101bd233ed5cc2f662" + }, + "0x60d0debc5c81432ee294b9a06dcf58964224bbc2": { + "balance": "0", + "nonce": 1, + "root": "0x324c7f8ff4769d4c0d030616408dc7eb99c331a03a531e6c50f4368b00b59935", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000011": "11", + "0x0000000000000000000000000000000000000000000000000000000000000012": "12", + "0x0000000000000000000000000000000000000000000000000000000000000013": "13" + }, + "key": "0x395b92f75f8e06b5378a84ba03379f025d785d8b626b2b6a1c84b718244b9a91" + }, + "0x654aa64f5fbefb84c270ec74211b81ca8c44a72e": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x00aa781aff39a8284ef43790e3a511b2caa50803613c5096bc782e8de08fa4c5" + }, + "0x66378d2edcc2176820e951f080dd6e9e15a0e695": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xa02c8b02efb52fad3056fc96029467937c38c96d922250f6d2c0f77b923c85aa" + }, + "0x67586e98fad27da0b9968bc039a1ef34c939b9b8": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x1989af91e97d6c3001d5350658c6fdfae36dd99144229c03609bd71dde3aaecc" + }, + "0x717f8aa2b982bee0e29f573d31df288663e1ce16": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xc3c8e2dc64e67baa83b844263fe31bfe24de17bb72bfed790ab345b97b007816" + }, + "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f": { + "balance": "999999999999999999998430800328401819", + "nonce": 65, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x4363d332a0d4df8582a84932729892387c623fe1ec42e2cfcbe85c183ed98e0e" + }, + "0x7fd02a3bb5d5926d4981efbf63b66de2a7b1aa63": { + "balance": "0", + "nonce": 1, + "root": "0xf89ff8be1802270db3941dd47496598c56b040a61641168961390dcdea73ca1b", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000d": "0d", + "0x000000000000000000000000000000000000000000000000000000000000000e": "0e", + "0x000000000000000000000000000000000000000000000000000000000000000f": "0f" + }, + "key": "0xfc3d2e27841c0913d10aa11fc4af4793bf376efe3d90ce8360aa392d0ecefa24" + }, + "0x8120ff763f8283e574fc767702056b57fcc89003": { + "balance": "0", + "nonce": 1, + "root": "0x2b0942197e6bff98655d041e4e9babc448114630c762b51efd50a4b20f30441c", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000e": "0e", + "0x000000000000000000000000000000000000000000000000000000000000000f": "0f", + "0x0000000000000000000000000000000000000000000000000000000000000010": "10" + }, + "key": "0x48e291f8a256ab15da8401c8cae555d5417a992dff3848926fa5b71655740059" + }, + "0x83891d7fe85c33e52c8b4e5814c92fb6a3b94672": { + "balance": "100000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xb655f40c408bf29b50d38e8b3be2347ddbec722e57945b165e003cfe562ce7fa" + }, + "0x83c7e323d189f18725ac510004fdc2941f8c4a78": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xb17ea61d092bd5d77edd9d5214e9483607689cdcc35a30f7ea49071b3be88c64" + }, + "0x84e75c28348fb86acea1a93a39426d7d60f4cc46": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5162f18d40405c59ef279ad71d87fbec2bbfedc57139d56986fbf47daf8bcbf2" + }, + "0x882e7e5d12617c267a72948e716f231fa79e6d51": { + "balance": "0", + "nonce": 1, + "root": "0xe22af78ee9815b318712241c4adc80063a8598446701dfc8ea0e3631baaf79e8", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000002": "02", + "0x0000000000000000000000000000000000000000000000000000000000000003": "03", + "0x0000000000000000000000000000000000000000000000000000000000000004": "04" + }, + "key": "0xd2501ae11a14bf0c2283a24b7e77c846c00a63e71908c6a5e1caff201bad0762" + }, + "0x8bebc8ba651aee624937e7d897853ac30c95a067": { + "balance": "1", + "nonce": 1, + "root": "0xbe3d75a1729be157e79c3b77f00206db4d54e3ea14375a015451c88ec067c790", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000001": "01", + "0x0000000000000000000000000000000000000000000000000000000000000002": "02", + "0x0000000000000000000000000000000000000000000000000000000000000003": "03" + }, + "key": "0x445cb5c1278fdce2f9cbdb681bdd76c52f8e50e41dbd9e220242a69ba99ac099" + }, + "0x9344b07175800259691961298ca11c824e65032d": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0x8e0388ecf64cfa76b3a6af159f77451519a7f9bb862e4cce24175c791fdcb0df", + "code": "0x60004381526020014681526020014181526020014881526020014481526020013281526020013481526020016000f3", + "key": "0x2e6fe1362b3e388184fd7bf08e99e74170b26361624ffd1c5f646da7067b58b6" + }, + "0x9b3cf956056937dfb6f9e3dc02e3979a4e421c0a": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xb1b2c1c59637202bb0e0d21255e44e0df719fe990be05f213b1b813e3d8179d7" + }, + "0x9d1e0e2d9459d06523ad13e28a4093c2316baafe": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xdeb25cd3b074a1e919cb6077c5620041e60faaf141094a9ce9c1a198f16ed69c" + }, + "0xa6a54695341f038ad15e9e32f1096f5201236512": { + "balance": "0", + "nonce": 1, + "root": "0xfbff66b2db89023f18f432097a9f54cb69741089b0b7000478f284cb8ce56161", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000009": "09", + "0x000000000000000000000000000000000000000000000000000000000000000a": "0a", + "0x000000000000000000000000000000000000000000000000000000000000000b": "0b" + }, + "key": "0xa87387b50b481431c6ccdb9ae99a54d4dcdd4a3eff75d7b17b4818f7bbfc21e9" + }, + "0xab897fbdedfa502b2d839b6a56100887dccdc507": { + "balance": "1", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x4820bb882769542573c3273a356cdf79509f1d766bebe224e0176027bececde0" + }, + "0xac7d8d5f6be7d251ec843ddbc09095150df59965": { + "balance": "0", + "nonce": 1, + "root": "0xbe8ec2d17b60d9f97cea6c173b3dbd770087f5a6e60d19a298b95394c21f0518", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000012": "12", + "0x0000000000000000000000000000000000000000000000000000000000000013": "13", + "0x0000000000000000000000000000000000000000000000000000000000000014": "14" + }, + "key": "0x943f42ad91e8019f75695946d491bb95729f0dfc5dbbb953a7239ac73f208943" + }, + "0xaceac762ff518b4cf93a6eebbc55987e7b79b2ce": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x1960414a11f8896c7fc4243aba7ed8179b0bc6979b7c25da7557b17f5dee7bf7" + }, + "0xbd079b0337a29cccd2ec95b395ef5c01e992b6a5": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xf0877d51b7712e08f2a3c96cddf50ff61b8b90f80b8b9817ea613a8a157b0c45" + }, + "0xbeead77994cf573341ec17b58bbf7eb34d2711c9": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xc174776d918b1a2e2cbd7b8a563cbc33173da70a4e77aebbb0952effcc36c36c" + }, + "0xc555eab45d08845ae9f10d452a99bfcb06f74a50": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xb97af8f2772e1121d3366b93225c380f5d24ce0ca6282ff44fc2df6b7d3aa752" + }, + "0xc7b99a164efd027a93f147376cc7da7c67c6bbe0": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x8e11480987056c309d7064ebbd887f086d815353cdbaadb796891ed25f8dcf61" + }, + "0xca358758f6d27e6cf45272937977a748fd88391d": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xbccd3d2f920dfb8d70a38c9ccd5ed68c2ef6e3372199381767ce222f13f36c87" + }, + "0xcb925b74da97bdff2130523c2a788d4beff7b3c3": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xe0c5acf66bda927704953fdf7fb4b99e116857121c069eca7fb9bd8acfc25434" + }, + "0xd803681e487e6ac18053afc5a6cd813c86ec3e4d": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xe5302e42ca6111d3515cbbb2225265077da41d997f069a6c492fa3fcb0fdf284" + }, + "0xdbc1b4c900ffe48d575b5da5c638040125f65db0": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x995b33ae040da0c5f99aa59ebd7721b45f18a571f31d1b9a0031f0fa02bd5b8c" + }, + "0xdc0e9c3658a1a3ed1ec94274d8b19925c93e1abb": { + "balance": "100000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x162caeb6f4614eea1163b2b83532c5e8ec136c7decd670d9dc71178ae24fcad6" + }, + "0xe52d9c508c502347344d8c07ad91cbd6068afc75": { + "balance": "1", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x0bb97f0c98c8ab66aa030bac607bd9200e044af5f9cc264e7425a8f8c055a38c" + }, + "0xe75db02929f3d5d7c28ecdb064ece929602c06bd": { + "balance": "0", + "nonce": 1, + "root": "0xfb003b3fa872d81e27dfc518a7c5259266de596921a134eb126566d89af2897c", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000008": "08", + "0x0000000000000000000000000000000000000000000000000000000000000009": "09", + "0x000000000000000000000000000000000000000000000000000000000000000a": "0a" + }, + "key": "0x600a7a5f41a67f6f759dcb664198f1c5d9b657fb51a870ce9e234e686dff008e" + }, + "0xe77b9a9ae9e30b0dbdb6f510a264ef9de781501d": { + "balance": "100000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xfd49996b0d72194c9e3df568565e0c7fdeca12a938f4b34d31fb5fd29010ea57" + }, + "0xe7cf46a078fed4fafd0b5e3aff144802b853f8ae": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x5af4ab1c2ead917302447c766127a82a0e314bc5b0d83721177d5a29b3c397e8" + }, + "0xe7d13f7aa2a838d24c59b40186a0aca1e21cffcc": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xec3e92967d10ac66eff64a5697258b8acf87e661962b2938a0edcd78788f360d" + }, + "0xe82c38488eded9fb72a5ed9e039404c537f20b13": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x7a2464bc24d90557940e93a3b73308ea354ed7d988be720c545974a17959f93f" + }, + "0xe99c76a6c3b831a926ab623476d2ec14560c09b4": { + "balance": "0", + "nonce": 1, + "root": "0x491b2cfba976b2e78bd9be3bc15c9964927205fc34c9954a4d61bbe8170ba533", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000005": "05", + "0x0000000000000000000000000000000000000000000000000000000000000006": "06", + "0x0000000000000000000000000000000000000000000000000000000000000007": "07" + }, + "key": "0x6641e3ed1f264cf275b53bb7012dabecf4c1fca700e3db989e314c24cc167074" + }, + "0xebf37af41b6d7913aed3b9cc650d1e8f58a3d785": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x209b102e507b8dfc6acfe2cf55f4133b9209357af679a6d507e6ee87112bfe10" + }, + "0xeda8645ba6948855e3b3cd596bbb07596d59c603": { + "balance": "1000000000000000000000000000000000000", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xabd8afe9fbf5eaa36c506d7c8a2d48a35d013472f8182816be9c833be35e50da" + }, + "0xef6cbd2161eaea7943ce8693b9824d23d1793ffb": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0xce732a5e3b88ae26790aeb390a2bc02c449fdf57665c6d2c2b0dbce338c4377e" + }, + "0xf068ae4089a66c79afe47d6e513f718838d8f73f": { + "balance": "0", + "nonce": 1, + "root": "0x4f446329b5ee3d13d4f6b5e5f210ddc2d90fedba384b950e36a1d19af95c5cb1", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x000000000000000000000000000000000000000000000000000000000000000f": "0f", + "0x0000000000000000000000000000000000000000000000000000000000000010": "10", + "0x0000000000000000000000000000000000000000000000000000000000000011": "11" + }, + "key": "0x37310559ceaade42e45b3e3f05925aadca9e60aeeb9dd60d824875d9e9e71e26" + }, + "0xf299791cddd3d6664f6670842812ef6053eb6501": { + "balance": "100000000001", + "nonce": 0, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x8d23507f805e3f567b357c2abebfa184b0f0610e9716e5ca6999181294417294" + }, + "0xf5347043ae5fca9412ca2c72aee17a1d3ba37691": { + "balance": "0", + "nonce": 1, + "root": "0x0fd8e99b1b4ab4eb8c6c2218221ae6978cc67433341ed8a1ad6185d34fa82c61", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000014": "14", + "0x0000000000000000000000000000000000000000000000000000000000000015": "15", + "0x0000000000000000000000000000000000000000000000000000000000000016": "16" + }, + "key": "0xa5541b637a896d30688a80b7affda987d9597aac7ccd9799c15999a1d7d094e2" + }, + "0xf7eaadcf76ffcf006a86deb2f17d0b8fe0b211a8": { + "balance": "0", + "nonce": 1, + "root": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "key": "0x1dff76635b74ddba16bba3054cc568eed2571ea6becaabd0592b980463f157e2" + } + } +} \ No newline at end of file diff --git a/chain/txinfo.json b/chain/txinfo.json new file mode 100644 index 0000000..3ac1f2d --- /dev/null +++ b/chain/txinfo.json @@ -0,0 +1,482 @@ +{ + "deploy-callenv": { + "contract": "0x9344b07175800259691961298ca11c824e65032d", + "block": "0x1" + }, + "deploy-callme": { + "contract": "0x17e7eedce4ac02ef114a7ed9fe6e2f33feba1667", + "block": "0x1" + }, + "randomcode": null, + "randomlogs": null, + "randomstorage": null, + "uncles": {}, + "valuetransfer": [ + { + "block": "0x2", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x5", + "to": "0xdbc1b4c900ffe48d575b5da5c638040125f65db0", + "gas": "0x5208", + "gasPrice": "0x2dbaf55e", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd10a0", + "r": "0xf56efacf12f59e32de4617907d00b316bffa5755d27e6e2396af5eaa575fbeed", + "s": "0x674037a58b9c1337cb254f7c4aceaf72774a013e1df5eb8e15ba1c2b85d98fb1", + "hash": "0x819b41085a5ec1e1681208b67522bc7a4cc52fe339c53daff98b336db2c257c6" + } + }, + { + "block": "0x3", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x2", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x9", + "to": "0x084fed08b978af4d7d196a7446a86b58009e636b", + "gas": "0x5208", + "gasPrice": null, + "maxPriorityFeePerGas": "0x1", + "maxFeePerGas": "0x28150197", + "value": "0x1", + "input": "0x", + "accessList": [], + "v": "0x1", + "r": "0xe8eae07c6a14387d0f0423ddb4e43f3953450e9eb1616123013fb7ff3566b710", + "s": "0x3bd57622a15f6f436f49ad1ad6ba42d8878e19d6acc75a290ab07e9167e64e92", + "yParity": "0x1", + "hash": "0x4b63b990f672e35f82d2583aeecf21daee95e19152b360127e47ab7659d91eb5" + } + }, + { + "block": "0x4", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0xd", + "to": "0xe52d9c508c502347344d8c07ad91cbd6068afc75", + "gas": "0x5208", + "gasPrice": "0x23205935", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd10a0", + "r": "0xeaaee4f3b2c6135cc4d96964b0add4da5194de68e33e04918be0dc1b7ef49ea6", + "s": "0x317a6b7b4399503709da9a3b88e8ee10c4ae200503048b268441b30ae458f826", + "hash": "0x4bc74764b2c8291df42d620bfd09b5e9de2e945ed5783234ef09a4aed45a074a" + } + }, + { + "block": "0x6", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x2", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x11", + "to": "0x67586e98fad27da0b9968bc039a1ef34c939b9b8", + "gas": "0x5208", + "gasPrice": null, + "maxPriorityFeePerGas": "0x1", + "maxFeePerGas": "0x1b01db79", + "value": "0x1", + "input": "0x", + "accessList": [], + "v": "0x0", + "r": "0xc5201dad4f70bdeedbf7913f7a6750c60cd1e384dbb93abeaf0df3fa0fbff113", + "s": "0x47a94199af729f5299a57587b8a814dde0e8bee0e888a3067e8b69df41068969", + "yParity": "0x0", + "hash": "0x89068fc266f7e37228a98361ac35c7059db6a56b9aec282ff547447cacaba6d4" + } + }, + { + "block": "0x7", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x15", + "to": "0xca358758f6d27e6cf45272937977a748fd88391d", + "gas": "0x5208", + "gasPrice": "0x17a9633b", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd10a0", + "r": "0x721efc71ebfb7f91f81599d390d3f15dd306f8eebd4cc38a03d31c33f212550d", + "s": "0x15f718a158edda00799cece7846efb21aea2c33a015fcfea608c5e16489a4fec", + "hash": "0x058d98d277f386fb5f8828b3ff0555c84d3a331fa133072f2ca1f1e4c724a17f" + } + }, + { + "block": "0x8", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x2", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x19", + "to": "0xbeead77994cf573341ec17b58bbf7eb34d2711c9", + "gas": "0x5208", + "gasPrice": null, + "maxPriorityFeePerGas": "0x1", + "maxFeePerGas": "0x14bd39f0", + "value": "0x1", + "input": "0x", + "accessList": [], + "v": "0x0", + "r": "0xb4853d5b74312beb1aa52816480c2dc83fe22799340bf0a81224421127252a30", + "s": "0x39ebd14a8e945f4b7679cb2dcd8df004114354135cfe462c7e757c1d5a870ea", + "yParity": "0x0", + "hash": "0x34347436ff9ba1cf741e4d2d9abef1811d5ea12c0b5674c2c4a527660489ac05" + } + }, + { + "block": "0x9", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x1d", + "to": "0x2b4c342f5433ebe591a1da77e013d1b72475562d", + "gas": "0x5208", + "gasPrice": "0x122ccce3", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd109f", + "r": "0xb3ecfc55d8c753c3ee1f29d49c8e57e3ff060931a4f46be131b1eef933ed6751", + "s": "0x4a4ee7ad152e26f6174b6b5ccb34435b33c8bc567965b580b6efa68897753c0", + "hash": "0xae72e9abfc376ae843772f66f847007ca896ac2cf2f2533e7fc97aef23eccb1b" + } + }, + { + "block": "0xb", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x2", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x21", + "to": "0xe7cf46a078fed4fafd0b5e3aff144802b853f8ae", + "gas": "0x5208", + "gasPrice": null, + "maxPriorityFeePerGas": "0x1", + "maxFeePerGas": "0xdf95a2b", + "value": "0x1", + "input": "0x", + "accessList": [], + "v": "0x1", + "r": "0xc6536e38609b251d38a96256914a434563fa1f1a4e861c7b7e823e390f4846bb", + "s": "0x4b45e7d06138b84fb3c2874090ee6be903b2934f40380c0d000237ff93699c17", + "yParity": "0x1", + "hash": "0xd23149acccde14028be39ebc92e71928ea4263b710e1161f1a5dc63d2e8575c2" + } + }, + { + "block": "0xc", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x25", + "to": "0xef6cbd2161eaea7943ce8693b9824d23d1793ffb", + "gas": "0x5208", + "gasPrice": "0xc3e331b", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd10a0", + "r": "0xa705c78ec0a2145437cb8d80b557b4a68306f517069a0da4068f751121ad8053", + "s": "0x4283ed8ef96b5c0ea7b0e6a1fe8af51ae1a3c1c381a107444f74f8eb96c9d3ba", + "hash": "0x577abfe1136ab018284c3bd7ee0e70315b5f46c35692628d79230d0a759593ca" + } + }, + { + "block": "0xd", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x2", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x29", + "to": "0x9d1e0e2d9459d06523ad13e28a4093c2316baafe", + "gas": "0x5208", + "gasPrice": null, + "maxPriorityFeePerGas": "0x1", + "maxFeePerGas": "0xabb1675", + "value": "0x1", + "input": "0x", + "accessList": [], + "v": "0x0", + "r": "0xd121d882eb5897b34186f8faa547a5858b44643e66ff4d1d240bce56575bf609", + "s": "0x7ea4f61f60b6a878d34bf56304536242a12290c28882ed658609a5da53aa65e4", + "yParity": "0x0", + "hash": "0x810d3beb8bc3ac50dbb551caed55d5a5ee00858fa0be8098671ebbcdf19c4c69" + } + }, + { + "block": "0xe", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x2d", + "to": "0x4d7b3ef7300acf70c892d8327db8272f54434adb", + "gas": "0x5208", + "gasPrice": "0x96770f9", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd109f", + "r": "0x11373ac922c1ff9d9644e16508e3c379e9a4b3fde58e1caafcc614ebd770625", + "s": "0x7ff2bb7c2981d1d9069120205ff50b76ad2722ab246634362d03df2f27a15a0d", + "hash": "0x81e777a4df37437e42be2acc4e14dbe7e9f7af235f98dc871c4ea34ab4bdfbca" + } + }, + { + "block": "0x10", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x2", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x31", + "to": "0xc555eab45d08845ae9f10d452a99bfcb06f74a50", + "gas": "0x5208", + "gasPrice": null, + "maxPriorityFeePerGas": "0x1", + "maxFeePerGas": "0x73afc44", + "value": "0x1", + "input": "0x", + "accessList": [], + "v": "0x1", + "r": "0x60a04bd7e4b1b6d564787f27fc7c251e0f54a3c58646a4056792bc64b45c4d6a", + "s": "0x62b2f36906d107aae34d98b518d71a56c282b5b1538957b0d83406e4d5f1f72", + "yParity": "0x1", + "hash": "0xced7817b25f17b5c6c302f7858106ba63e0b5f6ea4f0be0aad0c1144047c9d4f" + } + }, + { + "block": "0x11", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x35", + "to": "0x4a64a107f0cb32536e5bce6c98c393db21cca7f4", + "gas": "0x5208", + "gasPrice": "0x655b0bf", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd109f", + "r": "0xdcde3c44033f0551d309b953be41b83cf88662bf5b6ebf13f3fcd3f9898d1cfa", + "s": "0x6ba5b7028fa9af5a011647568b965c62d5c96dd60f642beb3915bd271692752c", + "hash": "0x35a4729116ffd36ecfee52b4068c6ffde016e42220462d62e75a7853f1f092f2" + } + }, + { + "block": "0x12", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x2", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x39", + "to": "0xf299791cddd3d6664f6670842812ef6053eb6501", + "gas": "0x5208", + "gasPrice": null, + "maxPriorityFeePerGas": "0x1", + "maxFeePerGas": "0x58d6451", + "value": "0x1", + "input": "0x", + "accessList": [], + "v": "0x1", + "r": "0xb82548138e0db708b09a0e9f3fbdf15e222a78a4e972e515e2e17b451e569994", + "s": "0x10124056226ae278c6e5149bd2aed9f9f2ce06be1dd4e79e09c381ec39926216", + "yParity": "0x1", + "hash": "0xdbf4b48030e9fdbe6074146fd6c4f4f155046643890a1a21c93b4b78e1966baa" + } + }, + { + "block": "0x13", + "sender": "0x7435ed30a8b4aeb0877cef0c6e8cffe834eb865f", + "tx": { + "type": "0x0", + "chainId": "0xc72dd9d5e883e", + "nonce": "0x3d", + "to": "0xab897fbdedfa502b2d839b6a56100887dccdc507", + "gas": "0x5208", + "gasPrice": "0x4dda71d", + "maxPriorityFeePerGas": null, + "maxFeePerGas": null, + "value": "0x1", + "input": "0x", + "v": "0x18e5bb3abd109f", + "r": "0x7e0459413628dffa73cfea7d3d0a7b5d7ec804c9de53a74f6b0ac7ea4968ab9", + "s": "0x79767bae11369b7cda26a51350773e515fdc65a67e346ed6585cb29e7b749575", + "hash": "0xd998632f6ec3c3f74619199f99497610544b3131c17c64317c36f83415617137" + } + } + ], + "withdrawals": { + "10": { + "withdrawals": [ + { + "index": "0x6", + "validatorIndex": "0x5", + "address": "0x01ba4719c80b6fe911b091a7c05124b64eeece96", + "amount": "0x64" + } + ] + }, + "11": { + "withdrawals": [ + { + "index": "0x7", + "validatorIndex": "0x5", + "address": "0xe7cf46a078fed4fafd0b5e3aff144802b853f8ae", + "amount": "0x64" + } + ] + }, + "12": { + "withdrawals": [ + { + "index": "0x8", + "validatorIndex": "0x5", + "address": "0xef6cbd2161eaea7943ce8693b9824d23d1793ffb", + "amount": "0x64" + } + ] + }, + "13": { + "withdrawals": [ + { + "index": "0x9", + "validatorIndex": "0x5", + "address": "0x9d1e0e2d9459d06523ad13e28a4093c2316baafe", + "amount": "0x64" + } + ] + }, + "15": { + "withdrawals": [ + { + "index": "0xa", + "validatorIndex": "0x5", + "address": "0xdc0e9c3658a1a3ed1ec94274d8b19925c93e1abb", + "amount": "0x64" + } + ] + }, + "16": { + "withdrawals": [ + { + "index": "0xb", + "validatorIndex": "0x5", + "address": "0xc555eab45d08845ae9f10d452a99bfcb06f74a50", + "amount": "0x64" + } + ] + }, + "17": { + "withdrawals": [ + { + "index": "0xc", + "validatorIndex": "0x5", + "address": "0x4a64a107f0cb32536e5bce6c98c393db21cca7f4", + "amount": "0x64" + } + ] + }, + "18": { + "withdrawals": [ + { + "index": "0xd", + "validatorIndex": "0x5", + "address": "0xf299791cddd3d6664f6670842812ef6053eb6501", + "amount": "0x64" + } + ] + }, + "2": { + "withdrawals": [ + { + "index": "0x0", + "validatorIndex": "0x5", + "address": "0xdbc1b4c900ffe48d575b5da5c638040125f65db0", + "amount": "0x64" + } + ] + }, + "20": { + "withdrawals": [ + { + "index": "0xe", + "validatorIndex": "0x5", + "address": "0x83891d7fe85c33e52c8b4e5814c92fb6a3b94672", + "amount": "0x64" + } + ] + }, + "3": { + "withdrawals": [ + { + "index": "0x1", + "validatorIndex": "0x5", + "address": "0x084fed08b978af4d7d196a7446a86b58009e636b", + "amount": "0x64" + } + ] + }, + "5": { + "withdrawals": [ + { + "index": "0x2", + "validatorIndex": "0x5", + "address": "0xe77b9a9ae9e30b0dbdb6f510a264ef9de781501d", + "amount": "0x64" + } + ] + }, + "6": { + "withdrawals": [ + { + "index": "0x3", + "validatorIndex": "0x5", + "address": "0x67586e98fad27da0b9968bc039a1ef34c939b9b8", + "amount": "0x64" + } + ] + }, + "7": { + "withdrawals": [ + { + "index": "0x4", + "validatorIndex": "0x5", + "address": "0xca358758f6d27e6cf45272937977a748fd88391d", + "amount": "0x64" + } + ] + }, + "8": { + "withdrawals": [ + { + "index": "0x5", + "validatorIndex": "0x5", + "address": "0xbeead77994cf573341ec17b58bbf7eb34d2711c9", + "amount": "0x64" + } + ] + } + } +} \ No newline at end of file diff --git a/client.go b/client.go index d33d3ac..1f4c7a2 100644 --- a/client.go +++ b/client.go @@ -3,16 +3,15 @@ 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" @@ -28,8 +27,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 +39,6 @@ type gethClient struct { cmd *exec.Cmd path string workdir string - blocks []*types.Block - genesis *core.Genesis jwt []byte } @@ -50,17 +46,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 +60,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 +79,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. @@ -184,40 +174,14 @@ 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) { +// readBlocks reads a chain.rlp file to a slice of Block. +func readBlocks(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) 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..af70d04 100644 --- a/generate.go +++ b/generate.go @@ -2,18 +2,11 @@ package main import ( "context" - "encoding/json" "errors" "fmt" "os" "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/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/trie" @@ -26,13 +19,13 @@ 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 } // Start Ethereum client. - client, err := spawnClient(ctx, args, chain) + client, err := spawnClient(ctx, args) if err != nil { return err } @@ -75,7 +68,7 @@ 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) @@ -88,70 +81,11 @@ func runGenerator(ctx context.Context) error { 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 _, err := chain.bc.InsertChain(chain.blocks); err != nil { - return nil, err - } - return &chain, 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 +94,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 } diff --git a/go.mod b/go.mod index 87820d8..e488e0d 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,102 @@ 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/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.17.0 // indirect + golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.18.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.15.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..f0ff1d1 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= @@ -12,8 +11,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 +24,50 @@ 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/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 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= 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 +77,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 +97,45 @@ 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.7 h1:71qnF0T75JuxLqLt0Qj6eZrB//awJ/yqpUPXQAaBFmA= +github.com/ethereum/go-ethereum v1.13.7/go.mod h1:sc48XYQxCzH3fG9BcrXCOOgQk2JfZzNAmIKnceogzsA= +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= @@ -116,9 +147,10 @@ github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7a 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 h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= 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,42 @@ 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/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 +225,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 +246,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 +255,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 +275,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 +301,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 +323,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= @@ -276,12 +345,15 @@ 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= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -302,13 +374,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 +391,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 +417,24 @@ 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/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/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 +443,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 +461,15 @@ 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/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 +479,9 @@ 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/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 +493,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 +513,32 @@ 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/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 +548,14 @@ 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/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 +591,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 +606,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..a05b141 --- /dev/null +++ b/mkchain.sh @@ -0,0 +1,8 @@ +mkdir -p chain/ +~/bin/hivechain generate \ + -outdir chain/ \ + -length 20 \ + -tx-count 4 \ + -tx-interval 1 \ + -fork-interval 0 \ + -outputs genesis,chain,forkenv,headstate,txinfo,accounts diff --git a/testgen/chain.go b/testgen/chain.go new file mode 100644 index 0000000..18ff42b --- /dev/null +++ b/testgen/chain.go @@ -0,0 +1,258 @@ +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 which can read a hivechain +// created 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 + config *params.ChainConfig +} + +// NewChain takes the given chain.rlp file, and decodes 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 + } + return &Chain{ + genesis: gen, + blocks: blocks, + state: state, + senders: accounts, + 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 := c.state[addr].Storage[slot] + return hexutil.MustDecode("0x" + v) +} + +// 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 state: %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 +} diff --git a/testgen/generators.go b/testgen/generators.go index a450b5b..d0bfc9a 100644 --- a/testgen/generators.go +++ b/testgen/generators.go @@ -3,7 +3,6 @@ package testgen import ( "bytes" "context" - "crypto/ecdsa" "errors" "fmt" "math/big" @@ -13,7 +12,6 @@ import ( "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/ethclient" @@ -23,26 +21,26 @@ import ( ) var ( - addr common.Address - pk *ecdsa.PrivateKey - - contract = common.HexToAddress("0000000000000000000000000000000000031ec7") + pk, _ = crypto.HexToECDSA("9c647b8b7c4e7c3490668fb6c11473619db80c93704c70893d3813af4090c39c") + addr = crypto.PubkeyToAddress(pk.PublicKey) // 658bdf435d810c91414ec09147daa6db62406379 ) -func init() { - pk, _ = crypto.HexToECDSA("9c647b8b7c4e7c3490668fb6c11473619db80c93704c70893d3813af4090c39c") - addr = crypto.PubkeyToAddress(pk.PublicKey) // 658bdf435d810c91414ec09147daa6db62406379 -} +var ( + // This is the address of an existing contract in the chain, which has code and some storage slots. + contractAddr = common.HexToAddress("0x000f3df6d732807ef1319fb7b8bb8522d0beac02") +) 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 +62,8 @@ var AllMethods = []MethodTests{ EthBlockNumber, EthGetBlockByNumber, EthGetBlockByHash, - // EthGetHeaderByNumber, - // EthGetHeaderByHash, + EthGetHeaderByNumber, + EthGetHeaderByHash, EthGetProof, EthChainID, EthGetBalance, @@ -105,7 +103,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 @@ -147,8 +145,8 @@ var EthGetHeaderByNumber = MethodTests{ 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,7 +163,7 @@ var EthGetHeaderByHash = MethodTests{ "get-header-by-hash", "gets a header by hash", func(ctx context.Context, t *T) error { - want := t.chain.GetHeaderByNumber(1) + want := t.chain.GetBlock(1).Header() var got *types.Header err := t.rpc.CallContext(ctx, got, "eth_getHeaderByHash", want.Hash()) if err != nil { @@ -194,8 +192,7 @@ var EthGetCode = MethodTests{ if err != nil { return err } - state, _ := t.chain.State() - want := state.GetCode(addr) + want := t.chain.state[addr].Code if !bytes.Equal(got, want) { return fmt.Errorf("unexpected code (got: %s, want %s)", got, want) } @@ -219,9 +216,8 @@ var EthGetStorage = MethodTests{ 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) } return nil @@ -238,7 +234,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 @@ -287,9 +283,8 @@ var EthGetBalance = MethodTests{ 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 @@ -300,18 +295,19 @@ var EthGetBalance = MethodTests{ "retrieves the an account's balance at a specific blockhash", func(ctx context.Context, t *T) error { var ( - block = t.chain.GetBlockByNumber(1) + block = t.chain.GetBlock(1) addr = common.Address{0xaa} 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) - } + // TODO: fix + // 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) + // } return nil }, }, @@ -326,7 +322,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 } @@ -382,7 +378,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 } @@ -551,23 +547,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 +581,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("", 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 +619,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 +643,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,16 +666,14 @@ var EthGetTransactionCount = MethodTests{ "eth_getTransactionCount", []Test{ { - "get-account-nonce", - "gets nonce for a certain account", + "get-contract-nonce", + "gets nonce for a known contract account", func(ctx context.Context, t *T) error { - addr := common.Address{0xaa} - got, err := t.eth.NonceAt(ctx, addr, nil) + got, err := t.eth.NonceAt(ctx, contractAddr, 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) } @@ -689,6 +683,18 @@ var EthGetTransactionCount = MethodTests{ }, } +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 +703,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 +718,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 +733,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 +748,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 +765,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 @@ -770,7 +780,7 @@ var EthGetTransactionByHash = MethodTests{ }, { "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 +791,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 +809,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 +826,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 +844,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 +859,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 +879,25 @@ 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-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 +908,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 +931,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 +953,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 +972,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 +983,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 +1018,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,21 +1037,21 @@ 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 }, }, @@ -1043,24 +1059,23 @@ var EthSendRawTransaction = MethodTests{ "send-dynamic-fee-transaction", "sends a 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 +1083,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: &contractAddr, Gas: 90000, - GasPrice: genesis.BaseFee(), + GasPrice: basefee, Data: common.FromHex("0xa9059cbb000000000000000000000000cff33720980c026cc155dcb366861477e988fd870000000000000000000000000000000000000000000000000000000002fd6892"), // transfer(address to, uint256 value) AccessList: types.AccessList{ - {Address: contract, StorageKeys: []common.Hash{{0}, {1}}}, + {Address: contractAddr, 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 +1108,25 @@ 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: &contractAddr, Gas: 80000, GasTipCap: big.NewInt(500), - GasFeeCap: fee, + GasFeeCap: basefee, Data: common.FromHex("0xa9059cbb000000000000000000000000cff33720980c026cc155dcb366861477e988fd870000000000000000000000000000000000000000000000000000000002fd6892"), // transfer(address to, uint256 value) AccessList: types.AccessList{ - {Address: contract, StorageKeys: []common.Hash{{0}, {1}}}, + {Address: contractAddr, 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 }, }, @@ -1160,12 +1175,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 +1233,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()) } @@ -1233,8 +1256,7 @@ var EthGetProof = MethodTests{ if err != nil { return err } - state, _ := t.chain.State() - balance := state.GetBalance(addr) + balance := t.chain.Balance(addr) if result.Balance.Cmp(balance) != 0 { return fmt.Errorf("unexpected balance (got: %s, want: %s)", result.Balance, balance) } @@ -1250,11 +1272,10 @@ var EthGetProof = MethodTests{ 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", addr, []string{}, t.chain.Head().Hash()); err != nil { return err } - state, _ := t.chain.State() - balance := state.GetBalance(addr) + balance := t.chain.Balance(addr) if result.Balance.ToInt().Cmp(balance) != 0 { return fmt.Errorf("unexpected balance (got: %s, want: %s)", result.Balance, balance) } @@ -1270,8 +1291,7 @@ var EthGetProof = MethodTests{ if err != nil { return err } - state, _ := t.chain.State() - balance := state.GetBalance(addr) + balance := t.chain.Balance(addr) if result.Balance.Cmp(balance) != 0 { return fmt.Errorf("unexpected balance (got: %s, want: %s)", result.Balance, balance) } @@ -1400,7 +1420,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 -}