Skip to content

feat(tools): add Soroban ledger-events-backfill CLI (#560) - #666

Open
oluwaseyi1996-netizen wants to merge 1 commit into
Pulsefy:mainfrom
oluwaseyi1996-netizen:feat/560-ledger-events-backfill
Open

feat(tools): add Soroban ledger-events-backfill CLI (#560)#666
oluwaseyi1996-netizen wants to merge 1 commit into
Pulsefy:mainfrom
oluwaseyi1996-netizen:feat/560-ledger-events-backfill

Conversation

@oluwaseyi1996-netizen

Copy link
Copy Markdown

Add a standalone Node.js CLI for range-based, checkpointed backfill of Soroban contract events with structured progress logs and Prometheus metrics. The tool runs independently of the NestJS backend so it can be invoked from cron, CI, or operator scripts without booting the full API.

Acceptance criteria:

  • Range-based: --start / --end Soroban ledger sequences
  • Safe resume: atomic checkpoint file (tmp + rename); idempotent complete(); compatibility check rejects mismatched intent
  • Progress logs: stderr in pretty or JSON format with batch progress
  • Metrics: Prometheus text-format file with +Inf bucket, sorted, including counters, gauges, and histograms

Layout:
tools/ledger-events-backfill/ CLI + tests
.github/workflows/ledger-events- CI for the new tool
backfill-ci.yml

Tests use node:test with an in-memory MockSorobanServer so the suite runs offline without Soroban RPC access. End-to-end spec exercises fresh runs, resume from a pre-existing checkpoint, --status, incompatible metadata rejection, and --reset.

closes #560

Add a standalone Node.js CLI for range-based, checkpointed backfill of
Soroban contract events with structured progress logs and Prometheus
metrics. The tool runs independently of the NestJS backend so it can be
invoked from cron, CI, or operator scripts without booting the full
API.

Acceptance criteria:

- Range-based: --start / --end Soroban ledger sequences
- Safe resume: atomic checkpoint file (tmp + rename); idempotent
  complete(); compatibility check rejects mismatched intent
- Progress logs: stderr in pretty or JSON format with batch progress
- Metrics: Prometheus text-format file with +Inf bucket, sorted,
  including counters, gauges, and histograms

Layout:
  tools/ledger-events-backfill/         CLI + tests
  .github/workflows/ledger-events-     CI for the new tool
    backfill-ci.yml

Tests use node:test with an in-memory MockSorobanServer so the suite
runs offline without Soroban RPC access. End-to-end spec exercises
fresh runs, resume from a pre-existing checkpoint, --status,
incompatible metadata rejection, and --reset.
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Cedarich's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@oluwaseyi1996-netizen Great news! 馃帀 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 馃殌

Learn more about application limits

@Cedarich

Copy link
Copy Markdown
Contributor

@oluwaseyi1996-netizen fix workflow

@oluwaseyi1996-netizen

Copy link
Copy Markdown
Author

Okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ledger Backfill Tooling (Range-Based, Safe Resume)

2 participants