-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: sequencer selection in k8s tests #8313
Changes from all commits
0db5236
b7b653b
a18527f
a31fdbb
e0b319c
55680c2
c75737a
6c76471
dabfa02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
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 was deleted.
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the benefit of having the validators if the validator part is disabled? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is But yeah we could/should hardcode this to |
||
|
||
bootNode: | ||
validator: | ||
disabled: false | ||
disabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What issues did you run into leading to bumping this? Just remember that some of the issues we had was that the never handled memory extensions differently which made some of our tests blow up anvil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't letting me do the public deploys of our L2 contracts, even though I had set the block gas limit to 1e9.