grin/store/tests
jaspervdm 8faba4ef83
PMMR segment creation and validation (#3453)
* Chunk generation and validation

* Rename chunk -> segment

* Missed a few

* Generate and validate merkle proof

* Fix bugs in generation and validation

* Add test for unprunable MMR of various sizes

* Add missing docs

* Remove unused functions

* Remove segment error variant on chain error type

* Simplify calculation by using a Vec instead of HashMap

* Use vectors in segment definition

* Compare subtree root during tests

* Add test of segments for a prunable mmr

* Remove assertion

* Only send intermediary hashes for prunable MMRs

* Get hash from file directly

* Require both leaves if one of them is not pruned

* More pruning tests

* Add segment (de)serialization

* Require sorted vectors in segment deser

* Store pos and data separately in segment

* Rename log_size -> height

* Fix bitmap index in root calculation

* Add validation function for output (bitmap) MMRs

* Remove left over debug statements

* Fix test

* Edge case: final segment with uneven number of leaves

* Use last_pos instead of segment_last_pos

* Simplify pruning in test

* Add leaf and hash iterators

* Support fully pruned segments

* Drop backend before deleting dir in pruned_segment test

* Simplify output of first_unpruned_parent
2020-11-17 19:38:44 +01:00
..
lmdb.rs migrate blocks in batches (rework db iterator impl) (#3450) 2020-10-07 11:47:25 +01:00
pmmr.rs Refactor PMMR read methods into trait (#3454) 2020-09-29 15:57:33 +02:00
prune_list.rs Update License to 2020 (#3196) 2020-01-20 11:40:58 +00:00
segment.rs PMMR segment creation and validation (#3453) 2020-11-17 19:38:44 +01:00
test_bitmap.rs Update License to 2020 (#3196) 2020-01-20 11:40:58 +00:00
utxo_set_perf.rs Update License to 2020 (#3196) 2020-01-20 11:40:58 +00:00