Bitcoin Forum
September 22, 2018, 04:33:09 AM *
News: ♦♦ New info! Bitcoin Core users absolutely must upgrade to previously-announced 0.16.3 [Torrent]. All Bitcoin users should temporarily trust confirmations slightly less. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How safe is it to reuse existing blockchain files?  (Read 75 times)
cellard
Legendary
*
Offline Offline

Activity: 1134
Merit: 1145


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?

1537590789
Hero Member
*
Offline Offline

Posts: 1537590789

View Profile Personal Message (Offline)

Ignore
1537590789
Reply with quote  #2

1537590789
Report to moderator
1537590789
Hero Member
*
Offline Offline

Posts: 1537590789

View Profile Personal Message (Offline)

Ignore
1537590789
Reply with quote  #2

1537590789
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1537590789
Hero Member
*
Offline Offline

Posts: 1537590789

View Profile Personal Message (Offline)

Ignore
1537590789
Reply with quote  #2

1537590789
Report to moderator
1537590789
Hero Member
*
Offline Offline

Posts: 1537590789

View Profile Personal Message (Offline)

Ignore
1537590789
Reply with quote  #2

1537590789
Report to moderator
1537590789
Hero Member
*
Offline Offline

Posts: 1537590789

View Profile Personal Message (Offline)

Ignore
1537590789
Reply with quote  #2

1537590789
Report to moderator
ranochigo
Legendary
*
Online Online

Activity: 1540
Merit: 1086


View Profile WWW
March 26, 2018, 03:39:36 PM
 #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.

achow101
Moderator
Legendary
*
Offline Offline

Activity: 1526
Merit: 1638


3F1Y9yquzvY6RWvKbw2n2zeo9V5mvBhADU


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
*
Online Online

Activity: 1540
Merit: 1086


View Profile WWW
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?

wilwxk
Sr. Member
****
Offline Offline

Activity: 476
Merit: 312


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).

            ▄▄████▄▄
        ▄▄██████████████▄▄
      ███████████████████████▄▄
      ▀▀█████████████████████████
██▄▄       ▀▀█████████████████████
██████▄▄        ▀█████████████████
███████████▄▄       ▀▀████████████
███████████████▄▄        ▀████████
████████████████████▄▄       ▀▀███
 ▀▀██████████████████████▄▄
     ▀▀██████████████████████▄▄
▄▄        ▀██████████████████████▄
████▄▄        ▀▀██████████████████
█████████▄▄        ▀▀█████████████
█████████████▄▄        ▀▀█████████
██████████████████▄▄        ▀▀████
▀██████████████████████▄▄
  ▀▀████████████████████████
      ▀▀█████████████████▀▀
           ▀▀███████▀▀



.SEMUX
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
  Semux uses 100% original codebase
  Superfast with 30 seconds instant finality
  Tested 5000 tx per block on open network
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
█ █
ranochigo
Legendary
*
Online Online

Activity: 1540
Merit: 1086


View Profile WWW
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.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!