So, about this BIP, there are two ways to set up threshold signatures based on the number "k" (the minimum signatures needed to approve).
If we take K=16, we go with "OP_16", which is 0x60.
But what if K=17? Should we use 0x61 (which is 97) or 0x11 (which is 17)? Since k is 17, what’s the correct number?
Thanks,
angelo
Question about BIP: 387
2 replies 490 views
https://github.com/bitcoin/bitcoin/pull/24043/files#diff-a1732fc4dc1526b294a41db3f2d3d5e863ec76e68ee3f73449618551f7a469ebR101
If I understood the code correctly, the limit on number of pubkeys will be increased to 999 and in order to push bigger numbers, we'd do it like any other time but with "minimal push" enforced. Meaning for 0 to 16 the equivalent OP codes will be used (OP_0 to OP_16) and any other number will be pushed in its shortest way possible so 17 will be 0x0111 (0x01 is telling the interpreter to push 1 byte to the stack and then 0x11 is on the stack which is equal to 17) and 999 will be 0x02e703 (note the little endian order of 999).
BTW 0x61 is OP_NOP and can't be used.
Thanks
angelo
Related topics
- Are you in favor of BIP-110? Let's get a Bitcoin poll going. 0
- Curious about the 'Services' section in the peers of Bitcoin Core 6
- BIP proposal for Trezor and others 10
- Bitcoin Core displaying coins (UTXOs) in a new tab 13
- Erlay seems to have some issues here’s a better proposal for a bitcoin protocol without invites 3
- New Optional Hourglass Implementation is Live 3