-
Notifications
You must be signed in to change notification settings - Fork 59
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
Allow increasing an account's nonce without changing its state #796
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.
Looks good! Thank you!
One question: are there any checks in the transaction kernel MASM for this? Might be good to have a test which ensures that this condition is handled correctly in the transaction kernel as well.
0f09350
to
f5f10d1
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 couple of nits inline. After these are addressed, we can merge.
miden-tx/src/tests/mod.rs
Outdated
|
||
## ACCOUNT PROCEDURE WRAPPERS | ||
## ======================================================================================== | ||
#TODO: Move this into an account library |
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.
What does this TODO
mean here?
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 think the initial idea was to move account procedure wrappers to the library, but I'm not sure that it is valid for my test. I'll remove this line.
miden-tx/src/tests/mod.rs
Outdated
proc.incr_nonce | ||
call.{ACCOUNT_INCR_NONCE_MAST_ROOT} | ||
# => [0] | ||
|
||
drop | ||
# => [] | ||
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.
Do we actually need this as a separate procedure? Seems simple enough to be just inside the begin ... end
statements below.
miden-tx/src/tests/mod.rs
Outdated
## Update the account nonce | ||
## ------------------------------------------------------------------------------------ |
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'm not sure this header here is helpful as the script is simple enough (similar comment about some other headers in this script).
This small PR removes the restriction from nonce to be changed without changing the account state, which was suggested in the related issue: #765.