BIPs bitcoin improvement proposals

349 - OP_INTERNALKEY

BIP: 349 source Layer: Consensus (soft fork) Title: OP_INTERNALKEY Authors: Brandon Black Jeremy Rubin Status: Draft Type: Specification Assigned: 2024-11-14 License: BSD-3-Clause Abstract This BIP describes a new tapscript opcode (OP_INTERNALKEY) which pushes the taproot internal key to the stack. Specification When verifying taproot script path spends having leaf version 0xc0 (as defined in BIP 342), OP_INTERNALKEY replaces OP_SUCCESS203 (0xcb). OP_INTERNALKEY pushes the 32-byte x-only representation of the taproot internal key (referred to as p), as defined in BIP 341, to the stack. Motivation Key spend with additional conditions When building taproot outputs, especially those secured by an aggregate key representing more than one signer, the parties may wish to collaborate on signing with the taproot internal key, but only with additional script restrictions. In this case, OP_INTERNALKEY saves 8 vBytes. Mitigated control block overhead for scripts using ha...

348 - CHECKSIGFROMSTACK

BIP: 348 source Layer: Consensus (soft fork) Title: CHECKSIGFROMSTACK Authors: Brandon Black Jeremy Rubin Status: Draft Type: Specification Assigned: 2024-11-26 License: BSD-3-Clause Abstract This BIP describes a new opcode for the purpose of checking cryptographic signatures in bitcoin scripts against data from the stack. Summary When verifying taproot script spends having leaf version 0xc0 (as defined in BIP 342), we propose OP_CHECKSIGFROMSTACK to replace OP_SUCCESS204 (0xcc). OP_CHECKSIGFROMSTACK has semantics similar to OP_CHECKSIG, as specified below. Briefly, it pops 3 elements from the stack: a 32-byte public key, a message, and a signature. If the signature is valid for that public key and message, 1 is pushed to the stack. If the signature is the empty vector, 0 is pushed to the stack, and otherwise script execution fails. Only 32-byte keys are constrained. Similar to BIP 342 unknown key types, for other key lengths no signature verification is perfo...

346 - OP_TXHASH

BIP: 346 source Layer: Consensus (soft fork) Title: OP_TXHASH Authors: Steven Roose Brandon Black Status: Draft Type: Specification Assigned: 2024-04-24 License: BSD-3-Clause Abstract This BIP proposes a new opcode OP_TXHASH, to be activated as a change to the semantics of OP_SUCCESS189 in tapscript contexts. This opcode provides a generalized method for introspecting certain details of the spending transaction, which enables non-interactive enforcement of certain properties of the transaction spending a certain UTXO. Together with an opcode like OP_CHECKSIGFROMSTACK, this opcode effectively provides a fully generalized signature hash construction, fully supporting all existing SIGHASH flags, the proposed sighash flags from BIP-118 (SIGHASH_ANYPREVOUT) and many other new signature hash combinations. The constructions specified in this BIP also open up the way for other potential updates; see Motivation section for more details. Specification OP_TXHASH OP_TXHAS...