Bitcoin Forum
September 27, 2018, 10:56:11 PM *
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: clean the orphan blocks from the blockchain ?  (Read 1155 times)
XaiZou
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
1538088971
Hero Member
*
Offline Offline

Posts: 1538088971

View Profile Personal Message (Offline)

Ignore
1538088971
Reply with quote  #2

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

Activity: 1176
Merit: 1000



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
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: 1000



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: 2198
Merit: 1373



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
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: 1000


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:  

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!