Skip to content

Fix merge results log cache#3280

Open
jewei1997 wants to merge 3 commits intomainfrom
fix-merge-results-log-cache
Open

Fix merge results log cache#3280
jewei1997 wants to merge 3 commits intomainfrom
fix-merge-results-log-cache

Conversation

@jewei1997
Copy link
Copy Markdown
Contributor

Describe your changes and provide context

  • Align cache + parquet rotation to block % MaxBlocksPerFile == 0. Coverage is now derived
    from LatestVersion ([floor(latest/interval)*interval, latest]) instead of tracked in a
    receipt-cache-coverage.json sidecar.
  • Fix: empty blocks short-circuited SetReceipts, so rotation never fired when the boundary
    block had zero receipts. Oversized files then got pruned from eth_getLogs queries.
    parquet.Store.ObserveEmptyBlock now rotates on empty-boundary blocks.

Testing performed to validate your change

  • TestFilterLogsSurvivesEmptyRotationBoundary /
    TestFilterLogsSurvivesBoundaryThatCrossesFileWidth — regress the empty-boundary bug.
  • TestCachedReceiptStoreMergesDuckDBAndCache{AcrossBoundary,ReceiptsAcrossBoundary} — exercise
    the cache+parquet merge path for logs and receipts.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 21, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 21, 2026, 2:45 AM

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 73.25581% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.37%. Comparing base (2900e9a) to head (95cc7ef).

Files with missing lines Patch % Lines
sei-db/ledger_db/parquet/store.go 74.54% 8 Missing and 6 partials ⚠️
sei-db/ledger_db/receipt/parquet_store.go 28.57% 3 Missing and 2 partials ⚠️
sei-db/ledger_db/receipt/cached_receipt_store.go 83.33% 2 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3280      +/-   ##
==========================================
+ Coverage   59.35%   59.37%   +0.01%     
==========================================
  Files        2072     2072              
  Lines      169922   169974      +52     
==========================================
+ Hits       100855   100915      +60     
+ Misses      60279    60265      -14     
- Partials     8788     8794       +6     
Flag Coverage Δ
sei-chain-pr 74.58% <73.25%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-db/ledger_db/receipt/cached_receipt_store.go 90.71% <83.33%> (+4.73%) ⬆️
sei-db/ledger_db/receipt/parquet_store.go 69.97% <28.57%> (+2.15%) ⬆️
sei-db/ledger_db/parquet/store.go 69.18% <74.54%> (+0.76%) ⬆️

... and 1 file 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.

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