Skip to content

Add finalize_constants file.#469

Open
leo-starkware wants to merge 1 commit intoleo/constants_0from
leo/constants_1
Open

Add finalize_constants file.#469
leo-starkware wants to merge 1 commit intoleo/constants_0from
leo/constants_1

Conversation

@leo-starkware
Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown
Collaborator

This change is Reviewable

Copy link
Copy Markdown
Contributor Author

leo-starkware commented Apr 27, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

This was referenced Apr 27, 2026
@leo-starkware leo-starkware force-pushed the leo/constants_1 branch 2 times, most recently from e0acf30 to b3cc405 Compare April 28, 2026 10:47
@leo-starkware leo-starkware marked this pull request as ready for review April 28, 2026 10:49
@leo-starkware leo-starkware force-pushed the leo/constants_1 branch 2 times, most recently from ce66050 to e8ec356 Compare April 29, 2026 08:23
Copy link
Copy Markdown
Collaborator

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

@gilbens-starkware made 1 comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on alon-f and leo-starkware).


crates/circuits/src/finalize_constants.rs line 21 at r1 (raw file):

/// is to make testing easier by choosing a smaller minimum base.
// TODO(Leo): remove allow once integrated in the main flow.
#[allow(unused)]

Suggestion:

#[expect(unused)]

Copy link
Copy Markdown
Collaborator

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

@gilbens-starkware made 1 comment.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on alon-f and leo-starkware).


crates/circuits/src/finalize_constants.rs line 32 at r1 (raw file):

/// - Base decomposition (with a dynamic base B) for larger M31 values.
/// - Broadcast optimization for constants of the form `(x, x, x, x)`.
/// - QM31 basis combination (`i`, `u`, `iu`) for general extension-field constants.

Suggestion:

/// Yields and constrains every constant in `context.constants()` via arithmetic gates,
/// All constants are derived from the QM31 extension element `u = (0, 0, 1, 0)` by using:
/// - A `+1` chain for consecutive M31 integer constants.
/// TODO:
/// - Base decomposition (with a dynamic base B) for larger M31 values.
/// - Broadcast optimization for constants of the form `(x, x, x, x)`.
/// - QM31 basis combination (`i`, `u`, `iu`) for general extension-field constants.

Copy link
Copy Markdown
Collaborator

@gilbens-starkware gilbens-starkware left a comment

Choose a reason for hiding this comment

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

@gilbens-starkware made 1 comment.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on alon-f and leo-starkware).


crates/circuits/src/finalize_constants.rs line 32 at r1 (raw file):

/// - Base decomposition (with a dynamic base B) for larger M31 values.
/// - Broadcast optimization for constants of the form `(x, x, x, x)`.
/// - QM31 basis combination (`i`, `u`, `iu`) for general extension-field constants.

Thinking about it it'll be too annoying down the stack, ignore.

Copy link
Copy Markdown
Contributor Author

@leo-starkware leo-starkware left a comment

Choose a reason for hiding this comment

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

@leo-starkware made 1 comment and resolved 1 discussion.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on alon-f and gilbens-starkware).


crates/circuits/src/finalize_constants.rs line 21 at r1 (raw file):

/// is to make testing easier by choosing a smaller minimum base.
// TODO(Leo): remove allow once integrated in the main flow.
#[allow(unused)]

clippy complains with "error: this lint expectation is unfulfilled", i guess because it used in a test

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