Bitcoin Forum

Bitcoin => Mining => Topic started by: davida on March 09, 2014, 05:19:55 PM



Title: Greedy miners?
Post by: davida on March 09, 2014, 05:19:55 PM
I've been thinking about how pooled mining works, there are a couple of thing which have left me wondering how fair it all actually is.

1.  Is there anything preventing a (dishonest) expert coder from modifying his mining software, allowing it to only submit his work that doesn't discover a valid block for the pool, but when the time comes that he actually finds a valid block the modified software will disconnect from the mining pool and submit the block by himself, therefore he gets to keep the entire 25btc block....   It would seem like a pretty major flaw to pooled mining if this worked, so I'm sure there is something preventing it from happening, if so what is it?


2. Staying on the topic of greedy mining. I'm pretty sure I have read somewhere that it doesn't matter how many transactions miners include in each block, it shouldn't take any extra computational time to produce each hash, I don't understand that.   So again, if the same expert coder rewrote his mining software to only include 1 transaction in each block, am I correct in thinking this wouldn't provide any advantage over including the standard 100-1000 transactions in each block?



Title: Re: Greedy miners?
Post by: os2sam on March 09, 2014, 08:52:57 PM
I've been thinking about how pooled mining works, there are a couple of thing which have left me wondering how fair it all actually is.

1.  Is there anything preventing a (dishonest) expert coder from modifying his mining software, allowing it to only submit his work that doesn't discover a valid block for the pool, but when the time comes that he actually finds a valid block the modified software will disconnect from the mining pool and submit the block by himself, therefore he gets to keep the entire 25btc block....   It would seem like a pretty major flaw to pooled mining if this worked, so I'm sure there is something preventing it from happening, if so what is it?


2. Staying on the topic of greedy mining. I'm pretty sure I have read somewhere that it doesn't matter how many transactions miners include in each block, it shouldn't take any extra computational time to produce each hash, I don't understand that.   So again, if the same expert coder rewrote his mining software to only include 1 transaction in each block, am I correct in thinking this wouldn't provide any advantage over including the standard 100-1000 transactions in each block?



1.  This has been discussed many times and has been answered by experts on the subject, which I am not.  So try searching for it.

But to answer in laymen's terms, no the block cannot be kept by the dishonest miner.

But yes they can stop a block solve from being submitted.  It's called a withholding attack.  This risk *ALONE* should be reason enough for pools to not offer PPS.
Sam


Title: Re: Greedy miners?
Post by: davida on March 10, 2014, 09:40:05 AM
I've been thinking about how pooled mining works, there are a couple of thing which have left me wondering how fair it all actually is.

1.  Is there anything preventing a (dishonest) expert coder from modifying his mining software, allowing it to only submit his work that doesn't discover a valid block for the pool, but when the time comes that he actually finds a valid block the modified software will disconnect from the mining pool and submit the block by himself, therefore he gets to keep the entire 25btc block....   It would seem like a pretty major flaw to pooled mining if this worked, so I'm sure there is something preventing it from happening, if so what is it?


2. Staying on the topic of greedy mining. I'm pretty sure I have read somewhere that it doesn't matter how many transactions miners include in each block, it shouldn't take any extra computational time to produce each hash, I don't understand that.   So again, if the same expert coder rewrote his mining software to only include 1 transaction in each block, am I correct in thinking this wouldn't provide any advantage over including the standard 100-1000 transactions in each block?



1.  This has been discussed many times and has been answered by experts on the subject, which I am not.  So try searching for it.

But to answer in laymen's terms, no the block cannot be kept by the dishonest miner.

But yes they can stop a block solve from being submitted.  It's called a withholding attack.  This risk *ALONE* should be reason enough for pools to not offer PPS.
Sam

I did try searching for the answer to 1, i read the forum a lot also but just never came up with the answer to that question....  Specifically, what is there to stop the person announcing the block through their own node and withhold it from the the pool they were mining with.  In other words it would be solo mining but submitting all your failed work to a pool and receiving payout for it.


Title: Re: Greedy miners?
Post by: os2sam on March 10, 2014, 10:06:37 AM
I've been thinking about how pooled mining works, there are a couple of thing which have left me wondering how fair it all actually is.

1.  Is there anything preventing a (dishonest) expert coder from modifying his mining software, allowing it to only submit his work that doesn't discover a valid block for the pool, but when the time comes that he actually finds a valid block the modified software will disconnect from the mining pool and submit the block by himself, therefore he gets to keep the entire 25btc block....   It would seem like a pretty major flaw to pooled mining if this worked, so I'm sure there is something preventing it from happening, if so what is it?


2. Staying on the topic of greedy mining. I'm pretty sure I have read somewhere that it doesn't matter how many transactions miners include in each block, it shouldn't take any extra computational time to produce each hash, I don't understand that.   So again, if the same expert coder rewrote his mining software to only include 1 transaction in each block, am I correct in thinking this wouldn't provide any advantage over including the standard 100-1000 transactions in each block?



1.  This has been discussed many times and has been answered by experts on the subject, which I am not.  So try searching for it.

But to answer in laymen's terms, no the block cannot be kept by the dishonest miner.

But yes they can stop a block solve from being submitted.  It's called a withholding attack.  This risk *ALONE* should be reason enough for pools to not offer PPS.
Sam

I did try searching for the answer to 1, i read the forum a lot also but just never came up with the answer to that question....  Specifically, what is there to stop the person announcing the block through their own node and withhold it from the the pool they were mining with.  In other words it would be solo mining but submitting all your failed work to a pool and receiving payout for it.


The work items a pool gives to a miner is unique to the pool.  So if you submitted said block solve via your local bitcoind it would not be accepted in the block chain.

Similarly in your item 2. pools select the transactions that are included according to their own criteria.  The more transactions that are included the greater chance a pool has of loosing an orphan race.


Title: Re: Greedy miners?
Post by: phillipsjk on March 10, 2014, 09:10:38 PM
The work items a pool gives to a miner is unique to the pool.  So if you submitted said block solve via your local bitcoind it would not be accepted in the block chain.

Not quite true: the block may be valid if you relay it yourself, but it will still be paying the pool. P2Pool works this way: each miner individually relays the block.

What prevents cheating is that the "proof-of-work" is a cryptographic hash of the block header. Change the block, and you change the resulting hash. It is unlikely that the new hash would meet the block-target without re-doing all of the "work" (repeated hashing, incrementing a nonce).


Title: Re: Greedy miners?
Post by: irrational on March 11, 2014, 03:42:29 AM
The work items a pool gives to a miner is unique to the pool.  So if you submitted said block solve via your local bitcoind it would not be accepted in the block chain.

Not quite true: the block may be valid if you relay it yourself, but it will still be paying the pool. P2Pool works this way: each miner individually relays the block.

What prevents cheating is that the "proof-of-work" is a cryptographic hash of the block header. Change the block, and you change the resulting hash. It is unlikely that the new hash would meet the block-target without re-doing all of the "work" (repeated hashing, incrementing a nonce).


#truefacts!

Also, on topic #1, withholding the winning share might not directly profit the miner, but it can be used as a method of causing pools to become "unlucky".


Title: Re: Greedy miners?
Post by: joethejudge77 on March 11, 2014, 04:16:54 PM
"Greed is good"
Well best luck with mining coins  ;)