Sei integrates with Substreams

StreamingFast
3 min readAug 7, 2024

--

StreamingFast is excited to announce Sei’s integration with Substreams, following the recent Sei integration into The Graph’s Subgraph Studio. This milestone makes Sei the first parallelized EVM blockchain to provide builders with this high-performance indexing solution.

What is Sei?

Sei first launched in 2023 with a Cosmos-based data model as its first version of the blockchain.

Sei’s fast block generation and highly reliable uptime make it a standout competitor in the blockchain space. Sei currently finalizes blocks at 390ms, making it one of the fastest chains in the ecosystem. Additionally, it has seen consistent activity of over 100x the throughput of the fastest EVM L2s, becoming a leader amongst its peers.

With the integration of an EVM data model, Sei plans to broaden adoption, providing more users with the benefits of its technology. Sei is now the first parallelized EVM blockchain, bringing all the benefits of the previous Cosmos-based blockchain to the Ethereum ecosystem.

With all of this data activity, there’s a need for data indexing solutions that can both keep up with the high throughput as well as offer reliability to its ecosystem. Enters Substreams.

Turbocharging indexing with Substreams
Built by StreamingFast, a core developer of The Graph, Substreams is a powerful indexing technology that allows you to extract data from the Sei EVM blockchain and consume it in a variety of ways: Subgraphs, SQL, or direct gRPC streaming.

With Substreams you can benefit from the following:

  • parallelization: creates super short indexing times, processing entire chains within hours
  • cursor management: if the connection is interrupted, you can start again exactly at the latest consumed block
  • richer data model: easily access events, calls or balance changes
  • Composability: build aggregated streams in a modular fashion to extract complexities from raw data

How does it work?

Substreams operate on top of Firehose, which serves as the extraction layer connecting to the blockchain. While Firehose retrieves raw blocks from the blockchain, Substreams enables you to perform transformations and aggregations on that data, creating a custom data model for your dapp.

Speed up your subgraphs through Substreams-powered subgraphs

Subgraphs are the way in which you access data in The Graph Decentralized Network, where hundreds of indexers will compete to serve you the requested data through a GraphQL API. As a result, The Graph’s Decentralized Network provides builders unmatched up-time guarantees and indexed data that will persist long into the future.

Substreams, a versatile technology, can speed up the indexing time of your subgraph by creating a Substreams-powered Subgraph. Curious about just how much faster it can be? Dive into the time improvements in our Uniswap v3 Substreams-powered Subgraph case study.

At the same time, Substreams gives you access to a richer data model in your subgraph: internal calls, balance changes, events and transaction-specific data are all readily available — known as parity traces.

Ready to enhance your building?

Getting Started

The Substreams CLI makes it super easy to bootstrap your project. You can choose to create a Substreams-powered Subgraph, or a Substreams:SQL (the data can be consumed in a Postgres or Clickhouse database).

Your First Sei Substreams-powered Subgraph (Tutorial)

It is as simple as running substreams init and choosing the ethereum-subgraph option. Then, select Sei Mainnet.

Your First Sei SQL Substreams (Tutorial)

It is as simple as running substreams init and choosing the ethereum-sql option. Then, select Sei Mainnet.

We encourage and look forward to all Sei developers building their first Substreams to provide us with feedback on the building experience. Make sure to join StreamingFast’s Discord server to reach out directly with any questions!

--

--

StreamingFast

StreamingFast is a protocol infrastructure company that provides a massively scalable architecture for streaming blockchain data.