Author

Topic: How safe is it to reuse existing blockchain files? (Read 198 times)

legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
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.
sr. member
Activity: 476
Merit: 314
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).
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
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?
staff
Activity: 3458
Merit: 6793
Just writing some code
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.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
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.
legendary
Activity: 1372
Merit: 1252
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?
Jump to: