-
Notifications
You must be signed in to change notification settings - Fork 42
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
Remove num_procs
from account procedure data
#923
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 to me! Just an optional nit.
miden-lib/src/transaction/inputs.rs
Outdated
// extend the advice map with the account code data and number of procedures | ||
let mut procedures: Vec<Felt> = vec![(code.num_procedures() as u8).into()]; | ||
procedures.append(&mut code.as_elements()); | ||
inputs.extend_map([(code.commitment(), procedures)]); | ||
inputs.extend_map([(code.commitment(), code.as_elements())]); |
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.
Nit: The comment still mentions the number of procedures - could be updated.
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.
Ops, my bad, I overlooked it. Thank you!
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!
The only thing that I noticed is that we should probably also update doc comments for the prologue's main
procedure (here). It seems like the advice map part is missing entries for both procedures and storage.
This small PR changes the value in the advice map corresponding to the account code commitment.
Similar to the account storage data, the number of procedures was removed from the data provided to the advice map. Now the number of account procedures is computed from the number of field elements used to represent the procedure data.