From 6177cf5c07c16af95c53bc383f9949a233a58118 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Tue, 2 Sep 2025 00:27:35 -0400 Subject: [PATCH] Have `serai-runtime` compile again --- Cargo.lock | 300 +++++++----------- deny.toml | 2 +- substrate/abi/Cargo.toml | 6 +- substrate/abi/src/block.rs | 8 +- substrate/abi/src/transaction.rs | 23 ++ substrate/client/Cargo.toml | 6 +- substrate/coins/Cargo.toml | 12 +- substrate/dex/Cargo.toml | 16 +- substrate/economic-security/Cargo.toml | 18 +- substrate/emissions/Cargo.toml | 8 +- substrate/genesis-liquidity/Cargo.toml | 10 +- substrate/in-instructions/Cargo.toml | 20 +- substrate/node/Cargo.toml | 56 ++-- substrate/primitives/Cargo.toml | 9 +- substrate/primitives/src/address.rs | 18 +- substrate/primitives/src/balance.rs | 18 +- substrate/primitives/src/coin.rs | 16 +- substrate/primitives/src/crypto.rs | 34 +- substrate/primitives/src/instructions/out.rs | 16 +- substrate/primitives/src/lib.rs | 8 +- substrate/primitives/src/merkle.rs | 5 +- substrate/primitives/src/network_id.rs | 16 +- .../primitives/src/validator_sets/mod.rs | 24 +- .../primitives/src/validator_sets/slashes.rs | 16 +- substrate/runtime/Cargo.toml | 16 +- substrate/runtime/README.md | 14 + substrate/signals/Cargo.toml | 8 +- substrate/validator-sets/Cargo.toml | 14 +- 28 files changed, 404 insertions(+), 313 deletions(-) create mode 100644 substrate/runtime/README.md diff --git a/Cargo.lock b/Cargo.lock index 35769653..b4a77915 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2187,7 +2187,7 @@ dependencies = [ "hashbrown 0.15.5", "log", "pulley-interpreter", - "regalloc2 0.12.2", + "regalloc2", "rustc-hash 2.1.1", "serde", "smallvec", @@ -2596,7 +2596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" dependencies = [ "data-encoding", - "syn 1.0.109", + "syn 2.0.106", ] [[package]] @@ -2796,15 +2796,6 @@ dependencies = [ "directories", ] -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -3353,18 +3344,6 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" -[[package]] -name = "filetime" -version = "0.2.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys 0.60.2", -] - [[package]] name = "finality-grandpa" version = "0.16.3" @@ -3431,7 +3410,7 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" [[package]] name = "fork-tree" version = "13.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", ] @@ -3464,7 +3443,7 @@ checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" [[package]] name = "frame-benchmarking" version = "40.2.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-support", "frame-support-procedural", @@ -3488,7 +3467,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "40.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "aquamarine", "frame-support", @@ -3518,7 +3497,7 @@ dependencies = [ [[package]] name = "frame-support" version = "40.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "aquamarine", "array-bytes", @@ -3558,7 +3537,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "33.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "Inflector", "cfg-expr", @@ -3578,7 +3557,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "13.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate 3.3.0", @@ -3590,7 +3569,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "12.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "proc-macro2", "quote", @@ -3600,7 +3579,7 @@ dependencies = [ [[package]] name = "frame-system" version = "40.2.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "cfg-if", "docify", @@ -3619,7 +3598,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "36.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "docify", "parity-scale-codec", @@ -3629,7 +3608,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.46.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-support", "parity-scale-codec", @@ -3947,10 +3926,6 @@ name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" -dependencies = [ - "fallible-iterator", - "stable_deref_trait", -] [[package]] name = "gimli" @@ -4074,9 +4049,6 @@ name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] [[package]] name = "hashbrown" @@ -4772,7 +4744,7 @@ checksum = "e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9" dependencies = [ "hermit-abi", "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5021,7 +4993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.48.5", + "windows-targets 0.53.3", ] [[package]] @@ -5495,7 +5467,6 @@ checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ "bitflags 2.9.3", "libc", - "redox_syscall", ] [[package]] @@ -6594,7 +6565,7 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate 3.3.0", "proc-macro2", "quote", "syn 2.0.106", @@ -6693,7 +6664,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "40.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-support", "frame-system", @@ -6706,7 +6677,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "40.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-benchmarking", "frame-support", @@ -6729,7 +6700,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "40.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-benchmarking", "frame-support", @@ -6751,7 +6722,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "40.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-support", "frame-system", @@ -6772,7 +6743,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "39.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "docify", "frame-benchmarking", @@ -6791,7 +6762,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "40.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-benchmarking", "frame-support", @@ -6807,7 +6778,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "43.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6823,7 +6794,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "40.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -7176,22 +7147,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "polkavm-linker" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9bfe793b094d9ea5c99b7c43ba46e277b0f8f48f4bbfdbabf8d3ebf701a4bd3" -dependencies = [ - "dirs", - "gimli 0.31.1", - "hashbrown 0.14.5", - "log", - "object 0.36.7", - "polkavm-common", - "regalloc2 0.9.3", - "rustc-demangle", -] - [[package]] name = "polkavm-linux-raw" version = "0.18.0" @@ -7518,7 +7473,7 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "heck 0.4.1", + "heck 0.5.0", "itertools 0.14.0", "log", "multimap", @@ -7887,19 +7842,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "regalloc2" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" -dependencies = [ - "hashbrown 0.13.2", - "log", - "rustc-hash 1.1.0", - "slice-group-by", - "smallvec", -] - [[package]] name = "regalloc2" version = "0.12.2" @@ -8494,7 +8436,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "31.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "log", "sp-core", @@ -8505,7 +8447,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.50.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "futures", @@ -8533,7 +8475,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "futures", "log", @@ -8554,7 +8496,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.44.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "sp-api", @@ -8569,7 +8511,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "43.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "docify", @@ -8595,7 +8537,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "12.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -8606,7 +8548,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.52.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "chrono", @@ -8647,7 +8589,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "39.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "fnv", "futures", @@ -8673,7 +8615,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.46.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "hash-db", "kvdb", @@ -8699,7 +8641,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "futures", @@ -8722,7 +8664,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.50.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "fork-tree", @@ -8758,7 +8700,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8771,7 +8713,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.35.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "ahash", "array-bytes", @@ -8815,7 +8757,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "futures", @@ -8838,7 +8780,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.42.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "parking_lot 0.12.4", @@ -8861,7 +8803,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.38.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "polkavm", "sc-allocator", @@ -8874,7 +8816,7 @@ dependencies = [ [[package]] name = "sc-executor-polkavm" version = "0.35.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "log", "polkavm", @@ -8885,7 +8827,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.38.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "anyhow", "log", @@ -8901,7 +8843,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "console", "futures", @@ -8917,7 +8859,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "35.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "parking_lot 0.12.4", @@ -8931,7 +8873,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.50.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "async-channel", @@ -8978,7 +8920,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.48.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -8988,7 +8930,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.50.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "ahash", "futures", @@ -9007,7 +8949,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "async-channel", @@ -9028,7 +8970,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "async-channel", @@ -9063,7 +9005,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "futures", @@ -9082,7 +9024,7 @@ dependencies = [ [[package]] name = "sc-network-types" version = "0.16.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "bs58", "bytes", @@ -9101,7 +9043,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "45.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "bytes", "fnv", @@ -9135,7 +9077,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.20.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9144,7 +9086,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "45.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "futures", "jsonrpsee", @@ -9174,7 +9116,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.49.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9193,7 +9135,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "22.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "dyn-clone", "forwarded-header-value", @@ -9217,7 +9159,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.50.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "futures", @@ -9250,7 +9192,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.51.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "directories", @@ -9313,7 +9255,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.38.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "log", "parity-scale-codec", @@ -9324,7 +9266,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "42.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "derive_more 0.99.20", "futures", @@ -9344,7 +9286,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "28.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "chrono", "futures", @@ -9363,7 +9305,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "39.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "chrono", "console", @@ -9391,7 +9333,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "11.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", @@ -9402,7 +9344,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "39.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "futures", @@ -9434,7 +9376,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "39.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "futures", @@ -9451,7 +9393,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "18.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-channel", "futures", @@ -9896,9 +9838,9 @@ dependencies = [ "borsh", "futures-lite", "log", - "serai-client", "serai-cosign", "serai-db", + "serai-primitives", "serai-task", "tokio", "tributary-sdk", @@ -10331,11 +10273,11 @@ dependencies = [ "hex", "log", "parity-scale-codec", - "serai-client", "serai-cosign", "serai-db", "serai-env", "serai-message-queue", + "serai-primitives", "serai-processor-key-gen", "serai-processor-messages", "serai-processor-primitives", @@ -10977,12 +10919,6 @@ version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" -[[package]] -name = "slice-group-by" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" - [[package]] name = "smallvec" version = "1.15.1" @@ -11054,7 +10990,7 @@ dependencies = [ [[package]] name = "sp-api" version = "36.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "docify", "hash-db", @@ -11076,7 +11012,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "22.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "Inflector", "blake2 0.10.6", @@ -11090,7 +11026,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "40.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "scale-info", @@ -11102,7 +11038,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "26.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "docify", "integer-sqrt", @@ -11116,7 +11052,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "36.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "scale-info", @@ -11128,7 +11064,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "36.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "sp-api", "sp-inherents", @@ -11138,7 +11074,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "39.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "futures", "parity-scale-codec", @@ -11157,7 +11093,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.42.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "futures", @@ -11171,7 +11107,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.42.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "parity-scale-codec", @@ -11189,7 +11125,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "23.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "finality-grandpa", "log", @@ -11206,7 +11142,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.42.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "scale-info", @@ -11217,7 +11153,7 @@ dependencies = [ [[package]] name = "sp-core" version = "36.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "array-bytes", "bitflags 1.3.2", @@ -11262,7 +11198,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing" version = "0.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "blake2b_simd", "byteorder", @@ -11275,7 +11211,7 @@ dependencies = [ [[package]] name = "sp-crypto-hashing-proc-macro" version = "0.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "quote", "sp-crypto-hashing", @@ -11285,7 +11221,7 @@ dependencies = [ [[package]] name = "sp-database" version = "10.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "kvdb", "parking_lot 0.12.4", @@ -11294,7 +11230,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "14.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "proc-macro2", "quote", @@ -11304,7 +11240,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.30.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "environmental", "parity-scale-codec", @@ -11314,7 +11250,7 @@ dependencies = [ [[package]] name = "sp-genesis-builder" version = "0.17.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "scale-info", @@ -11326,7 +11262,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "36.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11339,7 +11275,7 @@ dependencies = [ [[package]] name = "sp-io" version = "40.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "bytes", "docify", @@ -11365,7 +11301,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "41.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "sp-core", "sp-runtime", @@ -11375,7 +11311,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.42.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "parking_lot 0.12.4", @@ -11386,7 +11322,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "11.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "thiserror 2.0.16", "zstd", @@ -11395,7 +11331,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.10.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -11405,7 +11341,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "36.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "sp-api", "sp-core", @@ -11415,7 +11351,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "13.0.2" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "backtrace", "regex", @@ -11424,7 +11360,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "34.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "rustc-hash 1.1.0", "serde", @@ -11434,7 +11370,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "41.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "docify", "either", @@ -11462,7 +11398,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "29.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11481,7 +11417,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "18.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "Inflector", "expander", @@ -11494,7 +11430,7 @@ dependencies = [ [[package]] name = "sp-session" version = "38.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "scale-info", @@ -11508,7 +11444,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "38.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -11521,7 +11457,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.45.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "hash-db", "log", @@ -11541,12 +11477,12 @@ dependencies = [ [[package]] name = "sp-std" version = "14.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" [[package]] name = "sp-storage" version = "22.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11558,7 +11494,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "36.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "async-trait", "parity-scale-codec", @@ -11570,7 +11506,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "17.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "tracing", @@ -11581,7 +11517,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "36.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "sp-api", "sp-runtime", @@ -11590,7 +11526,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "39.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "ahash", "hash-db", @@ -11612,7 +11548,7 @@ dependencies = [ [[package]] name = "sp-version" version = "39.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11629,7 +11565,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "15.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "parity-scale-codec", "proc-macro-warning", @@ -11641,7 +11577,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "21.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11653,7 +11589,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "31.1.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "bounded-collections", "parity-scale-codec", @@ -11830,7 +11766,7 @@ dependencies = [ [[package]] name = "substrate-bip39" version = "0.6.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "hmac 0.12.1", "pbkdf2", @@ -11842,12 +11778,12 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "11.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" [[package]] name = "substrate-frame-rpc-system" version = "44.0.0" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "docify", "frame-system-rpc-runtime-api", @@ -11867,7 +11803,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.17.3" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "http-body-util", "hyper 1.4.1", @@ -11881,15 +11817,13 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "26.0.1" -source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=799658329bf66a829e67b34a0e86376b63eb7d23#799658329bf66a829e67b34a0e86376b63eb7d23" +source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=19c487d6aa9893b6b09a21ce0ab8aefb1c299186#19c487d6aa9893b6b09a21ce0ab8aefb1c299186" dependencies = [ "build-helper", "cargo_metadata", "console", - "filetime", "jobserver", "parity-wasm", - "polkavm-linker", "shlex", "sp-maybe-compressed-blob", "strum 0.26.3", @@ -13216,7 +13150,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0978bf7171b3d90bac376700cb56d606feb40f251a475a5d6634613564460b22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.60.2", ] [[package]] diff --git a/deny.toml b/deny.toml index a0f34ed9..891c4627 100644 --- a/deny.toml +++ b/deny.toml @@ -133,5 +133,5 @@ allow-git = [ "https://github.com/kayabaNerve/hybrid-array", "https://github.com/kayabaNerve/elliptic-curves", "https://github.com/monero-oxide/monero-oxide", - "https://github.com/serai-dex/polkadot-sdk", + "https://github.com/serai-dex/patch-polkadot-sdk", ] diff --git a/substrate/abi/Cargo.toml b/substrate/abi/Cargo.toml index 29c15f92..6f1d1f9d 100644 --- a/substrate/abi/Cargo.toml +++ b/substrate/abi/Cargo.toml @@ -22,13 +22,13 @@ workspace = true borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"] } bitvec = { version = "1", default-features = false, features = ["alloc"] } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } serde = { version = "1", default-features = false, features = ["derive"], optional = true } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"], optional = true } scale-info = { version = "2", default-features = false, features = ["derive"], optional = true } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false, features = ["serde"], optional = true } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = ["serde"], optional = true } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, optional = true } serai-primitives = { path = "../primitives", version = "0.1", default-features = false } diff --git a/substrate/abi/src/block.rs b/substrate/abi/src/block.rs index c42cc301..0f48be98 100644 --- a/substrate/abi/src/block.rs +++ b/substrate/abi/src/block.rs @@ -105,7 +105,7 @@ pub struct Block { mod substrate { use core::fmt::Debug; - use scale::{Encode, Decode, DecodeWithMemTracking, IoReader}; + use scale::{Encode, Decode, DecodeWithMemTracking}; use scale_info::TypeInfo; use sp_core::H256; @@ -133,7 +133,7 @@ mod substrate { use sp_core::serde::de::Error; let bytes = as sp_core::serde::Deserialize>::deserialize(deserializer)?; let mut reader = bytes.as_slice(); - let block = Self::decode(&mut IoReader(&mut reader)).map_err(D::Error::custom)?; + let block = Self::decode(&mut reader).map_err(D::Error::custom)?; if !reader.is_empty() { Err(D::Error::custom("extraneous bytes at end"))?; } @@ -285,7 +285,7 @@ mod substrate { } /// A block, as needed by Substrate. - #[derive(Clone, Debug, PartialEq, Eq, Encode, Decode)] + #[derive(Clone, Debug, PartialEq, Eq, Encode, Decode, DecodeWithMemTracking, TypeInfo)] pub struct SubstrateBlock { header: SubstrateHeader, transactions: Vec, @@ -306,7 +306,7 @@ mod substrate { use sp_core::serde::de::Error; let bytes = as sp_core::serde::Deserialize>::deserialize(deserializer)?; let mut reader = bytes.as_slice(); - let block = Self::decode(&mut IoReader(&mut reader)).map_err(D::Error::custom)?; + let block = Self::decode(&mut reader).map_err(D::Error::custom)?; if !reader.is_empty() { Err(D::Error::custom("extraneous bytes at end"))?; } diff --git a/substrate/abi/src/transaction.rs b/substrate/abi/src/transaction.rs index cbc5e994..dfc84f50 100644 --- a/substrate/abi/src/transaction.rs +++ b/substrate/abi/src/transaction.rs @@ -262,6 +262,12 @@ mod substrate { })?; // If we're still calling `read`, we try to read at least one more byte let to_read = buf.len().min(remaining_len.unwrap_or(1)); + // This may not be _allocated_ making this over-zealous, but it's the best we can do + self.0.on_before_alloc_mem(to_read).map_err(|err| { + self.1 = Some(err); + #[allow(clippy::io_other_error)] + borsh::io::Error::new(borsh::io::ErrorKind::Other, "") + })?; self.0.read(&mut buf[.. to_read]).map_err(|err| { self.1 = Some(err); #[allow(clippy::io_other_error)] @@ -278,6 +284,23 @@ mod substrate { } } + // Clean `Transaction` tracks its memory during decoding, as we do call + // `Input::on_before_alloc_mem` + impl scale::DecodeWithMemTracking for Transaction {} + + // Shim `TypeInfo` for `Transaction` + impl scale_info::TypeInfo for Transaction { + type Identity = Self; + fn type_info() -> scale_info::Type { + scale_info::Type { + path: scale_info::Path { segments: vec!["serai_abi", "transaction", "Transaction"] }, + type_params: vec![], + type_def: (scale_info::TypeDefComposite { fields: vec![] }).into(), + docs: vec![], + } + } + } + /// The context which transactions are executed in. pub trait TransactionContext: 'static + Send + Sync + Clone + PartialEq + Eq + Debug { /// The base weight for a signed transaction. diff --git a/substrate/client/Cargo.toml b/substrate/client/Cargo.toml index 53bc2cac..ffc226c6 100644 --- a/substrate/client/Cargo.toml +++ b/substrate/client/Cargo.toml @@ -31,9 +31,9 @@ serde_json = { version = "1", optional = true } serai-abi = { path = "../abi", version = "0.1" } multiaddr = { version = "0.18", optional = true } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", optional = true } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", optional = true } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", optional = true } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", optional = true } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", optional = true } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", optional = true } async-lock = "3" diff --git a/substrate/coins/Cargo.toml b/substrate/coins/Cargo.toml index d167a087..5a225442 100644 --- a/substrate/coins/Cargo.toml +++ b/substrate/coins/Cargo.toml @@ -22,17 +22,17 @@ workspace = true scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } serai-primitives = { path = "../primitives", default-features = false, features = ["serde", "non_canonical_scale_derivations"] } [dev-dependencies] -sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false, features = ["std"] } +sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = ["std"] } [features] std = [ diff --git a/substrate/dex/Cargo.toml b/substrate/dex/Cargo.toml index e7717df8..441de127 100644 --- a/substrate/dex/Cargo.toml +++ b/substrate/dex/Cargo.toml @@ -22,15 +22,15 @@ workspace = true scale = { package = "parity-scale-codec", version = "3.6.1", default-features = false } scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false, optional = true } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, optional = true } coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } diff --git a/substrate/economic-security/Cargo.toml b/substrate/economic-security/Cargo.toml index ec284f2c..8de1db43 100644 --- a/substrate/economic-security/Cargo.toml +++ b/substrate/economic-security/Cargo.toml @@ -22,8 +22,8 @@ workspace = true scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } dex-pallet = { package = "serai-dex-pallet", path = "../dex", default-features = false } coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } @@ -31,16 +31,16 @@ coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-feat serai-primitives = { path = "../primitives", default-features = false } [dev-dependencies] -pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -pallet-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -pallet-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +pallet-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +pallet-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false } -sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } [features] std = [ diff --git a/substrate/emissions/Cargo.toml b/substrate/emissions/Cargo.toml index d966b7c3..a3dfa14c 100644 --- a/substrate/emissions/Cargo.toml +++ b/substrate/emissions/Cargo.toml @@ -22,11 +22,11 @@ workspace = true scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false } diff --git a/substrate/genesis-liquidity/Cargo.toml b/substrate/genesis-liquidity/Cargo.toml index cd8b40fe..2826281e 100644 --- a/substrate/genesis-liquidity/Cargo.toml +++ b/substrate/genesis-liquidity/Cargo.toml @@ -22,12 +22,12 @@ workspace = true scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-application-crypto = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-application-crypto = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } dex-pallet = { package = "serai-dex-pallet", path = "../dex", default-features = false } coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } diff --git a/substrate/in-instructions/Cargo.toml b/substrate/in-instructions/Cargo.toml index 9b253b60..8111ea9e 100644 --- a/substrate/in-instructions/Cargo.toml +++ b/substrate/in-instructions/Cargo.toml @@ -25,14 +25,14 @@ bitvec = { version = "1", default-features = false, features = ["alloc"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-application-crypto = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-std = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-application-crypto = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } serai-primitives = { path = "../primitives", default-features = false } @@ -43,9 +43,9 @@ genesis-liquidity-pallet = { package = "serai-genesis-liquidity-pallet", path = emissions-pallet = { package = "serai-emissions-pallet", path = "../emissions", default-features = false } [dev-dependencies] -pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -pallet-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -pallet-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +pallet-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +pallet-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } economic-security-pallet = { package = "serai-economic-security-pallet", path = "../economic-security", default-features = false } diff --git a/substrate/node/Cargo.toml b/substrate/node/Cargo.toml index db445bf1..ed1b17a7 100644 --- a/substrate/node/Cargo.toml +++ b/substrate/node/Cargo.toml @@ -34,16 +34,16 @@ secq256k1 = { path = "../../crypto/secq256k1" } libp2p = "0.54" -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sp-keystore = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sp-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sp-blockchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sp-block-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sp-keystore = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sp-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sp-blockchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sp-block-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } -frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } +frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } serai-runtime = { path = "../runtime", features = ["std"] } @@ -55,28 +55,28 @@ jsonrpsee = { version = "0.24", features = ["server"] } scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -sc-offchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-transaction-pool = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-transaction-pool-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-basic-authorship = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-executor = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-service = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-client-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-network-common = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-network = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false, features = [] } +sc-offchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-transaction-pool = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-transaction-pool-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-basic-authorship = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-executor = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-service = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-client-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-network-common = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-network = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = [] } -sc-consensus = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-consensus-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-authority-discovery = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } +sc-consensus = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-consensus-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-authority-discovery = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } -sc-telemetry = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -sc-cli = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false, features = ["rocksdb"] } +sc-telemetry = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +sc-cli = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = ["rocksdb"] } -sc-rpc-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } +sc-rpc-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } -substrate-frame-rpc-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } -pallet-transaction-payment-rpc = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } +substrate-frame-rpc-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } +pallet-transaction-payment-rpc = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } serai-env = { path = "../../common/env" } @@ -85,7 +85,7 @@ bitcoin-serai = { path = "../../networks/bitcoin", default-features = false, fea monero-address = { git = "https://github.com/monero-oxide/monero-oxide", rev = "6966575e05fe09b77674c46984b21686ed9304ff", default-features = false, features = ["std"] } [build-dependencies] -substrate-build-script-utils = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } +substrate-build-script-utils = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } [features] default = [] diff --git a/substrate/primitives/Cargo.toml b/substrate/primitives/Cargo.toml index a22ee5fd..39ae17a0 100644 --- a/substrate/primitives/Cargo.toml +++ b/substrate/primitives/Cargo.toml @@ -20,8 +20,9 @@ zeroize = { version = "^1.5", features = ["derive"] } borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"] } bitvec = { version = "1", default-features = false, features = ["alloc"] } -scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"], optional = true } +scale-info = { version = "2", default-features = false, features = ["derive"], optional = true } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, features = ["alloc"] } dalek-ff-group = { path = "../../crypto/dalek-ff-group", default-features = false } @@ -33,7 +34,7 @@ bech32 = { version = "0.11", default-features = false } rand_core = { version = "0.6", default-features = false, features = ["std"] } [features] -std = ["zeroize/std", "borsh/std", "ciphersuite/std", "dkg/std", "sp-core/std", "bech32/std"] +std = ["zeroize/std", "borsh/std", "bitvec/std", "scale/std", "scale-info/std", "sp-core/std", "ciphersuite/std", "dalek-ff-group/std", "dkg/std", "bech32/std"] serde = [] -non_canonical_scale_derivations = [] +non_canonical_scale_derivations = ["scale", "scale-info"] default = ["std"] diff --git a/substrate/primitives/src/address.rs b/substrate/primitives/src/address.rs index 6991b16f..ab98b102 100644 --- a/substrate/primitives/src/address.rs +++ b/substrate/primitives/src/address.rs @@ -23,12 +23,16 @@ const HUMAN_READABLE_PART: bech32::Hrp = bech32::Hrp::parse_unchecked("sri"); /// The address for an account on Serai. #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Zeroize, BorshSerialize, BorshDeserialize)] -#[rustfmt::skip] -#[derive(scale::Encode, scale::Decode)] // This is safe as scale and borsh share an encoding here +#[cfg_attr( + feature = "non_canonical_scale_derivations", + derive(scale::Encode, scale::Decode, scale_info::TypeInfo) +)] pub struct SeraiAddress(pub [u8; 32]); // These share encodings as 32-byte arrays +#[cfg(feature = "non_canonical_scale_derivations")] impl scale::EncodeLike for SeraiAddress {} +#[cfg(feature = "non_canonical_scale_derivations")] impl scale::EncodeLike for &SeraiAddress {} impl SeraiAddress { @@ -112,14 +116,20 @@ impl core::str::FromStr for SeraiAddress { #[derive(Clone, PartialEq, Eq, Debug, borsh::BorshSerialize, borsh::BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct ExternalAddress( #[borsh( serialize_with = "crate::borsh_serialize_bounded_vec", deserialize_with = "crate::borsh_deserialize_bounded_vec" )] - BoundedVec>, + BoundedVec>, ); impl ExternalAddress { diff --git a/substrate/primitives/src/balance.rs b/substrate/primitives/src/balance.rs index 4101cc82..84b9b015 100644 --- a/substrate/primitives/src/balance.rs +++ b/substrate/primitives/src/balance.rs @@ -15,7 +15,7 @@ pub type AmountRepr = u64; #[derive(Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive(scale::Encode, scale::Decode, scale::MaxEncodedLen, scale::DecodeWithMemTracking, scale_info::TypeInfo) )] #[cfg_attr(feature = "serde", derive(sp_core::serde::Serialize, sp_core::serde::Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "sp_core::serde"))] @@ -46,7 +46,13 @@ impl Mul for Amount { #[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] #[cfg_attr(feature = "serde", derive(sp_core::serde::Serialize, sp_core::serde::Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "sp_core::serde"))] @@ -82,7 +88,13 @@ impl Mul for ExternalBalance { #[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] #[cfg_attr(feature = "serde", derive(sp_core::serde::Serialize, sp_core::serde::Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "sp_core::serde"))] diff --git a/substrate/primitives/src/coin.rs b/substrate/primitives/src/coin.rs index a837a077..45e061a0 100644 --- a/substrate/primitives/src/coin.rs +++ b/substrate/primitives/src/coin.rs @@ -11,7 +11,13 @@ use crate::network_id::{ExternalNetworkId, NetworkId}; #[borsh(use_discriminant = true)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] #[cfg_attr(feature = "serde", derive(sp_core::serde::Serialize, sp_core::serde::Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "sp_core::serde"))] @@ -39,7 +45,13 @@ impl ExternalCoin { #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Zeroize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] #[cfg_attr(feature = "non_canonical_scale_derivations", allow(clippy::cast_possible_truncation))] #[cfg_attr(feature = "serde", derive(sp_core::serde::Serialize, sp_core::serde::Deserialize))] diff --git a/substrate/primitives/src/crypto.rs b/substrate/primitives/src/crypto.rs index 1e32b04c..134e285a 100644 --- a/substrate/primitives/src/crypto.rs +++ b/substrate/primitives/src/crypto.rs @@ -7,7 +7,13 @@ use sp_core::{ConstU32, bounded::BoundedVec}; #[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct Public(pub [u8; 32]); impl From for Public { @@ -25,7 +31,13 @@ impl From for sp_core::sr25519::Public { #[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct Signature(pub [u8; 64]); impl From for Signature { @@ -43,14 +55,20 @@ impl From for sp_core::sr25519::Signature { #[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct ExternalKey( #[borsh( serialize_with = "crate::borsh_serialize_bounded_vec", deserialize_with = "crate::borsh_deserialize_bounded_vec" )] - pub BoundedVec>, + pub BoundedVec>, ); impl Zeroize for ExternalKey { @@ -85,6 +103,12 @@ pub type EmbeddedEllipticCurveKeys = BoundedVec for BlockNumber { hash it into a 32-byte hash or truncate it. */ #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Zeroize, BorshSerialize, BorshDeserialize)] -#[rustfmt::skip] -#[derive(scale::Encode, scale::Decode)] // This is safe as scale and borsh share an encoding here +#[cfg_attr( + feature = "non_canonical_scale_derivations", + derive(scale::Encode, scale::Decode, scale_info::TypeInfo) +)] #[cfg_attr(feature = "serde", derive(sp_core::serde::Serialize, sp_core::serde::Deserialize))] #[cfg_attr(feature = "serde", serde(crate = "sp_core::serde"))] pub struct BlockHash(pub [u8; 32]); @@ -84,7 +86,9 @@ impl From for BlockHash { } // These share encodings as 32-byte arrays +#[cfg(feature = "non_canonical_scale_derivations")] impl scale::EncodeLike for BlockHash {} +#[cfg(feature = "non_canonical_scale_derivations")] impl scale::EncodeLike for &BlockHash {} #[doc(hidden)] diff --git a/substrate/primitives/src/merkle.rs b/substrate/primitives/src/merkle.rs index 023f3ec1..875a4269 100644 --- a/substrate/primitives/src/merkle.rs +++ b/substrate/primitives/src/merkle.rs @@ -68,7 +68,10 @@ impl UnbalancedMerkleTree { /// An unbalanced Merkle tree which is incrementally created. #[derive(Clone, PartialEq, Eq, Debug)] -#[cfg_attr(feature = "non_canonical_scale_derivations", derive(scale::Encode, scale::Decode))] +#[cfg_attr( + feature = "non_canonical_scale_derivations", + derive(scale::Encode, scale::Decode, scale::DecodeWithMemTracking, scale_info::TypeInfo) +)] pub struct IncrementalUnbalancedMerkleTree { /// (number of children under branch, branch hash) branches: Vec<(u64, [u8; 32])>, diff --git a/substrate/primitives/src/network_id.rs b/substrate/primitives/src/network_id.rs index 2c5353f0..a0af331b 100644 --- a/substrate/primitives/src/network_id.rs +++ b/substrate/primitives/src/network_id.rs @@ -20,7 +20,13 @@ pub enum EmbeddedEllipticCurve { #[borsh(use_discriminant = true)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] #[non_exhaustive] pub enum ExternalNetworkId { @@ -69,7 +75,13 @@ impl ExternalNetworkId { #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Zeroize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] #[cfg_attr(feature = "non_canonical_scale_derivations", allow(clippy::cast_possible_truncation))] pub enum NetworkId { diff --git a/substrate/primitives/src/validator_sets/mod.rs b/substrate/primitives/src/validator_sets/mod.rs index 2960c0ef..124f8429 100644 --- a/substrate/primitives/src/validator_sets/mod.rs +++ b/substrate/primitives/src/validator_sets/mod.rs @@ -19,7 +19,13 @@ pub use slashes::*; #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct Session(pub u32); @@ -27,7 +33,13 @@ pub struct Session(pub u32); #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct ExternalValidatorSet { /// The network this set of validators are for. @@ -40,7 +52,13 @@ pub struct ExternalValidatorSet { #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct ValidatorSet { /// The network this set of validators are for. diff --git a/substrate/primitives/src/validator_sets/slashes.rs b/substrate/primitives/src/validator_sets/slashes.rs index 7a5856b9..689a64c8 100644 --- a/substrate/primitives/src/validator_sets/slashes.rs +++ b/substrate/primitives/src/validator_sets/slashes.rs @@ -22,7 +22,13 @@ fn downtime_per_slash_point(validators: NonZero) -> Duration { #[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] #[cfg_attr(feature = "non_canonical_scale_derivations", allow(clippy::cast_possible_truncation))] pub enum Slash { @@ -205,7 +211,13 @@ impl Slash { #[derive(Clone, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)] #[cfg_attr( feature = "non_canonical_scale_derivations", - derive(scale::Encode, scale::Decode, scale::MaxEncodedLen) + derive( + scale::Encode, + scale::Decode, + scale::MaxEncodedLen, + scale::DecodeWithMemTracking, + scale_info::TypeInfo + ) )] pub struct SlashReport( #[borsh( diff --git a/substrate/runtime/Cargo.toml b/substrate/runtime/Cargo.toml index 31d14d06..3565d645 100644 --- a/substrate/runtime/Cargo.toml +++ b/substrate/runtime/Cargo.toml @@ -23,21 +23,21 @@ borsh = { version = "1", default-features = false, features = ["derive", "de_str scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-version = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-version = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } serai-abi = { path = "../abi", default-features = false, features = ["substrate"] } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-executive = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-executive = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } serai-coins-pallet = { path = "../coins", default-features = false } [build-dependencies] -substrate-wasm-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23" } +substrate-wasm-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" } [features] std = [ diff --git a/substrate/runtime/README.md b/substrate/runtime/README.md new file mode 100644 index 00000000..4ad1b1f9 --- /dev/null +++ b/substrate/runtime/README.md @@ -0,0 +1,14 @@ +# Serai Runtime + +The on-chain rules for the Serai blockchain. + +### Compilation + +If compilation fails due to `borsh`, this is likely due to attempting to +compile to WASM binary (`no-std`) while `borsh` believes it's being compiled in +a `std` context. Serai uses a patched [`substrate-wasm-builder`]( + https://github.com/serai-dex/serai/tree/develop/polkadot-sdk/substrate/utils/wasm-builder +) which clears the `CARGO_FEATURE_STD` environment variable to prevent this, +yet `target/` directories may be contaminated if a build ever occurs without +the patched `substrate-wasm-builder`. Please attempt a clean build to resolve +the error. diff --git a/substrate/signals/Cargo.toml b/substrate/signals/Cargo.toml index ed3cb5e9..fb285ef4 100644 --- a/substrate/signals/Cargo.toml +++ b/substrate/signals/Cargo.toml @@ -22,11 +22,11 @@ workspace = true scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] } scale-info = { version = "2", default-features = false, features = ["derive"] } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } serai-primitives = { path = "../primitives", default-features = false } diff --git a/substrate/validator-sets/Cargo.toml b/substrate/validator-sets/Cargo.toml index 2f283a96..17a674ea 100644 --- a/substrate/validator-sets/Cargo.toml +++ b/substrate/validator-sets/Cargo.toml @@ -21,21 +21,21 @@ bitvec = { version = "1", default-features = false, features = ["alloc", "serde" scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "bit-vec"] } scale-info = { version = "2", default-features = false, features = ["derive", "bit-vec"] } -sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } -frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } +frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } serai-primitives = { path = "../primitives", default-features = false, features = ["non_canonical_scale_derivations"] } coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false } [dev-dependencies] -#pallet-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +#pallet-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } -#sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "799658329bf66a829e67b34a0e86376b63eb7d23", default-features = false } +#sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false } #ciphersuite = { path = "../../../crypto/ciphersuite", default-features = false, features = ["std"] } #dalek-ff-group = { path = "../../../crypto/dalek-ff-group", default-features = false, features = ["std"] }