Bitcoin Forum
December 08, 2016, 04:03:25 AM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Possible use for the double hash in blocks  (Read 827 times)
Sergio_Demian_Lerner
Hero Member
*****
expert
Offline Offline

Activity: 534


View Profile WWW
May 31, 2012, 05:53:03 PM
 #1

It has been said that double hashing in the PoW of the blocks serves to prevent hash extension attacks. This has been refuted: that attack does not make any harm because the hash preimage is public.

Today I realize that there is another reason why double hashing can be useful.

Double hashing can be used to prove that one have a block with certain PoW, before sending the whole header to a peer.

Suppose that H=Hash(W) and W=Hash(Block-header).

We want that blocks travel as fast as they can through the network to reduce the chances of the creation of parallel chains.
The Bitcoin block header size is generally 81 bytes, so each peer must receive at least 81 bytes in order decide if the block will be accepted, and forward it.
But if a node firsts sends only W, then the peer can compute H'=Hash(W) and conclude immediately that a lot of work has been put in order to build W. So the peer can immediately stop what is doing (downloading/uploading transactions) and set maximum priority to receive the block whose header hashes to W and resend it to its peers.

I know that it's not much that is gained (32 bytes instead of 81), but at least that is an use for the double hash.
 
Best regards,
S
1481169805
Hero Member
*
Offline Offline

Posts: 1481169805

View Profile Personal Message (Offline)

Ignore
1481169805
Reply with quote  #2

1481169805
Report to moderator
1481169805
Hero Member
*
Offline Offline

Posts: 1481169805

View Profile Personal Message (Offline)

Ignore
1481169805
Reply with quote  #2

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

Posts: 1481169805

View Profile Personal Message (Offline)

Ignore
1481169805
Reply with quote  #2

1481169805
Report to moderator
dinox
Full Member
***
Offline Offline

Activity: 126


View Profile
June 02, 2012, 10:22:07 PM
 #2

I would say it's latency, and not the size of the block header, that matters.

blockchain.info/fb/1dinox - 1Dinox3mFw8yykpAZXFGEKeH4VX1Mzbcxe
Active trader on #bitcoin-otc - See here - Proof that my nick is dinox here
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!