lotus/itests/kit
Fridrik Asmundsson f358160cd5 Add EIP-1898 support needed for The Graph compatibility
Fixes: #10814

This PR updates the following RPC methods according to EIP-1898
specs.

The following RPC methods are affected:

- eth_getBalance
- eth_getStorageAt
- eth_getTransactionCount
- eth_getCode
- eth_call

Note that eth_getBlockByNumber was not included in this list in
the spec although it seems it should be affected also?

Currently these methods all accept a blkParam string which can be
one of "latest", "earliest", "pending", or a block number (decimal
or hex). The spec enables caller to additionally specify a json
hash which can include the following fields:

- blockNumber EthUint64: A block number (decimal or hex) which is
  similar to the original use of the blkParam string
- blockHash EthHash: The block hash
- requireCanonical bool) If true we should make sure the block is
  in the canonical chain

Since the blkParam needs to support both being a number/string and
a json hash then this to properly work we need to introduce a new
struct with pointer fields to check if they exist. This is done
in the EthBlockParamByNumberOrHash struct which first tries to
unmarshal as a json hash (according to eip-1898) and then fallback
to unmarshal as string/number.
2023-06-20 09:38:00 +00:00
..
blockminer.go feat: itest: force PoSt more aggressively around deadline closure 2023-05-29 16:32:49 -04:00
circuit.go fix make gen 2022-08-29 16:25:30 +02:00
client.go feat: make RunClientTest louder when deals fail 2023-05-03 16:49:23 -04:00
control.go chore: fix imports 2022-06-14 17:00:51 +02:00
deals_state.go integrate store-the-hash 2021-11-18 12:07:12 +04:00
deals.go chore: all: migrate from go-libipfs to boxo 2023-04-18 17:22:18 +02:00
ensemble_opts_nv.go feat: itests should run on latest network version 2023-04-23 13:59:14 -04:00
ensemble_opts.go chore: refactor: rename NewestNetworkVersion 2022-09-21 15:48:51 -04:00
ensemble_presets.go post workers: Cleanup, tests 2022-01-14 14:17:52 +01:00
ensemble.go chore: build: Merge/v22 into 21 for 23 (#10702) 2023-04-19 18:40:18 -04:00
evm.go Add EIP-1898 support needed for The Graph compatibility 2023-06-20 09:38:00 +00:00
files.go chore: all: migrate from go-libipfs to boxo 2023-04-18 17:22:18 +02:00
funds.go chore: fix imports 2022-06-14 17:00:51 +02:00
init.go Revert "Merge pull request #9858 from adlrocha/adlrocha/consistent-bcast" 2023-04-27 12:25:30 -07:00
itestd.go feat: shed: ItestD 2022-03-10 19:39:10 +01:00
log.go Add filter block range tests 2023-01-19 11:49:07 +00:00
mockcli.go chore: fix imports 2022-06-14 17:00:51 +02:00
node_full.go itests: Fix TestEthSubscribeLogs 2023-01-31 10:28:12 +01:00
node_miner.go refactor: stop using deprecated io/ioutil 2023-03-29 15:40:49 -04:00
node_opts.go Set default path for eth event db, set it to enabled by default if EnableEthRPC is set 2023-01-19 18:40:28 -05:00
node_worker.go refactor: stop using deprecated io/ioutil 2023-03-29 15:40:49 -04:00
rpc.go itests: Test PoSt worker RPC error handling 2023-03-06 14:30:22 +01:00
run.go declare some tests as expensive. 2021-06-23 16:37:43 +01:00
solidity.go refactor: use EthHash for event topics 2023-02-10 07:41:29 -08:00
state.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00