-
Notifications
You must be signed in to change notification settings - Fork 857
Conversation
95675e2
to
bf59a9b
Compare
bf59a9b
to
94e2f84
Compare
350fe00
to
7b60fdd
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.
Overall looks good to me! I think the way the runtime config is implemented is very nice; in particular it's not very intrusive! And the features are now available anywhere where they are needed; to allow the implementation to take different paths as necessary without making thinks too complex :)
I'm approving already even though I left some comments and suggestions; as I think they are minor and don't affect the current implementation. The most serious one is the state height map discussion.
zkevm-circuits/src/evm_circuit.rs
Outdated
@@ -457,7 +478,7 @@ mod evm_circuit_stats { | |||
fn evm_circuit_unusable_rows() { | |||
assert_eq!( | |||
EvmCircuit::<Fr>::unusable_rows(), | |||
unusable_rows::<Fr, EvmCircuit::<Fr>>(()), | |||
unusable_rows::<Fr, EvmCircuit::<Fr>>(FeatureConfig::default()), |
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.
I wonder if different feature configs could lead to different unusable rows 🤔
&mut meta, | ||
FeatureConfig { | ||
// Enable invalid_tx to get ExecutionState height | ||
invalid_tx: true, |
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.
What happens when we use this step_height_map
with the feature invalid_tx: false
? Does any state height change? Or is it only that we have an extra one for the InvalidTx state?
I think we could have the situation where a a state height changes, maybe not now?
I think it's worth adding a check to make sure that all common states between step_height_map
built out of different FeatureConfig
s have the same height, to detect bugs as soon as possible.
As an example. with the invalid_tx
feature, the EndTx constraints change a bit. Imagine this change causes an extra cell to be allocated, and then we have that height[EndTx]=5
with invalid_tx=false
, and height[EndTx]=6
with invalid_tx=true
! Provably this is not the case right now, but I imagine this situation could happen with other features.
7b60fdd
to
f9e197d
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.
Very nice! Only some really unimportant comments from me, the step heights issue pointed out by Edu I think indeed potentially problematic.
f9e197d
to
949c228
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.
I've reviewed the latest changes on this PR and all looks good to me!
Description
We add an initial structure for runtime config. In this PR, we plan to add only the invalid tx configuration for the starter.
Issue Link
#1636
Type of change
New feature (non-breaking change which adds functionality)
Decision
TODO