-
Notifications
You must be signed in to change notification settings - Fork 108
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
Release Blocker: Stop trying to verify coinbase inputs using the script verifier #2404
Conversation
And create tests to catch similar bugs earier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I added some comments, but they're all optional.
let result = verifier | ||
.oneshot(Request::Block { | ||
transaction: Arc::new(transaction), | ||
known_utxos: Arc::new(known_utxos), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd remove the known_utxos
variable to avoid the impression that there are any known UTXOs in the test.
known_utxos: Arc::new(known_utxos), | |
known_utxos: Arc::new(HashMap::new()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3ee905f
// TODO: Remove `should_panic` once the NU5 activation heights for testnet and mainnet have been | ||
// defined. | ||
#[should_panic] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Maybe also add this to #1841?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
I just noticed a bug here: these functions should all use Testnet
, because it will have an activation height first.
(Ideally they should use both networks, but that's a larger change.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug fixed in 09b815c, also I updated the ticket, and added "any other should_panic" tests.
We've marked these tests as should_panic until there is a NU5 activation height. But Testnet will have an activation height first, so we should prefer it in the tests. (Or use both networks.)
This is ready for another review. But since all the changes were optional, I can also merge once CI passes. |
Motivation
Fixes #2401, a
transaction::Verifier
bug introduced by PR #2382.This bug stops Zebra syncing after the mandatory Canopy checkpoint, as soon as the
transaction::Verifier
starts being used.Specifications
Unfortunately, the Zcash specification doesn't cover all the validation rules for coinbase inputs and outputs.
Solution
Review
@jvff can review this PR, it's a high priority, because it stops syncing. (And makes other code hard to test.)
Reviewer Checklist
Follow Up Work
We'll do shielded coinbase tests as part of the shielded coinbase ticket.