What happens if a miner deliberately ignores a transaction, and "wins"? Suppose a miner decides to solve the nonce for a particular block, where the miner deliberately excluded a particular transaction from this block. The miner &quot;wins&quot;, i.e. they found the nonce value that, when added to the string of the modified block they were trying to solve, hashes to a number below the target number. They send the solution to the network.
Does their block, that ignores the transaction, get accepted by the network? If so, what happens to the ignored transaction? If not, why not?
Miners have complete perogative over what transactions to include. They may include random transactions, the highest fee paying transactions, just their own transactions, or no transactions at all.
If a miner doesn't include a particular transaction from their mempool, it stays there. It will be available for later miners to pick it up and include in their blocks later.
To incentivize miners to include your transaction, you can include a fee. Miners in practice will pick the transactions with the highest fee first. First matters, because blocks have limited capacity, and so there may be more transactions on the network than can fit in a block.