-
Notifications
You must be signed in to change notification settings - Fork 7
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
Write to disk all UTXO notifications that come from own client #137
Labels
enhancement
New feature or request
good first issue
Good for newcomers
loss-of-funds
any problem that could lead to user losing funds
Comments
aszepieniec
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Apr 16, 2024
yeah, so here I am asking:
It seems we have two different ways of processing incoming UTXOs: expected_utxos and announcements. I presume there is a good reason, but I'd like to have a more thorough understanding before making any changes, especially as the asymmetry highlighted in (2) bothers me. And generally it just seems simpler and easier to maintain to have a single mechanism. |
dan-da
added a commit
that referenced
this issue
Aug 19, 2024
closes #172, #137. fixes loss-of-funds scenario. changes: * add RustyWalletDatabase::expected_utxos (DbtVec) * remove UtxoNotificationPool * remove UtxoNotifier::PeerUnsigned * add WalletState methods: add_expected_utxo(), scan_for_expected_utxos() * disables timer call to prune_stale_expected_utxos() for now. + remove cli args: max_utxo_notification_size, max_unconfirmed_utxo_notification_count_per_peer * mod utxo_notification_pool --> expected_utxo * derive Hash for Timestamp tests: * adapt existing tests to changes * move tests from utxo_notification_pool into wallet_state * adds regression tests for issue #172 that verify: 1. expected_utxo are persisted if db is written to disk. 2. expected_utxo are not persisted if db is not written to disk.
dan-da
added a commit
that referenced
this issue
Aug 19, 2024
closes #172, #137. fixes loss-of-funds scenario. changes: * add RustyWalletDatabase::expected_utxos (DbtVec) * remove UtxoNotificationPool * remove UtxoNotifier::PeerUnsigned * add WalletState methods: add_expected_utxo(), scan_for_expected_utxos() * disables timer call to prune_stale_expected_utxos() for now. + remove cli args: max_utxo_notification_size, max_unconfirmed_utxo_notification_count_per_peer * mod utxo_notification_pool --> expected_utxo * derive Hash for Timestamp tests: * adapt existing tests to changes * move tests from utxo_notification_pool into wallet_state * adds regression tests for issue #172 that verify: 1. expected_utxo are persisted if db is written to disk. 2. expected_utxo are not persisted if db is not written to disk.
dan-da
added a commit
that referenced
this issue
Aug 19, 2024
closes #172, #137. fixes loss-of-funds scenario. changes: * add RustyWalletDatabase::expected_utxos (DbtVec) * remove UtxoNotificationPool * remove UtxoNotifier::PeerUnsigned * add WalletState methods: add_expected_utxo(), scan_for_expected_utxos() * disables timer call to prune_stale_expected_utxos() for now. + remove cli args: max_utxo_notification_size, max_unconfirmed_utxo_notification_count_per_peer * mod utxo_notification_pool --> expected_utxo * derive Hash for Timestamp tests: * adapt existing tests to changes * move tests from utxo_notification_pool into wallet_state * adds regression tests for issue #172 that verify: 1. expected_utxo are persisted if db is written to disk. 2. expected_utxo are not persisted if db is not written to disk.
dan-da
added a commit
that referenced
this issue
Aug 19, 2024
closes #172, #137. fixes loss-of-funds scenario. changes: * add RustyWalletDatabase::expected_utxos (DbtVec) * remove UtxoNotificationPool * remove UtxoNotifier::PeerUnsigned * add WalletState methods: add_expected_utxo(), scan_for_expected_utxos() * disables timer call to prune_stale_expected_utxos() for now. + remove cli args: max_utxo_notification_size, max_unconfirmed_utxo_notification_count_per_peer * mod utxo_notification_pool --> expected_utxo * derive Hash for Timestamp tests: * adapt existing tests to changes * move tests from utxo_notification_pool into wallet_state * adds regression tests for issue #172 that verify: 1. expected_utxo are persisted if db is written to disk. 2. expected_utxo are not persisted if db is not written to disk.
dan-da
added a commit
that referenced
this issue
Aug 22, 2024
closes #172, #137. fixes loss-of-funds scenario. changes: * add RustyWalletDatabase::expected_utxos (DbtVec) * remove UtxoNotificationPool * remove UtxoNotifier::PeerUnsigned * add WalletState methods: add_expected_utxo(), scan_for_expected_utxos() * disables timer call to prune_stale_expected_utxos() for now. + remove cli args: max_utxo_notification_size, max_unconfirmed_utxo_notification_count_per_peer * mod utxo_notification_pool --> expected_utxo * derive Hash for Timestamp tests: * adapt existing tests to changes * move tests from utxo_notification_pool into wallet_state * adds regression tests for issue #172 that verify: 1. expected_utxo are persisted if db is written to disk. 2. expected_utxo are not persisted if db is not written to disk.
closed by 232e852 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
good first issue
Good for newcomers
loss-of-funds
any problem that could lead to user losing funds
As I realized when discussing #136 we don't store UTXO notifications to disks. This means that if a client creates a transaction with a change UTXO and then shuts down before this transaction is included in a block, the change UTXO is not discovered by the client. #5 aims to address this issue in a fully recoverable fool proof way, but I think we should also just store the UTXO notifications to disk, iff they are worthy of storing to disk, that is -- this could be that they have a sufficiently high credibility, or, preferably just that they originate from the running instance, i.e. are of type
UtxoNotifier::OwnMiner
,UtxoNotifier::Cli
, orUtxoNotifier::Myself
.The text was updated successfully, but these errors were encountered: