Zebra/zebra-chain/src
Conrado Gouvea 94175c6955
Add ZIP-221 history tree to non-finalized state (#2583)
* Refactor HistoryTree into NonEmptyHistoryTree and HistoryTree

* HistoryTree: use Deref instead of AsRef; remove unneeded PartialEq

* ZIP-221: Validate chain history commitments in the non-finalized state (#2301)

* sketch of implementation

* refined implementation; still incomplete

* update librustzcash, change zcash_history to work with it

* simplified code per review; renamed MMR to HistoryTree

* expand HistoryTree implementation

* handle and propagate errors

* simplify check.rs tracing

* add suggested TODO

* add HistoryTree::prune

* fix bug in pruning

* fix compilation of tests; still need to make them pass

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* improvements from code review

* improve check.rs comments and variable names

* fix HistoryTree which should use BTreeMap and not HashMap; fix non_finalized_state prop tests

* fix finalized_state proptest

* fix non_finalized_state tests by setting the correct commitments

* renamed mmr.rs to history_tree.rs

* Add HistoryTree struct

* expand non_finalized_state protest

* fix typo

* Add HistoryTree struct

* Update zebra-chain/src/primitives/zcash_history.rs

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* fix formatting

* Apply suggestions from code review

Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* history_tree.rs: fixes from code review

* fixes to work with updated HistoryTree

* Improvements from code review

* Add Debug implementations to allow comparing Chains with proptest_assert_eq

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>

* Apply suggestions from code review

Co-authored-by: teor <teor@riseup.net>

* Improvements from code review

* Restore blocks returned by PreparedChain since other tests broken; adjust tests with history trees

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Deirdre Connolly <deirdre@zfnd.org>
2021-08-11 10:42:40 -03:00
..
amount Check remaining transaction value & make value balance signs match the spec (#2566) 2021-08-09 14:22:26 -03:00
block Add ZIP-221 history tree to non-finalized state (#2583) 2021-08-11 10:42:40 -03:00
history_tree Refactor HistoryTree into NonEmptyHistoryTree and HistoryTree (#2582) 2021-08-10 09:51:50 -03:00
orchard Cache note commitment tree roots (#2584) 2021-08-10 10:33:34 -03:00
parameters Legacy chain check and tests (#2366) 2021-06-29 15:03:51 +10:00
primitives Refactor HistoryTree into NonEmptyHistoryTree and HistoryTree (#2582) 2021-08-10 09:51:50 -03:00
sapling Cache note commitment tree roots (#2584) 2021-08-10 10:33:34 -03:00
serialization impl TryFrom for vector references for AtLeastOne (#2578) 2021-08-06 16:39:32 +00:00
sprout Refactor value balances to support generated data modification (#2596) 2021-08-10 14:42:02 +00:00
transaction Refactor value balances to support generated data modification (#2596) 2021-08-10 14:42:02 +00:00
transparent Check remaining transaction value & make value balance signs match the spec (#2566) 2021-08-09 14:22:26 -03:00
value_balance Add extra arithmetic operations and error details to Amount and ValueBalance (#2577) 2021-08-09 10:13:27 -03:00
work Replace primitives_types with uint (#2350) 2021-06-18 15:35:05 -03:00
amount.rs Check remaining transaction value & make value balance signs match the spec (#2566) 2021-08-09 14:22:26 -03:00
block.rs Check remaining transaction value & make value balance signs match the spec (#2566) 2021-08-09 14:22:26 -03:00
fmt.rs Add a TypeNameToDebug formatter to zebra_chain (#2466) 2021-07-09 12:40:19 +10:00
history_tree.rs Add ZIP-221 history tree to non-finalized state (#2583) 2021-08-11 10:42:40 -03:00
lib.rs Add ZIP-221 (history tree) to finalized state (#2553) 2021-08-05 10:02:37 -03:00
orchard.rs Orchard data in V5 parsing (#2116) 2021-05-21 00:42:06 +00:00
parameters.rs Cleanup a few arbitrary impls (#2222) 2021-05-28 09:49:28 -03:00
primitives.rs Add ZIP-244 signature hash support (#2165) 2021-07-07 08:27:10 +10:00
sapling.rs Update multiple crates to ensure bitvec 0.22.3 is being used (#2351) 2021-06-23 13:16:22 +10:00
serialization.rs Security: Zebra should stop gossiping unreachable addresses to other nodes, Action: re-deploy all nodes (#2392) 2021-06-29 05:12:27 +00:00
shutdown.rs Fix shutdown panics (#1637) 2021-02-03 19:03:28 +10:00
sprout.rs Move the preallocate tests into their own files (#1977) 2021-04-07 12:32:27 +10:00
transaction.rs Refactor value balances to support generated data modification (#2596) 2021-08-10 14:42:02 +00:00
transparent.rs Check remaining transaction value & make value balance signs match the spec (#2566) 2021-08-09 14:22:26 -03:00
value_balance.rs Refactor value balances to support generated data modification (#2596) 2021-08-10 14:42:02 +00:00
work.rs Replace primitives_types with uint (#2350) 2021-06-18 15:35:05 -03:00