{"eip":8179,"title":"Blob Space Segments","description":"Minimal interface for declaring field element sub-ranges within EIP-4844 blobs","authors":["Vitalik Buterin (@vbuterin)","Skeletor Spaceman (@skeletor-spaceman)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2026-02-08","requires":[4844],"discussionsTo":"https://ethereum-magicians.org/t/erc-8179-blob-space-segments-bss/27867","repo":"ERCs","label":"ERC-8179","officialUrl":"https://eips.ethereum.org/EIPS/eip-8179","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-8179.md","url":"https://eips.huatuo.xyz/eip-8179/","tldr":{"en":"A one-function, event-only interface for declaring which field-element range of an EIP-4844 blob belongs to which protocol, so several rollups and apps can share one blob.","ja":"EIP-4844 blob のどのフィールド要素の範囲がどのプロトコルに属するかを宣言する、1 関数・イベントのみのインターフェース。複数のロールアップやアプリが 1 つの blob を共有できる。","ko":"EIP-4844 blob의 어느 필드 요소 범위가 어느 프로토콜에 속하는지 선언하는, 함수 하나와 이벤트만으로 된 인터페이스. 여러 롤업과 앱이 하나의 blob을 공유할 수 있다.","zh":"一个只有一个函数、仅通过事件工作的接口，用于声明 EIP-4844 blob 的哪段字段元素范围属于哪个协议，使多个 rollup 和应用可以共享同一个 blob。"},"tags":["blobs","data-availability","rollups","l2","events"],"explainers":{"en":{"lang":"en","tldr":"A one-function, event-only interface for declaring which field-element range of an EIP-4844 blob belongs to which protocol, so several rollups and apps can share one blob.","tags":["blobs","data-availability","rollups","l2","events"],"related":[4844,7588,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-8179/","markdown":"## What problem does it solve?\n\nAn [EIP-4844](/eip-4844/) blob holds 4,096 field elements (128 KiB), and you pay for the whole blob whether you fill it or not. Large rollups tend to fill theirs, but many small rollups use only a small fraction, so a lot of paid-for data availability goes to waste.\n\nProjects that try to share blob space each invent their own registry or events, so indexers and tooling cannot interoperate. ERC-8179 standardizes just one piece: an on-chain declaration that says \"field elements `[start, end)` of this blob are mine, and they carry content type X\". Blob construction, fee splitting and negotiation are left out.\n\n## How it works\n\n- A contract exposes `declareBlobSegment(blobIndex, startFE, endFE, contentTag)`, called **in the same transaction** that carries the blob.\n- It reads the blob's versioned hash with the `BLOBHASH` opcode. If there is no blob at that index it reverts with `NoBlobAtIndex`; if `startFE \u003e= endFE` or `endFE \u003e 4096` it reverts with `InvalidSegment`.\n- It emits `BlobSegmentDeclared(versionedHash, declarer, startFE, endFE, contentTag)` and returns the hash. Hash, declarer and tag are indexed so indexers can filter by blob, sender or protocol.\n- **No storage writes** in the core interface: the log is the only record. The spec estimates about 3,500 gas per declaration, roughly 7x cheaper than storing it.\n- Ranges are **half-open**, so segments tile cleanly: `[0, 2000) + [2000, 4096)`. A protocol using a whole blob declares `[0, 4096)`.\n- `contentTag` is a `bytes32`, conventionally `keccak256(\"protocol.version\")`, avoiding any central registry.\n- Multiple and even overlapping declarations are allowed; overlap detection and deduplication happen off-chain.\n- Optional extensions add a storage-backed paginated **Queryable** interface and a **Batch** call that declares several segments atomically.\n\n## Sample code\n\nReference-style implementation:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.24;\n\ncontract BlobSpaceSegments {\n    event BlobSegmentDeclared(bytes32 indexed versionedHash, address indexed declarer,\n        uint16 startFE, uint16 endFE, bytes32 indexed contentTag);\n    error InvalidSegment(uint16 startFE, uint16 endFE);\n    error NoBlobAtIndex(uint256 blobIndex);\n\n    function declareBlobSegment(uint256 blobIndex, uint16 startFE, uint16 endFE, bytes32 contentTag)\n        external returns (bytes32 versionedHash)\n    {\n        if (startFE \u003e= endFE || endFE \u003e 4096) revert InvalidSegment(startFE, endFE);\n        assembly { versionedHash := blobhash(blobIndex) }\n        if (versionedHash == bytes32(0)) revert NoBlobAtIndex(blobIndex);\n        emit BlobSegmentDeclared(versionedHash, msg.sender, startFE, endFE, contentTag);\n    }\n}\n```\n\nTwo protocols tiling one blob in the same blob transaction:\n\n```text\nbss.declareBlobSegment(0, 0,    2000, keccak256(\"optimism.bedrock\"))\nbss.declareBlobSegment(0, 2000, 4096, keccak256(\"social-blobs.v4\"))\n```\n\n## Things to know\n\n- **Status: Draft.** The interface name and details may still change.\n- Anyone can use any `contentTag`. Consumers should keep an allowlist of canonical declarer contracts per chain and tag, and treat declarations as claims, not proof of what is in the blob (the EVM cannot read blob contents).\n- Blob data is pruned by consensus nodes after about 18 days, but the declaration events remain forever.\n- Segments can anchor KZG point-evaluation proofs, but at about 50k gas per field element on-chain verification is only practical for small segments.\n- [ERC-7588](/eip-7588/) (blob transaction metadata) is complementary and can be used alongside it.\n"},"ja":{"lang":"ja","tldr":"EIP-4844 blob のどのフィールド要素の範囲がどのプロトコルに属するかを宣言する、1 関数・イベントのみのインターフェース。複数のロールアップやアプリが 1 つの blob を共有できる。","tags":["blobs","data-availability","rollups","l2","events"],"related":[4844,7588,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-8179/","markdown":"## 何を解決するのか\n\n[EIP-4844](/eip-4844/) の blob は 4,096 個のフィールド要素（128 KiB）を保持し、埋めても埋めなくても blob 全体の料金を支払います。大規模なロールアップは blob を埋める傾向がありますが、多くの小規模ロールアップはごく一部しか使わないため、支払い済みのデータ可用性の多くが無駄になります。\n\nblob の領域を共有しようとするプロジェクトは、それぞれ独自のレジストリやイベントを考案するため、インデクサーやツールが相互運用できません。ERC-8179 が標準化するのは 1 点だけです。「この blob のフィールド要素 `[start, end)` は自分のもので、コンテンツタイプは X」と宣言するオンチェーンの宣言です。blob の構築、手数料の分割、交渉は対象外です。\n\n## 仕組み\n\n- コントラクトが `declareBlobSegment(blobIndex, startFE, endFE, contentTag)` を公開し、blob を運ぶ**同じトランザクション内**で呼び出されます。\n- `BLOBHASH` オペコードで blob のバージョン付きハッシュを読み取ります。そのインデックスに blob がなければ `NoBlobAtIndex` で revert し、`startFE \u003e= endFE` または `endFE \u003e 4096` なら `InvalidSegment` で revert します。\n- `BlobSegmentDeclared(versionedHash, declarer, startFE, endFE, contentTag)` を emit してハッシュを返します。ハッシュ、宣言者、タグはインデックス化されるため、インデクサーは blob、送信者、プロトコルで絞り込めます。\n- コアのインターフェースでは**ストレージへの書き込みはありません**。ログだけが記録です。仕様は、1 回の宣言あたり約 3,500 ガスで、保存するよりおよそ 7 倍安いと見積もっています。\n- 範囲は**半開区間**なので、セグメントはきれいに敷き詰められます。`[0, 2000) + [2000, 4096)` のようにです。blob 全体を使うプロトコルは `[0, 4096)` を宣言します。\n- `contentTag` は `bytes32` で、慣習的には `keccak256(\"protocol.version\")` とし、中央のレジストリを不要にします。\n- 複数の宣言、さらには重なり合う宣言も許されます。重複の検出と排除はオフチェーンで行います。\n- 任意の拡張として、ストレージを使ったページ分割可能な **Queryable** インターフェースと、複数のセグメントをアトミックに宣言する **Batch** 呼び出しがあります。\n\n## サンプルコード\n\nリファレンス風の実装:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.24;\n\ncontract BlobSpaceSegments {\n    event BlobSegmentDeclared(bytes32 indexed versionedHash, address indexed declarer,\n        uint16 startFE, uint16 endFE, bytes32 indexed contentTag);\n    error InvalidSegment(uint16 startFE, uint16 endFE);\n    error NoBlobAtIndex(uint256 blobIndex);\n\n    function declareBlobSegment(uint256 blobIndex, uint16 startFE, uint16 endFE, bytes32 contentTag)\n        external returns (bytes32 versionedHash)\n    {\n        if (startFE \u003e= endFE || endFE \u003e 4096) revert InvalidSegment(startFE, endFE);\n        assembly { versionedHash := blobhash(blobIndex) }\n        if (versionedHash == bytes32(0)) revert NoBlobAtIndex(blobIndex);\n        emit BlobSegmentDeclared(versionedHash, msg.sender, startFE, endFE, contentTag);\n    }\n}\n```\n\n同じ blob トランザクション内で 1 つの blob を敷き詰める 2 つのプロトコル:\n\n```text\nbss.declareBlobSegment(0, 0,    2000, keccak256(\"optimism.bedrock\"))\nbss.declareBlobSegment(0, 2000, 4096, keccak256(\"social-blobs.v4\"))\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。** インターフェース名や詳細は今後変わる可能性があります。\n- 誰でも任意の `contentTag` を使えます。利用側は、チェーンとタグごとに正規の宣言者コントラクトの許可リストを持ち、宣言を主張として扱うべきで、blob の中身の証明とは見なさないでください（EVM は blob の内容を読めません）。\n- blob データはコンセンサスノードによって約 18 日後に削除されますが、宣言イベントは永久に残ります。\n- セグメントは KZG の点評価証明のアンカーにできますが、オンチェーン検証はフィールド要素 1 つあたり約 5 万ガスかかるため、小さなセグメントでしか現実的ではありません。\n- [ERC-7588](/eip-7588/)（blob トランザクションのメタデータ）は補完的で、併用できます。\n"},"ko":{"lang":"ko","tldr":"EIP-4844 blob의 어느 필드 요소 범위가 어느 프로토콜에 속하는지 선언하는, 함수 하나와 이벤트만으로 된 인터페이스. 여러 롤업과 앱이 하나의 blob을 공유할 수 있다.","tags":["blobs","data-availability","rollups","l2","events"],"related":[4844,7588,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-8179/","markdown":"## 어떤 문제를 해결하나요?\n\n[EIP-4844](/eip-4844/) blob은 4,096개의 필드 요소(128 KiB)를 담고 있으며, 채우든 채우지 않든 blob 전체에 대해 비용을 냅니다. 큰 롤업은 blob을 가득 채우는 경향이 있지만, 많은 소규모 롤업은 극히 일부만 사용하므로 비용을 낸 데이터 가용성의 상당 부분이 낭비됩니다.\n\nblob 공간을 공유하려는 프로젝트들은 각자 레지스트리나 이벤트를 만들어 내기 때문에 인덱서와 도구가 서로 호환되지 않습니다. ERC-8179는 딱 한 부분만 표준화합니다. \"이 blob의 필드 요소 `[start, end)`는 내 것이며 콘텐츠 타입은 X\"라고 말하는 온체인 선언입니다. blob 구성, 수수료 분배, 협상은 다루지 않습니다.\n\n## 어떻게 동작하나요?\n\n- 컨트랙트가 `declareBlobSegment(blobIndex, startFE, endFE, contentTag)`를 노출하며, blob을 싣고 있는 **같은 트랜잭션 안에서** 호출됩니다.\n- `BLOBHASH` 옵코드로 blob의 버전 해시를 읽습니다. 해당 인덱스에 blob이 없으면 `NoBlobAtIndex`로 revert하고, `startFE \u003e= endFE`이거나 `endFE \u003e 4096`이면 `InvalidSegment`로 revert합니다.\n- `BlobSegmentDeclared(versionedHash, declarer, startFE, endFE, contentTag)`를 emit하고 해시를 반환합니다. 해시, 선언자, 태그는 indexed이므로 인덱서가 blob, 발신자, 프로토콜별로 걸러낼 수 있습니다.\n- 핵심 인터페이스에서는 **스토리지 쓰기가 없습니다**. 로그가 유일한 기록입니다. 스펙은 선언 한 번에 약 3,500 가스로, 저장하는 것보다 대략 7배 저렴하다고 추정합니다.\n- 범위는 **반개구간**이므로 세그먼트가 깔끔하게 이어집니다. `[0, 2000) + [2000, 4096)`처럼요. blob 전체를 쓰는 프로토콜은 `[0, 4096)`을 선언합니다.\n- `contentTag`는 `bytes32`이며 관례적으로 `keccak256(\"protocol.version\")`을 써서 중앙 레지스트리를 없앱니다.\n- 여러 개의, 심지어 겹치는 선언도 허용됩니다. 겹침 탐지와 중복 제거는 오프체인에서 이뤄집니다.\n- 선택적 확장으로 스토리지 기반의 페이지네이션 가능한 **Queryable** 인터페이스와, 여러 세그먼트를 원자적으로 선언하는 **Batch** 호출이 있습니다.\n\n## 샘플 코드\n\n레퍼런스 스타일 구현:\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.24;\n\ncontract BlobSpaceSegments {\n    event BlobSegmentDeclared(bytes32 indexed versionedHash, address indexed declarer,\n        uint16 startFE, uint16 endFE, bytes32 indexed contentTag);\n    error InvalidSegment(uint16 startFE, uint16 endFE);\n    error NoBlobAtIndex(uint256 blobIndex);\n\n    function declareBlobSegment(uint256 blobIndex, uint16 startFE, uint16 endFE, bytes32 contentTag)\n        external returns (bytes32 versionedHash)\n    {\n        if (startFE \u003e= endFE || endFE \u003e 4096) revert InvalidSegment(startFE, endFE);\n        assembly { versionedHash := blobhash(blobIndex) }\n        if (versionedHash == bytes32(0)) revert NoBlobAtIndex(blobIndex);\n        emit BlobSegmentDeclared(versionedHash, msg.sender, startFE, endFE, contentTag);\n    }\n}\n```\n\n같은 blob 트랜잭션에서 두 프로토콜이 하나의 blob을 나눠 쓰는 예:\n\n```text\nbss.declareBlobSegment(0, 0,    2000, keccak256(\"optimism.bedrock\"))\nbss.declareBlobSegment(0, 2000, 4096, keccak256(\"social-blobs.v4\"))\n```\n\n## 알아둘 점\n\n- **상태: Draft.** 인터페이스 이름과 세부 사항은 아직 바뀔 수 있습니다.\n- 누구나 어떤 `contentTag`든 쓸 수 있습니다. 사용하는 쪽은 체인과 태그별로 정식 선언자 컨트랙트의 허용 목록을 유지해야 하며, 선언을 blob 내용의 증거가 아닌 주장으로 취급해야 합니다(EVM은 blob 내용을 읽을 수 없습니다).\n- blob 데이터는 합의 노드에서 약 18일 뒤 정리되지만, 선언 이벤트는 영원히 남습니다.\n- 세그먼트는 KZG 지점 평가 증명의 앵커가 될 수 있지만, 온체인 검증은 필드 요소당 약 5만 가스가 들기 때문에 작은 세그먼트에서만 현실적입니다.\n- [ERC-7588](/eip-7588/)(blob 트랜잭션 메타데이터)은 상호 보완적이며 함께 사용할 수 있습니다.\n"},"zh":{"lang":"zh","tldr":"一个只有一个函数、仅通过事件工作的接口，用于声明 EIP-4844 blob 的哪段字段元素范围属于哪个协议，使多个 rollup 和应用可以共享同一个 blob。","tags":["blobs","data-availability","rollups","l2","events"],"related":[4844,7588,2929],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-8179/","markdown":"## 它解决什么问题？\n\n一个 [EIP-4844](/eip-4844/) blob 包含 4,096 个字段元素（128 KiB），无论是否填满，都要为整个 blob 付费。大型 rollup 通常会填满自己的 blob，但许多小型 rollup 只用到其中很小的一部分，因此大量已付费的数据可用性被浪费了。\n\n试图共享 blob 空间的项目各自发明自己的注册表或事件，所以索引器和工具无法互操作。ERC-8179 只标准化其中一个环节：一个链上声明，说明“这个 blob 的字段元素 `[start, end)` 是我的，内容类型为 X”。blob 的构造、费用分摊和协商都不在范围内。\n\n## 它如何运作\n\n- 合约公开 `declareBlobSegment(blobIndex, startFE, endFE, contentTag)`，在携带该 blob 的**同一笔交易中**调用。\n- 它使用 `BLOBHASH` 操作码读取 blob 的版本化哈希。如果该索引处没有 blob，则以 `NoBlobAtIndex` revert；如果 `startFE \u003e= endFE` 或 `endFE \u003e 4096`，则以 `InvalidSegment` revert。\n- 它触发 `BlobSegmentDeclared(versionedHash, declarer, startFE, endFE, contentTag)` 并返回该哈希。哈希、声明者和标签都是 indexed，索引器可以按 blob、发送方或协议过滤。\n- 核心接口**没有存储写入**：日志是唯一的记录。规范估计每次声明大约 3,500 gas，比存储它便宜大约 7 倍。\n- 范围是**半开区间**，所以各段可以严丝合缝地拼接：`[0, 2000) + [2000, 4096)`。使用整个 blob 的协议声明 `[0, 4096)`。\n- `contentTag` 是 `bytes32`，惯例是 `keccak256(\"protocol.version\")`，从而无需任何中心化注册表。\n- 允许多个甚至相互重叠的声明；重叠检测和去重在链下进行。\n- 可选扩展增加了基于存储、支持分页的 **Queryable** 接口，以及原子地声明多个分段的 **Batch** 调用。\n\n## 示例代码\n\n参考风格的实现：\n\n```solidity\n// SPDX-License-Identifier: CC0-1.0\npragma solidity ^0.8.24;\n\ncontract BlobSpaceSegments {\n    event BlobSegmentDeclared(bytes32 indexed versionedHash, address indexed declarer,\n        uint16 startFE, uint16 endFE, bytes32 indexed contentTag);\n    error InvalidSegment(uint16 startFE, uint16 endFE);\n    error NoBlobAtIndex(uint256 blobIndex);\n\n    function declareBlobSegment(uint256 blobIndex, uint16 startFE, uint16 endFE, bytes32 contentTag)\n        external returns (bytes32 versionedHash)\n    {\n        if (startFE \u003e= endFE || endFE \u003e 4096) revert InvalidSegment(startFE, endFE);\n        assembly { versionedHash := blobhash(blobIndex) }\n        if (versionedHash == bytes32(0)) revert NoBlobAtIndex(blobIndex);\n        emit BlobSegmentDeclared(versionedHash, msg.sender, startFE, endFE, contentTag);\n    }\n}\n```\n\n两个协议在同一笔 blob 交易中拼接同一个 blob：\n\n```text\nbss.declareBlobSegment(0, 0,    2000, keccak256(\"optimism.bedrock\"))\nbss.declareBlobSegment(0, 2000, 4096, keccak256(\"social-blobs.v4\"))\n```\n\n## 需要注意\n\n- **状态：Draft。** 接口名称和细节仍可能改变。\n- 任何人都可以使用任何 `contentTag`。使用方应按链和标签维护规范声明者合约的允许列表，并把声明视为主张，而不是 blob 内容的证明（EVM 无法读取 blob 内容）。\n- 共识节点会在大约 18 天后修剪 blob 数据，但声明事件会永久保留。\n- 分段可以作为 KZG 点求值证明的锚点，但链上验证每个字段元素约需 5 万 gas，因此只适用于较小的分段。\n- [ERC-7588](/eip-7588/)（blob 交易元数据）与之互补，可以配合使用。\n"}},"requiredBy":[8180]}
