-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add support for on-chain notes to block-producer
#310
Conversation
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.
Thanks you! I left several inline comments. The main idea here that we don't need to produce NoteCreated
in the batch builder when we don't ready to fill its fields, but later in the block producer. We also can get rid of several fields.
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 to me, thank you! I've left a couple comments here. Please also remove unused conversion from module proto/src/domain/notes.rs.
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.
LGTM
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 a couple of comments inline which I think should simplify things a little.
Also, as a part of this PR, let's also address this TODO.
block-producer/src/block.rs
Outdated
@@ -19,7 +19,7 @@ use crate::store::BlockInputsError; | |||
pub struct Block { | |||
pub header: BlockHeader, | |||
pub updated_accounts: Vec<AccountUpdateDetails>, | |||
pub created_notes: Vec<(usize, usize, NoteEnvelope)>, | |||
pub created_notes: Vec<NoteCreated>, |
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.
Related to the previous comment: this could have probably have been something like Vec<(usize, usize, NoteEnvelope)>
. In general, I think we should try to avoid using protobuf types inside domain types.
A thought for the future: we should probably move the Block
struct into miden-base
at some point.
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 just a couple of small comments/questions inline.
@polydez can we pull |
Sure! |
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 more comments inline. Some of these will require some changes in miden-base
. I'll work on these and then we can finish this PR.
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 a couple of test-related comments inline - but they are non-blocking.
Co-authored-by: igamigo <[email protected]> Co-authored-by: polydez <[email protected]>
In this PR I propose to update the block-proposer to enable addition of on-chain notes to the
store
throughapply_block
apiCloses: #141