Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
ERC-8179 allows multiple protocols to share the same EIP-4844 blob by dividing it into segments of field elements (FEs).
It defines the BlobSegmentDeclared event for announcing which range of a blob is used, by whom, and for what purpose. The core specification writes nothing to contract storage and uses event logs as the sole record of declarations, making it inexpensive to publish the boundaries of shared blob space.
This article explains the following proposal.
Overview
ERC-8179 defines an interface for partitioning EIP-4844 blobs into contiguous ranges of FEs and declaring those ranges through onchain events. Each blob comprises 4,096 FEs, each 32 bytes long. A conventional encoding sets the high byte to zero and stores payload data in the remaining 31 bytes, yielding approximately 126,976 usable bytes per blob. This is an encoding convention, not a mandatory restriction on all EIP-4844 field elements.
EIP-4844 introduced a blob data area separate from ordinary calldata so that rollups and other applications can publish large amounts of data at lower cost. The EVM cannot directly read blob contents, but the BLOBHASH opcode retrieves a transaction's blob versionedHash.
For more on EIP-4844, see the following article.
[EIP4844] Understanding Shard Blob Transactions
The core of ERC-8179 is the declareBlobSegment function, which declares a half-open range [startFE, endFE) within a blob. This range includes startFE but excludes endFE. For example, [0, 1500) and [1500, 3000) can be placed next to each other without overlapping at the boundary.
The following diagram shows how several protocols can share a blob.

One blob can be divided among uses such as L2 batches, social messages, and application-specific data. Each participant publishes its FE range and contentTag using the same BlobSegmentDeclared event format.
Motivation
EIP-4844 blobs have a fixed size of 128 KiB, but not every rollup fills every blob. A study cited by the proposal analyzed 26 rollups over six months and found that large rollups tended toward high blob utilization, while smaller rollups tended to use less than 5% of blob capacity. The study reported potential data availability cost savings of 80% to 99% through blob sharing. These estimates reflect the conditions of the cited study rather than guaranteed current savings.
Unused FEs represent data availability capacity that has already been paid for. If smaller protocols can use that spare capacity, existing blob submitters can recover some of their costs, while other protocols can publish data at lower cost than submitting their own blobs. Without a common format for specifying which participant uses which FE range, however, indexers, verifier contracts, and analytics tools would need separate implementations for each protocol.
ERC-8179 standardizes only segment declarations. Blob construction, fee settlement between participants, and segment negotiation are outside its scope. This narrow scope makes adoption possible by adding a contract call to an existing blob submission workflow.
Specification
ERC-8179 relies on EIP-4844 blobs and associates a blob's versionedHash, retrieved through the BLOBHASH opcode, with an FE range in an event. The core interface does not use storage; event logs are the sole record of declarations.
Terminology
The main terms used in the specification are listed below.
| Term | Description |
|---|---|
| FE | A field element in an EIP-4844 blob. Each blob contains 4,096 FEs of 32 bytes each. |
| Segment | A contiguous range of FEs in a blob, expressed as the half-open interval [startFE, endFE). |
versionedHash |
A hash derived from the EIP-4844 blob commitment, retrieved using the BLOBHASH opcode. |
contentTag |
A bytes32 identifier for the protocol or type of data using the segment. |
| Declarer | The msg.sender that calls declareBlobSegment. |
A contentTag is a label identifying a type of data, not a mechanism establishing ownership. To determine whether a declaration claiming to represent a protocol is authentic, consider the declarer's address together with the protocol's published policies.
IERC_BSS
A contract compliant with ERC-8179 implements the IERC_BSS interface.
interface IERC_BSS {
event BlobSegmentDeclared(
bytes32 indexed versionedHash,
address indexed declarer,
uint16 startFE,
uint16 endFE,
bytes32 indexed contentTag
);
error InvalidSegment(uint16 startFE, uint16 endFE);
error NoBlobAtIndex(uint256 blobIndex);
function declareBlobSegment(
uint256 blobIndex,
uint16 startFE,
uint16 endFE,
bytes32 contentTag
) external returns (bytes32 versionedHash);
}The interface consists of one function, one event, and two errors. The indexed event parameters versionedHash, declarer, and contentTag are the primary keys used for log filtering. The range boundaries startFE and endFE are recorded as unindexed event data.
declareBlobSegment
function declareBlobSegment(
uint256 blobIndex,
uint16 startFE,
uint16 endFE,
bytes32 contentTag
) external returns (bytes32 versionedHash);Declares an FE range within a blob and returns the blob's versionedHash.
- Parameters
| Parameter | Description |
|---|---|
blobIndex |
The zero-based index of a blob attached to the current transaction. |
startFE |
The first FE in the segment, inclusive. |
endFE |
The end of the segment, exclusive. |
contentTag |
A bytes32 identifier for the protocol or data type. |
- Return value
| Return value | Description |
|---|---|
versionedHash |
The blob's versionedHash obtained through BLOBHASH(blobIndex). |
The execution sequence is illustrated below.

First, check that startFE < endFE and endFE <= 4096. If either condition fails, revert with InvalidSegment(startFE, endFE). Retrieve the blob's versionedHash using BLOBHASH(blobIndex). If the result is bytes32(0), no blob exists at that index, so revert with NoBlobAtIndex(blobIndex).
If validation succeeds, emit BlobSegmentDeclared and return versionedHash. The core implementation does not write to storage. Calling the function twice with identical parameters emits two events; the implementation does not deduplicate them.
BlobSegmentDeclared event
event BlobSegmentDeclared(
bytes32 indexed versionedHash,
address indexed declarer,
uint16 startFE,
uint16 endFE,
bytes32 indexed contentTag
);Records a segment declaration in the event log.
| Field | Description |
|---|---|
versionedHash |
The versionedHash of the blob being declared. |
declarer |
The declarer's address. |
startFE |
The first FE in the segment. |
endFE |
The exclusive end of the segment. |
contentTag |
The identifier for the protocol or data type. |
Event logs provide a starting point for indexers and for supplying information to verifier contracts. The event alone does not establish what data the blob contains. Consumers must check the actual blob data, KZG proofs, and protocol-specific encoding rules as appropriate.
InvalidSegment error
error InvalidSegment(uint16 startFE, uint16 endFE);Reverts when the segment range is invalid: startFE >= endFE or endFE > 4096.
NoBlobAtIndex error
error NoBlobAtIndex(uint256 blobIndex);Reverts when BLOBHASH(blobIndex) returns bytes32(0), indicating that no blob exists at the supplied blobIndex.
The interface does not impose a fixed upper bound on blobIndex. Future EIPs may raise the blob count limit, and nonexistent indices can be detected using the zero value returned by BLOBHASH.
contentTag
The recommended way to derive a contentTag is keccak256("protocol.version"). Examples include the following.
| Use case | contentTag |
|---|---|
| Social messages v4 | keccak256("social-blobs.v4") |
| Optimism batches | keccak256("optimism.bedrock") |
| Celestia namespace | keccak256("celestia.namespace") |
| Generic rollup data | keccak256("rollup.generic") |
A contentTag of bytes32(0) is permitted but discouraged. Producing the zero value as a keccak256 output is computationally infeasible in practice, and its use may conflict with indexers that treat zero as a sentinel for an unset value.
Declaring a full blob
Protocols using an entire blob declare startFE = 0 and endFE = 4096.
bss.declareBlobSegment(0, 0, 4096, keccak256("myprotocol.v1"));This declaration is semantically equivalent to existing blob usage without sharing. Protocols that use an entire blob can emit the same event format, allowing indexers and analytics tools to handle partial and full blob usage uniformly.
Queryable extension
For use cases requiring onchain queries of declared segments, the optional IERC_BSS_Queryable extension is defined.
interface IERC_BSS_Queryable is IERC_BSS {
struct BlobSegment {
address declarer;
uint16 startFE;
uint16 endFE;
bytes32 contentTag;
}
function getSegments(bytes32 versionedHash, uint256 offset, uint256 limit)
external
view
returns (BlobSegment[] memory segments, uint256 nextOffset);
function segmentCount(bytes32 versionedHash) external view returns (uint256);
}The extension stores lists of segments by versionedHash. Consequently, implementations must accept higher gas costs than the core interface. Returning an unbounded array can cause gas and memory problems, so queries use pagination through offset and limit.
Batch extension
The optional IERC_BSS_Batch extension allows multiple segments to be declared in one call.
interface IERC_BSS_Batch is IERC_BSS {
struct BlobSegmentParams {
uint256 blobIndex;
uint16 startFE;
uint16 endFE;
bytes32 contentTag;
}
function declareBlobSegments(BlobSegmentParams[] calldata segments)
external
returns (bytes32[] memory versionedHashes);
}A single call can declare multiple ranges in the same blob or ranges associated with different blobIndex values. If any segment is invalid, the entire call must revert. This allows declarations for different purposes, such as L2 batches and social messages, to succeed together within a transaction.
Examples
In the following example, two protocols share one blob. Rollup batch data occupies the first part, and social messages occupy the remainder.
optimismBatcher.submitBatch(...);
bss.declareBlobSegment(0, 0, 2000, keccak256("optimism.bedrock"));
bss.declareBlobSegment(0, 2000, 4096, keccak256("social-blobs.v4"));The blob's FE ranges are divided as follows.
| FE range | Contents | Approximate usable payload |
|---|---|---|
[0, 2000) |
Optimism rollup batch | 62,000 bytes |
[2000, 4096) |
Social messages | 64,976 bytes |
Three protocols can also fill the same blob.
baseBatcher.submitBatch(...);
bss.declareBlobSegment(0, 0, 1500, keccak256("base.bedrock"));
bss.declareBlobSegment(0, 1500, 3000, keccak256("social-blobs.v4"));
bss.declareBlobSegment(0, 3000, 4096, keccak256("celestia.namespace"));Indexers can filter by contentTag to retrieve only the declarations relevant to them. Instead of dedicating the entire blob to a single protocol, participants can partition the blob space from 0 to 4096.
Rationale
ERC-8179 separates what is enforced onchain from what is left to offchain processes. The core focuses on declaration events and does not provide storage, deduplication, overlap prevention, or fee settlement.
Event-only design
The core interface uses no SSTORE operations. According to the proposal, the marginal cost of declareBlobSegment is approximately 3,500 gas, substantially less than the approximately 25,600 gas of a storage-backed alternative.
| Component | Estimated gas |
|---|---|
BLOBHASH opcode |
3 |
| Range validation | Approx. 6 |
LOG4 |
Approx. 1,875 |
| Event data | Approx. 512 |
| Calldata | Approx. 1,100 |
| Total | Approx. 3,500 |
In a stateful design, a cold SSTORE that sets a zero slot to a nonzero value costs 22,100 gas under the post-EIP-2929 gas schedule. By limiting declarations to events, ERC-8179 keeps the marginal cost low enough to add them to existing blob transactions. These figures are estimates from the proposal rather than execution benchmarks.
Why the function is named declare
The function is named declareBlobSegment rather than registerBlobSegment. The word "register" suggests that the information is written to storage and can be queried later. The core specification, by contrast, creates no persistent contract state and merely announces a claim about the use of a range through an event.
Why return versionedHash?
declareBlobSegment returns versionedHash. If the caller needs the same blob's hash in subsequent processing, it does not need to call BLOBHASH again. Routing contracts and multicall workflows can pass the declaration's return value directly into subsequent logic.
Why use uint16?
A blob contains 4,096 FEs; individual indices from 0 to 4095 fit in 12 bits. Solidity's uint16 type is small enough for this purpose and can also represent the exclusive upper boundary of 4096. Although ABI encoding pads both uint16 and uint32 to 32 bytes, uint16 communicates the small range of valid values through the type. It also supports efficient storage packing in the Queryable extension's BlobSegment structure.
Half-open intervals
A segment is a half-open interval [startFE, endFE). The ranges [0, 2000) and [2000, 4096) therefore cover a full blob without gaps or overlaps. With closed intervals [startFE, endFE], an extra +1 calculation is required at boundaries, introducing opportunities for off-by-one errors.
Events rather than in-blob headers
Another possible design is to put segment information in a header at the beginning of a blob. ERC-8179 instead uses onchain events.
There are four main reasons:
- The EVM cannot directly read blob contents.
- An in-blob header consumes FEs that could otherwise carry payload data.
- Existing blob submission protocols would need to change their blob encoding.
- Event logs are an established primitive supported by
eth_getLogs, indexers, and subgraphs.
An in-blob header may be suitable for protocols that closely coordinate blob construction. For a general-purpose standard, however, the event-based approach is easier to adopt because it only requires an additional contract call in an existing blob transaction.
Anchoring KZG verification
A BlobSegmentDeclared event records versionedHash and an FE range. These values provide the starting point for verifying blob values using the EIP-4844 point evaluation precompile.
The following diagram illustrates the path from an event declaration to verification.

A verifier obtains versionedHash, startFE, endFE, and contentTag from event logs. It then obtains the relevant blob data and KZG proofs and supplies the versionedHash, evaluation point z corresponding to the field element, value y, commitment, and proof to the point evaluation precompile for each relevant FE. The precompile verifies that the polynomial associated with the specified blob commitment evaluates to y at z. Whether the bytes form valid protocol-specific data is a separate check that each application performs.
Onchain KZG verification costs scale with the number of FEs. The proposal estimates approximately 50,000 gas for one FE, 500,000 gas for 10 FEs, 5,000,000 gas for 100 FEs, and 200,000,000 gas for an entire blob. Onchain verification is therefore best suited to small segments.
Handling overlapping ranges
ERC-8179 does not prohibit overlapping segment declarations onchain. Preventing overlaps would require storing existing ranges and comparing them on each call, conflicting with the core's low-cost design.
Overlapping FEs cannot independently hold two different payloads. If competing protocols claim the same FEs, indexers detect the overlap and consuming protocols decide which declarers and ranges to accept. The declarations themselves do not modify the blob data.
Why ERC-165 is not mandatory
ERC-8179 does not require ERC165 support. A one-function interface can be identified using its event and function signatures, and supportsInterface adds deployment and query costs. Implementations may support ERC-165, but it is not a compliance requirement.
For more on ERC-165, see the following article.
[ERC165] Checking Whether a Contract Supports a Particular Interface
Implementations that use an interface ID can calculate it as follows.
bytes4(keccak256("declareBlobSegment(uint256,uint16,uint16,bytes32)"))Compatibility
ERC-8179 introduces a new interface without modifying existing ERCs or EVM specifications. It depends on the EIP-4844 BLOBHASH opcode and cannot be used on chains that lack EIP-4844 support.
Protocols already using entire blobs can adopt it by declaring [0, 4096). Protocols using custom blob registration events or registries can either implement IERC_BSS directly or call a standalone BlobSpaceSegments contract within the same transaction.
Test cases
The proposal includes the following successful test cases.
blobIndex |
startFE |
endFE |
contentTag |
Expected result |
|---|---|---|---|---|
| 0 | 0 | 4096 | keccak256("test.v1") |
Emits a full-blob declaration event and returns versionedHash. |
| 0 | 2000 | 4096 | keccak256("test.v1") |
Emits a partial-segment declaration event. |
| 0 | 4095 | 4096 | keccak256("test.v1") |
Successfully declares a single-FE segment. |
| 0 | 0 | 2000 | keccak256("test.a") |
Successfully declares the first segment in a shared blob. |
| 0 | 2000 | 4096 | keccak256("test.b") |
Successfully declares the second segment in the same blob. |
The revert cases are as follows.
blobIndex |
startFE |
endFE |
Expected error |
|---|---|---|---|
| 0 | 4096 | 0 | InvalidSegment(4096, 0) |
| 0 | 100 | 100 | InvalidSegment(100, 100) |
| 0 | 0 | 5000 | InvalidSegment(0, 5000) |
| 0 | 5000 | 6000 | InvalidSegment(5000, 6000) |
| 99 | 0 | 4096 | NoBlobAtIndex(99) |
The important boundary condition is that startFE and endFE cannot be equal. Also, endFE = 4096 is valid, but values above 4096 are invalid.
Reference implementation
The reference implementation is a small contract that obtains versionedHash using the BLOBHASH opcode and emits the declaration event.
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.24;
import {IERC_BSS} from "./IERC_BSS.sol";
contract BlobSpaceSegments is IERC_BSS {
uint16 internal constant MAX_FIELD_ELEMENTS = 4096;
function declareBlobSegment(
uint256 blobIndex,
uint16 startFE,
uint16 endFE,
bytes32 contentTag
) external returns (bytes32 versionedHash) {
if (startFE >= endFE || endFE > MAX_FIELD_ELEMENTS) {
revert InvalidSegment(startFE, endFE);
}
assembly {
versionedHash := blobhash(blobIndex)
}
if (versionedHash == bytes32(0)) revert NoBlobAtIndex(blobIndex);
emit BlobSegmentDeclared(versionedHash, msg.sender, startFE, endFE, contentTag);
}
}The main implementation detail is the absence of storage variables. MAX_FIELD_ELEMENTS defines the upper bound, and a zero return value from blobhash(blobIndex) causes a revert because no blob exists at the specified index. The remaining information is recorded through the BlobSegmentDeclared event.
Security
ERC-8179 is a lightweight standard for declaring segments through events. It is not designed to enforce the accuracy of all declarations, the contents of the data, or the authenticity of declarers onchain.
False declarations
BLOBHASH returns a nonzero value only for blobs attached to the current transaction. A caller therefore cannot arbitrarily refer to a blob attached to another transaction. However, contracts throughout the call chain can refer to blobs attached to the same transaction. The restriction applies at the transaction level, not the caller level.
Overlapping segments
Multiple declarations for the same FE range are allowed. Since the contract does not enforce exclusive allocation, indexers and consuming protocols decide which declarations to accept. Competing claims over overlapping FEs create ambiguity about attribution, and indexers can detect those ranges and issue warnings.
Spam declarations
A segment declaration involves the base cost of a blob transaction, the execution gas for declareBlobSegment, and blob gas fees. Declarations without useful data cost the declarer or transaction sponsor gas. The properties of BLOBHASH prevent a transaction from making spam declarations that refer directly to a blob attached only to another transaction.
Front-running
Front-running another participant's blob declaration is impractical without paying for blob space. An attacker who wants to declare the same contentTag or range first for the same blob hash must attach the corresponding blob data to their own transaction and pay blob fees. They cannot retrieve the versionedHash of a blob attached only to another transaction using BLOBHASH in their own transaction.
Impersonating a contentTag
Anyone can emit an event using any contentTag. The tag is not a mechanism for establishing ownership. Protocols and indexers should maintain lists of canonical declarers using the combination of chainId, contentTag, and declarer address.
Reorganizations
Segment declarations share the finality of the block containing the blob transaction. If a chain reorganization removes that block, the declaration events in the block are also removed from the canonical chain. Indexers must roll back events from reverted blocks.
Duplicate events
Calling declareBlobSegment repeatedly with identical parameters emits multiple events with identical contents. The implementation does not deduplicate them. Indexers treat each event as distinct using the log index in addition to versionedHash, declarer, startFE, endFE, and contentTag, within its block and transaction context.
Indexer trust model
Offchain indexers handle overlap detection, declaration tracking, and duplicate events. Consumers do not have to trust a particular indexer: anyone can independently read the event logs and reconstruct the declaration set according to their own rules.
KZG verification cost
The point evaluation precompile incurs a cost for each FE. Small messages can be verified onchain, but checking every FE of a blob would exceed the block gas limit under the assumptions of the proposal. Verifier contracts should restrict verification to the necessary FEs within the declared [startFE, endFE) range.
The precompile verifies a value y at a specified evaluation point against a commitment. Whether y contains valid JSON, a binary message, or proof data must be checked using the protocol's own parser and validation logic.
Over-claiming
A protocol can declare a range larger than the amount of data it actually wrote. For example, it could write only 1,000 FEs but declare [0, 4096). Because the EVM cannot directly read blob contents, the core specification cannot prevent over-claiming.
Consumers should treat declarations as claims rather than guarantees. When precise attribution matters, they should combine known encoding rules, KZG proofs, and a list of canonical declarers.
Blob data pruning
EIP-4844 blob data has a minimum retention period of approximately 18 days on consensus-layer nodes, after which ordinary nodes may prune it. The BlobSegmentDeclared events are execution-layer logs and have a separate retention model. After blob pruning, historical logs can still establish that a range was declared, provided the logs remain accessible, but the referenced blob data may no longer be retrievable from ordinary consensus nodes. Protocols that require long-term verification must separately preserve the blob data or proofs they need.
Storage growth in the Queryable extension
The Queryable extension stores segment arrays by versionedHash. If a malicious participant declares a large number of segments for the same blob, retrieval costs can increase. Implementations using this extension should impose page size bounds and document their implementation-specific limits.
Conclusion
This article covered ERC-8179, which enables multiple protocols to share EIP-4844 blob space by declaring ranges of field elements.
ERC-8179 is not a complete blob-sharing protocol. It is a minimal interface for declaring which FE range is used, by whom, and for what purpose. Restricting the core to events keeps adoption costs low, while overlap detection and fee settlement are left to offchain or protocol-specific designs. When verifying small segments with KZG proofs, BlobSegmentDeclared provides the anchor linking the versionedHash to the relevant FE range.
I also publish articles on other platforms.




