v0.2.17: Mark `/admin/v1/setup/report` failed when this node cannot pay one epoch of fees #1943
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.
🔄 Auto-synced from Issue #1943 every hour.