Skip to content

policy: Allow negative modified fees for ephemeral dust - #438

Open
connorslab wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
connorslab:policy-monetary-defaults
Open

connorslab wants to merge 1 commit into
bitcoinknots:29.x-knotsfrom
connorslab:policy-monetary-defaults

Conversation

@connorslab

@connorslab connorslab commented Oct 4, 2026 •

Copy link
Copy Markdown

Allow the automatic sub-dust fee penalty on otherwise eligible ephemeral-dust transactions without permitting manual fee deltas.

Move the existing ephemeral fee precheck before the automatic dust-penalty deduction. At this point StageAddition has already applied the fee adjustments from mempool.mapDeltas, so the existing zero-base-fee and zero-modified-fee checks reject any nonzero net manual fee delta. The original precheck itself is unchanged; no duplicate penalty calculation or direct map access is needed.

Knots then applies its existing calculated dust penalty. A zero-value P2A output produces a -240-sat modified fee at 3 sat/vB dust relay, or -480 sats at 6 sat/vB. With the penalty disabled, it remains zero. The child must still cover the penalty and required package fees. Existing RPC policy continues to prohibit fee adjustments after a dust transaction enters the mempool.

No defaults, corepolicy overrides, TRUC rules, or dust-spending restrictions change. The intended version-3 parent/child anchor packages require -mempooltruc=enforce. The separate default-policy proposal is in #439.

Regression coverage tests two dust relay rates and disabled penalties, positive and negative pre-admission manual fee deltas, post-admission RPC rejection, the package fee boundary, child replacement, block-template inclusion and confirmation.

Validation of e155555218104959bb4172707b02ce2fd2413489: Linux build and targeted policy tests passed: the release build, 18 targeted unit tests, and five functional suites. The legacy-wallet variant was skipped because Berkeley DB was disabled; the GUI was not built. Python syntax and git diff --check passed. The validation workflow is on a separate branch and is not part of this PR.

@connorslab
connorslab marked this pull request as ready for review October 4, 2026 01:00
@luke-jr

luke-jr commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

The sub-dust penalty also directly conflicts with ephemeral anchor acceptance: it subtracts the anchor's dust shortfall from a zero-fee parent's modified fee, but ephemeral transactions must have both zero base fee and zero modified fee. The resulting negative modified fee causes rejection, even if the child pays sufficient fees.

Disabling it seems like the wrong solution. Why not just allow ephemeral anchors to have negative feerates?

@luke-jr luke-jr left a comment

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.

Might make sense to drop the corepolicy overrides?

@connorslab connorslab changed the title policy: Enable TRUC and ephemeral anchor fee bumping by default policy: Allow negative modified fees for ephemeral dust Oct 4, 2026

@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.

tACK e77fe14. Please squash out the defaults change and its revert, and note that -mempooltruc=enforce is required.

@connorslab
connorslab force-pushed the policy-monetary-defaults branch from e77fe14 to e5235ec Compare October 4, 2026 22:51
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