<p>Basically it is the length of a signature. In this encoding scheme we find R or S values for sigs, that can have a different length, making the whole string being 72,73 or 74 bytes long.</p>

<p>Pieter described it here: <a href="https://bitcoin.stackexchange.com/questions/12554/why-the-signature-is-always-65-13232-bytes-long/12556#12556">Why the signature is always 65 (1+32+32) bytes long?</a></p>

<p>and here: <a href="https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script/57650#57650">What are the parts of a Bitcoin Transaction &quot;Input&quot; script?</a></p>

<p>I think older tx even had 0x49 at the beginning, then both R and S values would have a length of 33 bytes. I can't find the link, but I was under the impression, that since bitcoin core release 13 these length don't appear anymore (to be verified).</p>

<p>There is also some older reference here: <a href="https://bitcointalk.org/index.php?topic=8392.0" rel="nofollow noreferrer">https://bitcointalk.org/index.php?topic=8392.0</a></p>

CC BY-SA 3.0
2018-01-26T09:30:37.523Z
2018-01-26T09:30:37.523Z
pebwindkraft
<p>For most transactions, the input scriptSig will be a push of the signature followed by a push of the public key. The "push" part is done with script opcodes which say how long it is, and the signature is encoded as DER.</p>

<p>47/48 are the push opcodes, to say 0x47 or 0x48 bytes will follow. Then the signature is encoded as:
<code>0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] [sighash-type]</code>
So the total length in your examples is either 0x44 or 0x45, and the R-length is 0x20 or 0x21.</p>

CC BY-SA 3.0
2018-01-25T21:49:45.350Z
So they do the same thing in two different ways? If so, why don't use one way?
lemanb84
CC BY-SA 3.0
2018-01-25T21:51:39.243Z
No, one of them is if the R-length is 0x21 and the other is for R-length 0x20. Depends how long R is in the signature.
meshcollider
CC BY-SA 3.0
2018-01-25T21:45:08.270Z
2018-01-25T21:45:08.270Z
meshcollider
<p>What is the difference or the meaning of these two headers of input scripts?</p>

<p>1) 4730440220
2) 4830450221</p>

<p>I see a lot of them in transactions but I don't understand the difference.</p>

<p>Thanks</p>

<transactions><bitcoin-core><blockchain>
Input script difference
lemanb84
# Input script difference

(Asked by: username_0 on 2018-01-25)

What is the difference or the meaning of these two headers of input scripts?

1) 4730440220
2) 4830450221

I see a lot of them in transactions but I don't understand the difference.

Thanks

**Tags:** transactions, bitcoin-core, blockchain


---

## 2 answers

### Answer by username_1 on 2018-01-26. Score: 0 | Accepted answer

Basically it is the length of a signature. In this encoding scheme we find R or S values for sigs, that can have a different length, making the whole string being 72,73 or 74 bytes long.

Pieter described it here: [Why the signature is always 65 (1+32+32) bytes long?](https://bitcoin.stackexchange.com/questions/12554/why-the-signature-is-always-65-13232-bytes-long/12556#12556)

and here: [What are the parts of a Bitcoin Transaction "Input" script?](https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script/57650#57650)

I think older tx even had 0x49 at the beginning, then both R and S values would have a length of 33 bytes. I can't find the link, but I was under the impression, that since bitcoin core release 13 these length don't appear anymore (to be verified).

There is also some older reference here: <https://bitcointalk.org/index.php?topic=8392.0>


---

### Answer by username_2 on 2018-01-25. Score: 0

For most transactions, the input scriptSig will be a push of the signature followed by a push of the public key. The "push" part is done with script opcodes which say how long it is, and the signature is encoded as DER.

47/48 are the push opcodes, to say 0x47 or 0x48 bytes will follow. Then the signature is encoded as:
`0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] [sighash-type]`
So the total length in your examples is either 0x44 or 0x45, and the R-length is 0x20 or 0x21.

> **Comments:**
> **username_0**: So they do the same thing in two different ways? If so, why don't use one way?  
> **username_2**: No, one of them is if the R-length is 0x21 and the other is for R-length 0x20. Depends how long R is in the signature.  

---

