-
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
(Some) semantic transaction verification checks #1174
Conversation
4000bb3
to
caa26b2
Compare
88503c0
to
84d2abd
Compare
caa26b2
to
fd27781
Compare
50182ad
to
dcd814d
Compare
fd27781
to
6e50237
Compare
6e50237
to
5aecaed
Compare
There were some comments on these changes as part of that PR: #1100 (comment) |
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.
It seems like we're missing the following semantic verification consensus rules:
Sorry for the mangled text, my PDF viewer doesn't seem to handle spaces in the Zcash Spec PDF.
•[Pre-Heartwood] Acoinbase transactionalsoMUST NOThave anyOutput descriptions.
•[Overwinteronward]nExpiryHeightMUSTbe less than or equal to 499999999.
•[Overwinteronward] If atransactionis not acoinbase transactionand itsnExpiryHeight�eld is nonzero,then itMUST NOTbe mined at ablock heightgreater than itsnExpiryHeight.
•[Saplingonward]valueBalanceMUSTbe in the range{−MAX_MONEY..MAX_MONEY}.
]
•[Heartwoodonward] AllSaplingoutputs incoinbase transactionsMUSTdecrypt to anote plaintext, i.e. theprocedure in§ 4.17.3‘Decryption using a Full Viewing Key (Sapling)’on p. 49 does not return⊥, using asequence of32zero bytes as theoutgoing viewing key.
•[Canopyonward] AnySaplingoutput of acoinbase transactiondecrypted to anote plaintextaccording tothe preceding ruleMUSThavenote plaintext lead byteequal to0x02. (This applies even during the “graceperiod” speci�ed in [ZIP-212].)
Are they on a tracking issue somewhere?
This is an incomplete set of checks, I think we want to merge the ones we have and then keep adding more one at a time to see if they break anything. |
I think this is handled by |
5aecaed
to
999da71
Compare
999da71
to
976845a
Compare
(This is currently expected to fail the build until some of the error casting/impls are worked out) |
Follow on to #1173, supersedes #1100. See those PRs for details.