-
Notifications
You must be signed in to change notification settings - Fork 40
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
Unify MemBefore and MemAfer #84
Unify MemBefore and MemAfer #84
Conversation
//! It contains (addr, value) pairs. Note that non-padding addresses must be | ||
//! unique. | ||
use crate::memory::VALUE_LIMBS; | ||
|
||
/// 1 if this is an actual final value, or 0 if it's a padding row. | ||
/// 1 if and actual value or 0 if it's a padding row. |
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.
an?
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.
LGTM, thanks!
pub(crate) fn generate_trace( | ||
&self, | ||
mem_before_values: &MemBeforeValues, | ||
final_values: Vec<Vec<F>>, |
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.
It looks like it can either be mem_before_values
or final_values
.
final_values: Vec<Vec<F>>, | |
propagated_values: Vec<Vec<F>>, |
); | ||
let mem_after_trace = timed!( | ||
timing, | ||
"generate mem_after trace", | ||
all_stark | ||
.mem_after_stark | ||
.generate_trace(&final_values, timing) | ||
.generate_trace(final_values.clone(), timing) |
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.
Why do we now need to clone?
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.
Actually, I just noticed there was a clone anyway, so nervemind my comment, sorry!
a592594
into
0xPolygonZero:continuation_to_zkevm
MemBeforeStark
andMemAfterStark
are almost the same thing. The only difference is how they are connected toMemoryStark
, using different CTL filters. This PR creates a singleMemoryContinuationStark
which is instantiated twice inAllStark
.