Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

feat: pipelined fetch/write for indexer

Open
#55 0 comments 0 reactions 1 assignee View on GitHub

@pthmas is already working on this.

Since Apr 14, 2026.

Assessment

This issue has not been assessed yet.

Description

Summary

Currently the indexer fetches a batch of blocks, then writes them to the database, then fetches the next batch. The RPC is idle during writes and the DB is idle during fetches. Pipelining would overlap these operations: fetch batch N+1 while writing batch N.

Motivation

This is the single biggest throughput improvement available for indexing speed. Based on analysis of tidx, which implements this pattern, estimated 30-50% faster sync during both initial sync and steady-state head tracking.

Design

  1. After fetching batch N, spawn the DB write as a background task
  2. Immediately begin fetching batch N+1
  3. Before writing batch N+1, await completion of the batch N write
  4. Errors in either fetch or write should still propagate correctly

Key considerations:

  • The reorder buffer (BTreeMap) already collects results in sequence — pipelining fits naturally after the reorder step
  • The binary COPY connection is exclusive during writes, so only one write can be in-flight at a time
  • SSE publishing (via HeadTracker) currently happens before the DB write, so pipelining doesn't affect SSE timing

References

  • tidx implementation: sync/engine.rs — tick_realtime fetches batch N+1 while writing batch N
Dominant language
Rust
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from evstack/atlas

All issues in evstack/atlas

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.