Skip to content

Commit

Permalink
Fixed loadtest configuration (#84)
Browse files Browse the repository at this point in the history
Fixed configuring TCP ports.
Removed builder methods from the config, because the defaults were the
cause of a malformed config in the first place.
Moved rpc_addr (renamed to debug_addr) to config, and removed the
default port logic - opening a port which was not predeclared on the gcp
VM spec made the whole container crash.
Added support for disabling the test rpc server if not needed.
Increased disk size for the loadtest CI to fit 3h worth of finalized
blocks.

Simplified CLI api of `tool/src/main.rs`: embedded the secrets into the
config json.

Some kubernetes/docker-related scripts probably need an update.

---------

Co-authored-by: Bruno França <[email protected]>
  • Loading branch information
pompon0 and brunoffranca authored Apr 5, 2024
1 parent a7f3ca1 commit dda1323
Show file tree
Hide file tree
Showing 16 changed files with 270 additions and 382 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/load_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ on:
required: false
type: number
default: 100
validators:
description: "Amount of validator nodes to launch (<= nodes)"
required: false
type: number
default: 100
peers:
description: "Amount of gossipnet peers each node should have"
required: false
type: number
default: 2
node_port:
description: "Executor port number"
required: false
Expand All @@ -21,6 +31,8 @@ on:

env:
NUM_INSTANCES: ${{ github.event.inputs.num_instances || '100' }}
VALIDATORS: ${{ github.event.inputs.validators || github.event.inputs.num_instances || '100' }}
PEERS: ${{ github.event.inputs.peers || '2' }}
NODE_PORT: ${{ github.event.inputs.node_port || '8080' }}
METRICS_PORT: ${{ github.event.inputs.metrics_port || '8081' }}
VM_AUTH_USERNAME: ${{ secrets.VM_AUTH_USERNAME }}
Expand Down Expand Up @@ -121,6 +133,8 @@ jobs:
cargo run -p zksync_consensus_tools \
--bin localnet_config -- \
--input-addrs ips_prts.txt \
--validator-count ${{ env.VALIDATORS }} \
--peer-count ${{ env.PEERS }} \
--metrics-server-port ${{ env.METRICS_PORT }} \
--output-dir artifacts/node_configs
Expand Down
1 change: 1 addition & 0 deletions infrastructure/loadtests/compute.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ resource "google_compute_instance" "zksync_bft_node" {
boot_disk {
initialize_params {
image = data.google_compute_image.ubuntu.self_link
size = 30
}
}

Expand Down
Loading

0 comments on commit dda1323

Please sign in to comment.