<p>It does not need to as the coinbase transaction of each block does not spend any other transaction, hence does not need to satisfy the conditions set by the <code>scriptPubKey</code> of an existing output.</p>

CC BY-SA 4.0
2020-07-14T18:53:10.983Z
2020-07-14T18:59:11.010Z
2020-07-14T18:59:11.010Z
Antoine Poinsot
<p>The <code>scriptSig</code> field of a coinbase transaction is special. It doesn't need any signatures at all, as no coins are being spent. The ability to produce new coins, which that input represents, is inherent to the protocol - every block is allowed some fixed amount of produced coins. Requiring a signature on it would be wasteful and pointless. Which key should we expect a signature with? Miners don't have identities by design, as it is intended to be permissionless.</p>
<p>Instead, this field just contains arbitrary data the miners chooses. It can function as an &quot;extra nonce&quot;, when the nonce in the header overflows. It is used by BIP34 to store the block height. It can further be used to store messages - which is what happened here.</p>
<p>As for why Satoshi chose that specific structure, i'm afraid you'll have to ask him.</p>
<p>Also note that the genesis block is hardcoded by the protocol, so there are no real rules that apply to it. It could have been declared to be anything.</p>

CC BY-SA 4.0
2020-07-14T18:54:54.017Z
2020-07-14T18:54:54.017Z
Pieter Wuille
<p>I was exploring the function <code>static CBlock CreateGenesisBlock</code> inside <code>src/chainparams.cpp</code> and I was looking at the way Satoshi created its scriptSig:<br/></p>
<pre><code> txNew.vin[0].scriptSig = CScript() &lt;&lt; 486604799 &lt;&lt; CScriptNum(4) &lt;&lt; std::vector&lt;unsigned char&gt;((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
</code></pre>
<p><code>CScript</code> is constructing an object of the CScript class with the following inputs: <br/>
<code>486604799 </code> is the Nonce <br/>
<code>CScriptNum(4)</code> is an extraNonce <br/>
<code>pszTimestamp</code> is just a string &quot;The Times 03/Jan/2009 Chancellor on brink of second bailout for banks&quot;; <br/>
Why is the <code>scriptSig</code> formatted like this and shouldn't the <code>scriptSig</code> contain the signature of the whole transaction (not just little parts of it) and a public key of the person who signs the transaction?</p>

<bitcoin-core-development><coinbase-transaction><genesis-block><input-script>
Why is the scriptSig formatted this way in the Genesis Block (inside function CreateGenesisBlock)
ddavi031
# Why is the scriptSig formatted this way in the Genesis Block (inside function CreateGenesisBlock)

(Asked by: username_0 on 2020-07-14)

I was exploring the function `static CBlock CreateGenesisBlock` inside `src/chainparams.cpp` and I was looking at the way Satoshi created its scriptSig:

```
 txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << std::vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));

```

`CScript` is constructing an object of the CScript class with the following inputs:   
`486604799`  is the Nonce   
`CScriptNum(4)` is an extraNonce   
`pszTimestamp` is just a string "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";   
Why is the `scriptSig` formatted like this and shouldn't the `scriptSig` contain the signature of the whole transaction (not just little parts of it) and a public key of the person who signs the transaction?

**Tags:** bitcoin-core-development, coinbase-transaction, genesis-block, input-script


---

## 2 answers

### Answer by username_2 on 2020-07-14. Score: 4 | Accepted answer

The `scriptSig` field of a coinbase transaction is special. It doesn't need any signatures at all, as no coins are being spent. The ability to produce new coins, which that input represents, is inherent to the protocol - every block is allowed some fixed amount of produced coins. Requiring a signature on it would be wasteful and pointless. Which key should we expect a signature with? Miners don't have identities by design, as it is intended to be permissionless.

Instead, this field just contains arbitrary data the miners chooses. It can function as an "extra nonce", when the nonce in the header overflows. It is used by BIP34 to store the block height. It can further be used to store messages - which is what happened here.

As for why Satoshi chose that specific structure, i'm afraid you'll have to ask him.

Also note that the genesis block is hardcoded by the protocol, so there are no real rules that apply to it. It could have been declared to be anything.


---

### Answer by username_1 on 2020-07-14. Score: 2

It does not need to as the coinbase transaction of each block does not spend any other transaction, hence does not need to satisfy the conditions set by the `scriptPubKey` of an existing output.


---

