flatkv migration testings test#3462
Conversation
PR SummaryHigh Risk Overview Refactors state-commit configuration around write modes and migration batching. Introduces Reworks Updates devnet/docker tooling and diagnostics. Docker/Makefile forward Reviewed by Cursor Bugbot for commit 2364ea4. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
| return nil, false, nil | ||
| } | ||
|
|
||
| value = childStore.Get(key) |
There was a problem hiding this comment.
GetLatestVersion errors during first migration mode transition
High Severity
GetLatestVersion now strictly requires both backends to agree when both are present, but the version-seeding logic that brings a fresh flatkv into lockstep only runs inside LoadVersion. When first transitioning from MemiavlOnly to MigrateEVM (or TestOnlyDualWrite), memiavl reports version N while a newly-created flatkv reports version 0, causing GetLatestVersion to return an error. In rootmulti.NewStore (line 122), this error is silently discarded (scVersion, _ :=), making scVersion zero and bypassing the SS safety check. In rootmulti.LastCommitID (line 225), the same error triggers a panic if lastCommitInfo is nil.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 75ffaf1. Configure here.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3462 +/- ##
==========================================
+ Coverage 59.24% 59.36% +0.11%
==========================================
Files 2126 2119 -7
Lines 175715 175133 -582
==========================================
- Hits 104097 103961 -136
+ Misses 62538 62110 -428
+ Partials 9080 9062 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75ffaf1428
ℹ️ 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".
| HistoricalProofBurst int `mapstructure:"historical-proof-burst"` | ||
|
|
||
| // The number of keys to migrate from memiavl to flatkv per block. Ignored if not in a migration mode. | ||
| KeysToMigratePerBlock int `mapstructure:"keys-to-migrate-per-block"` |
There was a problem hiding this comment.
Wire the migration batch size into app config
Adding this field does not make it configurable at runtime: the generated app.toml template has no matching key and app/seidb.go only reads the existing FlagSC* options, while the new migration script writes keys-to-migrate-per-block expecting it to take effect. As a result, migrate_* runs configured from app.toml keep using the hard-coded default (and server/config.GetConfig leaves the field at zero in its literal), so operators/tests cannot throttle batches and the 0->1 test silently skips the intended small-batch resume coverage. Please add the TOML key/flag and parse it into StateCommitConfig.
Useful? React with 👍 / 👎.
75ffaf1 to
bc103a8
Compare
6370d22 to
ad6ce4a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ad6ce4a. Configure here.
| else | ||
| sed -i '/^sc-write-mode/a sc-keys-to-migrate-per-block = $KEYS_TO_MIGRATE_PER_BLOCK' '$APP_CONFIG' | ||
| fi | ||
| " |
There was a problem hiding this comment.
Migration script batch size not expanded
Medium Severity
When flipping validators to migrate_evm, the docker exec bash -c block puts the sed replacement for sc-keys-to-migrate-per-block inside single quotes on the host. Host-side single quotes prevent expanding KEYS_TO_MIGRATE_PER_BLOCK, so the container likely writes the literal string $KEYS_TO_MIGRATE_PER_BLOCK instead of 256, defeating the intended per-block migration batch for this test.
Reviewed by Cursor Bugbot for commit ad6ce4a. Configure here.
49fa7a3 to
2a5e537
Compare
2a5e537 to
2ec63e0
Compare
0d8efed to
2364ea4
Compare


Describe your changes and provide context
Testing performed to validate your change