Zebra/zebra-state/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
..
service change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
tests 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
arbitrary.rs change(mempool) reject transactions with spent outpoints or nullifiers (#5434) 2022-10-24 19:48:45 +00:00
config.rs feat(state): delete old database directories (#4586) 2022-06-21 00:59:51 +00:00
constants.rs fix(testnet): look back up to 10,000 blocks on testnet for a legacy chain (#5133) 2022-09-20 11:31:24 +00:00
error.rs change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
lib.rs feat(rpc): populate some getblocktemplate RPC block header fields using the state best chain tip (#5659) 2022-11-28 09:06:32 +00:00
request.rs change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
response.rs change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
service.rs change(mempool): Contextually validates mempool transactions in best chain (#5716) 2022-11-30 04:40:15 +00:00
tests.rs 1. change(state): Run most StateService read requests without shared mutable chain state (#5132) 2022-09-14 00:35:37 +00:00