Skip to content

feat(node,cli): surface operator eth address in decdn node status (#1906) - #1907

Merged
alpergundogdu merged 2 commits into
mainfrom
claude/pr-1906-7ebd0a
Sep 2, 2026
Merged

alpergundogdu merged 2 commits into
mainfrom
claude/pr-1906-7ebd0a

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Summary

decdn node status reports the node's iroh node_id but not the operator Ethereum address — the wallet the node is funded, bonded, registered, and paid under. The daemon already resolves it at bring-up (the binding check logs it), so today the only first-party way to read it off a running node is grepping the daemon's JSON logs. This surfaces it in status instead.

Closes #1906.

Changes

  • Wire type (crates/common/src/admin.rs): add operator_address: Option<String> to StatusResponse — an EIP-55 checksummed 0x…. None when no operator is wired (unwired AdminState in unit tests / cache-only nodes), mirroring how bound_node_id degrades. Only the public address is added — never key material.
  • Node (crates/node/src/admin.rs, runtime/mod.rs): AdminState::with_operator_address, wired at bring-up from the loaded eth signer's address — the same value the binding check derives. Sampled once, no extra chain round-trip; status() renders it via Address's EIP-55 Display, the same rendering the lane snapshots use.
  • CLI (crates/cli/src/commands/node.rs): print operator_address=… in the decdn node status human output (explicit (unknown) sentinel when absent, so scripts always find the field) and include it in --json.

Testing

  • crates/node/src/admin.rs — unit test: wired address reports the EIP-55 checksum; unwired reports None.
  • crates/common/src/admin.rs — StatusResponse serde round-trip covers the new field.
  • crates/cli/src/commands/node.rs — human render carries the address; a None renders the (unknown) sentinel.
  • crates/cli/tests/admin_rpc.rs — end-to-end over real HTTP: the address survives serde + generated client bindings as an EIP-55 checksum.
  • crates/e2e/tests/g_node_01_onboarding.rs — the onboarding journey asserts status.operator_address equals the wallet the node bonded and registered under.

cargo build, cargo clippy --all-targets --all-features, cargo fmt --check, and the affected unit + integration tests all pass; the decdn-e2e crate compiles under --features anvil-e2e.

🤖 Generated with Claude Code

…1906)

`decdn node status` reports the node's iroh `node_id` but not the operator
Ethereum address — the wallet the node is funded, bonded, registered, and
paid under. The daemon already resolves it at bring-up (the binding check),
so the only way to read it off a running node is grepping the daemon's JSON
logs. Surface it instead.

- Add `operator_address: Option<String>` to `StatusResponse`, an EIP-55
  checksummed `0x…`. `None` when no operator is wired (unit tests,
  cache-only nodes), matching how `bound_node_id` degrades.
- Wire `AdminState::with_operator_address` from the loaded eth signer's
  address at bring-up — the same value the binding check derives, sampled
  once, no extra chain round-trip.
- Print `operator_address=…` in `decdn node status` human output (an
  explicit `(unknown)` sentinel when absent) and include it in `--json`.

Only the public address is added — never key material.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 2, 2026 10:58

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.

🟢 Approval recommended

The change is narrowly scoped, consistently wired through node→wire→CLI with solid unit/integration/e2e coverage, with only a minor test maintainability nit identified.

Pull request overview

This PR extends the node’s admin status surface (admin_v1_status) to include the operator Ethereum address (EIP-55 checksummed), and then exposes it in decdn node status for both human-readable and --json output. This improves operator visibility into which wallet a running daemon is funded/bonded/paid under without log-scraping.

Changes:

  • Add operator_address: Option<String> to StatusResponse wire type and cover it with serde round-trip tests.
  • Wire the operator address into the node’s AdminState at runtime bring-up and return it from admin_v1_status.
  • Print operator_address=… in decdn node status output (with an explicit (unknown) sentinel when absent) and add unit/integration/e2e assertions.
File summaries
File Description
crates/node/src/runtime/mod.rs Wires the loaded eth signer’s address into AdminState during admin server bring-up.
crates/node/src/admin.rs Stores operator Address in AdminState, exposes it via status() as an EIP-55 string, and adds unit coverage.
crates/common/src/admin.rs Extends StatusResponse with operator_address and updates serde round-trip tests.
crates/cli/src/commands/node.rs Renders operator_address in decdn node status human output (and exercises rendering in tests).
crates/cli/tests/admin_rpc.rs Adds an end-to-end HTTP round-trip assertion that the operator address survives serde + generated bindings.
crates/e2e/tests/g_node_01_onboarding.rs Adds onboarding journey assertion that status.operator_address matches the node’s operator wallet.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

@github-actions

github-actions Bot commented Sep 2, 2026 •

Copy link
Copy Markdown

Coverage report

Total: 82.85% (was 82.84%, ▲ +0.01%) — 73090/88221 lines

File Coverage Lines Δ
crates/cli/src/commands/node.rs 77.23% 1099/1423 ▲ +0.19%
crates/common/src/admin.rs 93.86% 107/114 ▲ +0.17%
crates/node/src/admin.rs 92.70% 1003/1082 ▲ +0.17%
crates/node/src/runtime/mod.rs 47.41% 1162/2451 ▼ 0.02%
History
Commit Total Δ vs base
0e12ec9 82.85% ▲ +0.01%
dbf0181 (HEAD) 82.85% ▲ +0.01%

…iew)

Bind the checksummed operator address to a local `String` in the G-NODE-01
onboarding assertion instead of comparing against a borrow of a temporary,
so the expression reads plainly and does not rely on temporary lifetime
extension.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@alpergundogdu
alpergundogdu merged commit afb7a90 into main Sep 2, 2026
25 checks passed
@alpergundogdu
alpergundogdu deleted the claude/pr-1906-7ebd0a branch September 2, 2026 11:56
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.

Surface operator eth address in decdn node status

2 participants