lotus/chain/types
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
..
ethtypes Add EIP-1898 support needed for The Graph compatibility 2023-06-20 09:38:00 +00:00
mock chore: fix imports 2022-06-14 17:00:51 +02:00
testdata Add golden test for exp function 2020-06-23 16:33:10 +02:00
actor.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
bigint_test.go fix make gen 2022-08-29 16:25:30 +02:00
bigint.go Adjust various CLI display ratios to arbitrary precision 2021-05-25 14:09:01 +02:00
blockheader_test.go fix make gen 2022-08-29 16:25:30 +02:00
blockheader.go chore: refactor: drop unused IsTicketWinner (#10801) 2023-05-02 11:22:02 -07:00
blockmsg_test.go Addressing code review comments 2023-05-22 21:47:55 +02:00
blockmsg.go Adding extra data check on DecodeBlockMsg 2023-05-12 21:32:44 +02:00
cbor_gen.go deprecate MarketListRetrievalDeals, make gen 2023-03-08 17:15:16 +01:00
electionproof_test.go fix make gen 2022-08-29 16:25:30 +02:00
electionproof.go chore: refactor: drop unused IsTicketWinner (#10801) 2023-05-02 11:22:02 -07:00
event.go fvm: chore: update FVM 2023-02-07 18:15:40 -08:00
execresult.go feat: vm: switch to the new exec trace format (#10372) 2023-03-01 16:02:18 -08:00
fil_test.go fix make gen 2022-08-29 16:25:30 +02:00
fil.go Fix some more linter errors 2022-11-25 16:19:20 -05:00
fullblock.go refactoring to accomodate the bls message changes in the spec 2019-08-01 18:19:22 -07:00
keystore.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
logs.go Structure logs 2019-10-11 02:00:04 +02:00
message_fuzz.go feat: expose ChainGetPath on the gateway 2021-08-30 16:43:21 -07:00
message_receipt_cbor.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
message_receipt_test.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
message_receipt.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00
message_test.go fix make gen 2022-08-29 16:25:30 +02:00
message.go fix: Eth JSON-RPC api: handle messages with gasFeeCap less than baseFee (#10614) 2023-04-24 16:03:04 +01:00
mpool.go feat: mempool: Reduce minimum replace fee from 1.25x to 1.1x (#10416) 2023-03-09 13:17:17 -08:00
percent_test.go feat: mempool: Reduce minimum replace fee from 1.25x to 1.1x (#10416) 2023-03-09 13:17:17 -08:00
percent.go feat: mempool: Reduce minimum replace fee from 1.25x to 1.1x (#10416) 2023-03-09 13:17:17 -08:00
signature_test.go fix make gen 2022-08-29 16:25:30 +02:00
signedmessage.go chore: all: migrate from go-libipfs to boxo 2023-04-18 17:22:18 +02:00
state.go define StateTreeVersion5 for NetworkVersion18 2022-11-09 08:30:42 +02:00
tipset_key_test.go fix make gen 2022-08-29 16:25:30 +02:00
tipset_key.go chore: all: migrate from go-libipfs to boxo 2023-04-18 17:22:18 +02:00
tipset.go feat: stmgr: skip tipset execution when possible 2023-03-10 13:21:17 -08:00
types_test.go fix make gen 2022-08-29 16:25:30 +02:00
vmcontext.go NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing (#9998) 2023-01-13 19:11:13 +00:00