erigon-pulse/core
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
..
allocs Remove Ropsten & Fermion (#6262) 2022-12-10 22:55:31 +00:00
asm Use hex package to convert bytes to string (#6205) 2022-12-05 09:06:16 +07:00
forkid Schedule Shapella on Görli/Prater (#7012) 2023-03-03 13:27:36 +00:00
rawdb fix headers reset 2023-03-03 09:53:01 +07:00
state etl: distinct empty values from nil (#7039) 2023-03-07 04:19:00 +00:00
systemcontracts Rpc get code (#6899) 2023-03-02 14:12:16 +00:00
types Partial EIP1186 eth_getProof implementation (#6560) 2023-03-09 03:04:09 +00:00
vm e3: native map instead of btree where can (because e2 experience shows - it's faster) (#7010) 2023-03-07 02:34:30 +00:00
.gitignore Renamed chain => core 2014-12-04 10:28:02 +01:00
block_builder_parameters.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
block_validator_test.go Update consensus tests to v11 (#4724) 2022-07-26 09:35:38 +02:00
block_validator.go Simplify miner gas limit post EIP-1559. Default to 30M (#3205) 2022-01-05 16:36:24 +07:00
blockchain.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
blocks.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
bor_fee_log.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
chain_makers.go move math big constants to erigon-lib (#6719) 2023-01-27 11:39:34 +07:00
error.go EIP-3860: Limit and meter initcode (#5892) 2022-10-31 13:40:41 +01:00
events.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
evm.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
gaspool.go e3: less locks, less casts (#6991) 2023-03-01 07:59:56 +00:00
gen_genesis_account.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
gen_genesis.go Added processing for Attestation (#6772) 2023-02-03 16:39:09 +01:00
genesis_test.go CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829) 2023-02-11 20:44:51 +00:00
genesis.go CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829) 2023-02-11 20:44:51 +00:00
mkalloc.go go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
rlp_test.go CL lightclient to create memdb in the tmpdir which gets cleaned up on… (#6829) 2023-02-11 20:44:51 +00:00
skip_analysis.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
state_processor.go Remove StarknetTransaction and friends (#6745) 2023-01-30 16:56:58 +01:00
state_transition.go Switch AccessList, IntrinsicGas, SafeAdd/Mul to erigon-lib (#6709) 2023-01-26 12:26:12 +01:00
system_contract_lookup.go Rpc get code (#6899) 2023-03-02 14:12:16 +00:00
tx_cacher.go Move ETL to erigon-lib (#2667) 2021-09-12 08:50:17 +01:00
tx_pool.go txpool changes for eip-3860 (#6499) 2023-01-17 11:07:57 +00:00