Zebra/zebra-state/src
Deirdre Connolly e6ffe374d4
Validate sapling, orchard anchors (#3084)
* Add Transaction::sprout_joinsplits()

* Add Anchor variants to ValidateContextError

* Make Chain anchor collections pub(crate)

* tracing::instrument several methods in state

* Add contains_*_anchors methods to FinalizedState

* Add check::anchors module and function

* Verify that anchors_refer_to_earlier_treestates in when updating chains in non-finalized state

* Update zebra-state/src/service/check/anchors.rs

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

* Add anchors() to sapling::ShieldedData

* Add sapling_anchors() to Transaction

* Use Transaction::sapling_anchors() in the anchors_refer_to_earlier_treestates() check

* Whoops, itertools

* Add a comment for improvement

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

* Add & use a cfg(test) method on FinalizedState to prep test state with anchors to allow other tests to pass contextual checks

* Allow test nullifier checks to pass by populating anchor sets, allowing test anchor checks to pass

* Add mainnet block 419202 and its sapling note commitment tree root to test vectors

* Test sapling anchor verification using the first few Sapling blocks data

* Correct comment

* assert_eq instead of assert(bool)

Co-authored-by: Conrado Gouvea <conrado@zfnd.org>

* Update zebra-state/src/service/non_finalized_state.rs

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

Co-authored-by: teor <teor@riseup.net>
Co-authored-by: Marek <mail@marek.onl>
Co-authored-by: Conrado Gouvea <conrado@zfnd.org>
2021-11-30 16:05:35 +00:00
..
service Validate sapling, orchard anchors (#3084) 2021-11-30 16:05:35 +00:00
tests Validate transaction lock times (#3060) 2021-11-23 05:53:53 +00:00
arbitrary.rs Reset `ChainTipChange`s on chain fork and network upgrade activation (#2721) 2021-09-02 12:25:42 +10:00
config.rs Construct structs with ..default() to avoid a lint 2021-01-19 11:02:20 -05:00
constants.rs Add Sprout anchors to `zebra-state` (#3100) 2021-11-30 11:05:58 +01:00
error.rs Validate sapling, orchard anchors (#3084) 2021-11-30 16:05:35 +00:00
lib.rs Test if the mempool storage is cleared (#2815) 2021-10-01 14:44:25 +00:00
request.rs Stop calculating transaction hashes twice in the checkpoint verifier (#2696) 2021-08-31 10:55:39 +10:00
response.rs move `Utxo` type to zebra-chain (#2481) 2021-07-12 12:49:33 +10:00
service.rs Validate sapling, orchard anchors (#3084) 2021-11-30 16:05:35 +00:00
tests.rs ZIP-221 and ZIP-244 commitment validation in non-finalized state (#2609) 2021-08-17 11:49:27 -03:00
util.rs swap best_chain_len and related constants to u32 for consistency (#1257) 2020-11-06 14:00:10 +10:00