From ccf28f56c408381867a4ac9435c5f0cc46690271 Mon Sep 17 00:00:00 2001 From: spypsy Date: Fri, 10 Jan 2025 17:03:15 +0000 Subject: [PATCH 1/3] chore: use L1 Tx Utils (#10759) Fixes #10464 --- .../aztec.js/src/utils/portal_manager.ts | 80 +++++++++++++------ .../cli/src/cmds/infrastructure/sequencers.ts | 68 +++++++++++----- 2 files changed, 105 insertions(+), 43 deletions(-) diff --git a/yarn-project/aztec.js/src/utils/portal_manager.ts b/yarn-project/aztec.js/src/utils/portal_manager.ts index 660a63687d2..c2434ac61d3 100644 --- a/yarn-project/aztec.js/src/utils/portal_manager.ts +++ b/yarn-project/aztec.js/src/utils/portal_manager.ts @@ -7,7 +7,7 @@ import { type SiblingPath, computeSecretHash, } from '@aztec/aztec.js'; -import { extractEvent } from '@aztec/ethereum'; +import { L1TxUtils, extractEvent } from '@aztec/ethereum'; import { sha256ToField } from '@aztec/foundation/crypto'; import { FeeJuicePortalAbi, OutboxAbi, TestERC20Abi, TokenPortalAbi } from '@aztec/l1-artifacts'; @@ -19,6 +19,7 @@ import { type HttpTransport, type PublicClient, type WalletClient, + encodeFunctionData, getContract, toFunctionSelector, } from 'viem'; @@ -59,6 +60,7 @@ export function generateClaimSecret(logger?: Logger): [Fr, Fr] { /** Helper for managing an ERC20 on L1. */ export class L1TokenManager { private contract: GetContractReturnType>; + private l1TxUtils: L1TxUtils; public constructor( /** Address of the ERC20 contract. */ @@ -72,6 +74,7 @@ export class L1TokenManager { abi: TestERC20Abi, client: this.walletClient, }); + this.l1TxUtils = new L1TxUtils(publicClient, walletClient, logger); } /** @@ -90,8 +93,13 @@ export class L1TokenManager { */ public async mint(amount: bigint, address: Hex, addressName?: string) { this.logger.info(`Minting ${amount} tokens for ${stringifyEthAddress(address, addressName)}`); - await this.publicClient.waitForTransactionReceipt({ - hash: await this.contract.write.mint([address, amount]), + await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.contract.address, + data: encodeFunctionData({ + abi: this.contract.abi, + functionName: 'mint', + args: [address, amount], + }), }); } @@ -103,8 +111,13 @@ export class L1TokenManager { */ public async approve(amount: bigint, address: Hex, addressName = '') { this.logger.info(`Approving ${amount} tokens for ${stringifyEthAddress(address, addressName)}`); - await this.publicClient.waitForTransactionReceipt({ - hash: await this.contract.write.approve([address, amount]), + await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.contract.address, + data: encodeFunctionData({ + abi: this.contract.abi, + functionName: 'approve', + args: [address, amount], + }), }); } } @@ -116,6 +129,7 @@ export class L1FeeJuicePortalManager { typeof FeeJuicePortalAbi, WalletClient >; + private readonly l1TxUtils: L1TxUtils; constructor( portalAddress: EthAddress, @@ -130,6 +144,7 @@ export class L1FeeJuicePortalManager { abi: FeeJuicePortalAbi, client: this.walletClient, }); + this.l1TxUtils = new L1TxUtils(publicClient, walletClient, logger); } /** Returns the associated token manager for the L1 ERC20. */ @@ -154,10 +169,13 @@ export class L1FeeJuicePortalManager { this.logger.info('Sending L1 Fee Juice to L2 to be claimed publicly'); const args = [to.toString(), amount, claimSecretHash.toString()] as const; - await this.contract.simulate.depositToAztecPublic(args); - - const txReceipt = await this.publicClient.waitForTransactionReceipt({ - hash: await this.contract.write.depositToAztecPublic(args), + const txReceipt = await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.contract.address, + data: encodeFunctionData({ + abi: this.contract.abi, + functionName: 'depositToAztecPublic', + args, + }), }); const log = extractEvent( @@ -210,6 +228,7 @@ export class L1FeeJuicePortalManager { export class L1ToL2TokenPortalManager { protected readonly portal: GetContractReturnType>; protected readonly tokenManager: L1TokenManager; + protected readonly l1TxUtils: L1TxUtils; constructor( portalAddress: EthAddress, @@ -224,6 +243,7 @@ export class L1ToL2TokenPortalManager { abi: TokenPortalAbi, client: this.walletClient, }); + this.l1TxUtils = new L1TxUtils(publicClient, walletClient, logger); } /** Returns the token manager for the underlying L1 token. */ @@ -241,14 +261,15 @@ export class L1ToL2TokenPortalManager { const [claimSecret, claimSecretHash] = await this.bridgeSetup(amount, mint); this.logger.info('Sending L1 tokens to L2 to be claimed publicly'); - const { request } = await this.portal.simulate.depositToAztecPublic([ - to.toString(), - amount, - claimSecretHash.toString(), - ]); + const args = [to.toString(), amount, claimSecretHash.toString()] as const; - const txReceipt = await this.publicClient.waitForTransactionReceipt({ - hash: await this.walletClient.writeContract(request), + const txReceipt = await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.portal.address, + data: encodeFunctionData({ + abi: this.portal.abi, + functionName: 'depositToAztecPublic', + args, + }), }); const log = extractEvent( @@ -286,10 +307,13 @@ export class L1ToL2TokenPortalManager { const [claimSecret, claimSecretHash] = await this.bridgeSetup(amount, mint); this.logger.info('Sending L1 tokens to L2 to be claimed privately'); - const { request } = await this.portal.simulate.depositToAztecPrivate([amount, claimSecretHash.toString()]); - - const txReceipt = await this.publicClient.waitForTransactionReceipt({ - hash: await this.walletClient.writeContract(request), + const txReceipt = await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.portal.address, + data: encodeFunctionData({ + abi: this.portal.abi, + functionName: 'depositToAztecPrivate', + args: [amount, claimSecretHash.toString()], + }), }); const log = extractEvent( @@ -368,17 +392,23 @@ export class L1TokenPortalManager extends L1ToL2TokenPortalManager { throw new Error(`L1 to L2 message at block ${blockNumber} index ${messageIndex} has already been consumed`); } - // Call function on L1 contract to consume the message - const { request: withdrawRequest } = await this.portal.simulate.withdraw([ + const withdrawArgs = [ recipient.toString(), amount, false, BigInt(blockNumber), messageIndex, siblingPath.toBufferArray().map((buf: Buffer): Hex => `0x${buf.toString('hex')}`), - ]); - - await this.publicClient.waitForTransactionReceipt({ hash: await this.walletClient.writeContract(withdrawRequest) }); + ] as const; + // Call function on L1 contract to consume the message + await this.l1TxUtils.sendAndMonitorTransaction({ + to: this.portal.address, + data: encodeFunctionData({ + abi: this.portal.abi, + functionName: 'withdraw', + args: withdrawArgs, + }), + }); const isConsumedAfter = await this.outbox.read.hasMessageBeenConsumedAtBlockAndIndex([blockNumber, messageIndex]); if (!isConsumedAfter) { diff --git a/yarn-project/cli/src/cmds/infrastructure/sequencers.ts b/yarn-project/cli/src/cmds/infrastructure/sequencers.ts index cf5dbe7bdc1..74432781dab 100644 --- a/yarn-project/cli/src/cmds/infrastructure/sequencers.ts +++ b/yarn-project/cli/src/cmds/infrastructure/sequencers.ts @@ -1,9 +1,9 @@ import { createCompatibleClient } from '@aztec/aztec.js'; -import { createEthereumChain, getL1ContractsConfigEnvVars } from '@aztec/ethereum'; +import { L1TxUtils, createEthereumChain, getL1ContractsConfigEnvVars } from '@aztec/ethereum'; import { type LogFn, type Logger } from '@aztec/foundation/log'; import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts'; -import { createPublicClient, createWalletClient, getContract, http } from 'viem'; +import { createPublicClient, createWalletClient, encodeFunctionData, getContract, http } from 'viem'; import { mnemonicToAccount } from 'viem/accounts'; export async function sequencers(opts: { @@ -48,6 +48,8 @@ export async function sequencers(opts: { const who = (maybeWho as `0x{string}`) ?? walletClient?.account.address.toString(); + const l1TxUtils = walletClient ? new L1TxUtils(publicClient, walletClient, debugLogger) : undefined; + if (command === 'list') { const sequencers = await rollup.read.getAttesters(); if (sequencers.length === 0) { @@ -59,8 +61,8 @@ export async function sequencers(opts: { } } } else if (command === 'add') { - if (!who || !writeableRollup || !walletClient) { - throw new Error(`Missing sequencer address`); + if (!who || !writeableRollup || !walletClient || !l1TxUtils) { + throw new Error(`Missing sequencer address or wallet configuration`); } log(`Adding ${who} as sequencer`); @@ -72,25 +74,55 @@ export async function sequencers(opts: { }); const config = getL1ContractsConfigEnvVars(); + const mintRequest = { + to: stakingAsset.address, + data: encodeFunctionData({ + abi: stakingAsset.abi, + functionName: 'mint', + args: [walletClient.account.address, config.minimumStake], + }), + }; + const approveRequest = { + to: stakingAsset.address, + data: encodeFunctionData({ + abi: stakingAsset.abi, + functionName: 'approve', + args: [rollup.address, config.minimumStake], + }), + }; + + await Promise.all([ + l1TxUtils.sendAndMonitorTransaction(mintRequest), + l1TxUtils.sendAndMonitorTransaction(approveRequest), + ]); - await Promise.all( - [ - await stakingAsset.write.mint([walletClient.account.address, config.minimumStake], {} as any), - await stakingAsset.write.approve([rollup.address, config.minimumStake], {} as any), - ].map(txHash => publicClient.waitForTransactionReceipt({ hash: txHash })), - ); + // send and monitor deposit transaction + const depositReceipt = await l1TxUtils.sendAndMonitorTransaction({ + to: writeableRollup.address, + data: encodeFunctionData({ + abi: writeableRollup.abi, + functionName: 'deposit', + args: [who, who, who, config.minimumStake], + }), + }); - const hash = await writeableRollup.write.deposit([who, who, who, config.minimumStake]); - await publicClient.waitForTransactionReceipt({ hash }); - log(`Added in tx ${hash}`); + log(`Added in tx ${depositReceipt.transactionHash}`); } else if (command === 'remove') { - if (!who || !writeableRollup) { - throw new Error(`Missing sequencer address`); + if (!who || !writeableRollup || !l1TxUtils) { + throw new Error(`Missing sequencer address or wallet configuration`); } log(`Removing ${who} as sequencer`); - const hash = await writeableRollup.write.initiateWithdraw([who, who]); - await publicClient.waitForTransactionReceipt({ hash }); - log(`Removed in tx ${hash}`); + + const receipt = await l1TxUtils.sendAndMonitorTransaction({ + to: writeableRollup.address, + data: encodeFunctionData({ + abi: writeableRollup.abi, + functionName: 'initiateWithdraw', + args: [who, who], + }), + }); + + log(`Removed in tx ${receipt.transactionHash}`); } else if (command === 'who-next') { const next = await rollup.read.getCurrentProposer(); log(`Sequencer expected to build is ${next}`); From f4e5c7998c7915923a33e2b26146eebc61775b14 Mon Sep 17 00:00:00 2001 From: spypsy Date: Fri, 10 Jan 2025 18:35:18 +0000 Subject: [PATCH 2/3] fix: Revert "chore: use L1 Tx Utils" (#11167) Reverts AztecProtocol/aztec-packages#10759 --- .../aztec.js/src/utils/portal_manager.ts | 80 ++++++------------- .../cli/src/cmds/infrastructure/sequencers.ts | 68 +++++----------- 2 files changed, 43 insertions(+), 105 deletions(-) diff --git a/yarn-project/aztec.js/src/utils/portal_manager.ts b/yarn-project/aztec.js/src/utils/portal_manager.ts index c2434ac61d3..660a63687d2 100644 --- a/yarn-project/aztec.js/src/utils/portal_manager.ts +++ b/yarn-project/aztec.js/src/utils/portal_manager.ts @@ -7,7 +7,7 @@ import { type SiblingPath, computeSecretHash, } from '@aztec/aztec.js'; -import { L1TxUtils, extractEvent } from '@aztec/ethereum'; +import { extractEvent } from '@aztec/ethereum'; import { sha256ToField } from '@aztec/foundation/crypto'; import { FeeJuicePortalAbi, OutboxAbi, TestERC20Abi, TokenPortalAbi } from '@aztec/l1-artifacts'; @@ -19,7 +19,6 @@ import { type HttpTransport, type PublicClient, type WalletClient, - encodeFunctionData, getContract, toFunctionSelector, } from 'viem'; @@ -60,7 +59,6 @@ export function generateClaimSecret(logger?: Logger): [Fr, Fr] { /** Helper for managing an ERC20 on L1. */ export class L1TokenManager { private contract: GetContractReturnType>; - private l1TxUtils: L1TxUtils; public constructor( /** Address of the ERC20 contract. */ @@ -74,7 +72,6 @@ export class L1TokenManager { abi: TestERC20Abi, client: this.walletClient, }); - this.l1TxUtils = new L1TxUtils(publicClient, walletClient, logger); } /** @@ -93,13 +90,8 @@ export class L1TokenManager { */ public async mint(amount: bigint, address: Hex, addressName?: string) { this.logger.info(`Minting ${amount} tokens for ${stringifyEthAddress(address, addressName)}`); - await this.l1TxUtils.sendAndMonitorTransaction({ - to: this.contract.address, - data: encodeFunctionData({ - abi: this.contract.abi, - functionName: 'mint', - args: [address, amount], - }), + await this.publicClient.waitForTransactionReceipt({ + hash: await this.contract.write.mint([address, amount]), }); } @@ -111,13 +103,8 @@ export class L1TokenManager { */ public async approve(amount: bigint, address: Hex, addressName = '') { this.logger.info(`Approving ${amount} tokens for ${stringifyEthAddress(address, addressName)}`); - await this.l1TxUtils.sendAndMonitorTransaction({ - to: this.contract.address, - data: encodeFunctionData({ - abi: this.contract.abi, - functionName: 'approve', - args: [address, amount], - }), + await this.publicClient.waitForTransactionReceipt({ + hash: await this.contract.write.approve([address, amount]), }); } } @@ -129,7 +116,6 @@ export class L1FeeJuicePortalManager { typeof FeeJuicePortalAbi, WalletClient >; - private readonly l1TxUtils: L1TxUtils; constructor( portalAddress: EthAddress, @@ -144,7 +130,6 @@ export class L1FeeJuicePortalManager { abi: FeeJuicePortalAbi, client: this.walletClient, }); - this.l1TxUtils = new L1TxUtils(publicClient, walletClient, logger); } /** Returns the associated token manager for the L1 ERC20. */ @@ -169,13 +154,10 @@ export class L1FeeJuicePortalManager { this.logger.info('Sending L1 Fee Juice to L2 to be claimed publicly'); const args = [to.toString(), amount, claimSecretHash.toString()] as const; - const txReceipt = await this.l1TxUtils.sendAndMonitorTransaction({ - to: this.contract.address, - data: encodeFunctionData({ - abi: this.contract.abi, - functionName: 'depositToAztecPublic', - args, - }), + await this.contract.simulate.depositToAztecPublic(args); + + const txReceipt = await this.publicClient.waitForTransactionReceipt({ + hash: await this.contract.write.depositToAztecPublic(args), }); const log = extractEvent( @@ -228,7 +210,6 @@ export class L1FeeJuicePortalManager { export class L1ToL2TokenPortalManager { protected readonly portal: GetContractReturnType>; protected readonly tokenManager: L1TokenManager; - protected readonly l1TxUtils: L1TxUtils; constructor( portalAddress: EthAddress, @@ -243,7 +224,6 @@ export class L1ToL2TokenPortalManager { abi: TokenPortalAbi, client: this.walletClient, }); - this.l1TxUtils = new L1TxUtils(publicClient, walletClient, logger); } /** Returns the token manager for the underlying L1 token. */ @@ -261,15 +241,14 @@ export class L1ToL2TokenPortalManager { const [claimSecret, claimSecretHash] = await this.bridgeSetup(amount, mint); this.logger.info('Sending L1 tokens to L2 to be claimed publicly'); - const args = [to.toString(), amount, claimSecretHash.toString()] as const; + const { request } = await this.portal.simulate.depositToAztecPublic([ + to.toString(), + amount, + claimSecretHash.toString(), + ]); - const txReceipt = await this.l1TxUtils.sendAndMonitorTransaction({ - to: this.portal.address, - data: encodeFunctionData({ - abi: this.portal.abi, - functionName: 'depositToAztecPublic', - args, - }), + const txReceipt = await this.publicClient.waitForTransactionReceipt({ + hash: await this.walletClient.writeContract(request), }); const log = extractEvent( @@ -307,13 +286,10 @@ export class L1ToL2TokenPortalManager { const [claimSecret, claimSecretHash] = await this.bridgeSetup(amount, mint); this.logger.info('Sending L1 tokens to L2 to be claimed privately'); - const txReceipt = await this.l1TxUtils.sendAndMonitorTransaction({ - to: this.portal.address, - data: encodeFunctionData({ - abi: this.portal.abi, - functionName: 'depositToAztecPrivate', - args: [amount, claimSecretHash.toString()], - }), + const { request } = await this.portal.simulate.depositToAztecPrivate([amount, claimSecretHash.toString()]); + + const txReceipt = await this.publicClient.waitForTransactionReceipt({ + hash: await this.walletClient.writeContract(request), }); const log = extractEvent( @@ -392,23 +368,17 @@ export class L1TokenPortalManager extends L1ToL2TokenPortalManager { throw new Error(`L1 to L2 message at block ${blockNumber} index ${messageIndex} has already been consumed`); } - const withdrawArgs = [ + // Call function on L1 contract to consume the message + const { request: withdrawRequest } = await this.portal.simulate.withdraw([ recipient.toString(), amount, false, BigInt(blockNumber), messageIndex, siblingPath.toBufferArray().map((buf: Buffer): Hex => `0x${buf.toString('hex')}`), - ] as const; - // Call function on L1 contract to consume the message - await this.l1TxUtils.sendAndMonitorTransaction({ - to: this.portal.address, - data: encodeFunctionData({ - abi: this.portal.abi, - functionName: 'withdraw', - args: withdrawArgs, - }), - }); + ]); + + await this.publicClient.waitForTransactionReceipt({ hash: await this.walletClient.writeContract(withdrawRequest) }); const isConsumedAfter = await this.outbox.read.hasMessageBeenConsumedAtBlockAndIndex([blockNumber, messageIndex]); if (!isConsumedAfter) { diff --git a/yarn-project/cli/src/cmds/infrastructure/sequencers.ts b/yarn-project/cli/src/cmds/infrastructure/sequencers.ts index 74432781dab..cf5dbe7bdc1 100644 --- a/yarn-project/cli/src/cmds/infrastructure/sequencers.ts +++ b/yarn-project/cli/src/cmds/infrastructure/sequencers.ts @@ -1,9 +1,9 @@ import { createCompatibleClient } from '@aztec/aztec.js'; -import { L1TxUtils, createEthereumChain, getL1ContractsConfigEnvVars } from '@aztec/ethereum'; +import { createEthereumChain, getL1ContractsConfigEnvVars } from '@aztec/ethereum'; import { type LogFn, type Logger } from '@aztec/foundation/log'; import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts'; -import { createPublicClient, createWalletClient, encodeFunctionData, getContract, http } from 'viem'; +import { createPublicClient, createWalletClient, getContract, http } from 'viem'; import { mnemonicToAccount } from 'viem/accounts'; export async function sequencers(opts: { @@ -48,8 +48,6 @@ export async function sequencers(opts: { const who = (maybeWho as `0x{string}`) ?? walletClient?.account.address.toString(); - const l1TxUtils = walletClient ? new L1TxUtils(publicClient, walletClient, debugLogger) : undefined; - if (command === 'list') { const sequencers = await rollup.read.getAttesters(); if (sequencers.length === 0) { @@ -61,8 +59,8 @@ export async function sequencers(opts: { } } } else if (command === 'add') { - if (!who || !writeableRollup || !walletClient || !l1TxUtils) { - throw new Error(`Missing sequencer address or wallet configuration`); + if (!who || !writeableRollup || !walletClient) { + throw new Error(`Missing sequencer address`); } log(`Adding ${who} as sequencer`); @@ -74,55 +72,25 @@ export async function sequencers(opts: { }); const config = getL1ContractsConfigEnvVars(); - const mintRequest = { - to: stakingAsset.address, - data: encodeFunctionData({ - abi: stakingAsset.abi, - functionName: 'mint', - args: [walletClient.account.address, config.minimumStake], - }), - }; - const approveRequest = { - to: stakingAsset.address, - data: encodeFunctionData({ - abi: stakingAsset.abi, - functionName: 'approve', - args: [rollup.address, config.minimumStake], - }), - }; - - await Promise.all([ - l1TxUtils.sendAndMonitorTransaction(mintRequest), - l1TxUtils.sendAndMonitorTransaction(approveRequest), - ]); - // send and monitor deposit transaction - const depositReceipt = await l1TxUtils.sendAndMonitorTransaction({ - to: writeableRollup.address, - data: encodeFunctionData({ - abi: writeableRollup.abi, - functionName: 'deposit', - args: [who, who, who, config.minimumStake], - }), - }); + await Promise.all( + [ + await stakingAsset.write.mint([walletClient.account.address, config.minimumStake], {} as any), + await stakingAsset.write.approve([rollup.address, config.minimumStake], {} as any), + ].map(txHash => publicClient.waitForTransactionReceipt({ hash: txHash })), + ); - log(`Added in tx ${depositReceipt.transactionHash}`); + const hash = await writeableRollup.write.deposit([who, who, who, config.minimumStake]); + await publicClient.waitForTransactionReceipt({ hash }); + log(`Added in tx ${hash}`); } else if (command === 'remove') { - if (!who || !writeableRollup || !l1TxUtils) { - throw new Error(`Missing sequencer address or wallet configuration`); + if (!who || !writeableRollup) { + throw new Error(`Missing sequencer address`); } log(`Removing ${who} as sequencer`); - - const receipt = await l1TxUtils.sendAndMonitorTransaction({ - to: writeableRollup.address, - data: encodeFunctionData({ - abi: writeableRollup.abi, - functionName: 'initiateWithdraw', - args: [who, who], - }), - }); - - log(`Removed in tx ${receipt.transactionHash}`); + const hash = await writeableRollup.write.initiateWithdraw([who, who]); + await publicClient.waitForTransactionReceipt({ hash }); + log(`Removed in tx ${hash}`); } else if (command === 'who-next') { const next = await rollup.read.getCurrentProposer(); log(`Sequencer expected to build is ${next}`); From a66349fa2b60fb397008cd7e0571cc3a3e5fae02 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 10 Jan 2025 14:08:23 -0500 Subject: [PATCH 3/3] chore(ci): try fix boxes-test (#11162) try to settle image clashes with a tag bump --------- Co-authored-by: ludamad --- Dockerfile.boxes | 2 +- build-images/Earthfile | 6 +++--- ci3/aws/ami_update.sh | 4 ++-- ci3/bootstrap_ec2 | 2 +- ci3/bootstrap_local | 2 +- ci3/bootstrap_local_noninteractive | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile.boxes b/Dockerfile.boxes index 869395adf01..e370080d1fa 100644 --- a/Dockerfile.boxes +++ b/Dockerfile.boxes @@ -1,4 +1,4 @@ -FROM aztecprotocol/ci:2.0 +FROM aztecprotocol/ci:2.1 COPY /usr/src /usr/src WORKDIR /usr/src/boxes RUN ls /usr/src/boxes diff --git a/build-images/Earthfile b/build-images/Earthfile index e4c347b2993..c31d7227855 100644 --- a/build-images/Earthfile +++ b/build-images/Earthfile @@ -234,8 +234,8 @@ ci: ENV CI=1 ARG TARGETARCH - SAVE IMAGE --push aztecprotocol/ci:2.0-$TARGETARCH - SAVE IMAGE --push aztecprotocol/ci:2.0 + SAVE IMAGE --push aztecprotocol/ci:2.1-$TARGETARCH + SAVE IMAGE --push aztecprotocol/ci:2.1 ######################################################################################################################## # We want to produce downstream images: devbox and sysbox. This image is the base image for each. @@ -477,7 +477,7 @@ aztec-base: ARG TARGETARCH SAVE IMAGE --push aztecprotocol/aztec-base:v1.0-$TARGETARCH -# Add a new target for end-to-end-base that corresponds to the portion of Dockerfile.end-to-end before COPY /usr/src +# Add a new target for end-to-end-base that corresponds to the portion of Dockerfile.end-to-end before COPY /usr/src. end-to-end-base: FROM ubuntu:noble # Add our dev testing dependencies. diff --git a/ci3/aws/ami_update.sh b/ci3/aws/ami_update.sh index ef70b9a186e..8cf531d7414 100755 --- a/ci3/aws/ami_update.sh +++ b/ci3/aws/ami_update.sh @@ -36,9 +36,9 @@ scp -F build_instance_ssh_config $HOME/.aws/build_instance_credentials ubuntu@$i # Download crs onto machine. ssh -t -F build_instance_ssh_config ubuntu@$ip < ../../barretenberg/scripts/download_bb_crs.sh -# Pull ci:2.0 onto host, and build:2.0 into docker-in-docker volume. +# Pull ci:2.1 onto host, and build:2.0 into docker-in-docker volume. ssh -t -F build_instance_ssh_config ubuntu@$ip ' - docker run --privileged -ti --rm -v boostrap_ci_local_docker:/var/lib/docker aztecprotocol/ci:2.0 bash -c " + docker run --privileged -ti --rm -v boostrap_ci_local_docker:/var/lib/docker aztecprotocol/ci:2.1 bash -c " /usr/local/share/docker-init.sh &> /dev/null sleep 5 docker pull aztecprotocol/build:2.0 diff --git a/ci3/bootstrap_ec2 b/ci3/bootstrap_ec2 index 068e1c40a76..a73f00a4728 100755 --- a/ci3/bootstrap_ec2 +++ b/ci3/bootstrap_ec2 @@ -66,7 +66,7 @@ ssh -t -F $ci3/aws/build_instance_ssh_config ubuntu@$ip " -v boostrap_ci_local_docker:/var/lib/docker \ -v \$HOME:/root \ -v /tmp:/tmp \ - aztecprotocol/ci:2.0 bash -c ' + aztecprotocol/ci:2.1 bash -c ' [ -n \"$GITHUB_LOG\" ] && echo "::endgroup::" [ -n \"$GITHUB_LOG\" ] && echo "::group::Clone Repository" set -e diff --git a/ci3/bootstrap_local b/ci3/bootstrap_local index 19af7409234..3f225c96670 100755 --- a/ci3/bootstrap_local +++ b/ci3/bootstrap_local @@ -21,7 +21,7 @@ docker run --name aztec_build -ti --rm \ -v $root:/aztec-packages-host:ro \ -v $HOME/.aws:/root/.aws:ro \ -v $HOME/.bb-crs:/root/.bb-crs:ro \ - aztecprotocol/ci:2.0 bash -c " + aztecprotocol/ci:2.1 bash -c " set -e /usr/local/share/docker-init.sh &> /dev/null git config --global --add safe.directory /aztec-packages-host/.git diff --git a/ci3/bootstrap_local_noninteractive b/ci3/bootstrap_local_noninteractive index c2f6cc9ecd6..4d3eedfef8d 100755 --- a/ci3/bootstrap_local_noninteractive +++ b/ci3/bootstrap_local_noninteractive @@ -17,7 +17,7 @@ docker run --rm \ -v bootstrap_ci_local_docker:/var/lib/docker \ -v $root:/aztec-packages-host:ro \ -v $HOME/.aws:/root/.aws \ - aztecprotocol/ci:2.0 bash -c " + aztecprotocol/ci:2.1 bash -c " /usr/local/share/docker-init.sh &> /dev/null git config --global --add safe.directory /aztec-packages-host/.git mkdir -p /root/aztec-packages && cd /root/aztec-packages