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

PMMR segment creation and validation #3453

Merged
merged 35 commits into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f25e020
Chunk generation and validation
jaspervdm Sep 27, 2020
fdcf5f0
Merge remote-tracking branch 'upstream/master' into pmmr_chunk
jaspervdm Oct 1, 2020
26f7cfb
Rename chunk -> segment
jaspervdm Oct 1, 2020
ba284ca
Missed a few
jaspervdm Oct 1, 2020
1d512a4
Generate and validate merkle proof
jaspervdm Oct 2, 2020
d3d37b8
Fix bugs in generation and validation
jaspervdm Oct 2, 2020
163cad6
Add test for unprunable MMR of various sizes
jaspervdm Oct 2, 2020
4347fb1
Add missing docs
jaspervdm Oct 2, 2020
3d6fa32
Remove unused functions
jaspervdm Oct 2, 2020
1cd73d9
Remove segment error variant on chain error type
jaspervdm Oct 2, 2020
e6b3f7c
Simplify calculation by using a Vec instead of HashMap
jaspervdm Oct 3, 2020
ec4e4d2
Use vectors in segment definition
jaspervdm Oct 3, 2020
5aea29e
Compare subtree root during tests
jaspervdm Oct 3, 2020
50633cf
Add test of segments for a prunable mmr
jaspervdm Oct 5, 2020
42e430f
Remove assertion
jaspervdm Oct 6, 2020
7f276e2
Only send intermediary hashes for prunable MMRs
jaspervdm Oct 6, 2020
c0cd251
Get hash from file directly
jaspervdm Oct 6, 2020
2d61b3b
Merge remote-tracking branch 'upstream/master' into pmmr_chunk
jaspervdm Oct 7, 2020
89c3520
Require both leaves if one of them is not pruned
jaspervdm Oct 7, 2020
0482f56
More pruning tests
jaspervdm Oct 7, 2020
3d8d293
Add segment (de)serialization
jaspervdm Oct 7, 2020
751d0bb
Require sorted vectors in segment deser
jaspervdm Oct 7, 2020
8332430
Store pos and data separately in segment
jaspervdm Oct 18, 2020
556fb46
Rename log_size -> height
jaspervdm Oct 18, 2020
22f7a41
Fix bitmap index in root calculation
jaspervdm Oct 27, 2020
435ff77
Add validation function for output (bitmap) MMRs
jaspervdm Oct 27, 2020
f9813a8
Remove left over debug statements
jaspervdm Oct 27, 2020
04c096b
Fix test
jaspervdm Oct 27, 2020
8d94d32
Edge case: final segment with uneven number of leaves
jaspervdm Oct 29, 2020
8f6983b
Use last_pos instead of segment_last_pos
jaspervdm Oct 29, 2020
a7799af
Simplify pruning in test
jaspervdm Oct 30, 2020
38dc5bf
Add leaf and hash iterators
jaspervdm Oct 30, 2020
643ee8e
Support fully pruned segments
jaspervdm Nov 1, 2020
a7f2d13
Drop backend before deleting dir in pruned_segment test
jaspervdm Nov 1, 2020
de1d5e3
Simplify output of first_unpruned_parent
jaspervdm Nov 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub use self::block_sums::*;
pub use self::committed::Committed;
pub use self::compact_block::*;
pub use self::id::ShortId;
pub use self::pmmr::segment::*;
pub use self::transaction::*;

/// Common errors
Expand Down
1 change: 1 addition & 0 deletions core/src/core/pmmr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ mod backend;
mod pmmr;
mod readonly_pmmr;
mod rewindable_pmmr;
pub mod segment;
mod vec_backend;

pub use self::backend::*;
Expand Down
Loading