Selfish Mining/Block Withholding Attack
The block withholding attack, also called selfish mining, comprises a strategy where a miner who finds a block withholds it.
It was first described by Hal Finney. You can read the original post here: https://bitcointalk.org/index.php?topic=3441.msg48384#msg48384.
A more formal description provided by the Cornell university can be found here: https://arxiv.org/abs/1311.0243.
As we said, the attacker mines a valid block B but doesn’t publish it immediately. Instead, he starts to build upon this withheld block secretly. If the miner is successful and finds a second block C before any other miner publishes a block, he publishes both blocks.
If another miner publishes a block in the meantime, the selfish miner immediately publishes his block. In this case, we have a race condition. The attacker now hopes that other miners learn of his quicker and build on top of it or that his head start is big enough to find the second block first.
This attack harms other miners as they continue hashing on an old block, wasting their resources. But this attack can also be used to launch a double-spend attack where the attacker includes a transaction from the address I to address II in a block he mined but didn’t publish. He controls both addresses. Then he buys something and creates a transaction from address I to the vendor’s address. After receiving the goods, he publishes the block with the first transaction (from I to II). Further readings: https://www.sciencedirect.com/science/article/abs/pii/S0951832018310494