Question: Is there an existing solidity verifier for proofs created with @ethereumjs/trie? #2599
Replies: 9 comments
-
This seems to me what you are looking for: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/MerkleProof.sol |
Beta Was this translation helpful? Give feedback.
-
@jochem-brouwer This is for standard merkle trees only, no? I was expecting the verification of merkle proofs for merkle patricia tries to be incompatible for the one for merkle trees. |
Beta Was this translation helpful? Give feedback.
-
This should work also for MPTs. The gotcha here is that this is a "normal" Merkle tree but the data inside the tree is encoded as Patricia tree. |
Beta Was this translation helpful? Give feedback.
-
@jochem-brouwer The verifier from OpenZeppelin expects a proof as a |
Beta Was this translation helpful? Give feedback.
-
I might have been a bit too fast to reply here, but I will investigate a bit further for you, because I would expect that an EVM/Solidity implementation of MPT proofs are readily available. |
Beta Was this translation helpful? Give feedback.
-
Ok thanks. In addition, we've found this related issue on OpenZeppelin contract repo. |
Beta Was this translation helpful? Give feedback.
-
(have converted to a discussion :) ) |
Beta Was this translation helpful? Give feedback.
-
@jochem-brouwer Any luck so far with your research? So far we're only finding verifier contracts that work with specific formats expected from provers. |
Beta Was this translation helpful? Give feedback.
-
FYI we were able to use this Solidity verifier to verify Merkle proofs of transaction tries made with @ethereumjs/trie: We had to not use |
Beta Was this translation helpful? Give feedback.
-
Hi,
In combination with using
@ethereumjs/trie
in the browser to create merkle proofs against transaction tries, I'm looking for a compatible on-chain verifier. It's pretty hard to find an existing contract out there that would work out of the box with the type/format of merkle proofs created with@ethereumjs/trie
(so many unfinished/abandoned projects).Would you know if such a compatible on-chain verifier (contract) exist?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions