I'm working on a project where a non trusted entity is running an ethereum node (either geth or aleth), and has to pass information along to a non networked party. Namely, the non networked party needs to check if a tx was included in a mined block. For this, I need:

  • The block header of the block containing the tx (from which I can verify difficulty). This is trivial.
  • Either the entire tx tree, or just the relevant nodes in the tx tree (with which I can verify inclusion).

For the second part, it does not seem like I can retrieve this via a JSON-RPC call. It seems like I cannot interact with the leveldb files directly because doing so would preclude me from running a node, as both aleth and geth seem to grab the ldb lock and hold on to it. This means that I can't just run a node server with merkle-patricia-tree. Is there some other obvious way to do this that I'm missing? Or is the only solution to roll my own aleth/geth node that exposes this functionality?

  • With list of transaction hashes included in the block you can create a short proof of inclusion. – Ismael Apr 20 at 15:04
  • Thanks @Ismael. So is my best bet to retrieve the list of txs via JSON-RPC and then rebuild the tree? – infobiac Apr 21 at 4:27
  • Look at this repo it has implemented several proof generations github.com/zmitton/eth-proof – Ismael Apr 21 at 17:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.