<p>The miner chooses it, freely.</p>
<p>They can use it as an additional nonce (when the nonce is the block header overflows, the miner needs to switch to different transactions in the block to modify it further; the coinbase is an obvious place to make non-impactful, cheap, changes), or use it to publish messages.</p>
<p>In addition, <a href="https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki" rel="nofollow noreferrer">BIP34</a> (active as a consensus rule since 2012) requires the coinbase scriptSig to start with the height of the block, in a particular encoding.</p>

CC BY-SA 4.0
2023-03-02T22:14:54.787Z
@ Pieter wuille.
Thank you for answering me so quickly.
When a new block is mined, miners can change the Merkel root, Nonce and time parameters to be able to mine the block.
In order to change the Merkel root, we need to increase or decrease the transactions.
You mean that in addition to these, the miner also has a long string at his disposal on coinbase, with which he can also change the Merkel root?
Ali
CC BY-SA 4.0
2023-03-02T22:19:08.260Z
(it's named after Ralph Merkle, not Angela Merkel). Yes, it's yet another way to introduce variation to the block header, if timestamp and nonce don't suffice. Any change to the transaction set works (through the Merkle root), but having this otherwise ignored (apart from BIP34) field in the coinbase transaction is a convenient way of changing the Merkle root.
Pieter Wuille
CC BY-SA 4.0
2023-03-02T22:44:36.707Z
Thank you again for your reply.
I think it is very strange that there are 72 hex digits (in other words, 36 bytes) freely in the Coinbase transaction and there is no law for it.
This alone makes a (16^72 = 10^87) variation on block header.   Is it possible to remove this part altogether or reduce its length?
Ali
CC BY-SA 4.0
2023-03-02T22:51:14.053Z
The consensus rules only require it to be between 2 and 100 bytes (I have no idea why this rule exists, but it does), and that it has to start with a push of the height in little-endian encoding (BIP34).
Pieter Wuille
CC BY-SA 4.0
2023-03-03T14:08:30.593Z
Some speculation on coinbase input script limits in [another question](https://bitcoin.stackexchange.com/q/35455/13866)
RedGrittyBrick
CC BY-SA 4.0
2023-03-03T21:57:05.420Z
Thanks @RedGrittyBrick
Ali
CC BY-SA 4.0
2023-03-02T21:24:08.530Z
2023-03-02T21:24:08.530Z
Pieter Wuille
<p>According to this <a href="https://developer.bitcoin.org/reference/transactions.html" rel="nofollow noreferrer">site</a>, in the <strong>coinbase input</strong> part, What is the <strong>coinbase script</strong> and where did it come from?</p>
<p>It is said that this is a <strong>arbitrary data</strong>, but I don't know <strong>how this string is generated</strong>?</p>
<p>Just below this section, in the example, the following string is reported:
062f503253482f0472d35454085fffedf2400000f90f54696d652026204865616c74682021</p>
<p><em>Thanks for any advice,</em></p>
<p><em>Best regards,</em></p>

CC BY-SA 4.0
2023-10-22T12:38:01.623Z
Related: https://bitcoin.stackexchange.com/q/20721/5406
Murch
<script><coinbase-transaction>
What is coinbase script (arbitrary data)?
Ali
# What is coinbase script (arbitrary data)?

(Asked by: username_0 on 2023-03-02)

According to this [site](https://developer.bitcoin.org/reference/transactions.html), in the **coinbase input** part, What is the **coinbase script** and where did it come from?

It is said that this is a **arbitrary data**, but I don't know **how this string is generated**?

Just below this section, in the example, the following string is reported:
062f503253482f0472d35454085fffedf2400000f90f54696d652026204865616c74682021

*Thanks for any advice,*

*Best regards,*

**Tags:** script, coinbase-transaction

> **Comments:**
> **username_1**: Related: https://bitcoin.stackexchange.com/q/20721/5406  

---

## 1 answers

### Answer by username_2 on 2023-03-02. Score: 3 | Accepted answer

The miner chooses it, freely.

They can use it as an additional nonce (when the nonce is the block header overflows, the miner needs to switch to different transactions in the block to modify it further; the coinbase is an obvious place to make non-impactful, cheap, changes), or use it to publish messages.

In addition, [BIP34](https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki) (active as a consensus rule since 2012) requires the coinbase scriptSig to start with the height of the block, in a particular encoding.

> **Comments:**
> **username_0**: @ username_2 username_2. Thank you for answering me so quickly. When a new block is mined, miners can change the Merkel root, Nonce and time parameters to be able to mine the block. In order to change the Merkel root, we need to increase or decrease the transactions. You mean that in addition to these, the miner also has a long string at his disposal on coinbase, with which he can also change the Merkel root?  
> **username_2**: (it's named after Ralph Merkle, not Angela Merkel). Yes, it's yet another way to introduce variation to the block header, if timestamp and nonce don't suffice. Any change to the transaction set works (through the Merkle root), but having this otherwise ignored (apart from BIP34) field in the coinbase transaction is a convenient way of changing the Merkle root.  
> **username_0**: Thank you again for your reply. I think it is very strange that there are 72 hex digits (in other words, 36 bytes) freely in the Coinbase transaction and there is no law for it. This alone makes a (16^72 = 10^87) variation on block header.   Is it possible to remove this part altogether or reduce its length?  
> **username_2**: The consensus rules only require it to be between 2 and 100 bytes (I have no idea why this rule exists, but it does), and that it has to start with a push of the height in little-endian encoding (BIP34).  
> **username_3**: Some speculation on coinbase input script limits in [another question](https://bitcoin.stackexchange.com/q/35455/13866)  
> **username_0**: Thanks @username_3  

---

