Author

Topic: time to re-sync a full node after power-outage (Read 58 times)

hero member
Activity: 714
Merit: 1298
Cashback 15%
Hello,

for the case there should be a power outage, will the entire blockchain be downloaded again or only the changes (since the outage)?


Thank you!

Most commonly a power outage results in irreversible corruption of data bases relevant to blockchain copy on you disk thus IBD will be inevitable fact of life if you don't have the backup.

I have backup 2TB SSD disk (which I  synch on regular monthly base)  for such cases. Thus should the outrage happens I will copy the content of this  disk to SSD which is attached  to my bitcoin node.

legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
for the case there should be a power outage, will the entire blockchain be downloaded again or only the changes (since the outage)?
This only always applies in case of corruption if your blockchain is "pruned". (check your settings and bitcoin.conf file)
That's because whether the corruption is only in your chainstate or block index, the pruned blocks needs to be re-downloaded and verified to rebuild those data.

Otherwise, most of the time, you'll only need --reindex-chainstate or --reindex depending on the error in your "debug.log" file.
Those wont download the blockchain but build the target database from your existing blockchain.
Don't blindly restart IBD or --reindex without consulting your logs first since it could save you a lot of time and/or bandwidth.
legendary
Activity: 2954
Merit: 4158
Good question, and the answer is simple, No, you don't have to download the entire blockchain again as you used the word again which means you have already downloaded let's say at some X block you have downloaded and synchronized all. And after that your machines shut down by power outage or any other reason and don't opens for like 1 or 2 days even for 1 hours let's say.

The blocks made after those X blocks will be the ones, downloaded and synchrinze in order to start a full node again. Just like when a new person plans to start a node he have to download all of the previous blockchain data.
That is provided that there is no database corruption, which can be quite common for Bitcoin Core which are in the midst of writing to disk.
sr. member
Activity: 1204
Merit: 466
#SWGT CERTIK Audited
Good question, and the answer is simple, No, you don't have to download the entire blockchain again as you used the word again which means you have already downloaded let's say at some X block you have downloaded and synchronized all. And after that your machines shut down by power outage or any other reason and don't opens for like 1 or 2 days even for 1 hours let's say.

The blocks made after those X blocks will be the ones, downloaded and synchrinze in order to start a full node again. Just like when a new person plans to start a node he have to download all of the previous blockchain data.
legendary
Activity: 2954
Merit: 4158
Bitcoin Core is quite sensitive to database corruption if you're met with an unclean shutdown especially during IBD. However, there are instances where the corruption lies in the chainstate rather than the blocks. In this case, it would be faster than reindexing the blocks from the start.

A lot of the reports were from the earlier versions of Bitcoin Core where the architecture of the leveldb was different and it relied on memory-mapped files for UTXOs. You probably would get a corruption warning if you're actively writing to the database during the point of shutdown. If you only need to reindex the chainstate, you can run --reindex-chainstate which is faster than reindexing all the blocks (and chainstate) with -reindex.
hero member
Activity: 2310
Merit: 757
Bitcoin = Financial freedom
Hello,

for the case there should be a power outage, will the entire blockchain be downloaded again or only the changes (since the outage)?


Thank you!

It can go either way, there are people who said they just started from where it left even after the hard shutdown and in many cases they might needed reindexing which means you have to download the entire blockchain again to get things going.

It's always better to have a backup power or atleast the mini PC inverter which can give you few minutes time to save and shutdown properly, it's necessary to have one not just for nodes but anyone who use PC's to avoid data corruption.
sr. member
Activity: 336
Merit: 495
Math + Code = Blockchain 😁
Hello,

for the case there should be a power outage, will the entire blockchain be downloaded again or only the changes (since the outage)?


Thank you!
Synchronization of a node with the block chain mainly entails downloading the block chain data and storing the necessary files to your computer's drive. And just like DaveF mentioned, there should be no problem as long as none of the data got corrupt during the process of sudden shut down. To avoid this you can make use of a backup power plan like a UPS during the sync period. I also believe that your device processing power also has a nice role to play here.

For a majority of devices you should be able to continue from your point during the sync. I suggest that if the syncronisation hasn't gone far before the outage you could just restart the entire process to avoid a situation where you get an error after the sync is complete.
legendary
Activity: 3458
Merit: 6231
Crypto Swap Exchange
Hello,

for the case there should be a power outage, will the entire blockchain be downloaded again or only the changes (since the outage)?


Thank you!

Loaded question. IF there was no corruption it *should* pick up where it left off more or less.
BUT, if things were being written to the drive and corruption happened then you may need to start again.

Sadly, the best answer is 'it depends' you can search the forum and see a lot of people who have had problems due to power blips.
BUT, what you don't see are the countless people who had power issues and just kept on going with no problems when the power came back.
We only see the problems.

Kind of like my job, I only get calls when there is a problem. I don't get calls with people just wanting to say "Hi, the network is fine just wanted to let you know"

-Dave
member
Activity: 72
Merit: 33
Hello,

for the case there should be a power outage, will the entire blockchain be downloaded again or only the changes (since the outage)?


Thank you!
Jump to: