1

It's possible to send shares both to a localhost GBT "pool" (e.g., Bitcoin Core's) and to a remote Stratum pool.* Now, if I discover a block, won't both my localhost GBT "pool" and the remote pool claim it as theirs? This appears to be known as the "selfish mining attack."

*using, e.g., bfgminer's #allblocks option, which offers "Support for submitting found blocks to a local Bitcoin GBT server (bitcoind or Bitcoin-Qt with -server flag): just append #allblocks to the end of your bitcoind's URI." (source)

2

You might be connected to both pools, but only working for one: When you mine, the block you are trying to find contains a recipient address for the block reward. Therefore, a block can only contribute to one mining pool (i.e. the one that would be receiving the reward, if the block was successful).

Whenever you find a block, the #allblocks mentioned in the linked thread, causes the block to be propagated to all connected pools. This will cause your block to be distributed quicker and prevent selfish mining:

Selfish mining is something else than you seem to think: It describes a behavior, where a pool will keep a discovered block private, until another party finds a block or the pool itself finds a succeeding block. That way the pool can hinder other parties to base work on the discovered block, and can gain a "headstart" on a succeeding block.
Due to you submitting your block to the pool and also propagating it to the network, the pool operator can't keep the block hidden and therefore cannot perform selfish mining.

3

Now, if I discover a block, won't both my localhost GBT "pool" and the remote pool claim it as theirs?

No. That isn't possible. Changing the coinbase transaction (what controls where a block reward goes) invalidates the block. All that happens is that the block propagates slightly faster.

Cheating on pooled mining


This appears to be known as the "selfish mining attack."

Actually, that's something else.

Luca Matteis explains:

You're missing the main point: when a selfish miner finds a new block, he keeps it private, does not broadcast it to the network, and starts mining on top of that privately.

The rest of the network is still mining on a block that was actually already found, but not broadcast.

When the rest of the network finally finds this block, the selfish miner broadcasts his version, in an attempt to replace it.

By invalidating blocks this way a selfish miner is effectively wasting other people's cycles, and has a head start for winning the next block, because he started mining on it before the others.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.