ERC-8179 Blob space segment (Blob Space Segments)
Draft · Other · created 2026-02-08
A minimal interface for declaring, via an on-chain event, the range a party uses within a single blob. It clarifies boundaries when multiple protocols share one blob and lets indexers track usage in a common way.
Why it is needed
A blob introduced by EIP-4844 is 128KiB (4,096 field elements), but many rollups cannot fill this space. According to a 26-rollup analysis cited in the source, large rollups fill it nearly completely while small rollups often use less than 5%, and sharing could save 80-99% on data availability costs. However, even when multiple parties want to split a single blob, there has been no standard for announcing who uses which range, so each project has built its own events, dedicated registries, and separate indexing methods, leading to fragmentation where tools are incompatible with each other. Whoever posts the blob is already paying the full data availability cost for all 128KiB, so the remaining field elements go to waste. A standard declaration interface would let the unused space be opened to other protocols at no additional data cost.
What to implement
error InvalidSegment(uint16 startFE, uint16 endFE): An error that occurs when startFE is greater than or equal to endFE, or when endFE exceeds 4096.error NoBlobAtIndex(uint256 blobIndex): An error that occurs when there is no blob at the given index, causing BLOBHASH to return bytes32(0).function getSegments(bytes32 versionedHash, uint256 offset, uint256 limit) external view returns (BlobSegment[] memory segments, uint256 nextOffset): A function of the optional extension IERC_BSS_Queryable that returns, paginated, the list of segments declared for a specific version hash.function segmentCount(bytes32 versionedHash) external view returns (uint256): A function of the optional extension IERC_BSS_Queryable that returns the number of segments declared for a specific version hash.function declareBlobSegments(BlobSegmentParams[] calldata segments) external returns (bytes32[] memory versionedHashes): A function of the optional extension IERC_BSS_Batch that declares multiple segments in a single call. If any one is invalid, the entire call reverts.
In depth
Behavior rules for declareBlobSegment
An implementation must revert with InvalidSegment(startFE, endFE) if startFE >= endFE or endFE > 4096. The version hash must always be looked up via the BLOBHASH opcode, and if the result is bytes32(0), it must revert with NoBlobAtIndex(blobIndex). If validation passes, it emits BlobSegmentDeclared containing the version hash, msg.sender, the range, and the content tag, and returns the version hash. Multiple segments can be declared on the same blob, whether by the same caller or different callers; calling with identical parameters twice emits the event twice, and implementations must not deduplicate. There is no upper bound on blobIndex, since an index with no blob simply causes BLOBHASH to return 0 and revert anyway, and this preserves compatibility with future EIPs that increase the number of blobs.
Event-only design and gas cost
The core IERC_BSS implementation must not write to storage; the event log is the only record. Per the source's estimate, the marginal cost of one declaration is about 3,500 gas (BLOBHASH 3, validation comparison about 6, LOG4 about 1,875, event data about 512, calldata about 1,100). A stateful implementation would additionally require the 22,100 gas of a cold SSTORE under EIP-2929, bringing it to about 25,600 gas, making the event-only approach roughly 7 times cheaper. The function name was chosen as declare rather than register specifically to convey that it only announces intent without creating on-chain state. Returning the version hash as the return value is meant to avoid having to call BLOBHASH again in routing contracts or multicall flows.
Range notation and content tag convention
Ranges are written as half-open intervals [startFE, endFE). They can be concatenated without gaps or overlaps, like [0, 2000) and [2000, 4096), and this avoids the off-by-one mistakes that come from +1 arithmetic with closed intervals. A protocol that uses the entire blob can declare startFE = 0, endFE = 4096, which is equivalent in meaning to existing behavior. contentTag is recommended to be constructed as keccak256("protocol.version") so that collisions are avoided without a separate registry. A bytes32(0) tag is permitted but not recommended. In the event, versionedHash, declarer, and contentTag are all indexed, because filtering by blob hash, sender, or protocol is the common approach, while range based filtering is rare and can be done cheaply on the client side.
Optional extensions: Queryable and Batch
IERC_BSS_Queryable is an extension for cases where segments must be queried on chain, providing getSegments(versionedHash, offset, limit) for paginated lookups and segmentCount for counting. Because it uses storage it is much more expensive and should only be adopted when on chain lookups are actually required, with page sizes capped. IERC_BSS_Batch is an extension for declaring multiple segments in a single call via declareBlobSegments. A single call can mix segments from different blobIndex values, and if any one is invalid the entire call must revert. Neither extension ships with a reference implementation; only the interfaces are defined.
Using segments as anchors for KZG verification
The (versionedHash, startFE, endFE) recorded by the BlobSegmentDeclared event maps directly onto the input of EIP-4844's point evaluation precompile (0x0A). A verifier can read these values from the event and feed the (z, y, commitment, proof) tuple that a prover generated for field elements in the declared range into the precompile, confirming that a specific value is committed at a specific position in the blob. The cost is about 50,000 gas per field element, so a 26 byte message costs roughly 50,000 gas and a 100 byte message roughly 200,000 gas, but verifying an entire blob costs about 200 million gas, exceeding the block gas limit, so this is only practical for small segments. This ERC does not define the verification logic itself, only the reference data.
A trust model centered on off chain indexers
Overlap detection, segment tracking, and deduplication are all the responsibility of off chain indexers. Overlapping segments corrupt both protocols' data in the overlapping region, which is self defeating, and preventing this on chain would require storage and dispute resolution governance, so it was deliberately excluded. Since contentTag is a label rather than ownership, protocols and indexers should maintain an allowlist of canonical declarer addresses per (chainId, contentTag) and exclude declarations from other addresses from attribution. There is no need to trust the indexer. Anyone can run their own indexer and independently verify declarations from the on chain event logs, so the trust model is the same as ordinary event indexing on Ethereum.
Proposal status notice
This proposal was created on February 8, 2026 and its current status is Draft. It is still under review, so the interface and detailed rules may change going forward. It is advisable to check the latest version of the source before implementing.
Things to watch out for
- Content tag impersonation: Anyone can attach another protocol's contentTag to trigger a declaration. Because the tag is a label rather than ownership, protocols and indexers should maintain an allowlist of canonical declarer addresses per chain and tag, and ignore the rest for attribution purposes.
- Overdeclaration: A declarer can claim a wider range than actually used, for example declaring [0, 4096) while only using 1,000 field elements. The EVM cannot see into the blob's contents and so cannot prevent this, so declarations should be treated as claims rather than guarantees, and cross checked against known encoding formats when accurate attribution matters.
- Overlapping segments: Two protocols that declare overlapping ranges corrupt each other's data in the overlapping field elements. On chain enforcement was omitted due to cost and governance complexity, and off chain indexers detect and flag overlaps.
- Declarations after blob data expiry: EIP-4844 blob data is pruned after about 18 days (4,096 epochs), but segment declaration events remain on the execution layer indefinitely. After expiry, declarations can still be queried, but the referenced blob data can no longer be retrieved from consensus layer nodes.
- Unbounded storage growth in the Queryable extension: The optional extension stores segments in an array with no upper bound per versioned hash, so a malicious actor could declare a large number of segments for a single blob to inflate read costs. Contracts that rely on this extension should use getSegments pagination and implementation specific caps.