cryptoadvance / specter-desktop

A desktop GUI for Bitcoin Core optimised to work with hardware wallets
MIT License
793 stars 237 forks source link

Feature Request: Network/Cloud Storage of Address and Transaction Labels #1425

Open dtrammell opened 2 years ago

dtrammell commented 2 years ago

I have a use case where I have a single wallet imported into multiple Bitcoin Core instances on different computers, managed with Specter Desktop on those computers. When I'm using one or the other, obviously any labeled transactions only store the label on the instance that I am currently working on and these do not show up on the other instance.

I would like a way to tell Specter to store/sync labels with a list or database of labels (CSV maybe) in a file that I can store on a shared network or cloud drive. This way both instances of the wallet will have all of the labels.

As an example, I believe Trezor's wallet software handles address and transaction labels in a similar way.

dtrammell commented 2 years ago

Upon further investigation it also looks like maybe address and transaction labels are conflated. Some use cases may need to reuse addresses, so having separate labels for addresses vs. transactions would also be useful.

An example use case is where an exchange locks you into a single withdrawal address making it cumbersome to use a unique address for each withdrawal. You may wan to label the address as withdrawals from the exchange, but need to label the individual transactions with additional context. Consider:

Address Label: Identifies owner/entity of address Transaction Label: Identifies transaction purpose

k9ert commented 2 years ago

Interesting, good point! Currently we have some work going on in https://github.com/cryptoadvance/specter-desktop/pull/1376 which is a bit stalling due to the difficulties with OAuth2. Once these are resolved, i think we can easily reuse that work to implement this one.

k9ert commented 2 years ago

Thinking about that more: If you have some scripting-capabilities, maybe you can modify this script which is syncing channel-backups to dropbox on a raspiblitz: https://stadicus.github.io/RaspiBolt/raspibolt_73_static_backup_dropox.html

However, this is only a one-way sync and you probably want a two-way one?!

Another thing worth mentioning here is the SPECTER_PERSISTENCE_CALLBACK. If you specify this Env-variable with a path to a script like /usr/bin/my-shiny-sync-script.sh then this script will get executed whenever any json-file get written in the ~/.specter directory.However, i guess the other direction is missing here are well.