Bitcoin Forum
July 10, 2024, 03:24:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Correct way to update?  (Read 151 times)
takuma sato (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 432


View Profile
November 22, 2021, 04:46:03 AM
Merited by vapourminer (2)
 #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?
ABCbits
Legendary
*
Offline Offline

Activity: 2926
Merit: 7646


Crypto Swap Exchange


View Profile
November 22, 2021, 09:53:43 AM
Merited by vapourminer (2), NeuroticFish (2), pooya87 (2), Charles-Tim (1)
 #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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
takuma sato (OP)
Sr. Member
****
Offline Offline

Activity: 308
Merit: 432


View Profile
January 09, 2022, 07: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.
pooya87
Legendary
*
Offline Offline

Activity: 3500
Merit: 10705



View Profile
January 10, 2022, 04:06:19 AM
 #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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5830


not your keys, not your coins!


View Profile WWW
January 11, 2022, 11:52:17 PM
Merited by vapourminer (1)
 #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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!