Sep 23 - Sep 23, 2025
These include OP_CAT
, OP_PAIRCOMMIT
, OP_VECTORCOMMIT
, OP_TWEAKADD
, and OP_SHA256
related operations. Each of these opcodes presents unique advantages and disadvantages, particularly when considering their application in a scripting environment that either includes or excludes OP_CAT
.
In scenarios where the script is restored to its Global State Replication (GSR) form, OP_CAT
emerges as a naturally occurring opcode, thus rendering any concerns regarding introspection irrelevant. However, it's notable for its witness malleability issues, which often necessitate added inefficiencies in scripts leveraging this opcode. On the other hand, OP_TWEAKADD
is highlighted for its utility, especially in state carrying and making the process more streamlined, albeit with worse witness malleability compared to OP_CAT
. Furthermore, OP_SHA256STREAM
is recognized for enhancing OP_CAT
and OP_SHA256
heavy scripts by eliminating stack element size limitations and ensuring execution safety post-GSR.
The analysis then categorizes OP_PAIRCOMMIT
and OP_VECTORCOMMIT
as less suitable due to their reliance on a consensus around OP_CAT
, which is challenged by its computational completeness with other opcodes, complicating second-order effect considerations. Conversely, in environments lacking OP_CAT
, OP_PAIRCOMMIT
falls short in enabling fine-grained introspection, state-carrying covenants, and new arithmetic capabilities, among others. Meanwhile, OP_VECTORCOMMIT
is acknowledged for its optimization benefits over multiple calls to OP_PAIRCOMMIT
, particularly for managing larger numbers of smaller pieces.
The exploration further extends to a world without OP_CAT
but with access to MATT, where OP_TWEAKADD
and OP_VECTORCOMMIT
are essential for vector state carrying, despite potential witness malleability issues as outlined in the BIP. In this context, OP_PAIRCOMMIT
is seen as potentially useful for more complex state scenarios envisioned by MATT, whereas OP_SHA256TAGGED
serves as a reasonable yet mildly inefficient alternative.
Lastly, the discussion underscores the problematic nature of OP_SHA256STREAM
in contexts devoid of OP_CAT
, primarily due to its facilitation of transaction and parent transaction introspection, which could reintroduce complexities and vulnerabilities initially mitigated by excluding OP_CAT
.
This summary encapsulates a nuanced examination of various opcode proposals within the Bitcoin scripting landscape, reflecting a collaborative effort to weigh their respective merits and limitations in pursuit of enhanced functionality and security.
TLDR
We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.
We'd love to hear your feedback on this project.
Give Feedback