The file src/script/script.h
defines a MAX_SCRIPT_SIZE
of 10,000 B. Among other instances, the MAX_SCRIPT_SIZE
is used in the IsUnspendable()
check, which allows us to avoid adding outputs with excessively long scriptPubKeys
to the UTXO set. It also causes input validation to fail if a scriptSig
exceeds the permitted length.
In the context of talking about this limit, I was asked and didn't know: "When was the MAX_SCRIPT_SIZE
introduced?"