Bitcoin Forum
January 22, 2017, 06:43:18 PM *
News: Latest stable version of Bitcoin Core: 0.13.2  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: What's to stop this type of cheating when using pools?  (Read 1517 times)
theowalpott
Member
**
Offline Offline

Activity: 82


View Profile
June 25, 2011, 05:32:05 PM
 #1

Hi,

Is there any mechanism for pools to not be vulnerable to the following cheat:

- A miner runs intermediate code on the local machine/network which connects to multiple pools, getting work from one/all of them.
- This intermediate code then acts as its own pool for whichever gpu/cpu mining code is running.
- The gpu/cpu miners run as usual, returning possible solutions, as they would if connected directly to the pool.
- The intermediate code collects these possible solutions/shares and sends them to all of the pools it is currently connected to.
- Each of the pools running may accept/reject the share as usual.
- The miner running this intermediate code effectively gets multiple shares on each of the pools he/she is connected to, thus multiplying possible profits.

Is this possible?

I am guessing each pool would have a different current header to hash (eg, different timestep, merkle root, etc), so the possible solution would be rejected from all but the pool the work was originally from.

How many bits of info for the header is the pool responsible for and how much does the mining software generate?

Anyway, couldn't see anyone asking a similar question and I'm curious if this my be a cause for some pools seeing more invalid shares than they would expect.

Sorry if I've completely misunderstood how the pools dish out work Smiley

1FwGATm6eU5dSiTp2rpazV5u3qwbx1fuDn
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1485110598
Hero Member
*
Offline Offline

Posts: 1485110598

View Profile Personal Message (Offline)

Ignore
1485110598
Reply with quote  #2

1485110598
Report to moderator
Sukrim
Legendary
*
Offline Offline

Activity: 1904


View Profile
June 25, 2011, 05:42:06 PM
 #2

Is this possible?
No, a solution only fits one header. Each pool will have a different header, so you will need different solutions for each share.

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
theowalpott
Member
**
Offline Offline

Activity: 82


View Profile
June 25, 2011, 05:57:03 PM
 #3

Ok.. easy answer lol Smiley

I'm sure I could find this info with google/forum search, but since I've created a useless thread otherwise..

Since the header is made up for the following info:

Version (assume this is constant for all pools? at least most anyway?)
Previous Hash (always constant for a particular block?)
Merkle Root (Huh)
Timestamp (must be generated on the miner client side?)
Bits/Target (constant for each block?)
Nonce (must be iterated over on the miner client side?)

Then which info is determined by the pool server and which info is up to the mining software to generate?

I've put my understanding/guesses in the brackets. I think the whole thing depends on the Merkle root - I guess this is essentially the unique identifier to each pool and is why my described cheat wouldn't work?


1FwGATm6eU5dSiTp2rpazV5u3qwbx1fuDn
slush
Legendary
*
Offline Offline

Activity: 1372



View Profile WWW
June 25, 2011, 06:06:04 PM
 #4

Then which info is determined by the pool server and which info is up to the mining software to generate?

mining software - nonce and (in some cases) ntime
pool - everything else

merkle root - hash done from transactions included in blocks. Because coinbase transaction is unique for pool, then merkle root is different for every pool. That's the reason why your attack won't work.

theowalpott
Member
**
Offline Offline

Activity: 82


View Profile
June 25, 2011, 06:21:16 PM
 #5

Thanks for the answers Smiley

One last question (I hope!!):

If the only part of the header generated locally is the nonce (im assuming the timestamp is irrelevant here), which is any number between 0 and 2^256 - 1, then wouldn't that make it possible that different miners could compute the same (most likely incorrect) header. Surely this would reduce efficiency? Could a pool server divide work up between ranges of the nonce, or even giving out different seeds for the random number generator?

Also, would there be any benefit of changing the nonce part of the mining software to loop from 0 to 2^256 -1 rather than using a random number generator? - this would reduce clock cycles used and so increase hashrate.

Am just brainstorming I guess. I'm a math student, and computational efficiency as well as the cryptography used interests me Smiley

1FwGATm6eU5dSiTp2rpazV5u3qwbx1fuDn
relmeas
Full Member
***
Offline Offline

Activity: 125


View Profile
June 26, 2011, 05:10:24 AM
 #6

the getwork command returns different headers each time you use it (which is easy to verify with stock client). the block data contains a field named extraNonce which is iterated for each getwork so the merkle root changes with each getwork.

also there is a timestamp that may change but idk how often it does.

i don't know however how the server knows which version of block a share is made for, probably stores given out getworks or just finds the one that fits... one can read the sources i guess.

btw try reading the wiki, it has a protocol description i think

about the looping, i think it already does loop from 0 to 2^32.

also since it takes long time for the slow miners to loop through att 2^32 values (in this time the new block might be generated by someone else), there is an option in some miners that allows to ask for new work after a number of seconds, so not all 2^32 values are checked for each block, which I guess does not make much difference... hopefully.
Spacy
Full Member
***
Offline Offline

Activity: 168


View Profile
August 15, 2011, 07:28:13 AM
 #7

Ok the merkle root is coming from hashing the different transactions. What if I hack the client so, that it just connects to a single pool and gets all the transactions just from this single node. So it could be possible to get the same transactions as the pool node. If the same transactions are in the same order on the two clients, they should get the same merkle root. Now the only remaining variable is the timestamp, but their the client could just try out the last x seconds. Now you can try out all the found shares against these parameters, and the correct nonce should also win on the second (mirror) client.

So the question is, if the clients add some random reordering when forwarding transactions or when a new transactions is incoming.

Also if the number of transactions per block is very low, ex. at IXCoin, you can just try all the different transaction orders to find the same merkle root.
relmeas
Full Member
***
Offline Offline

Activity: 125


View Profile
August 15, 2011, 07:55:39 AM
 #8

you correctly mention the transactions, and their order.

however you forgot some other things

1. which transactions pool decided to include. he could have his own rules like eligius has. Also, how exactly would you determine the correct order?

2. you want to replace the wallet public key to receive reward with your own, correct? but that would change the transaction that gives out the reward (yes it's also in the block, along with all the regular transactions, surprised?) and hence the merkle root. you can't submit any results generated for different merkle root than you was given by the pool! pool would ignore them even if they constitute a share for YOUR merkle since it would not even know what merkle root you had in mind, and if it did, it would not know which transactions you had in mind - in fact, the fact that he does not remember giving away your new merkle root is enough for your cunning plan to fail.
Spacy
Full Member
***
Offline Offline

Activity: 168


View Profile
August 15, 2011, 08:55:29 AM
 #9

you correctly mention the transactions, and their order.

however you forgot some other things

1. which transactions pool decided to include. he could have his own rules like eligius has. Also, how exactly would you determine the correct order?

2. you want to replace the wallet public key to receive reward with your own, correct? but that would change the transaction that gives out the reward (yes it's also in the block, along with all the regular transactions, surprised?) and hence the merkle root. you can't submit any results generated for different merkle root than you was given by the pool! pool would ignore them even if they constitute a share for YOUR merkle since it would not even know what merkle root you had in mind, and if it did, it would not know which transactions you had in mind - in fact, the fact that he does not remember giving away your new merkle root is enough for your cunning plan to fail.

Ah ok, didn't think about the blockreward-transaction. Thx for your answer Smiley
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!