From 66592fb191905ed660b070ba254bb6a19fcc9810 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 5 Apr 2024 15:11:37 +0300 Subject: [PATCH 1/3] Update jsonrpsee on farmer --- Cargo.lock | 204 ++++++++---------- crates/subspace-farmer/Cargo.toml | 2 +- .../src/node_client/node_rpc_client.rs | 5 +- 3 files changed, 98 insertions(+), 113 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2e5b79c2de..1933f485e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2721,7 +2721,7 @@ dependencies = [ "fc-storage", "fp-rpc", "futures", - "jsonrpsee 0.22.3", + "jsonrpsee", "pallet-transaction-payment-rpc", "parity-scale-codec", "sc-client-api", @@ -2793,7 +2793,7 @@ dependencies = [ "domain-runtime-primitives", "frame-benchmarking", "futures", - "jsonrpsee 0.22.3", + "jsonrpsee", "log", "pallet-transaction-payment-rpc", "parity-scale-codec", @@ -3515,7 +3515,7 @@ dependencies = [ "fp-storage", "futures", "hex", - "jsonrpsee 0.22.3", + "jsonrpsee", "libsecp256k1", "log", "pallet-evm", @@ -3560,7 +3560,7 @@ source = "git+https://github.com/subspace/frontier?rev=0ebacb57f0a52ca053ba0bcce dependencies = [ "ethereum", "ethereum-types", - "jsonrpsee 0.22.3", + "jsonrpsee", "rlp", "rustc-hex", "serde", @@ -4403,14 +4403,15 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "gloo-net" -version = "0.2.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9902a044653b26b99f7e3693a42f171312d9be8b26b5697bd1e43ad1f8a35e10" +checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" dependencies = [ "futures-channel", "futures-core", "futures-sink", "gloo-utils", + "http 0.2.11", "js-sys", "pin-project", "serde", @@ -4435,9 +4436,9 @@ dependencies = [ [[package]] name = "gloo-utils" -version = "0.1.7" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" dependencies = [ "js-sys", "serde", @@ -4856,10 +4857,9 @@ dependencies = [ "hyper", "log", "rustls 0.21.10", - "rustls-native-certs", + "rustls-native-certs 0.6.3", "tokio", - "tokio-rustls", - "webpki-roots 0.25.3", + "tokio-rustls 0.24.1", ] [[package]] @@ -5156,81 +5156,46 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonrpsee" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "367a292944c07385839818bb71c8d76611138e2dedb0677d035b8da21d29c78b" -dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core 0.16.3", - "jsonrpsee-http-client", - "jsonrpsee-types 0.16.3", - "jsonrpsee-wasm-client", - "jsonrpsee-ws-client", -] - [[package]] name = "jsonrpsee" version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cdbb7cb6f3ba28f5b212dd250ab4483105efc3e381f5c8bb90340f14f0a2cc3" dependencies = [ - "jsonrpsee-core 0.22.3", + "jsonrpsee-client-transport", + "jsonrpsee-core", + "jsonrpsee-http-client", "jsonrpsee-proc-macros", "jsonrpsee-server", - "jsonrpsee-types 0.22.3", + "jsonrpsee-types", + "jsonrpsee-wasm-client", + "jsonrpsee-ws-client", "tokio", "tracing", ] [[package]] name = "jsonrpsee-client-transport" -version = "0.16.3" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b3815d9f5d5de348e5f162b316dc9cdf4548305ebb15b4eb9328e66cf27d7a" +checksum = "9ab2e14e727d2faf388c99d9ca5210566ed3b044f07d92c29c3611718d178380" dependencies = [ - "anyhow", "futures-channel", - "futures-timer", "futures-util", "gloo-net", "http 0.2.11", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", + "jsonrpsee-core", "pin-project", - "rustls-native-certs", + "rustls-native-certs 0.7.0", + "rustls-pki-types", "soketto", "thiserror", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tokio-util", "tracing", - "webpki-roots 0.25.3", -] - -[[package]] -name = "jsonrpsee-core" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5dde66c53d6dcdc8caea1874a45632ec0fcf5b437789f1e45766a1512ce803" -dependencies = [ - "anyhow", - "async-lock 2.8.0", - "async-trait", - "beef", - "futures-channel", - "futures-timer", - "futures-util", - "hyper", - "jsonrpsee-types 0.16.3", - "rustc-hash", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "wasm-bindgen-futures", + "url", + "webpki-roots 0.26.1", ] [[package]] @@ -5240,38 +5205,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71962a1c49af43adf81d337e4ebc93f3c915faf6eccaa14d74e255107dfd7723" dependencies = [ "anyhow", + "async-lock 3.3.0", "async-trait", "beef", + "futures-timer", "futures-util", "hyper", - "jsonrpsee-types 0.22.3", + "jsonrpsee-types", "parking_lot 0.12.1", + "pin-project", "rand", "rustc-hash", "serde", "serde_json", "thiserror", "tokio", + "tokio-stream", "tracing", + "wasm-bindgen-futures", ] [[package]] name = "jsonrpsee-http-client" -version = "0.16.3" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5f9fabdd5d79344728521bb65e3106b49ec405a78b66fbff073b72b389fa43" +checksum = "8c13987da51270bda2c1c9b40c19be0fe9b225c7a0553963d8f17e683a50ce84" dependencies = [ "async-trait", "hyper", "hyper-rustls", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", - "rustc-hash", + "jsonrpsee-core", + "jsonrpsee-types", "serde", "serde_json", "thiserror", "tokio", + "tower", "tracing", + "url", ] [[package]] @@ -5296,8 +5267,8 @@ dependencies = [ "futures-util", "http 0.2.11", "hyper", - "jsonrpsee-core 0.22.3", - "jsonrpsee-types 0.22.3", + "jsonrpsee-core", + "jsonrpsee-types", "pin-project", "route-recognizer", "serde", @@ -5311,20 +5282,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "jsonrpsee-types" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" -dependencies = [ - "anyhow", - "beef", - "serde", - "serde_json", - "thiserror", - "tracing", -] - [[package]] name = "jsonrpsee-types" version = "0.22.3" @@ -5340,25 +5297,26 @@ dependencies = [ [[package]] name = "jsonrpsee-wasm-client" -version = "0.16.3" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e5df77c8f625d36e4cfb583c5a674eccebe32403fcfe42f7ceff7fac9324dd" +checksum = "8ae2c3f2411052b4a831cb7a34cd1498e0d8b9309bd49fca67567634ff64023d" dependencies = [ "jsonrpsee-client-transport", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", + "jsonrpsee-core", + "jsonrpsee-types", ] [[package]] name = "jsonrpsee-ws-client" -version = "0.16.3" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e1b3975ed5d73f456478681a417128597acd6a2487855fdb7b4a3d4d195bf5e" +checksum = "c8a07ab8da9a283b906f6735ddd17d3680158bb72259e853441d1dd0167079ec" dependencies = [ "http 0.2.11", "jsonrpsee-client-transport", - "jsonrpsee-core 0.16.3", - "jsonrpsee-types 0.16.3", + "jsonrpsee-core", + "jsonrpsee-types", + "url", ] [[package]] @@ -6819,7 +6777,7 @@ name = "mmr-rpc" version = "28.0.0" source = "git+https://github.com/subspace/polkadot-sdk?rev=447bbc765020674614e9ac982163f7e11e5b03ea#447bbc765020674614e9ac982163f7e11e5b03ea" dependencies = [ - "jsonrpsee 0.22.3", + "jsonrpsee", "parity-scale-codec", "serde", "sp-api", @@ -7816,7 +7774,7 @@ name = "pallet-transaction-payment-rpc" version = "30.0.0" source = "git+https://github.com/subspace/polkadot-sdk?rev=447bbc765020674614e9ac982163f7e11e5b03ea#447bbc765020674614e9ac982163f7e11e5b03ea" dependencies = [ - "jsonrpsee 0.22.3", + "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "sp-api", @@ -9255,7 +9213,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.1.1", + "rustls-pki-types", "schannel", "security-framework", ] @@ -9269,6 +9240,16 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f48172685e6ff52a556baa527774f61fcaa884f59daf3375c62a3f1cd2549dab" +dependencies = [ + "base64 0.21.7", + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.3.1" @@ -9651,7 +9632,7 @@ dependencies = [ "async-oneshot", "futures", "futures-timer", - "jsonrpsee 0.22.3", + "jsonrpsee", "lru 0.12.1", "parity-scale-codec", "parking_lot 0.12.1", @@ -10060,7 +10041,7 @@ version = "29.0.0" source = "git+https://github.com/subspace/polkadot-sdk?rev=447bbc765020674614e9ac982163f7e11e5b03ea#447bbc765020674614e9ac982163f7e11e5b03ea" dependencies = [ "futures", - "jsonrpsee 0.22.3", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -10091,7 +10072,7 @@ name = "sc-rpc-api" version = "0.33.0" source = "git+https://github.com/subspace/polkadot-sdk?rev=447bbc765020674614e9ac982163f7e11e5b03ea#447bbc765020674614e9ac982163f7e11e5b03ea" dependencies = [ - "jsonrpsee 0.22.3", + "jsonrpsee", "parity-scale-codec", "sc-chain-spec", "sc-mixnet", @@ -10115,7 +10096,7 @@ dependencies = [ "governor", "http 0.2.11", "hyper", - "jsonrpsee 0.22.3", + "jsonrpsee", "log", "pin-project", "serde_json", @@ -10134,7 +10115,7 @@ dependencies = [ "futures", "futures-util", "hex", - "jsonrpsee 0.22.3", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -10166,7 +10147,7 @@ dependencies = [ "exit-future", "futures", "futures-timer", - "jsonrpsee 0.22.3", + "jsonrpsee", "log", "parity-scale-codec", "parking_lot 0.12.1", @@ -12048,7 +12029,7 @@ dependencies = [ "futures", "hex", "hwlocality", - "jsonrpsee 0.16.3", + "jsonrpsee", "libmimalloc-sys", "lru 0.12.1", "mimalloc", @@ -12414,7 +12395,7 @@ dependencies = [ "frame-system-rpc-runtime-api", "futures", "hex", - "jsonrpsee 0.22.3", + "jsonrpsee", "mmr-gadget", "mmr-rpc", "pallet-transaction-payment-rpc", @@ -12582,7 +12563,7 @@ dependencies = [ "domain-runtime-primitives", "frame-system", "futures", - "jsonrpsee 0.22.3", + "jsonrpsee", "mmr-gadget", "pallet-domains", "pallet-transaction-payment", @@ -12669,7 +12650,7 @@ source = "git+https://github.com/subspace/polkadot-sdk?rev=447bbc765020674614e9a dependencies = [ "frame-system-rpc-runtime-api", "futures", - "jsonrpsee 0.22.3", + "jsonrpsee", "log", "parity-scale-codec", "sc-rpc-api", @@ -13052,6 +13033,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.2", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.15" @@ -13971,12 +13963,6 @@ dependencies = [ "webpki", ] -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - [[package]] name = "webpki-roots" version = "0.26.1" diff --git a/crates/subspace-farmer/Cargo.toml b/crates/subspace-farmer/Cargo.toml index 2c8085146f..7487095002 100644 --- a/crates/subspace-farmer/Cargo.toml +++ b/crates/subspace-farmer/Cargo.toml @@ -30,7 +30,7 @@ fs4 = "0.8.0" futures = "0.3.29" hex = { version = "0.4.3", features = ["serde"] } hwlocality = { version = "1.0.0-alpha.3", features = ["vendored"], optional = true } -jsonrpsee = { version = "0.16.3", features = ["client"] } +jsonrpsee = { version = "0.22.3", features = ["client"] } lru = "0.12.1" mimalloc = "0.1.39" libmimalloc-sys = "0.1.35" diff --git a/crates/subspace-farmer/src/node_client/node_rpc_client.rs b/crates/subspace-farmer/src/node_client/node_rpc_client.rs index 684cf1101e..2b47838979 100644 --- a/crates/subspace-farmer/src/node_client/node_rpc_client.rs +++ b/crates/subspace-farmer/src/node_client/node_rpc_client.rs @@ -1,8 +1,7 @@ use crate::node_client::{Error as RpcError, Error, NodeClient, NodeClientExt}; use async_trait::async_trait; use futures::{Stream, StreamExt}; -use jsonrpsee::core::client::{ClientT, SubscriptionClientT}; -use jsonrpsee::core::Error as JsonError; +use jsonrpsee::core::client::{ClientT, Error as JsonError, SubscriptionClientT}; use jsonrpsee::rpc_params; use jsonrpsee::ws_client::{WsClient, WsClientBuilder}; use std::pin::Pin; @@ -32,7 +31,7 @@ impl NodeRpcClient { let client = Arc::new( WsClientBuilder::default() .max_concurrent_requests(RPC_MAX_CONCURRENT_REQUESTS) - .max_request_body_size(20 * 1024 * 1024) + .max_request_size(20 * 1024 * 1024) .build(url) .await?, ); From 8ec3cc4bb59912c3499d2f9c7c3b436d9cdf1c54 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 5 Apr 2024 15:37:26 +0300 Subject: [PATCH 2/3] Update various dependencies to latest versions --- Cargo.lock | 286 ++++++++++++------ crates/pallet-domains/Cargo.toml | 2 +- crates/pallet-feeds/Cargo.toml | 2 +- .../Cargo.toml | 6 +- crates/pallet-object-store/Cargo.toml | 2 +- crates/pallet-offences-subspace/Cargo.toml | 2 +- crates/pallet-rewards/Cargo.toml | 2 +- crates/pallet-runtime-configs/Cargo.toml | 2 +- crates/pallet-subspace-mmr/Cargo.toml | 2 +- crates/pallet-subspace/Cargo.toml | 4 +- crates/pallet-transaction-fees/Cargo.toml | 2 +- crates/sc-consensus-subspace-rpc/Cargo.toml | 4 +- crates/sc-consensus-subspace/Cargo.toml | 8 +- crates/sc-proof-of-time/Cargo.toml | 4 +- crates/sc-subspace-block-relay/Cargo.toml | 6 +- crates/sp-consensus-subspace/Cargo.toml | 6 +- crates/sp-domains-fraud-proof/Cargo.toml | 6 +- crates/sp-domains/Cargo.toml | 4 +- crates/sp-lightclient/Cargo.toml | 2 +- crates/sp-subspace-mmr/Cargo.toml | 2 +- crates/subspace-archiving/Cargo.toml | 4 +- crates/subspace-core-primitives/Cargo.toml | 8 +- crates/subspace-farmer-components/Cargo.toml | 8 +- crates/subspace-farmer/Cargo.toml | 26 +- crates/subspace-malicious-operator/Cargo.toml | 2 +- crates/subspace-networking/Cargo.toml | 16 +- crates/subspace-node/Cargo.toml | 8 +- crates/subspace-proof-of-space/Cargo.toml | 4 +- crates/subspace-proof-of-time/Cargo.toml | 4 +- crates/subspace-runtime/Cargo.toml | 2 +- crates/subspace-service/Cargo.toml | 6 +- crates/subspace-verification/Cargo.toml | 2 +- .../client/consensus-relay-chain/Cargo.toml | 2 +- domains/client/domain-operator/Cargo.toml | 4 +- domains/pallets/auto-id/Cargo.toml | 2 +- domains/pallets/block-fees/Cargo.toml | 2 +- domains/pallets/domain-id/Cargo.toml | 2 +- domains/pallets/executive/Cargo.toml | 2 +- domains/pallets/messenger/Cargo.toml | 2 +- domains/pallets/transporter/Cargo.toml | 2 +- domains/primitives/auto-id/Cargo.toml | 2 +- domains/primitives/block-fees/Cargo.toml | 2 +- domains/primitives/executive/Cargo.toml | 2 +- .../messenger-host-functions/Cargo.toml | 2 +- domains/primitives/messenger/Cargo.toml | 4 +- domains/primitives/runtime/Cargo.toml | 2 +- domains/runtime/auto-id/Cargo.toml | 2 +- domains/runtime/evm/Cargo.toml | 2 +- domains/service/Cargo.toml | 2 +- domains/test/runtime/evm/Cargo.toml | 2 +- shared/subspace-metrics/Cargo.toml | 2 +- test/subspace-test-runtime/Cargo.toml | 2 +- test/subspace-test-service/Cargo.toml | 2 +- 53 files changed, 291 insertions(+), 199 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1933f485e4..d6e55b920e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -227,9 +227,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher 0.4.4", @@ -350,9 +350,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -384,9 +384,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "approx" @@ -813,13 +813,13 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 4.0.3", - "event-listener-strategy", + "event-listener 5.2.0", + "event-listener-strategy 0.5.1", "futures-core", "pin-project-lite 0.2.13", ] @@ -856,7 +856,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.1.1", + "async-channel 2.2.0", "async-executor", "async-io 2.3.0", "async-lock 3.3.0", @@ -898,7 +898,7 @@ dependencies = [ "futures-lite 2.2.0", "parking", "polling 3.3.2", - "rustix 0.38.30", + "rustix 0.38.32", "slab", "tracing", "windows-sys 0.52.0", @@ -920,7 +920,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", - "event-listener-strategy", + "event-listener-strategy 0.4.0", "pin-project-lite 0.2.13", ] @@ -966,7 +966,7 @@ dependencies = [ "cfg-if", "event-listener 3.1.0", "futures-lite 1.13.0", - "rustix 0.38.30", + "rustix 0.38.32", "windows-sys 0.48.0", ] @@ -982,7 +982,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 0.38.30", + "rustix 0.38.32", "signal-hook-registry", "slab", "windows-sys 0.48.0", @@ -1022,9 +1022,9 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", @@ -1359,9 +1359,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", @@ -1404,7 +1404,7 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel 2.1.1", + "async-channel 2.2.0", "async-lock 3.3.0", "async-task", "fastrand 2.0.1", @@ -1514,9 +1514,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" dependencies = [ "serde", ] @@ -2964,9 +2964,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f628eaec48bfd21b865dc2950cfa014450c01d2fa2b69a86c2fd5844ec523c0" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek 4.1.2", "ed25519", @@ -2993,9 +2993,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" [[package]] name = "elliptic-curve" @@ -3075,6 +3075,16 @@ dependencies = [ "syn 2.0.58", ] +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" version = "0.10.2" @@ -3088,6 +3098,19 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "humantime", + "log", +] + [[package]] name = "environmental" version = "1.1.4" @@ -3219,6 +3242,16 @@ dependencies = [ "pin-project-lite 0.2.13", ] +[[package]] +name = "event-listener-strategy" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" +dependencies = [ + "event-listener 5.2.0", + "pin-project-lite 0.2.13", +] + [[package]] name = "evm" version = "0.41.1" @@ -3631,7 +3664,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger", + "env_logger 0.10.2", "log", ] @@ -4094,17 +4127,17 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.30", + "rustix 0.38.32", "windows-sys 0.48.0", ] [[package]] name = "fs4" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d15c33be2d8e5bc0e6229c8c20905d69d6074c92c64c9b3485560b6d6dc1b68" +checksum = "21dabded2e32cd57ded879041205c60a4a4c4bab47bd0fd2fa8b01f30849f02b" dependencies = [ - "rustix 0.38.30", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -4350,8 +4383,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -5113,15 +5148,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" dependencies = [ "hermit-abi", - "rustix 0.38.30", + "rustix 0.38.32", "windows-sys 0.52.0", ] [[package]] name = "is_ci" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" [[package]] name = "itertools" @@ -5398,9 +5433,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.152" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" @@ -5665,7 +5700,7 @@ dependencies = [ "libp2p-core 0.41.2", "libp2p-identity 0.2.8", "libp2p-swarm 0.44.1", - "prometheus-client 0.22.0", + "prometheus-client 0.22.2", "quick-protobuf", "quick-protobuf-codec 0.3.1", "rand", @@ -5713,7 +5748,7 @@ dependencies = [ "libp2p-core 0.41.2", "libp2p-identity 0.2.8", "libp2p-swarm 0.44.1", - "lru 0.12.1", + "lru 0.12.3", "quick-protobuf", "quick-protobuf-codec 0.3.1", "smallvec", @@ -5889,7 +5924,7 @@ dependencies = [ "libp2p-ping 0.44.0", "libp2p-swarm 0.44.1", "pin-project", - "prometheus-client 0.22.0", + "prometheus-client 0.22.2", ] [[package]] @@ -6490,9 +6525,9 @@ dependencies = [ [[package]] name = "lru" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ "hashbrown 0.14.3", ] @@ -6635,7 +6670,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.30", + "rustix 0.38.32", ] [[package]] @@ -6649,9 +6684,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -7182,9 +7217,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", "libm", @@ -7663,7 +7698,7 @@ dependencies = [ name = "pallet-subspace" version = "0.1.0" dependencies = [ - "env_logger", + "env_logger 0.11.3", "frame-benchmarking", "frame-support", "frame-system", @@ -7952,6 +7987,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7924d1d0ad836f665c9065e26d016c673ece3993f30d340068b16f282afc1156" +[[package]] +name = "password-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle 2.5.0", +] + [[package]] name = "paste" version = "1.0.14" @@ -7967,6 +8013,16 @@ dependencies = [ "crypto-mac 0.11.0", ] +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "password-hash", +] + [[package]] name = "pem" version = "1.1.1" @@ -8049,18 +8105,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", @@ -8223,7 +8279,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite 0.2.13", - "rustix 0.38.30", + "rustix 0.38.32", "tracing", "windows-sys 0.52.0", ] @@ -8423,9 +8479,9 @@ dependencies = [ [[package]] name = "prometheus-client" -version = "0.22.0" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510c4f1c9d81d556458f94c98f857748130ea9737bbd6053da497503b26ea63c" +checksum = "c1ca959da22a332509f2a73ae9e5f23f9dcfc31fd3a54d71f159495bd5909baa" dependencies = [ "dtoa", "itoa", @@ -8766,9 +8822,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -9157,9 +9213,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.30" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ "bitflags 2.4.2", "errno", @@ -9385,7 +9441,7 @@ dependencies = [ "array-bytes 6.2.2", "docify", "log", - "memmap2 0.9.3", + "memmap2 0.9.4", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", @@ -9592,7 +9648,7 @@ version = "0.1.0" dependencies = [ "async-trait", "futures", - "lru 0.12.1", + "lru 0.12.3", "parity-scale-codec", "parking_lot 0.12.1", "rand", @@ -9633,7 +9689,7 @@ dependencies = [ "futures", "futures-timer", "jsonrpsee", - "lru 0.12.1", + "lru 0.12.3", "parity-scale-codec", "parking_lot 0.12.1", "sc-client-api", @@ -10004,7 +10060,7 @@ dependencies = [ "core_affinity", "derive_more", "futures", - "lru 0.12.1", + "lru 0.12.3", "parity-scale-codec", "parking_lot 0.12.1", "rayon", @@ -10242,7 +10298,7 @@ dependencies = [ "sp-api", "sp-consensus-subspace", "sp-runtime", - "strum_macros 0.25.3", + "strum_macros 0.26.2", "substrate-prometheus-endpoint", "thiserror", "tracing", @@ -10393,9 +10449,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "788745a868b0e751750388f4e6546eb921ef714a4317fa6954f7cde114eb2eb7" dependencies = [ "bitvec", "cfg-if", @@ -10407,9 +10463,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "7dc2f4e8bc344b9fc3d5f74f72c2e55bfc38d28dc2ebc69c194a3df424e4d9ac" dependencies = [ "proc-macro-crate 1.1.3", "proc-macro2", @@ -11139,7 +11195,7 @@ dependencies = [ "sp-std", "sp-storage", "ss58-registry", - "substrate-bip39", + "substrate-bip39 0.4.6", "thiserror", "tracing", "w3f-bls", @@ -11848,9 +11904,9 @@ dependencies = [ [[package]] name = "ss58-registry" -version = "1.45.0" +version = "1.47.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0c74081753a8ce1c8eb10b9f262ab6f7017e5ad3317c17a54c7ab65fcb3c6e" +checksum = "4743ce898933fbff7bbf414f497c459a782d496269644b3d650a398ae6a487ba" dependencies = [ "Inflector", "num-format", @@ -11948,6 +12004,19 @@ dependencies = [ "syn 2.0.58", ] +[[package]] +name = "strum_macros" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.58", +] + [[package]] name = "subspace-archiving" version = "0.1.0" @@ -12025,18 +12094,18 @@ dependencies = [ "event-listener 5.2.0", "event-listener-primitives", "fdlimit", - "fs4 0.8.0", + "fs4 0.8.2", "futures", "hex", "hwlocality", "jsonrpsee", "libmimalloc-sys", - "lru 0.12.1", + "lru 0.12.3", "mimalloc", "num_cpus", "parity-scale-codec", "parking_lot 0.12.1", - "prometheus-client 0.22.0", + "prometheus-client 0.22.2", "rand", "rayon", "schnorrkel", @@ -12052,7 +12121,7 @@ dependencies = [ "subspace-networking", "subspace-proof-of-space", "subspace-rpc-primitives", - "substrate-bip39", + "substrate-bip39 0.5.0", "supports-color", "tempfile", "thiserror", @@ -12164,7 +12233,7 @@ version = "0.1.0" dependencies = [ "actix-web", "prometheus", - "prometheus-client 0.22.0", + "prometheus-client 0.22.2", "tracing", ] @@ -12186,13 +12255,13 @@ dependencies = [ "hex", "libp2p 0.53.2", "libp2p-swarm-test", - "lru 0.12.1", - "memmap2 0.9.3", + "lru 0.12.3", + "memmap2 0.9.4", "nohash-hasher", "parity-scale-codec", "parking_lot 0.12.1", "pin-project", - "prometheus-client 0.22.0", + "prometheus-client 0.22.2", "rand", "serde", "serde_json", @@ -12230,7 +12299,7 @@ dependencies = [ "hex-literal", "mimalloc", "parity-scale-codec", - "prometheus-client 0.22.0", + "prometheus-client 0.22.2", "sc-chain-spec", "sc-cli", "sc-client-api", @@ -12402,7 +12471,7 @@ dependencies = [ "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", "parking_lot 0.12.1", - "prometheus-client 0.22.0", + "prometheus-client 0.22.2", "sc-basic-authorship", "sc-chain-spec", "sc-client-api", @@ -12632,12 +12701,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a7590dc041b9bc2825e52ce5af8416c73dbe9d0654402bfd4b4941938b94d8f" dependencies = [ "hmac 0.11.0", - "pbkdf2", + "pbkdf2 0.8.0", "schnorrkel", "sha2 0.9.9", "zeroize", ] +[[package]] +name = "substrate-bip39" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b564c293e6194e8b222e52436bcb99f60de72043c7f845cf6c4406db4df121" +dependencies = [ + "hmac 0.12.1", + "pbkdf2 0.12.2", + "schnorrkel", + "sha2 0.10.8", + "zeroize", +] + [[package]] name = "substrate-build-script-utils" version = "11.0.0" @@ -12734,11 +12816,10 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "supports-color" -version = "2.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6398cde53adc3c4557306a96ce67b302968513830a77a95b2b17305d9719a89" +checksum = "9829b314621dfc575df4e409e79f9d6a66a3bd707ab73f23cb4aa3a854ac854f" dependencies = [ - "is-terminal", "is_ci", ] @@ -12833,14 +12914,13 @@ checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.4.1", - "rustix 0.38.30", + "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -12859,7 +12939,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.30", + "rustix 0.38.32", "windows-sys 0.48.0", ] @@ -12871,18 +12951,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.56" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", @@ -13404,12 +13484,14 @@ dependencies = [ [[package]] name = "ulid" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e37c4b6cbcc59a8dcd09a6429fbc7890286bcbb79215cea7b38a3c4c0921d93" +checksum = "34778c17965aa2a08913b57e1f34db9b4a63f5de31768b55bf20d2795f921259" dependencies = [ + "getrandom 0.2.12", "rand", "serde", + "web-time", ] [[package]] @@ -13944,6 +14026,16 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "webpki" version = "0.22.4" @@ -13981,7 +14073,7 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.30", + "rustix 0.38.32", ] [[package]] @@ -14369,7 +14461,7 @@ checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" dependencies = [ "libc", "linux-raw-sys 0.4.13", - "rustix 0.38.30", + "rustix 0.38.32", ] [[package]] diff --git a/crates/pallet-domains/Cargo.toml b/crates/pallet-domains/Cargo.toml index c6bf9826cb..9166ba332d 100644 --- a/crates/pallet-domains/Cargo.toml +++ b/crates/pallet-domains/Cargo.toml @@ -19,7 +19,7 @@ frame-support = { default-features = false, git = "https://github.com/subspace/p frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } log = { version = "0.4.21", default-features = false } pallet-balances = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/pallet-feeds/Cargo.toml b/crates/pallet-feeds/Cargo.toml index 31f6b793b5..3232dfb990 100644 --- a/crates/pallet-feeds/Cargo.toml +++ b/crates/pallet-feeds/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } diff --git a/crates/pallet-grandpa-finality-verifier/Cargo.toml b/crates/pallet-grandpa-finality-verifier/Cargo.toml index fad3bb049c..24784c940b 100644 --- a/crates/pallet-grandpa-finality-verifier/Cargo.toml +++ b/crates/pallet-grandpa-finality-verifier/Cargo.toml @@ -13,8 +13,8 @@ readme = "README.md" codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false } finality-grandpa = { version = "0.16.1", default-features = false } log = { version = "0.4.21", default-features = false } -num-traits = { version = "0.2.17", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +num-traits = { version = "0.2.18", default-features = false } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } serde = { version = "1.0.196", optional = true } # Substrate Dependencies @@ -27,7 +27,7 @@ sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc76 sp-std = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } [dev-dependencies] -ed25519-dalek = { version = "2.1.0", default-features = false } +ed25519-dalek = { version = "2.1.1", default-features = false } sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-application-crypto = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/pallet-object-store/Cargo.toml b/crates/pallet-object-store/Cargo.toml index 24f5ec00e6..1d010932b5 100644 --- a/crates/pallet-object-store/Cargo.toml +++ b/crates/pallet-object-store/Cargo.toml @@ -18,7 +18,7 @@ frame-support = { default-features = false, git = "https://github.com/subspace/p frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } hex = { version = "0.4.3", default-features = false, features = ["alloc"] } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } [dev-dependencies] diff --git a/crates/pallet-offences-subspace/Cargo.toml b/crates/pallet-offences-subspace/Cargo.toml index 05716dc32e..b2f953a999 100644 --- a/crates/pallet-offences-subspace/Cargo.toml +++ b/crates/pallet-offences-subspace/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/pallet-rewards/Cargo.toml b/crates/pallet-rewards/Cargo.toml index 95d9839320..0e3d565b1c 100644 --- a/crates/pallet-rewards/Cargo.toml +++ b/crates/pallet-rewards/Cargo.toml @@ -23,7 +23,7 @@ frame-benchmarking = { default-features = false, git = "https://github.com/subsp frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } serde = { version = "1.0.196", default-features = false, features = ["alloc", "derive"] } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/pallet-runtime-configs/Cargo.toml b/crates/pallet-runtime-configs/Cargo.toml index efa3d89ad1..4d9acce45e 100644 --- a/crates/pallet-runtime-configs/Cargo.toml +++ b/crates/pallet-runtime-configs/Cargo.toml @@ -20,7 +20,7 @@ codec = { package = "parity-scale-codec", version = "3.6.5", default-features = frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-std = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } diff --git a/crates/pallet-subspace-mmr/Cargo.toml b/crates/pallet-subspace-mmr/Cargo.toml index 2ff55b9ccc..d955db8376 100644 --- a/crates/pallet-subspace-mmr/Cargo.toml +++ b/crates/pallet-subspace-mmr/Cargo.toml @@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-mmr-primitives = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/pallet-subspace/Cargo.toml b/crates/pallet-subspace/Cargo.toml index 206cdb717a..f26e88ceac 100644 --- a/crates/pallet-subspace/Cargo.toml +++ b/crates/pallet-subspace/Cargo.toml @@ -18,7 +18,7 @@ frame-benchmarking = { default-features = false, git = "https://github.com/subsp frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } schnorrkel = { version = "0.11.4", default-features = false } serde = { version = "1.0.196", optional = true, default-features = false, features = ["derive"] } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } @@ -31,7 +31,7 @@ subspace-runtime-primitives = { version = "0.1.0", default-features = false, pat subspace-verification = { version = "0.1.0", path = "../subspace-verification", default-features = false } [dev-dependencies] -env_logger = "0.10.2" +env_logger = "0.11.3" futures = "0.3.29" pallet-balances = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-offences-subspace = { version = "0.1.0", path = "../pallet-offences-subspace" } diff --git a/crates/pallet-transaction-fees/Cargo.toml b/crates/pallet-transaction-fees/Cargo.toml index fadb549272..a95e4cd094 100644 --- a/crates/pallet-transaction-fees/Cargo.toml +++ b/crates/pallet-transaction-fees/Cargo.toml @@ -21,7 +21,7 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } [features] diff --git a/crates/sc-consensus-subspace-rpc/Cargo.toml b/crates/sc-consensus-subspace-rpc/Cargo.toml index 9a91dfe172..ed62aa9dd9 100644 --- a/crates/sc-consensus-subspace-rpc/Cargo.toml +++ b/crates/sc-consensus-subspace-rpc/Cargo.toml @@ -17,7 +17,7 @@ async-oneshot = "0.5.9" futures = "0.3.29" futures-timer = "3.0.3" jsonrpsee = { version = "0.22.3", features = ["server", "macros"] } -lru = "0.12.1" +lru = "0.12.3" parity-scale-codec = "3.6.9" parking_lot = "0.12.1" sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } @@ -37,5 +37,5 @@ subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primiti subspace-farmer-components = { version = "0.1.0", path = "../subspace-farmer-components" } subspace-networking = { version = "0.1.0", path = "../subspace-networking" } subspace-rpc-primitives = { version = "0.1.0", path = "../subspace-rpc-primitives" } -thiserror = "1.0.56" +thiserror = "1.0.58" tracing = "0.1.40" diff --git a/crates/sc-consensus-subspace/Cargo.toml b/crates/sc-consensus-subspace/Cargo.toml index 641743885b..70e560efdf 100644 --- a/crates/sc-consensus-subspace/Cargo.toml +++ b/crates/sc-consensus-subspace/Cargo.toml @@ -13,14 +13,14 @@ documentation = "https://docs.rs/sc-consensus-subspace" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -async-trait = "0.1.77" +async-trait = "0.1.79" codec = { package = "parity-scale-codec", version = "3.6.5", features = ["derive"] } futures = "0.3.29" -lru = "0.12.1" +lru = "0.12.3" parking_lot = "0.12.1" rand = "0.8.5" rand_chacha = "0.3.1" -rayon = "1.8.1" +rayon = "1.10.0" schnorrkel = "0.11.4" sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } @@ -43,7 +43,7 @@ subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space" } subspace-verification = { version = "0.1.0", path = "../subspace-verification" } -thiserror = "1.0.56" +thiserror = "1.0.58" tokio = { version = "1.37.0", features = ["sync"] } tracing = "0.1.40" diff --git a/crates/sc-proof-of-time/Cargo.toml b/crates/sc-proof-of-time/Cargo.toml index 07d16f3f3c..18d66fcf4a 100644 --- a/crates/sc-proof-of-time/Cargo.toml +++ b/crates/sc-proof-of-time/Cargo.toml @@ -15,10 +15,10 @@ atomic = "0.5.3" core_affinity = "0.8.1" derive_more = "0.99.17" futures = "0.3.29" -lru = "0.12.1" +lru = "0.12.3" parity-scale-codec = { version = "3.6.9", features = ["derive"] } parking_lot = "0.12.1" -rayon = "1.8.1" +rayon = "1.10.0" sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/sc-subspace-block-relay/Cargo.toml b/crates/sc-subspace-block-relay/Cargo.toml index 9c0cfbf5bd..d983f6b963 100644 --- a/crates/sc-subspace-block-relay/Cargo.toml +++ b/crates/sc-subspace-block-relay/Cargo.toml @@ -12,7 +12,7 @@ include = [ [dependencies] async-channel = "1.9.0" -async-trait = "0.1.77" +async-trait = "0.1.79" codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } derive_more = "0.99.17" futures = "0.3.29" @@ -25,8 +25,8 @@ sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020 sp-consensus-subspace = { version = "0.1.0", path = "../sp-consensus-subspace" } sc-transaction-pool-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -strum_macros = "0.25.3" +strum_macros = "0.26.2" substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -thiserror = "1.0.56" +thiserror = "1.0.58" tracing = "0.1.40" diff --git a/crates/sp-consensus-subspace/Cargo.toml b/crates/sp-consensus-subspace/Cargo.toml index 8ea7fbff79..da2f86c54e 100644 --- a/crates/sp-consensus-subspace/Cargo.toml +++ b/crates/sp-consensus-subspace/Cargo.toml @@ -13,10 +13,10 @@ readme = "README.md" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -async-trait = { version = "0.1.77", optional = true } +async-trait = { version = "0.1.79", optional = true } codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } schnorrkel = { version = "0.11.4", default-features = false } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-application-crypto = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } @@ -32,7 +32,7 @@ sp-timestamp = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space", default-features = false } subspace-verification = { version = "0.1.0", path = "../subspace-verification", default-features = false } -thiserror = { version = "1.0.56", optional = true } +thiserror = { version = "1.0.58", optional = true } [features] default = ["std"] diff --git a/crates/sp-domains-fraud-proof/Cargo.toml b/crates/sp-domains-fraud-proof/Cargo.toml index 265d153dc1..76b8435a38 100644 --- a/crates/sp-domains-fraud-proof/Cargo.toml +++ b/crates/sp-domains-fraud-proof/Cargo.toml @@ -17,7 +17,7 @@ domain-runtime-primitives = { version = "0.1.0", default-features = false, path frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } hash-db = { version = "0.16.0", default-features = false } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false, optional = true } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } @@ -36,7 +36,7 @@ sp-trie = { default-features = false, git = "https://github.com/subspace/polkado subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", default-features = false, path = "../subspace-runtime-primitives" } trie-db = { version = "0.28.0", default-features = false } -thiserror = { version = "1.0.56", optional = true } +thiserror = { version = "1.0.58", optional = true } [dev-dependencies] domain-block-builder = { version = "0.1.0", path = "../../domains/client/block-builder" } @@ -61,7 +61,7 @@ sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc76 subspace-test-client = { version = "0.1.0", path = "../../test/subspace-test-client" } subspace-test-service = { version = "0.1.0", path = "../../test/subspace-test-service" } subspace-runtime-primitives = { version = "0.1.0", path = "../../crates/subspace-runtime-primitives" } -tempfile = "3.9.0" +tempfile = "3.10.1" tokio = "1.37.0" [features] diff --git a/crates/sp-domains/Cargo.toml b/crates/sp-domains/Cargo.toml index 4b042c19f7..828255c5b5 100644 --- a/crates/sp-domains/Cargo.toml +++ b/crates/sp-domains/Cargo.toml @@ -22,7 +22,7 @@ parity-scale-codec = { version = "3.6.9", default-features = false, features = [ rand = { version = "0.8.5", default-features = false } rand_chacha = { version = "0.3.1", default-features = false } rs_merkle = { version = "1.4.2", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } serde = { version = "1.0.196", default-features = false, features = ["alloc", "derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-application-crypto = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } @@ -39,7 +39,7 @@ subspace-runtime-primitives = { version = "0.1.0", default-features = false, pat trie-db = { version = "0.28.0", default-features = false } [dev-dependencies] -num-traits = "0.2.17" +num-traits = "0.2.18" rand = { version = "0.8.5", features = ["min_const_gen"] } [features] diff --git a/crates/sp-lightclient/Cargo.toml b/crates/sp-lightclient/Cargo.toml index 0a3ba15409..5fcf87925a 100644 --- a/crates/sp-lightclient/Cargo.toml +++ b/crates/sp-lightclient/Cargo.toml @@ -17,7 +17,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"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } schnorrkel = { version = "0.11.4", default-features = false } sp-arithmetic = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/sp-subspace-mmr/Cargo.toml b/crates/sp-subspace-mmr/Cargo.toml index 27f92283c2..1e433fb249 100644 --- a/crates/sp-subspace-mmr/Cargo.toml +++ b/crates/sp-subspace-mmr/Cargo.toml @@ -17,7 +17,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/crates/subspace-archiving/Cargo.toml b/crates/subspace-archiving/Cargo.toml index b19e29d8f8..08ad910ba4 100644 --- a/crates/subspace-archiving/Cargo.toml +++ b/crates/subspace-archiving/Cargo.toml @@ -18,11 +18,11 @@ bench = false [dependencies] parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive"] } -rayon = { version = "1.8.1", optional = true } +rayon = { version = "1.10.0", optional = true } serde = { version = "1.0.196", optional = true, features = ["derive"] } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-coding", default-features = false } -thiserror = { version = "1.0.56", optional = true } +thiserror = { version = "1.0.58", optional = true } [dev-dependencies] criterion = "0.5.1" diff --git a/crates/subspace-core-primitives/Cargo.toml b/crates/subspace-core-primitives/Cargo.toml index 4e4a7a0b2f..6f403f5747 100644 --- a/crates/subspace-core-primitives/Cargo.toml +++ b/crates/subspace-core-primitives/Cargo.toml @@ -16,16 +16,16 @@ include = [ bench = false [dependencies] -blake3 = { version = "1.5.0", default-features = false } +blake3 = { version = "1.5.1", default-features = false } derive_more = "0.99.17" hex = { version = "0.4.3", default-features = false, features = ["alloc"] } kzg = { git = "https://github.com/sifraitech/rust-kzg", rev = "c34b73916af9b8a699a74bd0186f82f25e72861c", default-features = false } -num-traits = { version = "0.2.17", default-features = false } +num-traits = { version = "0.2.18", default-features = false } parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive", "max-encoded-len"] } parking_lot = { version = "0.12.1", optional = true } -rayon = { version = "1.8.1", optional = true } +rayon = { version = "1.10.0", optional = true } rust-kzg-blst = { git = "https://github.com/sifraitech/rust-kzg", rev = "c34b73916af9b8a699a74bd0186f82f25e72861c", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } serde = { version = "1.0.196", optional = true, features = ["alloc", "derive"] } serde_arrays = { version = "0.1.0", optional = true } # Replacement for `parking_lot` in `no_std` environment diff --git a/crates/subspace-farmer-components/Cargo.toml b/crates/subspace-farmer-components/Cargo.toml index 266d7ab0c7..79ada8eb21 100644 --- a/crates/subspace-farmer-components/Cargo.toml +++ b/crates/subspace-farmer-components/Cargo.toml @@ -17,18 +17,18 @@ bench = false [dependencies] async-lock = "3.3.0" -async-trait = "0.1.77" +async-trait = "0.1.79" backoff = { version = "0.4.0", features = ["futures", "tokio"] } bitvec = "1.0.1" # TODO: Switch to fs4 once https://github.com/al8n/fs4-rs/issues/15 is resolved fs2 = "0.4.3" futures = "0.3.29" hex = "0.4.3" -libc = "0.2.152" +libc = "0.2.153" parity-scale-codec = "3.6.9" parking_lot = "0.12.1" rand = "0.8.5" -rayon = "1.8.1" +rayon = "1.10.0" schnorrkel = "0.11.4" serde = { version = "1.0.196", features = ["derive"] } static_assertions = "1.1.0" @@ -37,7 +37,7 @@ subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primiti subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-coding" } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space", features = ["parallel"] } subspace-verification = { version = "0.1.0", path = "../subspace-verification" } -thiserror = "1.0.56" +thiserror = "1.0.58" tokio = { version = "1.37.0", features = ["macros", "parking_lot", "rt-multi-thread", "signal", "sync"] } tracing = "0.1.40" diff --git a/crates/subspace-farmer/Cargo.toml b/crates/subspace-farmer/Cargo.toml index 7487095002..144f313662 100644 --- a/crates/subspace-farmer/Cargo.toml +++ b/crates/subspace-farmer/Cargo.toml @@ -12,13 +12,13 @@ include = [ ] [dependencies] -anyhow = "1.0.79" +anyhow = "1.0.81" async-lock = "3.3.0" -async-trait = "0.1.77" +async-trait = "0.1.79" backoff = { version = "0.4.0", features = ["futures", "tokio"] } base58 = "0.2.0" blake2 = "0.10.6" -blake3 = { version = "1.5.0", default-features = false } +blake3 = { version = "1.5.1", default-features = false } bytesize = "1.3.0" clap = { version = "4.5.4", features = ["color", "derive"] } criterion = { version = "0.5.1", default-features = false, features = ["rayon", "async"] } @@ -26,25 +26,25 @@ derive_more = "0.99.17" event-listener = "5.2.0" event-listener-primitives = "2.0.1" fdlimit = "0.3.0" -fs4 = "0.8.0" +fs4 = "0.8.2" futures = "0.3.29" hex = { version = "0.4.3", features = ["serde"] } hwlocality = { version = "1.0.0-alpha.3", features = ["vendored"], optional = true } jsonrpsee = { version = "0.22.3", features = ["client"] } -lru = "0.12.1" +lru = "0.12.3" mimalloc = "0.1.39" libmimalloc-sys = "0.1.35" num_cpus = "1.16.0" parity-scale-codec = "3.6.9" parking_lot = "0.12.1" -prometheus-client = "0.22.0" +prometheus-client = "0.22.2" rand = "0.8.5" -rayon = "1.8.1" +rayon = "1.10.0" schnorrkel = "0.11.4" serde = { version = "1.0.196", features = ["derive"] } serde_json = "1.0.115" static_assertions = "1.1.0" -ss58-registry = "1.45.0" +ss58-registry = "1.47.0" subspace-archiving = { version = "0.1.0", path = "../subspace-archiving" } subspace-erasure-coding = { version = "0.1.0", path = "../subspace-erasure-coding" } subspace-farmer-components = { version = "0.1.0", path = "../subspace-farmer-components" } @@ -53,15 +53,15 @@ 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.6" -supports-color = "2.1.0" -tempfile = "3.9.0" -thiserror = "1.0.56" +substrate-bip39 = "0.5.0" +supports-color = "3.0.0" +tempfile = "3.10.1" +thiserror = "1.0.58" thread-priority = "0.16.0" tokio = { version = "1.37.0", features = ["macros", "parking_lot", "rt-multi-thread", "signal", "time"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } -ulid = { version = "1.0.0", features = ["serde"] } +ulid = { version = "1.1.2", features = ["serde"] } zeroize = "1.7.0" [features] diff --git a/crates/subspace-malicious-operator/Cargo.toml b/crates/subspace-malicious-operator/Cargo.toml index 278c4fdc1d..872076cbcc 100644 --- a/crates/subspace-malicious-operator/Cargo.toml +++ b/crates/subspace-malicious-operator/Cargo.toml @@ -71,7 +71,7 @@ subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-spac subspace-runtime = { version = "0.1.0", path = "../subspace-runtime" } subspace-runtime-primitives = { version = "0.1.0", path = "../subspace-runtime-primitives" } subspace-service = { version = "0.1.0", path = "../subspace-service" } -thiserror = "1.0.56" +thiserror = "1.0.58" tokio = "1.37.0" rand = "0.8.5" tracing = "0.1.40" diff --git a/crates/subspace-networking/Cargo.toml b/crates/subspace-networking/Cargo.toml index 352679b82b..ef5860d84d 100644 --- a/crates/subspace-networking/Cargo.toml +++ b/crates/subspace-networking/Cargo.toml @@ -17,31 +17,31 @@ include = [ [dependencies] async-mutex = "1.4.0" -async-trait = "0.1.77" +async-trait = "0.1.79" backoff = { version = "0.4.0", features = ["futures", "tokio"] } -bytes = "1.5.0" +bytes = "1.6.0" clap = { version = "4.5.4", features = ["color", "derive"] } derive_more = "0.99.17" -either = "1.8.1" +either = "1.10.0" event-listener-primitives = "2.0.1" # TODO: Switch to fs4 once https://github.com/al8n/fs4-rs/issues/15 is resolved fs2 = "0.4.3" futures = "0.3.29" futures-timer = "3.0.3" hex = "0.4.3" -lru = "0.12.1" -memmap2 = "0.9.3" +lru = "0.12.3" +memmap2 = "0.9.4" nohash-hasher = "0.2.0" parity-scale-codec = "3.6.9" parking_lot = "0.12.1" -pin-project = "1.1.3" -prometheus-client = "0.22.0" +pin-project = "1.1.5" +prometheus-client = "0.22.2" rand = "0.8.5" serde = { version = "1.0.196", features = ["derive"] } serde_json = "1.0.115" subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives" } subspace-metrics = { version = "0.1.0", path = "../../shared/subspace-metrics" } -thiserror = "1.0.56" +thiserror = "1.0.58" tokio = { version = "1.37.0", features = ["macros", "parking_lot", "rt-multi-thread", "signal", "sync", "time"] } tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/crates/subspace-node/Cargo.toml b/crates/subspace-node/Cargo.toml index b3b0f5353f..f757772b0b 100644 --- a/crates/subspace-node/Cargo.toml +++ b/crates/subspace-node/Cargo.toml @@ -40,7 +40,7 @@ hex = "0.4.3" hex-literal = "0.4.1" mimalloc = "0.1.39" parity-scale-codec = "3.6.9" -prometheus-client = "0.22.0" +prometheus-client = "0.22.2" sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sc-cli = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } @@ -76,9 +76,9 @@ subspace-runtime = { version = "0.1.0", path = "../subspace-runtime" } subspace-runtime-primitives = { version = "0.1.0", path = "../subspace-runtime-primitives" } subspace-service = { version = "0.1.0", path = "../subspace-service" } substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -supports-color = "2.1.0" -tempfile = "3.9.0" -thiserror = "1.0.56" +supports-color = "3.0.0" +tempfile = "3.10.1" +thiserror = "1.0.58" tokio = { version = "1.37.0", features = ["macros"] } tokio-stream = { version = "0.1.15" } tracing = "0.1.40" diff --git a/crates/subspace-proof-of-space/Cargo.toml b/crates/subspace-proof-of-space/Cargo.toml index b47469465a..df5c4b4d1a 100644 --- a/crates/subspace-proof-of-space/Cargo.toml +++ b/crates/subspace-proof-of-space/Cargo.toml @@ -18,7 +18,7 @@ bench = false [dependencies] chacha20 = { version = "0.9.1", default-features = false } derive_more = "0.99.17" -rayon = { version = "1.8.1", optional = true } +rayon = { version = "1.10.0", optional = true } seq-macro = "0.3.5" sha2 = { version = "0.10.7", default-features = false } subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } @@ -27,7 +27,7 @@ subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primiti bitvec = "1.0.1" criterion = "0.5.1" rand = "0.8.5" -rayon = "1.8.1" +rayon = "1.10.0" subspace-chiapos = { git = "https://github.com/subspace/chiapos", rev = "3b1ab3ca24764d25da30e0c8243e0bf304b776a5" } [[bench]] diff --git a/crates/subspace-proof-of-time/Cargo.toml b/crates/subspace-proof-of-time/Cargo.toml index 1aeeaeba8c..14d1d832b9 100644 --- a/crates/subspace-proof-of-time/Cargo.toml +++ b/crates/subspace-proof-of-time/Cargo.toml @@ -15,9 +15,9 @@ include = [ bench = false [dependencies] -aes = "0.8.3" +aes = "0.8.4" subspace-core-primitives = { version = "0.1.0", path = "../subspace-core-primitives", default-features = false } -thiserror = { version = "1.0.56", optional = true } +thiserror = { version = "1.0.58", optional = true } [dev-dependencies] core_affinity = "0.8.1" diff --git a/crates/subspace-runtime/Cargo.toml b/crates/subspace-runtime/Cargo.toml index de73a93764..a43721d120 100644 --- a/crates/subspace-runtime/Cargo.toml +++ b/crates/subspace-runtime/Cargo.toml @@ -41,7 +41,7 @@ pallet-transaction-payment = { default-features = false, git = "https://github.c pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transporter = { version = "0.1.0", path = "../../domains/pallets/transporter", default-features = false } pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-consensus-subspace = { version = "0.1.0", default-features = false, path = "../sp-consensus-subspace" } diff --git a/crates/subspace-service/Cargo.toml b/crates/subspace-service/Cargo.toml index f45521237b..1beec7d1c8 100644 --- a/crates/subspace-service/Cargo.toml +++ b/crates/subspace-service/Cargo.toml @@ -16,7 +16,7 @@ include = [ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -async-trait = "0.1.77" +async-trait = "0.1.79" cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/cross-domain-message-gossip" } domain-runtime-primitives = { version = "0.1.0", path = "../../domains/primitives/runtime" } frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } @@ -28,7 +28,7 @@ mmr-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc76502 pallet-transaction-payment-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } parity-scale-codec = "3.6.9" parking_lot = "0.12.1" -prometheus-client = "0.22.0" +prometheus-client = "0.22.2" sc-basic-authorship = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } @@ -81,7 +81,7 @@ subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-spac subspace-runtime-primitives = { version = "0.1.0", path = "../subspace-runtime-primitives" } substrate-frame-rpc-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } substrate-prometheus-endpoint = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -thiserror = "1.0.56" +thiserror = "1.0.58" tokio = { version = "1.37.0", features = ["sync"] } tracing = "0.1.40" diff --git a/crates/subspace-verification/Cargo.toml b/crates/subspace-verification/Cargo.toml index aacd03e04b..c556e5c376 100644 --- a/crates/subspace-verification/Cargo.toml +++ b/crates/subspace-verification/Cargo.toml @@ -22,7 +22,7 @@ sp-arithmetic = { default-features = false, git = "https://github.com/subspace/p 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 } subspace-proof-of-space = { version = "0.1.0", path = "../subspace-proof-of-space", default-features = false } -thiserror = { version = "1.0.56", optional = true } +thiserror = { version = "1.0.58", optional = true } [features] default = ["std"] diff --git a/domains/client/consensus-relay-chain/Cargo.toml b/domains/client/consensus-relay-chain/Cargo.toml index 2c7e87d9a9..28f0f4e0b1 100644 --- a/domains/client/consensus-relay-chain/Cargo.toml +++ b/domains/client/consensus-relay-chain/Cargo.toml @@ -6,7 +6,7 @@ authors = ["Parity Technologies "] edition = "2021" [dependencies] -async-trait = "0.1.77" +async-trait = "0.1.79" sc-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/client/domain-operator/Cargo.toml b/domains/client/domain-operator/Cargo.toml index 16a2f24e2e..cd272795b4 100644 --- a/domains/client/domain-operator/Cargo.toml +++ b/domains/client/domain-operator/Cargo.toml @@ -37,7 +37,7 @@ sp-weights = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc76 subspace-core-primitives = { version = "0.1.0", path = "../../../crates/subspace-core-primitives" } subspace-runtime-primitives = { version = "0.1.0", path = "../../../crates/subspace-runtime-primitives" } tracing = "0.1.40" -thiserror = "1.0.56" +thiserror = "1.0.58" tokio = { version = "1.37.0", features = ["macros"] } [dev-dependencies] @@ -59,4 +59,4 @@ sp-state-machine = { git = "https://github.com/subspace/polkadot-sdk", rev = "44 subspace-core-primitives = { version = "0.1.0", default-features = false, path = "../../../crates/subspace-core-primitives" } subspace-test-runtime = { version = "0.1.0", path = "../../../test/subspace-test-runtime" } subspace-test-service = { version = "0.1.0", path = "../../../test/subspace-test-service" } -tempfile = "3.9.0" +tempfile = "3.10.1" diff --git a/domains/pallets/auto-id/Cargo.toml b/domains/pallets/auto-id/Cargo.toml index 27e644fb6d..8d5ae33188 100644 --- a/domains/pallets/auto-id/Cargo.toml +++ b/domains/pallets/auto-id/Cargo.toml @@ -16,7 +16,7 @@ include = [ codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-auto-id = { version = "0.1.0", default-features = false, path = "../../primitives/auto-id" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/pallets/block-fees/Cargo.toml b/domains/pallets/block-fees/Cargo.toml index cc417d6426..ffc7d90ec2 100644 --- a/domains/pallets/block-fees/Cargo.toml +++ b/domains/pallets/block-fees/Cargo.toml @@ -18,7 +18,7 @@ domain-runtime-primitives = { version = "0.1.0", path = "../../primitives/runtim frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-block-fees = { version = "0.1.0", path = "../../primitives/block-fees", default-features = false } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/pallets/domain-id/Cargo.toml b/domains/pallets/domain-id/Cargo.toml index 96454d2e48..a9f96a9526 100644 --- a/domains/pallets/domain-id/Cargo.toml +++ b/domains/pallets/domain-id/Cargo.toml @@ -16,7 +16,7 @@ include = [ codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } sp-runtime = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/pallets/executive/Cargo.toml b/domains/pallets/executive/Cargo.toml index b73e19b63d..fe5d9b0724 100644 --- a/domains/pallets/executive/Cargo.toml +++ b/domains/pallets/executive/Cargo.toml @@ -18,7 +18,7 @@ frame-executive = { git = "https://github.com/subspace/polkadot-sdk", rev = "447 frame-support = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } frame-system = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-executive = { version = "0.1.0", path = "../../primitives/executive", default-features = false } sp-io = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } diff --git a/domains/pallets/messenger/Cargo.toml b/domains/pallets/messenger/Cargo.toml index 6538203584..caaeee74dd 100644 --- a/domains/pallets/messenger/Cargo.toml +++ b/domains/pallets/messenger/Cargo.toml @@ -19,7 +19,7 @@ frame-benchmarking = { default-features = false, git = "https://github.com/subsp frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } diff --git a/domains/pallets/transporter/Cargo.toml b/domains/pallets/transporter/Cargo.toml index 1a16349960..efce4c6677 100644 --- a/domains/pallets/transporter/Cargo.toml +++ b/domains/pallets/transporter/Cargo.toml @@ -19,7 +19,7 @@ domain-runtime-primitives = { path = "../../primitives/runtime", default-feature frame-benchmarking = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-domains = { version = "0.1.0", default-features = false, path = "../../../crates/sp-domains" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } diff --git a/domains/primitives/auto-id/Cargo.toml b/domains/primitives/auto-id/Cargo.toml index f88f7f2f1c..520e51a3c4 100644 --- a/domains/primitives/auto-id/Cargo.toml +++ b/domains/primitives/auto-id/Cargo.toml @@ -15,7 +15,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-externalities = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-runtime-interface = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/primitives/block-fees/Cargo.toml b/domains/primitives/block-fees/Cargo.toml index 9117320f1a..68714d3078 100644 --- a/domains/primitives/block-fees/Cargo.toml +++ b/domains/primitives/block-fees/Cargo.toml @@ -13,7 +13,7 @@ include = [ ] [dependencies] -async-trait = { version = "0.1.77", optional = true } +async-trait = { version = "0.1.79", optional = true } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } domain-runtime-primitives = { version = "0.1.0", default-features = false, path = "../runtime" } sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/primitives/executive/Cargo.toml b/domains/primitives/executive/Cargo.toml index 5798714357..17ff8ea3d0 100644 --- a/domains/primitives/executive/Cargo.toml +++ b/domains/primitives/executive/Cargo.toml @@ -14,7 +14,7 @@ include = [ ] [dependencies] -async-trait = { version = "0.1.77", optional = true } +async-trait = { version = "0.1.79", optional = true } codec = { package = "parity-scale-codec", version = "3.1.5", default-features = false, features = ["derive"] } sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/primitives/messenger-host-functions/Cargo.toml b/domains/primitives/messenger-host-functions/Cargo.toml index 3f3ca1e2b1..b75fb8a928 100644 --- a/domains/primitives/messenger-host-functions/Cargo.toml +++ b/domains/primitives/messenger-host-functions/Cargo.toml @@ -16,7 +16,7 @@ include = [ [dependencies] codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } domain-block-preprocessor = { version = "0.1.0", default-features = false, path = "../../../domains/client/block-preprocessor", optional = true } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sc-executor = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false, optional = true } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", optional = true } diff --git a/domains/primitives/messenger/Cargo.toml b/domains/primitives/messenger/Cargo.toml index 9f11e60c11..db5bd72bb9 100644 --- a/domains/primitives/messenger/Cargo.toml +++ b/domains/primitives/messenger/Cargo.toml @@ -14,12 +14,12 @@ include = [ ] [dependencies] -async-trait = { version = "0.1.77", optional = true } +async-trait = { version = "0.1.79", optional = true } codec = { package = "parity-scale-codec", version = "3.6.5", default-features = false, features = ["derive"] } frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } hash-db = { version = "0.16.0", default-features = false } log = { version = "0.4.21", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } serde = { version = "1.0.196", default-features = false, features = ["alloc", "derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/primitives/runtime/Cargo.toml b/domains/primitives/runtime/Cargo.toml index 20b25da4dd..61fbc73492 100644 --- a/domains/primitives/runtime/Cargo.toml +++ b/domains/primitives/runtime/Cargo.toml @@ -16,7 +16,7 @@ fp-account = { version = "1.0.0-dev", default-features = false, git = "https://g frame-support = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } frame-system = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } parity-scale-codec = { version = "3.6.9", default-features = false, features = ["derive"] } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } serde = { version = "1.0.196", default-features = false, features = ["alloc", "derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/runtime/auto-id/Cargo.toml b/domains/runtime/auto-id/Cargo.toml index 3d67c0a920..64275409fe 100644 --- a/domains/runtime/auto-id/Cargo.toml +++ b/domains/runtime/auto-id/Cargo.toml @@ -35,7 +35,7 @@ pallet-timestamp = { default-features = false, git = "https://github.com/subspac pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/runtime/evm/Cargo.toml b/domains/runtime/evm/Cargo.toml index 5988c5b95b..d92affba81 100644 --- a/domains/runtime/evm/Cargo.toml +++ b/domains/runtime/evm/Cargo.toml @@ -44,7 +44,7 @@ pallet-timestamp = { default-features = false, git = "https://github.com/subspac pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transporter = { version = "0.1.0", path = "../../pallets/transporter", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/domains/service/Cargo.toml b/domains/service/Cargo.toml index 8a781e8f73..139b049944 100644 --- a/domains/service/Cargo.toml +++ b/domains/service/Cargo.toml @@ -13,7 +13,7 @@ build = "build.rs" targets = ["x86_64-unknown-linux-gnu"] [dependencies] -async-trait = "0.1.77" +async-trait = "0.1.79" cross-domain-message-gossip = { version = "0.1.0", path = "../client/cross-domain-message-gossip" } domain-client-block-preprocessor = { package = "domain-block-preprocessor", version = "0.1.0", path = "../client/block-preprocessor" } domain-client-consensus-relay-chain = { version = "0.1.0", path = "../client/consensus-relay-chain" } diff --git a/domains/test/runtime/evm/Cargo.toml b/domains/test/runtime/evm/Cargo.toml index ca05863cc5..1f0f892195 100644 --- a/domains/test/runtime/evm/Cargo.toml +++ b/domains/test/runtime/evm/Cargo.toml @@ -43,7 +43,7 @@ pallet-timestamp = { default-features = false, git = "https://github.com/subspac pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transporter = { version = "0.1.0", path = "../../../pallets/transporter", default-features = false } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/shared/subspace-metrics/Cargo.toml b/shared/subspace-metrics/Cargo.toml index fe0218d9c0..5b18810925 100644 --- a/shared/subspace-metrics/Cargo.toml +++ b/shared/subspace-metrics/Cargo.toml @@ -17,5 +17,5 @@ include = [ [dependencies] actix-web = "4.5.1" prometheus = { version = "0.13.0", default-features = false } -prometheus-client = "0.22.0" +prometheus-client = "0.22.2" tracing = "0.1.40" diff --git a/test/subspace-test-runtime/Cargo.toml b/test/subspace-test-runtime/Cargo.toml index c808ac8e7f..b541bbb474 100644 --- a/test/subspace-test-runtime/Cargo.toml +++ b/test/subspace-test-runtime/Cargo.toml @@ -36,7 +36,7 @@ pallet-transaction-fees = { version = "0.1.0", default-features = false, path = pallet-transaction-payment = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } pallet-transporter = { version = "0.1.0", path = "../../domains/pallets/transporter", default-features = false } pallet-utility = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } -scale-info = { version = "2.7.0", default-features = false, features = ["derive"] } +scale-info = { version = "2.11.1", default-features = false, features = ["derive"] } sp-api = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-consensus-slots = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/test/subspace-test-service/Cargo.toml b/test/subspace-test-service/Cargo.toml index dba66278eb..7450e16162 100644 --- a/test/subspace-test-service/Cargo.toml +++ b/test/subspace-test-service/Cargo.toml @@ -15,7 +15,7 @@ include = [ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -async-trait = "0.1.77" +async-trait = "0.1.79" cross-domain-message-gossip = { version = "0.1.0", path = "../../domains/client/cross-domain-message-gossip" } codec = { package = "parity-scale-codec", version = "3.2.1", features = ["derive"] } domain-client-message-relayer = { version = "0.1.0", path = "../../domains/client/relayer" } From b99087d88a1f6e2d6f254b5ff87608f85f70a67f Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 5 Apr 2024 18:34:25 +0300 Subject: [PATCH 3/3] Replace usage of deprecated `GenericChainSpec::from_genesis` with `GenericChainSpec::builder` and work around some bugs --- Cargo.lock | 6 + .../src/chain_spec.rs | 177 ++++---- crates/subspace-node/src/chain_spec.rs | 383 +++++++++--------- .../subspace-node/src/commands/run/domain.rs | 150 ++++--- .../src/domain/evm_chain_spec.rs | 117 +++--- crates/subspace-runtime/Cargo.toml | 2 + crates/subspace-runtime/src/lib.rs | 11 + domains/runtime/auto-id/Cargo.toml | 2 + domains/runtime/auto-id/src/lib.rs | 11 + domains/runtime/evm/Cargo.toml | 4 +- domains/runtime/evm/src/lib.rs | 11 + domains/test/runtime/evm/Cargo.toml | 4 +- domains/test/runtime/evm/src/lib.rs | 11 + domains/test/service/src/chain_spec.rs | 26 +- domains/test/service/src/domain.rs | 2 +- test/subspace-test-client/Cargo.toml | 1 + test/subspace-test-client/src/chain_spec.rs | 148 ++++--- test/subspace-test-runtime/Cargo.toml | 2 + test/subspace-test-runtime/src/lib.rs | 11 + test/subspace-test-service/src/lib.rs | 2 +- 20 files changed, 572 insertions(+), 509 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d6e55b920e..8aa3483239 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1121,6 +1121,7 @@ dependencies = [ "sp-block-builder", "sp-core", "sp-domains", + "sp-genesis-builder", "sp-inherents", "sp-messenger", "sp-messenger-host-functions", @@ -3321,6 +3322,7 @@ dependencies = [ "sp-block-builder", "sp-core", "sp-domains", + "sp-genesis-builder", "sp-inherents", "sp-messenger", "sp-messenger-host-functions", @@ -3373,6 +3375,7 @@ dependencies = [ "sp-block-builder", "sp-core", "sp-domains", + "sp-genesis-builder", "sp-inherents", "sp-messenger", "sp-messenger-host-functions", @@ -12422,6 +12425,7 @@ dependencies = [ "sp-core", "sp-domains", "sp-domains-fraud-proof", + "sp-genesis-builder", "sp-inherents", "sp-io", "sp-messenger", @@ -12544,6 +12548,7 @@ dependencies = [ "sc-consensus-subspace", "sc-service", "schnorrkel", + "serde_json", "sp-api", "sp-consensus-subspace", "sp-core", @@ -12604,6 +12609,7 @@ dependencies = [ "sp-core", "sp-domains", "sp-domains-fraud-proof", + "sp-genesis-builder", "sp-inherents", "sp-messenger", "sp-messenger-host-functions", diff --git a/crates/subspace-malicious-operator/src/chain_spec.rs b/crates/subspace-malicious-operator/src/chain_spec.rs index 119c18cf3f..21a065b39b 100644 --- a/crates/subspace-malicious-operator/src/chain_spec.rs +++ b/crates/subspace-malicious-operator/src/chain_spec.rs @@ -3,7 +3,7 @@ use evm_domain_runtime::{AccountId as AccountId20, EVMChainIdConfig, EVMConfig, use hex_literal::hex; use parity_scale_codec::Encode; use sc_chain_spec::GenericChainSpec; -use sc_service::{ChainSpec, ChainType, NoExtension}; +use sc_service::{ChainSpec, ChainType}; use sp_core::crypto::AccountId32; use sp_core::{sr25519, Pair, Public}; use sp_domains::storage::RawGenesis; @@ -34,64 +34,58 @@ fn endowed_accounts() -> Vec<(MultiAccountId, Balance)> { .collect() } -pub fn domain_dev_config() -> GenericChainSpec { +pub fn domain_dev_config( +) -> Result, String> { // Alith is sudo account let sudo_account = AccountId20::from(hex!("f24FF3a9CF04c71Dbc94D0b566f7A27B94566cac")); - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - GenericChainSpec::from_genesis( - // Name - "Development", - // ID - "evm_domain_dev", - ChainType::Development, - move || { - // This is the simplest bytecode to revert without returning any data. - // We will pre-deploy it under all of our precompiles to ensure they can be called from - // within contracts. - // (PUSH1 0x00 PUSH1 0x00 REVERT) - let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; - - evm_domain_runtime::RuntimeGenesisConfig { - system: evm_domain_runtime::SystemConfig::default(), - sudo: evm_domain_runtime::SudoConfig { - key: Some(sudo_account), - }, - balances: evm_domain_runtime::BalancesConfig::default(), - // this is set to default and chain_id will be set into genesis during the domain - // instantiation on Consensus runtime. - evm_chain_id: EVMChainIdConfig::default(), - evm: EVMConfig { - // We need _some_ code inserted at the precompile address so that - // the evm will actually call the address. - accounts: Precompiles::used_addresses() - .into_iter() - .map(|addr| { - ( - addr, - fp_evm::GenesisAccount { - nonce: Default::default(), - balance: Default::default(), - storage: Default::default(), - code: revert_bytecode.clone(), - }, - ) - }) - .collect(), - ..Default::default() - }, - ..Default::default() - } - }, - vec![], - None, - None, - None, - None, - None, + Ok(GenericChainSpec::builder( evm_domain_runtime::WASM_BINARY.expect("WASM binary was not build, please build it!"), + None, ) + .with_name("Development") + .with_id("evm_domain_dev") + .with_chain_type(ChainType::Development) + .with_genesis_config({ + // This is the simplest bytecode to revert without returning any data. + // We will pre-deploy it under all of our precompiles to ensure they can be called from + // within contracts. + // (PUSH1 0x00 PUSH1 0x00 REVERT) + let revert_bytecode = vec![0x60, 0x00, 0x60, 0x00, 0xFD]; + + serde_json::to_value(evm_domain_runtime::RuntimeGenesisConfig { + system: evm_domain_runtime::SystemConfig::default(), + sudo: evm_domain_runtime::SudoConfig { + key: Some(sudo_account), + }, + balances: evm_domain_runtime::BalancesConfig::default(), + // this is set to default and chain_id will be set into genesis during the domain + // instantiation on Consensus runtime. + evm_chain_id: EVMChainIdConfig::default(), + evm: EVMConfig { + // We need _some_ code inserted at the precompile address so that + // the evm will actually call the address. + accounts: Precompiles::used_addresses() + .into_iter() + .map(|addr| { + ( + addr, + fp_evm::GenesisAccount { + nonce: Default::default(), + balance: Default::default(), + storage: Default::default(), + code: revert_bytecode.clone(), + }, + ) + }) + .collect(), + ..Default::default() + }, + ..Default::default() + }) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))? + }) + .build()) } pub(crate) fn consensus_dev_sudo_account() -> AccountId32 { @@ -103,7 +97,7 @@ pub fn create_domain_spec( raw_genesis: RawGenesis, ) -> Result, String> { let mut chain_spec = match chain_id { - "dev" => domain_dev_config(), + "dev" => domain_dev_config()?, path => GenericChainSpec::::from_json_file( std::path::PathBuf::from(path), )?, @@ -114,7 +108,7 @@ pub fn create_domain_spec( pub fn load_domain_chain_spec(spec_id: &str) -> Result, String> { let chain_spec = match spec_id { - "dev" => domain_dev_config(), + "dev" => domain_dev_config()?, path => GenericChainSpec::::from_json_file( std::path::PathBuf::from(path), )?, @@ -163,7 +157,7 @@ pub fn dev_config() -> Result Result Result serde_json::Value { + let Some(runtime_version) = genesis_config + .get_mut("domains") + .and_then(|domains| domains.get_mut("genesisDomain")) + .and_then(|genesis_domain| genesis_domain.get_mut("runtime_version")) + else { + return genesis_config; + }; + + if let Some(spec_name) = runtime_version.get_mut("specName") { + if let Some(spec_name_bytes) = spec_name + .as_str() + .map(|spec_name| spec_name.as_bytes().to_vec()) + { + *spec_name = serde_json::to_value(spec_name_bytes) + .expect("Bytes serialization doesn't fail; qed"); + } + } + + if let Some(impl_name) = runtime_version.get_mut("implName") { + if let Some(impl_name_bytes) = impl_name + .as_str() + .map(|impl_name| impl_name.as_bytes().to_vec()) + { + *impl_name = serde_json::to_value(impl_name_bytes) + .expect("Bytes serialization doesn't fail; qed"); + } + } + + genesis_config +} diff --git a/crates/subspace-node/src/chain_spec.rs b/crates/subspace-node/src/chain_spec.rs index 94f6b4956c..625b6bb991 100644 --- a/crates/subspace-node/src/chain_spec.rs +++ b/crates/subspace-node/src/chain_spec.rs @@ -24,7 +24,7 @@ use domain_runtime_primitives::MultiAccountId; use hex_literal::hex; use parity_scale_codec::Encode; use sc_chain_spec::GenericChainSpec; -use sc_service::{ChainType, NoExtension}; +use sc_service::ChainType; use sc_subspace_chain_specs::{DEVNET_CHAIN_SPEC, GEMINI_3H_CHAIN_SPEC}; use sc_telemetry::TelemetryEndpoints; use sp_consensus_subspace::FarmerPublicKey; @@ -114,57 +114,71 @@ struct GenesisDomainParams { } pub fn gemini_3h_compiled() -> Result, String> { - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - Ok(GenericChainSpec::from_genesis( - // Name - "Subspace Gemini 3h", - // ID - "subspace_gemini_3h", - ChainType::Custom("Subspace Gemini 3h".to_string()), - || { - let sudo_account = - AccountId::from_ss58check("5DNwQTHfARgKoa2NdiUM51ZUow7ve5xG9S2yYdSbVQcnYxBA") - .expect("Wrong root account address"); + Ok(GenericChainSpec::builder( + WASM_BINARY.ok_or_else(|| "Wasm binary must be built for Gemini".to_string())?, + None, + ) + .with_name("Subspace Gemini 3h") + // ID + .with_id("subspace_gemini_3h") + .with_chain_type(ChainType::Custom("Subspace Gemini 3h".to_string())) + .with_telemetry_endpoints( + TelemetryEndpoints::new(vec![(SUBSPACE_TELEMETRY_URL.into(), 1)]) + .map_err(|error| error.to_string())?, + ) + .with_protocol_id("subspace-gemini-3h") + .with_properties({ + let mut properties = chain_spec_properties(); + properties.insert( + "potExternalEntropy".to_string(), + serde_json::to_value(None::).expect("Serialization is infallible; qed"), + ); + properties + }) + .with_genesis_config({ + let sudo_account = + AccountId::from_ss58check("5DNwQTHfARgKoa2NdiUM51ZUow7ve5xG9S2yYdSbVQcnYxBA") + .expect("Wrong root account address"); - let mut balances = vec![(sudo_account.clone(), 1_000 * SSC)]; - let vesting_schedules = TOKEN_GRANTS - .iter() - .flat_map(|&(account_address, amount)| { - let account_id = AccountId::from_ss58check(account_address) - .expect("Wrong vesting account address"); - let amount: Balance = amount * SSC; + let mut balances = vec![(sudo_account.clone(), 1_000 * SSC)]; + let vesting_schedules = TOKEN_GRANTS + .iter() + .flat_map(|&(account_address, amount)| { + let account_id = AccountId::from_ss58check(account_address) + .expect("Wrong vesting account address"); + let amount: Balance = amount * SSC; - // TODO: Adjust start block to real value before mainnet launch - let start_block = 100_000_000; - let one_month_in_blocks = - u32::try_from(3600 * 24 * 30 * MILLISECS_PER_BLOCK / 1000) - .expect("One month of blocks always fits in u32; qed"); + // TODO: Adjust start block to real value before mainnet launch + let start_block = 100_000_000; + let one_month_in_blocks = + u32::try_from(3600 * 24 * 30 * MILLISECS_PER_BLOCK / 1000) + .expect("One month of blocks always fits in u32; qed"); - // Add balance so it can be locked - balances.push((account_id.clone(), amount)); + // Add balance so it can be locked + balances.push((account_id.clone(), amount)); - [ - // 1/4 of tokens are released after 1 year. - ( - account_id.clone(), - start_block, - one_month_in_blocks * 12, - 1, - amount / 4, - ), - // 1/48 of tokens are released every month after that for 3 more years. - ( - account_id, - start_block + one_month_in_blocks * 12, - one_month_in_blocks, - 36, - amount / 48, - ), - ] - }) - .collect::>(); - subspace_genesis_config( + [ + // 1/4 of tokens are released after 1 year. + ( + account_id.clone(), + start_block, + one_month_in_blocks * 12, + 1, + amount / 4, + ), + // 1/48 of tokens are released every month after that for 3 more years. + ( + account_id, + start_block + one_month_in_blocks * 12, + one_month_in_blocks, + 36, + amount / 48, + ), + ] + }) + .collect::>(); + patch_domain_runtime_version( + serde_json::to_value(subspace_genesis_config( SpecId::Gemini, sudo_account.clone(), balances, @@ -207,32 +221,11 @@ pub fn gemini_3h_compiled() -> Result, St sudo_account, ]), }, - ) - }, - // Bootnodes - vec![], - // Telemetry - Some( - TelemetryEndpoints::new(vec![(SUBSPACE_TELEMETRY_URL.into(), 1)]) - .map_err(|error| error.to_string())?, - ), - // Protocol ID - Some("subspace-gemini-3h"), - None, - // Properties - Some({ - let mut properties = chain_spec_properties(); - properties.insert( - "potExternalEntropy".to_string(), - serde_json::to_value(None::).expect("Serialization is infallible; qed"), - ); - properties - }), - // Extensions - NoExtension::None, - // Code - WASM_BINARY.expect("Wasm binary must be built for Gemini"), - )) + )?) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + ) + }) + .build()) } pub fn gemini_3h_config() -> Result, String> { @@ -244,57 +237,70 @@ pub fn devnet_config() -> Result, String> } pub fn devnet_config_compiled() -> Result, String> { - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - Ok(GenericChainSpec::from_genesis( - // Name - "Subspace Dev network", - // ID - "subspace_devnet", - ChainType::Custom("Testnet".to_string()), - || { - let sudo_account = - AccountId::from_ss58check("5CXTmJEusve5ixyJufqHThmy4qUrrm6FyLCR7QfE4bbyMTNC") - .expect("Wrong root account address"); + Ok(GenericChainSpec::builder( + WASM_BINARY.ok_or_else(|| "Wasm binary must be built for Devnet".to_string())?, + None, + ) + .with_name("Subspace Dev network") + .with_id("subspace_devnet") + .with_chain_type(ChainType::Custom("Testnet".to_string())) + .with_telemetry_endpoints( + TelemetryEndpoints::new(vec![(SUBSPACE_TELEMETRY_URL.into(), 1)]) + .map_err(|error| error.to_string())?, + ) + .with_protocol_id("subspace-devnet") + .with_properties({ + let mut properties = chain_spec_properties(); + properties.insert( + "potExternalEntropy".to_string(), + serde_json::to_value(None::).expect("Serialization is infallible; qed"), + ); + properties + }) + .with_genesis_config({ + let sudo_account = + AccountId::from_ss58check("5CXTmJEusve5ixyJufqHThmy4qUrrm6FyLCR7QfE4bbyMTNC") + .expect("Wrong root account address"); - let mut balances = vec![(sudo_account.clone(), Balance::MAX / 2)]; - let vesting_schedules = TOKEN_GRANTS - .iter() - .flat_map(|&(account_address, amount)| { - let account_id = AccountId::from_ss58check(account_address) - .expect("Wrong vesting account address"); - let amount: Balance = amount * SSC; + let mut balances = vec![(sudo_account.clone(), Balance::MAX / 2)]; + let vesting_schedules = TOKEN_GRANTS + .iter() + .flat_map(|&(account_address, amount)| { + let account_id = AccountId::from_ss58check(account_address) + .expect("Wrong vesting account address"); + let amount: Balance = amount * SSC; - // TODO: Adjust start block to real value before mainnet launch - let start_block = 100_000_000; - let one_month_in_blocks = - u32::try_from(3600 * 24 * 30 * MILLISECS_PER_BLOCK / 1000) - .expect("One month of blocks always fits in u32; qed"); + // TODO: Adjust start block to real value before mainnet launch + let start_block = 100_000_000; + let one_month_in_blocks = + u32::try_from(3600 * 24 * 30 * MILLISECS_PER_BLOCK / 1000) + .expect("One month of blocks always fits in u32; qed"); - // Add balance so it can be locked - balances.push((account_id.clone(), amount)); + // Add balance so it can be locked + balances.push((account_id.clone(), amount)); - [ - // 1/4 of tokens are released after 1 year. - ( - account_id.clone(), - start_block, - one_month_in_blocks * 12, - 1, - amount / 4, - ), - // 1/48 of tokens are released every month after that for 3 more years. - ( - account_id, - start_block + one_month_in_blocks * 12, - one_month_in_blocks, - 36, - amount / 48, - ), - ] - }) - .collect::>(); - subspace_genesis_config( + [ + // 1/4 of tokens are released after 1 year. + ( + account_id.clone(), + start_block, + one_month_in_blocks * 12, + 1, + amount / 4, + ), + // 1/48 of tokens are released every month after that for 3 more years. + ( + account_id, + start_block + one_month_in_blocks * 12, + one_month_in_blocks, + 36, + amount / 48, + ), + ] + }) + .collect::>(); + patch_domain_runtime_version( + serde_json::to_value(subspace_genesis_config( SpecId::DevNet, sudo_account.clone(), balances, @@ -329,47 +335,30 @@ pub fn devnet_config_compiled() -> Result sudo_account, ]), }, - ) - }, - // Bootnodes - vec![], - // Telemetry - Some( - TelemetryEndpoints::new(vec![(SUBSPACE_TELEMETRY_URL.into(), 1)]) - .map_err(|error| error.to_string())?, - ), - // Protocol ID - Some("subspace-devnet"), - None, - // Properties - Some({ + )?) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + ) + }) + .build()) +} + +pub fn dev_config() -> Result, String> { + let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; + + Ok(GenericChainSpec::builder(wasm_binary, None) + .with_name("Subspace development") + .with_id("subspace_dev") + .with_chain_type(ChainType::Development) + .with_properties({ let mut properties = chain_spec_properties(); properties.insert( "potExternalEntropy".to_string(), serde_json::to_value(None::).expect("Serialization is infallible; qed"), ); properties - }), - // Extensions - NoExtension::None, - // Code - WASM_BINARY.expect("Wasm binary must be built for Devnet"), - )) -} - -pub fn dev_config() -> Result, String> { - let wasm_binary = WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?; - - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - Ok(GenericChainSpec::from_genesis( - // Name - "Subspace development", - // ID - "subspace_dev", - ChainType::Development, - || { - subspace_genesis_config( + }) + .with_genesis_config(patch_domain_runtime_version( + serde_json::to_value(subspace_genesis_config( SpecId::Dev, // Sudo account get_account_id_from_seed("Alice"), @@ -407,29 +396,10 @@ pub fn dev_config() -> Result, String> { get_account_id_from_seed("Alice"), ]), }, - ) - }, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - None, - None, - // Properties - Some({ - let mut properties = chain_spec_properties(); - properties.insert( - "potExternalEntropy".to_string(), - serde_json::to_value(None::).expect("Serialization is infallible; qed"), - ); - properties - }), - // Extensions - NoExtension::None, - // Code - wasm_binary, - )) + )?) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + )) + .build()) } /// Configure initial storage state for FRAME modules. @@ -441,7 +411,7 @@ fn subspace_genesis_config( vesting: Vec<(AccountId, BlockNumber, BlockNumber, u32, Balance)>, genesis_params: GenesisParams, genesis_domain_params: GenesisDomainParams, -) -> RuntimeGenesisConfig { +) -> Result { let GenesisParams { enable_rewards_at, allow_authoring_by, @@ -456,15 +426,15 @@ fn subspace_genesis_config( let raw_genesis_storage = { let domain_chain_spec = match spec_id { - SpecId::Dev => evm_chain_spec::development_config(move || { - evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id) - }), - SpecId::Gemini => evm_chain_spec::gemini_3h_config(move || { - evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id) - }), - SpecId::DevNet => evm_chain_spec::devnet_config(move || { - evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id) - }), + SpecId::Dev => evm_chain_spec::development_config( + evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id), + )?, + SpecId::Gemini => evm_chain_spec::gemini_3h_config( + evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id), + )?, + SpecId::DevNet => evm_chain_spec::devnet_config( + evm_chain_spec::get_testnet_genesis_by_spec_id(spec_id), + )?, }; let storage = domain_chain_spec .build_storage() @@ -473,7 +443,7 @@ fn subspace_genesis_config( raw_genesis.encode() }; - RuntimeGenesisConfig { + Ok(RuntimeGenesisConfig { system: SystemConfig::default(), balances: BalancesConfig { balances }, transaction_payment: Default::default(), @@ -519,5 +489,38 @@ fn subspace_genesis_config( initial_balances: genesis_domain_params.initial_balances, }), }, + }) +} + +// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/4001 +fn patch_domain_runtime_version(mut genesis_config: serde_json::Value) -> serde_json::Value { + let Some(runtime_version) = genesis_config + .get_mut("domains") + .and_then(|domains| domains.get_mut("genesisDomain")) + .and_then(|genesis_domain| genesis_domain.get_mut("runtime_version")) + else { + return genesis_config; + }; + + if let Some(spec_name) = runtime_version.get_mut("specName") { + if let Some(spec_name_bytes) = spec_name + .as_str() + .map(|spec_name| spec_name.as_bytes().to_vec()) + { + *spec_name = serde_json::to_value(spec_name_bytes) + .expect("Bytes serialization doesn't fail; qed"); + } } + + if let Some(impl_name) = runtime_version.get_mut("implName") { + if let Some(impl_name_bytes) = impl_name + .as_str() + .map(|impl_name| impl_name.as_bytes().to_vec()) + { + *impl_name = serde_json::to_value(impl_name_bytes) + .expect("Bytes serialization doesn't fail; qed"); + } + } + + genesis_config } diff --git a/crates/subspace-node/src/commands/run/domain.rs b/crates/subspace-node/src/commands/run/domain.rs index 493ff0ebd1..47771c1fe5 100644 --- a/crates/subspace-node/src/commands/run/domain.rs +++ b/crates/subspace-node/src/commands/run/domain.rs @@ -10,9 +10,7 @@ use domain_service::config::{ SubstrateConfiguration, SubstrateNetworkConfiguration, SubstrateRpcConfiguration, }; use domain_service::{FullBackend, FullClient}; -use evm_domain_runtime::{ - AccountId as AccountId20, RuntimeGenesisConfig as EvmRuntimeGenesisConfig, -}; +use evm_domain_runtime::AccountId as AccountId20; use futures::StreamExt; use sc_chain_spec::{ChainType, GenericChainSpec, Properties}; use sc_cli::{ @@ -198,86 +196,74 @@ pub(super) fn create_domain_configuration( }); } - // Derive domain chain spec from consensus chain spec - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - let chain_spec = GenericChainSpec::::from_genesis( - // Name - &format!( - "{} Domain {}", - consensus_chain_configuration.chain_spec.name(), - domain_id - ), - // ID - &format!( - "{}_domain_{}", - consensus_chain_configuration.chain_spec.id(), - domain_id - ), - ChainType::Custom("SubspaceDomain".to_string()), - // The value of the `EvmRuntimeGenesisConfig` doesn't matter since genesis storage will be - // replaced before actually running the domain - EvmRuntimeGenesisConfig::default, - // Bootnodes - consensus_chain_configuration - .chain_spec - .properties() - .get("domainsBootstrapNodes") - .map(|d| { - serde_json::from_value::>>(d.clone()) - }) - .transpose() - .map_err(|error| { - sc_service::Error::Other(format!( - "Failed to decode Domains bootstrap nodes: {error:?}" - )) - })? - .unwrap_or_default() - .get(&domain_id) - .cloned() - .unwrap_or_default(), - // Telemetry - None, - // Protocol ID - Some(&format!( - "{}-domain-{}", - consensus_chain_configuration.chain_spec.id(), - domain_id - )), - None, - // Properties - Some({ - let mut properties = Properties::new(); - - if let Some(ss58_format) = consensus_chain_configuration - .chain_spec - .properties() - .get("ss58Format") - { - properties.insert("ss58Format".to_string(), ss58_format.clone()); - } - if let Some(decimal_places) = consensus_chain_configuration - .chain_spec - .properties() - .get("tokenDecimals") - { - properties.insert("tokenDecimals".to_string(), decimal_places.clone()); - } - if let Some(token_symbol) = consensus_chain_configuration - .chain_spec - .properties() - .get("tokenSymbol") - { - properties.insert("tokenSymbol".to_string(), token_symbol.clone()); - } + // Code doesn't matter, it will be replaced before running just like genesis storage + let chain_spec = + GenericChainSpec::::builder(&[], None) + .with_name(&format!( + "{} Domain {}", + consensus_chain_configuration.chain_spec.name(), + domain_id + )) + .with_id(&format!( + "{}_domain_{}", + consensus_chain_configuration.chain_spec.id(), + domain_id + )) + .with_chain_type(ChainType::Custom("SubspaceDomain".to_string())) + .with_boot_nodes( + consensus_chain_configuration + .chain_spec + .properties() + .get("domainsBootstrapNodes") + .map(|d| { + serde_json::from_value::>>( + d.clone(), + ) + }) + .transpose() + .map_err(|error| { + sc_service::Error::Other(format!( + "Failed to decode Domains bootstrap nodes: {error:?}" + )) + })? + .unwrap_or_default() + .get(&domain_id) + .cloned() + .unwrap_or_default(), + ) + .with_protocol_id(&format!( + "{}-domain-{}", + consensus_chain_configuration.chain_spec.id(), + domain_id + )) + .with_properties({ + let mut properties = Properties::new(); + + if let Some(ss58_format) = consensus_chain_configuration + .chain_spec + .properties() + .get("ss58Format") + { + properties.insert("ss58Format".to_string(), ss58_format.clone()); + } + if let Some(decimal_places) = consensus_chain_configuration + .chain_spec + .properties() + .get("tokenDecimals") + { + properties.insert("tokenDecimals".to_string(), decimal_places.clone()); + } + if let Some(token_symbol) = consensus_chain_configuration + .chain_spec + .properties() + .get("tokenSymbol") + { + properties.insert("tokenSymbol".to_string(), token_symbol.clone()); + } - properties - }), - // Extensions - None, - // Code doesn't matter, it will be replaced before running - &[], - ); + properties + }) + .build(); let base_path = consensus_chain_configuration .base_path diff --git a/crates/subspace-node/src/domain/evm_chain_spec.rs b/crates/subspace-node/src/domain/evm_chain_spec.rs index c45ae4547e..31cb1c9d28 100644 --- a/crates/subspace-node/src/domain/evm_chain_spec.rs +++ b/crates/subspace-node/src/domain/evm_chain_spec.rs @@ -42,90 +42,67 @@ fn get_dev_accounts() -> Vec { ] } -pub fn development_config RuntimeGenesisConfig + 'static + Send + Sync>( - constructor: F, -) -> GenericChainSpec { - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - GenericChainSpec::from_genesis( - // Name - "Development", - // ID - "evm_domain_dev", - ChainType::Development, - constructor, - vec![], +pub fn development_config( + runtime_genesis_config: RuntimeGenesisConfig, +) -> Result, String> { + Ok(GenericChainSpec::builder( + WASM_BINARY.ok_or_else(|| "WASM binary was not build, please build it!".to_string())?, None, - None, - None, - Some(chain_spec_properties()), - None, - // Code - WASM_BINARY.expect("WASM binary was not build, please build it!"), ) + .with_name("Development") + .with_id("evm_domain_dev") + .with_chain_type(ChainType::Development) + .with_genesis_config( + serde_json::to_value(runtime_genesis_config) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + ) + .with_properties(chain_spec_properties()) + .build()) } -pub fn gemini_3h_config RuntimeGenesisConfig + 'static + Send + Sync>( - constructor: F, -) -> GenericChainSpec { - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - GenericChainSpec::from_genesis( - // Name - "Subspace Gemini 3h EVM Domain", - // ID - "subspace_gemini_3h_evm_domain", - ChainType::Live, - constructor, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - Some("subspace-gemini-3h-evm-domain"), +pub fn gemini_3h_config( + runtime_genesis_config: RuntimeGenesisConfig, +) -> Result, String> { + Ok(GenericChainSpec::builder( + WASM_BINARY.ok_or_else(|| "WASM binary was not build, please build it!".to_string())?, None, - // Properties - Some(chain_spec_properties()), - // Extensions - None, - // Code - WASM_BINARY.expect("WASM binary was not build, please build it!"), ) + .with_name("Subspace Gemini 3h EVM Domain") + .with_id("subspace_gemini_3h_evm_domain") + .with_chain_type(ChainType::Live) + .with_genesis_config( + serde_json::to_value(runtime_genesis_config) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + ) + .with_protocol_id("subspace-gemini-3h-evm-domain") + .with_properties(chain_spec_properties()) + .build()) } -pub fn devnet_config RuntimeGenesisConfig + 'static + Send + Sync>( - constructor: F, -) -> GenericChainSpec { - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - GenericChainSpec::from_genesis( - // Name - "Subspace Devnet EVM Domain", - // ID - "subspace_devnet_evm_domain", - ChainType::Custom("Testnet".to_string()), - constructor, - // Bootnodes - vec![], - // Telemetry - None, - // Protocol ID - Some("subspace-devnet-evm-domain"), +pub fn devnet_config( + runtime_genesis_config: RuntimeGenesisConfig, +) -> Result, String> { + Ok(GenericChainSpec::builder( + WASM_BINARY.ok_or_else(|| "WASM binary was not build, please build it!".to_string())?, None, - // Properties - Some(chain_spec_properties()), - // Extensions - None, - // Code - WASM_BINARY.expect("WASM binary was not build, please build it!"), ) + .with_name("Subspace Devnet EVM Domain") + .with_id("subspace_devnet_evm_domain") + .with_chain_type(ChainType::Custom("Testnet".to_string())) + .with_genesis_config( + serde_json::to_value(runtime_genesis_config) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + ) + .with_protocol_id("subspace-devnet-evm-domain") + .with_properties(chain_spec_properties()) + .build()) } pub fn load_chain_spec(spec_id: &str) -> Result, String> { let chain_spec = match spec_id { - "gemini-3h" => gemini_3h_config(move || get_testnet_genesis_by_spec_id(SpecId::Gemini)), - "devnet" => devnet_config(move || get_testnet_genesis_by_spec_id(SpecId::DevNet)), - "dev" => development_config(move || get_testnet_genesis_by_spec_id(SpecId::Dev)), + "gemini-3h" => gemini_3h_config(get_testnet_genesis_by_spec_id(SpecId::Gemini))?, + "devnet" => devnet_config(get_testnet_genesis_by_spec_id(SpecId::DevNet))?, + "dev" => development_config(get_testnet_genesis_by_spec_id(SpecId::Dev))?, path => GenericChainSpec::from_json_file(std::path::PathBuf::from(path))?, }; Ok(Box::new(chain_spec)) diff --git a/crates/subspace-runtime/Cargo.toml b/crates/subspace-runtime/Cargo.toml index a43721d120..9e1719271b 100644 --- a/crates/subspace-runtime/Cargo.toml +++ b/crates/subspace-runtime/Cargo.toml @@ -49,6 +49,7 @@ sp-consensus-slots = { default-features = false, git = "https://github.com/subsp sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-domains = { version = "0.1.0", default-features = false, path = "../sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../sp-domains-fraud-proof" } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger-host-functions" } @@ -108,6 +109,7 @@ std = [ "sp-core/std", "sp-domains/std", "sp-domains-fraud-proof/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", "sp-messenger/std", diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index fd76cdecf5..04e29c4ec8 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -37,6 +37,7 @@ use domain_runtime_primitives::opaque::Header as DomainHeader; use domain_runtime_primitives::{ AccountIdConverter, BlockNumber as DomainNumber, Hash as DomainHash, }; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; use frame_support::inherent::ProvideInherent; use frame_support::traits::{ ConstU16, ConstU32, ConstU64, ConstU8, Currency, Everything, Get, OnRuntimeUpgrade, @@ -1401,6 +1402,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( diff --git a/domains/runtime/auto-id/Cargo.toml b/domains/runtime/auto-id/Cargo.toml index 64275409fe..5493230ab7 100644 --- a/domains/runtime/auto-id/Cargo.toml +++ b/domains/runtime/auto-id/Cargo.toml @@ -40,6 +40,7 @@ sp-api = { default-features = false, git = "https://github.com/subspace/polkadot sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../primitives/messenger-host-functions" } @@ -88,6 +89,7 @@ std = [ "sp-block-builder/std", "sp-core/std", "sp-domains/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-messenger/std", "sp-messenger-host-functions/std", diff --git a/domains/runtime/auto-id/src/lib.rs b/domains/runtime/auto-id/src/lib.rs index 1c70dbad32..fa71305162 100644 --- a/domains/runtime/auto-id/src/lib.rs +++ b/domains/runtime/auto-id/src/lib.rs @@ -23,6 +23,7 @@ use domain_runtime_primitives::{ SLOT_DURATION, }; use frame_support::dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo}; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; use frame_support::inherent::ProvideInherent; use frame_support::pallet_prelude::TypeInfo; use frame_support::traits::fungible::Credit; @@ -838,6 +839,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( diff --git a/domains/runtime/evm/Cargo.toml b/domains/runtime/evm/Cargo.toml index d92affba81..8387a80eee 100644 --- a/domains/runtime/evm/Cargo.toml +++ b/domains/runtime/evm/Cargo.toml @@ -49,6 +49,7 @@ sp-api = { default-features = false, git = "https://github.com/subspace/polkadot sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-domains = { version = "0.1.0", path = "../../../crates/sp-domains", default-features = false } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../primitives/messenger-host-functions" } @@ -106,13 +107,14 @@ std = [ "sp-block-builder/std", "sp-core/std", "sp-domains/std", - "sp-session/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-messenger/std", "sp-messenger-host-functions/std", "sp-mmr-primitives/std", "sp-offchain/std", "sp-runtime/std", + "sp-session/std", "sp-std/std", "sp-storage?/std", "sp-subspace-mmr/std", diff --git a/domains/runtime/evm/src/lib.rs b/domains/runtime/evm/src/lib.rs index 18ca0a5b6c..947c730ed4 100644 --- a/domains/runtime/evm/src/lib.rs +++ b/domains/runtime/evm/src/lib.rs @@ -26,6 +26,7 @@ use domain_runtime_primitives::{ use fp_account::EthereumSignature; use fp_self_contained::{CheckedSignature, SelfContainedCall}; use frame_support::dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo}; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; use frame_support::inherent::ProvideInherent; use frame_support::pallet_prelude::TypeInfo; use frame_support::traits::fungible::Credit; @@ -1313,6 +1314,16 @@ impl_runtime_apis! { } } + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } + #[cfg(feature = "runtime-benchmarks")] impl frame_benchmarking::Benchmark for Runtime { fn benchmark_metadata(extra: bool) -> ( diff --git a/domains/test/runtime/evm/Cargo.toml b/domains/test/runtime/evm/Cargo.toml index 1f0f892195..43d2482198 100644 --- a/domains/test/runtime/evm/Cargo.toml +++ b/domains/test/runtime/evm/Cargo.toml @@ -48,6 +48,7 @@ sp-api = { default-features = false, git = "https://github.com/subspace/polkadot sp-block-builder = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-domains = { version = "0.1.0", path = "../../../../crates/sp-domains", default-features = false } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-inherents = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-messenger = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../../primitives/messenger-host-functions" } @@ -101,13 +102,14 @@ std = [ "sp-block-builder/std", "sp-core/std", "sp-domains/std", - "sp-session/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-messenger/std", "sp-messenger-host-functions/std", "sp-mmr-primitives/std", "sp-offchain/std", "sp-runtime/std", + "sp-session/std", "sp-std/std", "sp-subspace-mmr/std", "sp-transaction-pool/std", diff --git a/domains/test/runtime/evm/src/lib.rs b/domains/test/runtime/evm/src/lib.rs index 5564be6f9c..fe5385b7e1 100644 --- a/domains/test/runtime/evm/src/lib.rs +++ b/domains/test/runtime/evm/src/lib.rs @@ -25,6 +25,7 @@ pub use domain_runtime_primitives::{ use fp_account::EthereumSignature; use fp_self_contained::{CheckedSignature, SelfContainedCall}; use frame_support::dispatch::{DispatchClass, DispatchInfo, GetDispatchInfo}; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; use frame_support::inherent::ProvideInherent; use frame_support::pallet_prelude::TypeInfo; use frame_support::traits::{ @@ -1293,4 +1294,14 @@ impl_runtime_apis! { BlockFees::consensus_chain_byte_fee() } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } diff --git a/domains/test/service/src/chain_spec.rs b/domains/test/service/src/chain_spec.rs index 0bf11f7ebf..e433a74509 100644 --- a/domains/test/service/src/chain_spec.rs +++ b/domains/test/service/src/chain_spec.rs @@ -5,25 +5,17 @@ use sc_service::{ChainSpec, ChainType, GenericChainSpec}; use sp_domains::storage::RawGenesis; /// Create chain spec -pub fn create_domain_spec(raw_genesis: RawGenesis) -> Box { - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - let mut chain_spec = GenericChainSpec::<_, _, ()>::from_genesis( - "Local Testnet", - "local_testnet", - ChainType::Local, - // The value of the `RuntimeGenesisConfig` doesn't matter since it will be overwritten later - RuntimeGenesisConfig::default, - vec![], - None, - None, - None, - None, - None, +pub fn create_domain_spec(raw_genesis: RawGenesis) -> GenericChainSpec { + let mut chain_spec = GenericChainSpec::builder( evm_domain_test_runtime::WASM_BINARY.expect("WASM binary was not build, please build it!"), - ); + None, + ) + .with_name("Local Testnet") + .with_id("local_testnet") + .with_chain_type(ChainType::Local) + .build(); chain_spec.set_storage(raw_genesis.into_storage()); - Box::new(chain_spec) + chain_spec } diff --git a/domains/test/service/src/domain.rs b/domains/test/service/src/domain.rs index 10273cb38e..2f86177f33 100644 --- a/domains/test/service/src/domain.rs +++ b/domains/test/service/src/domain.rs @@ -180,7 +180,7 @@ where domain_nodes_exclusive, role.clone(), BasePath::new(base_path.path().join(format!("domain-{domain_id:?}"))), - chain_spec, + Box::new(chain_spec) as Box<_>, ) .expect("could not generate domain node Configuration"); diff --git a/test/subspace-test-client/Cargo.toml b/test/subspace-test-client/Cargo.toml index 3628fb4b2d..8543a5fd89 100644 --- a/test/subspace-test-client/Cargo.toml +++ b/test/subspace-test-client/Cargo.toml @@ -25,6 +25,7 @@ sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bb sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sc-consensus-subspace = { version = "0.1.0", path = "../../crates/sc-consensus-subspace" } sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } +serde_json = "1.0.115" sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-consensus-subspace = { version = "0.1.0", path = "../../crates/sp-consensus-subspace" } sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } diff --git a/test/subspace-test-client/src/chain_spec.rs b/test/subspace-test-client/src/chain_spec.rs index 0382abb98c..b268b6ad36 100644 --- a/test/subspace-test-client/src/chain_spec.rs +++ b/test/subspace-test-client/src/chain_spec.rs @@ -18,9 +18,6 @@ use subspace_test_runtime::{ SystemConfig, VestingConfig, SSC, WASM_BINARY, }; -/// The `ChainSpec` parameterized for subspace test runtime. -pub type TestChainSpec = sc_service::GenericChainSpec; - /// Generate a crypto pair from seed. pub fn get_from_seed(seed: &str) -> ::Public { TPublic::Pair::from_string(&format!("//{seed}"), None) @@ -36,51 +33,46 @@ pub fn get_account_id_from_seed(seed: &str) -> AccountId { } /// Local testnet config (multivalidator Alice + Bob). -pub fn subspace_local_testnet_config() -> TestChainSpec { - let wasm_binary = WASM_BINARY.expect("Development wasm not available"); - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - TestChainSpec::from_genesis( - "Local Testnet", - "local_testnet", - ChainType::Local, - || { - create_genesis_config( - // Sudo account - get_account_id_from_seed("Alice"), - // Pre-funded accounts - // Alice also get more funds that are used during the domain instantiation - vec![ - ( - get_account_id_from_seed("Alice"), - (5_000 - + crate::domain_chain_spec::endowed_accounts().len() as Balance - * 2_000_000) - * SSC, - ), - (get_account_id_from_seed("Bob"), 1_000 * SSC), - (get_account_id_from_seed("Charlie"), 1_000 * SSC), - (get_account_id_from_seed("Dave"), 1_000 * SSC), - (get_account_id_from_seed("Eve"), 1_000 * SSC), - (get_account_id_from_seed("Ferdie"), 1_000 * SSC), - (get_account_id_from_seed("Alice//stash"), 1_000 * SSC), - (get_account_id_from_seed("Bob//stash"), 1_000 * SSC), - (get_account_id_from_seed("Charlie//stash"), 1_000 * SSC), - (get_account_id_from_seed("Dave//stash"), 1_000 * SSC), - (get_account_id_from_seed("Eve//stash"), 1_000 * SSC), - (get_account_id_from_seed("Ferdie//stash"), 1_000 * SSC), - ], - vec![], - ) - }, - vec![], - None, - Some("subspace-test"), +pub fn subspace_local_testnet_config() -> Result, String> { + Ok(GenericChainSpec::builder( + WASM_BINARY.ok_or_else(|| "Development wasm not available".to_string())?, None, - None, - Default::default(), - wasm_binary, ) + .with_name("Local Testnet") + .with_id("local_testnet") + .with_chain_type(ChainType::Local) + .with_genesis_config(patch_domain_runtime_version( + serde_json::to_value(create_genesis_config( + // Sudo account + get_account_id_from_seed("Alice"), + // Pre-funded accounts + // Alice also get more funds that are used during the domain instantiation + vec![ + ( + get_account_id_from_seed("Alice"), + (5_000 + + crate::domain_chain_spec::endowed_accounts().len() as Balance + * 2_000_000) + * SSC, + ), + (get_account_id_from_seed("Bob"), 1_000 * SSC), + (get_account_id_from_seed("Charlie"), 1_000 * SSC), + (get_account_id_from_seed("Dave"), 1_000 * SSC), + (get_account_id_from_seed("Eve"), 1_000 * SSC), + (get_account_id_from_seed("Ferdie"), 1_000 * SSC), + (get_account_id_from_seed("Alice//stash"), 1_000 * SSC), + (get_account_id_from_seed("Bob//stash"), 1_000 * SSC), + (get_account_id_from_seed("Charlie//stash"), 1_000 * SSC), + (get_account_id_from_seed("Dave//stash"), 1_000 * SSC), + (get_account_id_from_seed("Eve//stash"), 1_000 * SSC), + (get_account_id_from_seed("Ferdie//stash"), 1_000 * SSC), + ], + vec![], + )?) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + )) + .with_protocol_id("subspace-test") + .build()) } /// Configure initial storage state for FRAME modules. @@ -89,30 +81,27 @@ fn create_genesis_config( balances: Vec<(AccountId, Balance)>, // who, start, period, period_count, per_period vesting: Vec<(AccountId, BlockNumber, BlockNumber, u32, Balance)>, -) -> RuntimeGenesisConfig { +) -> Result { let raw_genesis_storage = { - // TODO: Migrate once https://github.com/paritytech/polkadot-sdk/issues/2963 is un-broken - #[allow(deprecated)] - let domain_chain_spec = GenericChainSpec::<_, _, ()>::from_genesis( - "", - "", - ChainType::Development, - testnet_evm_genesis, - Vec::new(), - None, - None, - None, - None, - None::<()>, - evm_domain_test_runtime::WASM_BINARY.expect("Development wasm not available"), - ); + let domain_chain_spec = + GenericChainSpec::::builder( + evm_domain_test_runtime::WASM_BINARY + .ok_or_else(|| "Development wasm not available".to_string())?, + None, + ) + .with_chain_type(ChainType::Development) + .with_genesis_config( + serde_json::to_value(testnet_evm_genesis()) + .map_err(|error| format!("Failed to serialize genesis config: {error}"))?, + ) + .build(); let storage = domain_chain_spec .build_storage() .expect("Failed to build genesis storage from genesis runtime config"); let raw_genesis = RawGenesis::from_storage(storage); raw_genesis.encode() }; - RuntimeGenesisConfig { + Ok(RuntimeGenesisConfig { system: SystemConfig::default(), balances: BalancesConfig { balances }, transaction_payment: Default::default(), @@ -164,5 +153,38 @@ fn create_genesis_config( .collect(), }), }, + }) +} + +// TODO: Workaround for https://github.com/paritytech/polkadot-sdk/issues/4001 +fn patch_domain_runtime_version(mut genesis_config: serde_json::Value) -> serde_json::Value { + let Some(runtime_version) = genesis_config + .get_mut("domains") + .and_then(|domains| domains.get_mut("genesisDomain")) + .and_then(|genesis_domain| genesis_domain.get_mut("runtime_version")) + else { + return genesis_config; + }; + + if let Some(spec_name) = runtime_version.get_mut("specName") { + if let Some(spec_name_bytes) = spec_name + .as_str() + .map(|spec_name| spec_name.as_bytes().to_vec()) + { + *spec_name = serde_json::to_value(spec_name_bytes) + .expect("Bytes serialization doesn't fail; qed"); + } } + + if let Some(impl_name) = runtime_version.get_mut("implName") { + if let Some(impl_name_bytes) = impl_name + .as_str() + .map(|impl_name| impl_name.as_bytes().to_vec()) + { + *impl_name = serde_json::to_value(impl_name_bytes) + .expect("Bytes serialization doesn't fail; qed"); + } + } + + genesis_config } diff --git a/test/subspace-test-runtime/Cargo.toml b/test/subspace-test-runtime/Cargo.toml index b541bbb474..77cd523938 100644 --- a/test/subspace-test-runtime/Cargo.toml +++ b/test/subspace-test-runtime/Cargo.toml @@ -44,6 +44,7 @@ sp-consensus-subspace = { version = "0.1.0", default-features = false, path = ". sp-core = { default-features = false, git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea" } sp-domains = { version = "0.1.0", default-features = false, path = "../../crates/sp-domains" } sp-domains-fraud-proof = { version = "0.1.0", default-features = false, path = "../../crates/sp-domains-fraud-proof" } +sp-genesis-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-inherents = { git = "https://github.com/subspace/polkadot-sdk", rev = "447bbc765020674614e9ac982163f7e11e5b03ea", default-features = false } sp-messenger = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger" } sp-messenger-host-functions = { version = "0.1.0", default-features = false, path = "../../domains/primitives/messenger-host-functions" } @@ -100,6 +101,7 @@ std = [ "sp-core/std", "sp-domains/std", "sp-domains-fraud-proof/std", + "sp-genesis-builder/std", "sp-inherents/std", "sp-messenger/std", "sp-messenger-host-functions/std", diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index 265246aee1..2c235537da 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -29,6 +29,7 @@ use domain_runtime_primitives::opaque::Header as DomainHeader; use domain_runtime_primitives::{ AccountIdConverter, BlockNumber as DomainNumber, Hash as DomainHash, }; +use frame_support::genesis_builder_helper::{build_config, create_default_config}; use frame_support::inherent::ProvideInherent; use frame_support::traits::{ ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Currency, ExistenceRequirement, Get, @@ -1514,4 +1515,14 @@ impl_runtime_apis! { Messenger::get_open_channel_for_chain(dst_chain_id).map(|(c, _)| c) } } + + impl sp_genesis_builder::GenesisBuilder for Runtime { + fn create_default_config() -> Vec { + create_default_config::() + } + + fn build_config(config: Vec) -> sp_genesis_builder::Result { + build_config::(config) + } + } } diff --git a/test/subspace-test-service/src/lib.rs b/test/subspace-test-service/src/lib.rs index b18899c2b1..2ddaa4269e 100644 --- a/test/subspace-test-service/src/lib.rs +++ b/test/subspace-test-service/src/lib.rs @@ -123,7 +123,7 @@ pub fn node_config( Role::Full }; let key_seed = key.to_seed(); - let spec = chain_spec::subspace_local_testnet_config(); + let spec = chain_spec::subspace_local_testnet_config().unwrap(); let mut network_config = NetworkConfiguration::new( key_seed.to_string(),