Skip to content

Commit

Permalink
Increase MAXCODESIZE for Polygon PoS (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashtare committed Jul 28, 2024
1 parent cd1b804 commit ecd2f20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions evm_arithmetization/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ parallel = [
"plonky2_maybe_rayon/parallel",
"starky/parallel",
]
polygon_pos = []

[[bin]]
name = "assemble"
Expand Down
5 changes: 4 additions & 1 deletion evm_arithmetization/src/cpu/kernel/constants/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
];
Expand Down

0 comments on commit ecd2f20

Please sign in to comment.