Skip to content

Remove old LocalUtxos #573

Description

@danielabrozzoni

After #515 we never delete TxOuts from the database; this can obviously be a problem for wallets that do many transactions and applications that run on devices with limited memory. We should add a way of manually deleting the spent txouts.

Activity

  1. added this to BDK-CLI and removed this from BDK-CLIon Mar 19, 2022
  2. changed the title [-]Garbage collect `LocalTxout`[/-] [+]Remove old `LocalUtxo`s[/+] on Mar 21, 2022
  3. xraid commented on Mar 27, 2022

    @xraid

    maybe choose archive or delete
    auto archive (set time interval - size count) - then manually delete

    more of a concern for wallet implementation choice of db management ?

    maybe a API of encrypted remote store in own "cloud" or other type bucket

  4. vladimirfomene commented on Jul 27, 2022

    @vladimirfomene
    Contributor

    @danielabrozzoni , can I pick this up?

  5. danielabrozzoni commented on Jul 27, 2022

    @danielabrozzoni
    ContributorAuthor

    I just assigned this to you 😁

    So, I don't know exactly how this will look like, but to give a bit of context: in #414 and #515 there should be enough discussion to cover why we went for never deleting the utxos in the first place. Now, we should find some way to do so, and IMHO it should be pretty configurable (as everything in BDK). We could have an automatic mode ("delete all the utxos which have been spent at least 10 blocks ago", "keep at most 500 utxos"), but also a manual API would be cool ("delete all the utxos" or "delete this specific utxo").

    We haven't discussed much about it, so feel free to jot down your thoughts on discord or, even better, create a PR with a POC and let people discuss there. Thanks 🙏🏻

  6. notmandatory commented on Mar 27, 2025

    @notmandatory
    Member

    Closing since persistence is done differently in bdk_wallet 1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

discussionThere's still a discussion ongoingnew featureNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions