@aztec/ethereum 3.0.0-nightly.20251023 → 3.0.0-nightly.20251025
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.d.ts.map +1 -1
- package/dest/config.js +5 -0
- package/dest/deploy_l1_contracts.d.ts +2 -1
- package/dest/deploy_l1_contracts.d.ts.map +1 -1
- package/dest/deploy_l1_contracts.js +236 -200
- package/dest/l1_artifacts.d.ts +487 -47
- package/dest/l1_artifacts.d.ts.map +1 -1
- package/dest/l1_artifacts.js +5 -5
- package/package.json +5 -5
- package/src/config.ts +5 -0
- package/src/deploy_l1_contracts.ts +214 -144
- package/src/l1_artifacts.ts +6 -6
package/dest/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAOlB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,KAAK,eAAe,EAA2B,MAAM,wBAAwB,CAAC;AAEvF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,yFAAyF;IACzF,YAAY,EAAE,OAAO,CAAC;IACtB,yFAAyF;IACzF,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yCAAyC;IACzC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uFAAuF;IACvF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,wCAAwC;IACxC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,wBAAwB,EAAE,MAAM,CAAC;IACjC,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,0BAA0B,EAAE,MAAM,CAAC;IACnC,yCAAyC;IACzC,mBAAmB,EAAE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AC;IACzB,gEAAgE;IAChE,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,sCAAsC;IACtC,2BAA2B,EAAE,MAAM,CAAC;IACpC,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gDAAgD;IAChD,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GAAG,eAAe,CAAC;AAEpB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AA4D9B,eAAO,MAAM,0BAA0B,GAAI,aAAa,YAAY;;;;;;;;;;;;CAiBnE,CAAC;AAaF,eAAO,MAAM,eAAe,GAAI,aAAa,YAAY;;;;;CAYxD,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;CAUhC,CAAC;AAmCF,eAAO,MAAM,mBAAmB,GAAI,aAAa,YAAY;;;;;;CAiB5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,kBAAkB,CAAC,iBAAiB,CAkI3E,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,kBAAkB,CAAC,kBAAkB,CAW7E,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,iBAAiB,CAE/D;AAED,wBAAgB,4BAA4B,IAAI,kBAAkB,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,MAAM,eAAe,CAAC,GAAG,IAAI,CAmH3F"}
|
package/dest/config.js
CHANGED
|
@@ -84,6 +84,8 @@ export const getGovernanceConfiguration = (networkName)=>{
|
|
|
84
84
|
return LocalGovernanceConfiguration;
|
|
85
85
|
case 'next-net':
|
|
86
86
|
return LocalGovernanceConfiguration;
|
|
87
|
+
case 'devnet':
|
|
88
|
+
return LocalGovernanceConfiguration;
|
|
87
89
|
case 'staging-public':
|
|
88
90
|
return StagingPublicGovernanceConfiguration;
|
|
89
91
|
case 'testnet':
|
|
@@ -106,6 +108,7 @@ const DefaultRewardConfig = {
|
|
|
106
108
|
export const getRewardConfig = (networkName)=>{
|
|
107
109
|
switch(networkName){
|
|
108
110
|
case 'local':
|
|
111
|
+
case 'devnet':
|
|
109
112
|
case 'next-net':
|
|
110
113
|
case 'staging-public':
|
|
111
114
|
case 'testnet':
|
|
@@ -161,6 +164,8 @@ export const getEntryQueueConfig = (networkName)=>{
|
|
|
161
164
|
return LocalEntryQueueConfig;
|
|
162
165
|
case 'next-net':
|
|
163
166
|
return LocalEntryQueueConfig;
|
|
167
|
+
case 'devnet':
|
|
168
|
+
return LocalEntryQueueConfig;
|
|
164
169
|
case 'staging-public':
|
|
165
170
|
return StagingPublicEntryQueueConfig;
|
|
166
171
|
case 'testnet':
|
|
@@ -129,8 +129,9 @@ export declare const deploySharedContracts: (l1Client: ExtendedViemWalletClient,
|
|
|
129
129
|
* @param registryAddress - The address of the registry.
|
|
130
130
|
* @param logger - The logger.
|
|
131
131
|
* @param txUtilsConfig - The L1 tx utils config.
|
|
132
|
+
* @param createVerificationJson - Optional path to write verification data for forge verify.
|
|
132
133
|
*/
|
|
133
|
-
export declare const deployRollupForUpgrade: (extendedClient: ExtendedViemWalletClient, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, registryAddress: EthAddress, logger: Logger, txUtilsConfig: L1TxUtilsConfig) => Promise<{
|
|
134
|
+
export declare const deployRollupForUpgrade: (extendedClient: ExtendedViemWalletClient, args: Omit<DeployL1ContractsArgs, "governanceProposerQuorum" | "governanceProposerRoundSize" | "ejectionThreshold" | "activationThreshold">, registryAddress: EthAddress, logger: Logger, txUtilsConfig: L1TxUtilsConfig, createVerificationJson?: string | false) => Promise<{
|
|
134
135
|
rollup: RollupContract;
|
|
135
136
|
slashFactoryAddress: EthAddress;
|
|
136
137
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_l1_contracts.d.ts","sourceRoot":"","sources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,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACjC,GACL,OAAO,CAAC;IACT,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,GAAG,GAAG,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAC/C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC,CAyJD;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"}
|
|
@@ -333,6 +333,224 @@ const getZkPassportVerifierAddress = async (deployer, args)=>{
|
|
|
333
333
|
scope
|
|
334
334
|
];
|
|
335
335
|
};
|
|
336
|
+
/**
|
|
337
|
+
* Generates verification records for a deployed rollup and its associated contracts (Inbox, Outbox, Slasher, etc).
|
|
338
|
+
* @param rollup - The deployed rollup contract.
|
|
339
|
+
* @param deployer - The L1 deployer instance.
|
|
340
|
+
* @param args - The deployment arguments used for the rollup.
|
|
341
|
+
* @param addresses - The L1 contract addresses.
|
|
342
|
+
* @param extendedClient - The extended viem wallet client.
|
|
343
|
+
* @param logger - The logger.
|
|
344
|
+
*/ async function generateRollupVerificationRecords(rollup, deployer, args, addresses, extendedClient, logger) {
|
|
345
|
+
try {
|
|
346
|
+
// Add Inbox / Outbox verification records (constructor args are created inside RollupCore)
|
|
347
|
+
const rollupAddr = rollup.address;
|
|
348
|
+
const rollupAddresses = await rollup.getRollupAddresses();
|
|
349
|
+
const inboxAddr = rollupAddresses.inboxAddress.toString();
|
|
350
|
+
const outboxAddr = rollupAddresses.outboxAddress.toString();
|
|
351
|
+
const feeAsset = rollupAddresses.feeJuiceAddress.toString();
|
|
352
|
+
const version = await rollup.getVersion();
|
|
353
|
+
const inboxCtor = encodeAbiParameters([
|
|
354
|
+
{
|
|
355
|
+
type: 'address'
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
type: 'address'
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
type: 'uint256'
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
type: 'uint256'
|
|
365
|
+
}
|
|
366
|
+
], [
|
|
367
|
+
rollupAddr,
|
|
368
|
+
feeAsset,
|
|
369
|
+
version,
|
|
370
|
+
BigInt(L1_TO_L2_MSG_SUBTREE_HEIGHT)
|
|
371
|
+
]);
|
|
372
|
+
const outboxCtor = encodeAbiParameters([
|
|
373
|
+
{
|
|
374
|
+
type: 'address'
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
type: 'uint256'
|
|
378
|
+
}
|
|
379
|
+
], [
|
|
380
|
+
rollupAddr,
|
|
381
|
+
version
|
|
382
|
+
]);
|
|
383
|
+
deployer.verificationRecords.push({
|
|
384
|
+
name: 'Inbox',
|
|
385
|
+
address: inboxAddr,
|
|
386
|
+
constructorArgsHex: inboxCtor,
|
|
387
|
+
libraries: []
|
|
388
|
+
}, {
|
|
389
|
+
name: 'Outbox',
|
|
390
|
+
address: outboxAddr,
|
|
391
|
+
constructorArgsHex: outboxCtor,
|
|
392
|
+
libraries: []
|
|
393
|
+
});
|
|
394
|
+
// Include Slasher and SlashingProposer (if deployed) in verification data
|
|
395
|
+
try {
|
|
396
|
+
const slasherAddrHex = await rollup.getSlasherAddress();
|
|
397
|
+
const slasherAddr = EthAddress.fromString(slasherAddrHex);
|
|
398
|
+
if (!slasherAddr.isZero()) {
|
|
399
|
+
// Slasher constructor: (address _vetoer, address _governance)
|
|
400
|
+
const slasherCtor = encodeAbiParameters([
|
|
401
|
+
{
|
|
402
|
+
type: 'address'
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
type: 'address'
|
|
406
|
+
}
|
|
407
|
+
], [
|
|
408
|
+
args.slashingVetoer.toString(),
|
|
409
|
+
extendedClient.account.address
|
|
410
|
+
]);
|
|
411
|
+
deployer.verificationRecords.push({
|
|
412
|
+
name: 'Slasher',
|
|
413
|
+
address: slasherAddr.toString(),
|
|
414
|
+
constructorArgsHex: slasherCtor,
|
|
415
|
+
libraries: []
|
|
416
|
+
});
|
|
417
|
+
// Proposer address is stored in Slasher.PROPOSER()
|
|
418
|
+
const proposerAddr = (await rollup.getSlashingProposerAddress()).toString();
|
|
419
|
+
// Compute constructor args matching deployment path in RollupCore
|
|
420
|
+
const computedRoundSize = BigInt(args.slashingRoundSizeInEpochs * args.aztecEpochDuration);
|
|
421
|
+
const computedQuorum = BigInt(args.slashingQuorum ?? args.slashingRoundSizeInEpochs * args.aztecEpochDuration / 2 + 1);
|
|
422
|
+
const lifetimeInRounds = BigInt(args.slashingLifetimeInRounds);
|
|
423
|
+
const executionDelayInRounds = BigInt(args.slashingExecutionDelayInRounds);
|
|
424
|
+
if (args.slasherFlavor === 'tally') {
|
|
425
|
+
const slashAmounts = [
|
|
426
|
+
args.slashAmountSmall,
|
|
427
|
+
args.slashAmountMedium,
|
|
428
|
+
args.slashAmountLarge
|
|
429
|
+
];
|
|
430
|
+
const committeeSize = BigInt(args.aztecTargetCommitteeSize);
|
|
431
|
+
const epochDuration = BigInt(args.aztecEpochDuration);
|
|
432
|
+
const slashOffsetInRounds = BigInt(args.slashingOffsetInRounds);
|
|
433
|
+
const proposerCtor = encodeAbiParameters([
|
|
434
|
+
{
|
|
435
|
+
type: 'address'
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
type: 'address'
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
type: 'uint256'
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
type: 'uint256'
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
type: 'uint256'
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
type: 'uint256'
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
type: 'uint256[3]'
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
type: 'uint256'
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
type: 'uint256'
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
type: 'uint256'
|
|
463
|
+
}
|
|
464
|
+
], [
|
|
465
|
+
rollup.address,
|
|
466
|
+
slasherAddr.toString(),
|
|
467
|
+
computedQuorum,
|
|
468
|
+
computedRoundSize,
|
|
469
|
+
lifetimeInRounds,
|
|
470
|
+
executionDelayInRounds,
|
|
471
|
+
slashAmounts,
|
|
472
|
+
committeeSize,
|
|
473
|
+
epochDuration,
|
|
474
|
+
slashOffsetInRounds
|
|
475
|
+
]);
|
|
476
|
+
deployer.verificationRecords.push({
|
|
477
|
+
name: 'TallySlashingProposer',
|
|
478
|
+
address: proposerAddr,
|
|
479
|
+
constructorArgsHex: proposerCtor,
|
|
480
|
+
libraries: []
|
|
481
|
+
});
|
|
482
|
+
} else if (args.slasherFlavor === 'empire') {
|
|
483
|
+
const proposerCtor = encodeAbiParameters([
|
|
484
|
+
{
|
|
485
|
+
type: 'address'
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
type: 'address'
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
type: 'uint256'
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
type: 'uint256'
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
type: 'uint256'
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
type: 'uint256'
|
|
501
|
+
}
|
|
502
|
+
], [
|
|
503
|
+
rollup.address,
|
|
504
|
+
slasherAddr.toString(),
|
|
505
|
+
computedQuorum,
|
|
506
|
+
computedRoundSize,
|
|
507
|
+
lifetimeInRounds,
|
|
508
|
+
executionDelayInRounds
|
|
509
|
+
]);
|
|
510
|
+
deployer.verificationRecords.push({
|
|
511
|
+
name: 'EmpireSlashingProposer',
|
|
512
|
+
address: proposerAddr,
|
|
513
|
+
constructorArgsHex: proposerCtor,
|
|
514
|
+
libraries: []
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
} catch (e) {
|
|
519
|
+
logger.warn(`Failed to add Slasher/Proposer verification records: ${String(e)}`);
|
|
520
|
+
}
|
|
521
|
+
} catch (e) {
|
|
522
|
+
throw new Error(`Failed to generate rollup verification records: ${String(e)}`);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Writes verification records to a JSON file for later forge verify.
|
|
527
|
+
* @param deployer - The L1 deployer containing verification records.
|
|
528
|
+
* @param outputDirectory - The directory to write the verification file to.
|
|
529
|
+
* @param chainId - The chain ID.
|
|
530
|
+
* @param filenameSuffix - Optional suffix for the filename (e.g., 'upgrade').
|
|
531
|
+
* @param logger - The logger.
|
|
532
|
+
*/ async function writeVerificationJson(deployer, outputDirectory, chainId, filenameSuffix = '', logger) {
|
|
533
|
+
try {
|
|
534
|
+
const date = new Date();
|
|
535
|
+
const formattedDate = date.toISOString().slice(2, 19).replace(/[-T:]/g, '');
|
|
536
|
+
// Ensure the verification output directory exists
|
|
537
|
+
await mkdir(outputDirectory, {
|
|
538
|
+
recursive: true
|
|
539
|
+
});
|
|
540
|
+
const suffix = filenameSuffix ? `-${filenameSuffix}` : '';
|
|
541
|
+
const verificationOutputPath = `${outputDirectory}/l1-verify${suffix}-${chainId}-${formattedDate.slice(0, 6)}-${formattedDate.slice(6)}.json`;
|
|
542
|
+
const networkName = getActiveNetworkName();
|
|
543
|
+
const verificationData = {
|
|
544
|
+
chainId: chainId,
|
|
545
|
+
network: networkName,
|
|
546
|
+
records: deployer.verificationRecords
|
|
547
|
+
};
|
|
548
|
+
await writeFile(verificationOutputPath, JSON.stringify(verificationData, null, 2));
|
|
549
|
+
logger.info(`Wrote L1 verification data to ${verificationOutputPath}`);
|
|
550
|
+
} catch (e) {
|
|
551
|
+
logger.warn(`Failed to write L1 verification data file: ${String(e)}`);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
336
554
|
/**
|
|
337
555
|
* Deploys a new rollup, using the existing canonical version to derive certain values (addresses of assets etc).
|
|
338
556
|
* @param clients - The L1 clients.
|
|
@@ -340,11 +558,17 @@ const getZkPassportVerifierAddress = async (deployer, args)=>{
|
|
|
340
558
|
* @param registryAddress - The address of the registry.
|
|
341
559
|
* @param logger - The logger.
|
|
342
560
|
* @param txUtilsConfig - The L1 tx utils config.
|
|
343
|
-
|
|
344
|
-
|
|
561
|
+
* @param createVerificationJson - Optional path to write verification data for forge verify.
|
|
562
|
+
*/ export const deployRollupForUpgrade = async (extendedClient, args, registryAddress, logger, txUtilsConfig, createVerificationJson = false)=>{
|
|
563
|
+
const deployer = new L1Deployer(extendedClient, args.salt, undefined, args.acceleratedTestDeployments, logger, txUtilsConfig, !!createVerificationJson);
|
|
345
564
|
const addresses = await RegistryContract.collectAddresses(extendedClient, registryAddress, 'canonical');
|
|
346
565
|
const { rollup, slashFactoryAddress } = await deployRollup(extendedClient, deployer, args, addresses, logger);
|
|
347
566
|
await deployer.waitForDeployments();
|
|
567
|
+
// Write verification data (constructor args + linked libraries) to file for later forge verify
|
|
568
|
+
if (createVerificationJson) {
|
|
569
|
+
await generateRollupVerificationRecords(rollup, deployer, args, addresses, extendedClient, logger);
|
|
570
|
+
await writeVerificationJson(deployer, createVerificationJson, extendedClient.chain.id, 'upgrade', logger);
|
|
571
|
+
}
|
|
348
572
|
return {
|
|
349
573
|
rollup,
|
|
350
574
|
slashFactoryAddress
|
|
@@ -426,7 +650,8 @@ function slasherFlavorToSolidityEnum(flavor) {
|
|
|
426
650
|
args.slashAmountLarge
|
|
427
651
|
],
|
|
428
652
|
localEjectionThreshold: args.localEjectionThreshold,
|
|
429
|
-
slashingDisableDuration: BigInt(args.slashingDisableDuration ?? 0n)
|
|
653
|
+
slashingDisableDuration: BigInt(args.slashingDisableDuration ?? 0n),
|
|
654
|
+
earliestRewardsClaimableTimestamp: 0n
|
|
430
655
|
};
|
|
431
656
|
const genesisStateArgs = {
|
|
432
657
|
vkTreeRoot: args.vkTreeRoot.toString(),
|
|
@@ -899,199 +1124,8 @@ export const cheat_initializeFeeAssetHandler = async (extendedClient, deployer,
|
|
|
899
1124
|
logger.info(`Aztec L1 contracts initialized`, l1Contracts);
|
|
900
1125
|
// Write verification data (constructor args + linked libraries) to file for later forge verify
|
|
901
1126
|
if (createVerificationJson) {
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
const rollupAddr = l1Contracts.rollupAddress.toString();
|
|
905
|
-
const inboxAddr = l1Contracts.inboxAddress.toString();
|
|
906
|
-
const outboxAddr = l1Contracts.outboxAddress.toString();
|
|
907
|
-
const feeAsset = l1Contracts.feeJuiceAddress.toString();
|
|
908
|
-
const version = await rollup.getVersion();
|
|
909
|
-
const inboxCtor = encodeAbiParameters([
|
|
910
|
-
{
|
|
911
|
-
type: 'address'
|
|
912
|
-
},
|
|
913
|
-
{
|
|
914
|
-
type: 'address'
|
|
915
|
-
},
|
|
916
|
-
{
|
|
917
|
-
type: 'uint256'
|
|
918
|
-
},
|
|
919
|
-
{
|
|
920
|
-
type: 'uint256'
|
|
921
|
-
}
|
|
922
|
-
], [
|
|
923
|
-
rollupAddr,
|
|
924
|
-
feeAsset,
|
|
925
|
-
version,
|
|
926
|
-
BigInt(L1_TO_L2_MSG_SUBTREE_HEIGHT)
|
|
927
|
-
]);
|
|
928
|
-
const outboxCtor = encodeAbiParameters([
|
|
929
|
-
{
|
|
930
|
-
type: 'address'
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
type: 'uint256'
|
|
934
|
-
}
|
|
935
|
-
], [
|
|
936
|
-
rollupAddr,
|
|
937
|
-
version
|
|
938
|
-
]);
|
|
939
|
-
deployer.verificationRecords.push({
|
|
940
|
-
name: 'Inbox',
|
|
941
|
-
address: inboxAddr,
|
|
942
|
-
constructorArgsHex: inboxCtor,
|
|
943
|
-
libraries: []
|
|
944
|
-
}, {
|
|
945
|
-
name: 'Outbox',
|
|
946
|
-
address: outboxAddr,
|
|
947
|
-
constructorArgsHex: outboxCtor,
|
|
948
|
-
libraries: []
|
|
949
|
-
});
|
|
950
|
-
// Include Slasher and SlashingProposer (if deployed) in verification data
|
|
951
|
-
try {
|
|
952
|
-
const slasherAddrHex = await rollup.getSlasherAddress();
|
|
953
|
-
const slasherAddr = EthAddress.fromString(slasherAddrHex);
|
|
954
|
-
if (!slasherAddr.isZero()) {
|
|
955
|
-
// Slasher constructor: (address _vetoer, address _governance)
|
|
956
|
-
const slasherCtor = encodeAbiParameters([
|
|
957
|
-
{
|
|
958
|
-
type: 'address'
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
type: 'address'
|
|
962
|
-
}
|
|
963
|
-
], [
|
|
964
|
-
args.slashingVetoer.toString(),
|
|
965
|
-
l1Client.account.address
|
|
966
|
-
]);
|
|
967
|
-
deployer.verificationRecords.push({
|
|
968
|
-
name: 'Slasher',
|
|
969
|
-
address: slasherAddr.toString(),
|
|
970
|
-
constructorArgsHex: slasherCtor,
|
|
971
|
-
libraries: []
|
|
972
|
-
});
|
|
973
|
-
// Proposer address is stored in Slasher.PROPOSER()
|
|
974
|
-
const proposerAddr = (await rollup.getSlashingProposerAddress()).toString();
|
|
975
|
-
// Compute constructor args matching deployment path in RollupCore
|
|
976
|
-
const computedRoundSize = BigInt(args.slashingRoundSizeInEpochs * args.aztecEpochDuration);
|
|
977
|
-
const computedQuorum = BigInt(args.slashingQuorum ?? args.slashingRoundSizeInEpochs * args.aztecEpochDuration / 2 + 1);
|
|
978
|
-
const lifetimeInRounds = BigInt(args.slashingLifetimeInRounds);
|
|
979
|
-
const executionDelayInRounds = BigInt(args.slashingExecutionDelayInRounds);
|
|
980
|
-
if (args.slasherFlavor === 'tally') {
|
|
981
|
-
const slashAmounts = [
|
|
982
|
-
args.slashAmountSmall,
|
|
983
|
-
args.slashAmountMedium,
|
|
984
|
-
args.slashAmountLarge
|
|
985
|
-
];
|
|
986
|
-
const committeeSize = BigInt(args.aztecTargetCommitteeSize);
|
|
987
|
-
const epochDuration = BigInt(args.aztecEpochDuration);
|
|
988
|
-
const slashOffsetInRounds = BigInt(args.slashingOffsetInRounds);
|
|
989
|
-
const proposerCtor = encodeAbiParameters([
|
|
990
|
-
{
|
|
991
|
-
type: 'address'
|
|
992
|
-
},
|
|
993
|
-
{
|
|
994
|
-
type: 'address'
|
|
995
|
-
},
|
|
996
|
-
{
|
|
997
|
-
type: 'uint256'
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
type: 'uint256'
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
type: 'uint256'
|
|
1004
|
-
},
|
|
1005
|
-
{
|
|
1006
|
-
type: 'uint256'
|
|
1007
|
-
},
|
|
1008
|
-
{
|
|
1009
|
-
type: 'uint256[3]'
|
|
1010
|
-
},
|
|
1011
|
-
{
|
|
1012
|
-
type: 'uint256'
|
|
1013
|
-
},
|
|
1014
|
-
{
|
|
1015
|
-
type: 'uint256'
|
|
1016
|
-
},
|
|
1017
|
-
{
|
|
1018
|
-
type: 'uint256'
|
|
1019
|
-
}
|
|
1020
|
-
], [
|
|
1021
|
-
rollup.address,
|
|
1022
|
-
slasherAddr.toString(),
|
|
1023
|
-
computedQuorum,
|
|
1024
|
-
computedRoundSize,
|
|
1025
|
-
lifetimeInRounds,
|
|
1026
|
-
executionDelayInRounds,
|
|
1027
|
-
slashAmounts,
|
|
1028
|
-
committeeSize,
|
|
1029
|
-
epochDuration,
|
|
1030
|
-
slashOffsetInRounds
|
|
1031
|
-
]);
|
|
1032
|
-
deployer.verificationRecords.push({
|
|
1033
|
-
name: 'TallySlashingProposer',
|
|
1034
|
-
address: proposerAddr,
|
|
1035
|
-
constructorArgsHex: proposerCtor,
|
|
1036
|
-
libraries: []
|
|
1037
|
-
});
|
|
1038
|
-
} else if (args.slasherFlavor === 'empire') {
|
|
1039
|
-
const proposerCtor = encodeAbiParameters([
|
|
1040
|
-
{
|
|
1041
|
-
type: 'address'
|
|
1042
|
-
},
|
|
1043
|
-
{
|
|
1044
|
-
type: 'address'
|
|
1045
|
-
},
|
|
1046
|
-
{
|
|
1047
|
-
type: 'uint256'
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
type: 'uint256'
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
type: 'uint256'
|
|
1054
|
-
},
|
|
1055
|
-
{
|
|
1056
|
-
type: 'uint256'
|
|
1057
|
-
}
|
|
1058
|
-
], [
|
|
1059
|
-
rollup.address,
|
|
1060
|
-
slasherAddr.toString(),
|
|
1061
|
-
computedQuorum,
|
|
1062
|
-
computedRoundSize,
|
|
1063
|
-
lifetimeInRounds,
|
|
1064
|
-
executionDelayInRounds
|
|
1065
|
-
]);
|
|
1066
|
-
deployer.verificationRecords.push({
|
|
1067
|
-
name: 'EmpireSlashingProposer',
|
|
1068
|
-
address: proposerAddr,
|
|
1069
|
-
constructorArgsHex: proposerCtor,
|
|
1070
|
-
libraries: []
|
|
1071
|
-
});
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
} catch (e) {
|
|
1075
|
-
logger.warn(`Failed to add Slasher/Proposer verification records: ${String(e)}`);
|
|
1076
|
-
}
|
|
1077
|
-
const date = new Date();
|
|
1078
|
-
const formattedDate = date.toISOString().slice(2, 19).replace(/[-T:]/g, '');
|
|
1079
|
-
// Ensure the verification output directory exists
|
|
1080
|
-
await mkdir(createVerificationJson, {
|
|
1081
|
-
recursive: true
|
|
1082
|
-
});
|
|
1083
|
-
const verificationOutputPath = `${createVerificationJson}/l1-verify-${chain.id}-${formattedDate.slice(0, 6)}-${formattedDate.slice(6)}.json`;
|
|
1084
|
-
const networkName = getActiveNetworkName();
|
|
1085
|
-
const verificationData = {
|
|
1086
|
-
chainId: chain.id,
|
|
1087
|
-
network: networkName,
|
|
1088
|
-
records: deployer.verificationRecords
|
|
1089
|
-
};
|
|
1090
|
-
await writeFile(verificationOutputPath, JSON.stringify(verificationData, null, 2));
|
|
1091
|
-
logger.info(`Wrote L1 verification data to ${verificationOutputPath}`);
|
|
1092
|
-
} catch (e) {
|
|
1093
|
-
logger.warn(`Failed to write L1 verification data file: ${String(e)}`);
|
|
1094
|
-
}
|
|
1127
|
+
await generateRollupVerificationRecords(rollup, deployer, args, l1Contracts, l1Client, logger);
|
|
1128
|
+
await writeVerificationJson(deployer, createVerificationJson, chain.id, '', logger);
|
|
1095
1129
|
}
|
|
1096
1130
|
if (isAnvilTestChain(chain.id)) {
|
|
1097
1131
|
// @note We make a time jump PAST the very first slot to not have to deal with the edge case of the first slot.
|
|
@@ -1348,9 +1382,8 @@ export class L1Deployer {
|
|
|
1348
1382
|
data: concatHex([
|
|
1349
1383
|
salt,
|
|
1350
1384
|
calldata
|
|
1351
|
-
])
|
|
1352
|
-
|
|
1353
|
-
gasLimit
|
|
1385
|
+
]),
|
|
1386
|
+
gas: gasLimit
|
|
1354
1387
|
});
|
|
1355
1388
|
} catch (err) {
|
|
1356
1389
|
logger?.error(`Failed to simulate deployment tx using universal deployer`, err);
|
|
@@ -1360,7 +1393,8 @@ export class L1Deployer {
|
|
|
1360
1393
|
abi,
|
|
1361
1394
|
bytecode,
|
|
1362
1395
|
args
|
|
1363
|
-
})
|
|
1396
|
+
}),
|
|
1397
|
+
gas: gasLimit
|
|
1364
1398
|
});
|
|
1365
1399
|
}
|
|
1366
1400
|
const res = await l1TxUtils.sendTransaction({
|
|
@@ -1387,6 +1421,8 @@ export class L1Deployer {
|
|
|
1387
1421
|
const { receipt } = await l1TxUtils.sendAndMonitorTransaction({
|
|
1388
1422
|
to: null,
|
|
1389
1423
|
data: deployData
|
|
1424
|
+
}, {
|
|
1425
|
+
gasLimit
|
|
1390
1426
|
});
|
|
1391
1427
|
txHash = receipt.transactionHash;
|
|
1392
1428
|
resultingAddress = receipt.contractAddress;
|