Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: hardcore-fs on December 09, 2012, 01:23:41 AM



Title: Validating nonces
Post by: hardcore-fs on December 09, 2012, 01:23:41 AM
Hi,

I notice a mining site that is saying nonces are incorrect, (but i suspect they are not)

Is there a site where i can drop in a hash say:

00000001653b8fc7d366c410b68c0608f77fb8b57ae67a6e9a4100fa0000001d00000000468638e 0f07ee775fc1e39816ac9ec505c3a933127ccabb30a13440377ae780a50c3df2d1a04e0ea

and get the correct nonce back (all the hashes have been solved and are in the block chain)

HC


Title: Re: Validating nonces
Post by: DannyHamilton on December 09, 2012, 02:57:13 AM
Hi,

I notice a mining site that is saying nonces are incorrect, (but i suspect they are not)

Is there a site where i can drop in a hash say:

00000001653b8fc7d366c410b68c0608f77fb8b57ae67a6e9a4100fa0000001d00000000468638e 0f07ee775fc1e39816ac9ec505c3a933127ccabb30a13440377ae780a50c3df2d1a04e0ea

and get the correct nonce back (all the hashes have been solved and are in the block chain)

HC


That doesn't look like a valid block hash.  I thought block hashes were 64 characters long when represented in hex.

If you have a valid block hash from an existing bitcoin blockchain block, then you should be able to look up the nonce ate blockchain.info.

For example, given this hash:
000000000000003c74f147f11e68ad5283efbad7796e5774836e75e7ed3340d1

If I go to this page:
http://blockchain.info/

And paste the hash into the search box, I get the following page:
http://blockchain.info/block-index/000000000000003c74f147f11e68ad5283efbad7796e5774836e75e7ed3340d1

Which shows that the nonce was:
4267120643


Title: Re: Validating nonces
Post by: DannyHamilton on December 09, 2012, 03:02:23 AM
Note that a there can be more than one nonce that will solve a block, so even if the nonce that ends up in the block is not the one you submitted, it doesn't mean that your nonce wouldn't have worked too.  It is also possible that whoever did solve the block included different transactions than you would have.  If there is ANY change at all in the included transactions (even the order that they are included) or the header of the the block, then the nonce that solves the block will be different as well.

You really can't look at the solved block to determine if one of your submitted nonces match the nonce that eventually makes it into the block.  It should be pretty easy though to demonstrate that a nonce you provided would generate a block hash that meets the necessary difficulty.

What makes you think the pool is trying to keep you from solving blocks?


Title: Re: Validating nonces
Post by: hardcore-fs on December 09, 2012, 03:19:32 AM
Note that a there can be more than one nonce that will solve a block, so even if the nonce that ends up in the block is not the one you submitted, it doesn't mean that your nonce wouldn't have worked too.  It is also possible that whoever did solve the block included different transactions than you would have.  If there is ANY change at all in the included transactions (even the order that they are included) or the header of the the block, then the nonce that solves the block will be different as well.

You really can't look at the solved block to determine if one of your submitted nonces match the nonce that eventually makes it into the block.  It should be pretty easy though to demonstrate that a nonce you provided would generate a block hash that meets the necessary difficulty.

What makes you think the pool is trying to keep you from solving blocks?

There seems to be a % over a long period of time...  problem is, it is not a random % as you would expect, and the site shows stales as 5 and 3 dups, but the figures don't add up.

I can "rip out" a section of a python miner and use an ASIC to validate them as they bounce, but I'd rather get a 3rd party validation
maybe its some sort of bug in the FPGA code, due to CLK slippage.




Title: Re: Validating nonces
Post by: Remember remember the 5th of November on December 11, 2012, 09:29:14 PM
Just because a nonce solves a block for one stratum work unit/getwork unit, doesn't mean it produces OR solves the same hash from another getwork/stratum work unit.


Title: Re: Validating nonces
Post by: hardcore-fs on December 12, 2012, 01:01:07 AM
Just because a nonce solves a block for one stratum work unit/getwork unit, doesn't mean it produces OR solves the same hash from another getwork/stratum work unit.

Wow... you don't say.
What I was looking for was a program that would take the server supplied  hash strings and validate the results of the rig.

So for a given hash string, do a nonce scan and validate the rig results, because even the test rig code available, does not seem to be able do that.


Title: Re: Validating nonces
Post by: deepceleron on December 12, 2012, 04:06:40 AM
1. Hashes are non-reversible, a hash cannot be turned into data
2. You can look up the contents of a solved block and see the nonce, since it is a readable part of a block's contents:
http://blockexplorer.com/rawblock/000000000000003c74f147f11e68ad5283efbad7796e5774836e75e7ed3340d1
3. Other block content is specific to the pool and constantly changing in blocks, such as the coinbase and the generate payout tx address.
4. It is trivial to determine if you solved a block or produced a valid share - if the hash of the share you are submitting is lower than the target, then it is a block solve. You can alter your mining software to record all shares you submit, the published hash of a solved block will be the same as your submission if you found one.
5. You can alter mining software to record the input data that produced a valid share, and re-hash it to verify it works. A pool will have different criteria than just it is a hash, they need to verify a share is still a valid block solve for the current block, and the coinbase, rollntimestamp is reasonable, and that it is work that was requested of you.
5. What is the problem?