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

Add LogUp stark memory example #946

Merged
merged 41 commits into from
Jan 27, 2025
Merged

Add LogUp stark memory example #946

merged 41 commits into from
Jan 27, 2025

Conversation

nicole-graus
Copy link
Contributor

Add a continuous read-only memory stark example using LogUp.

This PR adds an example for the stark prover using the LogUp method for a permutation constraint.

@nicole-graus nicole-graus requested a review from a team as a code owner November 29, 2024 19:41
@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 54.05405% with 17 lines in your changes missing coverage. Please review.

Project coverage is 71.40%. Comparing base (6fb54a2) to head (9f5f92c).

Files with missing lines Patch % Lines
.../src/field/fields/fft_friendly/quartic_babybear.rs 54.05% 17 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #946      +/-   ##
==========================================
+ Coverage   71.32%   71.40%   +0.08%     
==========================================
  Files         155      155              
  Lines       33537    33574      +37     
==========================================
+ Hits        23920    23975      +55     
+ Misses       9617     9599      -18     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from stark-mem-example to main December 5, 2024 18:39
Comment on lines 11 to 12
#[cfg(feature = "lambdaworks-serde-binary")]
#[cfg(feature = "alloc")]
Copy link
Contributor

Choose a reason for hiding this comment

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

this 2 lines can be combined in one using all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed here.

Comment on lines +273 to +275
byte_slice.extend(ByteConversion::to_bytes_be(&self.value()[1]));
byte_slice.extend(ByteConversion::to_bytes_be(&self.value()[2]));
byte_slice.extend(ByteConversion::to_bytes_be(&self.value()[3]));
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe it's better to use extend_from_slice

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, changed here.

use lambdaworks_crypto::fiat_shamir::is_transcript::IsTranscript;
use lambdaworks_math::field::traits::{IsField, IsPrimeField, IsSubFieldOf};
use lambdaworks_math::{
field::{element::FieldElement, traits::IsFFTField},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
field::{element::FieldElement, traits::IsFFTField},
field::{element::FieldElement, traits::{IsField, IsPrimeField, IsSubFieldOf, IsFFTField}},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed here.

@diegokingston diegokingston added this pull request to the merge queue Jan 27, 2025
Merged via the queue into main with commit 3b16015 Jan 27, 2025
8 checks passed
@diegokingston diegokingston deleted the logup-mem-example branch January 27, 2025 20:39
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.

6 participants