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

feat(recursion): memory access timestamp constraints #589

Merged
merged 23 commits into from
Apr 25, 2024

Conversation

kevjue
Copy link
Contributor

@kevjue kevjue commented Apr 24, 2024

No description provided.

@puma314
Copy link
Contributor

puma314 commented Apr 25, 2024

@kevjue nice work! The biggest commits I pushed were just to directly record the byte events when creating the memory event (and in the runtime) since the recursion VM is much more simplified. With this, we can make sure that generate_dependencies for all of the chips is null which should speed up performance a little bit since we don't have to do trace generation to get all the byte events (which is what generate_dependencies defaults to).

I also added this method to stark::utils that allows us to debug_constraints on a runtime that has been run. This is nice because for test programs in the program folder that test parts of the verification program, we can debug constraints and interactions. For example, this is a good test to run:

cargo test --package sp1-recursion-program --lib --release -- fri::two_adic_pcs::tests::test_two_adic_fri_pcs_single_batch --exact --show-output 

I think right now the above fails, but I'm not sure that it is this PR's fault...something bad might have gotten merged into main.

@puma314 puma314 marked this pull request as ready for review April 25, 2024 08:29
@kevjue
Copy link
Contributor Author

kevjue commented Apr 25, 2024

@kevjue nice work! The biggest commits I pushed were just to directly record the byte events when creating the memory event (and in the runtime) since the recursion VM is much more simplified. With this, we can make sure that generate_dependencies for all of the chips is null which should speed up performance a little bit since we don't have to do trace generation to get all the byte events (which is what generate_dependencies defaults to).

I also added this method to stark::utils that allows us to debug_constraints on a runtime that has been run. This is nice because for test programs in the program folder that test parts of the verification program, we can debug constraints and interactions. For example, this is a good test to run:

cargo test --package sp1-recursion-program --lib --release -- fri::two_adic_pcs::tests::test_two_adic_fri_pcs_single_batch --exact --show-output 

I think right now the above fails, but I'm not sure that it is this PR's fault...something bad might have gotten merged into main.

Thanks for the changes. I'll take a look at why its failing.


/// Verifies the inputted value is within 28 bits.
///
/// This method verifies that the inputted is less than 2^24 by doing a 16 bit and 12 bit range
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "that the input"

@tamirhemo tamirhemo merged commit c911108 into main Apr 25, 2024
4 checks passed
@tamirhemo tamirhemo deleted the kevjue/recursion_memory_timestamp_comparison branch April 25, 2024 18:01
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.

3 participants