Skip to content

Conversation

darioAnongba
Copy link
Contributor

Garbage collect the residue zero-value UTXOs when creating transactions. Zero-value UTXOs can occur when creating tombstones or full burns.
Currently, these UTXOs accumulate in the DB and are never cleaned. This PR introduces a garbage collection mechanism in an opportunistic way to collect these UTXOs and use them as inputs of any transaction initiated by tapd:

  • Mint
  • Burn
  • Supply commit
  • Funding channels

The mechanism is to select all zero-value UTXOs up to a certain quantity (too avoid exceeding the tx max size).

@darioAnongba darioAnongba self-assigned this Oct 1, 2025
@coveralls
Copy link

coveralls commented Oct 1, 2025

Pull Request Test Coverage Report for Build 18227816695

Details

  • 63 of 276 (22.83%) changed or added relevant lines in 7 files are covered.
  • 27955 unchanged lines in 195 files lost coverage.
  • Overall coverage decreased (-15.1%) to 34.578%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tapfreighter/parcel.go 0 1 0.0%
tapcfg/server.go 0 2 0.0%
tapfreighter/chain_porter.go 0 9 0.0%
tapgarden/planter.go 1 28 3.57%
tapfreighter/wallet.go 60 140 42.86%
tapdb/assets_store.go 1 95 1.05%
Files with Coverage Reduction New Missed Lines %
universe/supplyverifier/util.go 1 98.75%
proof/util.go 2 81.63%
tapdb/migrations.go 2 76.06%
tapdb/mssmt.go 2 88.64%
address/log.go 3 0.0%
commitment/log.go 3 0.0%
internal/pedersen/commitment.go 3 95.31%
lndservices/log.go 3 0.0%
rfq/log.go 3 0.0%
tapchannel/log.go 3 0.0%
Totals Coverage Status
Change from base Build 18145713853: -15.1%
Covered Lines: 30543
Relevant Lines: 88330

💛 - Coveralls

@levmi levmi moved this from 🆕 New to 🏗 In progress in Taproot-Assets Project Board Oct 2, 2025
@darioAnongba darioAnongba force-pushed the feat/zero-value-utxo-selection branch from f3a3bff to f55b6c5 Compare October 3, 2025 16:21
@darioAnongba darioAnongba changed the base branch from main to 0-8-0-staging October 6, 2025 09:43
@darioAnongba darioAnongba force-pushed the feat/zero-value-utxo-selection branch from f55b6c5 to bc1c0b5 Compare October 6, 2025 09:44
@darioAnongba darioAnongba force-pushed the feat/zero-value-utxo-selection branch from bc1c0b5 to 3bd769d Compare October 6, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

2 participants