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

Commit

Permalink
upgrade pulsar to gemini-3h-2023-feb-05 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthDesai committed Feb 9, 2024
1 parent 3073faa commit 387d154
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 129 deletions.
102 changes: 51 additions & 51 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions sdk/dsn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ 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 = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
sdk-utils = { path = "../utils" }
serde = { version = "1", features = ["derive"] }
sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382", default-features = false }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90", default-features = false }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
tracing = "0.1"
14 changes: 7 additions & 7 deletions sdk/farmer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,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 = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382", default-features = false }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382", features = ["parallel"] }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90", default-features = false }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90", features = ["parallel"] }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
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
2 changes: 1 addition & 1 deletion sdk/farmer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ impl<T: subspace_proof_of_space::Table> Farm<T> {
plotting_thread_pool_manager,
}: FarmOptions<
'_,
impl subspace_farmer_components::plotting::PieceGetter + Clone + Send + Sync + 'static,
impl subspace_farmer_components::PieceGetter + Clone + Send + Sync + 'static,
impl sdk_traits::Node,
>,
) -> Result<(Self, SingleDiskFarm), BuildError> {
Expand Down
44 changes: 22 additions & 22 deletions sdk/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@ edition = "2021"
[dependencies]
anyhow = "1"
backoff = "0.4"
cross-domain-message-gossip = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
cross-domain-message-gossip = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
derivative = "2.2.0"
derive_builder = "0.12"
derive_more = "0.99"
domain-client-message-relayer = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
domain-client-operator = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
domain-eth-service = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
domain-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
domain-service = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
evm-domain-runtime = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
domain-client-message-relayer = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
domain-client-operator = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
domain-eth-service = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
domain-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
domain-service = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
evm-domain-runtime = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" }
frame-system = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
futures = "0.3"
hex-literal = "0.4"
pallet-rewards = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
pallet-subspace = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
pallet-rewards = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
pallet-subspace = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
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 = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-consensus-slots = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
sc-network = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-network-sync = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-service = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false }
sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8", default-features = false }
sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sc-utils = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
Expand All @@ -46,20 +46,20 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sp-consensus = { version = "0.10.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sp-domains = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
sp-messenger = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
sp-domains = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
sp-messenger = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
sp-version = { version = "22.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382", default-features = false }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90", default-features = false }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-networking = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
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"
7 changes: 3 additions & 4 deletions sdk/node/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ use std::path::Path;
use derivative::Derivative;
use derive_builder::Builder;
use derive_more::{Deref, DerefMut, Display, From};
use sc_service::BlocksPruning;
use sdk_dsn::{Dsn, DsnBuilder};
use sdk_substrate::{
Base, BaseBuilder, NetworkBuilder, PruningMode, Role, RpcBuilder, StorageMonitor,
Base, BaseBuilder, BlocksPruning, NetworkBuilder, PruningMode, Role, RpcBuilder, StorageMonitor,
};
use sdk_utils::ByteSize;
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -128,7 +127,7 @@ impl<F: Farmer + 'static> Builder<F> {
.rpc(RpcBuilder::gemini_3h())
.role(Role::Authority)
.state_pruning(PruningMode::ArchiveCanonical)
.blocks_pruning(BlocksPruning::Some(256))
.blocks_pruning(BlocksPruning::Number(256))
}

/// Devnet chain configuration
Expand All @@ -139,7 +138,7 @@ impl<F: Farmer + 'static> Builder<F> {
.rpc(RpcBuilder::devnet())
.role(Role::Authority)
.state_pruning(PruningMode::ArchiveCanonical)
.blocks_pruning(BlocksPruning::Some(256))
.blocks_pruning(BlocksPruning::Number(256))
}

/// Get configuration for saving on disk
Expand Down
1 change: 1 addition & 0 deletions sdk/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ impl<F: Farmer + 'static> Config<F> {
sync_from_dsn,
is_timekeeper,
timekeeper_cpu_cores,
dsn_piece_getter: None, // TODO: Use custom piece getter for better performance
};

let node_runner_future = subspace_farmer::utils::run_future_in_dedicated_thread(
Expand Down
4 changes: 2 additions & 2 deletions sdk/subspace-sdk/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 = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }

[dev-dependencies]
anyhow = "1"
Expand All @@ -22,7 +22,7 @@ fdlimit = "0.2"
futures = "0.3"
mimalloc = { version = "*", default-features = false }
serde_json = "1"
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
tempfile = "3"
tokio = { version = "1.34.0", features = ["rt-multi-thread", "macros"] }
tracing = "0.1"
Expand Down
4 changes: 2 additions & 2 deletions sdk/subspace-sdk/examples/complete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use subspace_sdk::{chain_spec, node, ByteSize, FarmDescription, Farmer, Node, Pu
async fn main() {
let plots = [FarmDescription::new("plot", ByteSize::gb(10))];
let node: Node = Node::builder()
.blocks_pruning(node::BlocksPruning::Some(1000))
.blocks_pruning(node::BlocksPruning::Number(1000))
.state_pruning(node::PruningMode::ArchiveCanonical)
.network(NetworkBuilder::new().name("i1i1"))
.build("node", chain_spec::dev_config())
Expand Down Expand Up @@ -56,7 +56,7 @@ async fn main() {

// Restarting
let node = Node::builder()
.blocks_pruning(node::BlocksPruning::Some(1000))
.blocks_pruning(node::BlocksPruning::Number(1000))
.state_pruning(node::PruningMode::ArchiveCanonical)
.build("node", chain_spec::dev_config())
.await
Expand Down
2 changes: 1 addition & 1 deletion sdk/substrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ sc-storage-monitor = { version = "0.1.0", git = "https://github.com/subspace/pol
sdk-utils = { path = "../utils" }
serde = { version = "1", features = ["derive"] }
sp-runtime = { version = "24.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "e8ed377ecee4e1992ffb731d67cd04bf444e6382" }
subspace-service = { git = "https://github.com/subspace/subspace", rev = "a2e0318a75705ab31975ac8b172c999cab378e90" }
2 changes: 1 addition & 1 deletion sdk/substrate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ impl Base {
impl_version,
transaction_pool: Default::default(),
network,
state_pruning: Some(state_pruning.into()),
state_pruning: state_pruning.into(),
blocks_pruning: blocks_pruning.into(),
rpc_options: SubstrateRpcConfiguration {
listen_on: rpc_addr.unwrap_or(SocketAddr::new(
Expand Down
39 changes: 13 additions & 26 deletions sdk/substrate/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Default, Serialize, Deserialize, Eq, PartialOrd, Ord)]
pub enum BlocksPruning {
#[default]
/// Keep full block history, of every block that was ever imported.
KeepAll,
/// Keep full finalized block history.
KeepFinalized,
ArchiveCanonical,
/// Keep full block history, of every block that was ever imported.
Archive,
/// Keep N recent finalized blocks.
Some(u32),
Number(u32),
}

impl From<sc_service::BlocksPruning> for BlocksPruning {
fn from(value: sc_service::BlocksPruning) -> Self {
match value {
sc_service::BlocksPruning::KeepAll => Self::KeepAll,
sc_service::BlocksPruning::KeepFinalized => Self::KeepFinalized,
sc_service::BlocksPruning::Some(n) => Self::Some(n),
sc_service::BlocksPruning::KeepAll => Self::Archive,
sc_service::BlocksPruning::KeepFinalized => Self::ArchiveCanonical,
sc_service::BlocksPruning::Some(n) => Self::Number(n),
}
}
}

impl From<BlocksPruning> for sc_service::BlocksPruning {
fn from(value: BlocksPruning) -> Self {
match value {
BlocksPruning::KeepAll => Self::KeepAll,
BlocksPruning::KeepFinalized => Self::KeepFinalized,
BlocksPruning::Some(n) => Self::Some(n),
BlocksPruning::Archive => Self::KeepAll,
BlocksPruning::ArchiveCanonical => Self::KeepFinalized,
BlocksPruning::Number(n) => Self::Some(n),
}
}
}
Expand Down Expand Up @@ -59,32 +59,19 @@ impl From<sc_state_db::Constraints> for Constraints {
/// Pruning mode.
#[derive(Debug, Clone, Eq, PartialEq, Default, Serialize, Deserialize)]
pub enum PruningMode {
/// No pruning. Canonicalization is a no-op.
#[default]
ArchiveAll,
/// Canonicalization discards non-canonical nodes. All the canonical
/// nodes are kept in the DB.
#[default]
ArchiveCanonical,
/// Maintain a pruning window.
Constrained(Constraints),
/// No pruning. Canonicalization is a no-op.
ArchiveAll,
}

impl From<PruningMode> for sc_service::PruningMode {
fn from(value: PruningMode) -> Self {
match value {
PruningMode::ArchiveAll => Self::ArchiveAll,
PruningMode::ArchiveCanonical => Self::ArchiveCanonical,
PruningMode::Constrained(c) => Self::Constrained(c.into()),
}
}
}

impl From<sc_service::PruningMode> for PruningMode {
fn from(value: sc_service::PruningMode) -> Self {
match value {
sc_service::PruningMode::ArchiveAll => Self::ArchiveAll,
sc_service::PruningMode::ArchiveCanonical => Self::ArchiveCanonical,
sc_service::PruningMode::Constrained(c) => Self::Constrained(c.into()),
}
}
}
Expand Down
Loading

0 comments on commit 387d154

Please sign in to comment.