rskip | title | created | author | purpose | layer | complexity | status |
---|---|---|---|---|---|---|---|
353 |
Align RSK P2SH redeem script with Bitcoin Core standard transactions checks |
24-OCT-22 |
MI,AE |
Usa,Sec |
Core |
2 |
Adopted |
RSKIP | 353 |
---|---|
Title | Align RSK P2SH redeem script with Bitcoin Core standard transactions checks |
Created | 24-OCT-22 |
Author | MI,AE |
Purpose | Usa,Sec |
Layer | Core |
Complexity | 2 |
Status | Adopted |
On RSK Mainnet block #4,675,281, the network created the first Bitcoin UTXOs containing the PowPeg Time-locked Emergency Multisig (ERP). See RSKIP-201 [1] for more details about ERP.
The ERP proposal required a change to the peg-out Bitcoin transactions’ scripts, making them longer and more complex. We detected that the RSK P2SH redeem script is mischaracterized as “non-standard” by the Bitcoin Core nodes with the default configuration. Although the transactions are valid from a Bitcoin consensus point of view, default-configured Bitcoin nodes will not include them in their transaction mempool or broadcast them to the rest of the network. As a result, transactions are not being confirmed on the Bitcoin network, even when the pegout process on the RSK network side is completed.
Full details are explained in [2].
This RSKIP proposes a change to the RSK P2SH redeem script so it complies with current Bitcoin Core validations for standard transactions.
As explained in [2], after ERP activation, peg-out Bitcoin transactions are being characterized as "non-standard" by the Bitcoin Core nodes with the default configuration. As a result, peg-out transactions are not being confirmed on the Bitcoin network. Changing RSK redeem script as described in next section will let the network resume its peg-out operations.
Current RSK P2SH redeem script looks like this:
OP_NOTIF
OP_M
PUBKEYS...N
OP_N
OP_ELSE
OP_PUSHBYTES
CSV_VALUE
OP_CHECKSEQUENCEVERIFY
OP_DROP
OP_M
PUBKEYS...N
OP_N
OP_ENDIF
OP_CHECKMULTISIG
The proposal is to change it to the following:
OP_NOTIF
OP_M
PUBKEYS...N
OP_N
OP_CHECKMULTISIG
OP_ELSE
OP_PUSHBYTES
CSV_VALUE
OP_CHECKSEQUENCEVERIFY
OP_DROP
OP_M
PUBKEYS...N
OP_N
OP_CHECKMULTISIG
OP_ENDIF
The OP_CHECKMULTISIG
opcode is moved inside the OP_NOTIF
and OP_ELSE
statements right after the OP_N
opcode, making the script comply with Bitcoin Core standard checks.
References to the Bitcoin Core line codes involved in the standard input check can be found in [3][4][5].
This change is a hard-fork and therefore all full nodes must be updated.
[1] RSKIP-201: Time-locked Emergency Multisignature
[2] Incident report: RSK peg-out service outage
[3] Bitcoin Core reference - Number of signature check operations validation
[4] Bitcoin Core reference - Number of signature check operations retrieval
[5] Bitcoin Core reference - Maximum number of signature check operations in an IsStandard() P2SH script
Copyright and related rights waived via CC0.