Zebra/zebra-chain/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
..
amount Check remaining transaction value & make value balance signs match the spec (#2566) 2021-08-09 14:22:26 -03:00
block Validate coinbase expiration height (#3082) 2021-11-23 05:17:05 +00:00
history_tree Refactor HistoryTree into NonEmptyHistoryTree and HistoryTree (#2582) 2021-08-10 09:51:50 -03:00
orchard Check nSpendsSapling, nOutputsSapling, and nActionsOrchard 2^16 limit (#3069) 2021-11-18 15:06:07 -03:00
parameters Update shared NU5 dependencies, set the NU5 testnet activation network upgrade parameters (#2825) 2021-10-06 11:08:41 +10:00
primitives Fix typos (#3055) 2021-11-12 19:30:22 +00:00
sapling Validate sapling, orchard anchors (#3084) 2021-11-30 16:05:35 +00:00
serialization Security: Avoid reconnecting to peers that are likely unreachable (#3030) 2021-11-10 23:51:22 +00:00
sprout Sprout note commitment trees (#3051) 2021-11-18 23:05:52 +00:00
transaction Validate transaction lock times (#3060) 2021-11-23 05:53:53 +00:00
transparent Replace read_compactsize and write_compactsize with CompactSizeMessage (#3014) 2021-11-05 15:24:24 -03:00
value_balance Split ValueBalance methods into NegativeAllowed and NonNegative (#2649) 2021-08-20 13:30:38 +00:00
work Replace read_compactsize and write_compactsize with CompactSizeMessage (#3014) 2021-11-05 15:24:24 -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 MAX_BLOCK_SIGOPS in the block verifier (#3049) 2021-11-15 20:55:32 +00:00
chain_tip.rs Add a `ChainTipChange` type to `await` chain tip changes (#2715) 2021-09-01 22:31:16 +00:00
fmt.rs Add a TypeNameToDebug formatter to zebra_chain (#2466) 2021-07-09 12:40:19 +10:00
history_tree.rs Tweak some assertions to better match their error messages (#2822) 2021-10-04 10:31:56 -03:00
lib.rs Refactor BestTipHeight into a generic ChainTip sender and receiver (#2676) 2021-08-27 11:34:33 +10:00
orchard.rs ZIP 212: validate Sapling and Orchard output of coinbase transactions (#3029) 2021-11-11 22:18:37 +00:00
parameters.rs Cleanup a few arbitrary impls (#2222) 2021-05-28 09:49:28 -03:00
primitives.rs ZIP 212: validate Sapling and Orchard output of coinbase transactions (#3029) 2021-11-11 22:18:37 +00: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 Refactor addr v1 serialization using a separate AddrV1 type (#3021) 2021-11-10 06:47:50 +10: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 Validate sapling, orchard anchors (#3084) 2021-11-30 16:05:35 +00:00
transparent.rs Validate transaction lock times (#3060) 2021-11-23 05:53:53 +00:00
value_balance.rs Add value pool/balances to non-finalized state (#2656) 2021-08-25 10:57:07 -03:00
work.rs Replace primitives_types with uint (#2350) 2021-06-18 15:35:05 -03:00