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
cli: decdn node bond drops its partial Outcome when a later step fails #1355
area:clidecdn binary: get, gateway, pool, publish, origin, setupkind:bugSomething does not behave as documentedprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Surfaced by the review of #1353, which fixed the same defect in decdn node unbond. bond has the identical shape and was left alone to keep that PR scoped.
What
crates/cli/src/commands/bond.rs:51:
let outcome = execute(&bond,&provider,&plan, operator, cb_addr, mbps).await?;letmut out = io::stdout().lock();write_plan(&mut out,&plan, args.chain.common.json,&outcome,false)
execute submits up to three transactions in sequence — approve, bond, declareMbps — recording each hash into a locally-owned Outcome. If any step fails, ? discards the whole Outcome including the hashes of steps that already mined, and run propagates before write_plan. stdout is empty; only the error reaches stderr.
Failure scenario
Operator runs decdn node bond --mbps 5000 with zero allowance.
approve mines. bond mines — the TOKEN is now transferred into CapacityBond.
declareMbps reverts (out-of-band tier) or the receipt fetch times out.
stdout is empty. The operator is told declareMbps failed and has no record that their TOKEN moved.
Less severe than the unbond case — bond is idempotent and a re-run converges, and the bond is visible via activeBond — but the same principle applies: a command that submits a sequence should report what landed before it reports the failure.
Fix
Mirror what #1353 did for unbond: make execute take outcome: &mut Outcome and return Result<()>, have run own the value, always write_plan before propagating, and attach context naming the steps that succeeded. See crates/cli/src/commands/unbond.rsrun/execute for the shape.
Worth checking register and setup for the same pattern while in there.
area:clidecdn binary: get, gateway, pool, publish, origin, setupkind:bugSomething does not behave as documentedprio:mediumScheduledrustDependabot: a Cargo update; use area: labels for Rust code otherwise
Activity
fix(cli): carry an unresolved registerNode hash into setup's partial …
fix: batch seven review follow-ups (#1342, #1343, #1344, #1345, #1347, …
thiras commentedon Jul 21, 2026
Fixed in 71fe6a1 (#1358).