How does a share hash compare to a block hash? Can a miner view the contents of the current block?

4

Is it true that a share hash is simply the same thing as a block hash, but with a lower difficulty?

Is there any way for a miner in a pool to get a list of all the data being hashed (not sure if that is simply the merkle tree, or everything from ListTransactions)?

If the answer is "no", what is the underlying data that is being hashed, and how is it used?

goodguys_activate

Posted 2013-02-28T13:21:54.333

Reputation: 11 898

Answers

2

Yes, a share hash is a hash of a bitcoin block. Some of them are above the bitcoin network difficulty which means the block is valid. Most are not, and can only be used to show that you are mining (and at what rate).

The data being hashed is the block header. The block header contains the merkle root which is created from the transactions. The transactions are not part of the block header. A bitcoin block is the header plus the transactions.

With the GBT (getblocktemplate) mining protocol you do get all the data, including transactions. This could be used to try and detect if the pool is doing something bad. It could also be used as you say to let the user see the transactions he or she is including in blocks. With GBT there is even the possibility for the miner to remove or add transactions, if supported by the pool. Most of this is still not implemented by miners and pools.

Stratum had an extension to allow you to fetch the transactions for the block you are currently mining. I'm not sure if any pools support it, though.

So far Stratum seems most popular, probably due to its efficiency (low bandwidth usage and fast block changes). GBT, which aims for the transparency you are talking about, has a lot more overhead.

Dr.Haribo

Posted 2013-02-28T13:21:54.333

Reputation: 7 823

Thanks (also a fan of your BitMinter pool)! Regarding calculating the hashrate based on returned shares... how do you calculate that? I have a question here regarding this: http://bitcoin.stackexchange.com/q/8028/1878

goodguys_activate 2013-03-01T15:13:45.990

Glad to hear you like BitMinter. :) I put in an answer for your other question as well.Dr.Haribo 2013-03-02T21:31:03.990

@Dr.Haribo: Does BitMinter implements GBT or Stratum? EDIT: Oh, I just noticed it uses both. stratum+tcp://mint.bitminter.com:3333 (Stratum) or http://mint.bitminter.com:8332 (GBT or getwork)

Macarse 2013-04-09T11:42:09.383