Bitcoin Forum
May 08, 2024, 08:05:55 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Does this make sense? (Idea to speed up block generation)  (Read 1299 times)
eoJ (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
November 07, 2013, 05:57:30 PM
 #1

Instead of making this post overcomplicated, by getting hashes involved, let's say block generation is based on succesfully guessing a number, from 1-100.

You have a room of 10 people, they're allowed to make one guess every 5 seconds. You want to guess the number as fast as possible.

Do you get them all to just blurt out random numbers every 5 seconds (creating a ton of overlap) or do you assign each of them a range, one person is 1-10, another is 11-20, another is 21-30, etc. The answer seems obvious.

I can't say I have a huge understanding of the block hashing algorithm, so if this is a stupid idea/would never work, feel free to say, a long answer isn't required.

However, could the same principle not be applied to hashes? Each gets assigned a certain range, and from there it's random. People can set their own assigned range if they so desire. As a result of the decreased overlap, blocks are generated faster, and less time is wasted trying hashes that've already been tried.

Again, sorry if this is a stupid idea. Thoughts?
1715155555
Hero Member
*
Offline Offline

Posts: 1715155555

View Profile Personal Message (Offline)

Ignore
1715155555
Reply with quote  #2

1715155555
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
john11johng
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
November 07, 2013, 06:04:35 PM
 #2

Well block generation is set at a target for every 10 minutes. 


Currently this is above target. Why would it need to be quicker?
eoJ (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
November 07, 2013, 06:09:22 PM
 #3

Well block generation is set at a target for every 10 minutes. 


Currently this is above target. Why would it need to be quicker?
Because half an hour is a long time for a shop owner to wait, to give one example.
pontiacg5
Sr. Member
****
Offline Offline

Activity: 364
Merit: 250



View Profile
November 07, 2013, 06:12:45 PM
 #4

Hashing doesn't work that way. You have no idea what a number's resulting hash will be until you do the work.

The only thing you can change is the noonce. It is possible to give a group of people a set of numbers to try as a noonce. They call these mining pools.

Trying to get the block solve time below what is is coded for in protocol, permanently, is a loosing battle.

Please DO NOT send me private messages asking for help setting up GPU miners. I will not respond!!!
eoJ (OP)
Full Member
***
Offline Offline

Activity: 140
Merit: 100


View Profile
November 07, 2013, 06:33:20 PM
 #5

Fair enough, I knew there was a flaw in that plan Smiley
lnternet
Sr. Member
****
Offline Offline

Activity: 299
Merit: 253


View Profile
November 07, 2013, 11:38:04 PM
 #6

If we were guessing numbers 0-10, double guessing would indeed make it less efficient by a lot. But we are number guessing 0 - 2^265, so avoiding double guessing will be more than negligible if you look at the efficency.

1ntemetqbXokPSSkuHH4iuAJRTQMP6uJ9
Racer8
Full Member
***
Offline Offline

Activity: 150
Merit: 100


View Profile
November 08, 2013, 10:59:12 PM
 #7

The only thing you can change is the noonce. It is possible to give a group of people a set of numbers to try as a noonce. They call these mining pools.

As a matter of interest how is the noonce chosen by mining programs when you are solo mining?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
November 08, 2013, 11:06:57 PM
 #8

The only thing you can change is the noonce. It is possible to give a group of people a set of numbers to try as a noonce. They call these mining pools.

As a matter of interest how is the noonce chosen by mining programs when you are solo mining?

Same way you do when pool mining try them all?

Take a block header, append 0x00000000 (zero nonce) hash it, is it good?  nope.  Increment it by one.  Try again.  Keep going until you find a good hash or you reach the highest nonce 2^32 -1. 

When you reach the highest nonce, modify something in the blockheader (timestamp, txs, field in coinbase tx, etc) and start all over again.  Continue until you either die or find a block.  If you find a block publish it to the network and start all over.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
November 08, 2013, 11:10:46 PM
 #9

If we were guessing numbers 0-10, double guessing would indeed make it less efficient by a lot. But we are number guessing 0 - 2^265, so avoiding double guessing will be more than negligible if you look at the efficency.

There is no double guessing.

We aren't guessing just a nonce.

It is:

IF SHA-256(SHA-256(block header))  < target THEN you solved a block.

The block header contains more than just the nonce. 
https://en.bitcoin.it/wiki/Block_hashing_algorithm

One thing it contains is the merkle tree which is a unique hash representing the txs in the block.   One of those transactions is the coinbase or "free coins" transaction.  Every pool or solo miner is going to have a unique reward tx thus the merkle tree is unique and thus the block header is unique.

The only way there is duplicate work is if a poorly designed pool sends the same work to two different miners.  Of course a pool that does that is going to earn <100% of their reward and if they are really bad (like duplicate all work) it would be 50%.  The bad pool fails and miners go to better run pools.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
November 08, 2013, 11:12:42 PM
 #10

Well block generation is set at a target for every 10 minutes. 


Currently this is above target. Why would it need to be quicker?
Because half an hour is a long time for a shop owner to wait, to give one example.

There is no overlap, all miners are working on unique work. 
The 10 minute target is a design decision.  It could be 100 minute or 1 minute.  No need to change mining to target a different interval. 
Racer8
Full Member
***
Offline Offline

Activity: 150
Merit: 100


View Profile
November 08, 2013, 11:32:41 PM
 #11

The only thing you can change is the noonce. It is possible to give a group of people a set of numbers to try as a noonce. They call these mining pools.

As a matter of interest how is the noonce chosen by mining programs when you are solo mining?

Same way you do when pool mining try them all?

Take a block header, append 0x00000000 (zero nonce) hash it, is it good?  nope.  Increment it by one.  Try again.  Keep going until you find a good hash or you reach the highest nonce 2^32 -1. 

When you reach the highest nonce, modify something in the blockheader (timestamp, txs, field in coinbase tx, etc) and start all over again.  Continue until you either die or find a block.  If you find a block publish it to the network and start all over.

Thanks for the explanation.  Is the current block header the starting point - i.e. will all solo miners be starting with the same value?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
November 08, 2013, 11:44:10 PM
 #12

Thanks for the explanation.  Is the current block header the starting point - i.e. will all solo miners be starting with the same value?

No.  The nonce range is only 2^32 or ~4 billion values (in hindsight mining algorithm would be a lot cleaner if Satoshi had made it 64 bit nonce but no changing that now).  This means a 400 GH/s rig for example will go through the entire nonce range on a block header in 1/100th of a second. 

There is more info two posts up but all miners are working on UNIQUE block headers and changing them to different unique block headers.  No two miners (outside of badly coded pool) are ever working on the same "work" (blockheader).
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!