Skip to content

Add replacement APIs for methods we intend to deprecate.#3397

Open
cody-littley wants to merge 3 commits intomainfrom
cjl/replacement-apis
Open

Add replacement APIs for methods we intend to deprecate.#3397
cody-littley wants to merge 3 commits intomainfrom
cjl/replacement-apis

Conversation

@cody-littley
Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Adds new methods to the top level Committer interface. The goal is to eventually deprecate the child CommitKVStore interface, and these new methods are a step in that direction.

type Committer interface {
    // ...
    Get(store string, key []byte) (value []byte, ok bool, err error)
    Has(store string, key []byte) (bool, error)
    Iterator(store string, start []byte, end []byte, ascending bool) (dbm.Iterator, error)
    GetProof(store string, key []byte) (*ics23.CommitmentProof, error)
    // ...
}

Testing performed to validate your change

Unit tests. These methods are not yet invoked in any production pathways.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 6, 2026, 3:14 PM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.13%. Comparing base (68b9eeb) to head (0939d8d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3397      +/-   ##
==========================================
+ Coverage   59.03%   59.13%   +0.09%     
==========================================
  Files        2102     2101       -1     
  Lines      173237   173273      +36     
==========================================
+ Hits       102277   102463     +186     
+ Misses      62083    61933     -150     
  Partials     8877     8877              
Flag Coverage Δ
sei-chain-pr 75.63% <100.00%> (?)
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/state_db/sc/composite/store.go 74.12% <100.00%> (+5.33%) ⬆️
sei-db/state_db/sc/memiavl/store.go 93.49% <100.00%> (+2.79%) ⬆️

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

Copy link
Copy Markdown
Contributor

@Kbhat1 Kbhat1 left a comment

Choose a reason for hiding this comment

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

AI Review:

Verdict: no real bugs or blockers. The PR is additive, the methods are not wired into production paths yet, the tests pin the intended behaviors, and locking on the underlying Tree (RWMutex + immutable nodes) is fine. Both Committer implementers in the repo (memiavl.CommitStore, composite.CompositeCommitStore) are updated; no other implementer exists.

A few things worth flagging — none are blockers but matter for the follow-on work that intends to actually use these methods:

1. EVM data is invisible through these methods in SplitWrite mode. Because composite.GetChildStoreByName only consults cosmosCommitter, and SplitWrite routes EVM changesets exclusively to FlatKV, cs.Get(EVMStoreKey, ...) returns (nil, false, nil) for data that exists in FlatKV. The author pins this in TestCompositeSplitWriteEVMReadsAreInvisible with a TODO. Fine for now ("not invoked in production"), but the deprecation goal for CommitKVStore is blocked on fixing this routing. Any caller migrating off the deprecated path for EVM keys will silently see empty results.

Nothing here should block landing. The forward-looking issue is #1 — SplitWrite + EVM reads must be solved before these methods can replace GetChildStoreByName for the EVM store.

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.

3 participants