-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sequencer selection in k8s tests (#8313)
Update the k8s e2e tests to use proper validators.
- Loading branch information
1 parent
e8a097c
commit 8d9947d
Showing
17 changed files
with
397 additions
and
62 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
helm-charts/aztec-network/files/config/config-prover-env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
alias aztec='node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js' | ||
|
||
# Pass the bootnode url as an argument | ||
# Ask the bootnode for l1 contract addresses | ||
output=$(aztec get-node-info -u $1) | ||
|
||
echo "$output" | ||
|
||
boot_node_enr=$(echo "$output" | grep -oP 'Node ENR: \Kenr:[a-zA-Z0-9\-\_\.]+') | ||
rollup_address=$(echo "$output" | grep -oP 'Rollup Address: \K0x[a-fA-F0-9]{40}') | ||
registry_address=$(echo "$output" | grep -oP 'Registry Address: \K0x[a-fA-F0-9]{40}') | ||
inbox_address=$(echo "$output" | grep -oP 'L1 -> L2 Inbox Address: \K0x[a-fA-F0-9]{40}') | ||
outbox_address=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}') | ||
availability_oracle_address=$(echo "$output" | grep -oP 'Availability Oracle Address: \K0x[a-fA-F0-9]{40}') | ||
fee_juice_address=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}') | ||
fee_juice_portal_address=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}') | ||
|
||
|
||
# Write the addresses to a file in the shared volume | ||
cat <<EOF > /shared/contracts.env | ||
export BOOTSTRAP_NODES=$boot_node_enr | ||
export ROLLUP_CONTRACT_ADDRESS=$rollup_address | ||
export REGISTRY_CONTRACT_ADDRESS=$registry_address | ||
export INBOX_CONTRACT_ADDRESS=$inbox_address | ||
export OUTBOX_CONTRACT_ADDRESS=$outbox_address | ||
export AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$availability_oracle_address | ||
export FEE_JUICE_CONTRACT_ADDRESS=$fee_juice_address | ||
export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$fee_juice_portal_address | ||
EOF | ||
|
||
cat /shared/contracts.env |
48 changes: 48 additions & 0 deletions
48
helm-charts/aztec-network/files/config/config-validator-env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
alias aztec='node --no-warnings /usr/src/yarn-project/aztec/dest/bin/index.js' | ||
|
||
# Pass the bootnode url as an argument | ||
# Ask the bootnode for l1 contract addresses | ||
output=$(aztec get-node-info -u $1) | ||
|
||
echo "$output" | ||
|
||
boot_node_enr=$(echo "$output" | grep -oP 'Node ENR: \Kenr:[a-zA-Z0-9\-\_\.]+') | ||
rollup_address=$(echo "$output" | grep -oP 'Rollup Address: \K0x[a-fA-F0-9]{40}') | ||
registry_address=$(echo "$output" | grep -oP 'Registry Address: \K0x[a-fA-F0-9]{40}') | ||
inbox_address=$(echo "$output" | grep -oP 'L1 -> L2 Inbox Address: \K0x[a-fA-F0-9]{40}') | ||
outbox_address=$(echo "$output" | grep -oP 'L2 -> L1 Outbox Address: \K0x[a-fA-F0-9]{40}') | ||
availability_oracle_address=$(echo "$output" | grep -oP 'Availability Oracle Address: \K0x[a-fA-F0-9]{40}') | ||
fee_juice_address=$(echo "$output" | grep -oP 'Fee Juice Address: \K0x[a-fA-F0-9]{40}') | ||
fee_juice_portal_address=$(echo "$output" | grep -oP 'Fee Juice Portal Address: \K0x[a-fA-F0-9]{40}') | ||
|
||
# Generate a private key for the validator | ||
json_account=$(aztec generate-l1-account) | ||
|
||
echo "$json_account" | ||
address=$(echo $json_account | jq -r '.address') | ||
private_key=$(echo $json_account | jq -r '.privateKey') | ||
|
||
aztec add-l1-validator --validator $address --rollup $rollup_address | ||
|
||
aztec fast-forward-epochs --rollup $rollup_address --count 1 | ||
|
||
|
||
# Write the addresses to a file in the shared volume | ||
cat <<EOF > /shared/contracts.env | ||
export BOOTSTRAP_NODES=$boot_node_enr | ||
export ROLLUP_CONTRACT_ADDRESS=$rollup_address | ||
export REGISTRY_CONTRACT_ADDRESS=$registry_address | ||
export INBOX_CONTRACT_ADDRESS=$inbox_address | ||
export OUTBOX_CONTRACT_ADDRESS=$outbox_address | ||
export AVAILABILITY_ORACLE_CONTRACT_ADDRESS=$availability_oracle_address | ||
export FEE_JUICE_CONTRACT_ADDRESS=$fee_juice_address | ||
export FEE_JUICE_PORTAL_CONTRACT_ADDRESS=$fee_juice_portal_address | ||
export VALIDATOR_PRIVATE_KEY=$private_key | ||
export L1_PRIVATE_KEY=$private_key | ||
export SEQ_PUBLISHER_PRIVATE_KEY=$private_key | ||
EOF | ||
|
||
cat /shared/contracts.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 0 additions & 38 deletions
38
helm-charts/aztec-network/templates/configure-validator-env.config-map.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
validator: | ||
debug: "aztec:*,-aztec:avm_simulator:*,-aztec:libp2p_service" | ||
replicas: 3 | ||
validator: | ||
disabled: false | ||
|
||
bootNode: | ||
validator: | ||
disabled: false | ||
disabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.