diff --git a/.github/workflows/devnet-deploy.yml b/.github/workflows/devnet-deploy.yml index 60b75ef0c48e..668d1c7fc162 100644 --- a/.github/workflows/devnet-deploy.yml +++ b/.github/workflows/devnet-deploy.yml @@ -4,19 +4,21 @@ on: workflow_dispatch: inputs: cluster: - description: The cluster to deploy to, e.g. aztec-gke-private + description: The cluster to deploy to, e.g. aztec-gke-public required: true - default: "aztec-gke-private" + default: "aztec-gke-public" namespace: description: The namespace to deploy to, e.g. smoke required: true + default: "devnet-canary" aztec_docker_image: description: The Aztec Docker image to use required: true + default: "aztecprotocol/aztec" deployment_mnemonic_secret_name: description: The name of the secret which holds the boot node's contract deployment mnemonic required: true - default: testnet-deployment-mnemonic + default: junk-mnemonic deployment_salt: description: The salt to use for this deployment. Defaults to random required: false @@ -131,6 +133,8 @@ jobs: rm helm_values.json + ADDRESS_INDEX=69 + kubectl port-forward -n $NAMESPACE svc/$NAMESPACE-aztec-network-pxe $PXE_PORT &>/dev/null & port_forward_pids+=($!) @@ -150,6 +154,7 @@ jobs: --l1-rpc-url http://127.0.0.1:$ETHEREUM_PORT \ --l1-chain-id "$L1_CHAIN_ID" \ --mnemonic "$MNEMONIC" \ + --address-index "$ADDRESS_INDEX" \ --json | tee ./basic_contracts.json aws s3 cp ./basic_contracts.json ${{ env.CONTRACT_S3_BUCKET }}/devnet/basic_contracts.json diff --git a/spartan/aztec-network/values/release-devnet.yaml b/spartan/aztec-network/values/release-devnet.yaml index 5d1fe68e5126..116f49c73b87 100644 --- a/spartan/aztec-network/values/release-devnet.yaml +++ b/spartan/aztec-network/values/release-devnet.yaml @@ -32,6 +32,8 @@ aztec: slotDuration: 36 epochDuration: 32 realProofs: false + extraAccounts: 9 + extraAccountsStartIndex: 69 jobs: deployL1Verifier: diff --git a/yarn-project/aztec.js/src/api/ethereum/portal_manager.ts b/yarn-project/aztec.js/src/api/ethereum/portal_manager.ts index cb98af57afcd..6f159912f79f 100644 --- a/yarn-project/aztec.js/src/api/ethereum/portal_manager.ts +++ b/yarn-project/aztec.js/src/api/ethereum/portal_manager.ts @@ -155,6 +155,8 @@ export class L1FeeJuicePortalManager { hash: await this.contract.write.depositToAztecPublic(args), }); + this.logger.info('Deposited to Aztec public successfully'); + const log = extractEvent( txReceipt.logs, this.contract.address, diff --git a/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts b/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts index 388e173c3a5e..38f225293b98 100644 --- a/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts +++ b/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts @@ -19,7 +19,7 @@ import { import { type LogFn, type Logger } from '@aztec/foundation/log'; import { getContract } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; +import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; type ContractDeploymentInfo = { address: AztecAddress; @@ -39,6 +39,7 @@ export async function bootstrapNetwork( l1ChainId: string, l1PrivateKey: `0x${string}` | undefined, l1Mnemonic: string, + addressIndex: number, json: boolean, log: LogFn, debugLog: Logger, @@ -51,7 +52,11 @@ export async function bootstrapNetwork( const l1Clients = createL1Clients( l1Url, - l1PrivateKey ? privateKeyToAccount(l1PrivateKey) : l1Mnemonic, + l1PrivateKey + ? privateKeyToAccount(l1PrivateKey) + : // We need to use a different account that the main "deployer" account because the "deployer" account creates transactions that send blobs. + // Note that this account needs to be funded on L1 ! + mnemonicToAccount(l1Mnemonic, { addressIndex }), createEthereumChain(l1Url, +l1ChainId).chainInfo, ); @@ -65,7 +70,7 @@ export async function bootstrapNetwork( const fpc = await deployFPC(wallet, token.address, fpcAdmin); const counter = await deployCounter(wallet); - // NOTE: Disabling for now in order to get devnet running + await fundFPC(counter.address, wallet, l1Clients, fpc.address, debugLog); if (json) { @@ -294,13 +299,19 @@ async function fundFPC( const counter = await CounterContract.at(counterAddress, wallet); + debugLog.info('Incrementing Counter'); + // TODO (alexg) remove this once sequencer builds blocks continuously // advance the chain await counter.methods.increment(wallet.getAddress(), wallet.getAddress()).send().wait(waitOpts); await counter.methods.increment(wallet.getAddress(), wallet.getAddress()).send().wait(waitOpts); + debugLog.info('Claiming FPC'); + await feeJuiceContract.methods .claim(fpcAddress, claimAmount, claimSecret, messageLeafIndex) .send() .wait({ ...waitOpts, proven: true }); + + debugLog.info('Finished claiming FPC'); } diff --git a/yarn-project/cli/src/cmds/devnet/index.ts b/yarn-project/cli/src/cmds/devnet/index.ts index bf56f1d0b51f..d7026938f665 100644 --- a/yarn-project/cli/src/cmds/devnet/index.ts +++ b/yarn-project/cli/src/cmds/devnet/index.ts @@ -21,6 +21,12 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger 'The mnemonic to use in deployment', 'test test test test test test test test test test test junk', ) + .option( + '-ai, --address-index ', + 'The address index to use when calculating an address', + arg => BigInt(arg), + 0n, + ) .option('--json', 'Output the result as JSON') .action(async options => { const { bootstrapNetwork } = await import('./bootstrap_network.js'); @@ -30,6 +36,7 @@ export function injectCommands(program: Command, log: LogFn, debugLogger: Logger options[l1ChainIdOption.attributeName()], options.l1PrivateKey, options.mnemonic, + options.addressIndex, options.json, log, debugLogger,