Skip to content
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

Implement MerkleStore::{with_tiered_smt, add_tiered_smt} #135

Closed
Tracked by #129 ...
vlopes11 opened this issue Apr 12, 2023 · 1 comment
Closed
Tracked by #129 ...

Implement MerkleStore::{with_tiered_smt, add_tiered_smt} #135

vlopes11 opened this issue Apr 12, 2023 · 1 comment

Comments

@vlopes11
Copy link
Contributor

Following the same pattern to add leaves of other algorithms into the MerkleStore, we should introduce the following methods:

MerkeStore::with_tiered_smt<R, I>(
    mut self,
    entries: R
) -> Result<Self, MerkleError>
where
    R: IntoIterator<IntoIter = I>,
    I: Iterator<Item = (Word, Word)>
MerkeStore::add_tiered_smt<R, I>(
    &mut self,
    entries: R
) -> Result<Word, MerkleError>
where
    R: IntoIterator<IntoIter = I>,
    I: Iterator<Item = (Word, Word)>

with_tiered_smt will be a builder pattern, and add_tiered_smt will return the new root.

The inclusion should follow the implementation described in #22

Originally posted by @bobbinth in 0xPolygonMiden/miden-vm#808 (comment)

@bobbinth
Copy link
Contributor

Closed by #153.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants