Zebra/zebra-consensus/src
Arya eb0a2ef581
change(mempool): Contextually validates mempool transactions in best chain (#5716)
* updates comments

* adds check nullifier no dup fns for transactions

* Adds:
- check::anchors fn for tx iter
- TODO comments for unifying nullifiers and anchors checks
- new state request

Updates unknown anchor errors to accomodate tx-only check

Calls new state fn from transaction verifier

* updates check::anchors fns to use transactions

updates TransactionContextualValidity request to check sprout anchors

adds comment mentioning TransactionContextualValidity ignores UTXOs

* conditions new state req call on is_mempool

updates tests

* fix doc link / lint error

* checks for duplicate nullifiers with closures

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

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

* documents find_duplicate_nullifier params

moves if let statement into for loop

* renames new state req/res

* asserts correct response variant in tx verifier

* adds CheckBestChainTipShieldedSpends call in tx verifier to async checks

* re-adds tracing instrumentation to check::anchors fn

renames transaction_in_state to transaction_in_chain

* adds block/tx wrapper fns for anchors checks

* uses UnminedTx instead of transaction.hash()

deletes broken test

* updates new state req/res name

* updates tests and uses par_iter for anchors checks

* Updates check::anchors pub fn docs.

* Adds:
- comments / docs
- a TransactionError variant for ValidateContextError

* Apply suggestions from code review

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

* moves downcast to From impl

rustfmt

* moves the ValidateContextError into an Arc

updates comments and naming

* leaves par_iter for another PR

* puts io::Error in an Arc

* updates anchors tests to call tx_anchors check

* updates tests to call tx_no_duplicates_in_chain

slightly improves formatting

* Update zebra-consensus/src/error.rs

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

* moves Arc from HistoryError to ValidateContextError

Co-authored-by: teor <teor@riseup.net>
2022-11-30 04:40:15 +00:00
..
block fix(consensus): Check network and P2SH addresses for mining config and funding streams (#5620) 2022-11-11 03:42:05 +00:00
chain build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
checkpoint update checkpoints (#5512) 2022-11-01 05:48:11 +00:00
parameters Remove duplicate and redundant consensus parameter code (#4760) 2022-07-22 16:33:26 +00:00
primitives build(deps): bump insta from 1.15.0 to 1.17.1 (#4884) 2022-08-04 15:44:44 +00:00
transaction change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
block.rs change(rpc): generate coinbase transactions in the getblocktemplate RPC (#5580) 2022-11-10 00:12:27 +00:00
chain.rs change(state): Write non-finalized blocks to the state in a separate thread, to avoid network and RPC hangs (#5257) 2022-10-11 19:25:45 +00:00
checkpoint.rs lint(clippy): add `unwrap_in_result` lint (#4667) 2022-06-28 06:22:07 +00:00
config.rs Enable `checkpoint_sync` by default (#3777) 2022-03-09 01:21:54 +00:00
error.rs change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
lib.rs change(rpc): generate coinbase transactions in the getblocktemplate RPC (#5580) 2022-11-10 00:12:27 +00:00
parameters.rs Remove duplicate and redundant consensus parameter code (#4760) 2022-07-22 16:33:26 +00:00
primitives.rs fix(batch): Improve batch verifier async, correctness, and performance (#4750) 2022-07-18 08:41:18 +10:00
script.rs refactor: address comments from #3415: Prepare for changes in ZIP-244 (#3446) 2022-02-01 06:24:08 +00:00
transaction.rs change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00