@@ -95,7 +95,7 @@ pub fn gen_begin_tx_steps(state: &mut CircuitInputStateRef) -> Result<Vec<ExecSt
95
95
}
96
96
}
97
97
} else {
98
- // else, add 3 ( or 6 after curie) RW read operations for transaction L1 fee.
98
+ // else, add 6 RW read operations for transaction L1 fee.
99
99
gen_tx_l1_fee_ops ( state, & mut exec_step) ?;
100
100
}
101
101
@@ -727,7 +727,7 @@ fn write_tx_receipt(
727
727
Ok ( ( ) )
728
728
}
729
729
730
- // Add 3(or 6 after curie) RW read operations for transaction L1 fee.
730
+ // Add 6 RW read operations for transaction L1 fee.
731
731
fn gen_tx_l1_fee_ops (
732
732
state : & mut CircuitInputStateRef ,
733
733
exec_step : & mut ExecStep ,
@@ -786,47 +786,52 @@ fn gen_tx_l1_fee_ops(
786
786
) ,
787
787
) ?;
788
788
789
- // curie operations
789
+ // Sanity check: we do not support pre-curie blocks as of <https://github.com/scroll-tech/zkevm-circuits/pull/1415>
790
+ //
791
+ // We expect a post-curie block.
790
792
let chain_id = state. block . chain_id ;
791
793
let block_number = state. tx . block_num ;
792
- if is_curie_enabled ( chain_id, block_number) {
793
- state. push_op (
794
- exec_step,
795
- RW :: READ ,
796
- StorageOp :: new (
797
- * l1_gas_price_oracle:: ADDRESS ,
798
- * l1_gas_price_oracle:: L1_BLOB_BASEFEE_SLOT ,
799
- l1_blob_basefee,
800
- l1_blob_basefee,
801
- tx_id,
802
- l1_blob_basefee_committed,
803
- ) ,
804
- ) ?;
805
- state. push_op (
806
- exec_step,
807
- RW :: READ ,
808
- StorageOp :: new (
809
- * l1_gas_price_oracle:: ADDRESS ,
810
- * l1_gas_price_oracle:: COMMIT_SCALAR_SLOT ,
811
- commit_scalar,
812
- commit_scalar,
813
- tx_id,
814
- commit_scalar_committed,
815
- ) ,
816
- ) ?;
817
- state. push_op (
818
- exec_step,
819
- RW :: READ ,
820
- StorageOp :: new (
821
- * l1_gas_price_oracle:: ADDRESS ,
822
- * l1_gas_price_oracle:: BLOB_SCALAR_SLOT ,
823
- blob_scalar,
824
- blob_scalar,
825
- tx_id,
826
- blob_scalar_committed,
827
- ) ,
828
- ) ?;
829
- }
794
+ debug_assert ! (
795
+ is_curie_enabled( chain_id, block_number) ,
796
+ "block {block_number} is pre-curie" ,
797
+ ) ;
798
+
799
+ state. push_op (
800
+ exec_step,
801
+ RW :: READ ,
802
+ StorageOp :: new (
803
+ * l1_gas_price_oracle:: ADDRESS ,
804
+ * l1_gas_price_oracle:: L1_BLOB_BASEFEE_SLOT ,
805
+ l1_blob_basefee,
806
+ l1_blob_basefee,
807
+ tx_id,
808
+ l1_blob_basefee_committed,
809
+ ) ,
810
+ ) ?;
811
+ state. push_op (
812
+ exec_step,
813
+ RW :: READ ,
814
+ StorageOp :: new (
815
+ * l1_gas_price_oracle:: ADDRESS ,
816
+ * l1_gas_price_oracle:: COMMIT_SCALAR_SLOT ,
817
+ commit_scalar,
818
+ commit_scalar,
819
+ tx_id,
820
+ commit_scalar_committed,
821
+ ) ,
822
+ ) ?;
823
+ state. push_op (
824
+ exec_step,
825
+ RW :: READ ,
826
+ StorageOp :: new (
827
+ * l1_gas_price_oracle:: ADDRESS ,
828
+ * l1_gas_price_oracle:: BLOB_SCALAR_SLOT ,
829
+ blob_scalar,
830
+ blob_scalar,
831
+ tx_id,
832
+ blob_scalar_committed,
833
+ ) ,
834
+ ) ?;
830
835
831
836
Ok ( ( ) )
832
837
}
0 commit comments