Skip to content

mining: Apply blockmintxfee to coin-age priority selection - #446

Open
connorslab wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
connorslab:policy-priority-fee-floor
Open

connorslab wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
connorslab:policy-priority-fee-floor

Conversation

@connorslab

@connorslab connorslab commented Oct 7, 2026 •

Copy link
Copy Markdown

Apply the configured mining fee floor to coin-age priority selection. This path can otherwise include a transaction whose modified fee is below blockmintxfee, although fee-based package selection enforces that floor. This follows the review suggestion on #439 to apply the floor generically.

Compare each candidate's modified fee with the mining fee rate applied to its policy virtual size before building the priority queue. Transactions meeting the floor retain coin-age ordering. A skipped parent remains eligible for fee-based package selection when a descendant pays enough for the package. A zero floor permits zero modified fees; negative modified fees still require sufficient package sponsorship.

Based directly on mining_priority at 1c3e5c6e8e73866348702a20d047b2fa105a07cc, as requested. One squashed commit. Scope is mining selection, source help, a hand-written release note, and regression tests; no generated files or relay-policy defaults change.

The regression covers one-satoshi fee boundaries, priority ordering, manual fee deltas, zero floors, and a stranded parent obtaining a new fee-paying child. It uses the options available on the topic branch. The separate release-tip integration harness covers template fee overrides and the dust-penalty interaction with #438.

Validation of rebased head c9a6b466ec4fdf2651461a0b822bbd2c4bb76093 passed: standalone topic-branch build, 18 targeted unit suites, seven functional tests, and a negative control that fails at the fee-floor assertion without the fix. Python syntax and git diff --check also pass.

Release-tip assembly validation passed after applying this commit cleanly to 58398baf33e588779685ead478e6397bb28ed3d6: build, 18 targeted unit suites, eight functional variants, integration with #438's unchanged C++ fee-admission patch, and the negative control. This run uses the existing release-tip integration harness to exercise options absent from the topic branch. The legacy-wallet anchor variant was skipped because Berkeley DB is disabled. Validation infrastructure is outside this PR.

@connorslab
connorslab force-pushed the policy-priority-fee-floor branch 4 times, most recently from e26c2ee to 164f735 Compare October 7, 2026 20:38
@connorslab
connorslab marked this pull request as ready for review October 7, 2026 20:52

@kwsantiago kwsantiago left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK 164f735 merged into 29.x-knots. A transaction one satoshi under blockmintxfee no longer enters via priority space; the new test fails without the check, and its dust-penalty cases pass with #438.

@kwsantiago

Copy link
Copy Markdown

Please rebase onto mining_priority (the code this changes) rather than the 29.4.2 tip, so it assembles.

Honor the configured mining fee floor using modified fees and policy virtual size before adding coin-age priority candidates. Keep below-floor parents eligible for CPFP through package selection.

Cover fee boundaries, priority ordering, manual fee deltas, explicit zero floors, and stranded anchor parents recovering through child sponsorship. Keep relay policy defaults unchanged.
@connorslab
connorslab force-pushed the policy-priority-fee-floor branch from 164f735 to c9a6b46 Compare October 17, 2026 21:00
@connorslab

Copy link
Copy Markdown
Author

@kwsantiago Rebased onto mining_priority at 1c3e5c6e8e73866348702a20d047b2fa105a07cc. The new head is c9a6b466ec4fdf2651461a0b822bbd2c4bb76093, still one commit above that base.

The C++ patch is unchanged. The regression and release note now use only features available on that topic branch; fee-boundary, priority-ordering, manual-delta, zero-floor, and parent/child package checks are retained.

Standalone validation passed: Linux build, 18 targeted unit suites, seven functional tests, and a negative control that fails at the expected fee-floor assertion without the fix. The commit also applies cleanly to the current 29.x-knots tip (58398baf33); assembly validation passed, including the release-tip harness's fee override checks, integration with #438's fee-admission patch, and its negative control. The descriptor-wallet anchor test passed; its legacy-wallet variant was skipped because Berkeley DB is disabled.

git diff --check is clean. CI infrastructure is separate from the PR. Ready for another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants