diff --git a/evm_arithmetization/Cargo.toml b/evm_arithmetization/Cargo.toml index 45e9ccb8f..7398aee08 100644 --- a/evm_arithmetization/Cargo.toml +++ b/evm_arithmetization/Cargo.toml @@ -61,6 +61,7 @@ parallel = [ "plonky2_maybe_rayon/parallel", "starky/parallel", ] +polygon_pos = [] [[bin]] name = "assemble" diff --git a/evm_arithmetization/src/cpu/kernel/constants/mod.rs b/evm_arithmetization/src/cpu/kernel/constants/mod.rs index 3bd99f610..65d6418b3 100644 --- a/evm_arithmetization/src/cpu/kernel/constants/mod.rs +++ b/evm_arithmetization/src/cpu/kernel/constants/mod.rs @@ -337,7 +337,10 @@ const PRECOMPILES_GAS: [(&str, u16); 14] = [ const SNARKV_POINTERS: [(&str, u64); 2] = [("SNARKV_INP", 112), ("SNARKV_OUT", 100)]; const CODE_SIZE_LIMIT: [(&str, u64); 3] = [ - ("MAX_CODE_SIZE", 0x6000), + #[cfg(not(feature = "polygon_pos"))] + ("MAX_CODE_SIZE", 0x6000), // default Ethereum value + #[cfg(feature = "polygon_pos")] + ("MAX_CODE_SIZE", 0x8000), // Polygon PoS value, see PIP-30. ("MAX_INITCODE_SIZE", 0xc000), ("INITCODE_WORD_COST", 2), ];