@aztec/ethereum 2.0.3-rc.16 → 2.0.3-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dest/config.js
CHANGED
|
@@ -173,11 +173,11 @@ const TestnetEntryQueueConfig = {
|
|
|
173
173
|
maxQueueFlushSize: 32n
|
|
174
174
|
};
|
|
175
175
|
const StagingIgnitionEntryQueueConfig = {
|
|
176
|
-
bootstrapValidatorSetSize:
|
|
177
|
-
bootstrapFlushSize:
|
|
176
|
+
bootstrapValidatorSetSize: 1250n,
|
|
177
|
+
bootstrapFlushSize: 8n,
|
|
178
178
|
normalFlushSizeMin: 1n,
|
|
179
179
|
normalFlushSizeQuotient: 2048n,
|
|
180
|
-
maxQueueFlushSize:
|
|
180
|
+
maxQueueFlushSize: 8n
|
|
181
181
|
};
|
|
182
182
|
export const getEntryQueueConfig = (networkName)=>{
|
|
183
183
|
switch(networkName){
|
|
@@ -173,10 +173,7 @@ export declare class L1Deployer {
|
|
|
173
173
|
constructor(client: ExtendedViemWalletClient, maybeSalt: number | undefined, dateProvider?: DateProvider, acceleratedTestDeployments?: boolean, logger?: Logger, txUtilsConfig?: L1TxUtilsConfig | undefined, createVerificationJson?: boolean);
|
|
174
174
|
deploy<const TAbi extends Abi>(params: ContractArtifacts<TAbi>, args?: ContractConstructorArgs<TAbi>, opts?: {
|
|
175
175
|
gasLimit?: bigint;
|
|
176
|
-
}): Promise<
|
|
177
|
-
address: EthAddress;
|
|
178
|
-
existed: boolean;
|
|
179
|
-
}>;
|
|
176
|
+
}): Promise<EthAddress>;
|
|
180
177
|
waitForDeployments(): Promise<void>;
|
|
181
178
|
sendTransaction(tx: L1TxRequest, options?: L1GasConfig): Promise<{
|
|
182
179
|
txHash: Hex;
|
|
@@ -205,7 +202,6 @@ export declare function deployL1Contract(extendedClient: ExtendedViemWalletClien
|
|
|
205
202
|
address: EthAddress;
|
|
206
203
|
txHash: Hex | undefined;
|
|
207
204
|
deployedLibraries?: VerificationLibraryEntry[];
|
|
208
|
-
existed: boolean;
|
|
209
205
|
}>;
|
|
210
206
|
export declare function getExpectedAddress(abi: Narrow<Abi | readonly unknown[]>, bytecode: Hex, args: readonly unknown[], salt: Hex): {
|
|
211
207
|
address: `0x${string}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources":["../src/deploy_l1_contracts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAwB,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EACL,KAAK,KAAK,EACV,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,iBAAiB,EAUvB,MAAM,MAAM,CAAC;AAKd,OAAO,EACL,KAAK,iBAAiB,EAOvB,MAAM,aAAa,CAAC;AAIrB,OAAO,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAkB7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,SAAS,EACT,KAAK,eAAe,EAGrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAI3D,eAAO,MAAM,gBAAgB,EAAE,GAAkD,CAAC;AAIlF,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,UAAU,CAAC;IACrB,UAAU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E,CAAC,CA+I3G;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,CAAC,GAAG,GAAG,SAAS,OAAO,EAAE,CAAC,EACrC,QAAQ,EAAE,GAAG,EACb,IAAI,EAAE,SAAS,OAAO,EAAE,EACxB,IAAI,EAAE,GAAG;;;;EAeV"}
|
|
@@ -24,32 +24,32 @@ const networkName = getActiveNetworkName();
|
|
|
24
24
|
export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
25
25
|
logger.info(`Deploying shared contracts for network configuration: ${networkName}`);
|
|
26
26
|
const txHashes = [];
|
|
27
|
-
const
|
|
27
|
+
const feeAssetAddress = await deployer.deploy(FeeAssetArtifact, [
|
|
28
28
|
'FeeJuice',
|
|
29
29
|
'FEE',
|
|
30
30
|
l1Client.account.address
|
|
31
31
|
]);
|
|
32
32
|
logger.verbose(`Deployed Fee Asset at ${feeAssetAddress}`);
|
|
33
|
-
const
|
|
33
|
+
const stakingAssetAddress = await deployer.deploy(StakingAssetArtifact, [
|
|
34
34
|
'Staking',
|
|
35
35
|
'STK',
|
|
36
36
|
l1Client.account.address
|
|
37
37
|
]);
|
|
38
38
|
logger.verbose(`Deployed Staking Asset at ${stakingAssetAddress}`);
|
|
39
39
|
const gseConfiguration = getGSEConfiguration(networkName);
|
|
40
|
-
const gseAddress =
|
|
40
|
+
const gseAddress = await deployer.deploy(GSEArtifact, [
|
|
41
41
|
l1Client.account.address,
|
|
42
42
|
stakingAssetAddress.toString(),
|
|
43
43
|
gseConfiguration.activationThreshold,
|
|
44
44
|
gseConfiguration.ejectionThreshold
|
|
45
|
-
])
|
|
45
|
+
]);
|
|
46
46
|
logger.verbose(`Deployed GSE at ${gseAddress}`);
|
|
47
|
-
const
|
|
47
|
+
const registryAddress = await deployer.deploy(RegistryArtifact, [
|
|
48
48
|
l1Client.account.address,
|
|
49
49
|
feeAssetAddress.toString()
|
|
50
50
|
]);
|
|
51
51
|
logger.verbose(`Deployed Registry at ${registryAddress}`);
|
|
52
|
-
const
|
|
52
|
+
const governanceProposerAddress = await deployer.deploy(GovernanceProposerArtifact, [
|
|
53
53
|
registryAddress.toString(),
|
|
54
54
|
gseAddress.toString(),
|
|
55
55
|
BigInt(args.governanceProposerQuorum ?? args.governanceProposerRoundSize / 2 + 1),
|
|
@@ -58,7 +58,7 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
58
58
|
logger.verbose(`Deployed GovernanceProposer at ${governanceProposerAddress}`);
|
|
59
59
|
// @note @LHerskind the assets are expected to be the same at some point, but for better
|
|
60
60
|
// configurability they are different for now.
|
|
61
|
-
const
|
|
61
|
+
const governanceAddress = await deployer.deploy(GovernanceArtifact, [
|
|
62
62
|
stakingAssetAddress.toString(),
|
|
63
63
|
governanceProposerAddress.toString(),
|
|
64
64
|
gseAddress.toString(),
|
|
@@ -98,11 +98,11 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
98
98
|
logger.verbose(`Set governance on GSE in ${txHash}`);
|
|
99
99
|
txHashes.push(txHash);
|
|
100
100
|
}
|
|
101
|
-
const coinIssuerAddress =
|
|
101
|
+
const coinIssuerAddress = await deployer.deploy(CoinIssuerArtifact, [
|
|
102
102
|
feeAssetAddress.toString(),
|
|
103
103
|
1_000_000n * 10n ** 18n,
|
|
104
104
|
l1Client.account.address
|
|
105
|
-
])
|
|
105
|
+
]);
|
|
106
106
|
logger.verbose(`Deployed CoinIssuer at ${coinIssuerAddress}`);
|
|
107
107
|
logger.verbose(`Waiting for deployments to complete`);
|
|
108
108
|
await deployer.waitForDeployments();
|
|
@@ -112,11 +112,11 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
112
112
|
let zkPassportVerifierAddress = undefined;
|
|
113
113
|
// Only if not on mainnet will we deploy the handlers
|
|
114
114
|
if (l1Client.chain.id !== 1) {
|
|
115
|
-
/* -------------------------------------------------------------------------- */ /* CHEAT CODES START HERE */ /* -------------------------------------------------------------------------- */ feeAssetHandlerAddress =
|
|
115
|
+
/* -------------------------------------------------------------------------- */ /* CHEAT CODES START HERE */ /* -------------------------------------------------------------------------- */ feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
|
|
116
116
|
l1Client.account.address,
|
|
117
117
|
feeAssetAddress.toString(),
|
|
118
118
|
BigInt(1000n * 10n ** 18n)
|
|
119
|
-
])
|
|
119
|
+
]);
|
|
120
120
|
logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
|
|
121
121
|
// Only if we are "fresh" will we be adding as a minter, otherwise above will simply get same address
|
|
122
122
|
if (needToSetGovernance) {
|
|
@@ -161,9 +161,9 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
161
161
|
skipBindCheck: args.zkPassportArgs?.mockZkPassportVerifier ?? false,
|
|
162
162
|
skipMerkleCheck: true
|
|
163
163
|
};
|
|
164
|
-
stakingAssetHandlerAddress =
|
|
164
|
+
stakingAssetHandlerAddress = await deployer.deploy(StakingAssetHandlerArtifact, [
|
|
165
165
|
stakingAssetHandlerDeployArgs
|
|
166
|
-
])
|
|
166
|
+
]);
|
|
167
167
|
logger.verbose(`Deployed StakingAssetHandler at ${stakingAssetHandlerAddress}`);
|
|
168
168
|
const { txHash: stakingMinterTxHash } = await deployer.sendTransaction({
|
|
169
169
|
to: stakingAssetAddress.toString(),
|
|
@@ -217,7 +217,7 @@ export const deploySharedContracts = async (l1Client, deployer, args, logger)=>{
|
|
|
217
217
|
};
|
|
218
218
|
const getZkPassportVerifierAddress = async (deployer, args)=>{
|
|
219
219
|
if (args.zkPassportArgs?.mockZkPassportVerifier) {
|
|
220
|
-
return
|
|
220
|
+
return await deployer.deploy(mockVerifiers.mockZkPassportVerifier);
|
|
221
221
|
}
|
|
222
222
|
return ZK_PASSPORT_VERIFIER_ADDRESS;
|
|
223
223
|
};
|
|
@@ -251,17 +251,17 @@ const getZkPassportVerifierAddress = async (deployer, args)=>{
|
|
|
251
251
|
};
|
|
252
252
|
};
|
|
253
253
|
export const deploySlashFactory = async (deployer, rollupAddress, logger)=>{
|
|
254
|
-
const slashFactoryAddress =
|
|
254
|
+
const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [
|
|
255
255
|
rollupAddress
|
|
256
|
-
])
|
|
256
|
+
]);
|
|
257
257
|
logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
|
|
258
258
|
return slashFactoryAddress;
|
|
259
259
|
};
|
|
260
260
|
export const deployUpgradePayload = async (deployer, addresses)=>{
|
|
261
|
-
const payloadAddress =
|
|
261
|
+
const payloadAddress = await deployer.deploy(RegisterNewRollupVersionPayloadArtifact, [
|
|
262
262
|
addresses.registryAddress.toString(),
|
|
263
263
|
addresses.rollupAddress.toString()
|
|
264
|
-
])
|
|
264
|
+
]);
|
|
265
265
|
return payloadAddress;
|
|
266
266
|
};
|
|
267
267
|
function slasherFlavorToSolidityEnum(flavor) {
|
|
@@ -289,10 +289,10 @@ function slasherFlavorToSolidityEnum(flavor) {
|
|
|
289
289
|
const txHashes = [];
|
|
290
290
|
let epochProofVerifier = EthAddress.ZERO;
|
|
291
291
|
if (args.realVerifier) {
|
|
292
|
-
epochProofVerifier =
|
|
292
|
+
epochProofVerifier = await deployer.deploy(l1ArtifactsVerifiers.honkVerifier);
|
|
293
293
|
logger.verbose(`Rollup will use the real verifier at ${epochProofVerifier}`);
|
|
294
294
|
} else {
|
|
295
|
-
epochProofVerifier =
|
|
295
|
+
epochProofVerifier = await deployer.deploy(mockVerifiers.mockVerifier);
|
|
296
296
|
logger.verbose(`Rollup will use the mock verifier at ${epochProofVerifier}`);
|
|
297
297
|
}
|
|
298
298
|
const rewardConfig = {
|
|
@@ -345,10 +345,10 @@ function slasherFlavorToSolidityEnum(flavor) {
|
|
|
345
345
|
genesisStateArgs,
|
|
346
346
|
rollupConfigArgs
|
|
347
347
|
];
|
|
348
|
-
const
|
|
348
|
+
const rollupAddress = await deployer.deploy(RollupArtifact, rollupArgs, {
|
|
349
349
|
gasLimit: 15_000_000n
|
|
350
350
|
});
|
|
351
|
-
logger.verbose(`Deployed Rollup at ${rollupAddress}
|
|
351
|
+
logger.verbose(`Deployed Rollup at ${rollupAddress}`, rollupConfigArgs);
|
|
352
352
|
const rollupContract = new RollupContract(extendedClient, rollupAddress);
|
|
353
353
|
await deployer.waitForDeployments();
|
|
354
354
|
logger.verbose(`All core contracts have been deployed`);
|
|
@@ -369,9 +369,9 @@ function slasherFlavorToSolidityEnum(flavor) {
|
|
|
369
369
|
logger.verbose(`Funding fee juice portal with ${args.feeJuicePortalInitialBalance} fee juice in ${mintTxHash} (accelerated test deployments)`);
|
|
370
370
|
txHashes.push(mintTxHash);
|
|
371
371
|
}
|
|
372
|
-
const slashFactoryAddress =
|
|
372
|
+
const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [
|
|
373
373
|
rollupAddress.toString()
|
|
374
|
-
])
|
|
374
|
+
]);
|
|
375
375
|
logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
|
|
376
376
|
// We need to call a function on the registry to set the various contract addresses.
|
|
377
377
|
const registryContract = getContract({
|
|
@@ -435,11 +435,7 @@ function slasherFlavorToSolidityEnum(flavor) {
|
|
|
435
435
|
} else {
|
|
436
436
|
logger.verbose(`Not the owner of the gse, skipping rollup addition`);
|
|
437
437
|
}
|
|
438
|
-
|
|
439
|
-
const queuedAttestorCount = await rollupContract.getEntryQueueLength();
|
|
440
|
-
logger.info(`Rollup has ${activeAttestorCount} active attestors and ${queuedAttestorCount} queued attestors`);
|
|
441
|
-
const shouldAddValidators = activeAttestorCount === 0n && queuedAttestorCount === 0n;
|
|
442
|
-
if (args.initialValidators && shouldAddValidators && await gseContract.read.isRollupRegistered([
|
|
438
|
+
if (args.initialValidators && await gseContract.read.isRollupRegistered([
|
|
443
439
|
rollupContract.address
|
|
444
440
|
])) {
|
|
445
441
|
await addMultipleValidators(extendedClient, deployer, addresses.gseAddress.toString(), rollupAddress.toString(), addresses.stakingAssetAddress.toString(), args.initialValidators, args.acceleratedTestDeployments, logger);
|
|
@@ -602,10 +598,10 @@ export const handoverToGovernance = async (extendedClient, deployer, registryAdd
|
|
|
602
598
|
}
|
|
603
599
|
if (validators.length > 0) {
|
|
604
600
|
const gseContract = new GSEContract(extendedClient, gseAddress);
|
|
605
|
-
const multiAdder =
|
|
601
|
+
const multiAdder = await deployer.deploy(MultiAdderArtifact, [
|
|
606
602
|
rollupAddress,
|
|
607
603
|
deployer.client.account.address
|
|
608
|
-
])
|
|
604
|
+
]);
|
|
609
605
|
const makeValidatorTuples = async (validator)=>{
|
|
610
606
|
const registrationTuple = await gseContract.makeRegistrationTuple(validator.bn254SecretKey.getValue());
|
|
611
607
|
return {
|
|
@@ -691,11 +687,11 @@ export const handoverToGovernance = async (extendedClient, deployer, registryAdd
|
|
|
691
687
|
* @param logger - The logger.
|
|
692
688
|
*/ // eslint-disable-next-line camelcase
|
|
693
689
|
export const cheat_initializeFeeAssetHandler = async (extendedClient, deployer, feeAssetAddress, logger)=>{
|
|
694
|
-
const feeAssetHandlerAddress =
|
|
690
|
+
const feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
|
|
695
691
|
extendedClient.account.address,
|
|
696
692
|
feeAssetAddress.toString(),
|
|
697
693
|
BigInt(1e18)
|
|
698
|
-
])
|
|
694
|
+
]);
|
|
699
695
|
logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
|
|
700
696
|
const { txHash } = await deployer.sendTransaction({
|
|
701
697
|
to: feeAssetAddress.toString(),
|
|
@@ -1026,7 +1022,7 @@ export class L1Deployer {
|
|
|
1026
1022
|
args
|
|
1027
1023
|
});
|
|
1028
1024
|
try {
|
|
1029
|
-
const { txHash, address, deployedLibraries
|
|
1025
|
+
const { txHash, address, deployedLibraries } = await deployL1Contract(this.client, params.contractAbi, params.contractBytecode, args ?? [], {
|
|
1030
1026
|
salt: this.salt,
|
|
1031
1027
|
libraries: params.libraries,
|
|
1032
1028
|
logger: this.logger,
|
|
@@ -1057,10 +1053,7 @@ export class L1Deployer {
|
|
|
1057
1053
|
libraries: deployedLibraries ?? []
|
|
1058
1054
|
});
|
|
1059
1055
|
}
|
|
1060
|
-
return
|
|
1061
|
-
address,
|
|
1062
|
-
existed
|
|
1063
|
-
};
|
|
1056
|
+
return address;
|
|
1064
1057
|
} catch (error) {
|
|
1065
1058
|
throw new Error(`Failed to deploy ${params.name}`, {
|
|
1066
1059
|
cause: formatViemError(error)
|
|
@@ -1186,7 +1179,6 @@ export class L1Deployer {
|
|
|
1186
1179
|
logger?.verbose(`Skipping waiting for linked libraries to be deployed ${acceleratedTestDeployments ? '(accelerated test deployments)' : ''}`);
|
|
1187
1180
|
}
|
|
1188
1181
|
}
|
|
1189
|
-
let existed = false;
|
|
1190
1182
|
if (saltFromOpts) {
|
|
1191
1183
|
logger?.info(`Deploying contract with salt ${saltFromOpts}`);
|
|
1192
1184
|
const { address, paddedSalt: salt, calldata } = getExpectedAddress(abi, bytecode, args, saltFromOpts);
|
|
@@ -1229,7 +1221,6 @@ export class L1Deployer {
|
|
|
1229
1221
|
logger?.verbose(`Deployed contract with salt ${salt} to address ${resultingAddress} in tx ${txHash}.`);
|
|
1230
1222
|
} else {
|
|
1231
1223
|
logger?.verbose(`Skipping existing deployment of contract with salt ${salt} to address ${resultingAddress}`);
|
|
1232
|
-
existed = true;
|
|
1233
1224
|
}
|
|
1234
1225
|
} else {
|
|
1235
1226
|
const deployData = encodeDeployData({
|
|
@@ -1250,8 +1241,7 @@ export class L1Deployer {
|
|
|
1250
1241
|
return {
|
|
1251
1242
|
address: EthAddress.fromString(resultingAddress),
|
|
1252
1243
|
txHash,
|
|
1253
|
-
deployedLibraries
|
|
1254
|
-
existed
|
|
1244
|
+
deployedLibraries
|
|
1255
1245
|
};
|
|
1256
1246
|
}
|
|
1257
1247
|
export function getExpectedAddress(abi, bytecode, args, salt) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/ethereum",
|
|
3
|
-
"version": "2.0.3-rc.
|
|
3
|
+
"version": "2.0.3-rc.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"../package.common.json"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@aztec/blob-lib": "2.0.3-rc.
|
|
35
|
-
"@aztec/constants": "2.0.3-rc.
|
|
36
|
-
"@aztec/foundation": "2.0.3-rc.
|
|
37
|
-
"@aztec/l1-artifacts": "2.0.3-rc.
|
|
34
|
+
"@aztec/blob-lib": "2.0.3-rc.3",
|
|
35
|
+
"@aztec/constants": "2.0.3-rc.3",
|
|
36
|
+
"@aztec/foundation": "2.0.3-rc.3",
|
|
37
|
+
"@aztec/l1-artifacts": "2.0.3-rc.3",
|
|
38
38
|
"@viem/anvil": "^0.0.10",
|
|
39
39
|
"dotenv": "^16.0.3",
|
|
40
40
|
"lodash.chunk": "^4.2.0",
|
package/src/config.ts
CHANGED
|
@@ -258,11 +258,11 @@ const TestnetEntryQueueConfig = {
|
|
|
258
258
|
};
|
|
259
259
|
|
|
260
260
|
const StagingIgnitionEntryQueueConfig = {
|
|
261
|
-
bootstrapValidatorSetSize:
|
|
262
|
-
bootstrapFlushSize:
|
|
261
|
+
bootstrapValidatorSetSize: 1250n,
|
|
262
|
+
bootstrapFlushSize: 8n,
|
|
263
263
|
normalFlushSizeMin: 1n,
|
|
264
264
|
normalFlushSizeQuotient: 2048n,
|
|
265
|
-
maxQueueFlushSize:
|
|
265
|
+
maxQueueFlushSize: 8n,
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
export const getEntryQueueConfig = (networkName: NetworkNames) => {
|
|
@@ -6,7 +6,7 @@ import type { Fr } from '@aztec/foundation/fields';
|
|
|
6
6
|
import { jsonStringify } from '@aztec/foundation/json-rpc';
|
|
7
7
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
8
8
|
import { DateProvider } from '@aztec/foundation/timer';
|
|
9
|
-
import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
9
|
+
import type { RollupAbi } from '@aztec/l1-artifacts/RollupAbi';
|
|
10
10
|
|
|
11
11
|
import type { Abi, Narrow } from 'abitype';
|
|
12
12
|
import { mkdir, writeFile } from 'fs/promises';
|
|
@@ -187,39 +187,29 @@ export const deploySharedContracts = async (
|
|
|
187
187
|
|
|
188
188
|
const txHashes: Hex[] = [];
|
|
189
189
|
|
|
190
|
-
const
|
|
191
|
-
'FeeJuice',
|
|
192
|
-
'FEE',
|
|
193
|
-
l1Client.account.address,
|
|
194
|
-
]);
|
|
190
|
+
const feeAssetAddress = await deployer.deploy(FeeAssetArtifact, ['FeeJuice', 'FEE', l1Client.account.address]);
|
|
195
191
|
logger.verbose(`Deployed Fee Asset at ${feeAssetAddress}`);
|
|
196
192
|
|
|
197
|
-
const
|
|
198
|
-
'Staking',
|
|
199
|
-
'STK',
|
|
200
|
-
l1Client.account.address,
|
|
201
|
-
]);
|
|
193
|
+
const stakingAssetAddress = await deployer.deploy(StakingAssetArtifact, ['Staking', 'STK', l1Client.account.address]);
|
|
202
194
|
logger.verbose(`Deployed Staking Asset at ${stakingAssetAddress}`);
|
|
203
195
|
|
|
204
196
|
const gseConfiguration = getGSEConfiguration(networkName);
|
|
205
197
|
|
|
206
|
-
const gseAddress = (
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
])
|
|
213
|
-
).address;
|
|
198
|
+
const gseAddress = await deployer.deploy(GSEArtifact, [
|
|
199
|
+
l1Client.account.address,
|
|
200
|
+
stakingAssetAddress.toString(),
|
|
201
|
+
gseConfiguration.activationThreshold,
|
|
202
|
+
gseConfiguration.ejectionThreshold,
|
|
203
|
+
]);
|
|
214
204
|
logger.verbose(`Deployed GSE at ${gseAddress}`);
|
|
215
205
|
|
|
216
|
-
const
|
|
206
|
+
const registryAddress = await deployer.deploy(RegistryArtifact, [
|
|
217
207
|
l1Client.account.address,
|
|
218
208
|
feeAssetAddress.toString(),
|
|
219
209
|
]);
|
|
220
210
|
logger.verbose(`Deployed Registry at ${registryAddress}`);
|
|
221
211
|
|
|
222
|
-
const
|
|
212
|
+
const governanceProposerAddress = await deployer.deploy(GovernanceProposerArtifact, [
|
|
223
213
|
registryAddress.toString(),
|
|
224
214
|
gseAddress.toString(),
|
|
225
215
|
BigInt(args.governanceProposerQuorum ?? args.governanceProposerRoundSize / 2 + 1),
|
|
@@ -229,7 +219,7 @@ export const deploySharedContracts = async (
|
|
|
229
219
|
|
|
230
220
|
// @note @LHerskind the assets are expected to be the same at some point, but for better
|
|
231
221
|
// configurability they are different for now.
|
|
232
|
-
const
|
|
222
|
+
const governanceAddress = await deployer.deploy(GovernanceArtifact, [
|
|
233
223
|
stakingAssetAddress.toString(),
|
|
234
224
|
governanceProposerAddress.toString(),
|
|
235
225
|
gseAddress.toString(),
|
|
@@ -271,13 +261,11 @@ export const deploySharedContracts = async (
|
|
|
271
261
|
txHashes.push(txHash);
|
|
272
262
|
}
|
|
273
263
|
|
|
274
|
-
const coinIssuerAddress = (
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
])
|
|
280
|
-
).address;
|
|
264
|
+
const coinIssuerAddress = await deployer.deploy(CoinIssuerArtifact, [
|
|
265
|
+
feeAssetAddress.toString(),
|
|
266
|
+
1_000_000n * 10n ** 18n, // @todo #8084
|
|
267
|
+
l1Client.account.address,
|
|
268
|
+
]);
|
|
281
269
|
logger.verbose(`Deployed CoinIssuer at ${coinIssuerAddress}`);
|
|
282
270
|
|
|
283
271
|
logger.verbose(`Waiting for deployments to complete`);
|
|
@@ -295,13 +283,11 @@ export const deploySharedContracts = async (
|
|
|
295
283
|
/* CHEAT CODES START HERE */
|
|
296
284
|
/* -------------------------------------------------------------------------- */
|
|
297
285
|
|
|
298
|
-
feeAssetHandlerAddress = (
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
])
|
|
304
|
-
).address;
|
|
286
|
+
feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
|
|
287
|
+
l1Client.account.address,
|
|
288
|
+
feeAssetAddress.toString(),
|
|
289
|
+
BigInt(1000n * 10n ** 18n),
|
|
290
|
+
]);
|
|
305
291
|
logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
|
|
306
292
|
|
|
307
293
|
// Only if we are "fresh" will we be adding as a minter, otherwise above will simply get same address
|
|
@@ -343,8 +329,7 @@ export const deploySharedContracts = async (
|
|
|
343
329
|
skipMerkleCheck: true, // skip merkle check - needed for testing without generating proofs
|
|
344
330
|
} as const;
|
|
345
331
|
|
|
346
|
-
stakingAssetHandlerAddress =
|
|
347
|
-
.address;
|
|
332
|
+
stakingAssetHandlerAddress = await deployer.deploy(StakingAssetHandlerArtifact, [stakingAssetHandlerDeployArgs]);
|
|
348
333
|
logger.verbose(`Deployed StakingAssetHandler at ${stakingAssetHandlerAddress}`);
|
|
349
334
|
|
|
350
335
|
const { txHash: stakingMinterTxHash } = await deployer.sendTransaction({
|
|
@@ -415,7 +400,7 @@ export const deploySharedContracts = async (
|
|
|
415
400
|
|
|
416
401
|
const getZkPassportVerifierAddress = async (deployer: L1Deployer, args: DeployL1ContractsArgs): Promise<EthAddress> => {
|
|
417
402
|
if (args.zkPassportArgs?.mockZkPassportVerifier) {
|
|
418
|
-
return
|
|
403
|
+
return await deployer.deploy(mockVerifiers.mockZkPassportVerifier);
|
|
419
404
|
}
|
|
420
405
|
return ZK_PASSPORT_VERIFIER_ADDRESS;
|
|
421
406
|
};
|
|
@@ -468,7 +453,7 @@ export const deployRollupForUpgrade = async (
|
|
|
468
453
|
};
|
|
469
454
|
|
|
470
455
|
export const deploySlashFactory = async (deployer: L1Deployer, rollupAddress: Hex, logger: Logger) => {
|
|
471
|
-
const slashFactoryAddress =
|
|
456
|
+
const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [rollupAddress]);
|
|
472
457
|
logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
|
|
473
458
|
return slashFactoryAddress;
|
|
474
459
|
};
|
|
@@ -477,12 +462,10 @@ export const deployUpgradePayload = async (
|
|
|
477
462
|
deployer: L1Deployer,
|
|
478
463
|
addresses: Pick<L1ContractAddresses, 'registryAddress' | 'rollupAddress'>,
|
|
479
464
|
) => {
|
|
480
|
-
const payloadAddress = (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
])
|
|
485
|
-
).address;
|
|
465
|
+
const payloadAddress = await deployer.deploy(RegisterNewRollupVersionPayloadArtifact, [
|
|
466
|
+
addresses.registryAddress.toString(),
|
|
467
|
+
addresses.rollupAddress.toString(),
|
|
468
|
+
]);
|
|
486
469
|
|
|
487
470
|
return payloadAddress;
|
|
488
471
|
};
|
|
@@ -534,10 +517,10 @@ export const deployRollup = async (
|
|
|
534
517
|
let epochProofVerifier = EthAddress.ZERO;
|
|
535
518
|
|
|
536
519
|
if (args.realVerifier) {
|
|
537
|
-
epochProofVerifier =
|
|
520
|
+
epochProofVerifier = await deployer.deploy(l1ArtifactsVerifiers.honkVerifier);
|
|
538
521
|
logger.verbose(`Rollup will use the real verifier at ${epochProofVerifier}`);
|
|
539
522
|
} else {
|
|
540
|
-
epochProofVerifier =
|
|
523
|
+
epochProofVerifier = await deployer.deploy(mockVerifiers.mockVerifier);
|
|
541
524
|
logger.verbose(`Rollup will use the mock verifier at ${epochProofVerifier}`);
|
|
542
525
|
}
|
|
543
526
|
|
|
@@ -596,10 +579,8 @@ export const deployRollup = async (
|
|
|
596
579
|
rollupConfigArgs,
|
|
597
580
|
] as const;
|
|
598
581
|
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
});
|
|
602
|
-
logger.verbose(`Deployed Rollup at ${rollupAddress}, already existed: ${rollupExisted}`, rollupConfigArgs);
|
|
582
|
+
const rollupAddress = await deployer.deploy(RollupArtifact, rollupArgs, { gasLimit: 15_000_000n });
|
|
583
|
+
logger.verbose(`Deployed Rollup at ${rollupAddress}`, rollupConfigArgs);
|
|
603
584
|
|
|
604
585
|
const rollupContract = new RollupContract(extendedClient, rollupAddress);
|
|
605
586
|
|
|
@@ -624,7 +605,7 @@ export const deployRollup = async (
|
|
|
624
605
|
txHashes.push(mintTxHash);
|
|
625
606
|
}
|
|
626
607
|
|
|
627
|
-
const slashFactoryAddress =
|
|
608
|
+
const slashFactoryAddress = await deployer.deploy(SlashFactoryArtifact, [rollupAddress.toString()]);
|
|
628
609
|
logger.verbose(`Deployed SlashFactory at ${slashFactoryAddress}`);
|
|
629
610
|
|
|
630
611
|
// We need to call a function on the registry to set the various contract addresses.
|
|
@@ -686,17 +667,7 @@ export const deployRollup = async (
|
|
|
686
667
|
logger.verbose(`Not the owner of the gse, skipping rollup addition`);
|
|
687
668
|
}
|
|
688
669
|
|
|
689
|
-
|
|
690
|
-
const queuedAttestorCount = await rollupContract.getEntryQueueLength();
|
|
691
|
-
logger.info(`Rollup has ${activeAttestorCount} active attestors and ${queuedAttestorCount} queued attestors`);
|
|
692
|
-
|
|
693
|
-
const shouldAddValidators = activeAttestorCount === 0n && queuedAttestorCount === 0n;
|
|
694
|
-
|
|
695
|
-
if (
|
|
696
|
-
args.initialValidators &&
|
|
697
|
-
shouldAddValidators &&
|
|
698
|
-
(await gseContract.read.isRollupRegistered([rollupContract.address]))
|
|
699
|
-
) {
|
|
670
|
+
if (args.initialValidators && (await gseContract.read.isRollupRegistered([rollupContract.address]))) {
|
|
700
671
|
await addMultipleValidators(
|
|
701
672
|
extendedClient,
|
|
702
673
|
deployer,
|
|
@@ -908,8 +879,7 @@ export const addMultipleValidators = async (
|
|
|
908
879
|
|
|
909
880
|
if (validators.length > 0) {
|
|
910
881
|
const gseContract = new GSEContract(extendedClient, gseAddress);
|
|
911
|
-
const multiAdder =
|
|
912
|
-
.address;
|
|
882
|
+
const multiAdder = await deployer.deploy(MultiAdderArtifact, [rollupAddress, deployer.client.account.address]);
|
|
913
883
|
|
|
914
884
|
const makeValidatorTuples = async (validator: Operator) => {
|
|
915
885
|
const registrationTuple = await gseContract.makeRegistrationTuple(validator.bn254SecretKey.getValue());
|
|
@@ -1023,13 +993,11 @@ export const cheat_initializeFeeAssetHandler = async (
|
|
|
1023
993
|
feeAssetHandlerAddress: EthAddress;
|
|
1024
994
|
txHash: Hex;
|
|
1025
995
|
}> => {
|
|
1026
|
-
const feeAssetHandlerAddress = (
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
])
|
|
1032
|
-
).address;
|
|
996
|
+
const feeAssetHandlerAddress = await deployer.deploy(FeeAssetHandlerArtifact, [
|
|
997
|
+
extendedClient.account.address,
|
|
998
|
+
feeAssetAddress.toString(),
|
|
999
|
+
BigInt(1e18),
|
|
1000
|
+
]);
|
|
1033
1001
|
logger.verbose(`Deployed FeeAssetHandler at ${feeAssetHandlerAddress}`);
|
|
1034
1002
|
|
|
1035
1003
|
const { txHash } = await deployer.sendTransaction({
|
|
@@ -1360,10 +1328,10 @@ export class L1Deployer {
|
|
|
1360
1328
|
params: ContractArtifacts<TAbi>,
|
|
1361
1329
|
args?: ContractConstructorArgs<TAbi>,
|
|
1362
1330
|
opts: { gasLimit?: bigint } = {},
|
|
1363
|
-
): Promise<
|
|
1331
|
+
): Promise<EthAddress> {
|
|
1364
1332
|
this.logger.debug(`Deploying ${params.name} contract`, { args });
|
|
1365
1333
|
try {
|
|
1366
|
-
const { txHash, address, deployedLibraries
|
|
1334
|
+
const { txHash, address, deployedLibraries } = await deployL1Contract(
|
|
1367
1335
|
this.client,
|
|
1368
1336
|
params.contractAbi,
|
|
1369
1337
|
params.contractBytecode,
|
|
@@ -1401,10 +1369,7 @@ export class L1Deployer {
|
|
|
1401
1369
|
libraries: deployedLibraries ?? [],
|
|
1402
1370
|
});
|
|
1403
1371
|
}
|
|
1404
|
-
return
|
|
1405
|
-
address,
|
|
1406
|
-
existed,
|
|
1407
|
-
};
|
|
1372
|
+
return address;
|
|
1408
1373
|
} catch (error) {
|
|
1409
1374
|
throw new Error(`Failed to deploy ${params.name}`, { cause: formatViemError(error) });
|
|
1410
1375
|
}
|
|
@@ -1462,12 +1427,7 @@ export async function deployL1Contract(
|
|
|
1462
1427
|
gasLimit?: bigint;
|
|
1463
1428
|
acceleratedTestDeployments?: boolean;
|
|
1464
1429
|
} = {},
|
|
1465
|
-
): Promise<{
|
|
1466
|
-
address: EthAddress;
|
|
1467
|
-
txHash: Hex | undefined;
|
|
1468
|
-
deployedLibraries?: VerificationLibraryEntry[];
|
|
1469
|
-
existed: boolean;
|
|
1470
|
-
}> {
|
|
1430
|
+
): Promise<{ address: EthAddress; txHash: Hex | undefined; deployedLibraries?: VerificationLibraryEntry[] }> {
|
|
1471
1431
|
let txHash: Hex | undefined = undefined;
|
|
1472
1432
|
let resultingAddress: Hex | null | undefined = undefined;
|
|
1473
1433
|
const deployedLibraries: VerificationLibraryEntry[] = [];
|
|
@@ -1569,8 +1529,6 @@ export async function deployL1Contract(
|
|
|
1569
1529
|
}
|
|
1570
1530
|
}
|
|
1571
1531
|
|
|
1572
|
-
let existed = false;
|
|
1573
|
-
|
|
1574
1532
|
if (saltFromOpts) {
|
|
1575
1533
|
logger?.info(`Deploying contract with salt ${saltFromOpts}`);
|
|
1576
1534
|
const { address, paddedSalt: salt, calldata } = getExpectedAddress(abi, bytecode, args, saltFromOpts);
|
|
@@ -1592,7 +1550,6 @@ export async function deployL1Contract(
|
|
|
1592
1550
|
logger?.verbose(`Deployed contract with salt ${salt} to address ${resultingAddress} in tx ${txHash}.`);
|
|
1593
1551
|
} else {
|
|
1594
1552
|
logger?.verbose(`Skipping existing deployment of contract with salt ${salt} to address ${resultingAddress}`);
|
|
1595
|
-
existed = true;
|
|
1596
1553
|
}
|
|
1597
1554
|
} else {
|
|
1598
1555
|
const deployData = encodeDeployData({ abi, bytecode, args });
|
|
@@ -1612,7 +1569,7 @@ export async function deployL1Contract(
|
|
|
1612
1569
|
}
|
|
1613
1570
|
}
|
|
1614
1571
|
|
|
1615
|
-
return { address: EthAddress.fromString(resultingAddress!), txHash, deployedLibraries
|
|
1572
|
+
return { address: EthAddress.fromString(resultingAddress!), txHash, deployedLibraries };
|
|
1616
1573
|
}
|
|
1617
1574
|
|
|
1618
1575
|
export function getExpectedAddress(
|