Skip to content

Commit 35ca7cd

Browse files
author
AztecBot
committed
Merge branch 'next' into merge-train/avm
2 parents 7b4bde2 + 45f9163 commit 35ca7cd

File tree

11 files changed

+87
-19
lines changed

11 files changed

+87
-19
lines changed

.github/workflows/deploy-staging-networks.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ jobs:
124124
BOT_SWAPS_FOLLOW_CHAIN=PENDING
125125
BOT_SWAPS_TX_INTERVAL_SECONDS=350
126126
127+
FLUSH_ENTRY_QUEUE=false
127128
EOF
128129
echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV
129130
@@ -174,11 +175,12 @@ jobs:
174175
OTEL_COLLECTOR_ENDPOINT=${{ secrets.OTEL_COLLECTOR_URL }}
175176
VERIFY_CONTRACTS=true
176177
ETHERSCAN_API_KEY=${{ secrets.ETHERSCAN_API_KEY }}
177-
178178
STORE_SNAPSHOT_URL="${{ secrets.GCS_TESTNET_SNAPSHOT_URL }}/staging-ignition/"
179179
DEPLOY_INTERNAL_BOOTNODE=false
180180
BOT_TRANSFERS_REPLICAS=0
181181
BOT_SWAPS_REPLICAS=0
182+
DEPLOY_INTERNAL_BOOTNODE=false
183+
FLUSH_ENTRY_QUEUE=false
182184
EOF
183185
echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV
184186
@@ -233,6 +235,7 @@ jobs:
233235
DEPLOY_INTERNAL_BOOTNODE=false
234236
BOT_TRANSFERS_REPLICAS=0
235237
BOT_SWAPS_REPLICAS=0
238+
FLUSH_ENTRY_QUEUE=false
236239
EOF
237240
echo "NAMESPACE=$NAMESPACE" >> $GITHUB_ENV
238241

spartan/aztec-network/files/config/deploy-l1-contracts.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ if [ "$REAL_VERIFIER" = "true" ]; then
6767
REAL_VERIFIER_ARG="--real-verifier"
6868
fi
6969

70+
FLUSH_ENTRY_QUEUE_ARG="--flush-entry-queue"
71+
7072
for attempt in $(seq 1 $MAX_RETRIES); do
7173
# Construct base command
72-
base_cmd="LOG_LEVEL=debug node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js deploy-l1-contracts $TEST_ACCOUNTS_ARG $ACCELERATED_TEST_DEPLOYMENTS_ARG $SPONSORED_FPC_ARG $REAL_VERIFIER_ARG"
74+
base_cmd="LOG_LEVEL=debug node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js deploy-l1-contracts $TEST_ACCOUNTS_ARG $ACCELERATED_TEST_DEPLOYMENTS_ARG $SPONSORED_FPC_ARG $REAL_VERIFIER_ARG $FLUSH_ENTRY_QUEUE"
7375

7476
# Add account - use private key if set, otherwise use mnemonic
7577
if [ -n "${L1_DEPLOYMENT_PRIVATE_KEY:-}" ]; then

spartan/scripts/deploy_network.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ BOT_SWAPS_TX_INTERVAL_SECONDS=${BOT_SWAPS_TX_INTERVAL_SECONDS:-60}
7575
BOT_TRANSFERS_FOLLOW_CHAIN=${BOT_TRANSFERS_FOLLOW_CHAIN:-NONE}
7676
BOT_SWAPS_FOLLOW_CHAIN=${BOT_SWAPS_FOLLOW_CHAIN:-NONE}
7777

78+
FLUSH_ENTRY_QUEUE=${FLUSH_ENTRY_QUEUE:-true}
79+
7880
########################
7981
# CHAOS MESH VARIABLES
8082
########################
@@ -217,6 +219,7 @@ NETWORK = "${NETWORK:-null}"
217219
JOB_NAME = "deploy-rollup-contracts"
218220
JOB_BACKOFF_LIMIT = 3
219221
JOB_TTL_SECONDS_AFTER_FINISHED = 3600
222+
FLUSH_ENTRY_QUEUE = ${FLUSH_ENTRY_QUEUE}
220223
EOF
221224

222225
tf_run "${DEPLOY_ROLLUP_CONTRACTS_DIR}" "${DESTROY_ROLLUP_CONTRACTS}" "${CREATE_ROLLUP_CONTRACTS}"

spartan/terraform/deploy-rollup-contracts/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ locals {
2929
["--create-verification-json", "/tmp/l1-verify"],
3030
var.SALT != null ? ["--salt", tostring(var.SALT)] : [],
3131
var.SPONSORED_FPC ? ["--sponsored-fpc"] : [],
32-
var.REAL_VERIFIER ? ["--real-verifier"] : []
32+
var.REAL_VERIFIER ? ["--real-verifier"] : [],
33+
var.FLUSH_ENTRY_QUEUE ? ["--flush-entry-queue"] : []
3334
)
3435

3536

spartan/terraform/deploy-rollup-contracts/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,9 @@ variable "NETWORK" {
210210
type = string
211211
nullable = true
212212
}
213+
214+
variable "FLUSH_ENTRY_QUEUE" {
215+
description = "Flush the entry queue after adding initial validators"
216+
type = bool
217+
default = true
218+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export async function deployL1Contracts(
2222
createVerificationJson: string | false,
2323
initialValidators: EthAddress[],
2424
realVerifier: boolean,
25+
flushEntryQueue: boolean,
2526
log: LogFn,
2627
debugLogger: Logger,
2728
) {
@@ -52,6 +53,7 @@ export async function deployL1Contracts(
5253
config,
5354
realVerifier,
5455
createVerificationJson,
56+
flushEntryQueue,
5557
debugLogger,
5658
);
5759

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
4848
.option('--sponsored-fpc', 'Populate genesis state with a testing sponsored FPC contract')
4949
.option('--accelerated-test-deployments', 'Fire and forget deployment transactions, use in testing only', false)
5050
.option('--real-verifier', 'Deploy the real verifier', false)
51+
.option('--flush-entry-queue', 'Whether to flush the entry queue after adding initial validators', false)
5152
.option('--create-verification-json [path]', 'Create JSON file for etherscan contract verification', false)
5253
.action(async options => {
5354
const { deployL1Contracts } = await import('./deploy_l1_contracts.js');
@@ -68,6 +69,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger
6869
options.createVerificationJson,
6970
initialValidators,
7071
options.realVerifier,
72+
options.flushEntryQueue,
7173
log,
7274
debugLogger,
7375
);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export async function deployAztecContracts(
5959
config: L1ContractsConfig,
6060
realVerifier: boolean,
6161
createVerificationJson: string | false,
62+
flushEntryQueue: boolean,
6263
debugLogger: Logger,
6364
): Promise<DeployL1ContractsReturnType> {
6465
const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum');
@@ -89,6 +90,7 @@ export async function deployAztecContracts(
8990
},
9091
config,
9192
createVerificationJson,
93+
flushEntryQueue,
9294
);
9395

9496
return result;

yarn-project/ethereum/src/contracts/registry.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ describe('Registry', () => {
136136
realVerifier: false,
137137
},
138138
deployedAddresses,
139+
true,
139140
logger,
140141
);
141142

yarn-project/ethereum/src/contracts/rollup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ export class RollupContract {
441441
return this.rollup.read.getEntryQueueLength();
442442
}
443443

444+
getNextFlushableEpoch() {
445+
return this.rollup.read.getNextFlushableEpoch();
446+
}
447+
444448
async getEpochNumber(blockNumber?: bigint) {
445449
blockNumber ??= await this.getBlockNumber();
446450
return this.rollup.read.getEpochForBlock([BigInt(blockNumber)]);

0 commit comments

Comments
 (0)