-
Notifications
You must be signed in to change notification settings - Fork 36.2k
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
doc: Add warning against wallet.dat re-use #18219
Conversation
ACK 92d56e7 |
Any thoughts on better places to put it? The reason why I put it there was because it's right next to the description of wallet.dat, which is also only bit of documentation that references it at the moment, so I hoped that people that could use this warning would naturally end up in the page where the file is described. |
Should we mention doing this with JBOK wallets can also result in lost coins? (We no longer create them, but we still support them...) |
What is a JBOK wallet? I was running |
"Just a Bunch Of Keys", yes |
This seems like a good place to have the documentation. But another idea might be to create readme files in newly created wallet directories (if |
ACK 92d56e7 I think this is an OK location to put it, I did a quick look around and did not find a better one in a different doc. My only alternative suggestion would be to add a new section to |
Another thing to say here: never copy the file directly, always use the As for a "Sharing files" section: chainstate shouldn't be shared from untrusted people; blocks can be. etc |
I've just added that in, from my understanding of the code, the only benefit that backupwallet provides over a standard copy is that it locks the wallet while the copy is being done, thus preventing any updates to it that could result in a corrupted copy, is that right?
I quite like this idea, if other people also believe that it's better to do it that way over just adding a warning on the docs I'll change this PR to use that approach instead. |
No, it also "finalises" the logs into the single wallet.dat file. Without that step, copying the wallet.dat file alone can miss recent changes. |
To be clear, the suggestion was just supposed to about an additional place this could be documented, not an alternate place. |
I've updated the PR to add that bit.
I see, I'll reserve that change for a new PR then.
I don't know what alternative is better, i guess it depends on how often people try to copy files for other reasons. So far, the only use cases I have thought of for which you'd want to share files are:
For the second use case, I guess that most users that want that would prefer to get some data which is not readily available as a file currently, such as the utxo set and the last 300 blocks like btcpayserver does. Nevertheless I can see some people wanting to do a fast full-sync, so adding a warning on that might be worth it. |
Good idea, and to make the GUI display this. No need to do so in thie PR though! To be clear, my point was "let's merge this we can add it in other places later" not to hold this up. re-ACK after squash. |
Please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits |
See discussion in bitcoin#18205 and bitcoin#18219 (comment).
f96b0c2
to
c1e0742
Compare
Squashed. |
c1e0742 doc: Warn about wallet.dat re-use and backups (Albert) Pull request description: Following discussion in bitcoin#18205, this PR adds a warning against re-use of the same wallet file on two different nodes, as that can cause problems due to race conditions between nodes (eg: both nodes using the same addresses at the same time for different things because they are not aware of the other node). I've also included the rationale behind the warning but I've kept it short to make it clearer to users, not sure if I should have written a longer explanation instead. Also, while this PR may help some users avoid problems, the changes are largely inconsequential, so feel free to close it if it's not worth the effort. On an unrelated note, I've also set up [this site](https://corollari.github.io/bitcoin-core-docs/), which periodically pulls bitcoin core and turns its docs into a webpage. Browsing the docs can also be done locally or on github, so this doesn't add much value, but I personally find that more comfortable and it makes them more searchable. Top commit has no ACKs. Tree-SHA512: 5ce06026176917304932714470be8c3410d35698f925875b0955ecd3b1756ef52793feb469dd4bdac4921f1a24daf59001e9911f1f096f559fb28c250baae378
See discussion in bitcoin#18205 and bitcoin#18219 (comment).
See discussion in #18205 and bitcoin/bitcoin#18219 (comment).
c1e0742 doc: Warn about wallet.dat re-use and backups (Albert) Pull request description: Following discussion in bitcoin#18205, this PR adds a warning against re-use of the same wallet file on two different nodes, as that can cause problems due to race conditions between nodes (eg: both nodes using the same addresses at the same time for different things because they are not aware of the other node). I've also included the rationale behind the warning but I've kept it short to make it clearer to users, not sure if I should have written a longer explanation instead. Also, while this PR may help some users avoid problems, the changes are largely inconsequential, so feel free to close it if it's not worth the effort. On an unrelated note, I've also set up [this site](https://corollari.github.io/bitcoin-core-docs/), which periodically pulls bitcoin core and turns its docs into a webpage. Browsing the docs can also be done locally or on github, so this doesn't add much value, but I personally find that more comfortable and it makes them more searchable. Top commit has no ACKs. Tree-SHA512: 5ce06026176917304932714470be8c3410d35698f925875b0955ecd3b1756ef52793feb469dd4bdac4921f1a24daf59001e9911f1f096f559fb28c250baae378
Summary: > See discussion in [[bitcoin/bitcoin#18205 | PR18205]] and bitcoin/bitcoin#18219 (comment). This is a backport of Core [[bitcoin/bitcoin#18219 | PR18219]] Test Plan: proof-reading in a markdown-aware IDE Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D8826
See discussion in #18205 and bitcoin/bitcoin#18219 (comment).
Following discussion in #18205, this PR adds a warning against re-use of the same wallet file on two different nodes, as that can cause problems due to race conditions between nodes (eg: both nodes using the same addresses at the same time for different things because they are not aware of the other node).
I've also included the rationale behind the warning but I've kept it short to make it clearer to users, not sure if I should have written a longer explanation instead.
Also, while this PR may help some users avoid problems, the changes are largely inconsequential, so feel free to close it if it's not worth the effort.
On an unrelated note, I've also set up this site, which periodically pulls bitcoin core and turns its docs into a webpage. Browsing the docs can also be done locally or on github, so this doesn't add much value, but I personally find that more comfortable and it makes them more searchable.