Skip to content

Conversation

@Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Jan 28, 2026

Describe your changes and provide context

  • Add RecoverCompositeStateStore to handle WAL replay for both stores on startup
  • Refactor pruning to go through CompositeStateStore so both Cosmos_SS and EVM_SS are pruned correctly
  • If EVM_SS is behind (e.g., newly enabled or crash), sync it from WAL before standard recovery
  • Standard WAL replay uses ApplyChangesetSync which dual-writes to both stores automatically
  • Backward search for replay offset matches existing RecoverStateStore pattern
  • Both stores stay consistent after crashes/restarts

Testing performed to validate your change

  • Unit tests
  • Verifying on node

@Kbhat1 Kbhat1 marked this pull request as draft January 28, 2026 22:20
@github-actions
Copy link

github-actions bot commented Jan 28, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 30, 2026, 5:31 AM

@Kbhat1 Kbhat1 changed the title WIP: CompositeStateStore Parrt 5: WAL integration WIP: CompositeStateStore Part 5: WAL integration Jan 28, 2026
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 59.80392% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.84%. Comparing base (9be2e36) to head (d0ff8d9).

Files with missing lines Patch % Lines
sei-db/state_db/ss/composite/store.go 59.80% 22 Missing and 19 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                         Coverage Diff                         @@
##           feature/composite-ss-write-path    #2785      +/-   ##
===================================================================
+ Coverage                            41.85%   43.84%   +1.98%     
===================================================================
  Files                                 1022     1996     +974     
  Lines                                84784   164265   +79481     
===================================================================
+ Hits                                 35490    72018   +36528     
- Misses                               45949    85655   +39706     
- Partials                              3345     6592    +3247     
Flag Coverage Δ
sei-chain 45.95% <59.80%> (?)
sei-cosmos 37.72% <ø> (-0.02%) ⬇️
sei-db 68.72% <ø> (ø)
sei-tendermint 47.53% <ø> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
sei-db/state_db/ss/composite/store.go 41.39% <59.80%> (ø)

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

@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch 2 times, most recently from c0a7f5b to db4a5a9 Compare January 29, 2026 17:39
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-write-path branch from 42e19d3 to 4084fe1 Compare January 29, 2026 17:54
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch from ee8ea44 to a401330 Compare January 29, 2026 17:56
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-write-path branch from 4055a6d to ae9502c Compare January 29, 2026 20:56
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch from 0cefbd5 to 1fc46b6 Compare January 29, 2026 20:56
@Kbhat1 Kbhat1 marked this pull request as ready for review January 30, 2026 03:43
@Kbhat1 Kbhat1 changed the title WIP: CompositeStateStore Part 5: WAL integration CompositeStateStore Part 5: WAL integration Jan 30, 2026
@Kbhat1 Kbhat1 changed the title CompositeStateStore Part 5: WAL integration Composite State Store Part 5: WAL integration Jan 30, 2026
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-write-path branch from ae9502c to a11dc21 Compare January 30, 2026 03:59
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch from 1fc46b6 to dedf0c0 Compare January 30, 2026 04:00
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-write-path branch from a11dc21 to ca81638 Compare January 30, 2026 04:51
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch from c9ef455 to f9a3987 Compare January 30, 2026 04:52
@Kbhat1 Kbhat1 changed the title Composite State Store Part 5: WAL integration Composite State Store Part 5: WAL integration + Composite Pruning Manager Jan 30, 2026
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-write-path branch from ca81638 to 8efe6df Compare January 30, 2026 05:21
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch from c769c02 to 7803574 Compare January 30, 2026 05:24
Add recovery mechanism ensuring both Cosmos_SS and EVM_SS stay in sync:

- RecoverCompositeStateStore: Syncs EVM_SS if behind, replays new WAL entries
- syncEVMStore: Catches up EVM_SS via WAL replay
- Standard WAL replay goes through ApplyChangesetSync (dual-writes)

Usage: Call RecoverCompositeStateStore after creating CompositeStateStore.
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-write-path branch from 8efe6df to 9be2e36 Compare January 30, 2026 05:30
@Kbhat1 Kbhat1 force-pushed the feature/composite-ss-wal-integration branch from 7803574 to d0ff8d9 Compare January 30, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants