Bitcoin Forum
December 11, 2024, 06:15:56 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Disable pruning on a node with a pruned block chain  (Read 224 times)
darosior (OP)
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
January 19, 2019, 03:53:19 PM
Merited by ABCbits (1)
 #1

Hi,

I had to prune a bitcoin-core node I run because of the available disk space. I'll manage to get more space in the coming week and I'll disable pruning. I was wondering : what will happen at this stage ? Since blocks were validated and then erased, will the node re-validate all my missing blocks and then every block on top of it ? This would make me revalidate the entire block chain.
aliashraf
Legendary
*
Offline Offline

Activity: 1456
Merit: 1176

Always remember the cause!


View Profile WWW
January 19, 2019, 04:19:00 PM
 #2

Hi,

I had to prune a bitcoin-core node I run because of the available disk space. I'll manage to get more space in the coming week and I'll disable pruning. I was wondering : what will happen at this stage ? Since blocks were validated and then erased, will the node re-validate all my missing blocks and then every block on top of it ? This would make me revalidate the entire block chain.
I'm not aware of any built in api in bitcoin to help it in a more efficient way than just a clean bootstrap but more importantly, I'm curious what the incentive would be if you are convinced about the validity of the chain your node is committed to and you have long enough chain length? Won't it suffice to just disable more pruning thereafter?
darosior (OP)
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
January 19, 2019, 04:23:35 PM
 #3

Won't it suffice to just disable more pruning thereafter?
I may have misexplained but disable pruning is what I want to do. If you are asking about the incentive of disabling it, I want to be able to set `txindex=1` and then run a transaction explorer.
darosior (OP)
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
January 19, 2019, 07:25:26 PM
 #4

AFAIK bitcoin core will re-download and re-verify all missing blocks

Won't it suffice to just disable more pruning thereafter?
I may have misexplained but disable pruning is what I want to do. If you are asking about the incentive of disabling it, I want to be able to set `txindex=1` and then run a transaction explorer.

I don't get what you're trying to tell. but you can't enable txindex if you enable prune mode
That's exactly my point. I'll describe it step by step :
step 1 -> I have a pruned node
step 2 -> I disable pruning
step 3 -> The block chain is no longer pruned
I was just asking what happened between steps 2 and 3.
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3570
Merit: 6927


Just writing some code


View Profile WWW
January 19, 2019, 07:31:22 PM
Merited by darosior (5), Foxpup (3), Wind_FURY (3), bones261 (2), ABCbits (1)
 #5

That's exactly my point. I'll describe it step by step :
step 1 -> I have a pruned node
step 2 -> I disable pruning
step 3 -> The block chain is no longer pruned
I was just asking what happened between steps 2 and 3.
The blockchain will be redownloaded and reindexed. It is not validated again as the blocks being downloaded have already been validated and that information is stored. Only the blocks themselves will be downloaded and added to the block index.

Since you plan on enabled txindex too, you should disable pruning and enable txindex in the same step. That way the txindex will be built at the same time that the blocks are reindexed after they are downloaded. This will prevent you from having to reindex twice.

darosior (OP)
Sr. Member
****
Offline Offline

Activity: 279
Merit: 435


View Profile
January 19, 2019, 07:40:20 PM
 #6

That's exactly my point. I'll describe it step by step :
step 1 -> I have a pruned node
step 2 -> I disable pruning
step 3 -> The block chain is no longer pruned
I was just asking what happened between steps 2 and 3.
The blockchain will be redownloaded and reindexed. It is not validated again as the blocks being downloaded have already been validated and that information is stored. Only the blocks themselves will be downloaded and added to the block index.

Since you plan on enabled txindex too, you should disable pruning and enable txindex in the same step. That way the txindex will be built at the same time that the blocks are reindexed after they are downloaded. This will prevent you from having to reindex twice.
Thank you for the clear answer and the advice.
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!