Skip to content

Make cryptosim state store backend configurable + No Op Wrapper + Read Disable Config#3145

Merged
Kbhat1 merged 9 commits intomainfrom
cryptosim-ss-config-from-main
Apr 1, 2026
Merged

Make cryptosim state store backend configurable + No Op Wrapper + Read Disable Config#3145
Kbhat1 merged 9 commits intomainfrom
cryptosim-ss-config-from-main

Conversation

@Kbhat1
Copy link
Copy Markdown
Contributor

@Kbhat1 Kbhat1 commented Mar 30, 2026

Describe your changes and provide context

  • Allow configuring state store config in cryptosim config vs just hard coding
  • Adds no-op wrapper to benchmark baseline
  • Add configurable read disable

Testing performed to validate your change

  • Unit tests
  • Testing on node

Thread state store config through SS-backed cryptosim backends so benchmark runs can select PebbleDB or RocksDB without code changes while preserving the existing benchmark defaults.

Made-with: Cursor
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 31, 2026, 5:44 PM

Update the historical state wrapper test to pass the benchmark state store config after making SS backend selection configurable.

Made-with: Cursor
@Kbhat1 Kbhat1 marked this pull request as ready for review March 31, 2026 00:44
Kbhat1 added 2 commits March 31, 2026 08:30
Allow cryptosim stress runs to continue when account existence sanity checks drift instead of canceling the benchmark early.

Made-with: Cursor
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.75%. Comparing base (1938b27) to head (faf8307).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3145      +/-   ##
==========================================
+ Coverage   58.74%   58.75%   +0.01%     
==========================================
  Files        2095     2095              
  Lines      173533   173475      -58     
==========================================
- Hits       101935   101925      -10     
+ Misses      62473    62437      -36     
+ Partials     9125     9113      -12     
Flag Coverage Δ
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 36 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

@cody-littley cody-littley left a comment

Choose a reason for hiding this comment

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

Will give ✅ once temporary fixes in transaction.go have been resolved.

Comment on lines +312 to +323
switch c.StateStoreConfig.Backend {
case config.PebbleDBBackend, config.RocksDBBackend:
default:
return fmt.Errorf("StateStoreConfig.Backend must be one of %q or %q (got %q)",
config.PebbleDBBackend, config.RocksDBBackend, c.StateStoreConfig.Backend)
}
if c.StateStoreConfig.WriteMode != "" && !c.StateStoreConfig.WriteMode.IsValid() {
return fmt.Errorf("StateStoreConfig.WriteMode must be valid (got %q)", c.StateStoreConfig.WriteMode)
}
if c.StateStoreConfig.ReadMode != "" && !c.StateStoreConfig.ReadMode.IsValid() {
return fmt.Errorf("StateStoreConfig.ReadMode must be valid (got %q)", c.StateStoreConfig.ReadMode)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It might be nice to give state store config it's own validation method, then just call into that validation method here.

Kbhat1 added 2 commits March 31, 2026 12:25
Add a write-only transaction mode plus a no-op backend so cryptosim can isolate benchmark overhead before comparing FlatKV and state-store backends.

Made-with: Cursor
@Kbhat1 Kbhat1 changed the title Make cryptosim state store backend configurable Make cryptosim state store backend configurable + No Op Wrapper + Read Disable Config Mar 31, 2026
Kbhat1 added 2 commits March 31, 2026 13:24
Check in the RocksDB and PebbleDB cryptosim configs used for the write-only split_write benchmark runs so they are part of the branch.

Made-with: Cursor
Use the standard state store async write buffer in cryptosim benchmark defaults and checked-in SS benchmark configs instead of forcing synchronous writes.

Made-with: Cursor
fmt.Printf("Logs are being routed to: %s\n", config.LogDir)

db, err := wrappers.NewDBImpl(ctx, config.Backend, config.DataDir)
db, err := wrappers.NewDBImplWithSSConfig(ctx, config.Backend, config.DataDir, config.StateStoreConfig)
Copy link
Copy Markdown
Contributor

@yzang2019 yzang2019 Mar 31, 2026

Choose a reason for hiding this comment

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

Why not just pass the whole config as a parameter? In that case, we don't need to change the function here

Switch the benchmark SS defaults and sample configs to split_write while keeping evm_first reads and the standard async write buffer.

Made-with: Cursor
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It might be worth removing the config entries in this file that shadow the default values. Otherwise, this file is going to drift out of sync with default test configuration over time.

@Kbhat1 Kbhat1 added this pull request to the merge queue Apr 1, 2026
Merged via the queue into main with commit 3ed3bf2 Apr 1, 2026
39 checks passed
@Kbhat1 Kbhat1 deleted the cryptosim-ss-config-from-main branch April 1, 2026 15:52
yzang2019 added a commit that referenced this pull request Apr 1, 2026
* main:
  Make cryptosim state store backend configurable + No Op Wrapper + Read Disable Config (#3145)
  Add warning message for IAVL deprecation (#3159)
  Change default min valid per window to zero (#3157)
  support for starting autobahn from non-zero global block (#3136)
  Fix upgrade list comparison to respect semver (#3153)
yzang2019 added a commit that referenced this pull request Apr 1, 2026
* main:
  plt-228 fixed static check on app and evmrpc package (#3154)
  flatkv cache (#3027)
  Make cryptosim state store backend configurable + No Op Wrapper + Read Disable Config (#3145)
  Add warning message for IAVL deprecation (#3159)
  Change default min valid per window to zero (#3157)
  support for starting autobahn from non-zero global block (#3136)
  Fix upgrade list comparison to respect semver (#3153)
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