-
Notifications
You must be signed in to change notification settings - Fork 111
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 has_inputs_and_outputs()
for new consensus rules
#2398
Conversation
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 PR is good enough to merge now. I'll leave it to @oxarbitrage to make some improvements if he wants.
I moved the remaining items to new lower priority tickets and enabled auto merge here. Need a new approval. |
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 has tests and a follow up ticket, so it's good to go
Motivation
We need to update Zebra for new consensus rules added to the protocol in regards to orchard flags. Closes #2365
Specifications
tx_in_count
,nSpendsSapling
, andnJoinSplit
MUST be non-zero.tx_out_count
,nOutputsSapling
, andnJoinSplit
MUST be non-zero.tx_in_count
> 0 ornSpendsSapling
> 0 or (nActionsOrchard
> 0 andenableSpendsOrchard
= 1)tx_out_count
> 0 ornOutputsSapling
> 0 or (nActionsOrchard
> 0 andenableOutputsOrchard
= 1)https://zips.z.cash/protocol/protocol.pdf#txnencodingandconsensus
Solution
Add the new consensus rules into the
has_inputs_and_outputs
function, update the tests to cover them.Review
Anyone can review the code initially, before merging @teor2345 should take a look.
Reviewer Checklist