Gavin Andresen [ARCHIVE] on Nostr: đ
Original date posted:2011-08-26 đď¸ Summary of this message: Whitelisting ...
đ
Original date posted:2011-08-26
đď¸ Summary of this message: Whitelisting the basic CHECKMULTISIG form is a non-controversial solution, and a bug in the code has been identified and fixed.
đ Original message:> Whitelisting the basic CHECKMULTISIG form (assuming it can be made to
> work) seems uncontroversial, why not do it today?
That seems like the right way forward.
I just wrote a unit test and stepped through the CHECKMULTISIG code to
see exactly what the bug is, and the offending line is:
797 int isig = ++i;
798 i += nSigsCount;
It should be just int isig = i;
The result is CHECKMULTISIG expects one extra item on the stack, so
the workaround would be a standard transaction type of the form:
scriptSig: OP_0 sig1...m
scriptPubKey: m pubkey1...n n OP_CHECKMULTISIG
--
--
Gavin Andresen
Published at
2023-06-07 02:18:58Event JSON
{
"id": "bb042d76a913014c393fc844099ae42dc41a87cf841ed2c36bef8bfb3a2f96cb",
"pubkey": "857f2f78dc1639e711f5ea703a9fc978e22ebd279abdea1861b7daa833512ee4",
"created_at": 1686104338,
"kind": 1,
"tags": [
[
"e",
"391ebcb8eb3f9b5884cfbf66f4a99b12c015cc93baa9452c114d68f52d1168ec",
"",
"root"
],
[
"e",
"27ef96180f3732885b29ef459c3dec6b0a92a62db0c2bbb7425504632d11f811",
"",
"reply"
],
[
"p",
"f2c95df3766562e3b96b79a0254881c59e8639f23987846961cf55412a77f6f2"
]
],
"content": "đ
Original date posted:2011-08-26\nđď¸ Summary of this message: Whitelisting the basic CHECKMULTISIG form is a non-controversial solution, and a bug in the code has been identified and fixed.\nđ Original message:\u003e Whitelisting the basic CHECKMULTISIG form (assuming it can be made to\n\u003e work) seems uncontroversial, why not do it today?\n\nThat seems like the right way forward.\n\nI just wrote a unit test and stepped through the CHECKMULTISIG code to\nsee exactly what the bug is, and the offending line is:\n 797\t int isig = ++i;\n 798\t i += nSigsCount;\n\nIt should be just int isig = i;\n\nThe result is CHECKMULTISIG expects one extra item on the stack, so\nthe workaround would be a standard transaction type of the form:\n\nscriptSig: OP_0 sig1...m\nscriptPubKey: m pubkey1...n n OP_CHECKMULTISIG\n\n\n-- \n--\nGavin Andresen",
"sig": "5294170a31ac764598260722b570c4a3dd7f7d04ebfc120dc8abed6b8e5349b0c217cd5bb5a0e1c792b34579fb139a8fe4e82ddfe6c688850e6c23c1b490cdce"
}