<p>-This answer of mine should never have been accepted- Please check the <a href="https://en.bitcoin.it/wiki/Protocol_rules#Explanation_of_Some_Rules" rel="nofollow noreferrer">wiki</a>
for an extended answer.</p>

CC BY-SA 3.0
2017-11-29T21:08:52.363Z
So, the block contains signatures for all transactions?
smrt28
CC BY-SA 3.0
2017-11-29T21:16:28.783Z
Yes, each transaction has the signatures for itself encoded into it
morsecoder
CC BY-SA 3.0
2017-11-30T00:00:26.447Z
`I believe the SHA256 hash is the first thing which they check, which actually contains most if not all signatures for the block.`
This is not quite right, the SHA256 hash of the block is just a hash of the header, and doesn't help in verifying any signatures. Signature verification is done per-transaction
meshcollider
CC BY-SA 3.0
2017-11-30T06:43:50.863Z
I see. I will edit my answer accordingly.
Jan Janssen
CC BY-SA 4.0
2017-11-29T20:59:03.547Z
2023-05-13T19:45:23.380Z
2023-05-13T19:45:23.380Z
Jan Janssen
<p>Every node on the network independently enforces all rules of Bitcoin. Transactions in Bitcoin are only valid when their inputs satisfy the output script of the UTXO that they are spending. The standard output format of Pay-to-pubkey-hash (P2PKH) requires an input to be signed by the private key corresponding to the address that the funds were previously signed over to.</p>

<p>Therefore, a block that contains a transaction without a signature is invalid per the rules of Bitcoin<sup>*</sup>.</p>

<p>Specifically what will happen is: </p>

<ol>
<li>Miner advertises their new block.</li>
<li>His peers request the block as they don't have it yet.</li>
<li>Upon checking the block, the peers realize that it contains a transaction without a signature.</li>
<li>Said peers drop the block, then ban and disconnect the miner for relaying invalid information.</li>
</ol>

<hr>

<p><sup>* Obviously, unless the transaction is spending an input that doesn't require a signature.</sup></p>

CC BY-SA 3.0
2017-11-30T18:50:25.220Z
2017-11-30T18:50:25.220Z
Murch
<p>Consider I'm a miner. I mine on my own, I don't mine in pools. I have power enough to find the hash, lets say, once per 2 years.</p>

<p>When I find the hash within those 2 years I send the block back to the network and since the hash is low enough the block would be accepted and added to the block-chain.</p>

<p>It's up to miners (so me) to check the transaction signatures but the block AFAIK doesn't contain the signatures. How can others within the network can be sure that all the transactions in my block which I calculated were signed? </p>

<p>If I was an evil miner, I could have added a transaction without a signature. How is this prevented? Am I the only one who checks the signatures within my block?</p>

<p>Thanks for explanation.</p>

<mining-theory><transaction-verification>
How is a miner prevented from adding transactions without signatures to their block?
smrt28
# How is a miner prevented from adding transactions without signatures to their block?

(Asked by: username_0 on 2017-11-29)

Consider I'm a miner. I mine on my own, I don't mine in pools. I have power enough to find the hash, lets say, once per 2 years.

When I find the hash within those 2 years I send the block back to the network and since the hash is low enough the block would be accepted and added to the block-chain.

It's up to miners (so me) to check the transaction signatures but the block AFAIK doesn't contain the signatures. How can others within the network can be sure that all the transactions in my block which I calculated were signed?

If I was an evil miner, I could have added a transaction without a signature. How is this prevented? Am I the only one who checks the signatures within my block?

Thanks for explanation.

**Tags:** mining-theory, transaction-verification


---

## 2 answers

### Answer by username_1 on 2017-11-29. Score: 2 | Accepted answer

-This answer of mine should never have been accepted- Please check the [wiki](https://en.bitcoin.it/wiki/Protocol_rules#Explanation_of_Some_Rules)
for an extended answer.

> **Comments:**
> **username_0**: So, the block contains signatures for all transactions?  
> **username_2**: Yes, each transaction has the signatures for itself encoded into it  
> **username_3**: `I believe the SHA256 hash is the first thing which they check, which actually contains most if not all signatures for the block.` This is not quite right, the SHA256 hash of the block is just a hash of the header, and doesn't help in verifying any signatures. Signature verification is done per-transaction  
> **username_1**: I see. I will edit my answer accordingly.  

---

### Answer by username_4 on 2017-11-30. Score: 1

Every node on the network independently enforces all rules of Bitcoin. Transactions in Bitcoin are only valid when their inputs satisfy the output script of the UTXO that they are spending. The standard output format of Pay-to-pubkey-hash (P2PKH) requires an input to be signed by the private key corresponding to the address that the funds were previously signed over to.

Therefore, a block that contains a transaction without a signature is invalid per the rules of Bitcoin\*.

Specifically what will happen is:

1. Miner advertises their new block.
2. His peers request the block as they don't have it yet.
3. Upon checking the block, the peers realize that it contains a transaction without a signature.
4. Said peers drop the block, then ban and disconnect the miner for relaying invalid information.

---

\* Obviously, unless the transaction is spending an input that doesn't require a signature.


---

