fix(payout): cap fee-drift surplus at the ratified treasury allocation, overflow into the node pool (#601) - #728
Merged
Conversation
…n, overflow into the node pool (#601) Post-gate surplus drift no longer lands on the treasury uncapped. The treasury's take is capped at its own ratified allocation — drift can at most double what the decay schedule granted it — and the overflow above the cap, including the whole surplus once the decay schedule has driven the ratified treasury to zero, is shared into the node pool pro rata to the ratified node amounts (remainder to the top entry, ties broken by address). Overflow with no node pool to absorb it fails closed to the fallback coinbase. The cap is a pure function of the ratified checkpoint, so builder and settlement reconstruction stay byte-identical on every node and the outputs balance exactly to subsidy + available fees.
defenwycke
added a commit
that referenced
this pull request
Aug 21, 2026
Workspace version bump. The tag carries thirteen commits since `v1.11.23`, of which two touch the money path and are already running on the fleet: - **#724** computes the payout checkpoint from the shard rather than the legacy ledger, which is what ended the payout standoff — v56 had disabled the ledger sweep the checkpoint still depended on, so nothing had finalised since 18 August. Gated at 963,388; payouts resumed at the gate and are finalising now. - **#728** caps the fee-drift surplus at the ratified treasury allocation and overflows the remainder into the node pool (#601). The rest is convergence, performance and audit work: the mesh node-list checkpoint now converges (#715), the checkpoint diagnostic stops re-scanning the unpaid ledger (#718), the share-batch chain is deleted (#703), and #605's last open item lands dark (#729). `fuzz/` is a separate cargo workspace with its own lockfile pinning every in-tree crate by version, so it is bumped in the same commit — otherwise the fuzz build goes red on a version mismatch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #601. This is step 1 of the #608 release sequence — "land
fix/601-drift-cap-and-sink(1 commit, unmerged since 12 Aug, touches a live money path: main has no drift cap)".The commit is
bda4c0013, authored 2026-08-12, cherry-picked ontoc78dda2e2cleanly with no conflicts. Its original PR (#655) was closed rather than merged, so the fix never landed:bda4c0013is not an ancestor ofmainand no equivalent change exists there. Verified by ancestry, not by grepping subject lines — a subject-line search is what made it look merged in the first place.What it does
Post-gate surplus drift no longer lands on the treasury uncapped. The treasury's take is capped at its own ratified allocation, so drift can at most double what the decay schedule granted it. Overflow above the cap — including the entire surplus once the decay schedule has driven the ratified treasury to zero — is shared into the node pool pro rata to the ratified node amounts, remainder to the top entry, ties broken by address. Overflow with no node pool to absorb it fails closed to the fallback coinbase.
The cap is a pure function of the ratified checkpoint, so the builder and the settlement reconstruction stay byte-identical on every node, and the outputs balance exactly to subsidy + available fees.
Context for why this matters in practice: ratified
tx_feesis0at a tip change, so roughly 1.5% of the coinbase currently drifts to the treasury. That is not a double-count, but it is unbounded, andmainhas no cap on it today.Verification
cargo check -p ghost-pool --features zk-productionpasses against currentmain— the change still compiles after three weeks of drift in the surrounding tree.Full
ghost-poollib suite: 481 passed, 0 failed, 0 filtered out. The five tests this commit adds were confirmed present andokby name, not inferred from a total:⚠ Worth stating why that check is spelled out: a first pass ran
cargo test … drift, which matched none of these five names and reported0 passed; 0 failedwith exit code0. A filtered-to-nothing run is indistinguishable from a green one unless you readfiltered out.Note for the reviewer
This touches the coinbase builder, so it wants a deploy of its own rather than riding another change — the same reasoning that kept the Stage 6 deletion off the cutover binary.