An alternative: OP_CAT & OP_CHECKSIGFROMSTACK



Summary:

In the context of proposed amendments to OP_COSHV, Russell O'Connor suggests four options. Firstly, replacing 'peeking at surrounding data' with a pushdata-like opcode. Secondly, splitting number-of-input-verification and outputhash-verification operations into different opcodes. Thirdly, implementing transaction reflection operations of OP_PUSHOUTPUTHASH and OP_NUMINPUTS that puts the outputhash and number of inputs respectively onto the stack. Fourthly, adding OP_CHECKSIGFROMSTACKVERIFY and transaction reflection operations of OP_PUSHOUTPUTHASH and OP_NUMINPUTS. O'Connor also suggests abandoning RISC-style Bitcoin Script in favor of a CISC-style taproot leaf type that directly provides various common policies. Jeremy Rubin agrees with the power of CHECKSIGFROMSTACKVERIFY but believes it may be too powerful and difficult to work with. He also believes that OP_COSHV is simpler to work with and uses less per-block bandwidth, making it preferable for decongesting blocks. Rubin suggests implementing OP_COSHV more closely to a multi-byte pushdata opcode or using template optimization. Finally, he notes that OP_LEFT is probably safer to implement than OP_CAT and should be more efficient for OP_CHECKSIGFROMSTACK scripts.


Updated on: 2023-06-13T19:00:26.647417+00:00