-
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
Match rejected transactions correctly by TXID or WTXID #2819
Comments
If the reason for failed verification was a problem with the witness data (i.e. the transaction is otherwise valid), then if it's submitted with different witness data you need to revalidate that. That is, you probably need caches for which txids refer to transactions that are invalidated regardless of witness data, and which wtxids are invalidated by the witness data. Apologies for the lack of explicit specification here. I'm not entirely sure zcashd does it right; it's something we should check. |
We could add another Bloom filter to track txids of transactions that are rejected due to invalid effecting data, but the |
I unblocked this task by moving the blocked parts into other tickets (ZIP-401 and #2818). |
Preparation for ticket #2819. Removing these errors means that we don't have to decide which type of transaction ID match we want for them.
Preparation for ticket #2819. Removing these errors means that we don't have to decide which type of transaction ID match we want for them.
Preparation for ticket #2819. Removing these errors means that we don't have to decide which type of transaction ID match we want for them.
Preparation for ticket #2819. Removing these errors means that we don't have to decide which type of transaction ID match we want for them.
* Remove unused mempool storage errors Preparation for ticket #2819. Removing these errors means that we don't have to decide which type of transaction ID match we want for them. * Remove unused mempool errors, and deduplicate storage errors * rustfmt
Motivation
When receiving a mempool-bound transaction we check if it's in the rejected list, and if it is, we avoid downloading/verifying it.
However, this check currently uses
UnminedTxId
which is the WTXID for V5-onward.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
, missing inputs, nullifier conflicts): check for the same TXID (mined_id()
) - this ticketUnminedTxId
) - Add transactions that failed verification to the mempool rejected list #2818If it's difficult to distinguish between verifier errors, all verification failures can be matched by WTXID. Then we can open a follow-up ticket to match missing inputs, nullifier conflicts, and
Expired
bymined_id()
.This may require some refactoring to allow looking up rejected transactions by their TXID, or splitting the rejected list in two (evicted and rejected?)
Related Work
Invalid transactions are not currently being added to the rejected list; this is #2818, so that must be done before this one.
The text was updated successfully, but these errors were encountered: