Skip to content

policy: Enforce TRUC by default and guard priority mining - #439

Closed
connorslab wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
connorslab:policy-truc-default
Closed

connorslab wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
connorslab:policy-truc-default

Conversation

@connorslab

@connorslab connorslab commented Oct 4, 2026 •

Copy link
Copy Markdown

Default mempooltruc to enforce and remove its redundant corepolicy override. Explicit accept and reject settings remain available; other defaults and corepolicy overrides are unchanged.

Priority-space mining selects transactions individually without requiring fees. As reported in review, this can mine an ephemeral-dust parent without its child, including a parent stranded after the child is replaced. Exclude transactions with dust outputs from that selection path, using the mempool's configured dust relay rate. They remain eligible for fee-based package selection, and ordinary priority transactions remain eligible for priority space.

Update the help/docs and test the default and explicit TRUC modes with both corepolicy settings. Add a registered functional regression covering an underfunded mining package, a parent stranded by replacement of its child's sponsor spend, continued ordinary priority mining, and recovery/mining with a sufficiently funded child. The negative-modified-fee admission fix remains separate in #438.

Validation of 58313216fd8172324e3ef37039cefa08b63bf0e9: Linux build and test run passed.

  • Release build, 18 targeted unit tests, and eight functional suites passed, including the existing coin-age priority and prioritisation tests.
  • The new regression passed on this branch independently with the dust penalty disabled, and with policy: Allow negative modified fees for ephemeral dust #438's validation change applied with penalties both disabled and enabled.
  • Removing the priority guard reproduced the expected assertion failure: the parent was selected despite its package not meeting the mining fee floor.
  • Python syntax and git diff --check passed. The legacy-wallet variant was skipped because Berkeley DB was disabled; the GUI was not built.

Current commit d896460b810ca3a88dd305bc67c985b6ddacba2e differs from the tested commit only in the copyright attribution to the Bitcoin Knots developers. No executable code changed; tests were not rerun for this header correction. The PR is one squashed commit. Validation infrastructure is on a separate branch and is not part of this diff.

@kwsantiago

Copy link
Copy Markdown

Tested e2e with #438: anchors work on defaults. Merged together, though, a stranded zero-fee anchor parent can be mined via priority space.

@connorslab
connorslab marked this pull request as ready for review October 5, 2026 18:10
@connorslab
connorslab force-pushed the policy-truc-default branch from 05893c3 to 5831321 Compare October 5, 2026 18:24
@connorslab connorslab changed the title policy: Enforce TRUC by default and remove its redundant corepolicy override policy: Enforce TRUC by default and guard priority mining Oct 5, 2026
Comment thread test/functional/mining_ephemeral_priority.py Outdated
@connorslab
connorslab force-pushed the policy-truc-default branch from 5831321 to d896460 Compare October 5, 2026 18:56
Comment thread doc/man/bitcoin-qt.1
transactions entirely, "accept" them just like any other, or
"enforce" to impose their requested restrictions (default:
accept)
enforce)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Prefer not to update manpages or other generated files in PRs

@luke-jr

luke-jr commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

What's the motivation for excluding ephemeral dust txs from priority space? I wonder if it would make more sense to enforce blockmintxfee to priority instead...?

@connorslab

Copy link
Copy Markdown
Author

Superseded by #447 (TRUC enforcement by default) and #446 (apply the mining fee floor to priority selection). #438 remains the separate ephemeral-parent admission fix. For Ark-style child-funded anchor payments on native defaults, the relevant pair is #438 and #447; #446 addresses the separate priority-mining fee-floor issue. Closing this combined proposal in favor of those narrower PRs.

@connorslab connorslab closed this Oct 7, 2026
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