Bitcoin Forum
November 15, 2018, 01:59:01 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Possibility of a very low next block hash  (Read 251 times)
Haw
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 07, 2017, 07:36:03 PM
 #1

I’ve just started reading about the math of Bitcoin.

If I look at the blockhashes of the Bitcoin blocks we start the f with blocks of a few leading zeros, and right now (latest block at the time of writing is #493508) we’re at 18 leading zeros.

Since the hash algorithm may create an almost random number from the input, so for the function sha256(sha256(previous_blockhash+nonce)), there must be a theoretical chance that the next valid blockhash is much much smaller, say 20 or more leading zeros.

Is this possible or is there something in the algorithm that forbids this?

If possible, what would happen if the next block hash is much much smaller that the previous one? Does it make mining of the next block more difficult, or does the next valid block hash only have to be smaller that the set difficulty and not smaller that the previous hash?

If the next difficulty is decreased, there must also be a possibility that we’ve missed a couple of valid hashblocks, so we could have mined more bitcoins at the previous difficulty. Yes?
1542290341
Hero Member
*
Offline Offline

Posts: 1542290341

View Profile Personal Message (Offline)

Ignore
1542290341
Reply with quote  #2

1542290341
Report to moderator
1542290341
Hero Member
*
Offline Offline

Posts: 1542290341

View Profile Personal Message (Offline)

Ignore
1542290341
Reply with quote  #2

1542290341
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1542290341
Hero Member
*
Offline Offline

Posts: 1542290341

View Profile Personal Message (Offline)

Ignore
1542290341
Reply with quote  #2

1542290341
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1385



View Profile
November 07, 2017, 08:20:56 PM
 #2

Since the hash algorithm may create an almost random number from the input, so for the function sha256(sha256(previous_blockhash+nonce)),

That's not exactly the right formula.

It is actually:
SHA256(SHA256(Current_block_header))

Where the current block header includes 6 pieces of information:

  • Version
  • previous_block_hash
  • merkle_root
  • timestamp
  • difficulty_target (expressed in a format named "bits")
  • nonce

there must be a theoretical chance that the next valid blockhash is much much smaller, say 20 or more leading zeros.

Absolutely.  Nothing wrong with that.  The result only needs to be less than the current target. It doesn't matter how much less.

Is this possible or is there something in the algorithm that forbids this?

Nope.  Nothing forbids it.

If possible, what would happen if the next block hash is much much smaller that the previous one?

It wouldn't matter.  All that matters is that the hash is smaller than the current difficulty target.  The values of the hashes of the previous blocks in the chain have no bearing on that.

Does it make mining of the next block more difficult,

Nope.  Each hash of the next block has an equal chance of being any value between 0 and 2256.  As long as that value is less than the target value (and the rest of the block is valid), it will be accepted.

or does the next valid block hash only have to be smaller that the set difficulty and not smaller that the previous hash?

Correct.

If the next difficulty is decreased, there must also be a possibility that we’ve missed a couple of valid hashblocks, so we could have mined more bitcoins at the previous difficulty. Yes?

No.

Each block has a specific block subsidy (currently 12.5 BTC).  That subsidy is adjusted every 210000 blocks regardless of how long it took to create those blocks.  The difficulty is adjusted every 2016 blocks, regardless of how long it takes to create those blocks.

Note:  Difficulty doesn't always increase.

Difficulty is adjusted to keep the block generation close to an average of 10 minutes per block.  If it takes more than 20160 minutes to solve 2016 blocks, then blocks are happening too slowly, so the difficulty is DECREASED to speed up block creation.

Haw
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
November 07, 2017, 08:25:04 PM
 #3

Thanks
haltingprobability
Member
**
Offline Offline

Activity: 98
Merit: 20


View Profile
November 07, 2017, 11:19:21 PM
 #4

@OP: Yes, that can happen. It is called a golden nonce.
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!