grin/core/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
..
block.rs Introduce CommitOnly variant of Inputs (#3419) 2020-09-07 16:58:41 +01:00
common.rs Introduce CommitOnly variant of Inputs (#3419) 2020-09-07 16:58:41 +01:00
consensus_automated.rs thread local chain type vs global chain type (#3327) 2020-05-22 12:51:58 +01:00
consensus_mainnet.rs pass slices around and not refs to vecs (#3404) 2020-07-27 11:07:18 +01:00
consensus_testnet.rs Rename Floonet to Testnet (#3431) 2020-10-07 09:36:02 -04:00
core.rs Introduce CommitOnly variant of Inputs (#3419) 2020-09-07 16:58:41 +01:00
merkle_proof.rs Refactor PMMR read methods into trait (#3454) 2020-09-29 15:57:33 +02:00
pmmr.rs Refactor PMMR read methods into trait (#3454) 2020-09-29 15:57:33 +02:00
segment.rs PMMR segment creation and validation (#3453) 2020-11-17 19:38:44 +01:00
transaction.rs Introduce CommitOnly variant of Inputs (#3419) 2020-09-07 16:58:41 +01:00
vec_backend.rs Refactor PMMR read methods into trait (#3454) 2020-09-29 15:57:33 +02:00
verifier_cache.rs Refactor Output Identifiers (#3371) 2020-09-03 10:59:54 +01:00