diff --git a/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr index 480b0f825e7d..ee8ddb87f397 100644 --- a/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr +++ b/noir-projects/noir-protocol-circuits/src/crates/types/src/constants.nr @@ -97,6 +97,10 @@ global FUNCTION_SELECTOR_NUM_BYTES: Field = 4; global NUM_FIELDS_PER_SHA256: Field = 2; global ARGS_HASH_CHUNK_LENGTH: u32 = 32; global ARGS_HASH_CHUNK_COUNT: u32 = 32; +// The following is used in immutable state variables to compute an initialization slot whose value is used to +// 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; // CONTRACT CLASS CONSTANTS