Saving the Blobs: How The Graph Indexes and Makes Blob Data Easily Accessible

TL;DR:

Introduction

Ethereum is about to get a lot more scalable. The implementation of Ethereum Improvement Proposal, EIP-4844, sets the stage for enhanced efficiency on Ethereum by introducing a new transaction type: a blob-carrying transaction. Blobs are large data packets included in Ethereum transactions that will reduce the costs of rollup transactions and increase network scalability. The catch? Blobs are ephemeral, usually stored only for 18 days before being pruned. The good news is that The Graph is prepared to save the blobs with a solution for long-term storage and blob data retrieval, and it’s ready and operational upon implementation of EIP-4844.

In this post, you’ll learn how to access the blobs and the technique for saving and querying blob data with The Graph – which you can help shape!

What Are Blobs?

Blobs are packets of data designed primarily for Layer-2 chains, offering a new alternative to data storage within Ethereum blocks. Blobs are extremely large (~125 kB), and can be much cheaper than similar amounts of calldata. However, blob data is only stored for 18 days.

Save The Blobs!

The ephemeral nature of blobs is no surprise, as enhancing rollup performance and efficiency cannot coexist with indefinitely storing an exponential volume of blob data on Layer 1. Disappearing blobs are great for efficiency, though they present a challenge for historical record-keeping.

This is where The Graph steps in: already presented as a practical solution within the Ethereum community, The Graph is here to save the blobs, ensuring long-term availability, while also supporting Ethereum’s momentum toward Danksharding.

As web3’s decentralized indexing and query layer, The Graph presently offers a simple solution to get started with blobs.

Query Blob Data with The Graph

Core developers at The Graph, Pinax and StreamingFast, have collaborated to build a performant indexing and storage solution for blob data. This was made possible through a combination of several key technologies, such as Firehose and Substreams, which together provide a highly scalable solution for fast blockchain data extraction and processing.

The Graph Network already provides data indexing of all EVM-based chains via Graph Node and Firehose, which fetches data from EVM execution clients (the “execution layer”). However, since blob data lives on the consensus clients (the “consensus layer”), a new Firehose compliant with the Beacon Node has been developed. This demonstrates how quickly a new Firehose can be built for any given chain, following the new poller-based approach, which you can read more about here.

Here are two ways you can use The Graph to query blob data:

  1. Ethereum Blobs Substreams. Get data directly from the Firehose-enabled Beacon Chain Substreams (gRPC API).
  2. Blobs Substreams-powered Subgraph. Get data from a Substreams-powered subgraph (GraphQL API) available on The Graph Network.

Method 1: Ethereum Blobs Substreams

Developers and data consumers can leverage the flexibility and extensibility of Substreams today, by using the Ethereum Blobs Substreams to process blobs from consensus nodes. The available barebones Ethereum Blobs Substreams processes data from the dedicated Firehose extracting data from the beacon API (/eth/v1/beacon/blob_sidecars/{block_id}), which developers can now extend by writing additional Substreams modules (data transformation) and/or using alternative sinks for data storage.

As an example, Pinax built a drop-in replacement for the Beacon Chain’s blob API, whose stack leverages a key-value store as the data sink. Depending on user feedback and demand, others could be built, like an S3-compatible sink where blobs of data could be stored.

Substreams.dev provides a great playground to test the new Ethereum Blobs Substreams, which you can find here.

Method 2: Blobs Substreams-powered Subgraph

Another way to use The Graph to query blobs is through a Substreams-powered subgraph. In this case, the Graph Node acts as the data sink, allowing developers to build subgraphs with the Substreams stack handling the “ET” part of “ETL” (Extract Transform Load).

The subgraph is already on The Graph Network, ready to be queried! You can access the GitHub repo here. Additional subgraphs will be added to the network for EIP-4844 chains besides Ethereum mainnet (Beacon chain) and listed here.

This is a new and exciting milestone for web3! Rollups requiring historical access to blob-carrying transactions can now benefit from The Graph’s highly performant, reliable, and decentralized network to retrieve the data.

Direct Access to the RPC Node: Consuming RPC services from The Graph is not currently available. Once available, however, alternative services like the RESTful API mentioned above may also be published to and consumed from the protocol. As part of The Graph’s new roadmap, core developers and ecosystem contributors are working to facilitate a world of data services, where anyone would be able to build any new data service, such as RPC, on The Graph.

How Do You Want to Use Blobs?

Core developer teams at The Graph would love to hear how you envision the evolution of blob usage. Share your ideas, potential use cases, and expectations for blobs in The Graph Forum. Your insights will help shape The Graph’s vision and journey forward.

Additionally, for more information, support, or to explore how you can leverage The Graph for blobs, reach out to the Edge & Node business development team using this dedicated form.

Looking ahead, The Graph remains committed to play a key role in Ethereum’s scalability and efficiency by offering a solution for EIP-4844 and blobs.

The Graph is ready to save the blobs!

About The Graph

The Graph is the source of data and information for the decentralized internet. As the original decentralized data marketplace that introduced and standardized subgraphs, The Graph has become web3’s method of indexing and accessing blockchain data. Since its launch in 2018, tens of thousands of developers have built subgraphs for dapps across 45+ blockchains - including  Ethereum, Arbitrum, Optimism, Base, Polygon, Celo, Fantom, Gnosis, and Avalanche.

As demand for data in web3 continues to grow, The Graph enters a New Era with a more expansive vision including new data services and query languages, ensuring the decentralized protocol can serve any use case - now and into the future.

Discover more about how The Graph is shaping the future of decentralized physical infrastructure networks (DePIN) and stay connected with the community. Follow The Graph on X, LinkedIn, Instagram, Facebook, Reddit, and Medium. Join the community on The Graph’s Telegram, join technical discussions on The Graph’s Discord.

The Graph Foundation oversees The Graph Network. The Graph Foundation is overseen by the Technical Council. Edge & Node, StreamingFast, Semiotic Labs, The Guild, Messari, GraphOps, Pinax and Geo are eight of the many organizations within The Graph ecosystem.


Category
Graph Protocol
Author
The Graph Foundation
Published
March 12, 2024

The Graph Foundation

View all blog posts