Skip to content

Advertise each Autobahn validator's EVM WebSocket URL - #621

Merged
yzang2019 merged 3 commits into
mainfrom
yzang/autobahn-evmrpc-websocket
Oct 22, 2026
Merged

yzang2019 merged 3 commits into
mainfrom
yzang/autobahn-evmrpc-websocket

Conversation

@yzang2019

@yzang2019 yzang2019 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

sei-chain main (d704c775d, sei-protocol/sei-chain#4583) requires every committee member's evmrpc URL in autobahn.json to be ws:// or wss://. A validator exits at startup with:

load Autobahn committee: loading autobahn config from ".../autobahn.json": scheme "http", want ws or wss

The genesis ceremony still advertises http://<node>-0.<node>.<ns>.svc.cluster.local:8545, so an Autobahn SeiNetwork on a current main image never produces a block. Every validator crash-loops.

This PR:

  • Advertises the WebSocket URL. autobahnEVMRPCURLFor advertises ws://<node>-0.<node>.<ns>.svc.cluster.local:8546, which is what gen-autobahn-config and main's localnet (docker/localnode/scripts/step1_configure_init.sh) now write. checkHTTPURL becomes checkRPCURL and accepts ws/wss, like the provider's utils.CheckRPCURL.
  • Opens the listener behind that URL. The consensus overlay now sets app.toml evm.ws_enabled = true on every Autobahn node. A configValues entry for that key is rejected like the other controller-owned engine keys.
  • Updates spec 008 to match both.

Production chains are unaffected. The ceremony and the overlay change only apply to spec.consensus.engine: Autobahn. The public HTTP JSON-RPC on 8545, readiness probes and .status endpoints are unchanged.

Why both parts are needed

Validators dial each other's advertised URL to proxy transactions to a shard's owner (enable_evm_proxy defaults to true). The process behind 8546 depends on the seid version:

seid Accepts in evmrpc Serves 8546 from Needs evm.ws_enabled
v6.7.1 / v6.7.2 (released) any scheme the Cosmos EVM WebSocket server (app.go: if app.evmRPCConfig.WSEnabled) yes. sei-config's validator overrides close it, so without this overlay key nothing listens
main since #4583 ws/wss only the giga EVM-only JSON-RPC (evmonlyrpc.Start(..., evm_rpc_port, evm_ws_port, ...)). Cosmos EVM servers are skipped under Autobahn (#4316) no. Ignored, harmless

So with this change, Autobahn networks work on the released v6.7.x images and on current main. Thanks to the review for catching that the listener was missing on v6.7.x.

Compatibility

The URL change still drops one range of seid builds: unreleased main builds between sei-chain #4316 and #4583. They reject anything but http/https in evmrpc. No release contains that check, but an Autobahn network created from one of those dev images would fail at startup after this merges. If those images still need to run on Harbor, a per-network scheme switch (for example on spec.consensus.autobahn) would keep them working.

Test plan

  • go test ./tasks/ in sidecar/, with cases asserting that http is rejected and wss accepted.
  • go test ./internal/... ./api/... in the root module. The overlay tests cover evm.ws_enabled on Default-engine and EVM-only Autobahn nodes, and that a configValues override is rejected.
  • gofmt and go vet on the touched packages.
  • Spin up an Autobahn EVM-only SeiNetwork on a sei-chain main image (3f2dd73a or later) and confirm the validators reach the first block.
  • Drive EVM load (for example sei-load) at every validator, so most transactions are proxied over the advertised ws://…:8546. Confirm their receipts.
  • Repeat on a v6.7.x image to cover the Cosmos WebSocket path.

sei-chain #4583 (d704c775d) requires every committee member's evmrpc in autobahn.json to be ws or wss, and seid exits at startup with scheme "http", want ws or wss otherwise. The ceremony now advertises ws://<node>-0.<node>.<ns>.svc.cluster.local:8546 and validates ws/wss, as gen-autobahn-config and the provider's localnet now do.

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

cursor Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Changes Autobahn genesis artifacts and required seid config in ways that only match post–#4583 seid; pairing with older Autobahn images fails the same way in reverse.

Overview
Aligns Autobahn genesis ceremony and controller config with sei-chain’s requirement that each validator’s evmrpc entry in autobahn.json use ws:// or wss:// (not http://…:8545), which otherwise causes validators to exit at startup.

The sidecar now builds identity manifests and autobahn.json with ws://<pod>:8546 (EVM WebSocket for validator-to-validator tx proxying), and validation follows the provider’s ws/wss rules via checkRPCURL. Spec 008 is updated to match.

For every Autobahn node (including non–EVM-only), the consensus overlay sets app.toml [evm] ws_enabled = true so the advertised listener is actually open; EVM-only overlays still set HTTP and disable Cosmos RPC surfaces, now with WebSocket enabled as well. User configValues cannot override evm.ws_enabled.

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

seidroid[bot]
seidroid Bot previously requested changes Oct 22, 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.

This switches the Autobahn ceremony's advertised per-validator EVM-RPC URL from http://…:8545 to ws://…:8546, and changes the sidecar check to accept only ws/wss, to match sei-chain #4583. It is blocked because nothing in the controller opens the EVM WebSocket listener on validators, so the scheme check passes but the advertised endpoint has nothing listening. The codex reading, which found nothing, was dropped because this finding holds on the code.

Blocking

1 finding on the changed lines, as inline comments.

  • The change contradicts spec 008's own statement (docs/specs/008-autobahn-evm-only-consensus/spec.md, around line 304) that on an EVM-only network 8546 does not bind and the EVM-only JSON-RPC subset serves no WebSocket. Either seid on current main now serves WS in EVM-only mode, in which case that paragraph and the listener config both need updating, or the new URL points at a surface the EVM-only executor does not provide. The PR's unchecked test plan item (reaching the first block on a main image) would not exercise proxying either way.

Non-blocking

  • This is a hard cut with no version gate. Once it merges, any Autobahn SeiNetwork that runs a seid image older than sei-chain #4583 fails validation at startup. The description acknowledges this. A per-network switch, or deriving the scheme from the seid image, would keep older Harbor images usable.

seidroid review · decision request_changes · session fdc1783b87724893b1057a84c25db131 · turn resp_claude_7b14f90c0ae1d16e20f05ae7acd4e13c · item 9323518edc0b58c4852d202fbdb598f0

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

Comment thread sidecar/tasks/autobahn.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.

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 6a32ee3. Configure here.

Comment thread sidecar/tasks/autobahn.go
Spec 008 said an EVM-only network serves no WebSocket. seid's EVM-only RPC binds evm_ws_port (8546) alongside evm_rpc_port whenever Autobahn is configured, and validators dial it to proxy transactions.

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

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

Since the last review, only the spec 008 paragraph changed: it now says the EVM-only RPC serves WebSocket on 8546 under Autobahn. I checked the author's reply against sei-chain main (3f2dd73a): node.go starts evmonlyrpc.Start(..., evmOnlyRPCPort, evmOnlyWSPort, ...) whenever autobahn-config-file is set, and app.go gates the Cosmos HTTP/WS servers on !autobahnEnabled, so ws_enabled does not apply, and both my closed-listener blocker and the spec contradiction are resolved; codex reported nothing and so contributed nothing.

Non-blocking

  • This is still a hard cut with no version gate. An Autobahn SeiNetwork that runs a seid image older than sei-chain #4583 fails validation at startup after this merges. The description acknowledges this; a per-network switch would keep older Harbor images usable.

Pre-existing

Already true on the base branch, not introduced here.

  • suggestion — spec.executionEngine.evmOnly.httpEnabled is a no-op on Autobahn nodes. consensusOverlay renders it as [evm] http_enabled, and seid ignores that key under Autobahn, so httpEnabled: false still serves 8545/8546. The field's doc and the P2P readiness fallback (noderesource.go around line 1190) describe behaviour seid does not have. Worth fixing in a follow-up.

seidroid review · decision approve · session fdc1783b87724893b1057a84c25db131 · turn resp_claude_9ebb483188df8e4d5b1dcb0962ec21a5 · item 5bd78f9090535d64bbf0a7f20374c1f6

Findings: 0 blocking | 1 non-blocking | 0 posted inline | 1 pre-existing

@seidroid
seidroid Bot dismissed their stale review October 22, 2026 19:34

Superseded: the latest review found nothing blocking in this change.

The ceremony advertises each validator's ws://…:8546 for proxying transactions to a shard's owner. Released seid (v6.7.x) serves 8546 from the Cosmos EVM WebSocket server, which the validator-mode base config closes, so the consensus overlay now sets evm.ws_enabled on every Autobahn node. seid from sei-chain #4316 on serves 8546 from its EVM-only JSON-RPC and ignores the key.

Co-authored-by: Cursor <cursoragent@cursor.com>
@yzang2019
yzang2019 merged commit 5fd7f46 into main Oct 22, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants