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

stark: additional documentation for generate_fri_parameters #975

Merged

Conversation

hackaugusto
Copy link
Contributor

Describe your changes

As the PR titles says. I'm going to changed #960 to compute the constant and save it here, but I needed a bit more detail about the stack state to do that.

Opening as a separated PR for an easier review.

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.

dropw
drop
drop
drop
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 new drops are clearing the stack of the two 0s loaded together with lde size. The idea is that the procedure should leave the stack in the state documented in Output.

However, this is not really necessary, because this is called by the verify procedure, and the stack is "empty" at that point.

I'm keeping it because it makes refactoring code easier. Let me know if anyone disagrees.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree, it should conform to the expected output stated in the header. Thank you for catching that!

@hackaugusto hackaugusto force-pushed the hacka-additional-documentation-for-generate_fri_parameters branch from 7cbd4ca to 3de6fd9 Compare June 28, 2023 10:45
@hackaugusto hackaugusto force-pushed the hacka-additional-documentation-for-generate_fri_parameters branch from 3de6fd9 to 99337cc Compare June 28, 2023 10:46

# Compute trace_domain_generator
# Compute trace generator `trace_g` = `lde_g^blowup_factor`
repeat.3
Copy link
Contributor Author

@hackaugusto hackaugusto Jun 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an instance that would benefit from #970

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this as well as compute_lde_generator should be deprecated with the work you have done on the AirScript side, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose you're talking about the binary search? I closed that PR since the code was complicated 0xPolygonMiden/air-script#320 (comment) .

Instead I'm going to save this value to memory and the AirScript codegen will load from the memory.

Copy link
Collaborator

@Al-Kindi-0 Al-Kindi-0 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!


# Compute trace_domain_generator
# Compute trace generator `trace_g` = `lde_g^blowup_factor`
repeat.3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this as well as compute_lde_generator should be deprecated with the work you have done on the AirScript side, right?

dropw
drop
drop
drop
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree, it should conform to the expected output stated in the header. Thank you for catching that!

@hackaugusto hackaugusto merged commit 785fc9b into next Jun 28, 2023
@hackaugusto hackaugusto deleted the hacka-additional-documentation-for-generate_fri_parameters branch June 28, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants