You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a decdn node channels command that prints a live snapshot of all open payment channels with per-channel nonce, outstanding balance, time since last voucher, and settlement eligibility #749
area:clidecdn binary: get, gateway, pool, publish, origin, setupdesign:economicsToken economics, pricing, fee split, bond sizingkind:featureNew capability or a change to current behavior
Operators currently have no CLI visibility into open payment channel state without reading raw metrics or internal logs. A decdn node channels subcommand that queries the admin RPC surface would let operators quickly identify channels approaching settlement thresholds, stale channels, or channels with unusually high outstanding balances before they become a liquidity risk.
Request to add a decdn node channels subcommand that queries the admin RPC for a live snapshot of open payment channels — showing per-channel nonce, outstanding balance, time since last voucher, and settlement eligibility. The motivation is operator liquidity risk management: currently this data is only accessible via raw metrics or internal logs. The scope is well-bounded (new CLI subcommand + one admin RPC endpoint) and aligns directly with the existing cli → common (AdminRpc trait) architecture.
📊 Assessment
Dimension
Value
Reasoning
Type
Feature
New operator-facing capability; no existing functionality is broken
All four are accurate; no priority label is warranted without further operator input
Coding agent
Suitable
Requirements are clear and self-contained: extend AdminRpc with a channels method, implement it in node, add the decdn node channels subcommand in cli. Success criteria (output columns) are explicitly enumerated
🔗 Similar issues
No similar or duplicate issues found.
💡 Notes and suggestions
Implementation path:
common crate — add a ChannelSnapshot DTO (fields: peer_id, nonce: u64, outstanding_balance: U256, secs_since_last_voucher: u64, settlement_eligible: bool) and a channels() -> Vec<ChannelSnapshot> method on the AdminRpc trait.
node crate — implement channels() by reading the in-memory channel map from the incentive crate's payment-channel state; compute settlement_eligible from the channel's timeout threshold (see ADR 016 §Payment channels).
cli crate — add decdn node channels as a subcommand (mirrors the existing decdn node peers pattern); support a --json flag for machine-readable output alongside the default table view.
Output columns to confirm:
Channel peer node ID (iroh NodeId)
Current nonce
Outstanding balance (USDC, formatted with 6 decimals)
Time since last voucher (human-readable, e.g. 2m 14s)
Settlement eligible (yes / no, with expiry timestamp if eligible)
Edge cases to handle:
No open channels → print an empty table or a friendly no open channels message rather than erroring.
Admin RPC not reachable → surface a clear error (not a panic; anti-panic policy applies).
Very large balance values → ensure U256 formatting doesn't truncate.
Testing suggestion: Add an integration test in the cli crate that spins up a mock admin RPC server returning a fixed Vec<ChannelSnapshot> and asserts the rendered table output.
area:clidecdn binary: get, gateway, pool, publish, origin, setupdesign:economicsToken economics, pricing, fee split, bond sizingkind:featureNew capability or a change to current behavior
Activity
github-actions commentedon May 31, 2026
🎯 Triage report
Request to add a
decdn node channelssubcommand that queries the admin RPC for a live snapshot of open payment channels — showing per-channel nonce, outstanding balance, time since last voucher, and settlement eligibility. The motivation is operator liquidity risk management: currently this data is only accessible via raw metrics or internal logs. The scope is well-bounded (new CLI subcommand + one admin RPC endpoint) and aligns directly with the existingcli → common (AdminRpc trait)architecture.📊 Assessment
enhancement,economics,technical,cli(already applied)AdminRpcwith achannelsmethod, implement it innode, add thedecdn node channelssubcommand incli. Success criteria (output columns) are explicitly enumerated🔗 Similar issues
No similar or duplicate issues found.
💡 Notes and suggestions
Implementation path:
commoncrate — add aChannelSnapshotDTO (fields:peer_id,nonce: u64,outstanding_balance: U256,secs_since_last_voucher: u64,settlement_eligible: bool) and achannels() -> Vec<ChannelSnapshot>method on theAdminRpctrait.nodecrate — implementchannels()by reading the in-memory channel map from theincentivecrate's payment-channel state; computesettlement_eligiblefrom the channel's timeout threshold (see ADR 016 §Payment channels).clicrate — adddecdn node channelsas a subcommand (mirrors the existingdecdn node peerspattern); support a--jsonflag for machine-readable output alongside the default table view.Output columns to confirm:
NodeId)2m 14s)yes/no, with expiry timestamp if eligible)Edge cases to handle:
no open channelsmessage rather than erroring.Testing suggestion: Add an integration test in the
clicrate that spins up a mock admin RPC server returning a fixedVec<ChannelSnapshot>and asserts the rendered table output.Add this agentic workflows to your repo
To install this agentic workflow, run
feat(cli): add `decdn node channels` payment-channel snapshot (#749) (#…