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
9 changes: 8 additions & 1 deletion spartan/aztec-network/files/config/deploy-l1-contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,27 @@ fi
output=""
MAX_RETRIES=5
RETRY_DELAY=15

TEST_ACCOUNTS=${TEST_ACCOUNTS:-false}
TEST_ACCOUNTS_ARG=""
if [ "$TEST_ACCOUNTS" = "true" ]; then
TEST_ACCOUNTS_ARG="--test-accounts"
fi

SPONSORED_FPC=${SPONSORED_FPC:-false}
SPONSORED_FPC_ARG=""
if [ "$SPONSORED_FPC" = "true" ]; then
SPONSORED_FPC_ARG="--sponsored-fpc"
fi

ACCELERATED_TEST_DEPLOYMENTS_ARG=""
if [ "$ACCELERATED_TEST_DEPLOYMENTS" = "true" ]; then
ACCELERATED_TEST_DEPLOYMENTS_ARG="--accelerated-test-deployments"
fi

for attempt in $(seq 1 $MAX_RETRIES); do
# Construct base command
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"
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"

# Add account - use private key if set, otherwise use mnemonic
if [ -n "${L1_DEPLOYMENT_PRIVATE_KEY:-}" ]; then
Expand Down
21 changes: 20 additions & 1 deletion spartan/aztec-network/templates/setup-l2-contracts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,22 @@ spec:
done
echo "PXE service is ready!"
set -e
LOG_LEVEL=debug node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js setup-protocol-contracts --skipProofWait
export LOG_LEVEL=debug

TEST_ACCOUNTS=${TEST_ACCOUNTS:-false}
TEST_ACCOUNTS_ARG=""
if [ "$TEST_ACCOUNTS" = "true" ]; then
TEST_ACCOUNTS_ARG="--testAccounts"
fi

SPONSORED_FPC=${SPONSORED_FPC:-false}
SPONSORED_FPC_ARG=""
if [ "$SPONSORED_FPC" = "true" ]; then
SPONSORED_FPC_ARG="--sponsoredFPC"
fi

node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js setup-protocol-contracts --skipProofWait $TEST_ACCOUNTS_ARG $SPONSORED_FPC_ARG

echo "L2 contracts initialized"
env:
- name: K8S_POD_UID
Expand All @@ -80,6 +95,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: TEST_ACCOUNTS
value: "{{ .Values.aztec.testAccounts }}"
- name: SPONSORED_FPC
value: "{{ .Values.aztec.sponsoredFPC }}"
- name: TELEMETRY
value: "{{ .Values.telemetry.enabled }}"
- name: LOG_LEVEL
Expand Down
2 changes: 2 additions & 0 deletions spartan/aztec-network/values/rc-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ aztec:
epochDuration: 32
proofSubmissionWindow: 64
realProofs: true
testAccounts: true
sponsoredFPC: true

images:
aztec:
Expand Down