Skip to content

setup: print the buyer working deposit and check the buyer wallet's USDC #2676

Closed

Description

@thiras

Follow-up from #2603 (#2674), which made cache.node_to_node_pull_through_enabled default on for a node with no origin backend.

Today. decdn setup checks the bond TOKEN balance and native gas (check_line rows rpc, clock, token_balance, native_gas in crates/cli/src/commands/setup.rs), but says nothing about USDC. A node with no origin now buys its cache misses from peers by default. It escrows blockchain.buyer_working_deposit_micro_usdc (10 USDC) in a pool and refills the pool toward it at low water. With an empty buyer wallet, every openPool reverts. The node then warns once an hour and decdn node status flags pull_through=on buyer_wallet_usdc=0.000000 (unfunded …), but setup, which is where the operator funds the node, says nothing.

Ask.

  • When the resolved config has pull-through on, add a buyer_usdc pre-flight row that prints the working deposit and the wallet's USDC balance. Warn when the balance is below the working deposit. Make it a warning, not a failure: the node serves without it.
  • Read the token from PaymentPool.usdc(), as fetch.rs does. chain_ctx::Resolved carries no PaymentPool address today. payment_pool_address() is on the loaded file wrapper (chain_ctx.rs).
  • Include the row in the --json summary (build_summary) and in the keyless dry run.

Done when decdn setup on a no-origin node with an empty wallet prints the shortfall and the faucet pointer before the operator starts the node.

🤖 Generated with Claude Code

Activity

  1. added
    kind:feature
    area:cli
    prio:low
    on Oct 28, 2026
  2. added this to the v0.3 milestone on Oct 28, 2026
  3. self-assigned this
    on Oct 29, 2026
  4. moved this from Backlog to In progress in deCDNon Oct 29, 2026
  5. moved this from In progress to Done in deCDNon Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:featureprio:low

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions