Skip to content

Commit

Permalink
increasing INITIALIZATION_SLOT_SEPARATOR constant
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Feb 27, 2024
1 parent a0200e1 commit c69d59b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ library Constants {
uint256 internal constant NUM_FIELDS_PER_SHA256 = 2;
uint256 internal constant ARGS_HASH_CHUNK_LENGTH = 32;
uint256 internal constant ARGS_HASH_CHUNK_COUNT = 32;
uint256 internal constant INITIALIZATION_SLOT_SEPARATOR = 1000;
uint256 internal constant MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 1000;
uint256 internal constant MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS = 500;
uint256 internal constant MAX_PACKED_BYTECODE_SIZE_PER_UNCONSTRAINED_FUNCTION_IN_FIELDS = 500;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ global ARGS_HASH_CHUNK_COUNT: u32 = 32;
// determine whether a given variable has been initialized (by asserting that the value in the slot is 0).
// The initialization slot is computed by adding the constant bellow to the variable's storage slot. This constant has
// to be large enough so that it's ensured that it doesn't collide with storage slots of other variables.
global INITIALIZATION_SLOT_SEPARATOR: Field = 1000;
global INITIALIZATION_SLOT_SEPARATOR: Field = 1000_000_000;

// CONTRACT CLASS CONSTANTS
// This should be around 8192 (assuming 2**15 instructions packed at 8 bytes each),
Expand Down
1 change: 0 additions & 1 deletion yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const FUNCTION_SELECTOR_NUM_BYTES = 4;
export const NUM_FIELDS_PER_SHA256 = 2;
export const ARGS_HASH_CHUNK_LENGTH = 32;
export const ARGS_HASH_CHUNK_COUNT = 32;
export const INITIALIZATION_SLOT_SEPARATOR = 1000;
export const MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 1000;
export const MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS = 500;
export const MAX_PACKED_BYTECODE_SIZE_PER_UNCONSTRAINED_FUNCTION_IN_FIELDS = 500;
Expand Down

0 comments on commit c69d59b

Please sign in to comment.