Skip to content

docs(receipt): littidx receipt store README#3695

Open
Kbhat1 wants to merge 1 commit into
mainfrom
docs/littidx-readme
Open

docs(receipt): littidx receipt store README#3695
Kbhat1 wants to merge 1 commit into
mainfrom
docs/littidx-readme

Conversation

@Kbhat1

@Kbhat1 Kbhat1 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

One clean doc for the littidx receipt backend, co-located at sei-db/ledger_db/receipt/README.md.

Covers:

  • Architecture — receipt bodies in LittDB (append-only segments, point lookup by tx-hash secondary key) + a Pebble tag index for eth_getLogs; parallel per-block fan-out.
  • Durability & retention — off-commit-path background flush (~1 block), no WAL, TTL + block-range prune + KeepRecent floor.
  • Limits & trade-offs — auxiliary (non-consensus) durability; getLogs ranges have no legacy fallback (archive-node/migration caveat); cold-range latency.
  • Configuration — the [receipt-store] knobs (rs-backend, log-filter-parallelism, etc.) and that KeepRecent derives from min-retain-blocks.
  • Rollout — no operator data migration: config + state sync (litt is a local side store, rebuilt from live blocks), legacy backfill is chain-level / gov-triggered.

@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only change with no runtime or consensus impact.

Overview
Adds sei-db/ledger_db/receipt/README.md, operator-facing documentation for the littidx EVM receipt backend (alternative to pebbledb).

The doc explains the LittDB bodies + Pebble tag index layout, how eth_getTransactionReceipt and eth_getLogs are served (including log-filter-parallelism), and durability/retention behavior (off-commit flush, no WAL, KeepRecent from min-retain-blocks). It also documents limits (auxiliary durability, getLogs without legacy range fallback on archive nodes), [receipt-store] app.toml knobs, and rollout (config + restart/state sync; local side store, no manual migration).

Reviewed by Cursor Bugbot for commit c11538c. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJul 6, 2026, 11:25 PM

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Documentation-only PR adding a README for the littidx receipt store. The prose is clear and well-organized, but it describes the legacy-receipt migration as "governance-triggered," which contradicts the implementation (an automatic per-block backfill). No code changes, no test impact.

Findings: 0 blocking | 3 non-blocking | 1 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • Cursor's second-opinion review file (cursor-review.md) was empty — that pass produced no output.
  • The PR description repeats the same inaccurate "legacy backfill is chain-level / gov-triggered" framing as the README; consider correcting it too so the summary matches actual behavior.
  • 1 suggestion(s)/nit(s) flagged inline on specific lines.

Comment thread sei-db/ledger_db/receipt/README.md Outdated
builds `littidx` forward from its sync height. Nothing to export/import.
- **Legacy receipts** (written before `littidx`, held in the EVM module's
in-state KV store) are drained into `littidx` by a **chain-level,
governance-triggered background migration**, not an operator action. Point

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[suggestion] This describes legacy-receipt draining as a governance-triggered migration, but the implementation runs it automatically with no governance involvement: x/evm/keeper/abci.go:87 calls MigrateLegacyReceiptsBatch on every block where BlockHeight() % LegacyReceiptMigrationInterval == 0 (interval 10, batch size 100, both fixed constants in x/evm/keeper/receipt.go:22,25). Calling it "governance-triggered" is operationally misleading — a reader may wait for a governance action that never occurs. Suggest describing it as an automatic per-block background backfill (every N blocks, small fixed batches). (Also flagged by Codex.)

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — docs-only, adds a new README for the littidx receipt store backend.

Extended reasoning...

Overview

The PR adds a single new file, sei-db/ledger_db/receipt/README.md, documenting the littidx EVM receipt store backend (architecture, durability, retention, configuration knobs, limits, and rollout). No source, config, build, or test files are touched.

Security risks

None. Pure documentation; no executable code paths, dependencies, or configuration defaults are modified.

Level of scrutiny

Low. Documentation-only changes carry no runtime risk. Content is descriptive prose about the existing littidx backend and consistent with the surrounding module (sei-db/ledger_db/receipt, sei-db/db_engine/litt, [receipt-store] app.toml section). Any minor inaccuracies could be corrected in a follow-up doc PR without operational consequence.

Other factors

The bug hunting system found no issues, and the cursor bot flagged this as low risk. No prior claude[bot] reviews on this PR to reconcile against.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.35%. Comparing base (9f53204) to head (c11538c).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3695      +/-   ##
==========================================
- Coverage   59.30%   58.35%   -0.95%     
==========================================
  Files        2273     2186      -87     
  Lines      188305   178509    -9796     
==========================================
- Hits       111675   104176    -7499     
+ Misses      66579    65083    -1496     
+ Partials    10051     9250     -801     
Flag Coverage Δ
sei-db 70.41% <ø> (ø)
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.
see 87 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Single doc covering the littidx receipt backend: high-level architecture
(litt bodies + pebble tag index), durability/retention model, limits &
trade-offs (auxiliary durability, no legacy fallback for getLogs ranges,
cold-range latency), the receipt-store config knobs, and the rollout story
(no operator data migration — config + state sync, gov-triggered legacy
backfill).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Kbhat1 Kbhat1 force-pushed the docs/littidx-readme branch from 9b0a1d8 to c11538c Compare July 6, 2026 23:24

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Docs-only PR adding a well-written README for the littidx receipt backend. Verified claims (config defaults, 5ms flush interval, point-lookup legacy fallback) match the code. One clarity gap in the rollout section could mislead operators doing an in-place backend switch.

Findings: 0 blocking | 4 non-blocking | 2 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • Cursor produced no second-opinion output (cursor-review.md is empty). REVIEW_GUIDELINES.md is also empty, so no repo-specific standards were applied.
  • The doc pairs a strong 'Rollout — no migration, state sync only' framing with a standalone 'set rs-backend and restart' bullet. Consider making the state-sync-only path explicit in that bullet so operators don't read it as an endorsed in-place switch for retained pre-switch ranges (see inline comment).
  • 2 suggestion(s)/nit(s) flagged inline on specific lines.

(state) sync — the same posture as the SeiDB state store. Nothing to export,
import, or backfill by hand, and no downtime beyond the restart.

- **Enable it:** set `rs-backend = "littidx"` and restart.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[suggestion] Verified against the code: littidx builds forward only, and the point-lookup fallback (legacyReceiptFromKVStore, litt_receipt_store.go:492) reads the in-state legacy KV store (ctx.KVStore(storeKey)) — not the pebbledb receipt side store. So an in-place pebbledb → littidx switch on a node still retaining blocks whose receipts live only in the pebbledb side store leaves those receipts in neither store: eth_getTransactionReceipt point lookups miss (not just getLogs ranges), until those blocks age out of the retention window. The heading says 'state sync only', but this bare 'set rs-backend and restart' bullet reads as an endorsed in-place switch. Suggest either scoping this bullet to a fresh/state-synced node, or noting that an in-place switch over a retained pebbledb range has the same (plus point-lookup) unavailability as the getLogs legacy caveat above. (Raised by Codex.)

- **Auxiliary durability only.** A crash can drop up to ~one block of the most
recent receipt *bodies*; those reads return not-found rather than erroring.
Fine for RPC data, not a consensus-grade guarantee.
- **`getLogs` has no legacy fallback for ranges.** Point lookups

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nit] This caveat says point lookups 'fall back to the legacy in-state KV store ... for pre-littidx receipts', which is accurate for pre-side-store receipts but not for receipts written into the pebbledb side store. Those are not reachable by the fallback. Worth a word here to disambiguate 'legacy' (in-state KV) from the alternate pebbledb side-store backend.

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.

1 participant