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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthDesai committed Aug 5, 2023
1 parent 47cd0ed commit 1e29e04
Show file tree
Hide file tree
Showing 9 changed files with 753 additions and 198 deletions.
849 changes: 693 additions & 156 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 @@ -12,7 +12,7 @@ sdk-dsn = { path = "dsn" }
sdk-substrate = { path = "substrate" }
sdk-farmer = { path = "farmer" }

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

# 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 @@ -35,7 +35,7 @@ tracing = "0.1"
tracing-futures = "0.2"
tracing-subscriber = "0.3"

subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }

# The list of dependencies below (which can be both direct and indirect dependencies) are crates
# that are suspected to be CPU-intensive, and that are unlikely to require debugging (as some of
Expand Down
12 changes: 6 additions & 6 deletions dsn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ anyhow = "1"
derivative = "2.2.0"
derive_builder = "0.12"
derive_more = "0.99"
either = "1.8"
either = "1.9"
hex = "0.4.3"
parking_lot = "0.12"
futures = "0.3"
Expand All @@ -24,8 +24,8 @@ sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/subs
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "55c157cff49b638a59d81a9f971f0f9a66829c71" }
sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "55c157cff49b638a59d81a9f971f0f9a66829c71" }

subspace-networking = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
6 changes: 3 additions & 3 deletions dsn/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,9 @@ impl Dsn {
move |address| {
tracing::info!(
"DSN listening on {}",
address.clone().with(subspace_networking::libp2p::multiaddr::Protocol::P2p(
node.id().into()
))
address
.clone()
.with(subspace_networking::libp2p::multiaddr::Protocol::P2p(node.id()))
);
}
}));
Expand Down
14 changes: 7 additions & 7 deletions farmer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ sdk-utils = { path = "../utils" }
sdk-dsn = { path = "../dsn" }
sdk-traits = { path = "../traits" }

subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8", features = ["parallel", "chia"] }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221", features = ["parallel", "chia"] }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
28 changes: 14 additions & 14 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ sp-core = { version = "21.0.0", git = "https://github.com/subspace/substrate", r
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "55c157cff49b638a59d81a9f971f0f9a66829c71" }
sp-version = { version = "22.0.0", git = "https://github.com/subspace/substrate", rev = "55c157cff49b638a59d81a9f971f0f9a66829c71" }

pallet-rewards = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
pallet-subspace = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
sp-domains = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-transaction-pool = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
pallet-rewards = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
pallet-subspace = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
sp-domains = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-transaction-pool = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
6 changes: 3 additions & 3 deletions traits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ async-trait = "0.1"
parking_lot = "0.12"
sdk-dsn = { path = "../dsn" }

subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }

sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/substrate", rev = "55c157cff49b638a59d81a9f971f0f9a66829c71" }
14 changes: 7 additions & 7 deletions utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ derivative = "2.2.0"
derive_more = "0.99"
futures = "0.3"
jsonrpsee-core = "0.16"
libp2p-core = "0.39"
libp2p-core = "0.40.0"
parity-scale-codec = "3.6.3"
serde = { version = "1", features = ["derive"] }
ss58-registry = "1.33"
Expand All @@ -34,11 +34,11 @@ sp-core-hashing = { version = "9.0.0", git = "https://github.com/subspace/substr
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/substrate", rev = "55c157cff49b638a59d81a9f971f0f9a66829c71" }
sp-storage = { version = "13.0.0", git = "https://github.com/subspace/substrate", rev = "55c157cff49b638a59d81a9f971f0f9a66829c71" }

sc-consensus-subspace-rpc = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
sc-consensus-subspace-rpc = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }

# Unused for now. TODO: add `serde` feature to `subspace-core-primitives` in `subspace-archiver`
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "c304e1f671ce5d929724d3411b4f6826e4fc05e8" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "cad1704bb1ea49b4ee145b480711a632e64dd221" }
18 changes: 18 additions & 0 deletions utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,18 @@ impl ByteSize {
#[serde(transparent)]
pub struct Multiaddr(pub libp2p_core::Multiaddr);

impl From<Multiaddr> for sc_network::Multiaddr {
fn from(value: Multiaddr) -> Self {
value.0.to_string().parse().expect("Conversion between 2 libp2p versions is always right")
}
}

impl From<sc_network::Multiaddr> for Multiaddr {
fn from(value: sc_network::Multiaddr) -> Self {
value.to_string().parse().expect("Conversion between 2 libp2p versions is always right")
}
}

/// Multiaddr with peer id
#[derive(
Debug, Clone, Deserialize, Serialize, PartialEq, From, Into, FromStr, Deref, DerefMut, Display,
Expand All @@ -363,6 +375,12 @@ impl MultiaddrWithPeerId {
}
}

impl From<MultiaddrWithPeerId> for libp2p_core::Multiaddr {
fn from(value: MultiaddrWithPeerId) -> Self {
value.0.to_string().parse().expect("Conversion between 2 libp2p versions is always right")
}
}

impl From<MultiaddrWithPeerId> for sc_network::Multiaddr {
fn from(multiaddr: MultiaddrWithPeerId) -> Self {
multiaddr.to_string().parse().expect("Conversion between 2 libp2p versions is always right")
Expand Down

0 comments on commit 1e29e04

Please sign in to comment.