Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Upgrade sdk to gemini-3g-2023-dec-1 snapshot #233

Merged
merged 1 commit into from
Dec 2, 2023
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
101 changes: 51 additions & 50 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sdk-substrate = { path = "substrate" }
sdk-utils = { path = "utils" }
static_assertions = "1.1.0"

subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }

# The only triple tested and confirmed as working in `jemallocator` crate is `x86_64-unknown-linux-gnu`
[target.'cfg(all(target_arch = "x86_64", target_vendor = "unknown", target_os = "linux", target_env = "gnu"))'.dev-dependencies]
Expand All @@ -28,7 +28,7 @@ derive_more = "0.99"
fdlimit = "0.2"
futures = "0.3"
serde_json = "1"
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
tempfile = "3"
tokio = { version = "1.34.0", features = ["rt-multi-thread", "macros"] }
tracing = "0.1"
Expand Down
6 changes: 3 additions & 3 deletions dsn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ hex = "0.4.3"
parking_lot = "0.12"
prometheus-client = "0.22.0"
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
sdk-utils = { path = "../utils" }
serde = { version = "1", features = ["derive"] }
sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
tracing = "0.1"

[features]
Expand Down
19 changes: 11 additions & 8 deletions dsn/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ use sdk_utils::{self, DestructorSet, Multiaddr, MultiaddrWithPeerId};
use serde::{Deserialize, Serialize};
use subspace_farmer::piece_cache::PieceCache as FarmerPieceCache;
use subspace_farmer::utils::readers_and_pieces::ReadersAndPieces;
use subspace_farmer::KNOWN_PEERS_CACHE_SIZE;
use subspace_networking::libp2p::metrics::Metrics;
use subspace_networking::utils::strip_peer_id;
use subspace_networking::{
KademliaMode, PeerInfo, PeerInfoProvider, PieceByIndexRequest, PieceByIndexRequestHandler,
PieceByIndexResponse, SegmentHeaderBySegmentIndexesRequestHandler, SegmentHeaderRequest,
SegmentHeaderResponse,
KademliaMode, KnownPeersManager, KnownPeersManagerConfig, PeerInfo, PeerInfoProvider,
PieceByIndexRequest, PieceByIndexRequestHandler, PieceByIndexResponse,
SegmentHeaderBySegmentIndexesRequestHandler, SegmentHeaderRequest, SegmentHeaderResponse,
};

use super::local_provider_record_utils::MaybeLocalRecordProvider;
Expand Down Expand Up @@ -252,13 +253,15 @@ impl Dsn {

let listen_on = listen_addresses.0.into_iter().map(Into::into).collect();

let networking_parameters_registry = subspace_networking::NetworkingParametersManager::new(
&base_path.join("known_addresses.bin"),
strip_peer_id(bootstrap_nodes.clone())
let networking_parameters_registry = KnownPeersManager::new(KnownPeersManagerConfig {
path: Some(base_path.join("known_addresses.bin").into_boxed_path()),
ignore_peer_list: strip_peer_id(bootstrap_nodes.clone())
.into_iter()
.map(|(peer_id, _)| peer_id)
.collect::<HashSet<_>>(),
)
cache_size: KNOWN_PEERS_CACHE_SIZE,
..Default::default()
})
.context("Failed to open known addresses database for DSN")?
.boxed();

Expand All @@ -272,7 +275,7 @@ impl Dsn {
let config = subspace_networking::Config {
listen_on,
allow_non_global_addresses_in_dht,
networking_parameters_registry: Some(networking_parameters_registry),
networking_parameters_registry,
request_response_protocols: vec![
PieceByIndexRequestHandler::create({
let weak_readers_and_pieces = Arc::downgrade(&farmer_readers_and_pieces);
Expand Down
14 changes: 7 additions & 7 deletions farmer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ rayon = "1.7.0"
sdk-traits = { path = "../traits" }
sdk-utils = { path = "../utils" }
serde = { version = "1", features = ["derive"] }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774", features = ["parallel"] }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039", features = ["parallel"] }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
thiserror = "1"
tokio = { version = "1.34.0", features = ["fs", "rt", "tracing", "macros", "parking_lot", "rt-multi-thread", "signal"] }
tokio-stream = { version = "0.1", features = ["sync", "time"] }
Expand Down
6 changes: 3 additions & 3 deletions farmer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ use subspace_farmer::single_disk_farm::{
use subspace_farmer::utils::farmer_piece_getter::FarmerPieceGetter;
use subspace_farmer::utils::piece_validator::SegmentCommitmentPieceValidator;
use subspace_farmer::utils::readers_and_pieces::ReadersAndPieces;
use subspace_farmer::Identity;
use subspace_farmer::{Identity, KNOWN_PEERS_CACHE_SIZE};
use subspace_farmer_components::plotting::PlottedSector;
use subspace_farmer_components::sector::{sector_size, SectorMetadataChecksummed};
use subspace_networking::libp2p::kad::RecordKey;
use subspace_networking::utils::multihash::ToMultihash;
use subspace_networking::NetworkingParametersManager;
use subspace_networking::KnownPeersManager;
use subspace_rpc_primitives::{FarmerAppInfo, SolutionResponse};
use tokio::sync::{mpsc, oneshot, watch, Mutex, Semaphore};
use tracing::{debug, error, warn};
Expand Down Expand Up @@ -933,7 +933,7 @@ impl<T: subspace_proof_of_space::Table> Farm<T> {
// internal calculation of farm. Remove it once we have public function.
let fixed_space_usage = 2 * 1024 * 1024
+ Identity::file_size() as u64
+ NetworkingParametersManager::file_size() as u64;
+ KnownPeersManager::file_size(KNOWN_PEERS_CACHE_SIZE) as u64;
// Calculate how many sectors can fit
let target_sector_count = {
let potentially_plottable_space = allocated_space.saturating_sub(fixed_space_usage)
Expand Down
46 changes: 23 additions & 23 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,35 @@ edition = "2021"
[dependencies]
anyhow = "1"
backoff = "0.4"
cross-domain-message-gossip = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
cross-domain-message-gossip = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
derivative = "2.2.0"
derive_builder = "0.12"
derive_more = "0.99"
domain-client-message-relayer = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
domain-client-operator = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
domain-eth-service = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
domain-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
domain-service = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
evm-domain-runtime = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
domain-client-message-relayer = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
domain-client-operator = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
domain-eth-service = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
domain-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
domain-service = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
evm-domain-runtime = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "56086daa77802eaa285894bfe4b811be66629c89" }
frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
futures = "0.3"
hex-literal = "0.4"
pallet-rewards = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
pallet-subspace = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
pallet-rewards = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
pallet-subspace = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
parity-scale-codec = "3.6.3"
parking_lot = "0.12"
pin-project = "1"
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
sc-executor = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1", default-features = false }
sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1", default-features = false }
sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
Expand All @@ -47,21 +47,21 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sp-domains = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
sp-domains-fraud-proof = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
sp-messenger = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
sp-domains = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
sp-domains-fraud-proof = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
sp-messenger = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
sp-version = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "892bf8e938c6bd2b893d3827d1093cd81baa59a1" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "f2fc438d8505a7d5febe41c460c80ff27a979774" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "d1f9e52ac425ee799d6afd94defd646481d1a039" }
tokio = { version = "1.34.0", features = ["fs", "rt", "tracing", "macros", "parking_lot", "rt-multi-thread", "signal"] }
tokio-stream = { version = "0.1", features = ["sync", "time"] }
tracing = "0.1"
Expand Down
174 changes: 0 additions & 174 deletions node/res/chain-spec-raw-devnet.json

This file was deleted.

Loading
Loading