In what documentation? I believe you are talking about how rust-bitcoin
refers to the OPs > OP_FALSE
and < OP_PUSHDATA1
and will answer as such.
There are multiple OP codes pushing bytes to the stack, defined as integers.
Special case: pushing small integers
There are dedicating OP codes for pushing integers from -1
to 16
(named OP_1NEGATE
, OP_0
and OP_1
Β to OP_16
and valued 0x4f
, Ox00
and 0x51
to 0x60
).
They are used for instance for (smallish) multisigs as it saves you 1 byte per number pushed compared to using a "real" push opcode.
"PUSHBYTES
": pushing small byte arrays
The (not named in the reference implementation) OP codes valued from 0x01
to 0x4b
allow to push from 1 (0x01
) to 75 (0x4b
) bytes to the stack.
They are commonly used to push pubkeys and signatures.
PUSHDATA
: pushing byte arrays
The PUSHDATA1
, PUSHDATA2
andΒ PUSHDATA4
(0x4c
, 0x4d
and 0x4e
) operands are used to push a byte array to the stack which size is defined as a variable-length integer .
Further: too many encodings!
This flexibility of encoding introduced malleability in the scriptSig
, which was not protected by the signature (which it carries).
BIP62 proposed to restrict this encoding to avoid possible malleation.
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments