You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: retain proofs of non-target nodes in certain edge-cases. (#109)
* feat: retain proofs of non-target nodes in certain edge-cases.
There are specific edge-cases where it's necessary to retain the proofs
for nodes which aren't given in the target set, namely leaf removals
which result in the deletion of a branch, and leaf additions which
result in the creation of a branch.
Documentation of each case is provided in the code at the point it is
handled.
This change will cause more proofs than are strictly necessary to be
retained, because the `target` set we are given does not tell us if
paths are added, updated or removed. This extra work is made up for by
us not needing to fetch the nodes which would otherwise be missing later
down the pipeline, and in benchmarking the overall change comes out very
slightly faster.
* Update src/proof/retainer.rs
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
* Fully track branch target children, to properly handle collapse case
* Introduce AddedRemovedKeys, use that for trackinge extra proofs
* debug
* Don't track removed leaves as non-targets
* Make AddedRemovedKeys into a concrete type
* PR suggestion
* Remove assume_added
* Revert "Remove assume_added"
This reverts commit 1e4be6f.
* Fix unnecessary boolean being included
* Add clear_added method
* PR feedback
---------
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>
0 commit comments