Skip to content

fix: restore PRs inadvertently reverted by #3039 squash-merge#3070

Merged
blindchaser merged 6 commits intomainfrom
fix/restore-reverted-prs
Mar 13, 2026
Merged

fix: restore PRs inadvertently reverted by #3039 squash-merge#3070
blindchaser merged 6 commits intomainfrom
fix/restore-reverted-prs

Conversation

@blindchaser
Copy link
Contributor

Summary

The squash-merge of #3039 (feat(flatkv): add read-only LoadVersion for state sync) inadvertently reverted changes from 5 previously-merged PRs. The yiren/flatkv-readonly branch had accumulated stale versions of files through merge-from-main commits, and when the final squash-merge landed, those stale versions overwrote the newer code on main.

PRs reverted by #3039 and restored in this PR

PR Title Key changes lost
#2810 fix(giga): check whether txs follow Giga ordering firstCosmosSeen tx ordering check, len(evmEntries) > 0 / len(v2Entries) > 0 guards in ProcessTXsWithOCCGiga
#3035 Add receiptdb config option in app.toml ReceiptStoreConfig in app.toml, readReceiptStoreConfig(), BackendTypeName(), receipt config tests
#3043 Add config to enable lattice hash EnableLatticeHash config, composite store lattice hash support
#3021 Background Transaction Generation block.go, block_builder.go for cryptosim benchmark
#3046 Add console logger and fix memiavl config for benchmark BlocksPerCommit=1, SnapshotInterval=1000, SnapshotMinTimeInterval=60

Conflict resolutions

Since several PRs landed after #3039 (notably #3050 slog migration, #3053 flaky test fix, #3062 admin service), cherry-picks required manual conflict resolution:

cody-littley and others added 5 commits March 13, 2026 09:58
## Describe your changes and provide context

Moved transaction generation off of the main benchmark thread for the
cryptosim benchmark.

## Testing performed to validate your change

Tested locally.

---------

Signed-off-by: Cody Littley <cody.littley@seinetwork.io>
Co-authored-by: Cody Littley <cody.littley@seinetwork.io>
This commit was inadvertently reverted by the squash-merge of #3039.
Restores the tx ordering check (firstCosmosSeen), len(evmEntries)>0
and len(v2Entries)>0 guards in ProcessTXsWithOCCGiga.

Conflicts with #3050's slog migration resolved by using package-level
logger instead of ctx.Logger().

Made-with: Cursor
This commit was inadvertently reverted by the squash-merge of #3039.
Restores ReceiptStoreConfig in app.toml, readReceiptStoreConfig(),
BackendTypeName(), receipt config tests, and init_test.go.

Conflicts resolved:
- app_config.go: kept both ReceiptStore (from #3035) and Admin (from #3062)
- receipt_store.go: kept BackendTypeName but used #3050's slog convention
- parquet_store_test.go: kept #3053's deterministic pruning test fix

Made-with: Cursor
This commit was inadvertently reverted by the squash-merge of #3039.
Restores LatticeHashEnabled config option in StateCommitConfig,
composite store lattice hash support, and related tests.

Conflict resolved: store_test.go needed all three imports (metrics
from HEAD, evm+logger from #3043).

Made-with: Cursor
This commit was inadvertently reverted by the squash-merge of #3039.
Restores the benchmark config changes (BlocksPerCommit=1,
SnapshotInterval=1000, SnapshotMinTimeInterval=60).

The consoleLogger addition from #3046 is dropped because #3050
replaced the logger package with slog, making it unnecessary.

Made-with: Cursor
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 13, 2026, 2:36 PM

@masih masih self-requested a review March 13, 2026 14:32
The cherry-picked tests from #3035 and #3043 still referenced the
old logger package (removed by #3050 slog migration). Fix:
- composite/store_test.go: remove logger import/arg, add CommittedRootHash to mock
- parquet/store_config_test.go: remove dbLogger arg from NewStore
- receipt/parquet_store_test.go: remove dbLogger arg from NewReceiptStore

Made-with: Cursor
Copy link

@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: 2d3a7ab912

ℹ️ 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".

// Builds blocks and sends them to the blocks channel.
func (b *blockBuilder) mainLoop() {
for {
block := b.buildBlock()

Choose a reason for hiding this comment

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

P1 Badge Check cancellation before building the next block

blockBuilder.mainLoop calls buildBlock() before it checks ctx.Done(), so shutdown can race with block generation. During CryptoSim teardown, the data generator is closed (its RNG is nulled) without waiting for the builder goroutine; if cancellation happens mid-build, later BuildTransaction calls can dereference a nil RNG and panic in a background goroutine. Add cancellation checks during block construction or explicitly synchronize builder shutdown before closing shared state.

Useful? React with 👍 / 👎.

m.startDataDirSizeSampling(dataDir, config.BackgroundMetricsScrapeInterval)
}
m.startProcessIOSampling(config.BackgroundMetricsScrapeInterval)
m.startUptimeSampling(time.Now())

Choose a reason for hiding this comment

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

P2 Badge Start uptime sampling after setup completes

Uptime sampling is started in NewCryptosimMetrics at construction time, but NewCryptoSim constructs metrics before account/contract setup runs. When setup is long (e.g., large prepopulation or restore), exported uptime includes non-workload initialization time, which skews benchmark-derived rates and makes run-to-run throughput comparisons inaccurate. The uptime sampler should be started once setup finishes, not during metric object creation.

Useful? React with 👍 / 👎.

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 61.57895% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.39%. Comparing base (837ba92) to head (9bec9d6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
app/app.go 3.77% 50 Missing and 1 partial ⚠️
sei-db/config/receipt_config.go 71.42% 5 Missing and 5 partials ⚠️
sei-db/ledger_db/receipt/receipt_store.go 53.84% 5 Missing and 1 partial ⚠️
app/test_helpers.go 89.47% 2 Missing and 2 partials ⚠️
app/receipt_store_config.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3070      +/-   ##
==========================================
+ Coverage   58.35%   58.39%   +0.04%     
==========================================
  Files        2080     2081       +1     
  Lines      171659   171790     +131     
==========================================
+ Hits       100170   100324     +154     
+ Misses      62564    62536      -28     
- Partials     8925     8930       +5     
Flag Coverage Δ
sei-chain-pr 53.72% <61.57%> (?)
sei-db 70.41% <ø> (ø)

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

Files with missing lines Coverage Δ
app/seidb.go 63.85% <100.00%> (+0.44%) ⬆️
cmd/seid/cmd/app_config.go 100.00% <100.00%> (ø)
cmd/seid/cmd/root.go 24.45% <100.00%> (+24.45%) ⬆️
sei-cosmos/server/config/config.go 94.68% <100.00%> (+0.02%) ⬆️
sei-db/config/sc_config.go 100.00% <100.00%> (ø)
sei-db/state_db/sc/composite/store.go 63.75% <100.00%> (+14.92%) ⬆️
sei-db/state_db/sc/flatkv/store.go 72.72% <100.00%> (+0.32%) ⬆️
app/receipt_store_config.go 71.42% <71.42%> (ø)
app/test_helpers.go 63.62% <89.47%> (+1.61%) ⬆️
sei-db/ledger_db/receipt/receipt_store.go 70.40% <53.84%> (-1.18%) ⬇️
... and 2 more
🚀 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
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

Confirmed my PR is back!

@blindchaser blindchaser added this pull request to the merge queue Mar 13, 2026
@masih
Copy link
Collaborator

masih commented Mar 13, 2026

Late to the party but LGTM; thank you for getting this sorted so quickly @blindchaser 🙌

Merged via the queue into main with commit bb2c5b3 Mar 13, 2026
38 checks passed
@blindchaser blindchaser deleted the fix/restore-reverted-prs branch March 13, 2026 17:12
yzang2019 added a commit that referenced this pull request Mar 16, 2026
* main:
  fix(giga): match v2 correctness checks (#3071)
  Added clone method to canned random (#3076)
  Helper files for the flatKV cache implementation (#3072)
  fix: restore PRs inadvertently reverted by #3039 squash-merge (#3070)
  Refine logging to avoid printing expensive objects on hot path (#3066)
  Fix flaky tendermint syncer test (#3065)
  Add runtime log level control via gRPC admin service (#3062)
  chore: dcoument run RPC suite on legacy vs giga (#3041)
  chore: self-contained revert tests, contract reorg, and failure analysis (#3033)
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.

5 participants