Bitcoin Forum
May 06, 2024, 07:19:02 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How safe is it to reuse existing blockchain files?  (Read 176 times)
cellard (OP)
Legendary
*
Offline Offline

Activity: 1372
Merit: 1250


View Profile
March 26, 2018, 03:24:17 PM
 #1

Let's say you have a very old Bitcoin folder and you want to get a new node in a new laptop which uses a different OS... am I safe by using existing blockchain files (not chainstate files) or should I just go through the hell of having a 100% clean download and re-sync of it all?

I have seem conflicting arguments on this. The purists argue that you should never reuse files, and the rest say that it's safe because these files cannot be manipulated in any way in which would put your new node in trouble... thoughts?
1714979942
Hero Member
*
Offline Offline

Posts: 1714979942

View Profile Personal Message (Offline)

Ignore
1714979942
Reply with quote  #2

1714979942
Report to moderator
1714979942
Hero Member
*
Offline Offline

Posts: 1714979942

View Profile Personal Message (Offline)

Ignore
1714979942
Reply with quote  #2

1714979942
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714979942
Hero Member
*
Offline Offline

Posts: 1714979942

View Profile Personal Message (Offline)

Ignore
1714979942
Reply with quote  #2

1714979942
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
March 26, 2018, 03:39:36 PM
Last edit: March 26, 2018, 04:11:44 PM by ranochigo
 #2

You're pretty safe with it. If you've downloaded it, then you have probably verified it yourself.

The main thing with this is that, AFAIK, the client only verifies the blocks 6 block deep and not all. The problem with this is that all of the other blocks are to be assumed to be valid. Unless you delete the block index or set your client to validate everything, you are trusting that everything is correct.

Edit: If you don't copy the chainstate and index, then your client would be verifying everything again so there wouldn't be any risks at all.

Sorry for the confusion, I was under the impression that Core still validates all the blocks at start up.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6581


Just writing some code


View Profile WWW
March 27, 2018, 04:26:02 AM
 #3

I have seem conflicting arguments on this. The purists argue that you should never reuse files, and the rest say that it's safe because these files cannot be manipulated in any way in which would put your new node in trouble... thoughts?
Without the chainstate, it doesn't matter because your node will validate the blocks anyways and fetch whatever it doesn't have.

The argument only matters if you are copying over the chainstate too since then you have to trust that the chainstate you are copying has not been modified. Usually you can trust yourself and your computer so it really isn't an issue. It's only an issue if you have malware or someone has maliciously accessed your computer.

ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
March 27, 2018, 08:34:40 AM
 #4

Without the chainstate, it doesn't matter because your node will validate the blocks anyways and fetch whatever it doesn't have.

The argument only matters if you are copying over the chainstate too since then you have to trust that the chainstate you are copying has not been modified. Usually you can trust yourself and your computer so it really isn't an issue. It's only an issue if you have malware or someone has maliciously accessed your computer.
Doesn't the client just rebuild using the blockchain index only? Blockchain index contains information about the blocks and they are verified and inserted there if I'm not wrong.

Does the client actually verify the validity of all the blocks again when remaking the chainstate?

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
wilwxk
Sr. Member
****
Offline Offline

Activity: 476
Merit: 314


View Profile
March 27, 2018, 01:02:43 PM
 #5

Anyway, if you downloaded a modified blockchain, there is no chance to lost your money with it, because if the transaction bradcast still works, the other nodes will verify if the transaction is valid and if you really have the sent amount, the worst case in this case is if the fake blockchain doesnt have your updated balance. (there is other problems too, but i think this is the biggest).
ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
March 27, 2018, 01:24:33 PM
 #6

Anyway, if you downloaded a modified blockchain, there is no chance to lost your money with it, because if the transaction bradcast still works, the other nodes will verify if the transaction is valid and if you really have the sent amount, the worst case in this case is if the fake blockchain doesnt have your updated balance. (there is other problems too, but i think this is the biggest).
If you somehow download a malicious blockchain that is modified, your blockchain data will be different from others. You could potentially be tricked to seeing transactions that are otherwise invalid (with non existent) inputs. This is the potentially a serious problem when you're downloading a pre-validated blockchain from others.

If your client validates everything, then it isn't a problem. IIRC, there's a command that rebuilds the chain state only and I don't remember having to validate all the blocks again. I could be wrong, of course.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!