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