Skip to content

Fix integration tests for sei-db record not found#2366

Closed
Kbhat1 wants to merge 1 commit intoBumpSeidbfrom
cursor/fix-integration-tests-for-sei-db-record-not-found-70cf
Closed

Fix integration tests for sei-db record not found#2366
Kbhat1 wants to merge 1 commit intoBumpSeidbfrom
cursor/fix-integration-tests-for-sei-db-record-not-found-70cf

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Sep 3, 2025

Describe your changes and provide context

This PR resolves integration test failures stemming from a sei-db update (sei-protocol/sei-db#105) that now errors ("record not found") for missing keys.

Key changes:

  • EVM Keeper Receipt Retrieval: x/evm/keeper/receipt.go now treats sei-db's "record not found" as a normal miss, falling back to legacy KV store for receipt lookups.
  • EVM RPC Safety: evmrpc/utils.go introduces safeVersionExists to prevent RPC calls (e.g., eth_call, debug_call) from crashing on missing state versions by handling "record not found" panics.
  • Receipt Migration & Utilities: Fixed MigrateLegacyReceiptsBatch to correctly parse hashes and use ApplyChangeset, added DeleteTransientReceipt, and updated getTestKeyring signature.

These adjustments harden the chain code against the new sei-db behavior, ensuring stability and test pass rates.

Testing performed to validate your change

  • go build ./...
  • go test ./evmrpc
  • Receipt migration test in x/evm/keeper

Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Sep 3, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@Kbhat1 Kbhat1 closed this Sep 3, 2025
@Kbhat1 Kbhat1 marked this pull request as ready for review September 3, 2025 17:11
@codecov
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 59.18367% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.47%. Comparing base (6d8e2b8) to head (c96dd6a).
⚠️ Report is 1 commits behind head on BumpSeidb.

Files with missing lines Patch % Lines
evmrpc/utils.go 41.17% 8 Missing and 2 partials ⚠️
x/evm/keeper/receipt.go 68.75% 5 Missing and 5 partials ⚠️

❌ Your patch status has failed because the patch coverage (59.18%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           BumpSeidb    #2366   +/-   ##
==========================================
  Coverage      60.47%   60.47%           
==========================================
  Files            314      314           
  Lines          31071    31096   +25     
==========================================
+ Hits           18790    18806   +16     
- Misses         10973    10978    +5     
- Partials        1308     1312    +4     
Files with missing lines Coverage Δ
evmrpc/utils.go 69.80% <41.17%> (-3.08%) ⬇️
x/evm/keeper/receipt.go 73.30% <68.75%> (+3.08%) ⬆️

... 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.

2 participants