Skip to content

Document RPC fresh-start and gap-check behavior for BACKFILL - #2899

Open
kaankacar wants to merge 1 commit into
mainfrom
2602-rpc-backfill-fresh-start-and-gap-check
Open

kaankacar wants to merge 1 commit into
mainfrom
2602-rpc-backfill-fresh-start-and-gap-check

Conversation

@kaankacar

Copy link
Copy Markdown
Contributor

Follow-up to #2789, which documented the BACKFILL flag. Two startup behaviors were still missing from the "Backfilling History on Startup" section. Both are checked against stellar-rpc v29.0.0 and v28.0.1:

  • With an empty database, RPC starts ingesting at the latest ledger in the history archive. A larger HISTORY_RETENTION_WINDOW alone does not add older ledgers. Source: cmd/stellar-rpc/internal/ingest/service.go, getNextLedgerSequence, the ErrEmptyDB case.
  • BACKFILL requires a local database with no ledger-sequence gaps. RunBackfill calls verifyDbGapless first, and a gap stops startup with db verify: gap detected in local DB. Source: cmd/stellar-rpc/internal/ingest/backfill.go.

@Shaptic, could you confirm the two statements? Elliot asked for an RPC-team check on the startup caveats in #2602.

Closes #2602

Two startup behaviors were missing from the backfill section. With an
empty database, RPC starts at the latest ledger in the history archive,
so a larger HISTORY_RETENTION_WINDOW alone adds no older ledgers.
BACKFILL requires a gapless local database and stops startup with
"db verify: gap detected in local DB" otherwise. Both checked against
stellar-rpc v28.0.1 and v29.0.0.

Closes #2602
@kaankacar
kaankacar requested review from Shaptic and a lite review from Copilot October 6, 2026 13:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The only review comment is a minor documentation nit; no blocking issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Documents RPC startup behavior for empty databases and BACKFILL gap validation.

Changes:

  • Clarifies fresh-start ingestion and retention behavior.
  • Documents the gapless-database prerequisite and startup error.
File Description
docs/​data/​apis/​rpc/​admin-guide/​configuring.mdx Adds fresh-start and gap-check guidance for BACKFILL.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions github-actions Bot added the preview Preview builds for PRs by SDF employees. label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

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

Labels

preview Preview builds for PRs by SDF employees.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Stellar RPC BACKFILL startup behavior

2 participants