When a block is mined, let's say there is only one single invalid transaction out of lets say 2000 transactions in a block.

Will they get rid of that one transaction and accept that remaining block or for that one single invalid transaction will they reject the whole block?

  • How is that block going to be "mined"?
    – Hobbamok
    Jul 12, 2022 at 8:22

3 Answers 3


It's not accepted. In a block, every transaction has to be valid by itself, but the whole block has to be valid as well. If anything is wrong about the block, it's simply invalid—there is no "partially right".

Let's say a miner creates such a block and broadcasts it to their peers. Each full node peer attempts to validate the block and realizes that the block does not follow the rules. They drop the block, do not forward it to their peers, do not add it to their blockchain, and do not update their UTXO set. Depending on how the miner relayed the block to them, they probably even drop the connection and ban the miner for sending invalid data. Nobody else sees the invalid block unless someone posts about it on social media to ridicule the miner…


Will they get rid of that one transaction and accept that remaining block

That is not how Bitcoin (and any other blockchain based system) works. You cannot ever alter a block. Never. You can accept or decline a block, that's it in terms of anyone's options.

But "changing/omitting/rejecting a single transaction"? That would lead to a cascadingly increasing change to that block's Merkle Tree, resulting in a different final hash and therefore (almost certainly) requiring a different nonce. Which is known as a completely different block that just so happens to also contain a lot of the same transactions. It would still be a different block in all other regards, and most importantly: it would have to be mined completely separately (aka trying out different nonces). And anyone trying to mine that similar but different block would most certainly put themselves (or their pool) as the reward-adress, so one more thing different about that block


Remember, every full node constructs and submits their own block and then compete to find the nonce to their own block.

That is to say, full node miners are not competing over the same block. This means even if a block got rejected due to an invalid tx, there will be another peer who finds a nonce to their own block which probably includes the same valid txs and their block gets accepted on the chain. There is no time wasted as a result of a bad actor sending an invalid tx.

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.