Bitcoin Forum
May 05, 2024, 04:57:58 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Can someone help me understand Blocks?  (Read 2087 times)
JollyGreen (OP)
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
February 22, 2011, 03:49:34 AM
 #1

So, i'm running puddinpop's rpcminer for a gpu.

1.) I assume it is searching for a new block such that the new block is linked to the latest block in the block chain.

2.) I think I read that a new block is found based on the number of leading zeros in the output hash for the new block computation.  Is there a way to query for the number of leading zeros required?

3.) There is something running to make sure that a new block is only found every 10 minutes.  How does the p2p network control this?

4.) If I watch the output of puddinpop's software, occasionally it spits out "Found Hash!" and it reports something that looks like a hash with leading zeros.  Why is the software finding more of these than one per 10 minutes?  I guess there are multiple possibilities for each block and whoever returns the first block hash with the correct amount of leading zeros is assigned to that block?

5.) I also think I read on a page that the bitcoin network asseses the number of blocks created in the past two weeks and uses that to scale the processing power required to find blocks such that the combined cpu power of the network will only find 6 blocks per hour.  I assume this is controlled by increasing or decreasing the number of leading zeros required in front of a hash for a new block.  Does the network enforce this by deciding every two weeks how many leading zeros are required at the front of new blocks?

I'm really trying to exactly nail down what constitutes a block, and what we are doing to go about "finding", creating and verifying those blocks.
1714885078
Hero Member
*
Offline Offline

Posts: 1714885078

View Profile Personal Message (Offline)

Ignore
1714885078
Reply with quote  #2

1714885078
Report to moderator
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714885078
Hero Member
*
Offline Offline

Posts: 1714885078

View Profile Personal Message (Offline)

Ignore
1714885078
Reply with quote  #2

1714885078
Report to moderator
1714885078
Hero Member
*
Offline Offline

Posts: 1714885078

View Profile Personal Message (Offline)

Ignore
1714885078
Reply with quote  #2

1714885078
Report to moderator
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
February 22, 2011, 04:04:26 AM
 #2

So, i'm running puddinpop's rpcminer for a gpu.

1.) I assume it is searching for a new block such that the new block is linked to the latest block in the block chain.

Correct


2.) I think I read that a new block is found based on the number of leading zeros in the output hash for the new block computation.  Is there a way to query for the number of leading zeros required?

Yes, it is the "difficulty" factor.  You can see it at bitcoincharts.com.  It is currently about 36000.

Expressed as "number of (hexadecimal) zeroes", you could calculate that as: log2(difficulty)/4 + 8, which right now is about 11 or 12.  (It is not strictly number of zeros, it's "is the hash less than a number (that number being 2^224 / difficulty)")

3.) There is something running to make sure that a new block is only found every 10 minutes.  How does the p2p network control this?


It's average 10 minutes.  The difficulty is the only control.  As mining increases sharply, the average time decreases, and then the difficulty jumps even more to correct for it.



4.) If I watch the output of puddinpop's software, occasionally it spits out "Found Hash!" and it reports something that looks like a hash with leading zeros.  Why is the software finding more of these than one per 10 minutes?  I guess there are multiple possibilities for each block and whoever returns the first block hash with the correct amount of leading zeros is assigned to that block?


Yes, there are practically infinite possibilities for each block.  Since each miner is trying to commit a block that includes a transaction to him/herself, every miner is hashing something different, no two miners are trying to hash the same thing.


5.) I also think I read on a page that the bitcoin network asseses the number of blocks created in the past two weeks and uses that to scale the processing power required to find blocks such that the combined cpu power of the network will only find 6 blocks per hour.  I assume this is controlled by increasing or decreasing the number of leading zeros required in front of a hash for a new block.  Does the network enforce this by deciding every two weeks how many leading zeros are required at the front of new blocks?


Yes, it is done by increasing the difficulty, which effectively means more leading zeroes are needed.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12972


View Profile
February 22, 2011, 04:50:31 AM
 #3

Here is the exact current target, which block hashes must be below:
http://blockexplorer.com/q/hextarget

As a performance optimization, miners only check for a certain number of leading zeroes when doing the hashing. Then, when that has occurred, they check that the hash is really lower than the target. Possibly this is the cause of the "Found hash" messages.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
G-Nugget
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
February 22, 2011, 04:53:29 AM
 #4

casascius is right on all but number 4.  

4.) If I watch the output of puddinpop's software, occasionally it spits out "Found Hash!" and it reports something that looks like a hash with leading zeros.  Why is the software finding more of these than one per 10 minutes?  I guess there are multiple possibilities for each block and whoever returns the first block hash with the correct amount of leading zeros is assigned to that block?

Assuming that you're in a mining pool, the hashes you find and submit are likely not blocks, they are shares.  They are basically blocks, but with an extremely low difficulty, so you can find a lot to prove that you are trying to find hashes for real blocks.  Eventually, someone in the pool finds a hash that works on the low artificial difficulty and also works for the real difficulty.  The pool submits it as its own and collects the coins.  Everyone in the same pool is hashing the data for the pool's address.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
February 22, 2011, 04:55:16 AM
 #5

Assuming that you're in a mining pool, the hashes you find and submit are likely not blocks, they are shares.  They are basically blocks, but with an extremely low difficulty, so you can find a lot to prove that you are trying to find hashes for real blocks.  Eventually, someone in the pool finds a hash that works on the low artificial difficulty and also works for the real difficulty.  The pool submits it as its own and collects the coins.  Everyone in the same pool is hashing the data for the pool's address.

Yep, the way I understand it, the "artificially low" difficulty is 1, which is any hash with 8 leading hex zeroes.

If the difficulty is 36000, then one out of every 36000 of those will also be good for a block.

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
casascius
Mike Caldwell
VIP
Legendary
*
Offline Offline

Activity: 1386
Merit: 1136


The Casascius 1oz 10BTC Silver Round (w/ Gold B)


View Profile WWW
February 22, 2011, 05:12:12 AM
 #6

Hmm, ok, so why search for the low difficultly blocks and not just the difficult ones?

So the person running the share server knows how much mining everybody has contributed

Companies claiming they got hacked and lost your coins sounds like fraud so perfect it could be called fashionable.  I never believe them.  If I ever experience the misfortune of a real intrusion, I declare I have been honest about the way I have managed the keys in Casascius Coins.  I maintain no ability to recover or reproduce the keys, not even under limitless duress or total intrusion.  Remember that trusting strangers with your coins without any recourse is, as a matter of principle, not a best practice.  Don't keep coins online. Use paper or hardware wallets instead.
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!