Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
70ecfef
Start breaking things
citizen-stig Jan 14, 2026
21dfb3a
Keep changing
citizen-stig Jan 14, 2026
7a9c2cf
DefaultNomtSpec for test utils is ready to roll!
citizen-stig Jan 14, 2026
0f9af1a
Some minor fixes
citizen-stig Jan 14, 2026
d8b222a
Big progress
citizen-stig Jan 14, 2026
c249d9f
CHANGELOG.md entry
citizen-stig Jan 14, 2026
fbed190
Type aliases simplification
citizen-stig Jan 14, 2026
dc91556
Revert some change to make lint pass
citizen-stig Jan 14, 2026
f86532e
Improving HashSTf and runner_reorg_tests.rs
citizen-stig Jan 14, 2026
7e1879c
Ignoring more tests for nomt
citizen-stig Jan 15, 2026
0040487
Merge branch 'dev' into nikolai/nomt-storage-by-default-in-sov-test-u…
citizen-stig Jan 15, 2026
69477bb
Stopping point after keeping cleaning
citizen-stig Jan 15, 2026
9c8e2d1
Serial tests for sequencer. Long, but works.
citizen-stig Jan 15, 2026
1bfaf24
Tuning and checking why it blows up
citizen-stig Jan 15, 2026
1afabab
Merge branch 'dev' into nikolai/nomt-storage-by-default-in-sov-test-u…
citizen-stig Jan 17, 2026
6248ea1
Reduce cache sizes for development
citizen-stig Jan 17, 2026
a30ff94
Going down
citizen-stig Jan 17, 2026
16ca243
Debuggin CI
citizen-stig Jan 17, 2026
90022f2
Try again
citizen-stig Jan 17, 2026
de408b2
Merge branch 'dev' into nikolai/nomt-storage-by-default-in-sov-test-u…
citizen-stig Jan 17, 2026
d66454e
Merge branch 'dev' into nikolai/nomt-storage-by-default-in-sov-test-u…
citizen-stig Jan 17, 2026
9a90f37
Addressing comments in the PR
citizen-stig Jan 18, 2026
ccbfb80
NOMT storage support for open proof (#2366)
citizen-stig Jan 19, 2026
0fe5e11
Re-enable nextest overrides for sequencer tests
citizen-stig Jan 19, 2026
3eb7e12
Re-enable more ordering for sequencer tests
citizen-stig Jan 19, 2026
c4c5c3b
Update comments
citizen-stig Jan 19, 2026
daaa6ab
More precise PartialEq
citizen-stig Jan 19, 2026
7e5bea5
Merge branch 'dev' into nikolai/nomt-storage-by-default-in-sov-test-u…
citizen-stig Jan 20, 2026
9f21ce1
Fix lint
citizen-stig Jan 20, 2026
ff02b05
Update crates/full-node/sov-sequencer/tests/integration/preferred_end…
citizen-stig Jan 21, 2026
f3ee1ca
Fixing and refactoring
citizen-stig Jan 28, 2026
12fd449
Merge branch 'dev' into nikolai/nomt-storage-by-default-in-sov-test-u…
citizen-stig Jan 28, 2026
9273548
More renaming
citizen-stig Jan 28, 2026
c84d408
Reduce kernel hash-table buckets for dev too
citizen-stig Jan 29, 2026
ec7650f
Merge branch 'dev' into nikolai/nomt-storage-by-default-in-sov-test-u…
citizen-stig Jan 29, 2026
f120f21
Implement PartialEq for NomtMultiProof without serialization
citizen-stig Jan 29, 2026
e8d591f
Extract common code for open_proof
citizen-stig Jan 29, 2026
2e0f68e
Lint fixes and same member order as in trait
citizen-stig Jan 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,25 @@ filter = 'package(sov-sequencer) & test(/flaky_test_archival_state_is_immediatel
priority = 95
threads-required = 3

[[profile.default.overrides]]
filter = 'package(sov-sequencer) & test(/seq_behind_deferred_slots_count|test_no_crashes_on_resync|sequencer_back_pressure|heavy_blob_submission/)'
test-group = 'heavy-sequencer-tests'
threads-required = 4 # Limit parallelism when these tests run
slow-timeout = { period = "60s", terminate-after = 10 } # These tests need up to 10 minutes under load

# This test has a race condition in archival state queries under load - needs full isolation
[[profile.default.overrides]]
filter = 'package(sov-sequencer)'
threads-required = 'num-cpus'

[test-groups.heavy-sequencer-tests]
max-threads = 2

[[profile.default.overrides]]
filter = 'package(sov-demo-rollup) & test(/replica::/)'
priority = 90 # try to run it first, so it doesn't add up at the end
threads-required = 3



[profile.ci]
default-filter = 'all()'
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2026-01-14
- #2329 Changes default storage in sov-test-utils's TestRollup to be NOMT. No impact for regular customers
# 2026-01-16
# 2026-01-29
- #2415 Non-breaking, but **important**. Config for MockDa rollup now stricter and prevents unknown fields. Previously there was incorrect `finalization` field instead of `finalization_blocks`

Expand Down
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 18 additions & 21 deletions crates/full-node/sov-db/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,21 @@ impl RollupDbConfig {
Self {
path,
state_cache_size: Some(1_000_000), // Use a 1MB state cache for tests
user_commit_concurrency: Some(4),
user_commit_concurrency: Some(2),
user_hashtable_buckets: Some(if cfg!(debug_assertions) {
2_500 // 9.77MB
500
} else {
15_000_000
1_000_000
}),
user_preallocate_ht: if cfg!(debug_assertions) {
Some(false)
} else {
None
},
user_page_cache_size: None,
user_leaf_cache_size: None,
user_preallocate_ht: Some(false),
user_page_cache_size: Some(16),
user_leaf_cache_size: Some(16),
kernel_commit_concurrency: Some(2),
kernel_hashtable_buckets: None,
kernel_preallocate_ht: if cfg!(debug_assertions) {
Some(false)
} else {
None
},
kernel_page_cache_size: None,
kernel_leaf_cache_size: None,
pruner_block_interval: Some(100),
kernel_preallocate_ht: Some(false),
kernel_page_cache_size: Some(16),
kernel_leaf_cache_size: Some(16),
pruner_block_interval: None,
pruner_versions_to_keep: Some(20),
pruner_max_batch_size: None,
}
Expand All @@ -102,13 +94,16 @@ impl RollupDbConfig {
self.kernel_commit_concurrency
.expect("`kernel_commit_concurrency` concurrency must be set"),
);
if cfg!(debug_assertions) {
// 9.77MB
opts.hashtable_buckets(2_500);
if let Some(hashtable_buckets) = self.kernel_hashtable_buckets {
opts.hashtable_buckets(hashtable_buckets);
} else if cfg!(debug_assertions) {
// 2MB
opts.hashtable_buckets(500);
} else {
// 1000MB
opts.hashtable_buckets(self.kernel_hashtable_buckets.unwrap_or(256_000));
}

if let Some(preallocate_ht) = self.kernel_preallocate_ht {
opts.preallocate_ht(preallocate_ht);
}
Expand All @@ -119,6 +114,7 @@ impl RollupDbConfig {
if let Some(leaf_cache_size) = self.kernel_leaf_cache_size {
opts.leaf_cache_size(leaf_cache_size);
}

opts.path(self.path.join("kernel_nomt_db"));

opts
Expand Down Expand Up @@ -146,6 +142,7 @@ impl RollupDbConfig {
if let Some(leaf_cache_size) = self.user_leaf_cache_size {
opts.leaf_cache_size(leaf_cache_size);
}

opts.path(self.path.join("user_nomt_db"));
opts
}
Expand Down
36 changes: 21 additions & 15 deletions crates/full-node/sov-sequencer/src/preferred/state_root_compute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async fn compute_state_root<S: Spec, Rt: Runtime<S>>(

impl<S: Spec> StateRootTask<S> {
pub(super) fn create<Rt: Runtime<S>>(
mut block_excutors_shutdown_receiver: mpsc::Receiver<()>,
mut block_executors_shutdown_receiver: mpsc::Receiver<()>,
check_state_roots: bool,
) -> (JoinHandle<()>, StateRootTask<S>) {
let span = span!(Level::DEBUG, "state_root_compute_background_task");
Expand All @@ -222,7 +222,7 @@ impl<S: Spec> StateRootTask<S> {
}
}
}
_ = block_excutors_shutdown_receiver.recv() => {
_ = block_executors_shutdown_receiver.recv() => {
info!(
"Sequencer state root background task shutdown in response to signal",
);
Expand Down Expand Up @@ -353,10 +353,10 @@ mod tests {
use sov_state::SlotKey;
use sov_state::StateUpdate;
use sov_test_utils::storage::{
ForklessStorageManager, SimpleNomtStorageManager, SimpleStorageManager,
ForklessStorageManager, SimpleJmtStorageManager, SimpleStorageManager,
};
use sov_test_utils::{
generate_optimistic_runtime, TestHasher, TestNomtSpec, TestSpec, TestStorageSpec,
generate_optimistic_runtime, TestHasher, TestJmtSpec, TestSpec, TestStorageSpec,
};
use tokio::task::JoinHandle;

Expand All @@ -366,32 +366,38 @@ mod tests {

#[tokio::test(flavor = "multi_thread")]
async fn test_jmt_new_rollup_height_state_root_on_stale_storage() {
let storage_manager = SimpleStorageManager::<TestStorageSpec>::new();
new_rollup_height_state_root_on_stale_storage::<TestSpec, _, TestRuntime<TestSpec>>(
let storage_manager = SimpleJmtStorageManager::<TestStorageSpec>::new();
new_rollup_height_state_root_on_stale_storage::<TestJmtSpec, _, TestRuntime<TestJmtSpec>>(
storage_manager,
)
.await;
}

#[tokio::test(flavor = "multi_thread")]
async fn test_jmt_known_rollup_height_state_root_on_stale_storage() {
let storage_manager = SimpleStorageManager::<TestStorageSpec>::new();
known_rollup_height_state_root_on_stale_storage::<TestSpec, _, TestRuntime<TestSpec>>(
let storage_manager = SimpleJmtStorageManager::<TestStorageSpec>::new();
known_rollup_height_state_root_on_stale_storage::<TestJmtSpec, _, TestRuntime<TestJmtSpec>>(
storage_manager,
)
.await;
}

#[tokio::test(flavor = "multi_thread")]
async fn test_nomt_new_rollup_height_state_root_on_stale_storage() {
let storage_manager = SimpleNomtStorageManager::<TestStorageSpec>::new();
new_rollup_height_state_root_on_stale_storage::<TestNomtSpec, _, TestRuntime<TestNomtSpec>>(storage_manager).await;
let storage_manager = SimpleStorageManager::<TestStorageSpec>::new();
new_rollup_height_state_root_on_stale_storage::<TestSpec, _, TestRuntime<TestSpec>>(
storage_manager,
)
.await;
}

#[tokio::test(flavor = "multi_thread")]
async fn test_nomt_known_rollup_height_state_root_on_stale_storage() {
let storage_manager = SimpleNomtStorageManager::<TestStorageSpec>::new();
known_rollup_height_state_root_on_stale_storage::<TestNomtSpec, _, TestRuntime<TestNomtSpec>>(storage_manager).await;
let storage_manager = SimpleStorageManager::<TestStorageSpec>::new();
known_rollup_height_state_root_on_stale_storage::<TestSpec, _, TestRuntime<TestSpec>>(
storage_manager,
)
.await;
}

// Helpers go below
Expand Down Expand Up @@ -625,9 +631,9 @@ mod tests {
)
.unwrap();
known_rollup_height_state_root_on_stale_storage_with_deep_jumps::<
TestNomtSpec,
TestSpec,
_,
TestRuntime<TestNomtSpec>,
TestRuntime<TestSpec>,
>(storage_manager)
.await;
}
Expand Down Expand Up @@ -777,7 +783,7 @@ mod tests {

// Now we'll run a loop of...
// - Commit the next block info, making one more set of sequencer storages become stale.
// - Iterate over all of the seqeuncer storages and compute the state root for each one. Make sure that they get the correct value
// - Iterate over all of the sequencer storages and compute the state root for each one. Make sure that they get the correct value
//
// This checks that stale storage is handled correctly, even when it becomes *very* stale. (For example, the storage we created for block 1 should still compute the correct root after block 10 has been written to disk.)
for i in 0..block_infos.len() {
Expand Down
23 changes: 3 additions & 20 deletions crates/full-node/sov-sequencer/tests/integration/pinned_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,13 @@ use crate::utils::tempdir_inside_codebase_dir;
use base64::prelude::BASE64_STANDARD;
use base64::Engine;
use sov_api_spec::types as api_types;
use sov_db::storage_manager::NomtStorageManager;
use sov_mock_da::BlockProducingConfig;
use sov_mock_da::MockHash;
use sov_mock_zkvm::crypto::private_key::Ed25519PrivateKey;
use sov_modules_api::CryptoSpec;
use sov_modules_api::RawTx;
use sov_modules_api::Spec;
use sov_modules_api::{DispatchCall, HexHash, HexString};
use sov_modules_stf_blueprint::Runtime;
use sov_sequencer::SequencerKindConfig;
use sov_state::nomt::prover_storage::NomtProverStorage;
use sov_state::pinned_cache::PinnedCache;
use sov_state::DefaultStorageSpec;
use sov_test_modules::pinned_cache::CallMessage as PinnedCacheCallMessage;
use sov_test_modules::pinned_cache::PinnedCacheTester;
use sov_test_modules::pinned_cache::ValueRange;
Expand All @@ -26,25 +20,14 @@ use sov_test_utils::test_rollup::GenesisSource;
use sov_test_utils::test_rollup::RollupBuilder;
use sov_test_utils::test_rollup::StoragePath;
use sov_test_utils::test_rollup::TestRollup;
use sov_test_utils::MockDaSpec;
use sov_test_utils::RtAgnosticBlueprint;
use sov_test_utils::TestNomtSpec as TestSpec;
use sov_test_utils::TestSpec;
use sov_test_utils::TestStorageManager;
use sov_test_utils::TestUser;
use sov_test_utils::{default_test_signed_transaction, TEST_DEFAULT_MOCK_DA_BLOCK_TIME_MS};
use tokio_stream::StreamExt;

type TestNomtBlueprint = RtAgnosticBlueprint<
TestSpec,
TestRuntime<TestSpec>,
NomtStorageManager<
MockDaSpec,
<<TestSpec as Spec>::CryptoSpec as CryptoSpec>::Hasher,
NomtProverStorage<
DefaultStorageSpec<<<TestSpec as Spec>::CryptoSpec as CryptoSpec>::Hasher>,
MockHash,
>,
>,
>;
type TestNomtBlueprint = RtAgnosticBlueprint<TestSpec, TestRuntime<TestSpec>, TestStorageManager>;

const PINNED_ADDRESS: HexHash = HexString([1u8; 32]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ use tokio_stream::StreamExt;
use tracing::{debug, info};

const DELAYED_TX_DELAY_MS: u64 = 2500;
const NOTIFICATION_TIMEOUT: Duration = Duration::from_secs(30);

generate_optimistic_runtime_with_kernel!(
TestRuntime <=
Expand Down Expand Up @@ -141,11 +142,19 @@ impl DaLayerWithSubscription {
let subscription = self.slot_subscription.as_mut().unwrap();
while self.back_slot_notifications > 1 {
self.back_slot_notifications -= 1;
subscription.next().await.unwrap().unwrap();
tokio::time::timeout(NOTIFICATION_TIMEOUT, subscription.next())
.await
.expect("timeout waiting for slot notification")
.unwrap()
.unwrap();
}

self.back_slot_notifications -= 1;
subscription.next().await.unwrap().unwrap()
tokio::time::timeout(NOTIFICATION_TIMEOUT, subscription.next())
.await
.expect("timeout waiting for slot notification")
.unwrap()
.unwrap()
}

/// Gets the next state update notification, clearing any *known* updates from the queue first.
Expand All @@ -154,7 +163,11 @@ impl DaLayerWithSubscription {
/// how many state update notifications we should ultimately be receiving.
pub async fn next_state_update_notification(&mut self) -> StateUpdateNotification {
let subscription = self.state_update_subscription.as_mut().unwrap();
subscription.next().await.unwrap().unwrap()
tokio::time::timeout(NOTIFICATION_TIMEOUT, subscription.next())
.await
.expect("timeout waiting for state update notification")
.unwrap()
.unwrap()
}

/// Produces a slot and waits for the state update and slot notifications.
Expand Down Expand Up @@ -545,7 +558,7 @@ async fn test_tx_ws_submission() {
}

#[tokio::test(flavor = "multi_thread")]
#[ignore = "This test covers pruning behavior, which is only relevant for NOMT. Enable it when we switch to NOMT for the sequencer tests."]
#[ignore = "This test covers pruning behavior, which is currently disabled."]
async fn test_archival_state_with_pruning() {
let (test_rollup, admin) = create_test_rollup(
0,
Expand Down Expand Up @@ -2335,9 +2348,24 @@ async fn test_no_crashes_on_resync_with_transactions() {

let rollup_storage_path = builder.storage_path();
// Next, delete everything except the preferred sequencer DB. Resync again to verify that this
// doesn't interfere
for path in ["state", "accessory", "ledger", "blob_sender"] {
std::fs::remove_dir_all(rollup_storage_path.path().join(path)).unwrap();
// doesn't interfere.
// NOMT uses different directories than JMT:
// - user_nomt_db, kernel_nomt_db (NOMT state)
// - state-db, archival-state-db (FlatStateDb)
// - accessory, ledger, blob_sender (common to both)
for path in [
"user_nomt_db",
"kernel_nomt_db",
"state-db",
"archival-state-db",
"accessory",
"ledger",
"blob_sender",
] {
let full_path = rollup_storage_path.path().join(path);
if full_path.exists() {
std::fs::remove_dir_all(full_path).unwrap();
}
}

let test_rollup = builder.start().await.unwrap();
Expand Down
Loading