How is a miner prevented from adding transactions without signatures to their block?

1

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.

smrt28

Posted 2017-11-29T20:52:53.867

Reputation: 135

Answers

2

No, you're not the only one who checks signatures.

Before a block is submitted, every signature / transaction is checked/verified by other nodes.

I believe the SHA256 hash is the first thing which they check, which contains all/most headers for the block.Then every tranasaction hash +/signature is checked.

If they can't confirm a transaction hash / block hash i believe your block will be rejected.

This might help you out a bit, -> https://en.bitcoin.it/wiki/Protocol_rules#Explanation_of_Some_Rules

Rutger Versteegden

Posted 2017-11-29T20:52:53.867

Reputation: 966

So, the block contains signatures for all transactions?smrt28 2017-11-29T21:08:52.363

Yes, each transaction has the signatures for itself encoded into itmorsecoder 2017-11-29T21:16:28.783

1I 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-transactionMeshCollider 2017-11-30T00:00:26.447

I see. I will edit my answer accordingly.Rutger Versteegden 2017-11-30T06:43:50.863

0

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.

Murch

Posted 2017-11-29T20:52:53.867

Reputation: 41 609