diff --git a/Cargo.lock b/Cargo.lock
index ba7338a2..808c3354 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -31,7 +31,7 @@ dependencies = [
"rustls-pemfile 2.2.0",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
]
@@ -98,7 +98,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb"
dependencies = [
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -216,7 +216,7 @@ dependencies = [
"actix-router",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -294,9 +294,9 @@ dependencies = [
[[package]]
name = "allocator-api2"
-version = "0.2.18"
+version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
+checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9"
[[package]]
name = "android-tzdata"
@@ -315,9 +315,9 @@ dependencies = [
[[package]]
name = "anstream"
-version = "0.6.17"
+version = "0.6.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23a1e53f0f5d86382dafe1cf314783b2044280f406e7e1506368220ad11b1338"
+checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
dependencies = [
"anstyle",
"anstyle-parse",
@@ -330,9 +330,9 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.9"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56"
+checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
[[package]]
name = "anstyle-parse"
@@ -364,9 +364,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.91"
+version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8"
+checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775"
[[package]]
name = "approx"
@@ -388,14 +388,14 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
name = "arbitrary"
-version = "1.3.2"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
+checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223"
dependencies = [
"derive_arbitrary",
]
@@ -623,7 +623,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -634,7 +634,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -852,9 +852,9 @@ dependencies = [
[[package]]
name = "bounded-collections"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db436177db0d505b1507f03aca56a41442ae6efdf8b6eaa855d73e52c5b078dc"
+checksum = "3d077619e9c237a5d1875166f5e8033e8f6bff0c96f8caf81e1c2d7738c431bf"
dependencies = [
"log",
"parity-scale-codec",
@@ -905,9 +905,9 @@ dependencies = [
[[package]]
name = "bstr"
-version = "1.10.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c"
+checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22"
dependencies = [
"memchr",
"serde",
@@ -992,9 +992,9 @@ dependencies = [
[[package]]
name = "cc"
-version = "1.1.31"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f"
+checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47"
dependencies = [
"jobserver",
"libc",
@@ -1022,6 +1022,12 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+[[package]]
+name = "cfg_aliases"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+
[[package]]
name = "chrono"
version = "0.4.38"
@@ -1081,18 +1087,18 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.20"
+version = "4.5.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
+checksum = "fb3b4b9e5a7c7514dfa52869339ee98b3156b0bfb4e8a77c4ff4babb64b1604f"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
-version = "4.5.20"
+version = "4.5.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
+checksum = "b17a95aa67cc7b5ebd32aa5370189aa0d79069ef1c64ce893bd30fb24bff20ec"
dependencies = [
"anstream",
"anstyle",
@@ -1102,9 +1108,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
+checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7"
[[package]]
name = "cloudabi"
@@ -1282,9 +1288,9 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.14"
+version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0"
+checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6"
dependencies = [
"libc",
]
@@ -1430,7 +1436,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -1490,18 +1496,18 @@ checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
name = "derive_arbitrary"
-version = "1.3.2"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611"
+checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -1514,7 +1520,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustc_version",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -1534,7 +1540,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -1572,7 +1578,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -1586,18 +1592,18 @@ dependencies = [
[[package]]
name = "docify"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce"
+checksum = "a772b62b1837c8f060432ddcc10b17aae1453ef17617a99bc07789252d2a5896"
dependencies = [
"docify_macros",
]
[[package]]
name = "docify_macros"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad"
+checksum = "60e6be249b0a462a14784a99b19bf35a667bb5e09de611738bb7362fa4c95ff7"
dependencies = [
"common-path",
"derive-syn-parse",
@@ -1605,7 +1611,7 @@ dependencies = [
"proc-macro2",
"quote",
"regex",
- "syn 2.0.85",
+ "syn 2.0.87",
"termcolor",
"toml",
"walkdir",
@@ -1854,7 +1860,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -1874,7 +1880,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -1885,7 +1891,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -2001,7 +2007,7 @@ dependencies = [
"prettyplease",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -2015,9 +2021,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.1.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6"
+checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4"
[[package]]
name = "fcm"
@@ -2082,9 +2088,9 @@ dependencies = [
[[package]]
name = "flate2"
-version = "1.0.34"
+version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0"
+checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -2207,7 +2213,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -2308,7 +2314,7 @@ dependencies = [
"proc-macro2",
"quote",
"sp-crypto-hashing",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -2320,7 +2326,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -2330,7 +2336,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.16.
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -2360,10 +2366,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5bd4679ea85999e2b642cc0b909cf84b279f8bc679aea5c570323d8858b80b0"
dependencies = [
"async-trait",
- "reqwest 0.12.8",
+ "reqwest 0.12.9",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"typed-builder",
]
@@ -2457,7 +2463,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -2518,8 +2524,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
+ "js-sys",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
+ "wasm-bindgen",
]
[[package]]
@@ -2557,7 +2565,7 @@ dependencies = [
"aho-corasick",
"bstr",
"log",
- "regex-automata 0.4.8",
+ "regex-automata 0.4.9",
"regex-syntax 0.8.5",
]
@@ -2587,7 +2595,7 @@ dependencies = [
"pin-project",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
@@ -2703,9 +2711,9 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.15.0"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
+checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3"
[[package]]
name = "hashlink"
@@ -2995,7 +3003,7 @@ dependencies = [
"hyper 1.5.0",
"hyper-util",
"log",
- "rustls 0.23.16",
+ "rustls 0.23.17",
"rustls-pki-types",
"tokio",
"tokio-rustls 0.26.0",
@@ -3034,9 +3042,9 @@ dependencies = [
[[package]]
name = "hyper-util"
-version = "0.1.9"
+version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b"
+checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4"
dependencies = [
"bytes",
"futures-channel",
@@ -3189,29 +3197,28 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
name = "idna"
-version = "0.5.0"
+version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
+checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
dependencies = [
- "unicode-bidi",
- "unicode-normalization",
+ "idna_adapter",
+ "smallvec",
+ "utf8_iter",
]
[[package]]
-name = "idna"
-version = "1.0.2"
+name = "idna_adapter"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd69211b9b519e98303c015e21a007e293db403b6c85b9b124e133d25e242cdd"
+checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
dependencies = [
"icu_normalizer",
"icu_properties",
- "smallvec",
- "utf8_iter",
]
[[package]]
@@ -3224,7 +3231,7 @@ dependencies = [
"globset",
"log",
"memchr",
- "regex-automata 0.4.8",
+ "regex-automata 0.4.9",
"same-file",
"walkdir",
"winapi-util",
@@ -3307,7 +3314,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
dependencies = [
"equivalent",
- "hashbrown 0.15.0",
+ "hashbrown 0.15.1",
]
[[package]]
@@ -3383,7 +3390,7 @@ dependencies = [
"combine",
"jni-sys",
"log",
- "thiserror",
+ "thiserror 1.0.69",
"walkdir",
]
@@ -3464,11 +3471,11 @@ dependencies = [
"http 1.1.0",
"jsonrpsee-core",
"pin-project",
- "rustls 0.23.16",
+ "rustls 0.23.17",
"rustls-pki-types",
"rustls-platform-verifier",
"soketto",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"tokio-rustls 0.26.0",
"tokio-util",
@@ -3496,7 +3503,7 @@ dependencies = [
"rustc-hash",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"tokio-stream",
"tracing",
@@ -3517,11 +3524,11 @@ dependencies = [
"hyper-util",
"jsonrpsee-core",
"jsonrpsee-types",
- "rustls 0.23.16",
+ "rustls 0.23.17",
"rustls-platform-verifier",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"tower",
"tracing",
@@ -3538,7 +3545,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -3560,7 +3567,7 @@ dependencies = [
"serde",
"serde_json",
"soketto",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"tokio-stream",
"tokio-util",
@@ -3577,7 +3584,7 @@ dependencies = [
"http 1.1.0",
"serde",
"serde_json",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -3678,7 +3685,7 @@ dependencies = [
"futures-util",
"hostname",
"httpdate",
- "idna 1.0.2",
+ "idna",
"mime",
"native-tls",
"nom 7.1.3",
@@ -3706,15 +3713,15 @@ dependencies = [
[[package]]
name = "libc"
-version = "0.2.161"
+version = "0.2.164"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
+checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f"
[[package]]
name = "libm"
-version = "0.2.10"
+version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a00419de735aac21d53b0de5ce2c03bd3627277cf471300f27ebc89f7d828047"
+checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
[[package]]
name = "libsecp256k1"
@@ -3854,7 +3861,7 @@ dependencies = [
"macro_magic_core",
"macro_magic_macros",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -3868,7 +3875,7 @@ dependencies = [
"macro_magic_core_macros",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -3879,7 +3886,7 @@ checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -3890,7 +3897,7 @@ checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869"
dependencies = [
"macro_magic_core",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -4005,9 +4012,9 @@ dependencies = [
[[package]]
name = "mockall"
-version = "0.13.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4c28b3fb6d753d28c20e826cd46ee611fda1cf3cde03a443a974043247c065a"
+checksum = "39a6bfcc6c8c7eed5ee98b9c3e33adc726054389233e201c95dab2d41a3839d2"
dependencies = [
"cfg-if",
"downcast",
@@ -4019,21 +4026,21 @@ dependencies = [
[[package]]
name = "mockall_derive"
-version = "0.13.0"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "341014e7f530314e9a1fdbc7400b244efea7122662c96bfa248c31da5bfb2020"
+checksum = "25ca3004c2efe9011bd4e461bd8256445052b9615405b4f7ea43fc8ca5c20898"
dependencies = [
"cfg-if",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
name = "mockito"
-version = "1.5.0"
+version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09b34bd91b9e5c5b06338d392463e1318d683cf82ec3d3af4014609be6e2108d"
+checksum = "652cd6d169a36eaf9d1e6bce1a221130439a966d7f27858af66a33a66e9c4ee2"
dependencies = [
"assert-json-diff",
"bytes",
@@ -4055,9 +4062,9 @@ dependencies = [
[[package]]
name = "nalgebra"
-version = "0.33.1"
+version = "0.33.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3bf139e93ad757869338ad85239cb1d6c067b23b94e5846e637ca6328ee4be60"
+checksum = "26aecdf64b707efd1310e3544d709c5c0ac61c13756046aaaba41be5c4f66a3b"
dependencies = [
"approx",
"matrixmultiply",
@@ -4273,7 +4280,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -4747,9 +4754,9 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
-version = "3.6.12"
+version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee"
+checksum = "8be4817d39f3272f69c59fe05d0535ae6456c2dc2fa1ba02910296c7e0a5c590"
dependencies = [
"arrayvec 0.7.6",
"bitvec",
@@ -4757,19 +4764,20 @@ dependencies = [
"bytes",
"impl-trait-for-tuples",
"parity-scale-codec-derive",
+ "rustversion",
"serde",
]
[[package]]
name = "parity-scale-codec-derive"
-version = "3.6.12"
+version = "3.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c"
+checksum = "8781a75c6205af67215f382092b6e0a4ff3734798523e69073d4bcd294ec767b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn 2.0.87",
]
[[package]]
@@ -4872,7 +4880,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442"
dependencies = [
"memchr",
- "thiserror",
+ "thiserror 1.0.69",
"ucd-trie",
]
@@ -4896,7 +4904,7 @@ dependencies = [
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -4971,7 +4979,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -5222,7 +5230,7 @@ dependencies = [
"polkavm-common",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -5232,7 +5240,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429"
dependencies = [
"polkavm-derive-impl",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -5283,7 +5291,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033"
dependencies = [
"proc-macro2",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -5340,7 +5348,7 @@ checksum = "834da187cfe638ae8abb0203f0b33e5ccdb02a28e7199f2f47b3e2754f50edca"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -5389,7 +5397,7 @@ dependencies = [
"parking_lot",
"procfs",
"protobuf",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -5400,9 +5408,9 @@ checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
[[package]]
name = "psm"
-version = "0.1.23"
+version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205"
+checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810"
dependencies = [
"cc",
]
@@ -5415,45 +5423,49 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
[[package]]
name = "quinn"
-version = "0.11.5"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684"
+checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef"
dependencies = [
"bytes",
"pin-project-lite",
"quinn-proto",
"quinn-udp",
"rustc-hash",
- "rustls 0.23.16",
+ "rustls 0.23.17",
"socket2",
- "thiserror",
+ "thiserror 2.0.3",
"tokio",
"tracing",
]
[[package]]
name = "quinn-proto"
-version = "0.11.8"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6"
+checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d"
dependencies = [
"bytes",
+ "getrandom",
"rand 0.8.5",
"ring",
"rustc-hash",
- "rustls 0.23.16",
+ "rustls 0.23.17",
+ "rustls-pki-types",
"slab",
- "thiserror",
+ "thiserror 2.0.3",
"tinyvec",
"tracing",
+ "web-time",
]
[[package]]
name = "quinn-udp"
-version = "0.5.5"
+version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b"
+checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da"
dependencies = [
+ "cfg_aliases",
"libc",
"once_cell",
"socket2",
@@ -5695,7 +5707,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -5706,7 +5718,7 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
- "regex-automata 0.4.8",
+ "regex-automata 0.4.9",
"regex-syntax 0.8.5",
]
@@ -5721,9 +5733,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3"
+checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
@@ -5790,9 +5802,9 @@ dependencies = [
[[package]]
name = "reqwest"
-version = "0.12.8"
+version = "0.12.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b"
+checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
dependencies = [
"async-compression",
"base64 0.22.1",
@@ -5819,7 +5831,7 @@ dependencies = [
"percent-encoding",
"pin-project-lite",
"quinn",
- "rustls 0.23.16",
+ "rustls 0.23.17",
"rustls-pemfile 2.2.0",
"rustls-pki-types",
"serde",
@@ -5975,9 +5987,9 @@ dependencies = [
[[package]]
name = "rustix"
-version = "0.38.38"
+version = "0.38.41"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aa260229e6538e52293eeb577aabd09945a09d6d9cc0fc550ed7529056c2e32a"
+checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6"
dependencies = [
"bitflags 2.6.0",
"errno",
@@ -6013,9 +6025,9 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.23.16"
+version = "0.23.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eee87ff5d9b36712a58574e12e9f0ea80f915a5b0ac518d322b24a465617925e"
+checksum = "7f1a745511c54ba6d4465e8d5dfbd81b45791756de28d4981af70d6dca128f1e"
dependencies = [
"log",
"once_cell",
@@ -6062,6 +6074,9 @@ name = "rustls-pki-types"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b"
+dependencies = [
+ "web-time",
+]
[[package]]
name = "rustls-platform-verifier"
@@ -6074,7 +6089,7 @@ dependencies = [
"jni",
"log",
"once_cell",
- "rustls 0.23.16",
+ "rustls 0.23.17",
"rustls-native-certs",
"rustls-platform-verifier-android",
"rustls-webpki 0.102.8",
@@ -6200,7 +6215,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -6211,9 +6226,9 @@ checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb"
[[package]]
name = "schannel"
-version = "0.1.26"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1"
+checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
dependencies = [
"windows-sys 0.59.0",
]
@@ -6328,9 +6343,9 @@ dependencies = [
[[package]]
name = "security-framework-sys"
-version = "2.12.0"
+version = "2.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6"
+checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2"
dependencies = [
"core-foundation-sys",
"libc",
@@ -6350,9 +6365,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0"
[[package]]
name = "serde"
-version = "1.0.213"
+version = "1.0.215"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1"
+checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f"
dependencies = [
"serde_derive",
]
@@ -6368,20 +6383,20 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.213"
+version = "1.0.215"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5"
+checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
name = "serde_json"
-version = "1.0.132"
+version = "1.0.133"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03"
+checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377"
dependencies = [
"itoa",
"memchr",
@@ -6647,7 +6662,7 @@ dependencies = [
"sp-state-machine",
"sp-trie",
"sp-version",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -6661,7 +6676,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -6771,7 +6786,7 @@ dependencies = [
"sp-storage",
"ss58-registry",
"substrate-bip39",
- "thiserror",
+ "thiserror 1.0.69",
"tracing",
"w3f-bls",
"zeroize",
@@ -6797,7 +6812,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.16.
dependencies = [
"quote",
"sp-crypto-hashing",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -6807,7 +6822,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk.git?tag=polkadot-v1.16.
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -6842,7 +6857,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"sp-runtime",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -6906,7 +6921,7 @@ dependencies = [
"sp-core",
"sp-debug-derive",
"sp-runtime",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -6987,7 +7002,7 @@ dependencies = [
"proc-macro-crate",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -7032,7 +7047,7 @@ dependencies = [
"sp-externalities",
"sp-panic-handler",
"sp-trie",
- "thiserror",
+ "thiserror 1.0.69",
"tracing",
"trie-db",
]
@@ -7063,7 +7078,7 @@ dependencies = [
"parity-scale-codec",
"sp-inherents",
"sp-runtime",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -7094,7 +7109,7 @@ dependencies = [
"schnellru",
"sp-core",
"sp-externalities",
- "thiserror",
+ "thiserror 1.0.69",
"tracing",
"trie-db",
"trie-root",
@@ -7114,7 +7129,7 @@ dependencies = [
"sp-runtime",
"sp-std",
"sp-version-proc-macro",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
@@ -7125,7 +7140,7 @@ dependencies = [
"parity-scale-codec",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -7229,7 +7244,7 @@ dependencies = [
"sha2 0.10.8",
"smallvec",
"sqlformat",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"tokio-stream",
"tracing",
@@ -7312,7 +7327,7 @@ dependencies = [
"smallvec",
"sqlx-core",
"stringprep",
- "thiserror",
+ "thiserror 1.0.69",
"tracing",
"whoami",
]
@@ -7352,7 +7367,7 @@ dependencies = [
"smallvec",
"sqlx-core",
"stringprep",
- "thiserror",
+ "thiserror 1.0.69",
"tracing",
"whoami",
]
@@ -7526,7 +7541,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustversion",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -7549,7 +7564,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "subvt-app-service"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"actix-http",
"actix-rt",
@@ -7578,7 +7593,7 @@ dependencies = [
[[package]]
name = "subvt-block-processor"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-lock",
@@ -7604,7 +7619,7 @@ dependencies = [
[[package]]
name = "subvt-config"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"config",
"serde",
@@ -7612,12 +7627,12 @@ dependencies = [
[[package]]
name = "subvt-governance"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"lazy_static",
"log",
- "reqwest 0.12.8",
+ "reqwest 0.12.9",
"serde_json",
"subvt-config",
"subvt-types",
@@ -7626,7 +7641,7 @@ dependencies = [
[[package]]
name = "subvt-kline-updater"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-trait",
@@ -7634,7 +7649,7 @@ dependencies = [
"lazy_static",
"log",
"once_cell",
- "reqwest 0.12.8",
+ "reqwest 0.12.9",
"serde",
"serde_json",
"subvt-config",
@@ -7649,7 +7664,7 @@ dependencies = [
[[package]]
name = "subvt-logging"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"env_logger",
"log",
@@ -7658,21 +7673,21 @@ dependencies = [
[[package]]
name = "subvt-metrics"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"env_logger",
"log",
"once_cell",
"prometheus",
"subvt-config",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
"warp",
]
[[package]]
name = "subvt-network-status-server"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-trait",
@@ -7697,7 +7712,7 @@ dependencies = [
[[package]]
name = "subvt-network-status-updater"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-trait",
@@ -7719,19 +7734,19 @@ dependencies = [
[[package]]
name = "subvt-nft"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"lazy_static",
"log",
- "reqwest 0.12.8",
+ "reqwest 0.12.9",
"subvt-config",
"subvt-types",
]
[[package]]
name = "subvt-notification-generator"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-lock",
@@ -7758,7 +7773,7 @@ dependencies = [
[[package]]
name = "subvt-notification-processor"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"a2",
"anyhow",
@@ -7787,13 +7802,13 @@ dependencies = [
"subvt-types",
"subvt-utility",
"tera",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
]
[[package]]
name = "subvt-onekv-updater"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-trait",
@@ -7803,7 +7818,7 @@ dependencies = [
"once_cell",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.8",
+ "reqwest 0.12.9",
"subvt-config",
"subvt-logging",
"subvt-metrics",
@@ -7815,7 +7830,7 @@ dependencies = [
[[package]]
name = "subvt-persistence"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"chrono",
@@ -7834,7 +7849,7 @@ dependencies = [
[[package]]
name = "subvt-plotter"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"chrono",
@@ -7850,23 +7865,23 @@ dependencies = [
"subvt-types",
"subvt-utility",
"svg",
- "thiserror",
+ "thiserror 1.0.69",
"tiny-skia",
"usvg",
]
[[package]]
name = "subvt-proc-macro"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
name = "subvt-referendum-updater"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-trait",
@@ -7877,7 +7892,7 @@ dependencies = [
"once_cell",
"prometheus",
"rand 0.8.5",
- "reqwest 0.12.8",
+ "reqwest 0.12.9",
"subvt-config",
"subvt-governance",
"subvt-logging",
@@ -7890,7 +7905,7 @@ dependencies = [
[[package]]
name = "subvt-report-service"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"actix-web",
"anyhow",
@@ -7918,7 +7933,7 @@ dependencies = [
[[package]]
name = "subvt-service-common"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"actix-web",
"anyhow",
@@ -7935,7 +7950,7 @@ dependencies = [
[[package]]
name = "subvt-substrate-client"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-lock",
@@ -7964,7 +7979,7 @@ dependencies = [
[[package]]
name = "subvt-telegram-bot"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-recursion",
@@ -7996,13 +8011,13 @@ dependencies = [
"subvt-types",
"subvt-utility",
"tera",
- "thiserror",
+ "thiserror 1.0.69",
"tokio",
]
[[package]]
name = "subvt-telemetry-processor"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-lock",
@@ -8026,7 +8041,7 @@ dependencies = [
[[package]]
name = "subvt-types"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"chrono",
@@ -8063,12 +8078,12 @@ dependencies = [
"sqlx",
"subvt-proc-macro",
"subvt-utility",
- "thiserror",
+ "thiserror 1.0.69",
]
[[package]]
name = "subvt-utility"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"hex",
@@ -8078,7 +8093,7 @@ dependencies = [
[[package]]
name = "subvt-validator-details-server"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-trait",
@@ -8102,7 +8117,7 @@ dependencies = [
[[package]]
name = "subvt-validator-list-server"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-trait",
@@ -8129,7 +8144,7 @@ dependencies = [
[[package]]
name = "subvt-validator-list-updater"
-version = "0.20.7"
+version = "0.21.0"
dependencies = [
"anyhow",
"async-lock",
@@ -8182,9 +8197,9 @@ dependencies = [
[[package]]
name = "syn"
-version = "2.0.85"
+version = "2.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
+checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
dependencies = [
"proc-macro2",
"quote",
@@ -8214,7 +8229,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -8267,9 +8282,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "tempfile"
-version = "3.13.0"
+version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b"
+checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
dependencies = [
"cfg-if",
"fastrand",
@@ -8317,22 +8332,42 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
[[package]]
name = "thiserror"
-version = "1.0.65"
+version = "1.0.69"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
+dependencies = [
+ "thiserror-impl 1.0.69",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa"
+dependencies = [
+ "thiserror-impl 2.0.3",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5"
+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
- "thiserror-impl",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.87",
]
[[package]]
name = "thiserror-impl"
-version = "1.0.65"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602"
+checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -8449,9 +8484,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.41.0"
+version = "1.41.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
+checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
dependencies = [
"backtrace",
"bytes",
@@ -8473,7 +8508,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -8503,7 +8538,7 @@ version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
dependencies = [
- "rustls 0.23.16",
+ "rustls 0.23.17",
"rustls-pki-types",
"tokio",
]
@@ -8615,7 +8650,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -8715,7 +8750,7 @@ dependencies = [
"native-tls",
"rand 0.8.5",
"sha1",
- "thiserror",
+ "thiserror 1.0.69",
"utf-8",
]
@@ -8749,7 +8784,7 @@ checksum = "f9534daa9fd3ed0bd911d462a37f172228077e7abf18c18a5f67199d959205f8"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -8909,12 +8944,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
-version = "2.5.2"
+version = "2.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
+checksum = "8d157f1b96d14500ffdc1f10ba712e780825526c03d9a49b4d0324b0d9113ada"
dependencies = [
"form_urlencoded",
- "idna 0.5.0",
+ "idna",
"percent-encoding",
]
@@ -9019,9 +9054,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "w3f-bls"
-version = "0.1.6"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a48c48447120a85b0bdb897ba9426a7aa15b4229498a2e19103e8c9368dd4b2"
+checksum = "70a3028804c8bbae2a97a15b71ffc0e308c4b01a520994aafa77d56e94e19024"
dependencies = [
"ark-bls12-377",
"ark-bls12-381",
@@ -9037,7 +9072,7 @@ dependencies = [
"rand_core 0.6.4",
"sha2 0.10.8",
"sha3",
- "thiserror",
+ "thiserror 1.0.69",
"zeroize",
]
@@ -9127,7 +9162,7 @@ dependencies = [
"once_cell",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
"wasm-bindgen-shared",
]
@@ -9161,7 +9196,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -9195,6 +9230,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-roots"
version = "0.25.4"
@@ -9512,7 +9557,7 @@ dependencies = [
"Inflector",
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -9552,7 +9597,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
"synstructure",
]
@@ -9574,7 +9619,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -9594,7 +9639,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
"synstructure",
]
@@ -9615,7 +9660,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -9637,7 +9682,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.85",
+ "syn 2.0.87",
]
[[package]]
@@ -9662,7 +9707,7 @@ dependencies = [
"pbkdf2",
"rand 0.8.5",
"sha1",
- "thiserror",
+ "thiserror 1.0.69",
"time 0.3.36",
"zeroize",
"zopfli",
@@ -9676,7 +9721,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25a8c9e90f27d1435088a7b540b6cc8ae6ee525d992a695f16012d2f365b3d3c"
dependencies = [
"log",
- "thiserror",
+ "thiserror 1.0.69",
"zip",
]
diff --git a/_config/base.toml b/_config/base.toml
index e4023cfe..a315af0b 100644
--- a/_config/base.toml
+++ b/_config/base.toml
@@ -68,12 +68,10 @@ start_block_number = 6_015_486
[validator_list_updater]
history_record_depth = 10
-[onekv]
+[dn]
# this many most recent records will always be kept in the database for reference
candidate_history_record_count = 5
-candidate_list_endpoint = "https://kusama.w3f.community/candidates"
-candidate_details_endpoint = "https://kusama.w3f.community/candidate/"
-nominator_list_endpoint = "https://kusama.w3f.community/nominators"
+data_endpoint = "https://nodes.web3.foundation/api/cohort/1/polkadot"
refresh_seconds = 300
[report]
diff --git a/_config/network/kusama.toml b/_config/network/kusama.toml
index 2c7a789e..43da5d58 100644
--- a/_config/network/kusama.toml
+++ b/_config/network/kusama.toml
@@ -14,10 +14,8 @@ token_decimals = 12
# first block of 2021 for Kusama is 6_015_486
start_block_number = 6_015_486
-[onekv]
-candidate_list_endpoint = "https://kusama.w3f.community/candidates"
-candidate_details_endpoint = "https://kusama.w3f.community/candidate/"
-nominator_list_endpoint = "https://kusama.w3f.community/nominators"
+[dn]
+data_endpoint = "https://nodes.web3.foundation/api/cohort/1/kusama"
[notification_generator]
unclaimed_payout_check_delay_hours = 3
\ No newline at end of file
diff --git a/_config/network/polkadot.toml b/_config/network/polkadot.toml
index 7dbcff4f..dd251135 100644
--- a/_config/network/polkadot.toml
+++ b/_config/network/polkadot.toml
@@ -14,10 +14,8 @@ token_decimals = 10
# first block of 2021 for Polkadot is 2_700_565
start_block_number = 2_700_565
-[onekv]
-candidate_list_endpoint = "https://polkadot.w3f.community/candidates"
-candidate_details_endpoint = "https://polkadot.w3f.community/candidate/"
-nominator_list_endpoint = "https://polkadot.w3f.community/nominators"
+[dn]
+data_endpoint = "https://nodes.web3.foundation/api/cohort/1/polkadot"
[notification_generator]
unclaimed_payout_check_delay_hours = 9
\ No newline at end of file
diff --git a/_docker/compose/.env.sample b/_docker/compose/.env.sample
index e84da5fa..c7273d28 100644
--- a/_docker/compose/.env.sample
+++ b/_docker/compose/.env.sample
@@ -1,4 +1,4 @@
-VERSION=0.20.6
+VERSION=0.21.0
ENV=production
LOG_LEVEL=debug
diff --git a/_migrations/network/migrations/20211115071840_fx_validator_info.up.sql b/_migrations/network/migrations/20211115071840_fx_validator_info.up.sql
index 68596b75..0cf0bedf 100644
--- a/_migrations/network/migrations/20211115071840_fx_validator_info.up.sql
+++ b/_migrations/network/migrations/20211115071840_fx_validator_info.up.sql
@@ -11,11 +11,8 @@ DO $$ BEGIN
blocks_authored bigint,
reward_points bigint,
heartbeat_received boolean,
- onekv_candidate_record_id INTEGER,
- onekv_rank bigint,
- onekv_location text,
- onekv_is_valid boolean,
- onekv_offline_since bigint
+ dn_node_record_id INTEGER,
+ dn_status text
);
END $$;
@@ -95,9 +92,9 @@ BEGIN
) INTO result_record.heartbeat_received;
end if;
- SELECT id, rank, location, is_valid, offline_since
+ SELECT id, status
FROM sub_onekv_candidate C
- INTO result_record.onekv_candidate_record_id, result_record.onekv_rank, result_record.onekv_location, result_record.onekv_is_valid, result_record.onekv_offline_since
+ INTO result_record.dn_node_record_id, result_record.dn_status
WHERE C.validator_account_id = account_id_param
ORDER BY id DESC
LIMIT 1;
diff --git a/_migrations/network/migrations/20241119095142_dn_update.down.sql b/_migrations/network/migrations/20241119095142_dn_update.down.sql
new file mode 100644
index 00000000..d2f607c5
--- /dev/null
+++ b/_migrations/network/migrations/20241119095142_dn_update.down.sql
@@ -0,0 +1 @@
+-- Add down migration script here
diff --git a/_migrations/network/migrations/20241119095142_dn_update.up.sql b/_migrations/network/migrations/20241119095142_dn_update.up.sql
new file mode 100644
index 00000000..34a88d4f
--- /dev/null
+++ b/_migrations/network/migrations/20241119095142_dn_update.up.sql
@@ -0,0 +1,54 @@
+-- Add up migration script here
+ALTER TABLE sub_onekv_candidate DROP COLUMN kusama_account_id;
+ALTER TABLE sub_onekv_candidate DROP COLUMN discovered_at;
+ALTER TABLE sub_onekv_candidate DROP COLUMN inclusion;
+ALTER TABLE sub_onekv_candidate DROP COLUMN commission;
+ALTER TABLE sub_onekv_candidate DROP COLUMN is_active;
+ALTER TABLE sub_onekv_candidate DROP COLUMN unclaimed_eras;
+ALTER TABLE sub_onekv_candidate DROP COLUMN nominated_at;
+ALTER TABLE sub_onekv_candidate DROP COLUMN offline_accumulated;
+ALTER TABLE sub_onekv_candidate DROP COLUMN offline_since;
+ALTER TABLE sub_onekv_candidate DROP COLUMN name;
+ALTER TABLE sub_onekv_candidate DROP COLUMN location;
+ALTER TABLE sub_onekv_candidate DROP COLUMN rank;
+ALTER TABLE sub_onekv_candidate DROP COLUMN version;
+ALTER TABLE sub_onekv_candidate DROP COLUMN is_valid;
+ALTER TABLE sub_onekv_candidate DROP COLUMN fault_count;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_updated_at;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_total;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_aggregate;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_inclusion;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_discovered;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_nominated;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_rank;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_unclaimed;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_bonded;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_faults;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_offline;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_randomness;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_span_inclusion;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_location;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_country;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_nominator_stake;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_provider;
+ALTER TABLE sub_onekv_candidate DROP COLUMN score_region;
+ALTER TABLE sub_onekv_candidate DROP COLUMN created_at;
+
+ALTER TABLE sub_onekv_candidate ADD COLUMN IF NOT EXISTS identity text NOT NULL;
+ALTER TABLE sub_onekv_candidate ADD COLUMN IF NOT EXISTS status VARCHAR(256) NOT NULL;
+ALTER TABLE sub_onekv_candidate ADD COLUMN IF NOT EXISTS created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now();
+
+ALTER TABLE sub_onekv_nominator DROP COLUMN onekv_id;
+ALTER TABLE sub_onekv_nominator DROP COLUMN stash_account_id;
+ALTER TABLE sub_onekv_nominator DROP COLUMN proxy_account_id;
+ALTER TABLE sub_onekv_nominator DROP COLUMN bonded_amount;
+ALTER TABLE sub_onekv_nominator DROP COLUMN proxy_delay;
+ALTER TABLE sub_onekv_nominator DROP COLUMN last_nomination_at;
+ALTER TABLE sub_onekv_nominator DROP COLUMN nominator_created_at;
+ALTER TABLE sub_onekv_nominator DROP COLUMN average_stake;
+ALTER TABLE sub_onekv_nominator DROP COLUMN reward_destination;
+ALTER TABLE sub_onekv_nominator DROP COLUMN created_at;
+ALTER TABLE sub_onekv_nominator ADD COLUMN IF NOT EXISTS created_at TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now();
+
+DROP TABLE sub_onekv_candidate_validity;
+DROP TABLE sub_onekv_nominee;
\ No newline at end of file
diff --git a/_template/telegram/dialog/validator_info.html b/_template/telegram/dialog/validator_info.html
index cf3f63e9..623ebbd4 100644
--- a/_template/telegram/dialog/validator_info.html
+++ b/_template/telegram/dialog/validator_info.html
@@ -16,17 +16,8 @@
☠️ Slashed {{ slash_count }} times in the last 12 months{% endif %}{% else %}🙄 There is currently no active or waiting validator with address
{{ condensed_address }}
. Please make sure the validator still has a validate
intention.{% endif %}
OpenGov
-🗳 {% if missing_referendum_votes | length == 0 %}No missing votes for open referenda{% else %}Hasn't voted for {% for missing_referendum_vote in missing_referendum_votes %}#{{ missing_referendum_vote }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}{% if is_onekv %}
+🗳 {% if missing_referendum_votes | length == 0 %}No missing votes for open referenda{% else %}Hasn't voted for {% for missing_referendum_vote in missing_referendum_votes %}#{{ missing_referendum_vote }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}{% if is_dn %}
-Thousand Validators Info
-🏷 {{ onekv_name }}
-{% if onekv_offline_since %}🔴️ Offline since {{ onekv_offline_since }}{% else %}🟢️ Online{% endif %}
-{% if onekv_is_valid %}✅ Valid 1KV validator{% else %}❌ Invalid 1KV validator:{% for onekv_invalidity_reason in onekv_invalidity_reasons %}
-- {{ onekv_invalidity_reason }}{% endfor %}{% endif %}{% if onekv_rank %}
-📈 Rank {{ onekv_rank }}{% endif %}{% if onekv_score %}
-📊 Score {{ onekv_score }}{% endif %}
-🆘 {% if onekv_fault_count == 0 %}No{% else %}{{ onekv_fault_count }}{% endif %} offline fault{% if onekv_fault_count != 1 %}s{% endif %} {% if onekv_nominated_at %}
-💎 Last 1KV nomination {{ onekv_nominated_at }}{% endif %}{% if onekv_location %}
-🌍 {{ onekv_location }}{% endif %}
-📡 Discovered {{ onekv_discovered_at }}
-1KV data last updated {{ onekv_last_updated }}{% endif %}
\ No newline at end of file
+Decentralized Nodes Info
+🏷 {{ dn_identity }}
+📊 Status: {{ dn_status }}{% endif %}
\ No newline at end of file
diff --git a/subvt-app-service/Cargo.toml b/subvt-app-service/Cargo.toml
index edeb7af9..90681609 100644
--- a/subvt-app-service/Cargo.toml
+++ b/subvt-app-service/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-app-service"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-block-processor/Cargo.toml b/subvt-block-processor/Cargo.toml
index 5e15f742..48943ad2 100644
--- a/subvt-block-processor/Cargo.toml
+++ b/subvt-block-processor/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-block-processor"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-config/Cargo.toml b/subvt-config/Cargo.toml
index 91eef9f5..1b32fe0e 100644
--- a/subvt-config/Cargo.toml
+++ b/subvt-config/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-config"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-config/src/lib.rs b/subvt-config/src/lib.rs
index 6a1734cb..1e306757 100644
--- a/subvt-config/src/lib.rs
+++ b/subvt-config/src/lib.rs
@@ -143,13 +143,10 @@ pub struct ValidatorListUpdaterConfig {
pub history_record_depth: u64,
}
-/// 1KV configuration - only used for Polkadot and Kusama.
#[derive(Clone, Debug, Deserialize)]
-pub struct OneKVConfig {
+pub struct DNConfig {
pub candidate_history_record_count: u64,
- pub candidate_list_endpoint: String,
- pub candidate_details_endpoint: String,
- pub nominator_list_endpoint: String,
+ pub data_endpoint: String,
pub refresh_seconds: u64,
}
@@ -285,7 +282,7 @@ pub struct Config {
pub common: CommonConfig,
pub http: HTTPConfig,
pub log: LogConfig,
- pub onekv: OneKVConfig,
+ pub dn: DNConfig,
pub app_postgres: PostgreSQLConfig,
pub network_postgres: PostgreSQLConfig,
pub redis: RedisConfig,
diff --git a/subvt-governance/Cargo.toml b/subvt-governance/Cargo.toml
index f7008cbc..5e109ee5 100644
--- a/subvt-governance/Cargo.toml
+++ b/subvt-governance/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-governance"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-kline-updater/Cargo.toml b/subvt-kline-updater/Cargo.toml
index 6a1f6cd6..12f3f70f 100644
--- a/subvt-kline-updater/Cargo.toml
+++ b/subvt-kline-updater/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-kline-updater"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-logging/Cargo.toml b/subvt-logging/Cargo.toml
index 912e302c..f28a50ac 100644
--- a/subvt-logging/Cargo.toml
+++ b/subvt-logging/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-logging"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-metrics/Cargo.toml b/subvt-metrics/Cargo.toml
index 0d9ae908..8b96e2c3 100644
--- a/subvt-metrics/Cargo.toml
+++ b/subvt-metrics/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-metrics"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-network-status-server/Cargo.toml b/subvt-network-status-server/Cargo.toml
index 33e196bf..184942e3 100644
--- a/subvt-network-status-server/Cargo.toml
+++ b/subvt-network-status-server/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-network-status-server"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-network-status-updater/Cargo.toml b/subvt-network-status-updater/Cargo.toml
index e4b137c7..190d5270 100644
--- a/subvt-network-status-updater/Cargo.toml
+++ b/subvt-network-status-updater/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-network-status-updater"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-nft/Cargo.toml b/subvt-nft/Cargo.toml
index 468df7fb..2880604f 100644
--- a/subvt-nft/Cargo.toml
+++ b/subvt-nft/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-nft"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-notification-generator/Cargo.toml b/subvt-notification-generator/Cargo.toml
index b2725e91..c5cf34f0 100644
--- a/subvt-notification-generator/Cargo.toml
+++ b/subvt-notification-generator/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-notification-generator"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-notification-generator/src/inspect/validator_list/mod.rs b/subvt-notification-generator/src/inspect/validator_list/mod.rs
index c186c1cb..034d6789 100644
--- a/subvt-notification-generator/src/inspect/validator_list/mod.rs
+++ b/subvt-notification-generator/src/inspect/validator_list/mod.rs
@@ -15,7 +15,6 @@ use subvt_types::subvt::ValidatorDetails;
mod add;
mod init;
-mod onekv;
mod remove;
mod unclaimed_payout;
mod update;
diff --git a/subvt-notification-generator/src/inspect/validator_list/onekv/location.rs b/subvt-notification-generator/src/inspect/validator_list/onekv/location.rs
deleted file mode 100644
index fff4aa32..00000000
--- a/subvt-notification-generator/src/inspect/validator_list/onekv/location.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-use crate::{NotificationGenerator, CONFIG};
-use std::sync::Arc;
-use subvt_persistence::postgres::app::PostgreSQLAppStorage;
-use subvt_persistence::postgres::network::PostgreSQLNetworkStorage;
-use subvt_types::app::app_event;
-use subvt_types::app::notification::NotificationTypeCode;
-use subvt_types::subvt::ValidatorDetails;
-
-impl NotificationGenerator {
- pub(crate) async fn inspect_onekv_location_change(
- &self,
- network_postgres: Arc,
- app_postgres: Arc,
- last: &ValidatorDetails,
- current: &ValidatorDetails,
- ) -> anyhow::Result<()> {
- if current.onekv_location != last.onekv_location {
- log::debug!(
- "1KV location of {} changed from {:?} to {:?}.",
- current.account.address,
- last.onekv_location,
- current.onekv_location,
- );
- let rules = app_postgres
- .get_notification_rules_for_validator(
- &NotificationTypeCode::OneKVValidatorLocationChange.to_string(),
- CONFIG.substrate.network_id,
- ¤t.account.id,
- )
- .await?;
- self.generate_notifications(
- app_postgres,
- &rules,
- &Some(current.account.id),
- Some(&app_event::OneKVLocationChange {
- validator_account_id: current.account.id,
- prev_location: last.onekv_location.clone(),
- current_location: current.onekv_location.clone(),
- }),
- )
- .await?;
- network_postgres
- .save_onekv_location_change_event(
- ¤t.account.id,
- &last.onekv_location,
- ¤t.onekv_location,
- )
- .await?;
- }
- Ok(())
- }
-}
diff --git a/subvt-notification-generator/src/inspect/validator_list/onekv/mod.rs b/subvt-notification-generator/src/inspect/validator_list/onekv/mod.rs
deleted file mode 100644
index 4f431106..00000000
--- a/subvt-notification-generator/src/inspect/validator_list/onekv/mod.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-use crate::NotificationGenerator;
-use std::sync::Arc;
-use subvt_persistence::postgres::app::PostgreSQLAppStorage;
-use subvt_persistence::postgres::network::PostgreSQLNetworkStorage;
-use subvt_types::subvt::ValidatorDetails;
-
-mod location;
-mod online;
-mod rank;
-mod validity;
-
-impl NotificationGenerator {
- pub(crate) async fn inspect_onekv_changes(
- &self,
- network_postgres: Arc,
- app_postgres: Arc,
- last: &ValidatorDetails,
- current: &ValidatorDetails,
- ) -> anyhow::Result<()> {
- if current.onekv_candidate_record_id.is_none() {
- return Ok(());
- }
- self.inspect_onekv_rank_change(
- network_postgres.clone(),
- app_postgres.clone(),
- last,
- current,
- )
- .await?;
- self.inspect_onekv_location_change(
- network_postgres.clone(),
- app_postgres.clone(),
- last,
- current,
- )
- .await?;
- self.inspect_onekv_validity_change(
- network_postgres.clone(),
- app_postgres.clone(),
- last,
- current,
- )
- .await?;
- self.inspect_onekv_online_status_change(network_postgres, app_postgres, last, current)
- .await?;
- Ok(())
- }
-}
diff --git a/subvt-notification-generator/src/inspect/validator_list/onekv/online.rs b/subvt-notification-generator/src/inspect/validator_list/onekv/online.rs
deleted file mode 100644
index 0b5c99f4..00000000
--- a/subvt-notification-generator/src/inspect/validator_list/onekv/online.rs
+++ /dev/null
@@ -1,56 +0,0 @@
-use crate::{NotificationGenerator, CONFIG};
-use std::sync::Arc;
-use subvt_persistence::postgres::app::PostgreSQLAppStorage;
-use subvt_persistence::postgres::network::PostgreSQLNetworkStorage;
-use subvt_types::app::app_event;
-use subvt_types::app::notification::NotificationTypeCode;
-use subvt_types::subvt::ValidatorDetails;
-
-impl NotificationGenerator {
- pub(crate) async fn inspect_onekv_online_status_change(
- &self,
- network_postgres: Arc,
- app_postgres: Arc,
- last: &ValidatorDetails,
- current: &ValidatorDetails,
- ) -> anyhow::Result<()> {
- let (last_offline_since, current_offline_since) =
- match (last.onekv_offline_since, current.onekv_offline_since) {
- (Some(last_offline_since), Some(current_offline_since)) => {
- (last_offline_since, current_offline_since)
- }
- _ => return Ok(()),
- };
- if (current_offline_since > 0 && last_offline_since == 0)
- || (current_offline_since == 0 && last_offline_since > 0)
- {
- log::debug!(
- "1KV online status (offline_since) of {} changed from {} to {}.",
- current.account.address,
- last_offline_since,
- current_offline_since,
- );
- let rules = app_postgres
- .get_notification_rules_for_validator(
- &NotificationTypeCode::OneKVValidatorOnlineStatusChange.to_string(),
- CONFIG.substrate.network_id,
- ¤t.account.id,
- )
- .await?;
- self.generate_notifications(
- app_postgres,
- &rules,
- &Some(current.account.id),
- Some(&app_event::OneKVOnlineStatusChange {
- validator_account_id: current.account.id,
- offline_since: current_offline_since,
- }),
- )
- .await?;
- network_postgres
- .save_onekv_online_status_change_event(¤t.account.id, current_offline_since)
- .await?;
- }
- Ok(())
- }
-}
diff --git a/subvt-notification-generator/src/inspect/validator_list/onekv/rank.rs b/subvt-notification-generator/src/inspect/validator_list/onekv/rank.rs
deleted file mode 100644
index d8200a32..00000000
--- a/subvt-notification-generator/src/inspect/validator_list/onekv/rank.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-use crate::{NotificationGenerator, CONFIG};
-use std::sync::Arc;
-use subvt_persistence::postgres::app::PostgreSQLAppStorage;
-use subvt_persistence::postgres::network::PostgreSQLNetworkStorage;
-use subvt_types::app::app_event;
-use subvt_types::app::notification::NotificationTypeCode;
-use subvt_types::subvt::ValidatorDetails;
-
-impl NotificationGenerator {
- pub(crate) async fn inspect_onekv_rank_change(
- &self,
- network_postgres: Arc,
- app_postgres: Arc,
- last: &ValidatorDetails,
- current: &ValidatorDetails,
- ) -> anyhow::Result<()> {
- if current.onekv_rank != last.onekv_rank {
- log::debug!(
- "1KV rank of {} changed from {:?} to {:?}.",
- current.account.address,
- last.onekv_rank,
- current.onekv_rank,
- );
- let rules = app_postgres
- .get_notification_rules_for_validator(
- &NotificationTypeCode::OneKVValidatorRankChange.to_string(),
- CONFIG.substrate.network_id,
- ¤t.account.id,
- )
- .await?;
- self.generate_notifications(
- app_postgres,
- &rules,
- &Some(current.account.id),
- Some(&app_event::OneKVRankChange {
- validator_account_id: current.account.id,
- prev_rank: last.onekv_rank,
- current_rank: current.onekv_rank,
- }),
- )
- .await?;
- network_postgres
- .save_onekv_rank_change_event(
- ¤t.account.id,
- last.onekv_rank,
- current.onekv_rank,
- )
- .await?;
- }
- Ok(())
- }
-}
diff --git a/subvt-notification-generator/src/inspect/validator_list/onekv/validity.rs b/subvt-notification-generator/src/inspect/validator_list/onekv/validity.rs
deleted file mode 100644
index ea9868b7..00000000
--- a/subvt-notification-generator/src/inspect/validator_list/onekv/validity.rs
+++ /dev/null
@@ -1,57 +0,0 @@
-use crate::{NotificationGenerator, CONFIG};
-use std::sync::Arc;
-use subvt_persistence::postgres::app::PostgreSQLAppStorage;
-use subvt_persistence::postgres::network::PostgreSQLNetworkStorage;
-use subvt_types::app::app_event;
-use subvt_types::app::notification::NotificationTypeCode;
-use subvt_types::subvt::ValidatorDetails;
-
-impl NotificationGenerator {
- pub(crate) async fn inspect_onekv_validity_change(
- &self,
- network_postgres: Arc,
- app_postgres: Arc,
- last: &ValidatorDetails,
- current: &ValidatorDetails,
- ) -> anyhow::Result<()> {
- if current.onekv_is_valid.is_none() || last.onekv_is_valid.is_none() {
- return Ok(());
- }
- if current.onekv_is_valid != last.onekv_is_valid {
- log::debug!(
- "1KV validity of {} changed from {} to {}.",
- current.account.address,
- last.onekv_is_valid.unwrap(),
- current.onekv_is_valid.unwrap(),
- );
- let rules = app_postgres
- .get_notification_rules_for_validator(
- &NotificationTypeCode::OneKVValidatorValidityChange.to_string(),
- CONFIG.substrate.network_id,
- ¤t.account.id,
- )
- .await?;
- let validity_items = network_postgres
- .get_onekv_candidate_validity_items(current.onekv_candidate_record_id.unwrap())
- .await?;
- self.generate_notifications(
- app_postgres,
- &rules,
- &Some(current.account.id),
- Some(&app_event::OneKVValidityChange {
- validator_account_id: current.account.id,
- is_valid: current.onekv_is_valid.unwrap(),
- validity_items,
- }),
- )
- .await?;
- network_postgres
- .save_onekv_validity_change_event(
- ¤t.account.id,
- current.onekv_is_valid.unwrap(),
- )
- .await?;
- }
- Ok(())
- }
-}
diff --git a/subvt-notification-generator/src/inspect/validator_list/update/mod.rs b/subvt-notification-generator/src/inspect/validator_list/update/mod.rs
index 55e942be..263ee328 100644
--- a/subvt-notification-generator/src/inspect/validator_list/update/mod.rs
+++ b/subvt-notification-generator/src/inspect/validator_list/update/mod.rs
@@ -113,8 +113,6 @@ impl NotificationGenerator {
¤t,
)
.await?;
- self.inspect_onekv_changes(network_postgres, app_postgres.clone(), last, ¤t)
- .await?;
self.inspect_para_validating(app_postgres.clone(), last, ¤t)
.await?;
Ok(Some(current))
diff --git a/subvt-notification-processor/Cargo.toml b/subvt-notification-processor/Cargo.toml
index aca9ca62..8ec056d5 100644
--- a/subvt-notification-processor/Cargo.toml
+++ b/subvt-notification-processor/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-notification-processor"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-notification-processor/src/content/context/mod.rs b/subvt-notification-processor/src/content/context/mod.rs
index b1a7a167..388bd8f5 100644
--- a/subvt-notification-processor/src/content/context/mod.rs
+++ b/subvt-notification-processor/src/content/context/mod.rs
@@ -10,21 +10,11 @@ use crate::content::context::referenda::{
set_referendum_submitted_context, set_referendum_timed_out_context,
};
use crate::content::context::{
- basic::set_basic_context,
- block_authorship::set_block_authorship_context,
- identity::set_identity_changed_context,
- lost_nomination::set_lost_nomination_context,
- new_nomination::set_new_nomination_context,
- offline_offence::set_offline_offence_context,
- onekv::{
- location::set_onekv_location_changed_context,
- online_status::set_onekv_online_status_changed_context,
- rank::set_onekv_rank_changed_context, validity::set_onekv_validity_changed_context,
- },
- payout::set_payout_context,
- session_keys::set_session_keys_changed_context,
- unclaimed_payout::set_unclaimed_payout_context,
- validate::set_validate_extrinsic_context,
+ basic::set_basic_context, block_authorship::set_block_authorship_context,
+ identity::set_identity_changed_context, lost_nomination::set_lost_nomination_context,
+ new_nomination::set_new_nomination_context, offline_offence::set_offline_offence_context,
+ payout::set_payout_context, session_keys::set_session_keys_changed_context,
+ unclaimed_payout::set_unclaimed_payout_context, validate::set_validate_extrinsic_context,
validator_active::set_validator_active_context,
validator_chilled::set_validator_chilled_context,
};
@@ -40,7 +30,6 @@ mod identity;
mod lost_nomination;
mod new_nomination;
mod offline_offence;
-mod onekv;
mod payout;
mod referenda;
mod session_keys;
@@ -119,18 +108,6 @@ pub(crate) fn get_renderer_context(
}
NotificationTypeCode::ChainValidatorStartedParaValidating => (),
NotificationTypeCode::ChainValidatorStoppedParaValidating => (),
- NotificationTypeCode::OneKVValidatorRankChange => {
- set_onekv_rank_changed_context(notification, &mut context);
- }
- NotificationTypeCode::OneKVValidatorLocationChange => {
- set_onekv_location_changed_context(notification, &mut context);
- }
- NotificationTypeCode::OneKVValidatorOnlineStatusChange => {
- set_onekv_online_status_changed_context(notification, &mut context);
- }
- NotificationTypeCode::OneKVValidatorValidityChange => {
- set_onekv_validity_changed_context(notification, &mut context);
- }
NotificationTypeCode::ReferendumApproved => {
set_referendum_approved_context(notification, &mut context)
}
diff --git a/subvt-notification-processor/src/content/context/onekv/location.rs b/subvt-notification-processor/src/content/context/onekv/location.rs
deleted file mode 100644
index 8b7937c9..00000000
--- a/subvt-notification-processor/src/content/context/onekv/location.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use subvt_types::app::{app_event, notification::Notification};
-use tera::Context;
-
-pub(crate) fn set_onekv_location_changed_context(
- notification: &Notification,
- context: &mut Context,
-) {
- if let Some(notification_data_json) = ¬ification.data_json {
- if let Ok(event) =
- serde_json::from_str::(notification_data_json.as_str())
- {
- if let Some(prev_location) = event.prev_location {
- context.insert("prev_location", &prev_location);
- }
- if let Some(current_location) = event.current_location {
- context.insert("current_location", ¤t_location);
- }
- } else {
- log::error!(
- "Cannot deserialize 1KV location changed notification data for notification #{}.",
- notification.id,
- );
- }
- } else {
- log::error!(
- "1KV location changed event data does not exist in notification #{}.",
- notification.id,
- );
- }
-}
diff --git a/subvt-notification-processor/src/content/context/onekv/mod.rs b/subvt-notification-processor/src/content/context/onekv/mod.rs
deleted file mode 100644
index b3e7ae4a..00000000
--- a/subvt-notification-processor/src/content/context/onekv/mod.rs
+++ /dev/null
@@ -1,4 +0,0 @@
-pub(crate) mod location;
-pub(crate) mod online_status;
-pub(crate) mod rank;
-pub(crate) mod validity;
diff --git a/subvt-notification-processor/src/content/context/onekv/online_status.rs b/subvt-notification-processor/src/content/context/onekv/online_status.rs
deleted file mode 100644
index 99b451b1..00000000
--- a/subvt-notification-processor/src/content/context/onekv/online_status.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-use chrono::{LocalResult, TimeZone, Utc};
-use subvt_types::app::{app_event, notification::Notification};
-use tera::Context;
-
-pub(crate) fn set_onekv_online_status_changed_context(
- notification: &Notification,
- context: &mut Context,
-) {
- if let Some(notification_data_json) = ¬ification.data_json {
- if let Ok(event) = serde_json::from_str::(
- notification_data_json.as_str(),
- ) {
- let date_time_format = "%b %d, %Y %H:%M UTC";
- if event.offline_since > 0 {
- if let LocalResult::Single(offline_since) =
- Utc::timestamp_opt(&Utc, event.offline_since as i64 / 1000, 0)
- {
- context.insert(
- "offline_since",
- &offline_since.format(date_time_format).to_string(),
- )
- }
- }
- } else {
- log::error!(
- "Cannot deserialize 1KV online status changed notification data for notification #{}.",
- notification.id,
- );
- }
- } else {
- log::error!(
- "1KV online status changed event data does not exist in notification #{}.",
- notification.id,
- );
- }
-}
diff --git a/subvt-notification-processor/src/content/context/onekv/rank.rs b/subvt-notification-processor/src/content/context/onekv/rank.rs
deleted file mode 100644
index 9c349364..00000000
--- a/subvt-notification-processor/src/content/context/onekv/rank.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-use subvt_types::app::{app_event, notification::Notification};
-use tera::Context;
-
-pub(crate) fn set_onekv_rank_changed_context(notification: &Notification, context: &mut Context) {
- if let Some(notification_data_json) = ¬ification.data_json {
- if let Ok(event) =
- serde_json::from_str::(notification_data_json.as_str())
- {
- if let Some(prev_rank) = event.prev_rank {
- context.insert("prev_rank", &prev_rank);
- }
- if let Some(current_rank) = event.current_rank {
- context.insert("current_rank", ¤t_rank);
- }
- } else {
- log::error!(
- "Cannot deserialize 1KV rank changed notification data for notification #{}.",
- notification.id,
- );
- }
- } else {
- log::error!(
- "1KV rank changed event data does not exist in notification #{}.",
- notification.id,
- );
- }
-}
diff --git a/subvt-notification-processor/src/content/context/onekv/validity.rs b/subvt-notification-processor/src/content/context/onekv/validity.rs
deleted file mode 100644
index 142cb9ab..00000000
--- a/subvt-notification-processor/src/content/context/onekv/validity.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-use subvt_types::app::{app_event, notification::Notification};
-use tera::Context;
-
-pub(crate) fn set_onekv_validity_changed_context(
- notification: &Notification,
- context: &mut Context,
-) {
- if let Some(notification_data_json) = ¬ification.data_json {
- match serde_json::from_str::(notification_data_json.as_str()) {
- Ok(event) => {
- context.insert("is_valid", &event.is_valid);
- if !event.is_valid {
- let invalidity_reasons: Vec = event
- .validity_items
- .iter()
- .filter(|item| !item.is_valid)
- .map(|item| item.details.clone())
- .collect();
- context.insert("invalidity_reasons", &invalidity_reasons);
- }
- }
- Err(error) => log::error!(
- "Cannot deserialize 1KV validity changed notification data for notification #{}: {:?}",
- notification.id,
- error,
- ),
- }
- } else {
- log::error!(
- "1KV validity changed event data does not exist in notification #{}.",
- notification.id,
- );
- }
-}
diff --git a/subvt-onekv-updater/Cargo.toml b/subvt-onekv-updater/Cargo.toml
index 5ff833d0..e97d3a09 100644
--- a/subvt-onekv-updater/Cargo.toml
+++ b/subvt-onekv-updater/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-onekv-updater"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-onekv-updater/src/lib.rs b/subvt-onekv-updater/src/lib.rs
index e395f1e8..4f302335 100644
--- a/subvt-onekv-updater/src/lib.rs
+++ b/subvt-onekv-updater/src/lib.rs
@@ -5,7 +5,7 @@ use lazy_static::lazy_static;
use subvt_config::Config;
use subvt_persistence::postgres::network::PostgreSQLNetworkStorage;
use subvt_service_common::Service;
-use subvt_types::onekv::{OneKVCandidate, OneKVNominator};
+use subvt_types::dn::DNDataResponse;
mod metrics;
@@ -32,50 +32,51 @@ impl Default for OneKVUpdater {
}
impl OneKVUpdater {
- async fn update_candidates(&self, postgres: &PostgreSQLNetworkStorage) -> anyhow::Result<()> {
- log::info!("Fetch candidate list.");
+ async fn update_data(&self, postgres: &PostgreSQLNetworkStorage) -> anyhow::Result<()> {
+ log::info!("Fetch DN data.");
metrics::last_candidate_list_fetch_timestamp_ms()
.set(chrono::Utc::now().timestamp_millis());
- let candidate_list_start = std::time::Instant::now();
+ let start = std::time::Instant::now();
let response = self
.http_client
- .get(&CONFIG.onekv.candidate_list_endpoint)
+ .get(&CONFIG.dn.data_endpoint)
.send()
.await?;
- metrics::candidate_list_fetch_time_ms()
- .observe(candidate_list_start.elapsed().as_millis() as f64);
- let candidates: Vec = response.json().await?;
+ metrics::nominator_list_fetch_time_ms().observe(start.elapsed().as_millis() as f64);
+ metrics::candidate_list_fetch_time_ms().observe(start.elapsed().as_millis() as f64);
+ let data: DNDataResponse = response.json().await?;
+ // set metrics
metrics::last_candidate_list_fetch_success_status().set(1);
metrics::last_candidate_list_successful_fetch_timestamp_ms()
.set(chrono::Utc::now().timestamp_millis());
- metrics::last_candidate_count().set(candidates.len() as i64);
- log::info!("Fetched {} candidates. Save them.", candidates.len());
-
- // get details for each candidate
+ metrics::last_candidate_count().set(data.selected.len() as i64);
+ metrics::last_nominator_list_fetch_success_status().set(1);
+ metrics::last_nominator_list_successful_fetch_timestamp_ms()
+ .set(chrono::Utc::now().timestamp_millis());
+ metrics::last_nominator_count().set(data.nominators.len() as i64);
+ log::info!("Fetched {} candidates. Save them.", data.selected.len());
+ // save candidates
let mut success_count = 0;
let mut error_count = 0;
- for (index, candidate) in candidates.iter().enumerate() {
+ for (index, node) in data.selected.iter().enumerate() {
let save_result = postgres
- .save_onekv_candidate(
- candidate,
- CONFIG.onekv.candidate_history_record_count as i64,
- )
+ .save_dn_node(node, CONFIG.dn.candidate_history_record_count as i64)
.await;
match save_result {
Ok(_) => {
success_count += 1;
log::info!(
- "Persisted candidate {} of {} :: {}.",
+ "Persisted node {} of {} :: {}.",
index + 1,
- candidates.len(),
- candidate.stash_address,
+ data.selected.len(),
+ node.stash,
);
}
Err(error) => {
error_count += 1;
log::error!(
"Error while persisting details of candidate {}:{:?}",
- candidate.stash_address,
+ node.stash,
error
);
}
@@ -87,38 +88,13 @@ impl OneKVUpdater {
.await?;
metrics::last_candidate_persist_success_count().set(success_count);
metrics::last_candidate_persist_error_count().set(error_count);
- log::info!("1KV update completed.");
- Ok(())
- }
-}
-
-impl OneKVUpdater {
- async fn update_nominators(&self, postgres: &PostgreSQLNetworkStorage) -> anyhow::Result<()> {
- log::info!("Fetch nominator list.");
- metrics::last_nominator_list_fetch_timestamp_ms()
- .set(chrono::Utc::now().timestamp_millis());
- let start = std::time::Instant::now();
- let response = self
- .http_client
- .get(&CONFIG.onekv.nominator_list_endpoint)
- .send()
- .await?;
- metrics::nominator_list_fetch_time_ms().observe(start.elapsed().as_millis() as f64);
- let nominators: Vec = response.json().await?;
- log::info!("Fetched {} nominators.", nominators.len());
- metrics::last_nominator_list_fetch_success_status().set(1);
- metrics::last_nominator_list_successful_fetch_timestamp_ms()
- .set(chrono::Utc::now().timestamp_millis());
- metrics::last_nominator_count().set(nominators.len() as i64);
+ log::info!("Fetched {} nominators.", data.nominators.len());
let mut success_count = 0;
let mut error_count = 0;
- for (index, nominator) in nominators.iter().enumerate() {
+ for (index, nominator) in data.nominators.iter().enumerate() {
let save_result = postgres
- .save_onekv_nominator(
- nominator,
- CONFIG.onekv.candidate_history_record_count as i64,
- )
+ .save_onekv_nominator(nominator, CONFIG.dn.candidate_history_record_count as i64)
.await;
match save_result {
Ok(_) => {
@@ -126,22 +102,20 @@ impl OneKVUpdater {
log::info!(
"Persisted nominator {} of {} :: {}.",
index + 1,
- nominators.len(),
- nominator.address,
+ data.nominators.len(),
+ nominator,
);
}
Err(error) => {
error_count += 1;
- log::error!(
- "Error while persisting nominator {}:{:?}",
- nominator.address,
- error
- );
+ log::error!("Error while persisting nominator {}:{:?}", nominator, error);
}
}
}
metrics::last_nominator_persist_success_count().set(success_count);
metrics::last_nominator_persist_error_count().set(error_count);
+
+ log::info!("DN update completed.");
Ok(())
}
}
@@ -158,30 +132,22 @@ impl Service for OneKVUpdater {
async fn run(&'static self) -> anyhow::Result<()> {
log::info!(
"1KV updater has started with {} seconds refresh wait period.",
- CONFIG.onekv.refresh_seconds
+ CONFIG.dn.refresh_seconds
);
let postgres =
PostgreSQLNetworkStorage::new(&CONFIG, CONFIG.get_network_postgres_url()).await?;
loop {
- log::info!("Update 1KV candidates.");
+ log::info!("Update DN data.");
metrics::last_run_timestamp_ms().set(chrono::Utc::now().timestamp_millis());
- if let Err(error) = self.update_candidates(&postgres).await {
+ if let Err(error) = self.update_data(&postgres).await {
metrics::last_candidate_count().set(0);
metrics::last_candidate_list_fetch_success_status().set(0);
metrics::last_candidate_persist_success_count().set(0);
metrics::last_candidate_persist_error_count().set(0);
- log::error!("1KV candidates update has failed: {:?}", error);
- }
- log::info!("Update 1KV nominators.");
- if let Err(error) = self.update_nominators(&postgres).await {
- metrics::last_nominator_count().set(0);
- metrics::last_nominator_list_fetch_success_status().set(0);
- metrics::last_nominator_persist_success_count().set(0);
- metrics::last_nominator_persist_error_count().set(0);
- log::error!("1KV nominators update has failed: {:?}", error);
+ log::error!("DN update has failed: {:?}", error);
}
- log::info!("Sleep for {} seconds.", CONFIG.onekv.refresh_seconds);
- tokio::time::sleep(std::time::Duration::from_secs(CONFIG.onekv.refresh_seconds)).await;
+ log::info!("Sleep for {} seconds.", CONFIG.dn.refresh_seconds);
+ tokio::time::sleep(std::time::Duration::from_secs(CONFIG.dn.refresh_seconds)).await;
}
}
}
diff --git a/subvt-onekv-updater/src/metrics.rs b/subvt-onekv-updater/src/metrics.rs
index 8da835a7..52d3c7f3 100644
--- a/subvt-onekv-updater/src/metrics.rs
+++ b/subvt-onekv-updater/src/metrics.rs
@@ -103,18 +103,6 @@ pub fn last_candidate_persist_error_count() -> IntGauge {
METER.clone()
}
-pub fn last_nominator_list_fetch_timestamp_ms() -> IntGauge {
- static METER: Lazy = Lazy::new(|| {
- subvt_metrics::registry::register_int_gauge(
- METRIC_PREFIX,
- "last_nominator_list_fetch_timestamp_ms",
- "Timestamp (ms) for the last nominator list fetch operation",
- )
- .unwrap()
- });
- METER.clone()
-}
-
pub fn last_nominator_list_successful_fetch_timestamp_ms() -> IntGauge {
static METER: Lazy = Lazy::new(|| {
subvt_metrics::registry::register_int_gauge(
diff --git a/subvt-persistence/Cargo.toml b/subvt-persistence/Cargo.toml
index 20e5d68a..d511fba0 100644
--- a/subvt-persistence/Cargo.toml
+++ b/subvt-persistence/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "subvt-persistence"
-version = "0.20.7"
+version = "0.21.0"
edition = "2021"
rust-version = "1.67.0"
diff --git a/subvt-persistence/src/postgres/network/onekv.rs b/subvt-persistence/src/postgres/network/onekv.rs
index d34c25e5..e376870e 100644
--- a/subvt-persistence/src/postgres/network/onekv.rs
+++ b/subvt-persistence/src/postgres/network/onekv.rs
@@ -1,106 +1,29 @@
//! 1KV-related storage - for Polkadot and Kusama.
use crate::postgres::network::PostgreSQLNetworkStorage;
-use chrono::NaiveDateTime;
use std::str::FromStr;
use subvt_types::crypto::AccountId;
-use subvt_types::onekv::{
- OneKVCandidate, OneKVCandidateSummary, OneKVNominator, OneKVNominatorSummary, OneKVValidity,
-};
-
-type PostgresCandidateSummary = (
- i32,
- i64,
- String,
- Option,
- i64,
- Option,
- i64,
- Option,
- Option,
- Option,
- NaiveDateTime,
-);
+use subvt_types::dn::DNNode;
impl PostgreSQLNetworkStorage {
- pub async fn save_onekv_candidate(
+ pub async fn save_dn_node(
&self,
- candidate: &OneKVCandidate,
+ node: &DNNode,
history_record_count: i64,
) -> anyhow::Result {
- let validator_account_id = AccountId::from_str(&candidate.stash_address)?;
- let kusama_account_id = if !candidate.kusama_stash_address.is_empty() {
- let kusama_account_id = AccountId::from_str(&candidate.kusama_stash_address)?;
- Some(kusama_account_id)
- } else {
- None
- };
+ let validator_account_id = AccountId::from_str(&node.stash)?;
self.save_account(&validator_account_id).await?;
let candidate_save_result: (i32,) = sqlx::query_as(
r#"
- INSERT INTO sub_onekv_candidate (validator_account_id, kusama_account_id, discovered_at, inclusion, commission, is_active, unclaimed_eras, nominated_at, offline_accumulated, offline_since, name, location, rank, is_valid, fault_count, score_updated_at, score_total, score_aggregate, score_inclusion, score_discovered, score_nominated, score_rank, score_unclaimed, score_bonded, score_faults, score_offline, score_randomness, score_span_inclusion, score_location, score_provider, score_country, score_nominator_stake, score_region)
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33)
+ INSERT INTO sub_onekv_candidate (validator_account_id, identity, status)
+ VALUES ($1, $2, $3)
RETURNING id
"#,
)
- .bind(validator_account_id.to_string())
- .bind(kusama_account_id.map(|account_id| account_id.to_string()))
- .bind(candidate.discovered_at as i64)
- .bind(candidate.inclusion)
- .bind(candidate.commission)
- .bind(candidate.is_active)
- .bind(candidate.unclaimed_eras.as_ref().map(|v| v.iter().map(|i| *i as i64).collect::>()))
- .bind(candidate.nominated_at.map(|last_valid| last_valid as i64))
- .bind(candidate.offline_accumulated)
- .bind(candidate.offline_since as i64)
- .bind(&candidate.name)
- .bind(&candidate.location)
- .bind(candidate.rank.unwrap_or(0))
- .bind(candidate.is_valid())
- .bind(candidate.fault_count)
- .bind(candidate.score.as_ref().map(|score| score.updated_at as i64))
- .bind(candidate.score.as_ref().map(|score| score.total))
- .bind(candidate.score.as_ref().map(|score| score.aggregate))
- .bind(candidate.score.as_ref().map(|score| score.inclusion))
- .bind(candidate.score.as_ref().map(|score| score.discovered))
- .bind(candidate.score.as_ref().map(|score| score.nominated))
- .bind(candidate.score.as_ref().map(|score| score.rank))
- .bind(candidate.score.as_ref().map(|score| score.unclaimed))
- .bind(candidate.score.as_ref().map(|score| score.bonded))
- .bind(candidate.score.as_ref().map(|score| score.faults))
- .bind(candidate.score.as_ref().map(|score| score.offline))
- .bind(candidate.score.as_ref().map(|score| score.randomness))
- .bind(candidate.score.as_ref().map(|score| score.span_inclusion))
- .bind(candidate.score.as_ref().map(|score| score.location))
- .bind(candidate.score.as_ref().map(|score| score.provider))
- .bind(candidate.score.as_ref().map(|score| score.country))
- .bind(candidate.score.as_ref().map(|score| score.nominator_stake))
- .bind(candidate.score.as_ref().map(|score| score.region))
- .fetch_one(&self.connection_pool)
- .await?;
-
- // persist validity records and rank events
- if let Some(validity) = &candidate.validity {
- let mut transaction = self.connection_pool.begin().await?;
- for validity in validity {
- sqlx::query(
- r#"
- INSERT INTO sub_onekv_candidate_validity (onekv_id, onekv_candidate_id, validator_account_id, details, is_valid, ty, validity_updated_at)
- VALUES ($1, $2, $3, $4, $5, $6, $7)
- ON CONFLICT (id) DO NOTHING
- "#,
- )
- .bind(&validity.id)
- .bind(candidate_save_result.0)
- .bind(validator_account_id.to_string())
- .bind(&validity.details)
- .bind(validity.is_valid)
- .bind(&validity.ty)
- .bind(validity.updated_at as i64)
- .execute(&mut *transaction)
- .await?;
- }
- transaction.commit().await?;
- }
+ .bind(validator_account_id.to_string())
+ .bind(&node.identity)
+ .bind(&node.status)
+ .fetch_one(&self.connection_pool)
+ .await?;
// only keep the relevant number of candidate records
let candidate_record_count: (i64,) = sqlx::query_as(
@@ -133,67 +56,30 @@ impl PostgreSQLNetworkStorage {
// return persisted record id
Ok(candidate_save_result.0)
}
-
- pub async fn get_onekv_candidate_validity_items(
- &self,
- onekv_candidate_id: u32,
- ) -> anyhow::Result> {
- let db_events: Vec<(String, String, bool, String, i64)> = sqlx::query_as(
- r#"
- SELECT onekv_id, details, is_valid, ty, validity_updated_at
- FROM sub_onekv_candidate_validity
- WHERE onekv_candidate_id = $1
- "#,
- )
- .bind(onekv_candidate_id as i32)
- .fetch_all(&self.connection_pool)
- .await?;
- Ok(db_events
- .iter()
- .map(|db_validity| OneKVValidity {
- id: db_validity.0.clone(),
- details: db_validity.1.clone(),
- is_valid: db_validity.2,
- ty: db_validity.3.clone(),
- updated_at: db_validity.4 as u64,
- })
- .collect())
- }
}
impl PostgreSQLNetworkStorage {
- pub async fn get_onekv_candidate_summary_by_account_id(
+ pub async fn get_dn_node_by_account_id(
&self,
account_id: &AccountId,
- ) -> anyhow::Result