-
Notifications
You must be signed in to change notification settings - Fork 106
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
Update transaction::check::coinbase_tx_no_joinsplit_or_spend
to validate V5 coinbase transactions with Orchard shielded data
#2236
Conversation
transaction::check::coinbase_tx_nojoinsplit_or_spend
to validate V5 coinbase transactions with Orchard shielded data
transaction::check::coinbase_tx_nojoinsplit_or_spend
to validate V5 coinbase transactions with Orchard shielded datatransaction::check::coinbase_tx_no_joinsplit_or_spend
to validate V5 coinbase transactions with Orchard shielded data
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.
This looks great, just a suggestion for a code simplification
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.
Actually let's just merge this, I'll submit the code simplification as a separate PR
Allows accessing the Orchard shielded data if it is present in the transaction, regardless of the transaction version.
Allows making the method more concise.
Used when the validation rule is not met.
The flag must not be set for the coinbase transaction.
452ea30
to
ffe09fa
Compare
Use the fact that `Option<T>` implements `Iterator<T>` to simplify the code and remove the need for boxing the iterators. Co-authored-by: teor <teor@riseup.net>
ffe09fa
to
bc29da7
Compare
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.
This looks good, let's merge when the build passes
Motivation
NU5 has the consensus rule that V5 coinbase transactions must not have the enableSpendsOrchard flag set.
Solution
Implement the consensus rule in the
coinbase_tx_no_joinsplit_or_spend
function, as described in #1980.The code in this pull request has:
Review
@teor2345 outlined the solution, and @oxarbitrage is working on similar Orchard issues.
Related Issues
Part of #1980.
Follow Up Work