Remove old `LocalUtxo`s
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.
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
@danielabrozzoni , can I pick this up?
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 🙏🏻