-
Notifications
You must be signed in to change notification settings - Fork 85
Labels
merkleRelated to Merkle trees or MMRsRelated to Merkle trees or MMRs
Milestone
Description
What should be done?
While we currently have the ability to update the forest in an atomic batch (update_forest), we do not have the ability to either add lineages or perform openings or gets in a batch. add_lineages would add multiple lineages in a single atomic batch, while open_many and get_many would simply allow for more performant queries when lots of openings or gets need to be performed at once.
How should it be done?
Implement the following endpoints:
add_lineages(&mut self, version: VersionId, lineages: SmtForestUpdateBatch) -> Result<Vec<(LineageId, TreeWithRoot)>>: Adds multiple lineages to the forest atomically.open_many(&mut self, version: VersionId, targets: Vec<LineageId, Key>) -> Result<Vec<(LineageId, SmtProof)>>: Performs openings for all of the providedtargetsin parallel.get_many(&mut self, version: VersionId, targets: Vec<LineageId, Key>) -> Result<Vec<(LineageId, Option<Word>)>>: Performs gets for all of the providedtargetsin parallel.
When is this task done?
When the above endpoints have been implemented, tested for correctness using hand-written and property-based tests in both backends, as well as hand-written and property tests. They should also be benchmarked so we have a baseline against regressions.
Additional context
May want to be done after #879 for simplicity's sake.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
merkleRelated to Merkle trees or MMRsRelated to Merkle trees or MMRs