Inscriptions

Digital Artifacts

Inscriptions are the metadata added or “inscribed” onto Bitcoin satoshis (sats), the smallest unit of the Bitcoin currency, which can include information attached to transactions. They exist solely as digital entries or “digital artifacts” on the Bitcoin blockchain, the public ledger of all bitcoin transactions.

Ordinals - the outcome of inscriptions made in Bitcoin transactions include inputs and outputs, where the inputs are the addresses from which the Bitcoin is being sent, and the outputs are the addresses to which the Bitcoin is being sent. Inscriptions are limited by block space allotment for each satoshi, with a ceiling of around 4 MB in size.

While satoshis themselves do not inherently have inscriptions, additional data in the form of transaction comments, messages, or assets can be inscribed onto a satoshi. This is what makes an inscription. The inscription can contain any information that the sender wishes to attach to the transaction so long as it satisfies the limit imposed on block size.

Evolution of Bitcoin's Transaction Witnesses

In a transaction, inscriptions contribute their data to the witness data, typically the space where signatures and essential information for unlocking the spending of an Unspent Transaction Output (UTXO) are stored. The term "witness" is derived from its role as a contractual witness, essentially "signing" to validate the transaction.

The introduction of the segregated witness ("SegWit") upgrade in Bitcoin in 2017, followed by Taproot in 2021, played a crucial role in laying the groundwork for systems like inscriptions. These upgrades removed size restrictions on witness data and offered a discount for data stored in a separate, segregated structure reserved for the witness. This resulted in an effective block size increase of up to 4MB.

Similar to OP_RETURN function, input witness data in inscriptions doesn't need to be permanently stored by a node to validate future transactions. Once the witness is validated, the node recognizes the transaction as a valid spend, creating valid UTXOs. Consequently, nodes can safely discard all data from the witness that is irrelevant to them.

Leveraging the absence of size restrictions compared to OP_RETURN (limited to 80 bytes), inscriptions can store a significantly larger amount of data per transaction. The mechanism used is reminiscent of the original OP_CHECKMULTISIG approach by Counterparty. This involves placing data in the Bitcoin script in a manner ignored by the script interpreter, ensuring the script remains valid despite the surplus data. In contrast to placing it in the output, inscriptions embed this data in the input's witness.

Envelopes

The inscription protocol introduces a unique storage mechanism referred to as an "envelope," essentially a bitcoin script designed not to be executed.

This protocol involves encoding digital artifacts, such as the bytes representing a JPEG, within these envelopes. The inscription occurs on the first satoshi of the initial output of the transaction, where the envelope is revealed only upon spending.

To serialize inscription content, unexecuted conditionals, known as an "envelope," are employed. Envelopes are comprised of an OP_FALSE OP_IF … OP_ENDIF structure, encapsulating numerous data pushes. Since envelopes function as no-ops, they maintain the script's semantics unchanged and can be seamlessly combined with any other locking script.

Navigating this system necessitates a lens for ordering and understanding inscriptions, along with specialized software for receiving, sending, and tracking them. Although inscriptions qualify as valid transactions per Bitcoin network rules, the scripts involved pose a challenge for the majority of Bitcoin wallets, as they require an understanding of ordinal theory.

Last updated