Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use BestChainUtxo rather than AwaitUtxo in the mempool transaction validator #5386

Closed
Tracked by #5234
teor2345 opened this issue Oct 11, 2022 · 1 comment · Fixed by #5616
Closed
Tracked by #5234

Use BestChainUtxo rather than AwaitUtxo in the mempool transaction validator #5386

teor2345 opened this issue Oct 11, 2022 · 1 comment · Fixed by #5616
Assignees
Labels
A-consensus Area: Consensus rule updates A-rust Area: Updates to Rust code A-state Area: State / database changes C-bug Category: This is a bug I-consensus Zebra breaks a Zcash consensus rule

Comments

@teor2345
Copy link
Contributor

teor2345 commented Oct 11, 2022

Motivation

The getblocktemplate RPC collects the transactions in the mempool into a block.
That block must be contextually valid based on the best tip in the state.

We can't use AwaitUtxo for validating mempool transactions, because it gets UTXOs from any chain or any queue.

Design

Use BestChainUtxo rather than AwaitUtxo to verify mempool transactions.
(Block transactions should still use AwaitUtxo.)

@teor2345 teor2345 changed the title use BestChainUtxo rather than AwaitUtxo in the mempool transaction validator Use BestChainUtxo rather than AwaitUtxo in the mempool transaction validator Oct 11, 2022
@teor2345 teor2345 added C-bug Category: This is a bug A-consensus Area: Consensus rule updates A-rust Area: Updates to Rust code P-Medium ⚡ I-consensus Zebra breaks a Zcash consensus rule A-state Area: State / database changes labels Oct 11, 2022
@mpguerra
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Area: Consensus rule updates A-rust Area: Updates to Rust code A-state Area: State / database changes C-bug Category: This is a bug I-consensus Zebra breaks a Zcash consensus rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants