简体   繁体   中英

How to verify that a transaction hash is included in a block's transactionsRoot on chain?

I am doing some research to see how you would verify that a transaction hash is included in the transactionsRoot for a specific block in Ethereum. The challenging part for this is that I am trying to do this on chain.

Can anyone help me figure out what data I would need to pass into a function and how I would verify this? It seems like it would be much more complicated than just passing in a merkle root and proofs since the transactionsRoot is a merkle patricia trie.

This blog post explains merkle trie with examples. It explains how transaction root is computed and how proof is generated and verified.

https://medium.com/@chiqing/merkle-patricia-trie-explained-ae3ac6a7e123

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM