Skip to content

Commit 4b074ce

Browse files
committed
feat(multi_call_entrypoint): demote to non-protocol contract
Mirrors the auth_registry demotion (PR #23106): - Moves the noir contract from contracts/protocol/ to contracts/canonical/. - Removes MULTI_CALL_ENTRYPOINT_ADDRESS from constants.nr / aztec_constants.hpp / constants_gen.pil and drops the entry from protocol_contracts.json so the contract is no longer treated as a protocol contract. - Adds a multi-call-entrypoint stamp sub-package under @aztec/canonical-contracts with TS-only address.gen.ts + freshness test (no Noir consumers of the address exist, so no Noir lib stamp is generated). - Migrates consumers from ProtocolContractAddress.MultiCallEntrypoint / @aztec/protocol-contracts/multi-call-entrypoint to MULTI_CALL_ENTRYPOINT_ADDRESS and @aztec/canonical-contracts/multi-call-entrypoint: DefaultMultiCallEntrypoint, AztecNodeService.getProtocolContractAddresses, and the embedded wallet bundle/lazy providers. - Drops the multi-call-entrypoint subdir from @aztec/protocol-contracts and the corresponding aztec.js re-export.
1 parent 6578b98 commit 4b074ce

36 files changed

Lines changed: 409 additions & 76 deletions

File tree

barretenberg/cpp/pil/vm2/constants_gen.pil

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ namespace constants;
1717
pol MAX_PROTOCOL_CONTRACTS = 11;
1818
pol CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS = 2;
1919
pol CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS = 3;
20-
pol MULTI_CALL_ENTRYPOINT_ADDRESS = 4;
2120
pol FEE_JUICE_ADDRESS = 5;
2221
pol FEE_JUICE_BALANCES_SLOT = 1;
2322
pol UPDATED_CLASS_IDS_SLOT = 1;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#define MAX_PROTOCOL_CONTRACTS 11
2424
#define CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS 2
2525
#define CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS 3
26-
#define MULTI_CALL_ENTRYPOINT_ADDRESS 4
2726
#define FEE_JUICE_ADDRESS 5
2827
#define FEE_JUICE_BALANCES_SLOT 1
2928
#define UPDATED_CLASS_IDS_SLOT 1

noir-projects/noir-contracts/Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ members = [
2828
"contracts/fees/sponsored_fpc_contract",
2929
"contracts/message_discovery/handshake_registry_contract",
3030
"contracts/canonical/auth_registry_contract",
31+
"contracts/canonical/multi_call_entrypoint_contract",
3132
"contracts/canonical/public_checks_contract",
3233
"contracts/protocol/contract_class_registry_contract",
3334
"contracts/protocol/contract_instance_registry_contract",
3435
"contracts/protocol/fee_juice_contract",
35-
"contracts/protocol/multi_call_entrypoint_contract",
3636
"contracts/protocol_interface/contract_instance_registry_interface",
3737
"contracts/protocol_interface/fee_juice_interface",
3838
"contracts/test/generic_proxy_contract",

noir-projects/noir-contracts/contracts/protocol/multi_call_entrypoint_contract/Nargo.toml renamed to noir-projects/noir-contracts/contracts/canonical/multi_call_entrypoint_contract/Nargo.toml

File renamed without changes.

noir-projects/noir-contracts/contracts/protocol/multi_call_entrypoint_contract/src/main.nr renamed to noir-projects/noir-contracts/contracts/canonical/multi_call_entrypoint_contract/src/main.nr

File renamed without changes.
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
[
22
"contract_instance_registry_contract-ContractInstanceRegistry",
33
"contract_class_registry_contract-ContractClassRegistry",
4-
"multi_call_entrypoint_contract-MultiCallEntrypoint",
54
"fee_juice_contract-FeeJuice"
65
]

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,15 @@ pub global MAX_PROTOCOL_CONTRACTS: u32 = 11;
224224
// Address 1 is reserved (auth_registry was previously published here as a protocol contract; it is
225225
// now deployed as a regular contract at an artifact-derived address, see
226226
// `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`).
227230
// Address 6 is reserved (public_checks was previously published here as a protocol contract; it is
228231
// now deployed as a regular contract at an artifact-derived address; see
229232
// `noir-projects/aztec-nr/canonical_addresses` for the Noir stamp and
230233
// `yarn-project/canonical-contracts/src/public-checks` for the TS twin).
231234
pub global CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(2);
232235
pub global CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS: AztecAddress = AztecAddress::from_field(3);
233-
pub global MULTI_CALL_ENTRYPOINT_ADDRESS: AztecAddress = AztecAddress::from_field(4);
234236
pub global FEE_JUICE_ADDRESS: AztecAddress = AztecAddress::from_field(5);
235237

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

yarn-project/aztec-node/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"@aztec/bb-prover": "workspace:^",
7070
"@aztec/blob-client": "workspace:^",
7171
"@aztec/blob-lib": "workspace:^",
72+
"@aztec/canonical-contracts": "workspace:^",
7273
"@aztec/constants": "workspace:^",
7374
"@aztec/epoch-cache": "workspace:^",
7475
"@aztec/ethereum": "workspace:^",

yarn-project/aztec-node/src/aztec-node/server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { BBCircuitVerifier, BatchChonkVerifier, QueuedIVCVerifier } from '@aztec
33
import { TestCircuitVerifier } from '@aztec/bb-prover/test';
44
import { type BlobClientInterface, createBlobClientWithFileStores } from '@aztec/blob-client/client';
55
import { Blob } from '@aztec/blob-lib';
6+
import { MULTI_CALL_ENTRYPOINT_ADDRESS } from '@aztec/canonical-contracts/multi-call-entrypoint';
67
import { ARCHIVE_HEIGHT, type L1_TO_L2_MSG_TREE_HEIGHT, type NOTE_HASH_TREE_HEIGHT } from '@aztec/constants';
78
import { EpochCache, type EpochCacheInterface } from '@aztec/epoch-cache';
89
import { createEthereumChain } from '@aztec/ethereum/chain';
@@ -1609,7 +1610,7 @@ export class AztecNodeService implements AztecNode, AztecNodeAdmin, AztecNodeDeb
16091610
classRegistry: ProtocolContractAddress.ContractClassRegistry,
16101611
feeJuice: ProtocolContractAddress.FeeJuice,
16111612
instanceRegistry: ProtocolContractAddress.ContractInstanceRegistry,
1612-
multiCallEntrypoint: ProtocolContractAddress.MultiCallEntrypoint,
1613+
multiCallEntrypoint: MULTI_CALL_ENTRYPOINT_ADDRESS,
16131614
});
16141615
}
16151616

yarn-project/aztec-node/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
{
1919
"path": "../blob-lib"
2020
},
21+
{
22+
"path": "../canonical-contracts"
23+
},
2124
{
2225
"path": "../constants"
2326
},

0 commit comments

Comments
 (0)