mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-18 13:07:58 +02:00
In this commit, we wire the budget into the scenario file and fix the fee accounting, which the design spec asks for whether or not any file ever sets a limit. The file-level fee_limit_ppm is a default for the payments that do not name their own, so a whole tier goes under fee pressure with one number. It applies to the warmup payments too: they are real payments that probe and spend, and a warmup exempt from the constraint the scored batch runs under would be a different network. Two reported fields fix the accounting. total_fee_msat_spent is every millisatoshi of fee that actually left the sender, including on payments that then failed, which on a non-atomic tier is money genuinely paid to forwarding nodes that no aggregate has ever counted. On the first sealed hard file it is 1,753,766 against a reported 1,631,209, so 7% of the fees that tier pays have been invisible. The leak was only ever in the aggregate: every scenario result has carried its own spent fee in fee_msat all along, so any archived run can be re-totalled from its results array. fee_ppm_attempted is that number over the amount the batch was ASKED to deliver. It is the version of the fee ratio abandonment cannot launder, since the abandoned amount stays in the denominator, and it is REPORTED and not scored: the objective is unchanged in this stage, and whether the fee term should migrate onto this metric is what the pre-registered side-by-side arm decides offline from these very runs. The counters split the way stage A's and stage B's do, stated at the declaration so a later sweep cannot misread them. fee_limit_payments says a budget was configured. fee_limit_failures is an alarm, because a fee limit binds at plan time, and it is read next to num_give_ups: a router that stops sending because everything is over budget and one that never found a route are the same number in the objective, and only those two counters separate them. |
||
|---|---|---|
| .. | ||
| commands | ||
| lncli | ||
| lnd | ||
| routesim | ||