Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/devnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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+=($!)

Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions spartan/aztec-network/values/release-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ aztec:
slotDuration: 36
epochDuration: 32
realProofs: false
extraAccounts: 9
extraAccountsStartIndex: 69

jobs:
deployL1Verifier:
Expand Down
2 changes: 2 additions & 0 deletions yarn-project/aztec.js/src/api/ethereum/portal_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 14 additions & 3 deletions yarn-project/cli/src/cmds/devnet/bootstrap_network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,6 +39,7 @@ export async function bootstrapNetwork(
l1ChainId: string,
l1PrivateKey: `0x${string}` | undefined,
l1Mnemonic: string,
addressIndex: number,
json: boolean,
log: LogFn,
debugLog: Logger,
Expand All @@ -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,
);

Expand All @@ -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) {
Expand Down Expand Up @@ -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');
}
7 changes: 7 additions & 0 deletions yarn-project/cli/src/cmds/devnet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <number>',
'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');
Expand All @@ -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,
Expand Down