Skip to content

v0.2.17: Mark `/admin/v1/setup/report` failed when this node cannot pay one epoch of fees #1943

Open @tcharchian opened 2026-10-07 21:55 UTC 2 comments Updated 2026-11-13 21:40 UTC
up-for-grabs

checkFeegrant passes when the cold-to-warm feegrant exists and is not expired. It does not read the cold spendable balance. The HTTP handler stays 200. Failure is the feegrant_allowance check status FAIL, which sets overall_status to FAIL. A query error stays UNAVAILABLE, as it does today.

Usable amount comes from FeePayerSpendable: cold spendable ngonka, capped by the remaining allowance when the warm key is a different account. An empty spend_limit is unlimited, so use cold spendable alone. Vesting and the warm-key balance do not count. A valid allowance with 0 cold spendable must fail.

Use epochFeeBudgetNgonka and epochBudgetKnown for the one-epoch budget. Fees are on when epochPrice is above 0. That is the epoch group price, not min_gas_price_ngonka.

Fail when fees are on and usable is 0, or when the budget is known and usable is below it. If the warm key is a different account, a missing or expired feegrant still fails. If the signer is the cold account, do not require a feegrant; FeePayerSpendable uses the cold spendable balance alone.

Resolve the StoreCommit count the same way as GET /admin/v1/epoch-fee-budget. If that count is unknown, pass it as unknown. A count of 0 with a positive per-count rate makes the budget look known and too small. If the budget is unknown and usable is above 0, do not fail: spendable_covers_budget is false in that case even when the cold account has funds.


💬 Comments (2)

@EazyHood commented 2026-10-09 20:56 UTC

I'd like to take #1943. I checked checkFeegrant and the existing epoch-fee-budget handler: the setup report currently validates the allowance but does not check the usable cold balance.

My plan is to reuse FeePayerSpendable, epochFeeBudgetNgonka and epochBudgetKnown, with the same StoreCommit-count resolution as the budget endpoint. I'll cover zero/insufficient balances, unlimited and capped allowances, cold-key signing, expired grants, unknown budgets and query failures, while keeping the HTTP 200/report-status contract.

Estimated first PR: 3-5 days after confirmation. Could you assign this to me if it is still available, and confirm whether this scoped fix would be considered for contributor rewards? I understand any payout requires governance approval.

@tcharchian commented 2026-10-09 23:52 UTC

@EazyHood #1943 is still open and unassigned, so you can take it.

I cannot promise a bounty or any other contributor reward for this work. Whether anything is rewarded, and on what terms, is entirely subject to community review and governance approval. There is no commitment and no guarantee of a payout.


🔄 Auto-synced from Issue #1943 every hour.