lotus/node/impl/full
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
..
chain.go chore: all: migrate from go-libipfs to boxo 2023-04-18 17:22:18 +02:00
dummy.go Add EIP-1898 support needed for The Graph compatibility 2023-06-20 09:38:00 +00:00
eth_test.go fix: eth: ensure that the event topics are non-nil 2023-06-12 14:25:02 -07:00
eth.go Add EIP-1898 support needed for The Graph compatibility 2023-06-20 09:38:00 +00:00
gas_test.go fix make gen 2022-08-29 16:25:30 +02:00
gas.go Add tests for PCB/PCA batch splitting 2023-04-19 18:44:32 -04:00
mpool.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
multisig.go introduce v9 actors and nv17 2022-09-09 21:40:15 -04:00
raft.go Address comments 2022-11-14 15:46:58 -05:00
state.go opt: MinerInfo adds the PendingOwnerAddress field 2023-05-30 13:04:11 +08:00
sync.go fix: supply extra params for ReportConsensusFaultParams 2023-06-09 10:15:14 +08:00
wallet.go fix: Don't call WalletExport in msg signing flows 2023-02-10 02:37:59 +01:00