-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: solidity verifier usage example #16
feat: solidity verifier usage example #16
Conversation
thanks for neat example, here is 2 comments i have:
|
examples/eth/src/Prover.sol
Outdated
return MerkleTrie.get(_key, _proof, _root); | ||
} | ||
|
||
function verifyInclusionProof(bytes memory _key, bytes memory _value, bytes memory _proof, bytes32 _root) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this function is not used, can we call this function on the example? or can remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, removed, it's doing the same thing under the hood
@rkdud007 added docs and a custom settable RPC endpoint which falls back to a good default. |
lgtm, thanks for example @merklefruit :) |
This PR adds a simple example of using the library to prove the inclusion of a transaction in an Ethereum transaction trie. The example takes in a
txHash
, generates a proof by interacting with the CLI binary via FFI, parses it and feeds it to aMerkleTrie
verifier after RLP-encoding it correctly.Note: the test has to be run with
forge test --ffi
to enable FFI usage.