pull down to refresh

When you create the unlocking script of a P2SH, you push both the original locking script and any combination of op codes that allow you to unlock it (eg one of the ways to unlock the script). As your unlocking script still contains the locking one, with all its unlocking ways, it's still a 2-of-3 multisig in my opinion. But the opcode pushed on top of the locking script would indeed be the same between a 2-of-2 and a 2-of-3 (if the 2 keys are the same of course). See https://learnmeabitcoin.com/technical/p2sh (same website, which is indeed fantastic!).
Okay, I think my confusion was that the parameters are not included in the hash. Thank you.
reply
My pleasure! Btw, the fact that you have to reveal the entire locking script each time you spend from a P2SH is one of the reasons behind the implementation of Taproot on Bitcoin. With Taproot, you're able to only reveal the path you actually use to spend the bitcoins, not all of them.
reply
How complex can the scripts get??
reply
The locking script complexity is only limited by the fees you are willing to pay to spend from it.
reply