-
Notifications
You must be signed in to change notification settings - Fork 71
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
Merge trace writer and trace generator. #672
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #672 +/- ##
==========================================
- Coverage 90.29% 90.09% -0.21%
==========================================
Files 75 75
Lines 10030 10053 +23
Branches 10030 10053 +23
==========================================
Hits 9057 9057
- Misses 892 915 +23
Partials 81 81 ☔ View full report in Codecov by Sentry. |
8da2844
to
ad0dfc3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 10 files at r1, all commit messages.
Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @alonh5)
crates/prover/src/examples/fibonacci/component.rs
line 142 at r1 (raw file):
_registry: &mut ComponentRegistry, ) -> ColumnVec<CircleEvaluation<CpuBackend, BaseField, BitReversedOrder>> { vec![]
Do we want to implement write_trace here?
Could be done in another pr
What would it require to use this write_trace function instead of the current implementation?
Code quote:
vec![]
crates/prover/src/examples/wide_fibonacci/component.rs
line 266 at r1 (raw file):
_registry: &mut ComponentRegistry, ) -> ColumnVec<CircleEvaluation<CpuBackend, BaseField, BitReversedOrder>> { vec![]
same
Code quote:
vec![]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @shaharsamocha7)
crates/prover/src/examples/fibonacci/component.rs
line 142 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Do we want to implement write_trace here?
Could be done in another prWhat would it require to use this write_trace function instead of the current implementation?
Yes I'll start working on it in a new PR.
crates/prover/src/examples/wide_fibonacci/component.rs
line 266 at r1 (raw file):
Previously, shaharsamocha7 wrote…
same
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @alonh5)
crates/prover/src/trace_generation/mod.rs
line 19 at r1 (raw file):
// A trait to generate a a trace. // Generates the trace given a list of inputs collects inputs for subcomponents. pub trait TraceGenerator<B: Backend> {
Do you think we should do this renaming? because I see that we also have AirTraceGenertor
.
If so, can you do it in another pr?
Suggestion:
pub trait ComponentTraceGenerator<B: Backend> {
crates/prover/src/trace_generation/mod.rs
line 45 at r1 (raw file):
pub trait AirTraceVerifier { fn interaction_elements(&self, channel: &mut Blake2sChannel) -> InteractionElements; }
I think that this trait should be in the core library (it is used also by the verifier)
Code quote:
pub trait AirTraceVerifier {
fn interaction_elements(&self, channel: &mut Blake2sChannel) -> InteractionElements;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 9 of 10 files reviewed, 2 unresolved discussions (waiting on @shaharsamocha7)
crates/prover/src/trace_generation/mod.rs
line 19 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Do you think we should do this renaming? because I see that we also have
AirTraceGenertor
.If so, can you do it in another pr?
Done in this PR.
crates/prover/src/trace_generation/mod.rs
line 45 at r1 (raw file):
Previously, shaharsamocha7 wrote…
I think that this trait should be in the core library (it is used also by the verifier)
Technically the verify function receives an Air
which is also an AirTraceVerifier
, but I think it's better to leave it close to the AirTraceGenerator
. Do you think that's okay?
d52fcf0
to
645ada3
Compare
ad0dfc3
to
f3e308f
Compare
There was a problem hiding this 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 10 files reviewed, 1 unresolved discussion (waiting on @alonh5)
crates/prover/src/trace_generation/mod.rs
line 45 at r1 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
Technically the verify function receives an
Air
which is also anAirTraceVerifier
, but I think it's better to leave it close to theAirTraceGenerator
. Do you think that's okay?
Yes, but that raises another question?
Why isn't the function interaction_elements just part of the Air trait?
There was a problem hiding this 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 10 files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7)
crates/prover/src/trace_generation/mod.rs
line 45 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Yes, but that raises another question?
Why isn't the function interaction_elements just part of the Air trait?
That's because for the prover we need that function before we know all the components, in the trace generation phase. If we want it to be part of Air then AirTraceGenerator would also have to be an Air and therefore know it's components (we've talked about this before).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 10 files at r1, 8 of 8 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @alonh5)
crates/prover/src/trace_generation/mod.rs
line 45 at r1 (raw file):
Previously, alonh5 (Alon Haramati) wrote…
That's because for the prover we need that function before we know all the components, in the trace generation phase. If we want it to be part of Air then AirTraceGenerator would also have to be an Air and therefore know it's components (we've talked about this before).
right
645ada3
to
b878fc3
Compare
f3e308f
to
c629f7d
Compare
b878fc3
to
4694a06
Compare
c629f7d
to
f39cfea
Compare
4694a06
to
59886e5
Compare
f39cfea
to
3aa5079
Compare
59886e5
to
aec56e7
Compare
3aa5079
to
673b1b3
Compare
aec56e7
to
3bce92a
Compare
673b1b3
to
50be746
Compare
3bce92a
to
9b97335
Compare
50be746
to
ca2c907
Compare
9b97335
to
f7132f1
Compare
ca2c907
to
2f0aac7
Compare
f7132f1
to
a60ae54
Compare
0d56bd7
to
93dd654
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 8 of 8 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @alonh5)
crates/prover/src/trace_generation/mod.rs
line 37 at r3 (raw file):
) -> ColumnVec<CircleEvaluation<B, BaseField, BitReversedOrder>>; fn write_interaction_trace(
Add documentation
Code quote:
fn write_interaction_trace(
a60ae54
to
718f366
Compare
93dd654
to
f8d5799
Compare
718f366
to
5b306cd
Compare
f8d5799
to
9bb7d3a
Compare
5b306cd
to
2e8eed6
Compare
4e36e51
to
ddf0fe6
Compare
ddf0fe6
to
2ce2998
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 11 files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7)
crates/prover/src/trace_generation/mod.rs
line 37 at r3 (raw file):
Previously, shaharsamocha7 wrote…
Add documentation
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 9 of 9 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @alonh5)
This change is