-
Notifications
You must be signed in to change notification settings - Fork 57
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
kernel: add support for delayed note inclusion checks #759
Conversation
0362fd8
to
7d6f603
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! Thank you! I left some comments inline. Most of them are pretty minor. The main one is about the potential flaw in how input note commitment does not commit to metadata of notes with delayed inclusion proofs. I think we can tackle this problem in the next PR (and I'll write up some thoughts about how to do it in the issue itself).
So, let's address the smaller comments and merge.
#! Note: The note's metadata is validated when the note is authenticated, since | ||
#! the authentication is `hash(NOTE_ID || NOTE_METADATA)`. This is either done | ||
#! by the procedure `authenticate_note` for or delayed to another kernel. |
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.
One thing I just realized: input notes commitment does not commit to the metadata of notes with delayed inclusion proofs. I haven't thought this through entirely - but this may be a problem as whoever executes the transaction could set the metadata for such notes to arbitrary values.
If it is a problem, we'll need to include note metadata into the input notes commitment as well somehow.
7d6f603
to
37fb5f1
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! Thank you! I will merge this PR. We can add tests and make any potential refactorings in a follow-up PR.
Implements the changes to the kernel's prologue, which are necessary to support delayed note inclusion. Along side some code and documentation improvements.
closes #353
Currently marked as a draft because this PR is lacking tests.