lotus/node/impl
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
..
client chore: all: migrate from go-libipfs to boxo 2023-04-18 17:22:18 +02:00
common feat: Add node uptime rpc / output in info command 2022-10-11 10:11:09 +02:00
full Add EIP-1898 support needed for The Graph compatibility 2023-06-20 09:38:00 +00:00
market chore: fix imports 2022-06-14 17:00:51 +02:00
net return all the public addresses in NatInfo 2023-05-10 11:54:48 +03:00
paych chore: fix imports 2022-06-14 17:00:51 +02:00
backup.go Plumb contexts through 2021-12-11 17:04:00 -05:00
full.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
remoteworker.go storage: Move extern/sector-storage to storage/sealer 2022-06-14 20:03:38 +02:00
storminer.go Add API and CLI to unseal sector (#10626) 2023-04-17 12:12:15 -04:00