Skip to content

Commit 004d38d

Browse files
committed
feat: verify rollups for upgrade and turn off txs on testnet
1 parent c262bea commit 004d38d

File tree

5 files changed

+220
-140
lines changed

5 files changed

+220
-140
lines changed

yarn-project/cli/src/cmds/l1/deploy_new_rollup.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export async function deployNewRollup(
2020
json: boolean,
2121
initialValidators: Operator[],
2222
realVerifier: boolean,
23+
createVerificationJson: string | false,
2324
log: LogFn,
2425
debugLogger: Logger,
2526
) {
@@ -43,6 +44,7 @@ export async function deployNewRollup(
4344
fundingNeeded,
4445
config,
4546
realVerifier,
47+
createVerificationJson,
4648
debugLogger,
4749
);
4850

yarn-project/cli/src/cmds/l1/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
9494
.option('--test-accounts', 'Populate genesis state with initial fee juice for test accounts')
9595
.option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract')
9696
.option('--real-verifier', 'Deploy the real verifier', false)
97+
.option('--create-verification-json [path]', 'Create JSON file for etherscan contract verification', false)
9798
.action(async options => {
9899
const { deployNewRollup } = await import('./deploy_new_rollup.js');
99100

@@ -112,6 +113,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
112113
options.json,
113114
initialValidators,
114115
options.realVerifier,
116+
options.createVerificationJson,
115117
log,
116118
debugLogger,
117119
);

yarn-project/cli/src/config/chain_l2_config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export type L2ChainConfig = L1ContractsConfig &
4242

4343
// Control whether sentinel is enabled or not. Needed for slashing
4444
sentinelEnabled: boolean;
45+
disableTransactions: boolean;
4546
};
4647

4748
const DefaultSlashConfig = {
@@ -93,6 +94,7 @@ export const stagingIgnitionL2ChainConfig: L2ChainConfig = {
9394
l1ChainId: 11155111,
9495
testAccounts: false,
9596
sponsoredFPC: false,
97+
disableTransactions: true,
9698
p2pEnabled: true,
9799
p2pBootstrapNodes: [],
98100
seqMinTxsPerBlock: 0,
@@ -173,6 +175,7 @@ export const stagingPublicL2ChainConfig: L2ChainConfig = {
173175
l1ChainId: 11155111,
174176
testAccounts: false,
175177
sponsoredFPC: true,
178+
disableTransactions: false,
176179
p2pEnabled: true,
177180
p2pBootstrapNodes: [],
178181
seqMinTxsPerBlock: 0,
@@ -226,6 +229,7 @@ export const nextNetL2ChainConfig: L2ChainConfig = {
226229
testAccounts: true,
227230
sponsoredFPC: true,
228231
p2pEnabled: true,
232+
disableTransactions: false,
229233
p2pBootstrapNodes: [],
230234
seqMinTxsPerBlock: 0,
231235
seqMaxTxsPerBlock: 8,
@@ -278,9 +282,10 @@ export const testnetL2ChainConfig: L2ChainConfig = {
278282
testAccounts: false,
279283
sponsoredFPC: true,
280284
p2pEnabled: true,
285+
disableTransactions: true,
281286
p2pBootstrapNodes: [],
282287
seqMinTxsPerBlock: 0,
283-
seqMaxTxsPerBlock: 20,
288+
seqMaxTxsPerBlock: 0,
284289
realProofs: true,
285290
snapshotsUrls: [`${SNAPSHOTS_URL}/testnet/`],
286291
autoUpdate: 'config-and-version',
@@ -314,7 +319,7 @@ export const testnetL2ChainConfig: L2ChainConfig = {
314319
/** Governance proposing round size */
315320
governanceProposerRoundSize: DefaultL1ContractsConfig.governanceProposerRoundSize,
316321
/** The mana target for the rollup */
317-
manaTarget: DefaultL1ContractsConfig.manaTarget,
322+
manaTarget: 0n,
318323
/** The proving cost per mana */
319324
provingCostPerMana: DefaultL1ContractsConfig.provingCostPerMana,
320325
/** Exit delay for stakers */
@@ -332,6 +337,7 @@ export const ignitionL2ChainConfig: L2ChainConfig = {
332337
testAccounts: false,
333338
sponsoredFPC: false,
334339
p2pEnabled: true,
340+
disableTransactions: true,
335341
p2pBootstrapNodes: [],
336342
seqMinTxsPerBlock: 0,
337343
seqMaxTxsPerBlock: 0,
@@ -414,6 +420,7 @@ export const devnetL2ChainConfig: L2ChainConfig = {
414420
testAccounts: true,
415421
sponsoredFPC: true,
416422
p2pEnabled: true,
423+
disableTransactions: false,
417424
p2pBootstrapNodes: [],
418425
seqMinTxsPerBlock: 0,
419426
seqMaxTxsPerBlock: 8,
@@ -574,4 +581,5 @@ export function enrichEnvironmentWithChainConfig(networkName: NetworkNames) {
574581
enrichVar('SLASH_MAX_PAYLOAD_SIZE', config.slashMaxPayloadSize.toString());
575582

576583
enrichVar('SENTINEL_ENABLED', config.sentinelEnabled.toString());
584+
enrichVar('TRANSACTIONS_DISABLED', config.disableTransactions.toString());
577585
}

yarn-project/cli/src/utils/aztec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export async function deployNewRollupContracts(
108108
feeJuicePortalInitialBalance: bigint,
109109
config: L1ContractsConfig,
110110
realVerifier: boolean,
111+
createVerificationJson: string | false,
111112
logger: Logger,
112113
): Promise<{ rollup: RollupContract; slashFactoryAddress: EthAddress }> {
113114
const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum');
@@ -151,6 +152,7 @@ export async function deployNewRollupContracts(
151152
registryAddress,
152153
logger,
153154
config,
155+
createVerificationJson,
154156
);
155157

156158
return { rollup, slashFactoryAddress };

0 commit comments

Comments
 (0)