f358160cd5
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. |
||
---|---|---|
.. | ||
ethtypes | ||
mock | ||
testdata | ||
actor.go | ||
bigint_test.go | ||
bigint.go | ||
blockheader_test.go | ||
blockheader.go | ||
blockmsg_test.go | ||
blockmsg.go | ||
cbor_gen.go | ||
electionproof_test.go | ||
electionproof.go | ||
event.go | ||
execresult.go | ||
fil_test.go | ||
fil.go | ||
fullblock.go | ||
keystore.go | ||
logs.go | ||
message_fuzz.go | ||
message_receipt_cbor.go | ||
message_receipt_test.go | ||
message_receipt.go | ||
message_test.go | ||
message.go | ||
mpool.go | ||
percent_test.go | ||
percent.go | ||
signature_test.go | ||
signedmessage.go | ||
state.go | ||
tipset_key_test.go | ||
tipset_key.go | ||
tipset.go | ||
types_test.go | ||
vmcontext.go |