==============================================================================================================================================================

Bitcoin Technical Resources

A curated collection of technical resources for Bitcoin developers and researchers.

Opcodes and Protocol Development

Core Covenant Opcodes

OP_CHECKSIGFROMSTACK

OP_CHECKSIGFROMSTACK (OP_CSFS) enables verification of signatures against arbitrary messages, not just transaction data. This allows for more flexible scripting capabilities including paying for signatures, delegating spending authority, and oracle-based contracts. When combined with OP_CAT, it can enable fraud proofs for Lightning channels and emulate CTV functionality.

OP_CHECKTEMPLATEVERIFY (CTV)

CTV is a proposed covenant opcode that allows outputs to specify exactly how their funds may be spent by committing to transaction fields. It enables significant scaling improvements including more efficient channel factories, joinpools, and enhanced Lightning Network protocols, while dramatically reducing signatures needed for Discreet Log Contracts.

OP_CAT

Originally disabled in 2010, OP_CAT concatenates two stack elements and is frequently proposed for re-enabling. Combined with OP_CHECKSIGFROMSTACK, it enables powerful covenant constructions including vaults and recursive covenants, and can emulate OP_CHECKTEMPLATEVERIFY functionality for scaling solutions.

Vault and Security Enhancements

OP_VAULT and OP_UNVAULT (BIP345)

These opcodes enable sophisticated vault constructions requiring two separate transactions in different blocks to spend funds. This provides enhanced security through time delays and works with CTV for creating dynamic vaults, representing an important advancement for Bitcoin custody solutions.

Lightning Network Improvements

SIGHASH_ANYPREVOUT (APO)

APO enables eltoo (LN-Symmetry), a more efficient Lightning Network enforcement mechanism that replaces penalty-based security with state updates. This significantly simplifies Lightning implementations, reduces storage requirements, and makes Lightning more scalable and safer.

Package Relay and V3 Transactions

Package relay enables transaction packages to be evaluated based on combined feerate, solving key Lightning Network pinning attacks. V3 transaction relay policy and ephemeral anchors build on this to provide more efficient fee-bumping mechanisms for Layer 2 protocols.

Advanced Scaling Proposals

LNHANCE Bundle

LNHANCE combines OP_CHECKTEMPLATEVERIFY, OP_CHECKSIGFROMSTACK, and OP_INTERNALKEY. This bundle enables LN-Symmetry, Ark-style joinpools, reduced-signature DLCs, vaults without presigned transactions, and potentially non-interactive Lightning channels.

MATT (Merklize All The Things)

MATT proposes OP_CHECKCONTRACTVERIFY alongside CTV and OP_CAT to enable flexible smart contracts through simple covenant opcodes. It allows embedding data within UTXOs and constraining output scripts, efficiently implementing vaults and joinpools while maintaining generality.

Channel Factories

Channel factories allow multiple payment channels to be opened without individual on-chain transactions. Factory exits can be optimized to reduce on-chain size by 50-99% under ideal circumstances, providing massive scaling benefits for Lightning Network.

Joinpools

Joinpools enable multiple users to trustlessly share UTXOs, dramatically improving on-chain efficiency. Combined with covenant opcodes like CTV and CSFS, they represent a significant scaling solution for multi-party Bitcoin contracts.