Skip to content
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

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

Fumuran
Copy link
Contributor

@Fumuran Fumuran commented Oct 15, 2024

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.

@Fumuran Fumuran added the no changelog This PR does not require an entry in the `CHANGELOG.md` file label Oct 15, 2024
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter left a 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.

Comment on lines 186 to 187
// 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())]);
Copy link
Contributor

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.

Copy link
Contributor Author

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!

Copy link
Contributor

@bobbinth bobbinth left a 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.

@bobbinth bobbinth merged commit 92d879a into next Oct 15, 2024
8 checks passed
@bobbinth bobbinth deleted the andrew-update-procedure-data-in-advice-map branch October 15, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog This PR does not require an entry in the `CHANGELOG.md` file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants