0

Assume there there 100 unconfirmed transactions currently in the MemPool. And the size of a block is such that it's roughly made up of 10 transactions.

Now when a miner completes the Proof of Work & successfully adds his block to the blockchain, any other miner who has even one of those 10 transactions in the current block he is trying to mine is going to be unsuccessful.

So my questions are

  • While the miners are trying to mine a block of transactions, do they also continuously keep checking (in parallel) where there is a new confirmed block in the system which includes even one of the transactions which is there in their ongoing mining block - so that they can abort their mining instead of only aborting it after they finish their work?

  • With everyone picking transactions to mine from the MemPool, isn't there a very, very high chance that before you finish completing your PoW, there will atleast be one new block which includes at least one of your 10 transactions?

  • Is there a way for a miner to check & pick only those transactions which aren't already picked by someone else for mining?

1 Answer 1

1

No one cares

(about what other miners are exactly working on)

Miners have no way of knowing the contents of block templates being used by other independent miners.

There is nothing in the Bitcoin network protocol that provides for miners to share what they are up to. Considering the speed at which miners must vary block templates, I imagine doing so would be infeasible or at least waste huge resources somewhat pointlessly.

The contents of those other block templates is of no interest. As soon as one miner publishes a valid block all other miners must abandon their work and restart mining regardless of what is in anyone's block templates.

Don't knowingly buy expired lottery tickets

(unless you have the resources to persuade the whole world the prior winner is unworthy?)

Continuing to work on a block template that includes a transaction that has already been confirmed would be pointless but, more importantly, The active blockchain is linear. Miners must always work on a block template that links back to the current head block. As soon as a new head appears on the active chain, miners must use it regardless whether the block is empty¹ or not, whether it contains transactions they had been working on or not.

Ultimately there can only be one block at any height n in the active chain. It is generally likely to be unproductive and wasteful to knowingly continue working to produce a second block at the same height as one you know about. The purpose of Blockchain reorganisations is to ensure that ultimately all Bitcoin nodes agree which chain is the active chain and therefore all agree exactly which block occurs at each height n.


Poolside chatter

Miners working in a pool are subject to some form of coordination but I believe the description above remains valid more generally.


See also


Notes

  1. Containing no transactions other than the miner's coinbase transaction.
8
  • As soon as one miner publishes a valid block all other miners must abandon their work - is this because the prevhash included in their block already exists in another mined block?
    – user93353
    Commented Jun 12, 2022 at 10:22
  • So while miners are mining a block, there is a also another thread of the miner listening for new blocks being broadcast & if they find one, the listening threads sends a signal to mining thread to abandon the current mining.
    – user93353
    Commented Jun 12, 2022 at 10:24
  • For a transaction receiver to acknowledge receipt, it is advised that he shouldn't accept a block as a valid block till few more blocks are appended to it. Why shouldn't this apply to miners also - what if the miner ends up abandoning his current work because a fraudulent mined block broadcast which he has received?
    – user93353
    Commented Jun 12, 2022 at 10:27
  • 2
    The terminology used for various aspects of validation differs, but I like this one: there are validity rules (like transactions need valid signatures, subsidy must be respected, can't spend non-existing/spent coins) and chain selection rules (most PoW wins). There can be multiple competing valid chains, but nodes only consider one of those to be active (based on chain selection). Commented Jun 12, 2022 at 16:38
  • 1
    @Pieter thanks. I'll link to your answer at bitcoin.stackexchange.com/q/5540/13866 Commented Jun 12, 2022 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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