diff --git a/Cargo.lock b/Cargo.lock index 364b05d679..d11cb73ef3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -670,7 +670,7 @@ dependencies = [ "asn1-rs-derive 0.4.0", "asn1-rs-impl 0.1.0", "displaydoc", - "nom 7.1.3", + "nom", "num-traits", "rusticata-macros", "thiserror 1.0.69", @@ -686,7 +686,7 @@ dependencies = [ "asn1-rs-derive 0.6.0", "asn1-rs-impl 0.2.0", "displaydoc", - "nom 7.1.3", + "nom", "num-traits", "rusticata-macros", "thiserror 2.0.12", @@ -1394,7 +1394,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -1729,15 +1729,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "convert_case" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb402b8d4c85569410425650ce3eddc7d698ed96d39a73f941b08fb63082f1e7" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -1885,7 +1876,7 @@ dependencies = [ "itertools 0.10.5", "log", "smallvec", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-types", ] @@ -2344,7 +2335,7 @@ checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ "asn1-rs 0.5.2", "displaydoc", - "nom 7.1.3", + "nom", "num-bigint", "num-traits", "rusticata-macros", @@ -2358,7 +2349,7 @@ checksum = "07da5016415d5a3c4dd39b11ed26f915f52fc4e0dc197d87908bc916e51bc1a6" dependencies = [ "asn1-rs 0.7.1", "displaydoc", - "nom 7.1.3", + "nom", "num-bigint", "num-traits", "rusticata-macros", @@ -2413,7 +2404,7 @@ version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ - "convert_case 0.4.0", + "convert_case", "proc-macro2", "quote", "rustc_version 0.4.1", @@ -2455,7 +2446,6 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ - "convert_case 0.7.1", "proc-macro2", "quote", "syn 2.0.103", @@ -3595,26 +3585,12 @@ dependencies = [ "sp-trie", "sp-version", "sp-wasm-interface 21.0.1", - "subxt 0.37.0", + "subxt", "subxt-signer", "thiserror 1.0.69", "thousands", ] -[[package]] -name = "frame-decode" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1276c23a1fb234d9f81b5f71c526437f2a55ab4419f29bfe1196ac4ee2f706c" -dependencies = [ - "frame-metadata 23.0.0", - "parity-scale-codec", - "scale-decode 0.16.0", - "scale-info", - "scale-type-resolver", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "frame-executive" version = "39.1.0" @@ -3668,18 +3644,6 @@ dependencies = [ "serde", ] -[[package]] -name = "frame-metadata" -version = "23.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c26fcb0454397c522c05fdad5380c4e622f8a875638af33bff5a320d1fc965" -dependencies = [ - "cfg-if", - "parity-scale-codec", - "scale-info", - "serde", -] - [[package]] name = "frame-metadata-hash-extension" version = "0.7.0" @@ -4296,7 +4260,6 @@ dependencies = [ "allocator-api2", "equivalent", "foldhash", - "serde", ] [[package]] @@ -5088,22 +5051,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror 1.0.69", - "walkdir", - "windows-sys 0.45.0", -] - [[package]] name = "jni-sys" version = "0.3.0" @@ -5150,7 +5097,7 @@ checksum = "62b089779ad7f80768693755a031cc14a7766aba707cbe886674e3f79e9b7e47" dependencies = [ "jsonrpsee-core 0.23.2", "jsonrpsee-types 0.23.2", - "jsonrpsee-ws-client 0.23.2", + "jsonrpsee-ws-client", ] [[package]] @@ -5159,12 +5106,10 @@ version = "0.24.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37b26c20e2178756451cfeb0661fb74c47dd5988cb7e3939de7e9241fd604d42" dependencies = [ - "jsonrpsee-client-transport 0.24.9", "jsonrpsee-core 0.24.9", "jsonrpsee-proc-macros", "jsonrpsee-server", "jsonrpsee-types 0.24.9", - "jsonrpsee-ws-client 0.24.9", "tokio", "tracing", ] @@ -5203,30 +5148,7 @@ dependencies = [ "pin-project", "rustls 0.23.28", "rustls-pki-types", - "rustls-platform-verifier 0.3.4", - "soketto 0.8.1", - "thiserror 1.0.69", - "tokio", - "tokio-rustls 0.26.2", - "tokio-util", - "tracing", - "url", -] - -[[package]] -name = "jsonrpsee-client-transport" -version = "0.24.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bacb85abf4117092455e1573625e21b8f8ef4dec8aff13361140b2dc266cdff2" -dependencies = [ - "base64 0.22.1", - "futures-util", - "http 1.3.1", - "jsonrpsee-core 0.24.9", - "pin-project", - "rustls 0.23.28", - "rustls-pki-types", - "rustls-platform-verifier 0.5.3", + "rustls-platform-verifier", "soketto 0.8.1", "thiserror 1.0.69", "tokio", @@ -5289,21 +5211,18 @@ checksum = "456196007ca3a14db478346f58c7238028d55ee15c1df15115596e411ff27925" dependencies = [ "async-trait", "bytes", - "futures-timer", "futures-util", "http 1.3.1", "http-body 1.0.1", "http-body-util", "jsonrpsee-types 0.24.9", "parking_lot 0.12.4", - "pin-project", "rand 0.8.5", "rustc-hash 2.1.1", "serde", "serde_json", "thiserror 1.0.69", "tokio", - "tokio-stream", "tracing", ] @@ -5418,19 +5337,6 @@ dependencies = [ "url", ] -[[package]] -name = "jsonrpsee-ws-client" -version = "0.24.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b3323d890aa384f12148e8d2a1fd18eb66e9e7e825f9de4fa53bcc19b93eef" -dependencies = [ - "http 1.3.1", - "jsonrpsee-client-transport 0.24.9", - "jsonrpsee-core 0.24.9", - "jsonrpsee-types 0.24.9", - "url", -] - [[package]] name = "k256" version = "0.13.4" @@ -5474,16 +5380,6 @@ dependencies = [ "tiny-keccak", ] -[[package]] -name = "keccak-hash" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e1b8590eb6148af2ea2d75f38e7d29f5ca970d5a4df456b3ef19b8b415d0264" -dependencies = [ - "primitive-types 0.13.1", - "tiny-keccak", -] - [[package]] name = "keystream" version = "1.0.0" @@ -6421,7 +6317,7 @@ dependencies = [ "blake3", "frame-metadata 18.0.0", "parity-scale-codec", - "scale-decode 0.13.1", + "scale-decode", "scale-info", ] @@ -6560,12 +6456,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "multi-stash" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "685a9ac4b61f4e728e1d2c6a7844609c16527aeb5e6c865915c08e619c16410f" - [[package]] name = "multiaddr" version = "0.17.1" @@ -6871,7 +6761,6 @@ dependencies = [ "pallet-transaction-payment-rpc", "pallet-transaction-payment-rpc-runtime-api", "parity-scale-codec", - "rustls-webpki 0.102.8", "sc-basic-authorship", "sc-chain-spec", "sc-chain-spec-derive", @@ -6919,7 +6808,6 @@ dependencies = [ "subtensor-custom-rpc", "subtensor-custom-rpc-runtime-api", "subtensor-runtime-common", - "subxt 0.42.1", "thiserror 1.0.69", ] @@ -7031,15 +6919,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "nom" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" -dependencies = [ - "memchr", -] - [[package]] name = "nonempty" version = "0.7.0" @@ -8976,28 +8855,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.103", -] - [[package]] name = "proc-macro-warning" version = "0.4.2" @@ -9800,7 +9657,7 @@ version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" dependencies = [ - "nom 7.1.3", + "nom", ] [[package]] @@ -9956,7 +9813,7 @@ checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" dependencies = [ "core-foundation 0.9.4", "core-foundation-sys", - "jni 0.19.0", + "jni", "log", "once_cell", "rustls 0.23.28", @@ -9969,27 +9826,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rustls-platform-verifier" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19787cda76408ec5404443dc8b31795c87cd8fec49762dc75fa727740d34acc1" -dependencies = [ - "core-foundation 0.10.1", - "core-foundation-sys", - "jni 0.21.1", - "log", - "once_cell", - "rustls 0.23.28", - "rustls-native-certs 0.8.1", - "rustls-platform-verifier-android", - "rustls-webpki 0.103.3", - "security-framework 3.2.0", - "security-framework-sys", - "webpki-root-certs 0.26.11", - "windows-sys 0.59.0", -] - [[package]] name = "rustls-platform-verifier-android" version = "0.1.1" @@ -10054,15 +9890,9 @@ checksum = "58c4eb8a81997cf040a091d1f7e1938aeab6749d3a0dfa73af43cdc32393483d" dependencies = [ "byteorder", "derive_more 0.99.20", - "twox-hash 1.6.3", + "twox-hash", ] -[[package]] -name = "ruzstd" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3640bec8aad418d7d03c72ea2de10d5c646a598f9883c7babc160d91e3c1b26c" - [[package]] name = "rw-stream-sink" version = "0.4.0" @@ -10433,7 +10263,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.33.0" -source = "git+https://github.com/opentensor/grandpa.git?rev=b0eabfdb46a3ca81116d1cb61fcfed446b10d166#b0eabfdb46a3ca81116d1cb61fcfed446b10d166" +source = "git+https://github.com/opentensor/grandpa.git?rev=b3ba2f67d510559edfb4963523de86ed89439d74#b3ba2f67d510559edfb4963523de86ed89439d74" dependencies = [ "ahash 0.8.12", "array-bytes", @@ -11240,18 +11070,6 @@ dependencies = [ "serde", ] -[[package]] -name = "scale-bits" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27243ab0d2d6235072b017839c5f0cd1a3b1ce45c0f7a715363b0c7d36c76c94" -dependencies = [ - "parity-scale-codec", - "scale-info", - "scale-type-resolver", - "serde", -] - [[package]] name = "scale-decode" version = "0.13.1" @@ -11261,25 +11079,10 @@ dependencies = [ "derive_more 0.99.20", "parity-scale-codec", "primitive-types 0.12.2", - "scale-bits 0.6.0", - "scale-decode-derive 0.13.1", - "scale-type-resolver", - "smallvec", -] - -[[package]] -name = "scale-decode" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d78196772d25b90a98046794ce0fe2588b39ebdfbdc1e45b4c6c85dd43bebad" -dependencies = [ - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.7.0", - "scale-decode-derive 0.16.0", + "scale-bits", + "scale-decode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", ] [[package]] @@ -11294,18 +11097,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "scale-decode-derive" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4b54a1211260718b92832b661025d1f1a4b6930fbadd6908e00edd265fa5f7" -dependencies = [ - "darling 0.20.11", - "proc-macro2", - "quote", - "syn 2.0.103", -] - [[package]] name = "scale-encode" version = "0.7.2" @@ -11315,25 +11106,10 @@ dependencies = [ "derive_more 0.99.20", "parity-scale-codec", "primitive-types 0.12.2", - "scale-bits 0.6.0", - "scale-encode-derive 0.7.2", - "scale-type-resolver", - "smallvec", -] - -[[package]] -name = "scale-encode" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64901733157f9d25ef86843bd783eda439fac7efb0ad5a615d12d2cf3a29464b" -dependencies = [ - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.7.0", - "scale-encode-derive 0.10.0", + "scale-bits", + "scale-encode-derive", "scale-type-resolver", "smallvec", - "thiserror 2.0.12", ] [[package]] @@ -11349,19 +11125,6 @@ dependencies = [ "syn 2.0.103", ] -[[package]] -name = "scale-encode-derive" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78a3993a13b4eafa89350604672c8757b7ea84c7c5947d4b3691e3169c96379b" -dependencies = [ - "darling 0.20.11", - "proc-macro-crate 3.3.0", - "proc-macro2", - "quote", - "syn 2.0.103", -] - [[package]] name = "scale-info" version = "2.11.6" @@ -11411,19 +11174,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "scale-typegen" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05c61b6b706a3eaad63b506ab50a1d2319f817ae01cf753adcc3f055f9f0fcd6" -dependencies = [ - "proc-macro2", - "quote", - "scale-info", - "syn 2.0.103", - "thiserror 2.0.12", -] - [[package]] name = "scale-value" version = "0.16.3" @@ -11436,32 +11186,13 @@ dependencies = [ "either", "frame-metadata 15.1.0", "parity-scale-codec", - "scale-bits 0.6.0", - "scale-decode 0.13.1", - "scale-encode 0.7.2", + "scale-bits", + "scale-decode", + "scale-encode", "scale-info", "scale-type-resolver", "serde", - "yap 0.11.0", -] - -[[package]] -name = "scale-value" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca8b26b451ecb7fd7b62b259fa28add63d12ec49bbcac0e01fcb4b5ae0c09aa" -dependencies = [ - "base58", - "blake2 0.10.6", - "either", - "parity-scale-codec", - "scale-bits 0.7.0", - "scale-decode 0.16.0", - "scale-encode 0.10.0", - "scale-type-resolver", - "serde", - "thiserror 2.0.12", - "yap 0.12.0", + "yap", ] [[package]] @@ -12020,7 +11751,7 @@ dependencies = [ "libsecp256k1", "merlin", "no-std-net", - "nom 7.1.3", + "nom", "num-bigint", "num-rational", "num-traits", @@ -12029,7 +11760,7 @@ dependencies = [ "poly1305", "rand 0.8.5", "rand_chacha 0.3.1", - "ruzstd 0.5.0", + "ruzstd", "schnorrkel", "serde", "serde_json", @@ -12039,62 +11770,8 @@ dependencies = [ "slab", "smallvec", "soketto 0.7.1", - "twox-hash 1.6.3", - "wasmi 0.31.2", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "smoldot" -version = "0.19.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16e5723359f0048bf64bfdfba64e5732a56847d42c4fd3fe56f18280c813413" -dependencies = [ - "arrayvec 0.7.6", - "async-lock", - "atomic-take", - "base64 0.22.1", - "bip39", - "blake2-rfc", - "bs58", - "chacha20", - "crossbeam-queue", - "derive_more 2.0.1", - "ed25519-zebra", - "either", - "event-listener 5.4.0", - "fnv", - "futures-lite", - "futures-util", - "hashbrown 0.15.4", - "hex", - "hmac 0.12.1", - "itertools 0.14.0", - "libm", - "libsecp256k1", - "merlin", - "nom 8.0.0", - "num-bigint", - "num-rational", - "num-traits", - "pbkdf2", - "pin-project", - "poly1305", - "rand 0.8.5", - "rand_chacha 0.3.1", - "ruzstd 0.8.1", - "schnorrkel", - "serde", - "serde_json", - "sha2 0.10.9", - "sha3", - "siphasher 1.0.1", - "slab", - "smallvec", - "soketto 0.8.1", - "twox-hash 2.1.1", - "wasmi 0.40.0", + "twox-hash", + "wasmi", "x25519-dalek", "zeroize", ] @@ -12131,43 +11808,7 @@ dependencies = [ "siphasher 1.0.1", "slab", "smol", - "smoldot 0.16.0", - "zeroize", -] - -[[package]] -name = "smoldot-light" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bba9e591716567d704a8252feeb2f1261a286e1e2cbdd4e49e9197c34a14e2" -dependencies = [ - "async-channel 2.3.1", - "async-lock", - "base64 0.22.1", - "blake2-rfc", - "bs58", - "derive_more 2.0.1", - "either", - "event-listener 5.4.0", - "fnv", - "futures-channel", - "futures-lite", - "futures-util", - "hashbrown 0.15.4", - "hex", - "itertools 0.14.0", - "log", - "lru 0.12.5", - "parking_lot 0.12.4", - "pin-project", - "rand 0.8.5", - "rand_chacha 0.3.1", - "serde", - "serde_json", - "siphasher 1.0.1", - "slab", - "smol", - "smoldot 0.19.4", + "smoldot", "zeroize", ] @@ -12531,7 +12172,7 @@ dependencies = [ "digest 0.10.7", "sha2 0.10.9", "sha3", - "twox-hash 1.6.3", + "twox-hash", ] [[package]] @@ -12544,7 +12185,7 @@ dependencies = [ "digest 0.10.7", "sha2 0.10.9", "sha3", - "twox-hash 1.6.3", + "twox-hash", ] [[package]] @@ -13596,61 +13237,24 @@ dependencies = [ "parity-scale-codec", "primitive-types 0.12.2", "reconnecting-jsonrpsee-ws-client", - "scale-bits 0.6.0", - "scale-decode 0.13.1", - "scale-encode 0.7.2", + "scale-bits", + "scale-decode", + "scale-encode", "scale-info", - "scale-value 0.16.3", + "scale-value", "serde", "serde_json", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "subxt-core 0.37.1", - "subxt-lightclient 0.37.0", - "subxt-macro 0.37.0", - "subxt-metadata 0.37.0", + "subxt-core", + "subxt-lightclient", + "subxt-macro", + "subxt-metadata", "thiserror 1.0.69", "tokio-util", "tracing", "url", ] -[[package]] -name = "subxt" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c7533d39317bed01100b37158740dcec27c0e1933f3bca19bdf12110f242248" -dependencies = [ - "async-trait", - "derive-where", - "either", - "frame-metadata 23.0.0", - "futures", - "hex", - "jsonrpsee 0.24.9", - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.7.0", - "scale-decode 0.16.0", - "scale-encode 0.10.0", - "scale-info", - "scale-value 0.18.0", - "serde", - "serde_json", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "subxt-core 0.42.1", - "subxt-lightclient 0.42.1", - "subxt-macro 0.42.1", - "subxt-metadata 0.42.1", - "subxt-rpcs", - "thiserror 2.0.12", - "tokio", - "tokio-util", - "tracing", - "url", - "wasm-bindgen-futures", - "web-time", -] - [[package]] name = "subxt-codegen" version = "0.37.0" @@ -13665,30 +13269,13 @@ dependencies = [ "proc-macro2", "quote", "scale-info", - "scale-typegen 0.8.0", - "subxt-metadata 0.37.0", + "scale-typegen", + "subxt-metadata", "syn 2.0.103", "thiserror 1.0.69", "tokio", ] -[[package]] -name = "subxt-codegen" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ded0fa15fa78c58b91e2a1c6bcef8a2bc68fe165d00e1dfb9787069351511c" -dependencies = [ - "heck 0.5.0", - "parity-scale-codec", - "proc-macro2", - "quote", - "scale-info", - "scale-typegen 0.11.1", - "subxt-metadata 0.42.1", - "syn 2.0.103", - "thiserror 2.0.12", -] - [[package]] name = "subxt-core" version = "0.37.1" @@ -13704,45 +13291,15 @@ dependencies = [ "impl-serde 0.4.0", "parity-scale-codec", "primitive-types 0.12.2", - "scale-bits 0.6.0", - "scale-decode 0.13.1", - "scale-encode 0.7.2", - "scale-info", - "scale-value 0.16.3", - "serde", - "serde_json", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "subxt-metadata 0.37.0", - "tracing", -] - -[[package]] -name = "subxt-core" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c3574b60050e57cf23edf6521263b06e98a880073df330813bb04242633083" -dependencies = [ - "base58", - "blake2 0.10.6", - "derive-where", - "frame-decode", - "frame-metadata 23.0.0", - "hashbrown 0.14.5", - "hex", - "impl-serde 0.5.0", - "keccak-hash 0.11.0", - "parity-scale-codec", - "primitive-types 0.13.1", - "scale-bits 0.7.0", - "scale-decode 0.16.0", - "scale-encode 0.10.0", + "scale-bits", + "scale-decode", + "scale-encode", "scale-info", - "scale-value 0.18.0", + "scale-value", "serde", "serde_json", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "subxt-metadata 0.42.1", - "thiserror 2.0.12", + "subxt-metadata", "tracing", ] @@ -13756,30 +13313,13 @@ dependencies = [ "futures-util", "serde", "serde_json", - "smoldot-light 0.14.0", + "smoldot-light", "thiserror 1.0.69", "tokio", "tokio-stream", "tracing", ] -[[package]] -name = "subxt-lightclient" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c546d42ca103c0a6a3434cadf4ca500d2a49e60af0842b0fdee6fbfa97aa02f" -dependencies = [ - "futures", - "futures-util", - "serde", - "serde_json", - "smoldot-light 0.17.2", - "thiserror 2.0.12", - "tokio", - "tokio-stream", - "tracing", -] - [[package]] name = "subxt-macro" version = "0.37.0" @@ -13790,25 +13330,8 @@ dependencies = [ "parity-scale-codec", "proc-macro-error", "quote", - "scale-typegen 0.8.0", - "subxt-codegen 0.37.0", - "syn 2.0.103", -] - -[[package]] -name = "subxt-macro" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91d253492eb17c65bdb41e538d6a31508563757bd34ad6014cb03536cf31757" -dependencies = [ - "darling 0.20.11", - "parity-scale-codec", - "proc-macro-error2", - "quote", - "scale-typegen 0.11.1", - "subxt-codegen 0.42.1", - "subxt-metadata 0.42.1", - "subxt-utils-fetchmetadata", + "scale-typegen", + "subxt-codegen", "syn 2.0.103", ] @@ -13825,45 +13348,6 @@ dependencies = [ "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "subxt-metadata" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243990ca4e0cdb74ef7458f1d5070a1bd5144d744cc146f23a32ab56d23e1db7" -dependencies = [ - "frame-decode", - "frame-metadata 23.0.0", - "hashbrown 0.14.5", - "parity-scale-codec", - "scale-info", - "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "thiserror 2.0.12", -] - -[[package]] -name = "subxt-rpcs" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55313e3652f5360b5ed878bfe1d62fe181ecb8c130c81278ab89d1580f89a7ed" -dependencies = [ - "derive-where", - "frame-metadata 23.0.0", - "futures", - "hex", - "impl-serde 0.5.0", - "jsonrpsee 0.24.9", - "parity-scale-codec", - "primitive-types 0.13.1", - "serde", - "serde_json", - "subxt-core 0.42.1", - "subxt-lightclient 0.42.1", - "thiserror 2.0.12", - "tokio-util", - "tracing", - "url", -] - [[package]] name = "subxt-signer" version = "0.37.0" @@ -13875,7 +13359,7 @@ dependencies = [ "cfg-if", "hex", "hmac 0.12.1", - "keccak-hash 0.10.0", + "keccak-hash", "parity-scale-codec", "pbkdf2", "regex", @@ -13884,21 +13368,10 @@ dependencies = [ "secrecy", "sha2 0.10.9", "sp-crypto-hashing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "subxt-core 0.37.1", + "subxt-core", "zeroize", ] -[[package]] -name = "subxt-utils-fetchmetadata" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d3a6e9cb2fd2db8bf3cb0d03da691ac949259e620c9eb8f25764b2711805ca" -dependencies = [ - "hex", - "parity-scale-codec", - "thiserror 2.0.12", -] - [[package]] name = "syn" version = "1.0.109" @@ -14643,12 +14116,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "twox-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b907da542cbced5261bd3256de1b3a1bf340a3d37f93425a07362a1d687de56" - [[package]] name = "typenum" version = "1.16.0" @@ -15067,38 +14534,16 @@ dependencies = [ "smallvec", "spin 0.9.8", "wasmi_arena", - "wasmi_core 0.13.0", + "wasmi_core", "wasmparser-nostd", ] -[[package]] -name = "wasmi" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19af97fcb96045dd1d6b4d23e2b4abdbbe81723dbc5c9f016eb52145b320063" -dependencies = [ - "arrayvec 0.7.6", - "multi-stash", - "smallvec", - "spin 0.9.8", - "wasmi_collections", - "wasmi_core 0.40.0", - "wasmi_ir", - "wasmparser 0.221.3", -] - [[package]] name = "wasmi_arena" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "104a7f73be44570cac297b3035d76b169d6599637631cf37a1703326a0727073" -[[package]] -name = "wasmi_collections" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e80d6b275b1c922021939d561574bf376613493ae2b61c6963b15db0e8813562" - [[package]] name = "wasmi_core" version = "0.13.0" @@ -15111,25 +14556,6 @@ dependencies = [ "paste", ] -[[package]] -name = "wasmi_core" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a8c51482cc32d31c2c7ff211cd2bedd73c5bd057ba16a2ed0110e7a96097c33" -dependencies = [ - "downcast-rs", - "libm", -] - -[[package]] -name = "wasmi_ir" -version = "0.40.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e431a14c186db59212a88516788bd68ed51f87aa1e08d1df742522867b5289a" -dependencies = [ - "wasmi_core 0.40.0", -] - [[package]] name = "wasmparser" version = "0.102.0" @@ -15140,15 +14566,6 @@ dependencies = [ "url", ] -[[package]] -name = "wasmparser" -version = "0.221.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06bfa36ab3ac2be0dee563380147a5b81ba10dd8885d7fbbc9eb574be67d185" -dependencies = [ - "bitflags 2.9.1", -] - [[package]] name = "wasmparser-nostd" version = "0.100.2" @@ -15177,7 +14594,7 @@ dependencies = [ "rayon", "serde", "target-lexicon", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-cache", "wasmtime-cranelift", "wasmtime-environ", @@ -15232,7 +14649,7 @@ dependencies = [ "object 0.30.4", "target-lexicon", "thiserror 1.0.69", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-cranelift-shared", "wasmtime-environ", ] @@ -15267,7 +14684,7 @@ dependencies = [ "serde", "target-lexicon", "thiserror 1.0.69", - "wasmparser 0.102.0", + "wasmparser", "wasmtime-types", ] @@ -15350,7 +14767,7 @@ dependencies = [ "cranelift-entity", "serde", "thiserror 1.0.69", - "wasmparser 0.102.0", + "wasmparser", ] [[package]] @@ -15373,24 +14790,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-root-certs" -version = "0.26.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e" -dependencies = [ - "webpki-root-certs 1.0.1", -] - -[[package]] -name = "webpki-root-certs" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86138b15b2b7d561bc4469e77027b8dd005a43dc502e9031d1f5afc8ce1f280e" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "webpki-roots" version = "0.25.4" @@ -15945,7 +15344,7 @@ dependencies = [ "data-encoding", "der-parser 8.2.0", "lazy_static", - "nom 7.1.3", + "nom", "oid-registry 0.6.1", "rusticata-macros", "thiserror 1.0.69", @@ -15962,7 +15361,7 @@ dependencies = [ "data-encoding", "der-parser 10.0.0", "lazy_static", - "nom 7.1.3", + "nom", "oid-registry 0.8.1", "rusticata-macros", "thiserror 2.0.12", @@ -16032,12 +15431,6 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff4524214bc4629eba08d78ceb1d6507070cc0bcbbed23af74e19e6e924a24cf" -[[package]] -name = "yap" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe269e7b803a5e8e20cbd97860e136529cd83bf2c9c6d37b142467e7e1f051f" - [[package]] name = "yasna" version = "0.5.2" diff --git a/Cargo.toml b/Cargo.toml index 3ce44f6241..02a0aaf9d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -285,4 +285,4 @@ metadata-hash = ["node-subtensor-runtime/metadata-hash"] pow-faucet = [] [patch."https://github.com/paritytech/polkadot-sdk.git"] -sc-consensus-grandpa = { git = "https://github.com/opentensor/grandpa.git", rev = "b0eabfdb46a3ca81116d1cb61fcfed446b10d166" } \ No newline at end of file +sc-consensus-grandpa = { git = "https://github.com/opentensor/grandpa.git", rev = "b3ba2f67d510559edfb4963523de86ed89439d74" } diff --git a/node/Cargo.toml b/node/Cargo.toml index a116bceeea..0ee30ab9f3 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -114,10 +114,6 @@ subtensor-custom-rpc-runtime-api = { workspace = true, features = ["std"] } pallet-subtensor-swap-rpc = { workspace = true, features = ["std"] } pallet-subtensor-swap-runtime-api = { workspace = true, features = ["std"] } -# Warp-sync patch dependencies -subxt = { version = "0.42.1", default-features = true } # temp dependency to get API -rustls-webpki = "0.102" # a dependency for linux version of subxt framework - [build-dependencies] substrate-build-script-utils = { workspace = true } diff --git a/node/src/service.rs b/node/src/service.rs index 9504fe345b..35efa81f68 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -20,7 +20,10 @@ use sp_api::ProvideRuntimeApi; use sp_block_builder::BlockBuilder as BlockBuilderApi; use sp_consensus::Error as ConsensusError; use sp_consensus_aura::sr25519::AuthorityPair as AuraPair; +use sp_core::H256; use sp_runtime::traits::{Block as BlockT, Header, NumberFor}; +use std::collections::HashSet; +use std::str::FromStr; use std::{cell::RefCell, path::Path}; use std::{marker::PhantomData, sync::Arc, time::Duration}; use substrate_prometheus_endpoint::Registry; @@ -102,12 +105,38 @@ where }); let select_chain = sc_consensus::LongestChain::new(backend.clone()); + + let skip_block_justifications = if config.chain_spec.chain_type() == ChainType::Live { + // Mainnet patch + let hash_5614869 = + H256::from_str("0xb49f8cd2a49b51a493fc55a8c9524ba08c3aa6b702f20af02878c1ec68e3ff5f") + .expect("Invalid hash string."); + let hash_5614888 = + H256::from_str("0x04c71efb77060bfacfb49cd61826d594148ccda2ee23d66c7db819b16b55911c") + .expect("Invalid hash string."); + + Some(HashSet::from([hash_5614869, hash_5614888])) + } else { + // Testnet patch + let hash_4589660 = + H256::from_str("0x819a5e54ffa2d267d469c6da44de5e8819b1aad1717a1389c959eab4349722ca") + .expect("Invalid hash string."); + + Some(HashSet::from([hash_4589660])) + }; + + log::warn!( + "Grandpa block import patch enabled. Chain type = {:?}. Skip justifications for blocks = {skip_block_justifications:?}", + config.chain_spec.chain_type() + ); + let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import( client.clone(), GRANDPA_JUSTIFICATION_PERIOD, &client, select_chain.clone(), telemetry.as_ref().map(|x| x.handle()), + skip_block_justifications, )?; let storage_override = Arc::new(StorageOverrideHandler::<_, _, _>::new(client.clone())); @@ -349,64 +378,6 @@ pub fn build_manual_seal_import_queue( )) } -async fn get_new_block_header() --> sp_runtime::generic::Header, sp_runtime::traits::BlakeTwo256> { - use sp_core::H256; - use sp_runtime::traits::BlakeTwo256; - use sp_runtime::{Digest, DigestItem}; - use subxt::{OnlineClient, PolkadotConfig}; - - let api = OnlineClient::::from_url("wss://archive.chain.opentensor.ai") - .await - .expect("Could not compose an API client from the URL"); - - let mut blocks_sub = api - .blocks() - .subscribe_finalized() - .await - .expect("Could not subscribe to API"); - if let Some(Ok(block)) = blocks_sub.next().await { - log::debug!("Target warp header: ({:?})", block.header()); - - let number = block.header().number; - let parent_hash = H256::from_slice(block.header().parent_hash.as_bytes()); - let extrinsics_root = H256::from_slice(block.header().extrinsics_root.as_bytes()); - let state_root = H256::from_slice(block.header().state_root.as_bytes()); - let logs = block - .header() - .digest - .logs - .clone() - .into_iter() - .map(|log| match log { - subxt::config::substrate::DigestItem::PreRuntime(engine, data) => { - DigestItem::PreRuntime(engine, data) - } - subxt::config::substrate::DigestItem::Consensus(engine, data) => { - DigestItem::Consensus(engine, data) - } - subxt::config::substrate::DigestItem::Seal(engine, data) => { - DigestItem::Seal(engine, data) - } - subxt::config::substrate::DigestItem::Other(data) => { - panic!("Unexpected log iter Other: {:?}", data); - } - subxt::config::substrate::DigestItem::RuntimeEnvironmentUpdated => { - panic!("Unexpected log iter RuntimeEnvironmentUpdated"); - } - }) - .collect::>(); - return sp_runtime::generic::Header::, BlakeTwo256>::new( - number, - extrinsics_root, - state_root, - parent_hash, - Digest { logs }, - ); - } - panic!("Could not get finalized block header"); -} - /// Builds a new service for a full client. pub async fn new_full( mut config: Configuration, @@ -463,23 +434,24 @@ where let warp_sync_config = if sealing.is_some() { None } else { - net_config.add_notification_protocol(grandpa_protocol_config); - - // TODO: Fix the default warp sync provider - if config.chain_spec.chain_type() == ChainType::Live { - let warp_sync_header = get_new_block_header().await; - - Some(WarpSyncConfig::WithTarget(warp_sync_header)) + let set_id: u64 = if config.chain_spec.chain_type() == ChainType::Live { + 3 // mainnet patch } else { - let warp_sync: Arc> = - Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( - backend.clone(), - grandpa_link.shared_authority_set().clone(), - Vec::new(), - )); - - Some(WarpSyncConfig::WithProvider(warp_sync)) - } + 2 // testnet patch + }; + log::warn!( + "Grandpa warp sync patch enabled. Chain type = {:?}. Set ID = {set_id}", + config.chain_spec.chain_type() + ); + net_config.add_notification_protocol(grandpa_protocol_config); + let warp_sync: Arc> = + Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new( + backend.clone(), + grandpa_link.shared_authority_set().clone(), + sc_consensus_grandpa::warp_proof::HardForks::new_initial_set_id(set_id), + )); + + Some(WarpSyncConfig::WithProvider(warp_sync)) }; let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) = diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 0d5d5fd04e..c929e402c6 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -218,7 +218,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 287, + spec_version: 288, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1,