Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

RPC Client Overview

tiders-rpc-client is a Rust library for fetching EVM blockchain data from any standard JSON-RPC endpoint and converting it to Apache Arrow format.

Unlike specialized providers (HyperSync, SQD), the RPC client works with any Ethereum-compatible JSON-RPC endpoint — Alchemy, Infura, QuickNode, local nodes, or any other provider.

Data Types and Pipelines

The client fetches blockchain data through three independent pipelines, each wrapping a specific RPC method:

PipelineRPC MethodData Types
Blocketh_getBlockByNumberBlocks and transactions
Logeth_getLogsEvent logs
Tracetrace_block or debug_traceBlockByNumberInternal call traces

The block pipeline also handles an internal transaction receipts pipeline via eth_getBlockReceipts. When the query requests receipt fields (e.g. status, gas_used, effective_gas_price), the block pipeline automatically fetches receipts and merges them into the transaction data.

When a query requires data from more than one pipeline, the client uses a multi-pipeline stream that runs all needed pipelines over the same block range in each batch and merges the results into a single response.

See Pipelines for details on each pipeline, the multi-pipeline stream, and the historical/live phases.

Key Features

  • Streaming — data is returned as a stream of Arrow RecordBatches
  • Adaptive concurrency — automatically adjusts parallelism based on provider response times
  • Retry logic — built-in error recovery with exponential backoff
  • Block range fallback — splits large eth_getLogs ranges when providers reject them
  • Field selection — fetch only the columns you need

Usage via tiders (Python)

The simplest way to use the RPC client is through the tiders Python SDK:

from tiders_core.ingest import ProviderConfig, ProviderKind

provider = ProviderConfig(
    kind=ProviderKind.RPC,
    url="https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY",
    stop_on_head=True,
    batch_size=10,
)

See the RPC pipeline example for a complete working example.

Usage as a Rust Library

#![allow(unused)]
fn main() {
use tiders_rpc_client::{Client, ClientConfig, Query};

let config = ClientConfig::new("https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY");
let client = Client::new(config);
let mut stream = client.stream(query);

while let Some(response) = stream.next().await {
    let response = response?;
    // response.blocks, response.transactions, response.logs, response.traces
}
}

Rust API Reference

See the tiders_rpc_client rustdoc for the full API.