Skip to content

Add dashboard for Autobahn e2e - #4172

Merged
yzang2019 merged 11 commits into
giga-1from
yzang/add-dashboard-giga-1
Sep 15, 2026
Merged

yzang2019 merged 11 commits into
giga-1from
yzang/add-dashboard-giga-1

Conversation

@yzang2019

@yzang2019 yzang2019 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Port of #4167 onto giga-1. Adds an Autobahn E2E Grafana dashboard, main-loop phase metrics, and an AWS --topology flag.

Dashboard. Local and AWS clusters provision an Autobahn E2E Grafana board that shows executed TPS, blocks/sec, produce-to-execute finalize time, and the execute-goroutine split across consensus wait, EVM execution, and storage. Those last panels read sei_chain_autobahn_main_loop_phase_duration_seconds_total, recorded from the Autobahn execute path.

AWS topology. autobahn-e2e deploy --target aws takes --topology:

  • distributed (default): five EC2 hosts — one validator per instance, plus a load/monitoring host. Validators clone, compile, and initialize in parallel. Prometheus and Grafana come up on the load box; sei-load is left for you to start.
  • colocated: one EC2 host running the same four Docker validators used locally, plus monitoring.

The local Docker 4-in-1 path is unchanged. EVM JSON-RPC stays private and is reached through forward.

Defaults and access. AWS deploy uses Ubuntu 24.04 AMD64, r7i.12xlarge, and a 40m readiness timeout. SSH and Grafana (:3000) default to the caller's public IP. Use --grafana-cidr to widen Grafana (for example 0.0.0.0/0). Login remains admin / admin on these temporary test hosts.

This branch also includes the #4167 review fixes: genesis ships the merged persistent_peers.txt, sibling run-instances calls no longer cancel each other, and phase instruments attach to the existing sei_chain meter instead of installing a second MeterProvider.

Testing performed to validate your change

  • go test ./cmd/autobahn-e2e/ ./giga/metrics/
  • ./autobahn-e2e deploy --target aws --topology distributed — Grafana reachable from the SSH CIDR only; validators form a mesh
  • ./autobahn-e2e deploy --target aws --topology colocated — four Docker validators on one instance
  • Local ./autobahn-e2e deploy --target local still starts the 4-in-1 Docker cluster
  • Open Grafana Autobahn E2E and confirm the phase pie/stacked line populate after traffic

yzang2019 and others added 8 commits September 15, 2026 05:22
Bind Grafana to the SSH CIDR by default, ship the merged peer list with genesis, and record main-loop phases on the existing sei_chain meter.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 15, 2026, 1:15 PM

@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.15232% with 138 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (giga-1@f72d8d8). Learn more about missing BASE report.

Files with missing lines Patch % Lines
cmd/autobahn-e2e/aws.go 85.37% 37 Missing ⚠️
cmd/autobahn-e2e/list.go 23.68% 29 Missing ⚠️
cmd/autobahn-e2e/aws_remote.go 86.97% 25 Missing ⚠️
cmd/autobahn-e2e/state.go 63.82% 17 Missing ⚠️
cmd/autobahn-e2e/teardown.go 27.27% 16 Missing ⚠️
cmd/autobahn-e2e/deploy.go 41.17% 10 Missing ⚠️
cmd/autobahn-e2e/forward.go 77.77% 2 Missing ⚠️
giga/metrics/autobahn_loop.go 88.88% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             giga-1    #4172   +/-   ##
=========================================
  Coverage          ?   65.59%           
=========================================
  Files             ?     2083           
  Lines             ?   158064           
  Branches          ?        0           
=========================================
  Hits              ?   103689           
  Misses            ?    54234           
  Partials          ?      141           
Flag Coverage Δ
sei-chain-pr 80.21% <77.15%> (?)
sei-db 74.50% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cmd/autobahn-e2e/command.go 26.82% <100.00%> (ø)
giga/evmonly/giga_store.go 93.33% <100.00%> (ø)
sei-tendermint/internal/p2p/giga_router_common.go 78.35% <100.00%> (ø)
cmd/autobahn-e2e/forward.go 29.33% <77.77%> (ø)
giga/metrics/autobahn_loop.go 88.88% <88.88%> (ø)
cmd/autobahn-e2e/deploy.go 11.76% <41.17%> (ø)
cmd/autobahn-e2e/teardown.go 40.00% <27.27%> (ø)
cmd/autobahn-e2e/state.go 64.06% <63.82%> (ø)
cmd/autobahn-e2e/aws_remote.go 86.97% <86.97%> (ø)
cmd/autobahn-e2e/list.go 36.30% <23.68%> (ø)
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid, coherent port of the Autobahn E2E dashboard, distributed/colocated AWS topologies, and main-loop phase metrics; the metric name the dashboard queries lines up with the provider the node actually installs, and the phased deploy.sh preserves the existing local flow. No blockers — findings are a dead-but-hazardous SetupPrometheus, a README statement that contradicts the Grafana CIDR default, and a substring peer filter that this PR newly exposes to arbitrary AWS private IPs.

Findings: 0 blocking | 6 non-blocking | 3 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • [suggestion] No test asserts the metric name/labels the dashboard depends on. giga/metrics tests only check that SetPhase doesn't panic, so renaming timerName (or the sei_chain namespace in utils/metrics) silently blanks the two "Main loop — time spent" panels. A test that calls SetPhase twice, gathers prometheus.DefaultGatherer, and asserts a family named autobahn_main_loop_phase_duration_seconds_total with a phase label would pin the contract between the Go code and docker/monitornode/dashboards/autobahn-e2e-dashboard.json.
  • [suggestion] sei-load's own metrics are never scraped. Deploy's printed instructions and the README both run it with --metricsListenAddr 0.0.0.0:19698, but prometheusScrapeConfig emits only validator <private-ip>:26660 targets, so nothing collects that endpoint. Either add a scrape job for the load host or drop the flag from the instructions.
  • [suggestion] --grafana-cidr 0.0.0.0/0 publishes Grafana with the hardcoded admin/admin credentials from docker-compose.aws-load.yml (GF_SECURITY_ADMIN_PASSWORD=admin). The default (SSH CIDR) is right and the README does warn to tear the cluster down, but since this is the first port the tool opens beyond SSH, consider also setting GF_AUTH_ANONYMOUS_ENABLED=false explicitly and/or generating a random admin password into the printed URL line.
  • 3 suggestion(s)/nit(s) flagged inline on specific lines.

)

// SetupPrometheus installs a Prometheus MeterProvider on the default registerer.
func SetupPrometheus() error {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] SetupPrometheus has no production caller — only autobahn_loop_test.go — and it conflicts with the provider the node actually uses. app/app.go:511 calls utils/metrics.SetupOtelMetricsProvider, which installs a Prometheus exporter with WithNamespace("sei_chain") and chain_id as a constant label; that namespace is exactly what makes the dashboard's sei_chain_autobahn_main_loop_phase_duration_seconds_total resolve. This function installs a provider with no namespace, and otel.SetMeterProvider is last-write-wins, so any future caller ordered after NewSeiApp would rename the series to autobahn_main_loop_phase_duration_seconds_total and strip chain_id from every OTel series in the process — the dashboard panels go blank with no error anywhere.

Suggest deleting SetupPrometheus (and the now-unneeded client_golang/prometheus, otlptranslator, otelprometheus, sdkmetric imports) so app.go remains the single choke point that owns the meter provider. MainLoop()'s lazy otel.Meter already delegates correctly through the global provider, so nothing else has to change.

compile, and initialize in parallel. The load instance is brought up
afterward with Prometheus and Grafana; `sei-load` is left for you to
start. The security group admits SSH from the caller, Grafana (`:3000`)
from the internet, and all TCP between the five instances.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] This contradicts the code and line 151 of this same file. resolveGrafanaCIDR defaults --grafana-cidr to the resolved --ssh-cidr, so Grafana is admitted from the caller's IP, not from the internet — the internet case only happens if you pass --grafana-cidr 0.0.0.0/0. Suggest "SSH and Grafana (:3000) from the caller (widen Grafana with --grafana-cidr), and all TCP between the five instances."

# Override up persistent peers
NODE_IP=$(hostname -i | awk '{print $1}')
if [ -n "$ADVERTISE_IP" ]; then
NODE_IP="$ADVERTISE_IP"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] Now that NODE_IP can be an arbitrary AWS private address, the grep -v "$NODE_IP" on line 46 is a substring match over the whole <nodeid>@<ip>:<port> line, so a validator can silently drop a legitimate peer: with NODE_IP=172.31.1.1, the entry for 172.31.1.10:26656 also matches and is filtered out. In the local 4-in-1 cluster the fixed 192.168.10.1{0,1,2,3} addresses made this unreachable; on AWS-assigned IPs it is a plausible collision. Anchoring the match fixes it, e.g. grep -v "@$NODE_IP:" (P2P_PORT is not defined in this script, so either use that form or define it to 26656 as step1_configure_init.sh does).

@cursor

cursor Bot commented Sep 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large changes to AWS provisioning, security groups, and multi-host genesis orchestration; core Autobahn execution paths now emit new metrics via a Prometheus MeterProvider setup.

Overview
Adds Autobahn E2E observability and expands AWS deploy beyond a single colocated EC2 host.

Grafana & metrics. Local/AWS monitoring now provisions an Autobahn E2E dashboard (TPS, blocks/sec, finalize latency, main-loop phase split). New giga/metrics phase instrumentation (consensus / execution / storage) is hooked into the Autobahn execute path (EVM store + tendermint giga router). Prometheus/Grafana compose and monitornode scripts gain Autobahn scrape targets, a pinned datasource UID, and optional network attach/reload for local Prometheus.

AWS --topology. autobahn-e2e deploy --target aws accepts distributed (default: four validator EC2s + one load/monitoring host) or colocated (one host, same four-container Docker stack as local). Distributed mode launches validators and load in parallel, merges init artifacts via SCP, runs phased genesis on validator 0, distributes genesis, starts one validator per host with private ADVERTISE_IP, and brings up Prometheus/Grafana on the load box (with generated sei-load.aws.json; load generator left manual). Security groups add Grafana :3000 (--grafana-cidr) and intra-group TCP for distributed meshes. Defaults shift to Ubuntu AMD64, r7i.12xlarge, large gp3 volumes/IOPS flags, and a 40m timeout. list/forward/teardown are multi-host aware.

Docker/Makefile. New docker-aws-validator-* and docker-aws-load-* targets and compose files; deploy.sh supports AUTOBAHN_E2E_PHASE (init/genesis/start). DOCKER_PLATFORM detection includes aarch64.

Reviewed by Cursor Bugbot for commit 2e7c4aa. Bugbot is set up for automated code reviews on this repo. Configure here.

}

for n := next; ; n += 1 {
gigametrics.SetPhase(gigametrics.PhaseConsensus)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine adding this in for now, but this will mostly be wait time, not really CPU.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to add more proper metrics for consensus

@yzang2019
yzang2019 enabled auto-merge (squash) September 15, 2026 13:10
@yzang2019
yzang2019 merged commit 0484ca1 into giga-1 Sep 15, 2026
64 of 66 checks passed
@yzang2019
yzang2019 deleted the yzang/add-dashboard-giga-1 branch September 15, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants