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

stav: extract information for the prover from the runner #1982

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Stavbe
Copy link

@Stavbe Stavbe commented Mar 5, 2025

Add ProverInfo struct and create it from the runner

In contrast to how we did it before, we want to use the data while it's still relocatable and perform the relocation in the adapter. For this, we need the memory, trace, built-in segment information, and public memory addresses before they are relocated.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

This change is Reviewable

@Stavbe Stavbe force-pushed the stav/get_info_for_prover_input branch 3 times, most recently from 596fab9 to 9db0939 Compare March 6, 2025 15:00
Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @Oppen, @pefontana, and @yuvalsw)

Copy link

@DavidLevitGurevich DavidLevitGurevich left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @fmoletta, @gabrielbosio, @igaray, @juanbono, @Oppen, @pefontana, and @yuvalsw)


vm/src/vm/runners/cairo_runner.rs line 1495 at r3 (raw file):

            public_memory_offsets: self.vm.segments.public_memory_offsets.iter()
            .map(|(segment, offset_page)| {
                let offsets: Vec<usize> = offset_page.iter().map(|(offset, _)| *offset).collect();

what is the data that you are deleting? why don't you need it? does it mean you can have duplications in offsets?


vm/src/vm/runners/cairo_runner.rs line 1507 at r3 (raw file):

//*   ProverInfo
//* ---------------------- 
/// This struct contains all relevant data for the prover.  

delete spaces at end of line (also below)

@Stavbe Stavbe force-pushed the stav/get_info_for_prover_input branch from 9db0939 to 4fd88b8 Compare March 9, 2025 09:22
Copy link
Author

@Stavbe Stavbe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @DavidLevitGurevich, @fmoletta, @gabrielbosio, @igaray, @juanbono, @Oppen, @pefontana, and @yuvalsw)


vm/src/vm/runners/cairo_runner.rs line 1495 at r3 (raw file):

Previously, DavidLevitGurevich wrote…

what is the data that you are deleting? why don't you need it? does it mean you can have duplications in offsets?

I am deleting the page id, which " it's just a logical overlay on the output, it's relevant for apps/bootloaders" according to Titelman.
I can't have duplications because of it.

@Stavbe Stavbe force-pushed the stav/get_info_for_prover_input branch from 4fd88b8 to 5ef52df Compare March 10, 2025 09:31
@Stavbe Stavbe requested a review from noaov1 as a code owner March 10, 2025 09:31
@Stavbe Stavbe force-pushed the stav/get_info_for_prover_input branch from 5ef52df to 05a3f6f Compare March 10, 2025 09:33
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