-
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
ZIP-203: Validate Transaction Expiry Height in the transaction verifier #2387
Comments
I've updated this ticket to include https://zips.z.cash/zip-0203#changes-for-nu5 |
In this ticket several of the rules are hard to know if we need to implement them and if so how to do it in Zebra.
In Zebra
This is always the case in zebra for coinbase and non coinbase transactions by the use of
I think we already did this in the mempool work (need to double check).
We use
This is what we do now.
This is clear, i have a PR for this that will push soon. |
This is true, but that So it's best to explicitly add the 499999999 limit to
The same reasoning as the previous one applies.
The reason for that comment is that |
Thanks for the replies @conradoplg . Much clear now. I was able to mock a PR with that help. It seems this ticket involves 3 rules where the PR is implementing 2 of them. We have pending at least one rule to complete the ticket (more details in the PR). |
No, we don't need to do #1113 any time soon:
I'll update that ticket. |
Motivation
The transaction verifier needs to check the ZIP-203: Transaction Expiry consensus rules.
Specifications
Zcash Spec
https://zips.z.cash/protocol/protocol.pdf#txnencodingandconsensus
ZIP-203
https://zips.z.cash/zip-0203#specification
This rule is in ZIP 203, but we don't think it was ever implemented in
zcashd
:If used in combination with nLockTime, both nLockTime and nExpiryHeight must be block heights.NU5 Changes
https://zips.z.cash/zip-0203#changes-for-nu5
Note: this rule applies to both v4 and v5 transactions after NU5 activation.
Designs
Zebra parses the expiry height, and validates it in the mempool storage, but not in the transaction verifier:
zebra/zebra-chain/src/transaction.rs
Lines 184 to 185 in 22f2f06
Related Work
Validate the lock time field #2389
Support the large block heights required by the spec #1113 - out of scope for NU5 testnet activation
The text was updated successfully, but these errors were encountered: