Bitcoin Forum
December 11, 2024, 10:49:18 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is the data in blocks and chainstate equal on all systeems  (Read 977 times)
somedude5 (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 2


View Profile
March 21, 2016, 09:11:05 AM
Merited by ABCbits (2)
 #1

Hello !

I was wondering if you would take the hash of every file inside the blocks folder and
chainstate folder and compere these hashes of another system running bitcoin. Would these
be the same ? ( except ofcource the newest ones that are still written )
unamis76
Legendary
*
Offline Offline

Activity: 1512
Merit: 1012


View Profile
March 21, 2016, 01:30:13 PM
 #2

Yes, every copy of the blockchain has to be the same, otherwise it wouldn't work Cheesy
DannyHamilton
Legendary
*
Offline Offline

Activity: 3514
Merit: 4894



View Profile
March 21, 2016, 01:51:56 PM
Merited by ABCbits (3)
 #3

Yes, every copy of the blockchain has to be the same, otherwise it wouldn't work Cheesy

I don't think this is entirely true.

Hello !

I was wondering if you would take the hash of every file inside the blocks folder and
chainstate folder and compere these hashes of another system running bitcoin. Would these
be the same ? ( except ofcource the newest ones that are still written )

No.  I think they might not be the same.

If I'm remembering correctly, Bitcoin Core keeps a record of all the orphaned blocks that it received.  Since the system that you are comparing against might not have received the same orphaned blocks, the hashes of the files may not be the same.
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1134


View Profile WWW
March 21, 2016, 04:22:22 PM
 #4

Yes, every copy of the blockchain has to be the same, otherwise it wouldn't work Cheesy

I don't think this is entirely true.

Hello !

I was wondering if you would take the hash of every file inside the blocks folder and
chainstate folder and compere these hashes of another system running bitcoin. Would these
be the same ? ( except ofcource the newest ones that are still written )

No.  I think they might not be the same.

If I'm remembering correctly, Bitcoin Core keeps a record of all the orphaned blocks that it received.  Since the system that you are comparing against might not have received the same orphaned blocks, the hashes of the files may not be the same.
correct
at the time it receives it, it was the tip, so it gets added to the append only file. but the file is just a sequential storing of the chaintip and since block propagations will "often" create a one block reorg based on delay for the stronger block to reach nodes, it is highly unlikely any two nodes that are not very closely connected (all the time) would have identical contents

if you want a unique set of hashes, you need to iteration though and only use the mainchain

James

"often" is relatively speaking, the one block reorg is expected even without any attack type scenario. There are a few 3, 6, 30 block reorgs causes by non-propagation events and those actually might be identical for most the nodes

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
watashi-kokoto
Sr. Member
****
Offline Offline

Activity: 689
Merit: 269



View Profile
March 21, 2016, 05:29:37 PM
 #5

It can be different. I know this because I used to have two different chains backups.

Deleted the bigger, problem solved.
jl777
Legendary
*
Offline Offline

Activity: 1176
Merit: 1134


View Profile WWW
March 21, 2016, 06:23:19 PM
Merited by ABCbits (2)
 #6

It can be different. I know this because I used to have two different chains backups.

Deleted the bigger, problem solved.

This will usually work on the same system, but the OP is asking about different systems, so unless the two different systems did a fresh sync from scratch, odds are pretty good they have a slightly different set of blocks. historically there are about 1 one block reorg per day, ie about 1% chance for any given block. Given 600 second blocks and 6 second propagation time, maybe that is the reason.

https://bitcointalk.org/index.php?topic=1403436.0 http://pastebin.com/LZxst5vD

So given two systems that are having different set of peers, I would think that after a week or so it is almost certain that they would have a different set of raw blocks and also a different DB

http://www.digitalcatallaxy.com/report2015.html
100+ page annual report for SuperNET
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1540


No I dont escrow anymore.


View Profile
March 22, 2016, 08:27:33 AM
 #7

Keep the chainstate obfuscation on Windows systems running 0.12 in mind. Its a simple XOR, but it would result in a different hash for the chainstate files, even if the orphans where identical compared to a Linux system.

Im not really here, its just your imagination.
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!