-
Notifications
You must be signed in to change notification settings - Fork 45
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
Update Partial MMR to add a single node to it #258
Comments
We need to add a method to
pub fn add(&mut self, leaf: RpoDigest, track: bool) -> Vec<(InOrderIndex, RpoDigest)> When The new implementation of |
I'm adding this in, could you add a bit of information on how it is used? It seems we started returning the tracked elements with #242, so it seems it is needed by the client? |
The client stores the nodes of the partial MMR in a table. This table needs to be updated as the in-memory structure is updated. The way the client does it now is:
This does require us to load the entire partial MMR into memory - but I think this is fine for now (and in the future, we can figure out a more optimal way to do this). |
@bobbinth okay, so from what I got, this is done to save the What about deleting nodes that are no longer necessary? For example, if we have a forest with value |
Correct.
Peaks are stored separately - in the block_headers table. So, for every block header of interest, the client saves the peaks. The Thinking about the future, it would be good if |
Created #262. |
done with #263 |
<pls add description @bobbinth > and please add @hackaugusto as the assignee
The text was updated successfully, but these errors were encountered: