ELSOUL LABO B.V. (Headquarters: Amsterdam, Netherlands; CEO: Fumitake Kawasaki) and Validators DAO are pleased to announce the open-source release of R&D sample code for detecting pump.fun token mints in real-time with the Solana Geyser gRPC stream.

This sample code is an implementation example for receiving on-chain events occurring on Solana as a stream and detecting events that match specific conditions in real-time. Using pump.fun token mints as a case study, you can examine a configuration that processes data flowing from a Solana Geyser gRPC stream to detect event occurrences.

Sample Code: https://github.com/ValidatorsDAO/solana-stream/tree/main/temp-release/trade-app

Real-time Solana Data Processing Using pump.fun Token Mint Detection

The token minting on pump.fun is an easy-to-understand event among on-chain events on Solana, making it a good subject for real-time data processing. By detecting the moment a new token mint occurs and passing that information to subsequent processes, you can understand the basic event-driven structure required for Solana applications.

In real-time Solana applications, it is crucial to quickly grasp what is happening on-chain. Receiving new events, identifying the target, extracting necessary information, and passing it to the next process—this flow is fundamental to various Solana applications, including notifications, logging, monitoring, analysis, indexing, and backend processing.

The sample code released this time allows you to see this flow in a concrete form through the detection of pump.fun token mints. Developers can read the actual code, check its operation, and extend the detection conditions and subsequent processing to suit their own needs.

Receiving On-chain Events with Solana Geyser gRPC Stream

There are multiple options for handling on-chain events on Solana, including HTTP RPC, WebSocket, Geyser gRPC, and Shredstream. Among them, the Geyser gRPC stream is suitable for configurations that continuously receive data such as accounts, slots, blocks, and transactions, and process them in real-time on the application side.

HTTP RPC is a mechanism for requesting and retrieving necessary information. It is suitable for checking history, getting state, and confirming individual transactions. However, when continuously tracking on-chain events, a configuration that repeatedly queries a wide range after an event has occurred can easily become a heavy load in terms of communication volume, processing amount, and retrieval timing.

WebSocket is a widely used and useful mechanism in Solana development. On the other hand, with the Geyser gRPC stream, events can be received as a continuous flow of data and processed on the spot by the application. For processes that need to capture specific on-chain events quickly, like detecting pump.fun token mints, adopting a stream-based configuration makes it easier to build processes that start from the data at the time of occurrence.

Efficient Stream Communication with HTTP/2 and Protocol Buffers

gRPC is a communication method based on HTTP/2, which allows for long-lived connections, connection multiplexing, header compression, and binary representation using Protocol Buffers. For applications that continuously receive large amounts of data and process necessary events, these features directly contribute to communication efficiency and implementation organization.

In a configuration that repeats HTTP/1-style request/response cycles, it's common to issue a request, wait for a response, and then re-evaluate on the application side each time you need information. While WebSocket can use a persistent connection, configurations centered on JSON-based subscriptions or broad notifications may heavily rely on the application side for interpreting, filtering, and designing subsequent processing of received data.

The Geyser gRPC stream is a mechanism that makes it easy to continuously receive structured Solana data, based on HTTP/2 and Protocol Buffers. For real-time detection of on-chain events, it is necessary to receive the required data as a stream.

FACT BOX

  • Source: PR TIMES
  • Category: New Product
  • Organizations: pump.fun
  • Products / services: solana-stream sample code