lotus/node
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
..
bundle chore: build: Merge/v22 into 21 for 23 (#10702) 2023-04-19 18:40:18 -04:00
config Add comment stating msgIndex is an experimental feature 2023-06-09 11:46:27 -05:00
hello deprecate MarketListRetrievalDeals, make gen 2023-03-08 17:15:16 +01:00
impl Add EIP-1898 support needed for The Graph compatibility 2023-06-20 09:38:00 +00:00
modules Prefill GetTipsetByHeight skiplist cache on lotus startup 2023-06-06 15:17:34 -05:00
repo refactor: stop using deprecated io/ioutil 2023-03-29 15:40:49 -04:00
builder_chain.go make MsgIndex configurable, disabled by default. 2023-03-13 12:01:04 +02:00
builder_miner.go fix: Add lotus-miner legacy-markets alert 2023-05-15 13:13:06 +02:00
builder.go Add FVM_CONCURRENCY alert 2023-05-31 09:39:03 -04:00
fxlog.go chore: fix imports 2022-06-14 17:00:51 +02:00
health.go Don't use go-libp2p-core 2022-08-25 14:20:41 -04:00
options.go fix linter 2022-10-14 11:23:05 +02:00
rpc.go fix: should not serve non v0 api in v1 2023-01-31 17:06:02 -05:00
shutdown_test.go fix make gen 2022-08-29 16:25:30 +02:00
shutdown.go Set notifications for SIGTERM and SIGINT when we start the cli 2022-12-15 12:54:41 -05:00
testopts.go enable libp2p options 2021-06-30 12:55:43 +02:00