Skip to content

Commit 4a6f95e

Browse files
committed
feat: swap class and instance registry addresses (class=1, instance=2)
1 parent 0d36d7c commit 4a6f95e

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

barretenberg/cpp/pil/vm2/constants_gen.pil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ 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 = 1;
19-
pol CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 2;
18+
pol CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 1;
19+
pol CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
2020
pol FEE_JUICE_ADDRESS = 3;
2121
pol FEE_JUICE_BALANCES_SLOT = 1;
2222
pol UPDATED_CLASS_IDS_SLOT = 1;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
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 1
25-
#define CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS 2
24+
#define CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS 1
25+
#define CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS 2
2626
#define FEE_JUICE_ADDRESS 3
2727
#define FEE_JUICE_BALANCES_SLOT 1
2828
#define UPDATED_CLASS_IDS_SLOT 1

barretenberg/cpp/src/barretenberg/vm2/generated/relations/tx_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void txImpl<FF_>::accumulate(ContainerOverSubrelations& evals,
1919
const auto constants_MAX_NOTE_HASHES_PER_TX = FF(64);
2020
const auto constants_MAX_NULLIFIERS_PER_TX = FF(64);
2121
const auto constants_MAX_L2_TO_L1_MSGS_PER_TX = FF(8);
22-
const auto constants_FEE_JUICE_ADDRESS = FF(5);
22+
const auto constants_FEE_JUICE_ADDRESS = FF(3);
2323
const auto constants_FEE_JUICE_BALANCES_SLOT = FF(1);
2424
const auto constants_AVM_TX_PHASE_VALUE_START = FF(0);
2525
const auto constants_AVM_TX_PHASE_VALUE_LAST = FF(11);

l1-contracts/src/core/libraries/ConstantsGen.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ library Constants {
2323
10_619_256_997_260_439_436_842_531_499_967_995_403_253_967_496_480_475_679_746_178_797_053_672_406_517;
2424
uint256 internal constant EMPTY_EPOCH_OUT_HASH =
2525
355_785_372_471_781_095_838_790_036_702_437_931_769_306_153_278_986_832_745_847_530_947_941_691_539;
26-
uint256 internal constant FEE_JUICE_ADDRESS = 5;
26+
uint256 internal constant FEE_JUICE_ADDRESS = 3;
2727
uint256 internal constant BLS12_POINT_COMPRESSED_BYTES = 48;
2828
uint256 internal constant ROOT_ROLLUP_PUBLIC_INPUTS_LENGTH = 111;
2929
uint256 internal constant NUM_MSGS_PER_BASE_PARITY = 256;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ pub global CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE: Field =
228228
// Chosen to be a multiple of 3 (-1 to account for the separator), to optimize the poseidon2 hash.
229229
pub global MAX_PROTOCOL_CONTRACTS: u32 = 11;
230230
// Address 0 is not a protocol contract.
231-
pub global CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(1);
232-
pub global CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(2);
231+
pub global CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(1);
232+
pub global CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(2);
233233
pub global FEE_JUICE_ADDRESS: AztecAddress = AztecAddress::from_field(3);
234234

235235
// `SIDE_EFFECT_MASKING_ADDRESS` is used by the protocol circuits to silo the padding side effects. It's not a protocol

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export const CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE =
117117
export const CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE = 10538216027419913765597387738085647348651103543680388181336823392401502757423n;
118118
export const CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE = 20721543224513346060908370400407150739273836456436647488068002302723900469047n;
119119
export const MAX_PROTOCOL_CONTRACTS = 11;
120-
export const CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 1;
121-
export const CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 2;
120+
export const CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 1;
121+
export const CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
122122
export const FEE_JUICE_ADDRESS = 3;
123123
export const SIDE_EFFECT_MASKING_ADDRESS = 19523154334483583633304358390644137470227519736821975910774528428729027989987n;
124124
export const NULL_MSG_SENDER_CONTRACT_ADDRESS = 21888242871839275222246405745257275088548364400416034343698204186575808495616n;

0 commit comments

Comments
 (0)