lotus/chain
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
..
actors feat: miner cli: sectors list upgrade-bounds tool 2023-05-26 12:29:36 +02:00
beacon Merge remote-tracking branch 'origin/master' into feat/go-data-transfer-v2 2023-03-15 11:37:53 +01:00
consensus Merge branch 'releases' into asr/merge-release-into-master 2023-04-23 14:58:50 -04:00
ethhashlookup simplify transaction hash db queries, prevent fd leaks 2023-01-30 11:03:12 -05:00
events feat: chainstore: exit early in MaybeTakeHeavierTipset 2023-05-05 13:56:48 -04:00
exchange fix: error checks 2023-01-04 20:10:21 +08:00
gen fix: chain error 2023-06-13 09:46:36 +08:00
index fix: improve perf of msgindex backfill 2023-06-01 14:36:05 +00:00
market Address simple linter issues 2022-11-24 16:32:27 +00:00
messagepool Merge pull request #10650 from filecoin-project/vyzo/test/mpool-select 2023-05-30 17:00:06 +02:00
messagesigner fix: Don't call WalletExport in msg signing flows 2023-02-10 02:37:59 +01:00
rand fix make gen 2022-08-29 16:25:30 +02:00
state feat: Introduce nv19 skeleton 2023-03-29 16:13:41 -04:00
stmgr Merge pull request #10628 from filecoin-project/asr/exec-trace-compute 2023-05-29 12:56:43 -04:00
store Appease the linter 2023-05-19 20:02:47 +02:00
sub fix: pubsub: do not treat ErrExistingNonce as Reject 2023-06-13 10:13:24 -04:00
types Add EIP-1898 support needed for The Graph compatibility 2023-06-20 09:38:00 +00:00
vectors NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
vm chore: all: migrate from go-libipfs to boxo 2023-04-18 17:22:18 +02:00
wallet NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
badtscache.go refactor: update cache to the new generic version (#10463) 2023-03-13 15:29:09 -07:00
block_receipt_tracker.go refactor: update cache to the new generic version (#10463) 2023-03-13 15:29:09 -07:00
checkpoint.go chore: fix imports 2022-06-14 17:00:51 +02:00
sync_manager_test.go fix make gen 2022-08-29 16:25:30 +02:00
sync_manager.go Don't use go-libp2p-core 2022-08-25 14:20:41 -04:00
sync_test.go Revert "Merge pull request #9858 from adlrocha/adlrocha/consistent-bcast" 2023-04-27 12:25:30 -07:00
sync.go feat: chainstore: batch writes of tipsets 2023-05-02 17:26:07 -04:00
syncstate.go Expose WorkerID 2020-10-28 20:22:07 +01:00
types_test.go fix make gen 2022-08-29 16:25:30 +02:00