Skip to content

fix(rpc): keep public node RPC loopback-only - #10

Closed
Lesnak1 wants to merge 1 commit into
orbinum:mainfrom
Lesnak1:fix/rpc-loopback-binding
Closed

Lesnak1 wants to merge 1 commit into
orbinum:mainfrom
Lesnak1:fix/rpc-loopback-binding

Conversation

@Lesnak1

@Lesnak1 Lesnak1 commented Oct 11, 2026

Copy link
Copy Markdown

Summary

  • Remove --rpc-external from the mainnet and testnet public RPC services so the node RPC stays on loopback and public HTTPS/WSS traffic continues through Caddy.
  • Explain the bind behavior and retain the firewall deny rule as defense in depth.
  • Add a regression test for both Compose services and run it in lint CI.

Validation

  • python -m unittest discover --start-directory tests --verbose — 1 test passed locally.
  • git diff --check — clean.

Related to #9 (finding 3).

@nol4lej

nol4lej commented Oct 12, 2026

Copy link
Copy Markdown
Member

Thanks for this, and for the regression test. The concern is right, but we can't merge it as is. On testnet, the relayer reads rpc-1's RPC over the private network (ws://10.0.0.10:9944), so a loopback-only bind would cut it off.

We addressed it in instead:

  • the bind address is an explicit RPC_BIND: loopback by default on mainnet, all interfaces on testnet for the relayer, firewalled;
  • both public endpoints serve only safe methods (--experimental-rpc-endpoint …,methods=safe). That also closes something worse we found along the way: the binary forces --rpc-methods Unsafe, so the --rpc-methods Safe this PR keeps was a no-op;
  • a CI check covers the bind, method and connection-cap rules.

Closing in favour of that one. Thanks again for the contribution!

@nol4lej nol4lej closed this Oct 12, 2026
@Lesnak1

Lesnak1 commented Oct 12, 2026

Copy link
Copy Markdown
Author

Thanks for the detailed explanation @nol4lej ! Glad the report and regression test helped uncover the --rpc-methods Unsafe issue and inspired the broader RPC_BIND fix in #11.

Since the diagnosis directly led to the hardening, would you mind adding a Co-authored-by: Lesnak1 Lesnak1@users.noreply.github.com trailer to the commit, or mentioning the contribution in the release notes? Would love to stay engaged as the testnet runs!

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