Skip to content

Conversation

@citizen-stig
Copy link
Member

@citizen-stig citizen-stig commented Jan 14, 2026

Description

NOMT is our main production storage at the moment. More tests run using it, the better.

  • TestSpec -> TestJmtSpec
  • TestNomtSpec -> TestSpec
  • SimpleStorageManager -> SimpleJmtStorageManager
  • SimpleNomtStorageManager -> SimpleStorageManager

Couple more type aliases add in sov-test-utils for easier usage.

Implemented open_proof which is small change actually. But keep in mind, that it only works for live state, and not historical state. Because of that, majority of the tests that needs proofs have been ignored, because it needs to be redesigned.

Potential follow ups

  • rename ProverStorage to JmtProverStorage and comment that it is going to be phased out at some point
  • I have updated CHANGELOG.md with a new entry if my PR makes any breaking changes or fixes a bug. If my PR removes a feature or changes its behavior, I provide help for users on how to migrate to the new behavior.
  • I have carefully reviewed all my Cargo.toml changes before opening the PRs. (Are all new dependencies necessary? Is any module dependency leaked into the full-node (hint: it shouldn't)?)

Testing

All existing tests are passing

Docs

No updates

@citizen-stig citizen-stig marked this pull request as ready for review January 17, 2026 21:29
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 17, 2026

Greptile Summary

Migrated test infrastructure from JMT to NOMT as the default storage backend by swapping type aliases (TestSpec now points to NOMT, former TestSpec renamed to TestJmtSpec).

  • Created DefaultNomtSpec type in sov-modules-api mirroring DefaultSpec but using NomtProverStorage
  • Updated RollupDbConfig::default_in_path() with reduced memory settings for NOMT tests (smaller hashtable buckets, page/leaf caches)
  • Migrated 40+ test files to use NOMT storage managers and handle NOMT-specific directory structure
  • Added test resource constraints for heavy sequencer tests to prevent resource contention
  • Ignored proof-related tests that depend on open_proof functionality not yet supported in NOMT
  • Added kernel marker writes in tests (NOMT requires both user and kernel namespaces to be written)
  • Updated cleanup logic to handle NOMT directories (user_nomt_db, kernel_nomt_db) alongside state databases

Confidence Score: 5/5

  • Safe to merge - systematic type alias swap with comprehensive test coverage migration
  • The PR implements a clean architectural change by swapping type aliases to make NOMT the default storage. All changes are mechanical and follow consistent patterns: updating type imports, adding NOMT-specific configurations, and handling NOMT requirements (kernel markers, directory structures). The backward compatibility is preserved via TestJmtSpec, proof tests are appropriately ignored rather than removed, and test infrastructure updates (timeouts, resource constraints) address NOMT-specific needs.
  • No files require special attention

Important Files Changed

Filename Overview
crates/utils/sov-test-utils/src/lib.rs Renamed TestSpec to TestJmtSpec and TestNomtSpec to TestSpec, making NOMT the default storage. Added type aliases TestStorage and updated TestStorageManager
crates/module-system/sov-modules-api/src/default_spec.rs Added new DefaultNomtSpec implementation mirroring DefaultSpec but using NomtProverStorage instead of ProverStorage
crates/full-node/sov-db/src/config.rs Updated default_in_path with reduced NOMT memory settings for tests: lower hashtable buckets, smaller page/leaf caches, disabled pruner interval
.config/nextest.toml Added resource constraints for heavy sequencer tests: test-group with max-threads=1, 4 thread requirement, 10-minute timeout
crates/full-node/sov-sequencer/tests/integration/preferred_end_to_end.rs Added timeouts to notification subscriptions and updated cleanup to handle NOMT-specific directories (user_nomt_db, kernel_nomt_db, etc.)

Sequence Diagram

sequenceDiagram
    participant Test as Test Code
    participant Utils as sov-test-utils
    participant Spec as DefaultNomtSpec
    participant StorageMgr as NomtStorageManager
    participant NOMT as NomtProverStorage
    participant Config as RollupDbConfig

    Note over Test,NOMT: Migration from JMT to NOMT Storage

    Test->>Utils: Use TestSpec (formerly TestNomtSpec)
    Utils->>Spec: Instantiate DefaultNomtSpec
    Spec->>Spec: Configure Storage type as NomtProverStorage
    
    Test->>Config: Create RollupDbConfig::default_in_path()
    Config->>Config: Set reduced memory settings for tests
    Note over Config: hashtable_buckets: 500 (debug) / 1M (release)<br/>page_cache_size: 8, leaf_cache_size: 8<br/>commit_concurrency: 2
    
    Test->>StorageMgr: Initialize NomtStorageManager::new(config)
    StorageMgr->>NOMT: Create user_nomt_db
    StorageMgr->>NOMT: Create kernel_nomt_db
    
    Test->>StorageMgr: create_storage()
    StorageMgr->>NOMT: Return NomtProverStorage instance
    
    Test->>Test: Execute tests with NOMT storage
    Note over Test: All tests now use NOMT by default<br/>JMT available as TestJmtSpec if needed
Loading

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 17, 2026

Greptile found no issues!

From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

Copy link
Contributor

@theodorebugnet theodorebugnet left a comment

Choose a reason for hiding this comment

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

I don't have proper context of the NOMT proving (so I can't properly review the ignored tests and the open_proof() implementation) but otherwise changes LGTM.

Would it make sense to also have sov_test_utils::storage::SimpleNomtStorageManager -> SimpleStoragemanager and SimpleStorageManager -> SimpleJmtStorageManager the same way?

…_to_end.rs

Co-authored-by: Theodore Bugnet <24320578+theodorebugnet@users.noreply.github.com>
@citizen-stig
Copy link
Member Author

Would it make sense to also have sov_test_utils::storage::SimpleNomtStorageManager -> SimpleStoragemanager and SimpleStorageManager -> SimpleJmtStorageManager the same way?

Yep, it also should reduce size of the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants