I'm currently looking to verify ethereum transaction merkle-proofs in runtime. As Ethereum also uses a patricia-trie, I was wondering if the two implementations are generally compatible. Is it possible to use sp-trie to recreate the transaction root of an ethereum header?
2 Answers
Openethereum did use the same dependency but with a different node codec (https://github.com/openethereum/openethereum/tree/d8305c52ea805e62d7532c3ac76386873984d326/crates/db/patricia-trie-ethereum). So not compatible.
Also openethereum uses a version of the trie crate and rlp codec that are not no_std compatible, so using the code in a runtime will not be straightforward.
I solved this by removing the std dependencies of the eth-trie.rs
crate. That was pretty straightforward and works well.