erigon-pulse/cmd/rpcdaemon/commands
Michael Montour d5fbc5011e
Partial EIP1186 eth_getProof implementation (#6560)
This is a partial implementation of eth_getProof (see issue #1349),
supporting only a request for the latest block and an empty list of
storage keys (i.e. Account proof only). I don't know if there's a better
way of implementing this, but this was what I could come up with.
Posting it here in case it's useful.

Example output:
```
> eth.getProof("0x67b1d87101671b127f5f8714789C7192f7ad340e", [], 'latest')
{
  accountProof: ["0xf90131a0252c9d4ed347b4cf3fdccaea3ccef0a507e6bd4dbe4dcd98609b7195347c4062a0ab8cdb808c8303bb61fb48e276217be9770fa83ecf3f90f2234d558885f5abf18080a01a697e814758281972fcd13bc9707dbcd2f195986b05463d7b78426508445a04a0b5d7a91be5ee273cce27e2ad9a160d2faadd5a6ba518d384019b68728a4f62f4a0c2c799b60a0cd6acd42c1015512872e86c186bcf196e85061e76842f3b7cf86080a0e73919d9f472eec11f6da95518503f5527a98b9428f7a02c4f55bf51854214e480a06301b39b2ea8a44df8b0356120db64b788e71f52e1d7a6309d0d2e5b86fee7cb8080a01b7779e149cadf24d4ffb77ca7e11314b8db7097e4d70b2a173493153ca2e5a0a066a7662811491b3d352e969506b420d269e8b51a224f574b3b38b3463f43f0098080", "0xf8518080808080a0a00135c9ec2655cb6a47ab7ad27d6fc150d9cba8b3d4a702e879179116a68a60808080808080a02fb46956347985b9870156b5747712899d213b1636ad4fe553c63e33521d567a80808080", "0xf873a02056274a27dd7524955417c11ecd917251cc7c4c8310f4c7e4bd3c304d3d9a79b850f84e808a021e19e0c9bab2400000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a0c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"],
  address: "0x67b1d87101671b127f5f8714789c7192f7ad340e",
  balance: "0x21e19e0c9bab2400000",
  codeHash: "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
  nonce: "0x0",
  storageHash: "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
  storageProof: []
}
> eth.getBlock('latest').stateRoot
"0x6a0673c691edfa4c4528323986bb43c579316f436ff6f8b4ac70854bbd95340b"
```
2023-03-09 03:04:09 +00:00
..
contracts move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
admin_api.go Erigon2 upgrade 2 prototype (#4341) 2022-06-10 16:18:43 +01:00
bor_api.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
bor_helper.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
bor_snapshot.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
call_traces_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
corner_cases_support_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
daemon.go Initial GraphQL interface implementation (#6821) 2023-02-20 11:23:06 +00:00
db_api_deprecated.go rename (#1978) 2021-05-20 19:25:53 +01:00
debug_api_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
debug_api.go e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00
engine_api_test.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
engine_api.go blockValue should use gasUsed rather than gasLimit (#6875) 2023-02-14 15:05:27 +00:00
erigon_api.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
erigon_block.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
erigon_cache_check.go cache state check (#5844) 2022-11-07 13:04:31 +00:00
erigon_cumulative_chain_traffic.go Cumulative index stage (#3314) 2022-01-27 10:49:03 +00:00
erigon_nodeInfo.go Add NodeInfo implementation (#3046) 2021-11-30 22:42:12 +00:00
erigon_receipts_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
erigon_receipts.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
erigon_system.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
error_messages.go add --datadir parameter to integration, snapshot generator, header downloader (#1749) 2021-04-19 14:25:26 +07:00
eth_accounts.go e3: simplify history reader (#6659) 2023-01-22 16:42:24 +07:00
eth_api_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
eth_api.go Partial EIP1186 eth_getProof implementation (#6560) 2023-03-09 03:04:09 +00:00
eth_block_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
eth_block.go Remove miner address from eth_getBlockByNumber for bor RPC calls (#6898) 2023-02-20 22:04:42 +00:00
eth_call_test.go check prune history on trace calls (#6932) 2023-02-26 09:10:46 +07:00
eth_call.go Partial EIP1186 eth_getProof implementation (#6560) 2023-03-09 03:04:09 +00:00
eth_callMany_test.go e3: use historyReader constructor in tests (#6677) 2023-01-24 12:43:04 +07:00
eth_callMany.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
eth_deprecated.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
eth_filters_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
eth_filters.go add eth_getFilterLogs, fix filter subscription ids (#6514) 2023-02-06 10:18:10 +07:00
eth_mining_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
eth_mining.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
eth_receipts.go e3: use iterators composition in invIndex.Range (#7056) 2023-03-09 02:26:40 +00:00
eth_subscribe_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
eth_system_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
eth_system.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
eth_txs.go Fix retrieving Bor transactions from the pool (#6689) 2023-01-28 21:20:08 +00:00
eth_uncles.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
gen_traces_test.go e3: less locks, less casts (#6991) 2023-03-01 07:59:56 +00:00
get_chain_config_test.go CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829) 2023-02-11 20:44:51 +00:00
graphql_api.go graphql: add Tx Receipts Logs to output (#7059) 2023-03-09 02:22:41 +00:00
net_api.go Erigon2 upgrade 2 prototype (#4341) 2022-06-10 16:18:43 +01:00
otterscan_api.go e3: use iterators composition in invIndex.Range (#7056) 2023-03-09 02:26:40 +00:00
otterscan_block_details.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_contract_creator_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
otterscan_contract_creator.go e3: ots system txn handle 2023-01-27 16:05:09 +07:00
otterscan_default_tracer.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_generic_tracer.go e3: ots system txn handle 2023-01-27 16:05:09 +07:00
otterscan_has_code.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_search_backward_multi_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_backward_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
otterscan_search_backward.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_search_forward_multi_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_forward_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_forward.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_search_multi.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_test.go Upstream all Otterscan patches to devel (#5945) 2022-11-03 11:32:15 +07:00
otterscan_search_trace.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_contract_creator.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_operations.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_touch.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_trace_transaction.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_transaction_by_sender_and_nonce_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
otterscan_transaction_by_sender_and_nonce.go e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00
otterscan_transaction_error.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
otterscan_types.go e3: ots_getTransactionBySenderAndNonce (#6718) 2023-01-27 11:34:04 +07:00
parity_api_test.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
parity_api.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
send_transaction_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
send_transaction.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
storage_range.go e3: eth_getModifiedAccountsByNumber (#6733) 2023-01-29 10:10:39 +07:00
trace_adhoc_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
trace_adhoc.go feat(trace): use specific error string (#6696) 2023-01-26 15:10:51 +01:00
trace_api.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
trace_filtering.go e3: use iterators composition in invIndex.Range (#7056) 2023-03-09 02:26:40 +00:00
trace_types.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
tracing.go check prune history on trace calls (#6932) 2023-02-26 09:10:46 +07:00
txpool_api_test.go WIP: cmd, turbo, core, eth: TransactionsV3 flag and persist in new table (#6754) 2023-02-24 18:49:25 +00:00
txpool_api.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
validator_set.go Bor file structure updated (#6167) 2023-01-31 14:00:57 +05:30
web3_api.go Erigon2 upgrade 2 prototype (#4341) 2022-06-10 16:18:43 +01:00