Why Nostr? What is Njump?
2023-06-07 02:18:58
in reply to

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
Author Public Key
npub1s4lj77xuzcu7wy04afcr487f0r3za0f8n2775xrpkld2sv639mjqsd44kw