Repository navigation
Labels
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:nodedecdn-node daemon: runtime, handlers, admin RPC, serve pathkind:featureNew capability or a change to current behaviorprio:mediumScheduled
Description
Component
cli (decdn binary)
Who it affects
node operator
Problem
An operator cannot ask their node what it has earned. decdn node lanes shows per-lane owed amounts since #2588, decdn node top scrapes /metrics, and the chain has every Settled(operator, bytesDelivered, amount) event, but no command adds them up and prints a USDC figure. The only place that number exists is stats.decdn.org, per settlement row, in hex addresses.
The operator who is asked "is it worth running?" has to answer with Grafana.
Proposed solution
decdn node earnings:
$ decdn node earnings
period bytes served settled (USDC) owed (USDC) settlements
last 24h 412.3 GB 4.12 0.38 9
last 7d 2.9 TB 29.07 61
all time 12.4 TB 121.41 1160
last settlement: 2026-10-24 11:02 UTC, tx 0x… (block 123456789)
pending redeem: 0.38 USDC over 3 lanes (next sweep in ~4 min)
- Settled comes from
FeeRouter.Settledfor the operator address, read through the node's existing RPC provider (the watchers already page contract state at a pinned block; this is one more enumeration, with a block window per period). - Owed is the sum of lane
owedfrom the admin RPClanesresponse (fix(node): report each lane's owed amount in admin lanes #2588), so the two columns never double count: owed becomes settled whenredeemManylands. --jsonfor scripts,--since <date>/--periodfor ranges,--addressto ask about another operator without a daemon (reads the chain only).- The same figures in
node statusas a one-line summary, sodecdn setup's last step can print "your node earned X so far" on a re-run.
Alternatives considered
- Point operators at stats.decdn.org. That page is network-wide and public; the operator wants their own number on their own box, including what is not yet redeemed.
- A Grafana panel in devops. Exists for fleet operators with Grafana Cloud wired; most self-hosters do not have it, and a CLI answer works on every install.
Design scope
- This proposal changes the protocol, the economics, or the contract surface.
Related
- Lane owed amounts in admin lanes: fix(node): report each lane's owed amount in admin lanes #2588
- Testnet TOKEN faucet behind the captcha: Faucet for beta TOKEN behind the onramp captcha, and
decdn setupsupport #2597 - Auto-update channel for deployed nodes (decdn/devops): opt-in auto-update timer that follows the pinned release line on Ansible and cloud-init hosts devops#175
Metadata
Metadata
Assignees
Labels
area:clidecdn binary: get, gateway, pool, publish, origin, setuparea:nodedecdn-node daemon: runtime, handlers, admin RPC, serve pathkind:featureNew capability or a change to current behaviorprio:mediumScheduled
Type
Fields
Priority
None yet
Projects
- StatusShow more project fieldsDone
Activity
feat(cli): `decdn node earnings` prints settled and owed USDC per per…