Skip to content

Migrate sei-db into sei-chain as mono repo#2457

Merged
masih merged 560 commits intomainfrom
masih/mono-ish-db
Oct 10, 2025
Merged

Migrate sei-db into sei-chain as mono repo#2457
masih merged 560 commits intomainfrom
masih/mono-ish-db

Conversation

@masih
Copy link
Collaborator

@masih masih commented Oct 9, 2025

Merge git commit history from sei-db into sei-chain and update the replace directive in root of sei-chain to use relative path.

Note

The merged commits from sei-db point to v0.0.55, the release currently in use by head of main at sei-chain. This leaves behind one additional commit to sei-tendermint which will be separately ported over:

The reminder of changes done here are mechanical to fix CI runs and update the replace directive in go.mod to use relative path.

kbhat1 and others added 30 commits January 8, 2024 19:29
[SeiDB] Fix PebbleDB Iterator Issue
Update config description and defaults
[SeiDB] State Store Expose `GetEarliestVersion`
yzang2019 and others added 11 commits September 3, 2025 15:13
* Commit to metadata table

* Fix schema

* Fix schema

* Fix schema
Integrate UCI basic go linting into sei-db.
* MemIAVL should only keep 1 current snapshot

* Fix comment

* Fix locking issue

* Use numcpu as default
* Snapshot should be created whenever height diff exceed interval

* Fix unit test

* Fix unit test

* Fix lint

* Add log for closing db
## Describe your changes and provide context
- Add interface functions for rocksdb state store
- Bump grocksdb 

## Testing performed to validate your change
- verified fully on 2 nodes
Integrate UCI versioning and release into `sei-db` and create the
version file for the latest tagged semver currently present.

Upgrade UCI Go lint to latest while at it.
#118)

This reverts commit c35c30a, reversing
changes made to 302e86d.

## Describe your changes and provide context
- Revert surfacing errors from db layer since the rpc / keeper / store
layer hard codes a lot of handling of record not found and there needs
to be a larger refactor
- Can re introduce this error after a redesign and consideration of
impact

## Testing performed to validate your change
- Verified in unit tests and on node
## Describe your changes and provide context
This PR add couple of new metrics using otel for seidb
## Testing performed to validate your change
Example:
<img width="1497" height="671" alt="image"
src="https://github.com/user-attachments/assets/346de110-9d42-4c41-bd74-7a4f04e8b4ba"
/>
@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 20.52608% with 3535 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.69%. Comparing base (8210463) to head (59ea1aa).
⚠️ Report is 561 commits behind head on main.

Files with missing lines Patch % Lines
sei-db/ss/pebbledb/db.go 17.96% 563 Missing and 17 partials ⚠️
sei-db/sc/memiavl/db.go 32.52% 389 Missing and 28 partials ⚠️
sei-db/sc/memiavl/snapshot.go 0.00% 415 Missing ⚠️
sei-db/ss/pebbledb/iterator.go 0.00% 281 Missing ⚠️
sei-db/sc/memiavl/multitree.go 38.80% 174 Missing and 20 partials ⚠️
sei-db/sc/memiavl/import.go 0.00% 189 Missing ⚠️
sei-db/sc/memiavl/tree.go 25.11% 165 Missing and 5 partials ⚠️
sei-db/sc/memiavl/proof.go 0.00% 141 Missing ⚠️
sei-db/stream/changelog/changelog.go 17.39% 128 Missing and 5 partials ⚠️
sei-db/sc/memiavl/persisted_node.go 0.00% 124 Missing ⚠️
... and 24 more

❌ Your patch status has failed because the patch coverage (20.52%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (47.19%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2457       +/-   ##
===========================================
+ Coverage   40.15%   50.69%   +10.53%     
===========================================
  Files        1533     1580       +47     
  Lines      156532   161276     +4744     
===========================================
+ Hits        62850    81753    +18903     
+ Misses      88970    73294    -15676     
- Partials     4712     6229     +1517     
Flag Coverage Δ
sei-chain 27.29% <20.52%> (-0.20%) ⬇️
sei-cosmos 51.64% <ø> (-0.01%) ⬇️
sei-tendermint 58.59% <ø> (?)
sei-wasmd 51.41% <ø> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
sei-db/common/utils/path.go 100.00% <100.00%> (ø)
sei-db/config/config.go 100.00% <100.00%> (ø)
sei-db/ss/pebbledb_init.go 100.00% <100.00%> (ø)
sei-db/common/metrics/metrics.go 50.00% <50.00%> (ø)
sei-db/proto/commit_info.go 0.00% <0.00%> (ø)
sei-db/common/logger/logger.go 25.00% <25.00%> (ø)
sei-db/common/errors/errors.go 53.84% <53.84%> (ø)
sei-db/common/utils/bytes.go 25.00% <25.00%> (ø)
sei-db/ss/types/store.go 0.00% <0.00%> (ø)
sei-db/sc/memiavl/filelock.go 30.76% <30.76%> (ø)
... and 27 more

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

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@masih masih marked this pull request as ready for review October 9, 2025 19:42
masih added a commit to sei-protocol/sei-db that referenced this pull request Oct 9, 2025
Updare readme with archive notice.

Relates to:
* sei-protocol/sei-chain#2457
masih added a commit to sei-protocol/sei-db that referenced this pull request Oct 9, 2025
Updare readme with archive notice.

Relates to:
* sei-protocol/sei-chain#2457
@masih masih merged commit d285ea5 into main Oct 10, 2025
116 of 120 checks passed
@masih masih deleted the masih/mono-ish-db branch October 10, 2025 09:42
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.

7 participants