Skip to content

policy: Adapt vsize based on coinblocks#280

Open
kwsantiago wants to merge 9 commits intobitcoinknots:29.x-knotsfrom
privkeyio:feature-priority-vsize-discount
Open

policy: Adapt vsize based on coinblocks#280
kwsantiago wants to merge 9 commits intobitcoinknots:29.x-knotsfrom
privkeyio:feature-priority-vsize-discount

Conversation

@kwsantiago
Copy link
Copy Markdown

@kwsantiago kwsantiago commented Mar 6, 2026

Closes #147

Factor coinblocks into feerate calculation via vsize discount, making it cheaper to spend high-coinblock coins than quickly-respending dust. Optional via -coinblocksvsizediscount.

Add a boolean setting to control whether transactions with coin-age
priority receive a vsize discount. Default on, disabled in -corecomp.
Log2-based weight discount for transactions with coin-age priority,
capped at 50% with a minimum weight floor.
Compute the discount against raw transaction weight in PreChecks.
Extend fuzz harness to cover negative extra_weight values.
Test that aged UTXOs receive a vsize discount when enabled,
and that the discount is not applied when disabled.
@luke-jr
Copy link
Copy Markdown
Collaborator

luke-jr commented Mar 23, 2026

"priority" has historically been confusing by itself. I've been trying to migrate toward calling it "coinblocks" (see minrelaycoinblocks)

@kwsantiago kwsantiago changed the title policy: Adapt vsize based on coin-age priority policy: Adapt vsize based on coinblocks Mar 25, 2026
@luke-jr
Copy link
Copy Markdown
Collaborator

luke-jr commented Mar 30, 2026

Probably need to document the algorithm.

Also, this only calculates the discount at mempool entry, and doesn't update it as the inputs age.

@kwsantiago kwsantiago force-pushed the feature-priority-vsize-discount branch from 3343313 to 92d9cf3 Compare March 31, 2026 13:03
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.

Policy: Adapt vsize based on coin-age priority

3 participants