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.
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
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?
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
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.