Bitcoin Forum
May 25, 2024, 03:48:35 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: clean the orphan blocks from the blockchain ?  (Read 1228 times)
XaiZou (OP)
Member
**
Offline Offline

Activity: 80
Merit: 10


View Profile
August 12, 2015, 09:46:16 AM
 #1

Hi,

Is there a way to remove/clean the orphan blocks from the blockchain ?

is that going to reduce the total size (GB) of the blockchain ?


Thanks
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1003



View Profile
August 12, 2015, 10:47:36 AM
 #2

There are no orphan blocks in the blockchain.

The fact that a block is not in the blockchain (because another block ended up being part of a longer chain) is essentially what makes a block orphaned.

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
XaiZou (OP)
Member
**
Offline Offline

Activity: 80
Merit: 10


View Profile
August 12, 2015, 10:56:50 AM
 #3

There are no orphan blocks in the blockchain.

The fact that a block is not in the blockchain (because another block ended up being part of a longer chain) is essentially what makes a block orphaned.

Thanks for the info, what do you think about this ?

i used a blockchain parser :

Building complete block-chain.
Found 369,344 blocks and skipped 40 orphan blocks.
Finished scanning block headers. Built block-chain with 369344 blocks found..
Kazimir
Legendary
*
Offline Offline

Activity: 1176
Merit: 1003



View Profile
August 12, 2015, 12:22:48 PM
 #4

I guess they are leftover orphaned blocks that still reside in some nodes' mempools. They will be discarded eventually.

In theory, there's no difference between theory and practice. In practice, there is.
Insert coin(s): 1KazimirL9MNcnFnoosGrEkmMsbYLxPPob
DannyHamilton
Legendary
*
Offline Offline

Activity: 3402
Merit: 4656



View Profile
August 12, 2015, 12:30:55 PM
 #5

I guess they are leftover orphaned blocks that still reside in some nodes' mempools.

No, they aren't. Full nodes store the orphaned blocks on disk along with the rest of the blockchain.  They do not reside in the mempool.

They will be discarded eventually.

No, they won't.

Full nodes keep a copy of the orphaned blocks that they are aware of.

You can reinstall your node and let it resynchronize with the network if you want to clean out the orphan blocks that it is storing, but as has been pointed out, there really aren't very many of them, and they aren't taking up much space.  You'll go through all that effort and free up maybe 20 MB of space?  Why bother?
XaiZou (OP)
Member
**
Offline Offline

Activity: 80
Merit: 10


View Profile
August 12, 2015, 07:59:51 PM
 #6

I guess they are leftover orphaned blocks that still reside in some nodes' mempools.

No, they aren't. Full nodes store the orphaned blocks on disk along with the rest of the blockchain.  They do not reside in the mempool.

They will be discarded eventually.

No, they won't.

Full nodes keep a copy of the orphaned blocks that they are aware of.

You can reinstall your node and let it resynchronize with the network if you want to clean out the orphan blocks that it is storing, but as has been pointed out, there really aren't very many of them, and they aren't taking up much space.  You'll go through all that effort and free up maybe 20 MB of space?  Why bother?

oh well, thanks for the info, i though maybe lots of orphans are there like 5+ GB or more.
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
August 13, 2015, 07:51:24 AM
 #7

Found 369,344 blocks and skipped 40 orphan blocks.
No significant reasons waste time to save 40- megabytes.

You can do the following:
1) copy blk*.dat bootstrap.dat (concatenate in right order to one file)
2) backup wallet.dat and remove all files from datadir
3) rebuild datadir with bootstrap.dat
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!