Skip to content

Add dashboard and topology option for Autobahn e2e - #4167

Open
yzang2019 wants to merge 10 commits into
mainfrom
yzang/add-dashboard
Open

yzang2019 wants to merge 10 commits into
mainfrom
yzang/add-dashboard

Conversation

@yzang2019

@yzang2019 yzang2019 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

This PR added monitoring dashboard for the autobahn-e2e benchmark tool. It also added a flag to allow deploying to AWS in colocated mode or distributed mode.

Testing performed to validate your change

@cursor

cursor Bot commented Sep 15, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large AWS provisioning and multi-host genesis orchestration surface area (security groups, SCP, remote make), plus new metrics hooks on the Autobahn execution path; mostly test/ops tooling rather than production consensus defaults.

Overview
Extends autobahn-e2e AWS deploy beyond a single EC2 host: --topology distributed (default) launches four validator instances plus a load/monitoring host, orchestrates phased init/genesis/start via new Makefile targets and compose files, merges genesis artifacts over SSH/SCP, and exposes Grafana on :3000 with optional --grafana-cidr. --topology colocated keeps one instance running the existing four-container stack with monitoring.

Deploy defaults shift to Ubuntu AMD64, larger gp3 volumes with configurable IOPS/throughput, and a longer readiness timeout. list, forward, and teardown understand per-validator hosts and print/use the Grafana URL.

Adds an Autobahn E2E Grafana dashboard and Prometheus scrape wiring (local monitoring compose, AWS load host, monitornode scripts). giga/metrics records consensus / execution / storage phases on the Autobahn execute loop and in the EVM-only giga store for dashboard panels.

Localnode deploy.sh supports AUTOBAHN_E2E_PHASE and ADVERTISE_IP so one validator can run per AWS machine without shared build/ coordination races.

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

@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, 12:40 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.
✅ Project coverage is 65.60%. Comparing base (f0cd46c) to head (20ee39f).

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             @@
##             main    #4167      +/-   ##
==========================================
- Coverage   66.69%   65.60%   -1.09%     
==========================================
  Files        2202     2083     -119     
  Lines      169510   158064   -11446     
==========================================
- Hits       113047   103691    -9356     
+ Misses      56322    54232    -2090     
  Partials      141      141              
Flag Coverage Δ
sei-chain-pr 80.25% <77.15%> (?)
sei-db 74.50% <ø> (-0.25%) ⬇️
sei-db-state-db ?

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%> (+5.77%) ⬆️
giga/evmonly/giga_store.go 93.33% <100.00%> (+0.22%) ⬆️
sei-tendermint/internal/p2p/giga_router_common.go 78.35% <100.00%> (+0.15%) ⬆️
cmd/autobahn-e2e/forward.go 29.33% <77.77%> (+3.24%) ⬆️
giga/metrics/autobahn_loop.go 88.88% <88.88%> (ø)
cmd/autobahn-e2e/deploy.go 11.76% <41.17%> (+5.16%) ⬆️
cmd/autobahn-e2e/teardown.go 40.00% <27.27%> (-3.14%) ⬇️
cmd/autobahn-e2e/state.go 64.06% <63.82%> (-0.14%) ⬇️
cmd/autobahn-e2e/aws_remote.go 86.97% <86.97%> (ø)
cmd/autobahn-e2e/list.go 36.30% <23.68%> (-1.20%) ⬇️
... and 1 more

... and 124 files with indirect coverage changes

🚀 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.

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread docker/monitornode/dashboards/autobahn-e2e-dashboard.json Outdated
seidroid[bot]
seidroid Bot previously requested changes Sep 15, 2026

@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.

Adds an Autobahn e2e Grafana dashboard, main-loop phase metrics, and larger x86 AWS defaults. The metric names, labels and datasource uid all line up with the existing monitornode conventions, but the AWS deploy now opens Grafana to the whole internet with hardcoded admin/admin, which also makes the cluster's "private" EVM JSON-RPC reachable through Grafana's datasource proxy.

Findings: 1 blocking | 2 non-blocking | 3 posted inline

Blockers

  • None at the file/PR level.
  • 1 blocking issue(s) flagged inline on specific lines.

Non-blocking

  • None at the file/PR level.
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread cmd/autobahn-e2e/aws.go Outdated
Comment thread sei-tendermint/node/setup.go Outdated
Comment thread giga/evmonly/giga_store.go Outdated

@cursor cursor 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.

Stale Bugbot comment from a previous run.

Comment thread cmd/autobahn-e2e/aws_remote.go

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ed51e2b. Configure here.

Comment thread cmd/autobahn-e2e/aws.go
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>
@yzang2019

Copy link
Copy Markdown
Contributor Author

@seidroid review

@yzang2019 yzang2019 mentioned this pull request Sep 15, 2026
5 tasks
@yzang2019 yzang2019 changed the title Add dashboard for Autobahn e2e Add dashboard and topology option for Autobahn e2e Sep 15, 2026

@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.

The three findings from the previous review are genuinely fixed: Grafana ingress now defaults to the SSH CIDR with an opt-in --grafana-cidr, the second global MeterProvider is no longer installed during storage-manager setup, and phase transitions are serialized behind gigametrics.SetPhase. Two non-blocking items remain — SetupPrometheus is now dead code that would re-break the metric namespace if anyone called it, and one README bullet still describes the old wide-open Grafana rule.

Findings: 0 blocking | 2 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • None at the file/PR level.
  • 2 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 — the only references in the tree are TestSetupPrometheusIsIdempotent and TestSetPhaseIsSafeForConcurrentCallers in this package's own test file. It is dead code whose one effect is to call otel.SetMeterProvider with a provider that has no namespace and no chain_id, i.e. exactly the state the previous round removed from openEVMOnlyStorageManager.

That matters because the new dashboard queries sei_chain_autobahn_main_loop_phase_duration_seconds_total, a name that only exists while the app-level provider from utilmetrics.SetupOtelMetricsProvider (app/app.go:511) is the global one. A future caller wiring up SetupPrometheus would silently move every lazily-created instrument off that provider and blank the panels, with nothing here saying so. The idempotency test reads as coverage for a function that is actually unreachable.

Deleting it (along with the otelprometheus/sdkmetric/prometheus imports) leaves SetPhase as the package's only entry point. MainLoop() at line 52 is then only reachable from SetPhase and the test, so it can be unexported too — which also removes the last handle through which a caller could mutate the shared timer outside loopMu.

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 bullet still describes the pre-fix behavior: Grafana is no longer opened to the internet. resolveGrafanaCIDR (cmd/autobahn-e2e/aws.go) defaults the :3000 rule to sshCIDR, and line 177 of this same file already says so correctly ("admits SSH and Grafana from the public IP detected at deployment time"). Suggest "admits SSH and Grafana (:3000) from the caller, and all TCP between the five instances", leaving the --grafana-cidr opt-in described where it already is.

@seidroid
seidroid Bot dismissed their stale review September 15, 2026 12:28

Superseded: latest AI review found no blocking issues.

yzang2019 added a commit that referenced this pull request Sep 15, 2026
## 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

- [x] `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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@wen-coding

Copy link
Copy Markdown
Contributor

Is this the same as the one we are using on giga-1?

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.

3 participants