zmitton/eth-proof

Centralized RPC Providers

zmitton opened this issue · 5 comments

edit

fixed! infura now supports this


At time of this writing neither Infura nor any RPC provider's support eth_getProof, but infura should in the very near future. ETC chain supports the call iff using multigeth, but against no service central services are known to be running it.

Implications

getting storage Proofs and Account proofs wont work unless your RPC provider supports eth_getProof. Solution is to run geth/parity-ethereum/multigeth locally for those Additionally it needs to be a full or archive node if you want to get historic proofs.

Try this one liner from the console to see if it's working yet. Or "http://mainnet.infura.io" with whatever URL you want to test:

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getProof","params":["0x9cc9bf39a84998089050a90087e597c26758685d",["","d471a47ea0f50e55ea9fc248daa217279ed7ea3bb54c9c503788b85e674a93d1"],"latest"],"id":1}' -H "Content-type:application/json" https://mainnet.infura.io

wow! looks like infura finally supports it!

note to self: update readme then close issue

Try this one liner from the console to see if it's working yet. Or "http://mainnet.infura.io" with whatever URL you want to test:

curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getProof","params":["0x9cc9bf39a84998089050a90087e597c26758685d",["","d471a47ea0f50e55ea9fc248daa217279ed7ea3bb54c9c503788b85e674a93d1"],"latest"],"id":1}' -H "Content-type:application/json" https://mainnet.infura.io

How do I know what params to send to get the data of a specific block?

This request works, but I have no clue how to construct the params, and getProof is nowhere to be found in infuras own documentation.

I assume "latest" can be replaced by a specific block number, but how do I know which key to use?

The above curl request is just for troubleshooting that your connection is working. Please read the API for this JS module. It does not require the same arguments.