From ffa15bd3d912c3f08e65b59c384c9305a9f4c25e Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Wed, 25 Sep 2024 05:17:58 +0300 Subject: [PATCH] Update Subspace and drop legacy compatibility code --- Cargo.lock | 81 +++++++++++------------- Cargo.toml | 36 +++++------ res/translations/de-DE/messages.ftl | 4 -- res/translations/en/messages.ftl | 2 - res/translations/es/messages.ftl | 2 - res/translations/fr/messages.ftl | 4 +- res/translations/rs/messages.ftl | 4 -- res/translations/ru-RU/messages.ftl | 2 - res/translations/zh-CN/messages.ftl | 2 - src/backend.rs | 33 ++-------- src/backend/farmer.rs | 32 +++------- src/backend/farmer/direct_node_client.rs | 3 +- src/backend/node.rs | 58 ++--------------- src/frontend.rs | 40 +----------- src/main.rs | 2 - 15 files changed, 80 insertions(+), 225 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 314e1434..7e0e25d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -909,12 +909,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - [[package]] name = "atomic-waker" version = "1.1.2" @@ -2053,7 +2047,7 @@ checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "cross-domain-message-gossip" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "domain-block-preprocessor", "fp-account", @@ -2572,7 +2566,7 @@ dependencies = [ [[package]] name = "domain-block-preprocessor" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-trait", "domain-runtime-primitives", @@ -2605,7 +2599,7 @@ dependencies = [ [[package]] name = "domain-runtime-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "fixed-hash", "fp-account", @@ -9731,7 +9725,7 @@ dependencies = [ [[package]] name = "sc-consensus-subspace" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-trait", "futures", @@ -9772,7 +9766,7 @@ dependencies = [ [[package]] name = "sc-consensus-subspace-rpc" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-oneshot", "futures", @@ -9806,7 +9800,7 @@ dependencies = [ [[package]] name = "sc-domains" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "sc-client-api", "sc-executor", @@ -10167,9 +10161,8 @@ dependencies = [ [[package]] name = "sc-proof-of-time" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ - "atomic", "core_affinity", "derive_more 1.0.0", "futures", @@ -10401,7 +10394,7 @@ dependencies = [ [[package]] name = "sc-subspace-block-relay" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-channel 1.9.0", "async-trait", @@ -10426,7 +10419,7 @@ dependencies = [ [[package]] name = "sc-subspace-chain-specs" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" [[package]] name = "sc-sysinfo" @@ -11155,7 +11148,7 @@ dependencies = [ [[package]] name = "sp-auto-id" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "parity-scale-codec", "scale-info", @@ -11179,7 +11172,7 @@ dependencies = [ [[package]] name = "sp-block-fees" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-trait", "domain-runtime-primitives", @@ -11273,7 +11266,7 @@ dependencies = [ [[package]] name = "sp-consensus-subspace" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-trait", "log", @@ -11457,7 +11450,7 @@ dependencies = [ [[package]] name = "sp-domain-digests" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "parity-scale-codec", "sp-runtime 39.0.0 (git+https://github.com/subspace/polkadot-sdk?rev=5626154d0781ac9a6ffd5a6207ed237f425ae631)", @@ -11466,7 +11459,7 @@ dependencies = [ [[package]] name = "sp-domain-sudo" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-trait", "parity-scale-codec", @@ -11477,7 +11470,7 @@ dependencies = [ [[package]] name = "sp-domains" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "blake2 0.10.6", "domain-runtime-primitives", @@ -11509,7 +11502,7 @@ dependencies = [ [[package]] name = "sp-domains-fraud-proof" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "domain-block-preprocessor", "domain-runtime-primitives", @@ -11544,7 +11537,7 @@ dependencies = [ [[package]] name = "sp-executive" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-trait", "parity-scale-codec", @@ -11682,7 +11675,7 @@ dependencies = [ [[package]] name = "sp-messenger" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-trait", "frame-support", @@ -11704,7 +11697,7 @@ dependencies = [ [[package]] name = "sp-messenger-host-functions" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "domain-block-preprocessor", "parity-scale-codec", @@ -11761,7 +11754,7 @@ dependencies = [ [[package]] name = "sp-objects" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "sp-api", "subspace-core-primitives", @@ -12052,7 +12045,7 @@ dependencies = [ [[package]] name = "sp-subspace-mmr" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "parity-scale-codec", "scale-info", @@ -12249,7 +12242,7 @@ dependencies = [ [[package]] name = "space-acres" -version = "0.1.36" +version = "0.2.0-pre-release" dependencies = [ "anyhow", "arc-swap", @@ -12499,7 +12492,7 @@ dependencies = [ [[package]] name = "subspace-archiving" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "parity-scale-codec", "rayon", @@ -12512,7 +12505,7 @@ dependencies = [ [[package]] name = "subspace-core-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "blake3", "blst", @@ -12537,7 +12530,7 @@ dependencies = [ [[package]] name = "subspace-erasure-coding" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "kzg", "rust-kzg-blst", @@ -12547,7 +12540,7 @@ dependencies = [ [[package]] name = "subspace-fake-runtime-api" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "domain-runtime-primitives", "frame-support", @@ -12579,7 +12572,7 @@ dependencies = [ [[package]] name = "subspace-farmer" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "anyhow", "async-lock", @@ -12633,7 +12626,7 @@ dependencies = [ [[package]] name = "subspace-farmer-components" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-lock", "async-trait", @@ -12664,7 +12657,7 @@ dependencies = [ [[package]] name = "subspace-metrics" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "actix-web", "prometheus", @@ -12675,7 +12668,7 @@ dependencies = [ [[package]] name = "subspace-networking" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "async-mutex", "async-trait", @@ -12713,7 +12706,7 @@ dependencies = [ [[package]] name = "subspace-proof-of-space" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "chacha20", "derive_more 1.0.0", @@ -12729,7 +12722,7 @@ dependencies = [ [[package]] name = "subspace-proof-of-space-gpu" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "blst", "cc", @@ -12741,7 +12734,7 @@ dependencies = [ [[package]] name = "subspace-proof-of-time" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "aes 0.9.0-pre.1", "subspace-core-primitives", @@ -12751,7 +12744,7 @@ dependencies = [ [[package]] name = "subspace-rpc-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "hex", "parity-scale-codec", @@ -12764,7 +12757,7 @@ dependencies = [ [[package]] name = "subspace-runtime-primitives" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "frame-support", "frame-system", @@ -12780,7 +12773,7 @@ dependencies = [ [[package]] name = "subspace-service" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "array-bytes", "async-channel 1.9.0", @@ -12867,7 +12860,7 @@ dependencies = [ [[package]] name = "subspace-verification" version = "0.1.0" -source = "git+https://github.com/subspace/subspace?rev=3727d07430d323b5616a3908a2f87762f6acf6fc#3727d07430d323b5616a3908a2f87762f6acf6fc" +source = "git+https://github.com/subspace/subspace?rev=6dc72222145aaf4ac3d925913b81467eac02f02e#6dc72222145aaf4ac3d925913b81467eac02f02e" dependencies = [ "parity-scale-codec", "schnorrkel", diff --git a/Cargo.toml b/Cargo.toml index 50b1fa01..cd0aa08a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "space-acres" description = "Space Acres is an opinionated GUI application for farming on Autonomys Network" license = "0BSD" -version = "0.1.36" +version = "0.2.0-pre-release" authors = ["Nazar Mokrynskyi "] repository = "https://github.com/autonomys/space-acres" edition = "2021" @@ -68,14 +68,14 @@ reqwest = { version = "0.12.4", default-features = false, features = ["json", "r sc-client-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sc-client-db = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sc-consensus-slots = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } +sc-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } sc-informant = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sc-network = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sc-network-types = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sc-rpc = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sc-service = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sc-storage-monitor = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } +sc-subspace-chain-specs = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } sc-utils = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } schnellru = "0.2.3" semver = "1.0.23" @@ -85,23 +85,23 @@ simple_moving_average = "1.0.2" sp-api = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sp-blockchain = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } sp-consensus = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } +sp-consensus-subspace = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } sp-core = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -sp-domains-fraud-proof = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -sp-objects = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } +sp-domains-fraud-proof = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +sp-objects = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } sp-runtime = { git = "https://github.com/subspace/polkadot-sdk", rev = "5626154d0781ac9a6ffd5a6207ed237f425ae631", default-features = false } -subspace-archiving = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-fake-runtime-api = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc", default-features = false } -subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-networking = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-proof-of-space-gpu = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc", optional = true } -subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } -subspace-service = { git = "https://github.com/subspace/subspace", rev = "3727d07430d323b5616a3908a2f87762f6acf6fc" } +subspace-archiving = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-core-primitives = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-erasure-coding = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-fake-runtime-api = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-farmer = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e", default-features = false } +subspace-farmer-components = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-networking = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-proof-of-space = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-proof-of-space-gpu = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e", optional = true } +subspace-rpc-primitives = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-runtime-primitives = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } +subspace-service = { git = "https://github.com/subspace/subspace", rev = "6dc72222145aaf4ac3d925913b81467eac02f02e" } supports-color = "3.0.0" sys-locale = "0.3.1" tempfile = "3.10.1" diff --git a/res/translations/de-DE/messages.ftl b/res/translations/de-DE/messages.ftl index 7a9c94bf..660e2dd0 100644 --- a/res/translations/de-DE/messages.ftl +++ b/res/translations/de-DE/messages.ftl @@ -189,12 +189,8 @@ status_bar_message_configuration_is_invalid = Konfiguration ist ungültig: {$err status_bar_message_restart_is_needed_for_configuration = Ein Neustart der Anwendung ist erforderlich, damit die Konfigurationsänderungen wirksam werden status_bar_message_failed_to_save_configuration = Fehler beim Speichern der Konfigurationsänderungen: {$error} status_bar_message_restarted_after_crash = Space Acres wurde nach einem Absturz automatisch neu gestartet. Überprüfe die Anwendungs- und Systemprotokolle für Details -# TODO: Translate -status_bar_message_unoptimized_node_db = Node database is unoptimized and needs re-syncing for optimal performance status_bar_button_restart = Neustart status_bar_button_ok = Ok -# TODO: Translate -status_bar_button_resync_node = Resync node about_system_information = Konfigurationsverzeichnis: {$config_directory} diff --git a/res/translations/en/messages.ftl b/res/translations/en/messages.ftl index 2e47e72d..fe355617 100644 --- a/res/translations/en/messages.ftl +++ b/res/translations/en/messages.ftl @@ -188,10 +188,8 @@ status_bar_message_configuration_is_invalid = Configuration is invalid: {$error} status_bar_message_restart_is_needed_for_configuration = Application restart is needed for configuration changes to take effect status_bar_message_failed_to_save_configuration = Failed to save configuration changes: {$error} status_bar_message_restarted_after_crash = Space Acres automatically restarted after crash, check application and system logs for details -status_bar_message_unoptimized_node_db = Node database is unoptimized and needs re-syncing for optimal performance status_bar_button_restart = Restart status_bar_button_ok = Ok -status_bar_button_resync_node = Resync node about_system_information = Config directory: {$config_directory} diff --git a/res/translations/es/messages.ftl b/res/translations/es/messages.ftl index b1f214e7..abd046a3 100644 --- a/res/translations/es/messages.ftl +++ b/res/translations/es/messages.ftl @@ -188,10 +188,8 @@ status_bar_message_configuration_is_invalid = La configuración es invalida: {$e status_bar_message_restart_is_needed_for_configuration = La aplicación necesita reiniciarse para que los cambios tengan efecto status_bar_message_failed_to_save_configuration = Fallo al guardar los cambios: {$error} status_bar_message_restarted_after_crash = Space Acres se ha reiniciado automáticamente después de un error, mira la traza de la aplicación y del sistema para más detalles. -status_bar_message_unoptimized_node_db = La base de datos del nodo no está optimizada y necesita resincronizarse para un rendimiento óptimo status_bar_button_restart = Reiniciar status_bar_button_ok = Vale -status_bar_button_resync_node = Resincronizar nodo about_system_information = Carpeta de configuración: {$config_directory} diff --git a/res/translations/fr/messages.ftl b/res/translations/fr/messages.ftl index ece1bd7f..5afde086 100644 --- a/res/translations/fr/messages.ftl +++ b/res/translations/fr/messages.ftl @@ -103,7 +103,7 @@ running_node_status_syncing_speed_hours_eta = , {NUMBER($a_blocks_per_second, mi running_node_status_syncing_speed_minutes_eta = , {NUMBER($a_blocks_per_second, minimumFractionDigits: 2, maximumFractionDigits: 2)} blocs/s (~{NUMBER($b_hours_remaining, minimumFractionDigits: 2, maximumFractionDigits: 2)} minutes restantes) running_node_status_syncing_speed_seconds_eta = , {NUMBER($a_blocks_per_second, minimumFractionDigits: 2, maximumFractionDigits: 2)} blocs/s (~{NUMBER($b_hours_remaining, minimumFractionDigits: 2, maximumFractionDigits: 2)} secondes restantes) running_node_status_syncing = - {$sync_kind -> + {$sync_kind -> [dsn] Synchronisation depuis DSN [regular] Synchronisation régulière *[unknown] Type de synchronisation inconnu {$sync_kind} @@ -188,10 +188,8 @@ status_bar_message_configuration_is_invalid = La configuration est invalide : {$ status_bar_message_restart_is_needed_for_configuration = Redémarrez l'application pour que les modifications de configuration prennent effet status_bar_message_failed_to_save_configuration = Échec de la sauvegarde de la configuration : {$error} status_bar_message_restarted_after_crash = Space Acres s'est automatiquement redémarré après un crash. Consultez l'application et le journal système pour plus de détails -status_bar_message_unoptimized_node_db = La base de données du nœud n'est pas optimisée, une resynchronisation est nécessaire pour des performances optimales status_bar_button_restart = Redémarrer status_bar_button_ok = OK -status_bar_button_resync_node = Resynchroniser le nœud about_system_information = Répertoire de configuration : {$config_directory} diff --git a/res/translations/rs/messages.ftl b/res/translations/rs/messages.ftl index 45d6ffac..0ccb47b5 100644 --- a/res/translations/rs/messages.ftl +++ b/res/translations/rs/messages.ftl @@ -191,12 +191,8 @@ status_bar_message_configuration_is_invalid = Konfiguracija je nevažeća: {$err status_bar_message_restart_is_needed_for_configuration = Potreban je restart aplikacije za primenu promena u konfiguraciji status_bar_message_failed_to_save_configuration = Nije uspelo čuvanje promena konfiguracije: {$error} status_bar_message_restarted_after_crash = Space Acres se automatski restartovao nakon kraha, proveri dnevnik aplikacije za više informacija -# TODO: Translate -status_bar_message_unoptimized_node_db = Node database is unoptimized and needs re-syncing for optimal performance status_bar_button_restart = Ponovo pokreni status_bar_button_ok = U redu -# TODO: Translate -status_bar_button_resync_node = Resync node about_system_information = Konfiguracioni direktorijum: {$config_directory} diff --git a/res/translations/ru-RU/messages.ftl b/res/translations/ru-RU/messages.ftl index 35f34bc6..b6c62b96 100644 --- a/res/translations/ru-RU/messages.ftl +++ b/res/translations/ru-RU/messages.ftl @@ -188,10 +188,8 @@ status_bar_message_configuration_is_invalid = Неверная конфигур status_bar_message_restart_is_needed_for_configuration = Перезапустите приложение, чтобы изменения конфигурации вступили в силу status_bar_message_failed_to_save_configuration = Не удалось сохранить изменения конфигурации: {$error} status_bar_message_restarted_after_crash = Space Acres автоматически перезапускается после сбоя. Подробности можно найти в приложении и системном журнале -status_bar_message_unoptimized_node_db = БД не оптимизирована, нужна ре-синхронизации для оптимальной производительности status_bar_button_restart = Перезапустить status_bar_button_ok = Ok -status_bar_button_resync_node = Ресинхронизировать about_system_information = Директория конфигурации: {$config_directory} diff --git a/res/translations/zh-CN/messages.ftl b/res/translations/zh-CN/messages.ftl index 9ca4cbff..d9c54c20 100644 --- a/res/translations/zh-CN/messages.ftl +++ b/res/translations/zh-CN/messages.ftl @@ -190,10 +190,8 @@ status_bar_message_configuration_is_invalid = 配置不可用: {$error} status_bar_message_restart_is_needed_for_configuration = 重启以使配置修改生效 status_bar_message_failed_to_save_configuration = 保存配置修改失败: {$error} status_bar_message_restarted_after_crash = Space Acres在崩溃后自动重启,请在日志中查看详细信息 -status_bar_message_unoptimized_node_db = 节点数据库未优化,需要重新同步以达到最优性能 status_bar_button_restart = 重启 status_bar_button_ok = 正常 -status_bar_button_resync_node = 重新同步节点 about_system_information = 配置目录: {$config_directory} diff --git a/src/backend.rs b/src/backend.rs index 8dd46469..e862748d 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -21,7 +21,7 @@ use backoff::ExponentialBackoff; use future::FutureExt; use futures::channel::mpsc; use futures::{future, select, SinkExt, StreamExt}; -use sc_subspace_chain_specs::GEMINI_3H_CHAIN_SPEC; +use sc_subspace_chain_specs::DEVNET_CHAIN_SPEC; use sp_consensus_subspace::ChainConstants; use std::error::Error; use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; @@ -257,7 +257,6 @@ pub enum BackendNotification { chain_info: ChainInfo, chain_constants: ChainConstants, }, - UnoptimizedNodeDb, Node(NodeNotification), Farmer(FarmerNotification), Stopped { @@ -713,7 +712,8 @@ async fn load_chain_specification( )) .await?; - let chain_spec = node::load_chain_specification(GEMINI_3H_CHAIN_SPEC.as_bytes()) + // TODO: Switch to non-devnet chain spec + let chain_spec = node::load_chain_specification(DEVNET_CHAIN_SPEC.as_bytes()) .map_err(|error| anyhow::anyhow!(error))?; notifications_sender @@ -948,12 +948,6 @@ async fn create_consensus_node( } }; - if !consensus_node.optimized_node_db() { - notifications_sender - .send(BackendNotification::UnoptimizedNodeDb) - .await?; - } - notifications_sender .send(BackendNotification::Loading( LoadingStep::ConsensusNodeCreatedSuccessfully, @@ -1124,8 +1118,7 @@ pub async fn wipe( })) .await?; - // TODO: Remove "paritydb" once support for upgrade from Gemini 3g is no longer necessary - for subdirectory in &["db", "network", "paritydb"] { + for subdirectory in &["db", "network"] { let path = path.join(subdirectory); if fs::try_exists(&path).await.unwrap_or(true) { @@ -1151,21 +1144,3 @@ pub async fn wipe( Ok(()) } - -// TODO: This is a temporary upgrade note that should be removed after Gemini 3h -pub fn wipe_node_db(node_path: &Path) { - let node_db_path = node_path.join("db"); - let mut attempts = 0_usize; - - while node_db_path.exists() - && let Err(error) = std::fs::remove_dir_all(&node_db_path) - { - warn!(%error, "Failed to remove node `db` directory, trying again in a bit"); - std::thread::sleep(Duration::from_secs(1)); - attempts += 1; - - if attempts >= 100 { - return; - } - } -} diff --git a/src/backend/farmer.rs b/src/backend/farmer.rs index 133dc133..61c01d0d 100644 --- a/src/backend/farmer.rs +++ b/src/backend/farmer.rs @@ -4,7 +4,7 @@ pub(super) mod maybe_node_client; use crate::backend::farmer::maybe_node_client::MaybeNodeClient; use crate::backend::utils::{Handler, HandlerFn}; use crate::backend::PieceGetterWrapper; -use crate::{PosTable, PosTableLegacy}; +use crate::PosTable; use anyhow::anyhow; use async_lock::{Mutex as AsyncMutex, RwLock as AsyncRwLock}; use bytesize::ByteSize; @@ -312,9 +312,9 @@ where let global_mutex = Arc::default(); #[cfg(feature = "_gpu")] - let mut modern_plotter = None::>; + let mut plotter = None::>; #[cfg(not(feature = "_gpu"))] - let modern_plotter = None::>; + let plotter = None::>; #[cfg(feature = "cuda")] { @@ -348,26 +348,16 @@ where ) .map_err(|error| anyhow::anyhow!("Failed to initialize CUDA plotter: {error}"))?; - modern_plotter.replace(Arc::new(cuda_plotter)); + plotter.replace(Arc::new(cuda_plotter)); } } - let legacy_cpu_plotter = Arc::new(CpuPlotter::<_, PosTableLegacy>::new( - piece_getter.clone(), - Arc::clone(&downloading_semaphore), - plotting_thread_pool_manager.clone(), - record_encoding_concurrency, - Arc::clone(&global_mutex), - kzg.clone(), - erasure_coding.clone(), - None, - )); - let modern_plotter = if let Some(modern_plotter) = modern_plotter { + let plotter = if let Some(plotter) = plotter { info!("CPU plotting for v1 farms was disabled due to detected faster plotting with GPU"); - modern_plotter + plotter } else { - let modern_cpu_plotter = Arc::new(CpuPlotter::<_, PosTable>::new( + let cpu_plotter = Arc::new(CpuPlotter::<_, PosTable>::new( piece_getter.clone(), downloading_semaphore, plotting_thread_pool_manager.clone(), @@ -377,7 +367,7 @@ where erasure_coding.clone(), None, )); - Arc::new(modern_cpu_plotter) + Arc::new(cpu_plotter) }; let (farms, plotting_delay_senders) = { @@ -401,8 +391,7 @@ where let max_pieces_in_sector = farmer_app_info.protocol_info.max_pieces_in_sector; let kzg = kzg.clone(); let erasure_coding = erasure_coding.clone(); - let plotter_legacy = Arc::clone(&legacy_cpu_plotter); - let plotter = Arc::clone(&modern_plotter); + let plotter = Arc::clone(&plotter); let global_mutex = Arc::clone(&global_mutex); let faster_read_sector_record_chunks_mode_barrier = Arc::clone(&faster_read_sector_record_chunks_mode_barrier); @@ -410,7 +399,7 @@ where Arc::clone(&faster_read_sector_record_chunks_mode_concurrency); async move { - let farm_fut = SingleDiskFarm::new::<_, PosTableLegacy, PosTable>( + let farm_fut = SingleDiskFarm::new::<_, PosTable>( SingleDiskFarmOptions { directory: disk_farm.directory.clone(), farmer_app_info, @@ -418,7 +407,6 @@ where max_pieces_in_sector, node_client, reward_address, - plotter_legacy, plotter, kzg, erasure_coding, diff --git a/src/backend/farmer/direct_node_client.rs b/src/backend/farmer/direct_node_client.rs index a9daa4e9..45438d8c 100644 --- a/src/backend/farmer/direct_node_client.rs +++ b/src/backend/farmer/direct_node_client.rs @@ -643,11 +643,12 @@ where .max_segment_index() .unwrap_or(SegmentIndex::ZERO); - let last_segment_headers = (SegmentIndex::ZERO..=last_segment_index) + let mut last_segment_headers = (SegmentIndex::ZERO..=last_segment_index) .rev() .take(limit as usize) .map(|segment_index| self.segment_headers_store.get_segment_header(segment_index)) .collect::>(); + last_segment_headers.reverse(); Ok(last_segment_headers) } diff --git a/src/backend/node.rs b/src/backend/node.rs index 4bab5d35..5d8f67a4 100644 --- a/src/backend/node.rs +++ b/src/backend/node.rs @@ -48,6 +48,7 @@ use tokio::fs; use tokio::time::MissedTickBehavior; use tracing::{error, info_span}; +// TODO: This corresponds to Gemini 3h and needs to be updated to the next network pub(super) const GENESIS_HASH: &str = "0c121c75f4ef450f40619e1fca9d1e8e7fbabc42c895bc4790801e85d5a91c34"; const SYNC_STATUS_EVENT_INTERVAL: Duration = Duration::from_secs(5); @@ -140,7 +141,6 @@ pub(super) struct ConsensusNode { pause_sync: Arc, chain_info: ChainInfo, chain_constants: ChainConstants, - optimized_node_db: bool, handlers: Handlers, } @@ -156,14 +156,12 @@ impl ConsensusNode { pause_sync: Arc, chain_info: ChainInfo, chain_constants: ChainConstants, - optimized_node_db: bool, ) -> Self { Self { full_node, pause_sync, chain_info, chain_constants, - optimized_node_db, handlers: Handlers::default(), } } @@ -281,10 +279,6 @@ impl ConsensusNode { &self.chain_info } - pub(super) fn optimized_node_db(&self) -> bool { - self.optimized_node_db - } - pub(super) fn chain_constants(&self) -> &ChainConstants { &self.chain_constants } @@ -505,14 +499,12 @@ pub(super) async fn create_consensus_node( let sync = consensus_chain_config.network.sync_mode; let consensus_chain_config = Configuration::from(consensus_chain_config); let pause_sync = Arc::clone(&consensus_chain_config.network.pause_sync); - let mut optimized_node_db = true; let (consensus_node, direct_node_client) = { let span = info_span!("Node"); let _enter = span.enter(); - let mut snap_sync_success = true; - let mut consensus_chain_config = SubspaceConfiguration { + let consensus_chain_config = SubspaceConfiguration { base: consensus_chain_config, // Domain node needs slots notifications for bundle production force_new_slot_notifications: false, @@ -536,53 +528,18 @@ pub(super) async fn create_consensus_node( }); } - let partial_components = match subspace_service::new_partial::( + let partial_components = subspace_service::new_partial::( &consensus_chain_config.base, match consensus_chain_config.sync { ChainSyncMode::Full => false, ChainSyncMode::Snap => true, }, &pot_external_entropy, - ) { - Ok(partial_components) => partial_components, - Err(sc_service::Error::Client(sp_blockchain::Error::StateDatabase(error))) - if error.to_string().contains( - "Incompatible pruning modes [stored: ArchiveCanonical; requested: \ - Constrained", - ) => - { - // TODO: Workaround for supporting older default `archive-canonical` while new - // default has become pruned state, can be removed if/when - // https://github.com/paritytech/polkadot-sdk/issues/4671 is implemented - consensus_chain_config.base.state_pruning = Some(PruningMode::ArchiveCanonical); - snap_sync_success = false; - - subspace_service::new_partial::( - &consensus_chain_config, - false, - &pot_external_entropy, - ) - .map_err(|error| { - sc_service::Error::Other(format!( - "Failed to build a full subspace node 1: {error:?}" - )) - })? - } - Err(error) => { - return Err(sc_service::Error::Other(format!( - "Failed to build a full subspace node 2: {error:?}" - )) - .into()); - } - }; + ) + .map_err(|error| { + sc_service::Error::Other(format!("Failed to build a full subspace node: {error:?}")) + })?; - let info = partial_components.client.info(); - // TODO: This is a temporary upgrade note that should be removed after Gemini 3h - if matches!(consensus_chain_config.sync, ChainSyncMode::Snap) - && (!snap_sync_success || (info.best_number >= 1_000_000 && info.finalized_number == 0)) - { - optimized_node_db = false; - } if hex::encode(partial_components.client.info().genesis_hash) != GENESIS_HASH { return Err(ConsensusNodeCreationError::IncompatibleChain { compatible_chain: consensus_chain_config.base.chain_spec.name().to_string(), @@ -666,6 +623,5 @@ pub(super) async fn create_consensus_node( pause_sync, chain_info, chain_constants, - optimized_node_db, )) } diff --git a/src/frontend.rs b/src/frontend.rs index 444e5d66..0f30dcb2 100644 --- a/src/frontend.rs +++ b/src/frontend.rs @@ -116,7 +116,6 @@ pub enum AppInput { StartUpgrade, Restart, CloseStatusBarWarning, - ResyncNode, HideWindow, ShowWindow, ShowHideToggle, @@ -168,8 +167,6 @@ enum StatusBarButton { Ok, /// Show restart button Restart, - // Show resync node button - ResyncNode, } #[derive(Debug, Default, Eq, PartialEq)] @@ -210,13 +207,6 @@ impl StatusBarContents { } } - fn resync_node_button(&self) -> bool { - match self { - Self::Warning { button, .. } => matches!(button, StatusBarButton::ResyncNode), - _ => false, - } - } - fn restart_button(&self) -> bool { match self { Self::Warning { button, .. } => matches!(button, StatusBarButton::Restart), @@ -275,8 +265,6 @@ pub struct App { #[do_not_track] loaded: bool, #[do_not_track] - wipe_db_after_shutdown: bool, - #[do_not_track] backend_fut: Option + Send>>, // Keep it around so it doesn't disappear #[do_not_track] @@ -497,13 +485,6 @@ impl AsyncComponent for App { #[track = "model.changed_status_bar_contents()"] set_visible: model.status_bar_contents.ok_button(), }, - - gtk::Button { - connect_clicked => AppInput::ResyncNode, - set_label: &T.status_bar_button_resync_node(), - #[track = "model.changed_status_bar_contents()"] - set_visible: model.status_bar_contents.resync_node_button(), - }, }, }, } @@ -639,7 +620,6 @@ impl AsyncComponent for App { app_data_dir, exit_status_code, loaded: false, - wipe_db_after_shutdown: false, backend_fut: Some(backend_fut), _tray_icon: tray_icon, tracker: u8::MAX, @@ -811,12 +791,6 @@ impl AsyncComponent for App { AppInput::CloseStatusBarWarning => { self.set_status_bar_contents(StatusBarContents::None); } - AppInput::ResyncNode => { - self.exit_status_code.set(AppStatusCode::Restart); - self.wipe_db_after_shutdown = true; - // Delegate to exit to do the rest - sender.input(AppInput::ShutDown); - } AppInput::HideWindow => { root.set_visible(false); } @@ -838,14 +812,8 @@ impl AsyncComponent for App { root.present(); let backend_fut = self.backend_fut.take(); - let wipe_db_after_shutdown = self.wipe_db_after_shutdown; - let node_path = self.current_raw_config.as_ref().map(|raw_config| raw_config.node_path().clone()); - sender.spawn_oneshot_command(move || { + sender.spawn_oneshot_command(|| { drop(backend_fut); - // TODO: This is a temporary upgrade note that should be removed after Gemini 3h - if wipe_db_after_shutdown && let Some(node_path) = node_path { - crate::backend::wipe_node_db(&node_path); - } AppCommandOutput::Quit }); } @@ -1045,12 +1013,6 @@ impl App { chain_constants, }); } - BackendNotification::UnoptimizedNodeDb => { - self.set_status_bar_contents(StatusBarContents::Warning { - message: T.status_bar_message_unoptimized_node_db().to_string(), - button: StatusBarButton::ResyncNode, - }); - } BackendNotification::Node(node_notification) => { self.running_view .emit(RunningInput::NodeNotification(node_notification)); diff --git a/src/main.rs b/src/main.rs index e7d4f211..fd90ba9e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,7 +34,6 @@ use std::time::{Duration, Instant}; use std::{env, fs, io, process}; use subspace_farmer::utils::run_future_in_dedicated_thread; use subspace_proof_of_space::chia::ChiaTable; -use subspace_proof_of_space::chia_legacy::ChiaTableLegacy; use tracing::{debug, error, info, warn}; use tracing_subscriber::filter::LevelFilter; use tracing_subscriber::prelude::*; @@ -53,7 +52,6 @@ const LOG_READ_BUFFER: usize = ByteSize::mib(1).as_u64() as usize; const WINDOWS_SUBSYSTEM_WINDOWS: bool = cfg!(all(windows, not(debug_assertions))); const MIN_RUNTIME_DURATION_FOR_AUTORESTART: Duration = Duration::from_secs(30); -type PosTableLegacy = ChiaTableLegacy; type PosTable = ChiaTable; fn raise_fd_limit() {