Skip to content

Commit 9d5c878

Browse files
committed
feat: shift remaining protocol-contract addresses to 1-3
1 parent 4dcd262 commit 9d5c878

4 files changed

Lines changed: 12 additions & 22 deletions

File tree

barretenberg/cpp/pil/vm2/constants_gen.pil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ namespace constants;
1515
pol MAX_L2_TO_L1_MSGS_PER_TX = 8;
1616
pol MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS = 3000;
1717
pol MAX_PROTOCOL_CONTRACTS = 11;
18-
pol CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
19-
pol CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 3;
20-
pol FEE_JUICE_ADDRESS = 5;
18+
pol CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 1;
19+
pol CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 2;
20+
pol FEE_JUICE_ADDRESS = 3;
2121
pol FEE_JUICE_BALANCES_SLOT = 1;
2222
pol UPDATED_CLASS_IDS_SLOT = 1;
2323
pol FLAT_PUBLIC_LOGS_HEADER_LENGTH = 1;

barretenberg/cpp/src/barretenberg/aztec/aztec_constants.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
#define GENESIS_ARCHIVE_ROOT "0x177a4955b31ecaafad999753938a44e526b54c5ba5d536688227f85f15cfbdf5"
2222
#define MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS 3000
2323
#define MAX_PROTOCOL_CONTRACTS 11
24-
#define CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS 2
25-
#define CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS 3
26-
#define FEE_JUICE_ADDRESS 5
24+
#define CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS 1
25+
#define CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS 2
26+
#define FEE_JUICE_ADDRESS 3
2727
#define FEE_JUICE_BALANCES_SLOT 1
2828
#define UPDATED_CLASS_IDS_SLOT 1
2929
#define FLAT_PUBLIC_LOGS_HEADER_LENGTH 1

noir-projects/noir-protocol-circuits/crates/types/src/constants.nr

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -221,19 +221,9 @@ pub global CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE: Field =
221221
// Chosen to be a multiple of 3 (-1 to account for the separator), to optimize the poseidon2 hash.
222222
pub global MAX_PROTOCOL_CONTRACTS: u32 = 11;
223223
// Address 0 is not a protocol contract.
224-
// Address 1 is reserved (auth_registry was previously published here as a protocol contract; it is
225-
// now deployed as a regular contract at an artifact-derived address, see
226-
// `noir-projects/aztec-nr/canonical_addresses`).
227-
// Address 4 is reserved (multi_call_entrypoint was previously published here as a protocol contract;
228-
// it is now deployed as a regular contract at an artifact-derived address; see
229-
// `yarn-project/canonical-contracts/src/multi-call-entrypoint`).
230-
// Address 6 is reserved (public_checks was previously published here as a protocol contract; it is
231-
// now deployed as a regular contract at an artifact-derived address; see
232-
// `noir-projects/aztec-nr/canonical_addresses` for the Noir stamp and
233-
// `yarn-project/canonical-contracts/src/public-checks` for the TS twin).
234-
pub global CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(2);
235-
pub global CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(3);
236-
pub global FEE_JUICE_ADDRESS: AztecAddress = AztecAddress::from_field(5);
224+
pub global CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(1);
225+
pub global CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(2);
226+
pub global FEE_JUICE_ADDRESS: AztecAddress = AztecAddress::from_field(3);
237227

238228
// `SIDE_EFFECT_MASKING_ADDRESS` is used by the protocol circuits to silo the padding side effects. It's not a protocol
239229
// contract (hence its address is greater than `MAX_PROTOCOL_CONTRACTS`).

yarn-project/constants/src/constants.gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ export const CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE =
112112
export const CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE = 10538216027419913765597387738085647348651103543680388181336823392401502757423n;
113113
export const CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE = 20721543224513346060908370400407150739273836456436647488068002302723900469047n;
114114
export const MAX_PROTOCOL_CONTRACTS = 11;
115-
export const CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
116-
export const CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 3;
117-
export const FEE_JUICE_ADDRESS = 5;
115+
export const CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 1;
116+
export const CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 2;
117+
export const FEE_JUICE_ADDRESS = 3;
118118
export const SIDE_EFFECT_MASKING_ADDRESS = 19523154334483583633304358390644137470227519736821975910774528428729027989987n;
119119
export const NULL_MSG_SENDER_CONTRACT_ADDRESS = 21888242871839275222246405745257275088548364400416034343698204186575808495616n;
120120
export const CONTRACT_CLASS_REGISTRY_BYTECODE_CAPSULE_SLOT = 14193106819744442689484501689686180698286338820089744102289275815863062044599n;

0 commit comments

Comments
 (0)