Skip to content

docs: route role onboarding through decdn_chain; whoami and IPv4-only notes - #77

Merged
alpergundogdu merged 3 commits into
mainfrom
docs/runbook-setup-rpc-url
Sep 24, 2026
Merged

alpergundogdu merged 3 commits into
mainfrom
docs/runbook-setup-rpc-url

Conversation

@alpergundogdu

@alpergundogdu alpergundogdu commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

decdn setup failed on a real node with Error: rpc_url not set (pass --rpc-url or set blockchain.rpc_url). The on-chain CLI commands resolve rpc_url only from --rpc-url or from blockchain.rpc_url in node.toml (decdn/crates/cli/src/commands/chain_ctx.rs). CommonChainArgs.rpc_url has no env =. The role writes the URL to /etc/decdn/decdn.env, so loading that file with EnvironmentFile= has no effect on these commands.

Already on main: #69 removed ansible/docs/launch-runbook.md, which had the broken command. docs/lifecycle.md § Running on-chain commands now has a decdn_chain helper using the working form (/bin/sh -c 'exec decdn … --rpc-url "$DECDN_RPC_URL"') and notes the ps exposure. This PR fixes what's left:

  • ansible/roles/decdn_node/README.md § On-chain onboarding: the examples still called decdn setup / node bond / node register directly. They now go through decdn_chain. The section also says the URL shows up in argv while the command runs.
  • docs/lifecycle.md:
    • Names the upstream fix: add env = "DECDN_RPC_URL" to CommonChainArgs.rpc_url. Then EnvironmentFile= alone is enough and the URL stays out of argv.
    • Adds a whoami command, run as decdn, that prints the wallet address to fund. keystore.json has no plaintext address field. whoami takes no --rpc-url, so it doesn't go through the helper.
    • Multiaddrs: register /ip4/, plus /ip6/ on dual-stack hosts running a build with fix(node): bind IPv6 on the configured QUIC port decdn#2144 (869141e9), which binds QUIC on [::]:4433 too. Older builds stay /ip4/-only. To add /ip6/ after an upgrade, use update-multiaddrs with both addresses (it replaces the on-chain set). Same note in the role README.
  • docs/requirements.md: the IPv6 line now says when it applies. Since fix(node): bind IPv6 on the configured QUIC port decdn#2144 the listener binds both 0.0.0.0:4433 and [::]:4433, and it falls back to IPv4-only on hosts without IPv6. Older builds bind IPv6 on a random port, so they are IPv4-only on 4433. (An earlier revision of this PR said IPv4-only unconditionally. #2144 merged in the meantime.)

Docs only. sudo stays generic (sudo-rs hosts may need sudo.ws for systemd-run --pty).

Test plan

  • markdownlint-cli2 clean on the changed files
  • The systemd-run … /bin/sh -c 'exec decdn … --rpc-url "$DECDN_RPC_URL" …' --dry-run form was confirmed on a real Ubuntu 26.04 node, per the issue report

🤖 Generated with Claude Code

… notes

The decdn_node role README still showed bare `decdn setup` / `node bond` /
`node register`, which fail on a role-deployed node with "rpc_url not set":
on-chain CLI commands resolve rpc_url only from --rpc-url or
blockchain.rpc_url, and the role keeps the URL in /etc/decdn/decdn.env.
Use the decdn_chain helper from docs/lifecycle.md there, and state the
argv-exposure tradeoff it carries.

- lifecycle.md: name the upstream fix (env = "DECDN_RPC_URL" on
  CommonChainArgs.rpc_url), add a whoami command for the wallet address
  (keystore.json has no plaintext address), and say to register /ip4/ only.
- requirements.md: the QUIC listener binds 0.0.0.0:4433, so "IPv6:
  supported" was misleading for the node itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 24, 2026 09:29

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

The role README currently uses an inline code span that contains a newline, which can render incorrectly on GitHub and should be reformatted for reliable documentation display.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

This PR updates operator documentation to ensure on-chain onboarding commands work with the current decdn CLI behavior by routing RPC URL usage through the decdn_chain helper, and clarifies network constraints (IPv4-only QUIC binding) plus a whoami workflow for obtaining the funding address.

Changes:

  • Update onboarding examples to use decdn_chain so --rpc-url is correctly supplied from /etc/decdn/decdn.env.
  • Expand lifecycle guidance with an upstream fix note (env = "DECDN_RPC_URL"), an /ip4/-only registration note, and a whoami command to print the wallet address.
  • Clarify requirements to state the node requires a public IPv4 address due to IPv4-only QUIC listening.
File Description
docs/​requirements.md Clarifies that QUIC is IPv4-only and the node needs a public IPv4 for /ip4/ multiaddr registration.
docs/​lifecycle.md Documents decdn_chain rationale, upstream DECDN_RPC_URL env fix, /ip4/-only registration, and adds whoami command guidance.
ansible/​roles/​decdn_node/​README.md Routes on-chain onboarding examples through decdn_chain and adds notes about /ip4/ multiaddrs and whoami.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ansible/roles/decdn_node/README.md Outdated
alpergundogdu and others added 2 commits September 24, 2026 11:15
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
decdn/decdn#2144 (869141e9) binds QUIC on [::]:bind_port as well as
0.0.0.0:bind_port, falling back to IPv4-only (with a warn) on hosts
without IPv6. The IPv4-only wording this PR added is now stale for new
builds:

- docs/lifecycle.md: register the /ip6/ multiaddr too on dual-stack
  hosts, check `ss -ulpn` shows [::]:4433 first, keep /ip4/-only for
  older builds, and add it after an upgrade with update-multiaddrs
  passing both addresses (it replaces the on-chain set).
- docs/requirements.md: IPv6 is supported alongside IPv4 since #2144.
- roles/decdn_node/README.md: same, next to the register example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alpergundogdu
alpergundogdu merged commit 0c7b5db into main Sep 24, 2026
15 of 16 checks passed
@alpergundogdu
alpergundogdu deleted the docs/runbook-setup-rpc-url branch September 24, 2026 11:00
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