Source / pinned edition

Relative lock-time using consensus-enforced sequence numbers

Source of package btc.consensus · BIP 68

work
urn:btc:clir:consensus#BIP68
number
BIP 68
kind
urn:btc:clir:consensus#other

BIP 68 raw MediaWiki at 7fe0b034ec967b52a5a28276419117326df93263

edition
urn:btc:clir:consensus#BIP68_RAW
language
en
officiality
official
materialisation
PINNED_OFFICIAL_BYTES
life cycle
—

Publications

URITypedocumentHashRetrieved
https://raw.githubusercontent.com/bitcoin/bips/7fe0b034ec967b52a5a28276419117326df93263/bip-0068.mediawikitext/plain; charset=utf-8sha256:ec5a50cc66fff7b4e4bc1f2e24587d7876649d1b5329ef73ffa2e5a3f647281b2026-08-31T00:00:00Z

Fragments — 1

Specification · section · referenced by: 12

en · official · sha256:56dd9d3b35e25806a81ce671afc50c4a668595a840f26417ec2738a0e227fedb

This specification defines the meaning of sequence numbers for transactions with an nVersion greater than or equal to 2 for which the rest of this specification relies on. All references to median-time-past (MTP) are as defined by BIP113. If bit (1 << 31) of the sequence number is set, then no consensus meaning is applied to the sequence number and can be included in any block under all currently possible circumstances. If bit (1 << 31) of the sequence number is not set, then the sequence number is interpreted as an encoded relative lock-time. The sequence number encoding is interpreted as follows: Bit (1 << 22) determines if the relative lock-time is time-based or block based: If the bit is set, the relative lock-time specifies a timespan in units of 512 seconds granularity. The timespan starts from the median-time-past of the output’s previous block, and ends at the MTP of the previous block. If the bit is not set, the relative lock-time specifies a number of blocks. The flag (1<<22) is the highest order bit in a 3-byte signed integer for use in bitcoin scripts as a 3-byte PUSHDATA with OP_CHECKSEQUENCEVERIFY (BIP 112). This specification only interprets 16 bits of the sequence number as relative lock-time, so a mask of 0x0000ffff MUST be applied to the sequence field to extract the relative lock-time. The 16-bit specification allows for a year of relative lock-time and the remaining bits allow for future expansion.

Referencing norms: BlockRelativeLockMaturesAtRequiredHeight, DisabledSequenceHasNoRelativeLock, RelativeLockKind, TimeRelativeLockMaturesAtRequiredMtp, TransactionIsValidInNarrowSlice, all_relative_locks_satisfied, output_confirmation_height, output_previous_block_mtp, relative_lock_kind, relative_lock_satisfied, relative_lock_value, transaction_valid_in_slice

The hash beside the text is the sha256 of its exact bytes. It is the check that the text shown matches the one pinned in the package: a divergence fails the oracle’s static analysis.