Skip to content

[New] v0.33.4: pool batch take, one-save give-back - #12

Merged
jefflightweb merged 2 commits into
mainfrom
pool-take-small
Nov 3, 2026
Merged

jefflightweb merged 2 commits into
mainfrom
pool-take-small

Conversation

@jefflightweb

Copy link
Copy Markdown
Contributor

A pool of many small coins is one large file rewritten whole on every change. A bstore gateway held 10,854 coins (19.7 MB), 9,492 of them refunds of lapsed bounties, and wrote about 35 MB a minute idle. Merging them needs to take hundreds of coins, and each Take saves the whole pool.

  • bwallet.Pool.TakeSmall(tip, below, n): up to n proven, spendable coins of fewer than below satoshis, smallest first, one save.
  • bwallet.Pool.ReturnAll(outs): Return for many, one save, no duplicates.
  • producer.Payer.TakeSmall(ctx, below, n): the same coins signed for as Take's are; a coin it cannot sign for goes back.
  • Payer.GiveBack returns its coins with one save.

Tests: TestTakeSmallAndReturnAll, TestTakeSmallSignsAndGivesBack. make verify passes locally.

@jefflightweb
jefflightweb merged commit 8cd0358 into main Nov 3, 2026
5 checks passed
@jefflightweb
jefflightweb deleted the pool-take-small branch November 3, 2026 18:17
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.

1 participant