-
Notifications
You must be signed in to change notification settings - Fork 120
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
Split storage errors by match type: TXID or WTXID #2833
Conversation
I like it! For #2821 I think we'll need to split this even more:
Should we do this in this PR, or in a following one? |
I was planning on doing some of that split in #2694, and then whatever is left over we can do in #2821. |
This comment has been minimized.
This comment has been minimized.
3a0a315
to
b6b1810
Compare
ec8614b
to
e515fc9
Compare
b6b1810
to
1570afb
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.
Looks good!
Motivation
ZIP-401 requires mempools to match some transaction rejections by
transaction::Hash
, rather thanUnminedTxId
.Zebra already implements some rejections that should be matched by
transaction::Hash
. So we can modify our existing matches, and prepare for ZIP-401.Closes #2819.
Specifications
https://zips.z.cash/zip-0401
Designs
For rejected invalid transactions (i.e. transactions that failed verification or storage), Zebra should match:
SpendConflict
,Expired
): check for the same TXID (mined_id()
) - this ticketUnminedTxId
) - Add transactions that failed verification to the mempool rejected list #2818Solution
SpendConflict
,Expired
, andRandomlyEvicted
bytransaction::Hash
FailedVerification
byUnminedTxId
Review
I'd like an initial review from @conradoplg and @upbqdn, because they're implementing the related ZIP-401 tickets.
Does this design work for you?
Is this a minimal change?
Reviewer Checklist
Follow Up Work
We might want to split
FailedVerification
into effects failures and authorization failures, see #2834.But this change is not required for a minimal mempool implementation.