Skip to content

test: Yiren/fkv mig int rebase v2#3503

Open
blindchaser wants to merge 20 commits into
mainfrom
yiren/fkv-mig-int-rebase-v2
Open

test: Yiren/fkv mig int rebase v2#3503
blindchaser wants to merge 20 commits into
mainfrom
yiren/fkv-mig-int-rebase-v2

Conversation

@blindchaser
Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Testing performed to validate your change

@cursor
Copy link
Copy Markdown

cursor Bot commented May 25, 2026

PR Summary

High Risk
Changes state-commit migration routing, AppHash/double-flush semantics, and coordinated multi-validator flips; incorrect behavior could fork consensus or halt blocks after migration.

Overview
Adds FlatKV EVM v0→v1 (memiavl_only → migrate_evm) integration coverage: docker clusters can boot via GIGA_MIGRATE_FROM_MEMIAVL, coordinated stop/flip/restart helpers (lib/flatkv_migration.sh), bulk EVM fixture storage, and seidb migrate-evm-status for polling completion. CI enables FlatKV EVM Migrate, Migrate Idle, and Migrate Negative; many rows stay commented until post-migration EVM store iteration is fixed (EndBlock RemoveFirstNTxHashes vs RouterCommitKVStore after cutover).

State-commit / migration behavior changes include configurable sc-keys-to-migrate-per-block, composite once-per-block migration forwarding (AppHash double-flush), migration manager routing for new keys and memiavl iterators during in-flight migrate, FlatKV seeded snapshot on SetInitialVersion, and expanded unit/rootmulti/composite tests. evm_stress -mode contract-storage supports live-workload scripts (mostly parked in CI).

Reviewed by Cursor Bugbot for commit 6b88c30. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 25, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 26, 2026, 3:10 PM

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 60.90535% with 95 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.08%. Comparing base (3ebdc40) to head (6b88c30).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...b/tools/cmd/seidb/operations/migrate_evm_status.go 0.00% 48 Missing ⚠️
scripts/evm_stress/main.go 0.00% 28 Missing ⚠️
sei-db/state_db/sc/migration/migration_manager.go 91.30% 3 Missing and 3 partials ⚠️
sei-db/state_db/sc/migration/migration_metrics.go 92.59% 4 Missing and 2 partials ⚠️
app/seidb.go 0.00% 2 Missing and 1 partial ⚠️
sei-db/state_db/sc/flatkv/store_meta.go 33.33% 1 Missing and 1 partial ⚠️
sei-db/tools/cmd/seidb/main.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3503      +/-   ##
==========================================
- Coverage   59.11%   59.08%   -0.04%     
==========================================
  Files        2187     2188       +1     
  Lines      182236   182393     +157     
==========================================
+ Hits       107724   107761      +37     
- Misses      64864    64981     +117     
- Partials     9648     9651       +3     
Flag Coverage Δ
sei-chain-pr 57.86% <60.90%> (?)
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 73.47% <100.00%> (+1.55%) ⬆️
sei-db/state_db/sc/flatkv/verify.go 48.71% <ø> (ø)
sei-db/state_db/sc/migration/router_builder.go 56.72% <100.00%> (+0.42%) ⬆️
sei-db/state_db/sc/flatkv/store_meta.go 67.96% <33.33%> (-0.84%) ⬇️
sei-db/tools/cmd/seidb/main.go 0.00% <0.00%> (ø)
app/seidb.go 73.61% <0.00%> (-3.21%) ⬇️
sei-db/state_db/sc/migration/migration_manager.go 94.52% <91.30%> (-2.00%) ⬇️
sei-db/state_db/sc/migration/migration_metrics.go 83.52% <92.59%> (+4.95%) ⬆️
scripts/evm_stress/main.go 0.00% <0.00%> (ø)
...b/tools/cmd/seidb/operations/migrate_evm_status.go 0.00% <0.00%> (ø)

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1269124cba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/seidb.go
Comment on lines +136 to +137
if n := cast.ToInt(v); n > 0 {
scConfig.KeysToMigratePerBlock = n
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject invalid sc-keys-to-migrate-per-block values

When state-commit.sc-keys-to-migrate-per-block is present but non-positive (or non-numeric, which cast.ToInt turns into 0), this code silently ignores the user-provided value and keeps the default 1024 instead of surfacing a config error. That makes bad configs look successful and can materially change migration behavior (for example, operators/tests expecting a tiny batch size will actually run at 1024 keys/block). Since StateCommitConfig.Validate() already defines <= 0 as invalid, swallowing the value here bypasses that validation signal and hides misconfiguration.

Useful? React with 👍 / 👎.

@blindchaser blindchaser force-pushed the yiren/fkv-mig-int-rebase-v2 branch from 1269124 to d426f57 Compare May 26, 2026 02:23
@blindchaser blindchaser force-pushed the yiren/fkv-mig-int-rebase-v2 branch from d426f57 to 6b88c30 Compare May 26, 2026 15:08
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.

1 participant