CIP-33 (File Storage in P2WSH Outputs) was a Counterparty Improvement Proposal by JP Janssen, created on 19 December 2023. It described putting file bytes into the 32-byte witness-program fields of Bitcoin P2WSH-shaped transaction outputs while using a Counterparty asset issuance or broadcast to identify the file. The proposal was an Informational Draft, not a consensus change to Bitcoin or an adopted Counterparty Core rule. Its design became the direct documentary antecedent of Bitcoin Stamps' OLGA encoding in February 2024. Original 19 December 2023 proposal — direct source · 22 February 2024 OLGA specification
The December 2023 design
The first surviving version was committed by JP Janssen on 19 December 2023 with the title File Storage in P2WSH Outputs. Its motivation was to retain file bytes in Bitcoin outputs while avoiding the Base64 and bare-multisig overhead of the original Bitcoin Stamps encoding. The proposal explicitly contrasted this approach with Counterparty's earlier Stamps-related proposals, CIPs 25 and 26. Original commit
The proposed procedure was:
- Prepend a two-byte file-length integer to the file bytes.
- Divide the resulting byte stream into 32-byte chunks and pad the last chunk.
- Place those chunks into P2WSH-shaped Bitcoin output scripts.
- Include a Counterparty issuance or broadcast message in the same Bitcoin transaction, identifying the file.
The name P2WSH describes the standard output-script shape (OP_0 plus a 32-byte program). It does not mean that the stored file is a witness script revealed by an input. The protocol repurposes program bytes in outputs. For ordinary P2WSH, those bytes represent a witness-script hash; using arbitrary file chunks instead makes the outputs practically difficult to spend without a matching script. This distinction matters to both storage costs and claims about permanence. CIP-33 specification · Segregated Witness
CIP-33 called for a case-insensitive FILE: prefix. For issuance, an asset description beginning with FILE: was followed by a filename. For broadcasts, it proposed filename conventions using double underscores to associate one asset or triple underscores to associate a parent and its subassets. A broadcast by the current issuer was designated official; another sender's broadcast was unofficial under the proposed convention. These are application interpretation rules, not Bitcoin Script rules. Original draft
The draft links a purported mainnet example, transaction 549a5cc4bc189c800f0f9ea01068e8a7fd987c7dadb40c0b6a224d489ed070cc, and a testnet example. It also links the author's Electrum-based issuance and broadcast tools. Those are contemporary first-party implementation references. BOMB has not independently parsed the example transactions to establish their exact outputs, successful file reconstruction or acceptance by Counterparty Core. Original demonstration references
From CIP-33 to OLGA
On 21–22 February 2024, the Bitcoin Stamps repository assembled Octet Linked Graphics & Artifacts (OLGA) using this method. The OLGA document explicitly credits JP Janssen's File Storage in P2WSH Outputs. Its substantive text repeats CIP-33's chunking design and cost-comparison examples. OLGA document history · Early 22 February version
The adaptations matter. OLGA used STAMP: instead of FILE:, required a numeric Counterparty asset rather than a named or named-subasset asset, and specified a Counterparty issuance relationship rather than the broader CIP-33 broadcast-filename conventions. Its later text allowed the Counterparty message to use OP_RETURN or multisig encoding and reserved the characters following STAMP: for future use. These are restrictions of Stamp recognition, not a change to the 32-byte Bitcoin output carrier. OLGA specification at activation revision
One 22 February change by Reinamora shifted the proposed Classic Stamp OLGA activation boundary from block 832,000 to 833,000. The present Stamp indexer additionally assigns later, distinct OLGA cutovers to SRC-20 and SRC-101. This is evidence of per-protocol acceptance rules, not a single network-wide P2WSH activation. Activation-height edit · Indexer-maintained heights
Two limits in the published text that need correction
Both CIP-33 and its OLGA adaptation say that a standard Bitcoin node accepts a maximum of 200 outputs per transaction, leaving 198 for file chunks after an OP_RETURN and change. Their arithmetic, 198 × 32 − 2 = 6,334 bytes, is correct given that 200-output assumption. However, Bitcoin Core v27.0's IsStandardTx() checks transaction weight, each output's script type and dust, and the number of null-data outputs; it does not impose a blanket maximum of 200 outputs. Its policy constant is MAX_STANDARD_TX_WEIGHT = 400000. The documents therefore do not establish a universal 200-output Bitcoin relay limit. A wallet, builder or service may have its own limit; BOMB has not identified the origin of the number 200. Bitcoin Core v27.0 standardness implementation — direct source · Policy constants · Transaction standardness
There is also a literal arithmetic mistake: the drafts print 256^2 − 2 = 65,536, although the left-hand expression is 65,534. If the two-byte file length is an unsigned integer, its largest representable value is 65,535. These facts should not be conflated into a new protocol maximum: the original drafts do not fully specify their length-field byte order and enforcement, and BOMB has not tested the effective limit of a version-pinned decoder. Original limitations section
The same first-party comparison reports a 2,853-byte Classic Stamp and a 2,474-byte CIP-33/OLGA file. The claimed fee and dust savings describe different example files, not a controlled same-file test. And the proposed long-lived storage depends on the data-carrying outputs remaining unspent and represented in validating nodes' UTXO sets. That is a trade-off rather than an extra Bitcoin consensus permanence guarantee. Cost examples · OP RETURN
Status and preservation
CIP-33 retained Draft status in its archived text. In May 2024, the CIPs repository moved the old proposal files out of its then-current tree during a forum reorganization. Its present home is cip-archive/cip-0033.md. In June 2025, Counterparty's renewed CIP policy explicitly described its pre-2025 CIPs as historical and abandoned in their original form, potentially eligible for resubmission. That later archival judgement does not undo the proposal's documented influence on OLGA. May 2024 repository transition · 2025-onward CIP policy · Archived proposal
The surviving record establishes a proposed encoding, a contemporary author-provided tool and demonstration references, and a later derivative specification. It does not establish formal adoption by Counterparty Core, a complete deployed-file census, or that all CIP-33 files qualify as numbered Bitcoin Stamps.
Related pages
Open research
Independently parse CIP-33's cited mainnet and testnet transactions, including ordered output scripts, length prefix, Counterparty message and reconstructed file.
Identify which wallet, service or earlier specification originated the 200-output claim; compare it with version-pinned Bitcoin Core policy and actual standard relay behavior.
Check production CIP-33 and OLGA decoders for byte-order, length-field bounds, padding, unexpected output ordering and actual file-size limits.