-
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
Introduce transaction epilogue #65
Conversation
863c2b0
to
9738d0f
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 great! Thank you! I left some questions and comments inline.
c55fa05
to
de7e34b
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 a few more comments inline. A couple of other things:
- This should probably be updated to work with the latest
next
branch of Miden VM. - In the future, once things stabilize a bit more, we should write an article in the docs to document memory layout with diagrams and in-depth explanations. Let's create an issue for this.
7995be8
to
48a2121
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 one comment about the nonce - once it is addressed, we should be good to merge.
miden-lib/asm/sat/utils.masm
Outdated
export.incr_account_nonce | ||
padw push.ACCT_ID_AND_NONCE_PTR mem_loadw | ||
movup.4 u32checked_add | ||
push.ACCT_ID_AND_NONCE_PTR mem_storew dropw | ||
end |
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.
I was thinking we'd check only the input value (not the nonce itself). So, it would look like:
export.incr_account_nonce
u32assert.1
padw push.ACCT_ID_AND_NONCE_PTR mem_loadw
movup.4 add
push.ACCT_ID_AND_NONCE_PTR mem_storew dropw
end
I'm not sure we should restrict the nonce to be 32 bits.
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.
got it, makes sense!
48a2121
to
e9dedb4
Compare
This PR implements the transaction kernel epilogue. The scope of this PR includes the following:
make watch
command that allows cargo watch to monitor the assembly directorymiden-lib/asm
and rebuild the miden library when a file change is saved. This dramatically improves developer experience when working with the debugger making quick iterative changes.memory
module that we can use to handle all memory related activities. I think this should also allow us to centralise the constants we use as most (maybe all?) of them are related to memory.ExecutedTransaction
object which holds all information relating to a transaction.transaction/utils.rs
which holds common functionality for producing commitments and inputs / outputs for a transaction.Metadata
to theNote
object.