Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions Cargo.lock

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

13 changes: 11 additions & 2 deletions ant-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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"] }
Expand Down
13 changes: 9 additions & 4 deletions ant-core/tests/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -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<ChunkStore>`. 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"),
);
Expand Down
Loading