From 3204d0e1bb6fb20f094662a1e283d75225b1d96a Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 19 Jan 2024 13:00:55 +0200 Subject: [PATCH 1/4] Rename remaining `cdm` to `xdm` --- .../src/bin/subspace-malicious-operator.rs | 2 +- crates/subspace-node/src/commands/run.rs | 2 +- crates/subspace-service/src/lib.rs | 12 ++++++------ .../src/gossip_worker.rs | 2 +- .../cross-domain-message-gossip/src/lib.rs | 2 +- test/subspace-test-service/src/lib.rs | 16 ++++++++-------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs b/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs index dc65b05ded..813e7437b5 100644 --- a/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs +++ b/crates/subspace-malicious-operator/src/bin/subspace-malicious-operator.rs @@ -362,7 +362,7 @@ fn main() -> Result<(), Error> { let cross_domain_message_gossip_worker = xdm_gossip_worker_builder .build::( consensus_chain_node.network_service, - consensus_chain_node.cdm_gossip_notification_service, + consensus_chain_node.xdm_gossip_notification_service, consensus_chain_node.sync_service, ); diff --git a/crates/subspace-node/src/commands/run.rs b/crates/subspace-node/src/commands/run.rs index e17c9350e8..80bead8ccd 100644 --- a/crates/subspace-node/src/commands/run.rs +++ b/crates/subspace-node/src/commands/run.rs @@ -209,7 +209,7 @@ pub async fn run(run_options: RunOptions) -> Result<(), Error> { let cross_domain_message_gossip_worker = xdm_gossip_worker_builder .build::( consensus_chain_node.network_service.clone(), - consensus_chain_node.cdm_gossip_notification_service, + consensus_chain_node.xdm_gossip_notification_service, consensus_chain_node.sync_service.clone(), ); diff --git a/crates/subspace-service/src/lib.rs b/crates/subspace-service/src/lib.rs index 1c9abf4004..b136154271 100644 --- a/crates/subspace-service/src/lib.rs +++ b/crates/subspace-service/src/lib.rs @@ -36,7 +36,7 @@ use crate::dsn::{create_dsn_instance, DsnConfigurationError}; use crate::metrics::NodeMetrics; use crate::transaction_pool::FullPool; use core::sync::atomic::{AtomicU32, Ordering}; -use cross_domain_message_gossip::cdm_gossip_peers_set_config; +use cross_domain_message_gossip::xdm_gossip_peers_set_config; use domain_runtime_primitives::opaque::{Block as DomainBlock, Header as DomainHeader}; use frame_system_rpc_runtime_api::AccountNonceApi; use futures::channel::oneshot; @@ -587,7 +587,7 @@ where /// Network service. pub network_service: Arc::Hash>>, /// Cross-domain gossip notification service. - pub cdm_gossip_notification_service: Box, + pub xdm_gossip_notification_service: Box, /// Sync service. pub sync_service: Arc>, /// RPC handlers. @@ -761,9 +761,9 @@ where .map_err(Error::BlockRelay)?, ); let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.base.network); - let (cdm_gossip_notification_config, cdm_gossip_notification_service) = - cdm_gossip_peers_set_config(); - net_config.add_notification_protocol(cdm_gossip_notification_config); + let (xdm_gossip_notification_config, xdm_gossip_notification_service) = + xdm_gossip_peers_set_config(); + net_config.add_notification_protocol(xdm_gossip_notification_config); let (pot_gossip_notification_config, pot_gossip_notification_service) = pot_gossip_peers_set_config(); net_config.add_notification_protocol(pot_gossip_notification_config); @@ -1068,7 +1068,7 @@ where client, select_chain, network_service, - cdm_gossip_notification_service, + xdm_gossip_notification_service, sync_service, rpc_handlers, backend, diff --git a/domains/client/cross-domain-message-gossip/src/gossip_worker.rs b/domains/client/cross-domain-message-gossip/src/gossip_worker.rs index 97d00e1543..05f9d05beb 100644 --- a/domains/client/cross-domain-message-gossip/src/gossip_worker.rs +++ b/domains/client/cross-domain-message-gossip/src/gossip_worker.rs @@ -113,7 +113,7 @@ pub struct GossipWorker { } /// Returns the network configuration for cross chain message gossip. -pub fn cdm_gossip_peers_set_config() -> (NonDefaultSetConfig, Box) { +pub fn xdm_gossip_peers_set_config() -> (NonDefaultSetConfig, Box) { let (mut cfg, notification_service) = NonDefaultSetConfig::new( PROTOCOL_NAME.into(), Vec::new(), diff --git a/domains/client/cross-domain-message-gossip/src/lib.rs b/domains/client/cross-domain-message-gossip/src/lib.rs index 4d6f6f2501..407c0b3699 100644 --- a/domains/client/cross-domain-message-gossip/src/lib.rs +++ b/domains/client/cross-domain-message-gossip/src/lib.rs @@ -4,7 +4,7 @@ mod gossip_worker; mod message_listener; pub use gossip_worker::{ - cdm_gossip_peers_set_config, ChainTxPoolMsg, ChainTxPoolSink, GossipWorker, + xdm_gossip_peers_set_config, ChainTxPoolMsg, ChainTxPoolSink, GossipWorker, GossipWorkerBuilder, Message, }; pub use message_listener::start_cross_chain_message_listener; diff --git a/test/subspace-test-service/src/lib.rs b/test/subspace-test-service/src/lib.rs index 6b6e812781..12e0a08adf 100644 --- a/test/subspace-test-service/src/lib.rs +++ b/test/subspace-test-service/src/lib.rs @@ -19,7 +19,7 @@ #![warn(missing_docs, unused_crate_dependencies)] use codec::{Decode, Encode}; -use cross_domain_message_gossip::{cdm_gossip_peers_set_config, GossipWorkerBuilder}; +use cross_domain_message_gossip::{xdm_gossip_peers_set_config, GossipWorkerBuilder}; use domain_runtime_primitives::opaque::{Block as DomainBlock, Header as DomainHeader}; use futures::channel::mpsc; use futures::{select, Future, FutureExt, StreamExt}; @@ -233,7 +233,7 @@ pub struct MockConsensusNode { /// Network service. pub network_service: Arc::Hash>>, /// Cross-domain gossip notification service. - pub cdm_gossip_notification_service: Option>, + pub xdm_gossip_notification_service: Option>, /// Sync service. pub sync_service: Arc>, /// RPC handlers. @@ -309,9 +309,9 @@ impl MockConsensusNode { let block_import = MockBlockImport::<_, _>::new(client.clone()); let mut net_config = sc_network::config::FullNetworkConfiguration::new(&config.network); - let (cdm_gossip_notification_config, cdm_gossip_notification_service) = - cdm_gossip_peers_set_config(); - net_config.add_notification_protocol(cdm_gossip_notification_config); + let (xdm_gossip_notification_config, xdm_gossip_notification_service) = + xdm_gossip_peers_set_config(); + net_config.add_notification_protocol(xdm_gossip_notification_config); let (network_service, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = sc_service::build_network(sc_service::BuildNetworkParams { @@ -359,7 +359,7 @@ impl MockConsensusNode { transaction_pool, select_chain, network_service, - cdm_gossip_notification_service: Some(cdm_gossip_notification_service), + xdm_gossip_notification_service: Some(xdm_gossip_notification_service), sync_service, rpc_handlers, network_starter: Some(network_starter), @@ -396,9 +396,9 @@ impl MockConsensusNode { .expect("gossip message worker have not started yet"); let cross_domain_message_gossip_worker = xdm_gossip_worker_builder.build::( self.network_service.clone(), - self.cdm_gossip_notification_service + self.xdm_gossip_notification_service .take() - .expect("CDM gossip notification service must be used only once"), + .expect("XDM gossip notification service must be used only once"), self.sync_service.clone(), ); self.task_manager From c98e5b417f598248107f936e09e5a09d7f93ec13 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 19 Jan 2024 13:04:49 +0200 Subject: [PATCH 2/4] Add missing `const` in `parameter_types!` macro --- crates/subspace-runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index e20f6c14d8..f0211a74c6 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -484,7 +484,7 @@ impl pallet_sudo::Config for Runtime { parameter_types! { pub const RelayConfirmationDepth: BlockNumber = 18; - pub SelfChainId: ChainId = ChainId::Consensus; + pub const SelfChainId: ChainId = ChainId::Consensus; } pub struct DomainInfo; From 1fa0e6c731cb352d8ee8ac9895318dcd61044ad6 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 19 Jan 2024 13:26:01 +0200 Subject: [PATCH 3/4] Upgrade `schnorrkel` dependency --- Cargo.lock | 351 ++++++------------- Cargo.toml | 4 + crates/pallet-offences-subspace/Cargo.toml | 2 +- crates/pallet-subspace/Cargo.toml | 2 +- crates/sc-consensus-subspace/Cargo.toml | 2 +- crates/sp-consensus-subspace/Cargo.toml | 2 +- crates/sp-lightclient/Cargo.toml | 2 +- crates/subspace-farmer-components/Cargo.toml | 2 +- crates/subspace-farmer/Cargo.toml | 4 +- crates/subspace-service/Cargo.toml | 2 +- crates/subspace-verification/Cargo.toml | 2 +- test/subspace-test-client/Cargo.toml | 2 +- 12 files changed, 130 insertions(+), 247 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7163b99ae1..6467d1c4a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,7 +59,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite 0.2.13", - "rand 0.8.5", + "rand", "sha1", "smallvec", "tokio", @@ -680,7 +680,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand 0.8.5", + "rand", "rayon", ] @@ -715,12 +715,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.4" @@ -1064,7 +1058,7 @@ dependencies = [ "getrandom 0.2.11", "instant", "pin-project-lite 0.2.13", - "rand 0.8.5", + "rand", "tokio", ] @@ -1096,8 +1090,8 @@ dependencies = [ "ark-std", "dleq_vrf", "fflonk", - "merlin 3.0.0", - "rand_chacha 0.3.1", + "merlin", + "rand_chacha", "rand_core 0.6.4", "ring 0.1.0", "sha2 0.10.8", @@ -1167,7 +1161,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" dependencies = [ "bitcoin_hashes", - "rand 0.8.5", + "rand", "rand_core 0.6.4", "serde", "unicode-normalization", @@ -1231,7 +1225,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "constant_time_eq", ] @@ -1242,7 +1236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "constant_time_eq", ] @@ -1253,7 +1247,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "cc", "cfg-if", "constant_time_eq", @@ -1261,18 +1255,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools", - "byteorder", - "generic-array 0.12.4", -] - [[package]] name = "block-buffer" version = "0.9.0" @@ -1291,15 +1273,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - [[package]] name = "block-padding" version = "0.3.3" @@ -1732,8 +1705,8 @@ dependencies = [ "ark-std", "fflonk", "getrandom_or_panic", - "merlin 3.0.0", - "rand_chacha 0.3.1", + "merlin", + "rand_chacha", ] [[package]] @@ -2150,19 +2123,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" -[[package]] -name = "curve25519-dalek" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b85542f99a2dfa2a1b8e192662741c9859a846b296bef1c92ef9b58b5a216" -dependencies = [ - "byteorder", - "digest 0.8.1", - "rand_core 0.5.1", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -2449,7 +2409,7 @@ dependencies = [ "ark-serialize", "ark-std", "ark-transcript", - "arrayvec 0.7.4", + "arrayvec", "zeroize", ] @@ -2769,7 +2729,7 @@ dependencies = [ "frame-system", "pallet-transaction-payment", "pallet-transaction-payment-rpc", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network", "sc-network-sync", @@ -3266,12 +3226,6 @@ dependencies = [ "syn 2.0.48", ] -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fallible-iterator" version = "0.2.0" @@ -3384,7 +3338,7 @@ dependencies = [ "pallet-evm", "parity-scale-codec", "prometheus", - "rand 0.8.5", + "rand", "rlp", "sc-client-api", "sc-consensus-aura", @@ -3477,7 +3431,7 @@ dependencies = [ "ark-poly", "ark-serialize", "ark-std", - "merlin 3.0.0", + "merlin", ] [[package]] @@ -3531,7 +3485,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand 0.8.5", + "rand", "rustc-hex", "static_assertions", ] @@ -3734,7 +3688,7 @@ dependencies = [ "linked-hash-map", "log", "parity-scale-codec", - "rand 0.8.5", + "rand", "rand_pcg", "sc-block-builder", "sc-cli", @@ -4204,7 +4158,7 @@ version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1015b5a70616b688dc230cfe50c8af89d972cb132d5a622814d29773b10b9" dependencies = [ - "rand 0.8.5", + "rand", "rand_core 0.6.4", ] @@ -4456,7 +4410,7 @@ dependencies = [ "idna 0.4.0", "ipnet", "once_cell", - "rand 0.8.5", + "rand", "socket2 0.5.5", "thiserror", "tinyvec", @@ -4478,7 +4432,7 @@ dependencies = [ "lru-cache", "once_cell", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "resolv-conf", "smallvec", "thiserror", @@ -4607,7 +4561,7 @@ version = "1.0.0-alpha.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6020affad7f95b46f12607a8714aa70bd02c8df3b3abf9ef5c8cd2f7ae57a033" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "bitflags 2.4.0", "derive_more", "errno", @@ -4763,7 +4717,7 @@ dependencies = [ "http", "hyper", "log", - "rand 0.8.5", + "rand", "tokio", "url", "xmltree", @@ -4853,7 +4807,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "block-padding 0.3.3", + "block-padding", "generic-array 0.14.7", ] @@ -5009,7 +4963,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" dependencies = [ "anyhow", - "arrayvec 0.7.4", + "arrayvec", "async-lock 2.8.0", "async-trait", "beef", @@ -5020,7 +4974,7 @@ dependencies = [ "hyper", "jsonrpsee-types", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rustc-hash", "serde", "serde_json", @@ -5331,7 +5285,7 @@ dependencies = [ "libp2p-swarm 0.44.0", "quick-protobuf", "quick-protobuf-codec 0.3.0", - "rand 0.8.5", + "rand", "tracing", ] @@ -5378,7 +5332,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand", "rw-stream-sink 0.3.0", "smallvec", "thiserror", @@ -5404,7 +5358,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "quick-protobuf", - "rand 0.8.5", + "rand", "rw-stream-sink 0.4.0", "serde", "smallvec", @@ -5465,7 +5419,7 @@ dependencies = [ "prometheus-client 0.22.0", "quick-protobuf", "quick-protobuf-codec 0.3.0", - "rand 0.8.5", + "rand", "regex", "serde", "sha2 0.10.8", @@ -5530,7 +5484,7 @@ dependencies = [ "multiaddr 0.17.1", "multihash 0.17.0", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "thiserror", "zeroize", @@ -5547,7 +5501,7 @@ dependencies = [ "hkdf", "multihash 0.19.1", "quick-protobuf", - "rand 0.8.5", + "rand", "serde", "sha2 0.10.8", "thiserror", @@ -5561,7 +5515,7 @@ version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39d5ef876a2b2323d63c258e63c2f8e36f205fe5a11f0b3095d59635650790ff" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "asynchronous-codec 0.6.2", "bytes", "either", @@ -5574,7 +5528,7 @@ dependencies = [ "libp2p-swarm 0.42.2", "log", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "smallvec", "thiserror", @@ -5588,7 +5542,7 @@ name = "libp2p-kad" version = "0.45.2" source = "git+https://github.com/subspace/rust-libp2p?rev=d6339da35589d86bae6ecb25a5121c02f2e5b90e#d6339da35589d86bae6ecb25a5121c02f2e5b90e" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "asynchronous-codec 0.7.0", "bytes", "either", @@ -5601,7 +5555,7 @@ dependencies = [ "libp2p-swarm 0.44.0", "quick-protobuf", "quick-protobuf-codec 0.3.0", - "rand 0.8.5", + "rand", "serde", "sha2 0.10.8", "smallvec", @@ -5624,7 +5578,7 @@ dependencies = [ "libp2p-identity 0.1.3", "libp2p-swarm 0.42.2", "log", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.9", "tokio", @@ -5644,7 +5598,7 @@ dependencies = [ "libp2p-core 0.41.1", "libp2p-identity 0.2.8", "libp2p-swarm 0.44.0", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.5.5", "tokio", @@ -5698,7 +5652,7 @@ dependencies = [ "log", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "snow", "static_assertions", @@ -5722,7 +5676,7 @@ dependencies = [ "multihash 0.19.1", "once_cell", "quick-protobuf", - "rand 0.8.5", + "rand", "sha2 0.10.8", "snow", "static_assertions", @@ -5745,7 +5699,7 @@ dependencies = [ "libp2p-core 0.39.2", "libp2p-swarm 0.42.2", "log", - "rand 0.8.5", + "rand", "void", ] @@ -5761,7 +5715,7 @@ dependencies = [ "libp2p-core 0.41.1", "libp2p-identity 0.2.8", "libp2p-swarm 0.44.0", - "rand 0.8.5", + "rand", "tracing", "void", ] @@ -5797,7 +5751,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "quinn-proto 0.9.4", - "rand 0.8.5", + "rand", "rustls 0.20.9", "thiserror", "tokio", @@ -5817,7 +5771,7 @@ dependencies = [ "libp2p-tls 0.3.0", "parking_lot 0.12.1", "quinn", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustls 0.21.8", "socket2 0.5.5", @@ -5838,7 +5792,7 @@ dependencies = [ "libp2p-core 0.39.2", "libp2p-identity 0.1.3", "libp2p-swarm 0.42.2", - "rand 0.8.5", + "rand", "smallvec", ] @@ -5855,7 +5809,7 @@ dependencies = [ "libp2p-core 0.41.1", "libp2p-identity 0.2.8", "libp2p-swarm 0.44.0", - "rand 0.8.5", + "rand", "smallvec", "tracing", "void", @@ -5876,7 +5830,7 @@ dependencies = [ "libp2p-identity 0.1.3", "libp2p-swarm-derive 0.32.0", "log", - "rand 0.8.5", + "rand", "smallvec", "tokio", "void", @@ -5898,7 +5852,7 @@ dependencies = [ "libp2p-swarm-derive 0.34.0", "multistream-select 0.13.0", "once_cell", - "rand 0.8.5", + "rand", "smallvec", "tokio", "tracing", @@ -5941,7 +5895,7 @@ dependencies = [ "libp2p-swarm 0.44.0", "libp2p-tcp 0.41.0", "libp2p-yamux 0.45.0", - "rand 0.8.5", + "rand", "tracing", ] @@ -6101,7 +6055,7 @@ dependencies = [ "libsecp256k1-core", "libsecp256k1-gen-ecmult", "libsecp256k1-gen-genmult", - "rand 0.8.5", + "rand", "serde", "sha2 0.9.9", "typenum", @@ -6460,18 +6414,6 @@ dependencies = [ "hash-db", ] -[[package]] -name = "merlin" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e261cf0f8b3c42ded9f7d2bb59dea03aa52bc8a1cbc7482f9fc3fd1229d3b42" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.5.1", - "zeroize", -] - [[package]] name = "merlin" version = "3.0.0" @@ -6533,7 +6475,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daa3eb39495d8e2e2947a1d862852c90cc6a4a8845f8b41c8829cb9fcc047f4a" dependencies = [ "arrayref", - "arrayvec 0.7.4", + "arrayvec", "bitflags 1.3.2", "blake2 0.10.6", "c2-chacha", @@ -6543,8 +6485,8 @@ dependencies = [ "lioness", "log", "parking_lot 0.12.1", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rand_distr", "subtle 2.4.1", "thiserror", @@ -6735,7 +6677,7 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bddcd3bf5144b6392de80e04c347cd7fab2508f6df16a85fc496ecd5cec39bc" dependencies = [ - "rand 0.8.5", + "rand", ] [[package]] @@ -6888,7 +6830,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "itoa", ] @@ -7355,7 +7297,7 @@ dependencies = [ "frame-system", "parity-scale-codec", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel", "sp-consensus-subspace", "sp-core", "sp-io", @@ -7423,9 +7365,9 @@ dependencies = [ "pallet-balances", "pallet-offences-subspace", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel", "serde", "sp-consensus-slots", "sp-consensus-subspace", @@ -7583,7 +7525,7 @@ dependencies = [ "lz4", "memmap2 0.5.10", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "siphasher", "snap", "winapi", @@ -7595,7 +7537,7 @@ version = "3.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" dependencies = [ - "arrayvec 0.7.4", + "arrayvec", "bitvec", "byte-slice-cast", "bytes", @@ -8241,7 +8183,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f31999cfc7927c4e212e60fd50934ab40e8e8bfd2d493d6095d2d306bc0764d9" dependencies = [ "bytes", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustc-hash", "rustls 0.20.9", @@ -8259,7 +8201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ "bytes", - "rand 0.8.5", + "rand", "ring 0.16.20", "rustc-hash", "rustls 0.21.8", @@ -8297,19 +8239,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -8317,20 +8246,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", + "rand_chacha", "rand_core 0.6.4", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -8366,16 +8285,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" dependencies = [ "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "rand", ] [[package]] @@ -8615,7 +8525,7 @@ dependencies = [ "blake2 0.10.6", "common", "fflonk", - "merlin 3.0.0", + "merlin", ] [[package]] @@ -8735,7 +8645,7 @@ dependencies = [ "libc", "num_cpus", "once_cell", - "rand 0.8.5", + "rand", "rayon", "smallvec", ] @@ -9033,7 +8943,7 @@ dependencies = [ "log", "names", "parity-scale-codec", - "rand 0.8.5", + "rand", "regex", "rpassword", "sc-client-api", @@ -9198,8 +9108,8 @@ dependencies = [ "lru 0.11.1", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rayon", "sc-client-api", "sc-consensus", @@ -9208,7 +9118,7 @@ dependencies = [ "sc-telemetry", "sc-transaction-pool-api", "sc-utils", - "schnorrkel 0.9.1", + "schnorrkel", "sp-api", "sp-block-builder", "sp-blockchain", @@ -9347,7 +9257,7 @@ version = "0.1.0-dev" source = "git+https://github.com/subspace/polkadot-sdk?rev=d6b500960579d73c43fc4ef550b703acfa61c4c8#d6b500960579d73c43fc4ef550b703acfa61c4c8" dependencies = [ "array-bytes 4.2.0", - "arrayvec 0.7.4", + "arrayvec", "blake2 0.10.6", "bytes", "futures", @@ -9393,7 +9303,7 @@ dependencies = [ "parking_lot 0.12.1", "partial_sort", "pin-project", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network-common", "sc-utils", @@ -9563,7 +9473,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "sc-client-api", "sc-network", "sc-network-common", @@ -9727,7 +9637,7 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "sc-chain-spec", "sc-client-api", "sc-client-db", @@ -9844,7 +9754,7 @@ dependencies = [ "futures", "libc", "log", - "rand 0.8.5", + "rand", "rand_pcg", "regex", "sc-telemetry", @@ -9866,7 +9776,7 @@ dependencies = [ "log", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "sc-utils", "serde", "serde_json", @@ -10018,24 +9928,6 @@ dependencies = [ "hashbrown 0.13.2", ] -[[package]] -name = "schnorrkel" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "021b403afe70d81eea68f6ea12f6b3c9588e5d536a94c3bf80f15e7faa267862" -dependencies = [ - "arrayref", - "arrayvec 0.5.2", - "curve25519-dalek 2.1.3", - "getrandom 0.1.16", - "merlin 2.0.1", - "rand 0.7.3", - "rand_core 0.5.1", - "sha2 0.8.2", - "subtle 2.4.1", - "zeroize", -] - [[package]] name = "schnorrkel" version = "0.11.4" @@ -10044,10 +9936,10 @@ checksum = "8de18f6d8ba0aad7045f5feae07ec29899c1112584a38509a84ad7b04451eaa0" dependencies = [ "aead", "arrayref", - "arrayvec 0.7.4", + "arrayvec", "curve25519-dalek 4.1.1", "getrandom_or_panic", - "merlin 3.0.0", + "merlin", "rand_core 0.6.4", "serde_bytes", "sha2 0.10.8", @@ -10271,18 +10163,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - [[package]] name = "sha2" version = "0.9.9" @@ -10473,7 +10353,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.8.5", + "rand", "sha-1", ] @@ -10686,7 +10566,7 @@ dependencies = [ "log", "parity-scale-codec", "scale-info", - "schnorrkel 0.9.1", + "schnorrkel", "sp-api", "sp-application-crypto", "sp-consensus-slots", @@ -10725,14 +10605,14 @@ dependencies = [ "itertools", "libsecp256k1", "log", - "merlin 3.0.0", + "merlin", "parity-scale-codec", "parking_lot 0.12.1", "paste", "primitive-types", - "rand 0.8.5", + "rand", "scale-info", - "schnorrkel 0.11.4", + "schnorrkel", "secp256k1", "secrecy", "serde", @@ -10833,8 +10713,8 @@ dependencies = [ "memory-db", "num-traits", "parity-scale-codec", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rs_merkle", "scale-info", "serde", @@ -10874,7 +10754,7 @@ dependencies = [ "pallet-ethereum", "pallet-evm", "parity-scale-codec", - "rand 0.8.5", + "rand", "rlp", "sc-cli", "sc-client-api", @@ -11098,7 +10978,7 @@ dependencies = [ "log", "parity-scale-codec", "paste", - "rand 0.8.5", + "rand", "scale-info", "serde", "simple-mermaid", @@ -11179,7 +11059,7 @@ dependencies = [ "log", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "smallvec", "sp-core", "sp-externalities", @@ -11201,7 +11081,7 @@ dependencies = [ "ed25519-dalek", "hkdf", "parity-scale-codec", - "rand 0.8.5", + "rand", "scale-info", "sha2 0.10.8", "sp-api", @@ -11294,7 +11174,7 @@ dependencies = [ "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "scale-info", "schnellru", "sp-core", @@ -11489,7 +11369,7 @@ version = "0.1.0" dependencies = [ "criterion", "parity-scale-codec", - "rand 0.8.5", + "rand", "rayon", "serde", "subspace-core-primitives", @@ -11518,7 +11398,7 @@ dependencies = [ "num-traits", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rand_core 0.6.4", "rayon", "rust-kzg-blst", @@ -11537,7 +11417,7 @@ version = "0.1.0" dependencies = [ "criterion", "kzg", - "rand 0.8.5", + "rand", "rust-kzg-blst", "subspace-core-primitives", ] @@ -11572,9 +11452,9 @@ dependencies = [ "parity-scale-codec", "parking_lot 0.12.1", "prometheus-client 0.22.0", - "rand 0.8.5", + "rand", "rayon", - "schnorrkel 0.9.1", + "schnorrkel", "serde", "serde_json", "ss58-registry", @@ -11614,9 +11494,9 @@ dependencies = [ "libc", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "rayon", - "schnorrkel 0.9.1", + "schnorrkel", "serde", "static_assertions", "subspace-archiving", @@ -11653,7 +11533,7 @@ dependencies = [ "pallet-sudo", "pallet-transaction-payment", "parity-scale-codec", - "rand 0.8.5", + "rand", "sc-chain-spec", "sc-cli", "sc-client-api", @@ -11730,7 +11610,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project", "prometheus-client 0.22.0", - "rand 0.8.5", + "rand", "serde", "serde_json", "subspace-core-primitives", @@ -11814,7 +11694,7 @@ dependencies = [ "chacha20", "criterion", "derive_more", - "rand 0.8.5", + "rand", "rayon", "seq-macro", "sha2 0.10.8", @@ -11829,7 +11709,7 @@ dependencies = [ "aes", "core_affinity", "criterion", - "rand 0.8.5", + "rand", "subspace-core-primitives", "thiserror", ] @@ -11951,7 +11831,7 @@ dependencies = [ "sc-tracing", "sc-transaction-pool", "sc-transaction-pool-api", - "schnorrkel 0.9.1", + "schnorrkel", "sp-api", "sp-block-builder", "sp-blockchain", @@ -11995,7 +11875,7 @@ dependencies = [ "sc-client-api", "sc-consensus-subspace", "sc-service", - "schnorrkel 0.9.1", + "schnorrkel", "sp-api", "sp-consensus-subspace", "sp-core", @@ -12072,7 +11952,7 @@ dependencies = [ "pallet-domains", "parity-scale-codec", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "sc-block-builder", "sc-client-api", "sc-consensus", @@ -12112,7 +11992,7 @@ name = "subspace-verification" version = "0.1.0" dependencies = [ "parity-scale-codec", - "schnorrkel 0.9.1", + "schnorrkel", "sp-arithmetic", "subspace-archiving", "subspace-core-primitives", @@ -12122,13 +12002,12 @@ dependencies = [ [[package]] name = "substrate-bip39" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49eee6965196b32f882dd2ee85a92b1dbead41b04e53907f269de3b0dc04733c" +version = "0.4.5" +source = "git+https://github.com/paritytech/substrate-bip39?rev=03f02a7225d9bc5add92b7657790ee1ac8ab90a4#03f02a7225d9bc5add92b7657790ee1ac8ab90a4" dependencies = [ "hmac 0.11.0", "pbkdf2", - "schnorrkel 0.9.1", + "schnorrkel", "sha2 0.9.9", "zeroize", ] @@ -12812,7 +12691,7 @@ dependencies = [ "idna 0.2.3", "ipnet", "lazy_static", - "rand 0.8.5", + "rand", "smallvec", "socket2 0.4.9", "thiserror", @@ -12862,7 +12741,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -12896,7 +12775,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e37c4b6cbcc59a8dcd09a6429fbc7890286bcbb79215cea7b38a3c4c0921d93" dependencies = [ - "rand 0.8.5", + "rand", "serde", ] @@ -13039,8 +12918,8 @@ dependencies = [ "arrayref", "constcat", "digest 0.10.7", - "rand 0.8.5", - "rand_chacha 0.3.1", + "rand", + "rand_chacha", "rand_core 0.6.4", "sha2 0.10.8", "sha3", @@ -13400,7 +13279,7 @@ dependencies = [ "memfd", "memoffset 0.8.0", "paste", - "rand 0.8.5", + "rand", "rustix 0.36.15", "wasmtime-asm-macros", "wasmtime-environ", @@ -13869,7 +13748,7 @@ dependencies = [ "log", "nohash-hasher", "parking_lot 0.12.1", - "rand 0.8.5", + "rand", "static_assertions", ] @@ -13884,7 +13763,7 @@ dependencies = [ "nohash-hasher", "parking_lot 0.12.1", "pin-project", - "rand 0.8.5", + "rand", "static_assertions", ] diff --git a/Cargo.toml b/Cargo.toml index f2cae873be..2865c64534 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,6 +89,10 @@ panic = "unwind" inherits = "release" lto = "fat" +[patch.crates-io] +# TODO: Switch to stable release once https://github.com/paritytech/substrate-bip39/pull/20 is published +substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39", rev = "03f02a7225d9bc5add92b7657790ee1ac8ab90a4" } + # Reason: We need to patch substrate dependency of frontier to our fork # TODO: Remove if/when we are using upstream substrate instead of fork [patch."https://github.com/paritytech/polkadot-sdk.git"] diff --git a/crates/pallet-offences-subspace/Cargo.toml b/crates/pallet-offences-subspace/Cargo.toml index 73da917d77..41bd5f7ec5 100644 --- a/crates/pallet-offences-subspace/Cargo.toml +++ b/crates/pallet-offences-subspace/Cargo.toml @@ -24,7 +24,7 @@ sp-std = { version = "8.0.0", default-features = false, git = "https://github.co [dev-dependencies] sp-io = { version = "23.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-core = { version = "21.0.0", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } -schnorrkel = "0.9.1" +schnorrkel = "0.11.4" [features] default = ["std"] diff --git a/crates/pallet-subspace/Cargo.toml b/crates/pallet-subspace/Cargo.toml index 9e24a571aa..440be81c4e 100644 --- a/crates/pallet-subspace/Cargo.toml +++ b/crates/pallet-subspace/Cargo.toml @@ -19,7 +19,7 @@ frame-support = { version = "4.0.0-dev", default-features = false, git = "https: frame-system = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } +schnorrkel = { version = "0.11.4", default-features = false } serde = { version = "1.0.195", optional = true, default-features = false, features = ["derive"] } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/crates/sc-consensus-subspace/Cargo.toml b/crates/sc-consensus-subspace/Cargo.toml index 0776d08faf..098a70197f 100644 --- a/crates/sc-consensus-subspace/Cargo.toml +++ b/crates/sc-consensus-subspace/Cargo.toml @@ -21,7 +21,7 @@ parking_lot = "0.12.1" rand = "0.8.5" rand_chacha = "0.3.1" rayon = "1.8.0" -schnorrkel = "0.9.1" +schnorrkel = "0.11.4" sc-client-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus = { version = "0.10.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" } diff --git a/crates/sp-consensus-subspace/Cargo.toml b/crates/sp-consensus-subspace/Cargo.toml index a654d233a8..71f168ac53 100644 --- a/crates/sp-consensus-subspace/Cargo.toml +++ b/crates/sp-consensus-subspace/Cargo.toml @@ -17,7 +17,7 @@ async-trait = { version = "0.1.73", optional = true } codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false } log = { version = "0.4.20", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } +schnorrkel = { version = "0.11.4", default-features = false } sp-api = { version = "4.0.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-application-crypto = { version = "23.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/crates/sp-lightclient/Cargo.toml b/crates/sp-lightclient/Cargo.toml index f0f1ba4700..2c2edae236 100644 --- a/crates/sp-lightclient/Cargo.toml +++ b/crates/sp-lightclient/Cargo.toml @@ -18,7 +18,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.1.2", default-features = false } scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } -schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } +schnorrkel = { version = "0.11.4", default-features = false } sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-slots = { version = "0.10.0-dev", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace", default-features = false } diff --git a/crates/subspace-farmer-components/Cargo.toml b/crates/subspace-farmer-components/Cargo.toml index 673fcd3023..798a80b11f 100644 --- a/crates/subspace-farmer-components/Cargo.toml +++ b/crates/subspace-farmer-components/Cargo.toml @@ -27,7 +27,7 @@ libc = "0.2.146" parity-scale-codec = "3.6.5" rand = "0.8.5" rayon = "1.8.0" -schnorrkel = "0.9.1" +schnorrkel = "0.11.4" serde = { version = "1.0.195", features = ["derive"] } static_assertions = "1.1.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } diff --git a/crates/subspace-farmer/Cargo.toml b/crates/subspace-farmer/Cargo.toml index 41e631b409..6c3b797b89 100644 --- a/crates/subspace-farmer/Cargo.toml +++ b/crates/subspace-farmer/Cargo.toml @@ -39,7 +39,7 @@ parking_lot = "0.12.1" prometheus-client = "0.22.0" rand = "0.8.5" rayon = "1.8.0" -schnorrkel = "0.9.1" +schnorrkel = "0.11.4" serde = { version = "1.0.195", features = ["derive"] } serde_json = "1.0.111" static_assertions = "1.1.0" @@ -52,7 +52,7 @@ subspace-metrics = { version = "0.1.0", path = "../../shared/subspace-metrics" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } subspace-rpc-primitives = { version = "0.1.0", path = "../subspace-rpc-primitives" } -substrate-bip39 = "0.4.4" +substrate-bip39 = "0.4.5" supports-color = "2.0.0" tempfile = "3.8.0" thiserror = "1.0.48" diff --git a/crates/subspace-service/Cargo.toml b/crates/subspace-service/Cargo.toml index 0fc87c7127..a04fce07f7 100644 --- a/crates/subspace-service/Cargo.toml +++ b/crates/subspace-service/Cargo.toml @@ -49,7 +49,7 @@ sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/subspace/polka sc-tracing = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-transaction-pool = { 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" } -schnorrkel = "0.9.1" +schnorrkel = "0.11.4" sp-api = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } diff --git a/crates/subspace-verification/Cargo.toml b/crates/subspace-verification/Cargo.toml index 66060a7902..cbd6a2d94e 100644 --- a/crates/subspace-verification/Cargo.toml +++ b/crates/subspace-verification/Cargo.toml @@ -17,7 +17,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false } -schnorrkel = { version = "0.9.1", default-features = false, features = ["u64_backend"] } +schnorrkel = { version = "0.11.4", default-features = false } sp-arithmetic = { version = "16.0.0", default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } subspace-archiving = { version = "0.1.0", path = "../subspace-archiving", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } diff --git a/test/subspace-test-client/Cargo.toml b/test/subspace-test-client/Cargo.toml index 91f9ed8b8e..6b320b76fb 100644 --- a/test/subspace-test-client/Cargo.toml +++ b/test/subspace-test-client/Cargo.toml @@ -19,7 +19,7 @@ codec = { package = "parity-scale-codec", version = "3.6.5", features = ["derive evm-domain-test-runtime = { version = "0.1.0", path = "../../domains/test/runtime/evm" } fp-evm = { version = "3.0.0-dev", git = "https://github.com/subspace/frontier", rev = "7627e61d80275a4cf24d06f27491f6c31eadb7b7" } futures = "0.3.29" -schnorrkel = "0.9.1" +schnorrkel = "0.11.4" sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "d6b500960579d73c43fc4ef550b703acfa61c4c8" } sc-consensus-subspace = { version = "0.1.0", path = "../../crates/sc-consensus-subspace" } From 4fa3e671538b6ddd7a3687c949d5afaec3c33b70 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 19 Jan 2024 13:32:38 +0200 Subject: [PATCH 4/4] Use improved traits of `Slot` data structure --- crates/sc-consensus-subspace/src/slot_worker.rs | 2 +- crates/sc-proof-of-time/src/source/gossip.rs | 2 +- crates/subspace-service/src/lib.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/sc-consensus-subspace/src/slot_worker.rs b/crates/sc-consensus-subspace/src/slot_worker.rs index 5ed6a6960e..ae9e699a62 100644 --- a/crates/sc-consensus-subspace/src/slot_worker.rs +++ b/crates/sc-consensus-subspace/src/slot_worker.rs @@ -417,7 +417,7 @@ where // Ensure proof of time is valid according to parent block if !self.pot_verifier.is_output_valid( pot_input, - Slot::from(u64::from(slot) - u64::from(parent_slot)), + slot - parent_slot, proof_of_time, parent_pot_parameters.next_parameters_change(), ) { diff --git a/crates/sc-proof-of-time/src/source/gossip.rs b/crates/sc-proof-of-time/src/source/gossip.rs index a811ba219e..1000bdd1a4 100644 --- a/crates/sc-proof-of-time/src/source/gossip.rs +++ b/crates/sc-proof-of-time/src/source/gossip.rs @@ -580,7 +580,7 @@ where match GossipProof::decode(&mut data) { Ok(proof) => { let next_slot_input = self.state.next_slot_input(atomic::Ordering::Relaxed); - let current_slot = Slot::from(u64::from(next_slot_input.slot) - 1); + let current_slot = next_slot_input.slot - Slot::from(1); if proof.slot < current_slot { trace!( diff --git a/crates/subspace-service/src/lib.rs b/crates/subspace-service/src/lib.rs index b136154271..4986208067 100644 --- a/crates/subspace-service/src/lib.rs +++ b/crates/subspace-service/src/lib.rs @@ -341,14 +341,14 @@ where if quick_verification { pot_verifier.try_is_output_valid( pot_input, - Slot::from(slot - u64::from(parent_slot)), + Slot::from(slot) - parent_slot, proof_of_time, pot_parameters.next_parameters_change(), ) } else { pot_verifier.is_output_valid( pot_input, - Slot::from(slot - u64::from(parent_slot)), + Slot::from(slot) - parent_slot, proof_of_time, pot_parameters.next_parameters_change(), )