An alternative: OP_CAT & OP_CHECKSIGFROMSTACK



Summary:

In this conversation, the speaker thanks Russell for a detailed comparison. They discuss the benefits of OP_CHECKSIGFROMSTACKVERIFY and ANYPREVOUT, with the speaker noting that the power from CHECKSIGFROMSTACKVERIFY is impressive and enables many new use cases. However, they caution that it may be too powerful for covenants, as it enables a non-computationally enumerable set of restrictions. The speaker also notes that working with OP_COSHV is much simpler from a developer point of view and uses less per-block bandwidth, making it preferable for decongesting blocks. They suggest that OP_COSHV has less potential for negative interaction with future opcodes like OP_PUBKEYTWEAK. The exact byte cost for OP_CHECKSIGFROMSTACK is unknown, whereas OP_COSHV scripts can be a single byte with templating changes to taproot. If the main complaint about OP_COSHV is that it peeks at surrounding data, the speaker suggests implementing it more closely to a multi-byte pushdata opcode or doing the template optimization. Finally, they note that OP_LEFT is safer to implement than OP_CAT and should be more efficient for OP_CHECKSIGFROMSTACK scripts.


Updated on: 2023-06-13T18:58:54.572408+00:00