Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
disable bootstrap-network
  • Loading branch information
sklppy88 committed Feb 6, 2025
1 parent 62e5de7 commit 569b482
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 11 deletions.
8 changes: 5 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
14 changes: 14 additions & 0 deletions spartan/aztec-network/templates/boot-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ spec:
{{- include "aztec-network.selectorLabels" . | nindent 8 }}
app: boot-node
spec:
{{- if and .Values.bootNode.gke.spotEnabled .Values.network.gke }}
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: cloud.google.com/gke-spot
operator: Exists
tolerations:
- key: "cloud.google.com/gke-spot"
operator: "Equal"
value: "true"
effect: "NoSchedule"
{{- end }}
{{- if .Values.network.gke }}
nodeSelector:
local-ssd: "{{ .Values.storage.localSsd }}"
Expand Down
25 changes: 21 additions & 4 deletions spartan/aztec-network/values/release-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ telemetry:
enabled: true

validator:
storageSize: "100Gi"
replicas: 1
sequencer:
enforceFees: false # disabled until the bot can fund itself
Expand All @@ -11,9 +12,23 @@ validator:
bootNode:
validator:
disabled: true
gke:
spotEnabled: true
resources:
requests:
memory: "16Gi"
cpu: "8"

proverAgent:
replicas: 1
replicas: 8
bb:
hardwareConcurrency: 31
gke:
spotEnabled: true
resources:
requests:
memory: "116Gi"
cpu: "31"

bot:
followChain: "PENDING"
Expand All @@ -30,9 +45,11 @@ images:

aztec:
slotDuration: 36
epochDuration: 32
realProofs: false
epochDuration: 48
realProofs: true
extraAccounts: 9
extraAccountsStartIndex: 69

jobs:
deployL1Verifier:
enable: false
enable: true
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: 13 additions & 4 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 Down Expand Up @@ -51,7 +51,10 @@ 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 transations that send blobs.
mnemonicToAccount(l1Mnemonic, { addressIndex: 69 }),
createEthereumChain(l1Url, +l1ChainId).chainInfo,
);

Expand All @@ -65,7 +68,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 +297,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 });
.wait({ ...waitOpts });

debugLog.info('Finished claiming FPC');
}

0 comments on commit 569b482

Please sign in to comment.