diff --git a/Cargo.lock b/Cargo.lock index 71ccc4b5..8c1c9149 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -893,8 +893,7 @@ dependencies = [ [[package]] name = "ant-node" version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3490dfb2cd08f4873b32d4328506038067c43a3662c5f6cb9dbb9db9e078e6d0" +source = "git+https://github.com/WithAutonomi/ant-node?rev=31fcbae#31fcbae2688a1d81008ef1b57fe09eda4b13817b" dependencies = [ "ant-protocol", "bao", @@ -3304,7 +3303,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.57.0", + "windows-core 0.61.2", ] [[package]] diff --git a/ant-core/Cargo.toml b/ant-core/Cargo.toml index 86c8a0a8..3485f418 100644 --- a/ant-core/Cargo.toml +++ b/ant-core/Cargo.toml @@ -67,7 +67,14 @@ sysinfo = { version = "0.32", default-features = false, features = ["system"] } # `ant-protocol` pin above points at a released version, this ant-node must # track the matching released version carrying the same saorsa-core / # ant-protocol lineage. -ant-node = { version = "0.18.1", optional = true } +# +# Temporarily pinned to the ant-node `main` commit that merged the file-per-chunk +# chunk store (WithAutonomi/ant-node#216, V2-1033). That change replaced +# `LmdbStorage` with `ChunkStore` in `AntProtocol::new`, which the test harness +# in tests/support/mod.rs constructs, so 0.18.1 no longer compiles against it. +# A rev, not a branch, so the pin is immutable. Swap back to a published +# version pin (`ant-node = "0.19.0"`) once the release train publishes it. +ant-node = { git = "https://github.com/WithAutonomi/ant-node", rev = "31fcbae", optional = true } tracing-subscriber = { version = "0.3", features = ["env-filter"] } [target.'cfg(unix)'.dependencies] @@ -98,7 +105,9 @@ test-utils = [] # always compile even without the `devnet` feature. Pinned to the same # version as the runtime dep so there is a single ant-node / # saorsa-core version across the whole graph. -ant-node = { version = "0.18.1", features = ["test-utils"] } +ant-node = { git = "https://github.com/WithAutonomi/ant-node", rev = "31fcbae", features = [ + "test-utils", +] } serial_test = "3" anyhow = "1" alloy = { version = "1.6", features = ["node-bindings"] } diff --git a/ant-core/tests/support/mod.rs b/ant-core/tests/support/mod.rs index 48a14ea1..a8a44aed 100644 --- a/ant-core/tests/support/mod.rs +++ b/ant-core/tests/support/mod.rs @@ -25,7 +25,7 @@ use ant_node::payment::{ QuotingMetricsTracker, }; use ant_node::replication::commitment_state::{BuiltCommitment, ResponderCommitmentState}; -use ant_node::storage::{AntProtocol, LmdbStorage, LmdbStorageConfig}; +use ant_node::storage::{AntProtocol, ChunkStore, ChunkStoreConfig, MigrationConfig}; // Wire / transport / EVM types: route through ant-protocol so the test // harness exercises the same surface the client does. use ant_protocol::evm::{testnet::Testnet, Network as EvmNetwork, RewardsAddress, Wallet}; @@ -315,15 +315,20 @@ impl MiniTestnet { let node = Arc::new(P2PNode::new(core_config).await.expect("create P2P node")); node.start().await.expect("start P2P node"); - // Create LMDB storage - let storage_config = LmdbStorageConfig { + // Create the chunk store. ant-node #216 replaced the LMDB chunk store + // with one file per chunk; `AntProtocol::new` now takes an + // `Arc`. These nodes start with no legacy environment, so + // the store comes up directly on the file backend and the migration + // never runs — this harness gives no LMDB-to-file migration coverage. + let storage_config = ChunkStoreConfig { root_dir: data_dir.to_path_buf(), verify_on_read: true, max_map_size: 0, disk_reserve: 0, + migration: MigrationConfig::default(), }; let storage = Arc::new( - LmdbStorage::new(storage_config) + ChunkStore::new(storage_config) .await .expect("create storage"), );