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
setup: print the buyer working deposit and check the buyer wallet's USDC #2676
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 whendecdn setup on a no-origin node with an empty wallet prints the shortfall and the faucet pointer before the operator starts the node.
Activity