Skip to content

Commit

Permalink
chore: Add tf config for bot skip simulation (#8326)
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Sep 2, 2024
1 parent 365c079 commit 89c16c3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/devnet-deploys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ jobs:
min_txs_per_block: ${{ steps.set_network_vars.outputs.min_txs_per_block }}
bot_flush_setup_txs: ${{ steps.set_network_vars.outputs.bot_flush_setup_txs }}
bot_max_pending_txs: ${{ steps.set_network_vars.outputs.bot_max_pending_txs }}
bot_skip_simulation: ${{ steps.set_network_vars.outputs.bot_skip_simulation }}
bot_l2_gas_limit: ${{ steps.set_network_vars.outputs.bot_l2_gas_limit }}
bot_da_gas_limit: ${{ steps.set_network_vars.outputs.bot_da_gas_limit }}
bot_count: ${{ steps.set_network_vars.outputs.bot_count }}
steps:
- name: Set network vars
shell: bash
Expand Down Expand Up @@ -151,6 +155,10 @@ jobs:
echo "bot_follow_chain=PROVEN" >> $GITHUB_OUTPUT
echo "bot_flush_setup_txs=false" >> $GITHUB_OUTPUT
echo "bot_max_pending_txs=1" >> $GITHUB_OUTPUT
echo "bot_skip_simulation=false" >> $GITHUB_OUTPUT
echo "bot_l2_gas_limit=" >> $GITHUB_OUTPUT
echo "bot_da_gas_limit=" >> $GITHUB_OUTPUT
echo "bot_count=1" >> $GITHUB_OUTPUT
elif [ "$BRANCH_NAME" = "provernet" ]
then
echo "deploy_tag=provernet" >> $GITHUB_OUTPUT
Expand All @@ -173,14 +181,18 @@ jobs:
echo "bot_follow_chain=NONE" >> $GITHUB_OUTPUT
echo "bot_flush_setup_txs=true" >> $GITHUB_OUTPUT
echo "bot_max_pending_txs=32" >> $GITHUB_OUTPUT
echo "bot_skip_simulation=true" >> $GITHUB_OUTPUT
echo "bot_l2_gas_limit=1000000000" >> $GITHUB_OUTPUT
echo "bot_da_gas_limit=1000000000" >> $GITHUB_OUTPUT
echo "bot_count=4" >> $GITHUB_OUTPUT
elif [ "$BRANCH_NAME" = "alphanet" ]
then
echo "deploy_tag=alphanet" >> $GITHUB_OUTPUT
echo "branch_name=alphanet" >> $GITHUB_OUTPUT
echo "network_api_key=ALPHANET_API_KEY" >> $GITHUB_OUTPUT
echo "network_fork_admin_api_key=ALPHANET_API_KEY" >> $GITHUB_OUTPUT
echo "agents_per_prover=1" >> $GITHUB_OUTPUT
echo "bot_interval=30" >> $GITHUB_OUTPUT
echo "bot_interval=10" >> $GITHUB_OUTPUT
echo "node_tcp_range_start=40000" >> $GITHUB_OUTPUT
echo "node_udp_range_start=45000" >> $GITHUB_OUTPUT
echo "prover_node_tcp_range_start=41000" >> $GITHUB_OUTPUT
Expand All @@ -195,6 +207,10 @@ jobs:
echo "bot_follow_chain=PROVEN" >> $GITHUB_OUTPUT
echo "bot_flush_setup_txs=false" >> $GITHUB_OUTPUT
echo "bot_max_pending_txs=1" >> $GITHUB_OUTPUT
echo "bot_skip_simulation=true" >> $GITHUB_OUTPUT
echo "bot_l2_gas_limit=1000000000" >> $GITHUB_OUTPUT
echo "bot_da_gas_limit=1000000000" >> $GITHUB_OUTPUT
echo "bot_count=4" >> $GITHUB_OUTPUT
else
echo "Unrecognized Branch!!"
exit 1
Expand Down Expand Up @@ -400,6 +416,10 @@ jobs:
TF_VAR_BOT_NO_WAIT_FOR_TRANSFERS: ${{ needs.set-network.outputs.bot_no_wait }}
TF_VAR_SEQ_MIN_TX_PER_BLOCK: 1
TF_VAR_SEQ_MAX_TX_PER_BLOCK: ${{ needs.set-network.outputs.max_txs_per_block }}
TF_VAR_BOT_SKIP_PUBLIC_SIMULATION: ${{ needs.set-network.outputs.bot_skip_simulation }}
TF_VAR_BOT_L2_GAS_LIMIT: ${{ needs.set-network.outputs.bot_l2_gas_limit }}
TF_VAR_BOT_DA_GAS_LIMIT: ${{ needs.set-network.outputs.bot_da_gas_limit }}
TF_VAR_BOT_COUNT: ${{ needs.set-network.outputs.bot_count }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -618,6 +638,10 @@ jobs:
TF_VAR_BOT_FOLLOW_CHAIN: ${{ needs.set-network.outputs.bot_follow_chain }}
TF_VAR_PROVING_ENABLED: true
TF_VAR_BOT_NO_START: false
TF_VAR_BOT_SKIP_PUBLIC_SIMULATION: ${{ needs.set-network.outputs.bot_skip_simulation }}
TF_VAR_BOT_L2_GAS_LIMIT: ${{ needs.set-network.outputs.bot_l2_gas_limit }}
TF_VAR_BOT_DA_GAS_LIMIT: ${{ needs.set-network.outputs.bot_da_gas_limit }}
TF_VAR_BOT_COUNT: ${{ needs.set-network.outputs.bot_count }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions yarn-project/aztec/terraform/bot/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ resource "aws_ecs_task_definition" "aztec-bot" {
{ name = "NETWORK", value = var.DEPLOY_TAG },
{ name = "BOT_FLUSH_SETUP_TRANSACTIONS", value = tostring(var.BOT_FLUSH_SETUP_TRANSACTIONS) },
{ name = "BOT_MAX_PENDING_TXS", value = tostring(var.BOT_MAX_PENDING_TXS) },
{ name = "BOT_SKIP_PUBLIC_SIMULATION", value = tostring(var.BOT_SKIP_PUBLIC_SIMULATION) },
{ name = "BOT_L2_GAS_LIMIT", value = var.BOT_L2_GAS_LIMIT },
{ name = "BOT_DA_GAS_LIMIT", value = var.BOT_DA_GAS_LIMIT },
{ name = "LOG_JSON", value = "1" }
]
logConfiguration = {
Expand Down
15 changes: 15 additions & 0 deletions yarn-project/aztec/terraform/bot/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,18 @@ variable "BOT_MAX_PENDING_TXS" {
type = number
default = 1
}

variable "BOT_SKIP_PUBLIC_SIMULATION" {
type = bool
default = false
}

variable "BOT_L2_GAS_LIMIT" {
type = string
}

variable "BOT_DA_GAS_LIMIT" {
type = string
}


0 comments on commit 89c16c3

Please sign in to comment.