Authored by Colin Adams
We're pleased to announce the successful completion of our consulting engagement with The Graph Foundation. The engagement involved instrumenting the Erigon Ethereum client for Firehose, an innovative solution that greatly increases indexing speeds at The Graph.
First, some context
The Graph is a decentralized protocol for indexing and querying data from the blockchain. The Graph helps developers access safe and secure data to increase the efficiency of their decentralized applications (Dapps) and create fast front-ends.
Firehose, built by StreamingFast, one of The Graph's core development teams, is a files-based and streaming-first approach to processing blockchain data. Firehose is responsible for extracting data from blockchain nodes in an efficient manner.
Why was this work necessary?
There are already multiple Firehose implementations for different blockchains: Ethereum, Polygon, Near, Solana, Arweave, and Cosmos, to name a few. However, a Firehose implementation always requires instrumenting a particular blockchain client, as this is where the state lives and originates.
In the case of Ethereum, the original Firehose implementation was built on an instrumented fork of Geth, the most popular Ethereum client at the time. As the adoption of Firehose continues to grow, it becomes important to expand its usability to include Ethereum's Golang execution client, Erigon.
What are the broader implications?
Successfully instrumenting Erigon for Firehose has effectively meant applying the original work done with Geth to ensure that data types and formats remain consistent.
With this done, a Graph Node can communicate with a new Firehose for Ethereum/BNB Chain/Polygon, i.e., there's a drop-in replacement for the current implementation that has backward compatibility.
Finalizing this work is significant for not only ChainSafe and The Graph but the wider web3 developer ecosystem. Firehose's efficient extraction capabilities provide fast access to blockchain data, making it easier than ever to develop decentralized applications.
The value for blockchain and client teams is clear: 1) all data can be indexed quickly while being stored in various data systems, and 2) blockchains benefit from a facilitated integration with Graph Node and The Graph protocol from day one. Interested? Refer to this link for more details.
Want to know more about ChainSafe's work? 👉 click here.
About The Graph
The Graph is the indexing and query layer of web3. Developers build and publish open APIs, called subgraphs, that applications can query using GraphQL. The Graph currently supports indexing data from over 39 different networks including Ethereum, NEAR, Arbitrum, Optimism, Polygon, Avalanche, Celo, Fantom, Moonbeam, IPFS, Cosmos Hub, and PoA, with more networks coming soon. To date, 74,000+ subgraphs have been deployed on the hosted service. Tens of thousands of developers use The Graph for applications such as Uniswap, Synthetix, KnownOrigin, Art Blocks, Gnosis, Balancer, Livepeer, DAOstack, Audius, Decentraland, and many others.
ChainSafe is a leading blockchain research and development firm specializing in infrastructure solutions for web3. Alongside its contributions to major ecosystems such as Ethereum, Polkadot, Filecoin, Mina, and more, ChainSafe creates solutions for developers and teams across the web3 space utilizing expertise in gaming, bridging, NFTs, and decentralized storage. As part of its mission to build innovative products for users and improved tooling for developers, ChainSafe embodies an open source and community-oriented ethos to advance the future of the internet.