<p>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 &quot;partially right&quot;.</p>
<p>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 <a href="https://thenextweb.com/news/bitmain-bitcoin-invalid-block-150000-mining-reward-lost" rel="nofollow noreferrer">posts about it on social media</a> to ridicule the miner…</p>

CC BY-SA 4.0
2022-07-11T20:40:43.950Z
2022-07-12T15:09:01.990Z
2022-07-12T15:09:01.990Z
Murch
<blockquote>
<p>Will they get rid of that one transaction and accept that remaining block</p>
</blockquote>
<p>That is <strong>not</strong> how Bitcoin (and any other blockchain based system) works. <strong>You cannot ever alter a block.</strong> Never. You can accept or decline a block, that's it in terms of anyone's options.</p>
<p>But &quot;changing/omitting/rejecting a single transaction&quot;? That would lead to a cascadingly increasing change to that block's <a href="https://en.bitcoinwiki.org/wiki/Merkle_tree" rel="nofollow noreferrer">Merkle Tree</a>, 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</p>

CC BY-SA 4.0
2022-07-12T12:07:51.143Z
2022-07-12T12:07:51.143Z
Hobbamok
<p>Remember, every full node constructs and submits their own block and then compete to find the nonce to their own block.</p>
<p>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.</p>

CC BY-SA 4.0
2022-07-12T05:13:11.347Z
2022-07-12T05:13:11.347Z
Moussa Al-Basheer
<p>When a block is mined, let's say there is only one single invalid transaction out of lets say 2000 transactions in a block.</p>
<p><strong>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?</strong></p>

CC BY-SA 4.0
2022-07-12T08:22:40.163Z
How is that block going to be "mined"?
Hobbamok
<block-validity>
How is a block accepted with one invalid transaction among many valid transactions?
Arjun Reddy
# How is a block accepted with one invalid transaction among many valid transactions?

(Asked by: username_0 on 2022-07-11)

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?**

**Tags:** block-validity

> **Comments:**
> **username_1**: How is that block going to be "mined"?  

---

## 3 answers

### Answer by username_2 on 2022-07-11. Score: 9

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](https://thenextweb.com/news/bitmain-bitcoin-invalid-block-150000-mining-reward-lost) to ridicule the miner…


---

### Answer by username_1 on 2022-07-12. Score: 2

> 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](https://en.bitcoinwiki.org/wiki/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


---

### Answer by username_3 on 2022-07-12. Score: 1

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.


---

