Skip to content

Add_hint_to_dump_output_preimage_to_file_in_privacy_bl#314

Merged
YairVaknin-starkware merged 1 commit intomainfrom
yairv/add_hint_to_dump_output_preimage_to_file_in_privacy_bl
Mar 4, 2026
Merged

Add_hint_to_dump_output_preimage_to_file_in_privacy_bl#314
YairVaknin-starkware merged 1 commit intomainfrom
yairv/add_hint_to_dump_output_preimage_to_file_in_privacy_bl

Conversation

@YairVaknin-starkware
Copy link
Copy Markdown
Contributor

@YairVaknin-starkware YairVaknin-starkware commented Feb 24, 2026

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

Breaking changes?

  • yes
  • no

This change is Reviewable

Copy link
Copy Markdown
Contributor

@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 7 files reviewed, 1 unresolved discussion (waiting on avi-starkware, Yael-Starkware, and YairVaknin-starkware).


crates/cairo-program-runner-lib/src/hints/vars.rs line 75 at r1 (raw file):

/// Path to dump the output preimage for privacy simple bootloader.
pub const OUTPUT_PREIMAGE_DUMP_PATH: &str = "output_preimage_dump_path";

Can this be set from outside, e.g. by env var?

Code quote:

pub const OUTPUT_PREIMAGE_DUMP_PATH: &str = "output_preimage_dump_path";

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/add_hint_to_dump_output_preimage_to_file_in_privacy_bl branch from ec669e0 to 6e468f4 Compare February 26, 2026 08:26
Copy link
Copy Markdown
Contributor Author

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

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

@YairVaknin-starkware made 1 comment.
Reviewable status: 0 of 7 files reviewed, 1 unresolved discussion (waiting on avi-starkware, gilbens-starkware, and Yael-Starkware).


crates/cairo-program-runner-lib/src/hints/vars.rs line 75 at r1 (raw file):

Previously, gilbens-starkware (Gil Ben-Shachar) wrote…

Can this be set from outside, e.g. by env var?

You mean the actual constant you quoted or the path itself it dumps the file to?
Either way, I don't think we want to have an env var for a specific program the runner might run (privacy bl). Maybe on SN's side.

@anatgstarkware
Copy link
Copy Markdown
Contributor

crates/cairo-program-runner-lib/src/hints/vars.rs line 75 at r1 (raw file):

Previously, YairVaknin-starkware wrote…

You mean the actual constant you quoted or the path itself it dumps the file to?
Either way, I don't think we want to have an env var for a specific program the runner might run (privacy bl). Maybe on SN's side.

Can you pass the path in the input?

Copy link
Copy Markdown
Contributor Author

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

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

@YairVaknin-starkware made 1 comment.
Reviewable status: 0 of 7 files reviewed, 1 unresolved discussion (waiting on avi-starkware, gilbens-starkware, and Yael-Starkware).


crates/cairo-program-runner-lib/src/hints/vars.rs line 75 at r1 (raw file):

Previously, anatgstarkware (anatg) wrote…

Can you pass the path in the input?

Yes, a dump path is required to be present under the output_preimage_dump_path key in the program input json. See the PrivacySimpleBootloaderInput struct added in this PR.

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/add_hint_to_dump_output_preimage_to_file_in_privacy_bl branch from 6e468f4 to 757f793 Compare March 2, 2026 09:24
@anatgstarkware
Copy link
Copy Markdown
Contributor

crates/cairo-program-runner-lib/src/hints/vars.rs line 75 at r1 (raw file):

Previously, YairVaknin-starkware wrote…

Yes, a dump path is required to be present under the output_preimage_dump_path key in the program input json. See the PrivacySimpleBootloaderInput struct added in this PR.

thanks

Copy link
Copy Markdown
Contributor

@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.

:lgtm:

@gilbens-starkware reviewed 8 files and all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on avi-starkware and Yael-Starkware).

Copy link
Copy Markdown
Contributor

@Yael-Starkware Yael-Starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

@Yael-Starkware reviewed 8 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on avi-starkware and YairVaknin-starkware).


crates/cairo-program-runner-lib/src/hints/privacy_simple_bootloader_hints.rs line 274 at r3 (raw file):

            preimage_felts.len(),
            1 + expected_task_size,
            "Preimage length should be n_tasks + task_size"

Suggestion:

"Preimage length should be 1 + task_size (first variable is n_tasks)"

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/add_hint_to_dump_output_preimage_to_file_in_privacy_bl branch from 757f793 to 6605cfa Compare March 4, 2026 16:23
Copy link
Copy Markdown
Contributor Author

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

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

@YairVaknin-starkware made 1 comment and resolved 1 discussion.
Reviewable status: 7 of 8 files reviewed, all discussions resolved (waiting on avi-starkware, gilbens-starkware, and Yael-Starkware).


crates/cairo-program-runner-lib/src/hints/privacy_simple_bootloader_hints.rs line 274 at r3 (raw file):

            preimage_felts.len(),
            1 + expected_task_size,
            "Preimage length should be n_tasks + task_size"

Done

Copy link
Copy Markdown
Contributor Author

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

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

@YairVaknin-starkware reviewed 8 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on avi-starkware, gilbens-starkware, and Yael-Starkware).

@YairVaknin-starkware YairVaknin-starkware enabled auto-merge (squash) March 4, 2026 16:24
@YairVaknin-starkware YairVaknin-starkware merged commit 85a7383 into main Mar 4, 2026
7 checks passed
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.

4 participants