Since the scriptSig of the coinbase transaction of a block can contain arbitrary data, what is the maximum number of bytes it can contain? I've seen various mentions of a limit around 100 bytes, but can't find that defined anywhere.
Asked
Active
Viewed 186 times
5
JBaczuk
- 7,388
- 1
- 13
- 34
1 Answers
5
The maximum is 100 bytes and is checked and defined here: https://github.com/bitcoin/bitcoin/blob/master/src/consensus/tx_verify.cpp#L195
Ava Chow
- 70,382
- 5
- 81
- 161
-
1The check was moved a few years ago, this link to v26 should be stable: https://github.com/bitcoin/bitcoin/blob/v26.0/src/consensus/tx_check.cpp#L46-L49 – Sjors Provoost Dec 07 '23 at 22:14
-
1Fwiw the check has been present since v0.1.0 (see "coinbase script size" in main.h) – Sjors Provoost Dec 07 '23 at 22:50