-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/add merkle proof sdk #63
Conversation
@@ -19,17 +40,17 @@ impl MerkleProofIndex { | |||
|
|||
/// Get the siblings index for the merkle proof of inclusion given a leaf index of a binary merkle sum tree. | |||
/// We get the parent index of a leaf using the formula: parent = index / 2 + num_leaves | |||
pub fn get_mst_siblings_index(global_index: usize, global_mst: &GlobalMst) -> Vec<usize> { | |||
pub fn get_mst_siblings_index(global_index: usize, cfg: &GlobalConfig) -> Vec<usize> { |
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.
shall we make this function as a method in Global_MST?
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.
I think so too, but I dont want to load the global MST, it is heavy because it contains an entire vector of all the hashes, we can probably refactor the global MST struct instead.
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.
I think so too, but I dont want to load the global MST, it is heavy because it contains an entire vector of all the hashes, we can probably refactor the global MST struct instead.
agree
…/proof-of-reserves-v2 into feature/add-merkle-proof-sdk
…/proof-of-reserves-v2 into feature/add-merkle-proof-sdk
pass root as parameter in verify |
the raw account format should be the readable json data rather than a vector |
Add a CLI command to fetch the merkle proof for a given user index.