Author

Topic: Correct way to update? (Read 171 times)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
January 11, 2022, 06:52:17 PM
#5
What I want to know is how to deal with the blockchain files. I guess the best solution is to have a dedicated blocks folder and then build the binaries from scratch on a new folder for each version so I don't overwrite anything and reuse the downloaded blockchain files and generate new chainstate ones.

If you worry the file might be corrupted after upgrade, you just need to create a copy of Bitcoin directory (which contain block, chainstate and other files).
I'd also add stopping bitcoind before the upgrade and restarting it after. Like:

1) Stop Bitcoin Core
2) git pull, git checkout v22.0 ==> recompile
3) Start Bitcoin Core
legendary
Activity: 3472
Merit: 10611
January 09, 2022, 11:06:19 PM
#4
Yeah I always check the SHA256 checksum of the files. I should check gpg sigs too but usually I check SHA256 on Bitcoin Core site and on the github page so its unlikely both get hacked at the same time.
Assuming something is unlikely is not the safe way of conducting things. You must always verify the signature of the files you download and more importantly you must make sure the PGP public key you have is the actual key that the real developer used to sign the binaries.
sr. member
Activity: 317
Merit: 448
January 09, 2022, 02:20:14 PM
#3
I check that sha256 hash matches then I compile it and I overwrite whatever was on the bitcoin folder previously. Is this ok, or should I first delete the bitcoin folder, and the compile it or any other steps I may be missing?

I don't know definition of "correct" in this case, but here are few common recommendation.
1. For security purpose, you may want to verify the signature (which contain hash of the files).
2. Do not overwrite/delete the Bitcoin directory (which contain executable file), but rename/archive it in case compilation failed or newer version has unwanted bug/behavior.

Yeah I always check the SHA256 checksum of the files. I should check gpg sigs too but usually I check SHA256 on Bitcoin Core site and on the github page so its unlikely both get hacked at the same time.

https://github.com/bitcoin-core/guix.sigs/commit/74e11d73285a63c7a3e9fd5eac42054b5ee3014b

What I want to know is how to deal with the blockchain files. I guess the best solution is to have a dedicated blocks folder and then build the binaries from scratch on a new folder for each version so I don't overwrite anything and reuse the downloaded blockchain files and generate new chainstate ones.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
November 22, 2021, 04:53:43 AM
#2
I check that sha256 hash matches then I compile it and I overwrite whatever was on the bitcoin folder previously. Is this ok, or should I first delete the bitcoin folder, and the compile it or any other steps I may be missing?

I don't know definition of "correct" in this case, but here are few common recommendation.
1. For security purpose, you may want to verify the signature (which contain hash of the files).
2. Do not overwrite/delete the Bitcoin directory (which contain executable file), but rename/archive it in case compilation failed or newer version has unwanted bug/behavior.
sr. member
Activity: 317
Merit: 448
November 21, 2021, 11:46:03 PM
#1
If im running 0.20 and I want to run 22.0 and I always compile from source, what I do is I download source code from this link:

https://bitcoincore.org/en/download/

The exact link:

https://bitcoincore.org/bin/bitcoin-core-22.0/bitcoin-22.0.tar.gz

I check that sha256 hash matches then I compile it and I overwrite whatever was on the bitcoin folder previously. Is this ok, or should I first delete the bitcoin folder, and the compile it or any other steps I may be missing?
Jump to: