-
Notifications
You must be signed in to change notification settings - Fork 858
[proof chunk] introduce Padding virtual step #1718
[proof chunk] introduce Padding virtual step #1718
Conversation
a60136b
to
f378050
Compare
f378050
to
5810e73
Compare
.last() | ||
.map(|tx| tx.last_step()) | ||
.unwrap_or_else(|| &self.block.block_steps.padding); | ||
let mut padding = last_step.clone(); // padding step need to keep transition context |
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.
Heads up: here use last_step because it's at the end of block.
In chunking, we should use next_tx.first_step instead
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.
Just to make sure this_tx.last_step
has the same transition witness as next_tx.first_step
right?
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.
No they are different. I thought we discussed this issue in Pr #1690 review section :)
Feel free to bring it up further if you thought it doenst make sense for why they different
5810e73
to
734e430
Compare
734e430
to
5810e73
Compare
@@ -421,7 +428,7 @@ impl CircuitInputBuilder<FixedCParams> { | |||
if is_first_chunk { | |||
push_op( | |||
&mut state.block.container, | |||
&mut end_block_last, | |||
&mut end_block, |
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 don't we just move StartOp
and PaddingOp
here in to the padding ExecStep
?
This PR was included in #1690 |
included in #1690 |
Description
Introduce this virtual step to carry transition context, which do not incur any extra rw_table lookup.
This also eliminate ambiguous
end_block_non_last
with unified padding virtual step.Design Rationale
Why introduce Padding
evm_row
andmax_rws
separate and independently.max_rws
bound.Therefore, introduce virtual step
Padding
to solve it.2 use cases for this
Padding then following by
EndChunk
Padding then following by
EndBlock