From 5d6196214833942485367dbe323f7a0baeb2f3f2 Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Wed, 31 Jan 2024 08:14:23 +0200 Subject: [PATCH] Update to latest Subspace release --- Cargo.lock | 85 ++++++++++++++++++++----------------------- Cargo.toml | 28 +++++++------- src/backend.rs | 31 ++++++++-------- src/backend/farmer.rs | 42 +++++++++++---------- src/main.rs | 5 +++ 5 files changed, 97 insertions(+), 94 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 21e63a87..b4d85ccc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1972,7 +1972,7 @@ checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "cross-domain-message-gossip" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "futures", "parity-scale-codec", @@ -2100,12 +2100,6 @@ dependencies = [ "cipher 0.4.4", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "curve25519-dalek" version = "2.1.3" @@ -2589,7 +2583,7 @@ dependencies = [ [[package]] name = "domain-block-preprocessor" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-trait", "domain-runtime-primitives", @@ -2615,7 +2609,7 @@ dependencies = [ [[package]] name = "domain-runtime-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "parity-scale-codec", "scale-info", @@ -4902,7 +4896,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3979b5c37ece694f1f5e51e7ecc871fdb0f517ed04ee45f88d15d6d553cb9664" dependencies = [ "cc", - "cty", "libc", ] @@ -6753,7 +6746,7 @@ dependencies = [ [[package]] name = "orml-vesting" version = "0.4.1-dev" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-support", "frame-system", @@ -6827,7 +6820,7 @@ dependencies = [ [[package]] name = "pallet-domains" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "domain-runtime-primitives", "frame-benchmarking", @@ -6851,7 +6844,7 @@ dependencies = [ [[package]] name = "pallet-messenger" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -6870,7 +6863,7 @@ dependencies = [ [[package]] name = "pallet-offences-subspace" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-support", "frame-system", @@ -6884,7 +6877,7 @@ dependencies = [ [[package]] name = "pallet-rewards" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-support", "frame-system", @@ -6896,7 +6889,7 @@ dependencies = [ [[package]] name = "pallet-runtime-configs" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-support", "frame-system", @@ -6909,7 +6902,7 @@ dependencies = [ [[package]] name = "pallet-subspace" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-benchmarking", "frame-support", @@ -6967,7 +6960,7 @@ dependencies = [ [[package]] name = "pallet-transaction-fees" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-support", "frame-system", @@ -7023,7 +7016,7 @@ dependencies = [ [[package]] name = "pallet-transporter" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "domain-runtime-primitives", "frame-benchmarking", @@ -8661,7 +8654,7 @@ dependencies = [ [[package]] name = "sc-consensus-subspace" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-trait", "futures", @@ -8701,7 +8694,7 @@ dependencies = [ [[package]] name = "sc-consensus-subspace-rpc" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-oneshot", "futures", @@ -9018,7 +9011,7 @@ dependencies = [ [[package]] name = "sc-proof-of-time" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "atomic", "core_affinity", @@ -9238,7 +9231,7 @@ dependencies = [ [[package]] name = "sc-subspace-block-relay" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-channel", "async-trait", @@ -9263,7 +9256,7 @@ dependencies = [ [[package]] name = "sc-subspace-chain-specs" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "sc-chain-spec", "sc-service", @@ -10083,7 +10076,7 @@ dependencies = [ [[package]] name = "sp-consensus-subspace" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-trait", "log", @@ -10198,7 +10191,7 @@ dependencies = [ [[package]] name = "sp-domain-digests" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "parity-scale-codec", "sp-runtime", @@ -10207,7 +10200,7 @@ dependencies = [ [[package]] name = "sp-domains" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "blake2", "domain-runtime-primitives", @@ -10238,7 +10231,7 @@ dependencies = [ [[package]] name = "sp-domains-fraud-proof" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "domain-block-preprocessor", "domain-runtime-primitives", @@ -10270,7 +10263,7 @@ dependencies = [ [[package]] name = "sp-executive" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-trait", "parity-scale-codec", @@ -10362,7 +10355,7 @@ dependencies = [ [[package]] name = "sp-messenger" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "frame-support", "hash-db", @@ -10392,7 +10385,7 @@ dependencies = [ [[package]] name = "sp-objects" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "sp-api", "sp-std", @@ -10704,7 +10697,7 @@ dependencies = [ [[package]] name = "space-acres" -version = "0.0.22" +version = "0.0.23" dependencies = [ "anyhow", "arc-swap", @@ -10920,7 +10913,7 @@ dependencies = [ [[package]] name = "subspace-archiving" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "parity-scale-codec", "rayon", @@ -10933,7 +10926,7 @@ dependencies = [ [[package]] name = "subspace-core-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "blake3", "derive_more", @@ -10956,7 +10949,7 @@ dependencies = [ [[package]] name = "subspace-erasure-coding" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "kzg", "rust-kzg-blst", @@ -10966,7 +10959,7 @@ dependencies = [ [[package]] name = "subspace-farmer" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "anyhow", "async-lock 2.8.0", @@ -11024,7 +11017,7 @@ dependencies = [ [[package]] name = "subspace-farmer-components" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-lock 2.8.0", "async-trait", @@ -11054,7 +11047,7 @@ dependencies = [ [[package]] name = "subspace-metrics" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "actix-web", "parking_lot 0.12.1", @@ -11066,7 +11059,7 @@ dependencies = [ [[package]] name = "subspace-networking" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "actix-web", "async-mutex", @@ -11105,7 +11098,7 @@ dependencies = [ [[package]] name = "subspace-proof-of-space" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "chacha20", "derive_more", @@ -11118,7 +11111,7 @@ dependencies = [ [[package]] name = "subspace-proof-of-time" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "aes 0.8.3", "subspace-core-primitives", @@ -11128,7 +11121,7 @@ dependencies = [ [[package]] name = "subspace-rpc-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "hex", "serde", @@ -11140,7 +11133,7 @@ dependencies = [ [[package]] name = "subspace-runtime" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "domain-runtime-primitives", "frame-benchmarking", @@ -11192,7 +11185,7 @@ dependencies = [ [[package]] name = "subspace-runtime-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "pallet-transaction-payment", "serde", @@ -11205,7 +11198,7 @@ dependencies = [ [[package]] name = "subspace-service" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "async-trait", "atomic", @@ -11275,7 +11268,7 @@ dependencies = [ [[package]] name = "subspace-verification" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=2c33788271a4ddb8790ec165f80fec952bd0e9dc#2c33788271a4ddb8790ec165f80fec952bd0e9dc" +source = "git+https://github.com/subspace/subspace?rev=8ca4ca043b14264bc54a27f3e5dd0e7d904118bf#8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" dependencies = [ "parity-scale-codec", "schnorrkel", diff --git a/Cargo.toml b/Cargo.toml index 2d419c2c..9eaef421 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "space-acres" description = "Space Acres is an opinionated unofficial GUI application for farming on Subspace Network" license = "0BSD" -version = "0.0.22" +version = "0.0.23" authors = ["Nazar Mokrynskyi "] repository = "https://github.com/nazar-pc/space-acres" edition = "2021" @@ -64,25 +64,25 @@ sc-informant = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } sc-storage-monitor = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } -sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } +sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } semver = "1.0.21" serde = { version = "1.0.194", features = ["derive"]} serde_json = "1.0.111" simple_moving_average = "1.0.1" sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } -sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -sp-domains-fraud-proof = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } +sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +sp-domains-fraud-proof = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "c63a8b28a9fd26d42116b0dcef1f2a5cefb9cd1c", default-features = false } -subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc", default-features = false } -subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-networking = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } -subspace-service = { git = "https://github.com/subspace/subspace", rev = "2c33788271a4ddb8790ec165f80fec952bd0e9dc" } +subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf", default-features = false } +subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-networking = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-runtime = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } +subspace-service = { git = "https://github.com/subspace/subspace", rev = "8ca4ca043b14264bc54a27f3e5dd0e7d904118bf" } supports-color = "2.0.0" thiserror = "1.0.50" tokio = { version = "1.34.0", features = ["fs", "time"] } diff --git a/src/backend.rs b/src/backend.rs index 9e32d52e..914fa29b 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -375,10 +375,12 @@ async fn run( }) }); - let networking_fut = pin!(networking_fut); - let consensus_node_fut = pin!(consensus_node.run(&config.reward_address)); - let farmer_fut = pin!(farmer.run()); - let process_backend_actions_fut = pin!({ + // Order is important here, we want to destroy dependents first and only then corresponding + // dependencies to avoid unnecessary errors and warnings in logs + let networking_fut = networking_fut; + let consensus_node_fut = consensus_node.run(&config.reward_address); + let farmer_fut = farmer.run(); + let process_backend_actions_fut = { let mut notifications_sender = notifications_sender.clone(); async move { @@ -389,25 +391,24 @@ async fn run( ) .await } - }); - // Order is important here, we want to destroy dependents first and only then corresponding dependencies to avoid - // unnecessary errors and warnings in logs - let mut networking_fut = networking_fut.fuse(); - let mut consensus_node_fut = consensus_node_fut.fuse(); - let mut farmer_fut = farmer_fut.fuse(); - let mut process_backend_actions_fut = process_backend_actions_fut.fuse(); + }; + + let networking_fut = pin!(networking_fut); + let consensus_node_fut = pin!(consensus_node_fut); + let farmer_fut = pin!(farmer_fut); + let process_backend_actions_fut = pin!(process_backend_actions_fut); let result: anyhow::Result<()> = select! { - result = consensus_node_fut => { + result = networking_fut.fuse() => { result.map_err(anyhow::Error::from) } - result = farmer_fut => { + result = consensus_node_fut.fuse() => { result.map_err(anyhow::Error::from) } - result = networking_fut => { + result = farmer_fut.fuse() => { result.map_err(|_cancelled| anyhow::anyhow!("Networking exited")) } - _ = process_backend_actions_fut => { + _ = process_backend_actions_fut.fuse() => { Ok(()) } }; diff --git a/src/backend/farmer.rs b/src/backend/farmer.rs index bf35cc57..97943ba1 100644 --- a/src/backend/farmer.rs +++ b/src/backend/farmer.rs @@ -28,14 +28,14 @@ use subspace_farmer::utils::piece_validator::SegmentCommitmentPieceValidator; use subspace_farmer::utils::readers_and_pieces::ReadersAndPieces; use subspace_farmer::utils::{ all_cpu_cores, create_plotting_thread_pool_manager, recommended_number_of_farming_threads, - run_future_in_dedicated_thread, thread_pool_core_indices, + run_future_in_dedicated_thread, thread_pool_core_indices, CpuCoreSet, }; use subspace_farmer::{NodeClient, NodeRpcClient}; use subspace_farmer_components::plotting::PlottedSector; use subspace_networking::utils::piece_provider::PieceProvider; use subspace_networking::Node; use tokio::sync::Semaphore; -use tracing::{error, info, info_span, warn, Instrument}; +use tracing::{error, info, info_span, Instrument}; /// Minimal cache percentage, there is no need in setting it higher const CACHE_PERCENTAGE: NonZeroU8 = NonZeroU8::MIN; @@ -228,8 +228,8 @@ pub(super) async fn create_farmer(farmer_options: FarmerOptions) -> anyhow::Resu let mut single_disk_farms = Vec::with_capacity(disk_farms.len()); let farm_during_initial_plotting = should_farm_during_initial_plotting(); - let plotting_thread_pool_core_indices = thread_pool_core_indices(None, None); - let replotting_thread_pool_core_indices = { + let mut plotting_thread_pool_core_indices = thread_pool_core_indices(None, None); + let mut replotting_thread_pool_core_indices = { let mut replotting_thread_pool_core_indices = thread_pool_core_indices(None, None); // The default behavior is to use all CPU cores, but for replotting we just want half replotting_thread_pool_core_indices @@ -238,30 +238,34 @@ pub(super) async fn create_farmer(farmer_options: FarmerOptions) -> anyhow::Resu replotting_thread_pool_core_indices }; + if plotting_thread_pool_core_indices.len() > 1 { + info!( + l3_cache_groups = %plotting_thread_pool_core_indices.len(), + "Multiple L3 cache groups detected" + ); + + if plotting_thread_pool_core_indices.len() > disk_farms.len() { + plotting_thread_pool_core_indices = + CpuCoreSet::regroup(&plotting_thread_pool_core_indices, disk_farms.len()); + replotting_thread_pool_core_indices = + CpuCoreSet::regroup(&replotting_thread_pool_core_indices, disk_farms.len()); + + info!( + farms_count = %disk_farms.len(), + "Regrouped CPU cores to match number of farms, more farms may leverage CPU more efficiently" + ); + } + } + let downloading_semaphore = Arc::new(Semaphore::new(plotting_thread_pool_core_indices.len() + 1)); - let all_cpu_cores = all_cpu_cores(); let plotting_thread_pool_manager = create_plotting_thread_pool_manager( plotting_thread_pool_core_indices .into_iter() .zip(replotting_thread_pool_core_indices), )?; - // TODO: Expose this in UI somehow, maybe warning if not enough farms are configured too - if all_cpu_cores.len() > 1 { - info!(l3_cache_groups = %all_cpu_cores.len(), "Multiple L3 cache groups detected"); - - if all_cpu_cores.len() > disk_farms.len() { - warn!( - l3_cache_groups = %all_cpu_cores.len(), - farms_count = %disk_farms.len(), - "Too few disk farms, CPU will not be utilized fully during plotting, same number \ - of farms as L3 cache groups or more is recommended" - ); - } - } - let mut plotting_delay_senders = Vec::with_capacity(disk_farms.len()); for (disk_farm_index, disk_farm) in disk_farms.into_iter().enumerate() { diff --git a/src/main.rs b/src/main.rs index 433927ba..ccd9c6ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -807,5 +807,10 @@ impl Cli { } fn main() -> ExitCode { + // TODO: This is a hack to work around https://github.com/quinn-rs/quinn/issues/1750, should be + // removed once fixed upstream + if env::var("RUST_LOG").is_err() { + env::set_var("RUST_LOG", "info,quinn_udp=error"); + } Cli::parse().run() }