Unlocking the Power of Substreams for Solana Developers

Imagine unlocking Solana's blockchain data with just a few lines of code. What if you could stream real-time account changes, decode complex on-chain interactions, and build next-generation dapps with unprecedented ease?
Published on
January 3, 2025

Unlocking the Power of Substreams for Solana Developers: New Features and Enhancements

Imagine unlocking Solana's blockchain data with just a few lines of code. What if you could stream real-time account changes, decode complex on-chain interactions, and build next-generation dapps with unprecedented ease? The Graph's latest Substreams update is about to revolutionize how Solana developers access, interpret, and leverage blockchain data. It’s not just offering a tool—it’s providing a data revolution that will transform your approach to building on Solana, breaking down the barriers that have long frustrated developers and limited blockchain innovation.

Key Improvements for Substreams on Solana

Our recent updates focus on a couple transformative areas:

1. Historical and Real-Time Account Changes

The Solana ecosystem has long lacked a reliable source for pulling historical account changes. To address this, Substreams now has a powerful new endpoint that enables developers to stream account changes block by block, unlocking unprecedented insights and enabling more robust application logic.

Highlights of the Historical Account Changes Feature:

  • Cursor Management: Seamlessly resume data extraction from the last processed block, ensuring continuity and preventing data loss during interruptions.
  • Optimized Data Model: For each block, only the latest update per account is recorded. Deleted accounts are flagged with deleted == true.
  • Noise Reduction: Low-importance events, such as changes by the "Vote11111111..." account or lamport-only updates, are omitted for cleaner data.
  • Custom Filtering: Stream account changes by specifying any account or owner as input.
  • Historical Back-Processing (as of January 2025): Substreams accumulate historical data over time, allowing back-processing for comprehensive insights.
  • Flexible Data Sinks: Export account change data to any storage destination or interface directly through Rust, JS, or Go programs.

With this service, developers can analyze account data with unprecedented precision, unlocking new possibilities for dapps and infrastructure on Solana.

2. Anchor IDL Integration

Solana data can appear as arbitrary bytes, making it challenging for developers to interpret and extract meaningful insights. Anchor, the most widely adopted data standard on Solana, provides an Interface Definition Languages (IDLs) that define the structure and meaning of on-chain data.

We’re simplifying this process by enabling developers to create Substreams projects directly from an Anchor IDL in JSON format within the Dev Container. This feature streamlines data extraction, giving dapp developers a faster and more intuitive way to build applications on Solana.

Why This Matters:

  • Anchor IDLs provide a shared understanding of encoded blockchain data, much like ABIs in the EVM ecosystem.
  • Developers can easily decode and extract relevant data, reducing complexity and saving time.
  • Developers don’t need to interact with both the Anchor Library and Substreams, the Dev Container fetches existing IDLs automatically. 

This integration positions Substreams as a must-have tool for any Anchor-based Solana project.

Empowering the Solana Ecosystem with Substreams

These updates represent a significant leap forward in indexing capabilities for Solana developers. Whether you’re building dapps, managing infrastructure, or conducting in-depth analytics, Substreams is designed to meet your needs with unparalleled efficiency and ease of use.

Get started with the new features or explore how Substreams can transform your Solana project.

Stay tuned for more updates as we continue to push the boundaries of blockchain data indexing!