Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put UTXO info into wallet database #3991

Open
raphjaph opened this issue Oct 9, 2024 · 3 comments
Open

Put UTXO info into wallet database #3991

raphjaph opened this issue Oct 9, 2024 · 3 comments
Assignees

Comments

@raphjaph
Copy link
Collaborator

raphjaph commented Oct 9, 2024

This would allow much quicker commands for subsequent calls in wallet with many utxos. It would then only fetch utxos it can see in the Bitcoin Core wallet but are not yet in the database. Would also delete utxos according to that information

@1stBitcoinSent
Copy link

any thoughts 🤔 on a new database architecture

@cryptoni9n
Copy link
Collaborator

if this happens, would the wallet db be part of the index.redb, or be it's own new db? I'm just wondering how sharing indexes would work in the future if the wallet is included as part of the index.redb.

@raphjaph
Copy link
Collaborator Author

raphjaph commented Nov 21, 2024

We already have a wallet.redb for storing pending etchings. So it's a completely seperate file from index.redb. You can have a look at the logic in src/wallet.rs, there you'll see two tables in the db already. If we add UTXOs to that database it would probably be something like:

define_table! { OUTPOINT_TO_UTXO_ENTRY, &OutPointValue, &UtxoEntry }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

3 participants