Sunday, February 1, 2026
HomeBitcoinbitcoin core - What if a miner simply broadcasts the header and...

bitcoin core – What if a miner simply broadcasts the header and by no means provides the physique? What is going to occur?

What if a miner simply broadcasts the header and by no means broadcasts the physique?

The premise of this query is fallacious: you can’t broadcast a header, as a result of the Bitcoin P2P protocol has no approach of doing that.

It is doable to announce a header to a peer you are linked to since BIP-130, nevertheless it’ll be interpreted as “and also you’re prepared to provide me the block”, and absent the complete block knowledge, it will not be relayed to their friends.

For instance: A miner, after having efficiently mined some block, simply broadcasts the header for all different miners and conceal the physique or by no means give the data of the physique. Beneath this example, what’s going to occur? Will all different miners simply begin the mining based mostly on that header?

Bitcoin Core won’t ever deal with a header with out block knowledge as legitimate, nor will every other full node implementation I am conscious of. Miners will, someplace of their or the pool’s stack, want to make use of a full node to construct block templates with. As none of these will settle for only a header, it has no affect.

There does settle for a apply referred to as spy mining, which does roughly work such as you say, nevertheless it doesn’t contain block headers, or the P2P community in any respect.

The concept is that when a mining pool finds a block themselves, they will immediately change to constructing on prime of it, as a result of they already know it is legitimate. But, the block will take a while to propagate by way of the community from there. Solely after propagation, validation, and constructing a brand new block template on prime, can different miners change to constructing on prime of that too.

With spy-mining, miners hook up with the pool interface of competing miners. Once they see, on this interface, a template for a block constructing on prime of a block hash they are not conscious of, they assume it is a legitimate block discovered by that pool, which hasn’t had the time but to completely propagate to them. Thus, they will change their {hardware} over to constructing on prime of that block too. Since they do not know the contents of this presumed-valid block, they can not know what new transactions to incorporate, and thus they’re going to create an empty block. It nonetheless pays them the subsidy (3.125 BTC as of writing) however lacks charges.

Nevertheless, that is harmful apply. In 2015, when BIP-66 activated, a non-upgraded miner discovered a block after activating (which was invalid by BIP-66’s guidelines). A majority of different miners, which had been upgraded, and thus would have been in a position to acknowledge the block as invalid, had been partaking in spy-mining, and began constructing empty blocks on prime of this invalid block. Worse, they had been spy-mining on one another, and thus creating a sequence of invalid blocks one on prime of the opposite, all empty.

This exhibits the danger right here: spy-mining, even a extra superior hypothetical kind that includes sharing full headers reasonably than simply hashes, solely works when the spied-upon miner is trusted to provide legitimate blocks, and be competent to not create accidentally-invalid blocks. In a sufficiently aggressive mining panorama, the place miners are nameless, and attempting to assault one another, it can’t work: miners can provide one another invalid blocks.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments