mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 13:39:25 +00:00
Compare commits
5 Commits
ada94e8c5d
...
fe41b09fd4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe41b09fd4 | ||
|
|
74bad049a7 | ||
|
|
72fefb3d85 | ||
|
|
200c1530a4 | ||
|
|
5736b87b57 |
223
Cargo.lock
generated
223
Cargo.lock
generated
@@ -3410,7 +3410,7 @@ checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "fork-tree"
|
name = "fork-tree"
|
||||||
version = "13.0.1"
|
version = "13.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
]
|
]
|
||||||
@@ -3443,7 +3443,7 @@ checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-benchmarking"
|
name = "frame-benchmarking"
|
||||||
version = "40.2.1"
|
version = "40.2.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-support",
|
"frame-support",
|
||||||
"frame-support-procedural",
|
"frame-support-procedural",
|
||||||
@@ -3467,7 +3467,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-executive"
|
name = "frame-executive"
|
||||||
version = "40.0.1"
|
version = "40.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aquamarine",
|
"aquamarine",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
@@ -3497,7 +3497,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-support"
|
name = "frame-support"
|
||||||
version = "40.1.0"
|
version = "40.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aquamarine",
|
"aquamarine",
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
@@ -3537,7 +3537,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-support-procedural"
|
name = "frame-support-procedural"
|
||||||
version = "33.0.1"
|
version = "33.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"cfg-expr",
|
"cfg-expr",
|
||||||
@@ -3557,7 +3557,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-support-procedural-tools"
|
name = "frame-support-procedural-tools"
|
||||||
version = "13.0.1"
|
version = "13.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-support-procedural-tools-derive",
|
"frame-support-procedural-tools-derive",
|
||||||
"proc-macro-crate 3.3.0",
|
"proc-macro-crate 3.3.0",
|
||||||
@@ -3569,7 +3569,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-support-procedural-tools-derive"
|
name = "frame-support-procedural-tools-derive"
|
||||||
version = "12.0.0"
|
version = "12.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -3579,7 +3579,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-system"
|
name = "frame-system"
|
||||||
version = "40.2.0"
|
version = "40.2.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"docify",
|
"docify",
|
||||||
@@ -3598,7 +3598,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-system-rpc-runtime-api"
|
name = "frame-system-rpc-runtime-api"
|
||||||
version = "36.0.0"
|
version = "36.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"docify",
|
"docify",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -3608,7 +3608,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "frame-try-runtime"
|
name = "frame-try-runtime"
|
||||||
version = "0.46.0"
|
version = "0.46.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-support",
|
"frame-support",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -6664,7 +6664,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-authorship"
|
name = "pallet-authorship"
|
||||||
version = "40.0.0"
|
version = "40.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-support",
|
"frame-support",
|
||||||
"frame-system",
|
"frame-system",
|
||||||
@@ -6677,7 +6677,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-babe"
|
name = "pallet-babe"
|
||||||
version = "40.0.0"
|
version = "40.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
@@ -6700,7 +6700,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-grandpa"
|
name = "pallet-grandpa"
|
||||||
version = "40.0.0"
|
version = "40.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
@@ -6722,7 +6722,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-session"
|
name = "pallet-session"
|
||||||
version = "40.0.1"
|
version = "40.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-support",
|
"frame-support",
|
||||||
"frame-system",
|
"frame-system",
|
||||||
@@ -6743,7 +6743,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-timestamp"
|
name = "pallet-timestamp"
|
||||||
version = "39.0.0"
|
version = "39.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"docify",
|
"docify",
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
@@ -6762,7 +6762,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-transaction-payment"
|
name = "pallet-transaction-payment"
|
||||||
version = "40.0.0"
|
version = "40.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
@@ -6778,7 +6778,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-transaction-payment-rpc"
|
name = "pallet-transaction-payment-rpc"
|
||||||
version = "43.0.0"
|
version = "43.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
"pallet-transaction-payment-rpc-runtime-api",
|
"pallet-transaction-payment-rpc-runtime-api",
|
||||||
@@ -6794,7 +6794,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-transaction-payment-rpc-runtime-api"
|
name = "pallet-transaction-payment-rpc-runtime-api"
|
||||||
version = "40.0.0"
|
version = "40.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pallet-transaction-payment",
|
"pallet-transaction-payment",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -8436,7 +8436,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-allocator"
|
name = "sc-allocator"
|
||||||
version = "31.0.0"
|
version = "31.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"sp-core",
|
"sp-core",
|
||||||
@@ -8447,7 +8447,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-authority-discovery"
|
name = "sc-authority-discovery"
|
||||||
version = "0.50.0"
|
version = "0.50.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -8475,7 +8475,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-basic-authorship"
|
name = "sc-basic-authorship"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"log",
|
"log",
|
||||||
@@ -8496,7 +8496,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-block-builder"
|
name = "sc-block-builder"
|
||||||
version = "0.44.0"
|
version = "0.44.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"sp-api",
|
"sp-api",
|
||||||
@@ -8511,7 +8511,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-chain-spec"
|
name = "sc-chain-spec"
|
||||||
version = "43.0.0"
|
version = "43.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"docify",
|
"docify",
|
||||||
@@ -8537,7 +8537,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-chain-spec-derive"
|
name = "sc-chain-spec-derive"
|
||||||
version = "12.0.0"
|
version = "12.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-crate 3.3.0",
|
"proc-macro-crate 3.3.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -8548,7 +8548,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-cli"
|
name = "sc-cli"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -8589,7 +8589,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-client-api"
|
name = "sc-client-api"
|
||||||
version = "39.0.0"
|
version = "39.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fnv",
|
"fnv",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -8615,7 +8615,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-client-db"
|
name = "sc-client-db"
|
||||||
version = "0.46.0"
|
version = "0.46.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hash-db",
|
"hash-db",
|
||||||
"kvdb",
|
"kvdb",
|
||||||
@@ -8641,7 +8641,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-consensus"
|
name = "sc-consensus"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -8664,7 +8664,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-consensus-babe"
|
name = "sc-consensus-babe"
|
||||||
version = "0.50.0"
|
version = "0.50.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"fork-tree",
|
"fork-tree",
|
||||||
@@ -8700,7 +8700,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-consensus-epochs"
|
name = "sc-consensus-epochs"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fork-tree",
|
"fork-tree",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -8713,7 +8713,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-consensus-grandpa"
|
name = "sc-consensus-grandpa"
|
||||||
version = "0.35.0"
|
version = "0.35.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
@@ -8757,7 +8757,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-consensus-slots"
|
name = "sc-consensus-slots"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -8780,7 +8780,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-executor"
|
name = "sc-executor"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"parking_lot 0.12.4",
|
"parking_lot 0.12.4",
|
||||||
@@ -8803,7 +8803,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-executor-common"
|
name = "sc-executor-common"
|
||||||
version = "0.38.0"
|
version = "0.38.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"polkavm",
|
"polkavm",
|
||||||
"sc-allocator",
|
"sc-allocator",
|
||||||
@@ -8816,7 +8816,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-executor-polkavm"
|
name = "sc-executor-polkavm"
|
||||||
version = "0.35.0"
|
version = "0.35.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"polkavm",
|
"polkavm",
|
||||||
@@ -8827,7 +8827,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-executor-wasmtime"
|
name = "sc-executor-wasmtime"
|
||||||
version = "0.38.0"
|
version = "0.38.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"log",
|
"log",
|
||||||
@@ -8843,7 +8843,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-informant"
|
name = "sc-informant"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"console",
|
"console",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -8859,7 +8859,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-keystore"
|
name = "sc-keystore"
|
||||||
version = "35.0.0"
|
version = "35.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"parking_lot 0.12.4",
|
"parking_lot 0.12.4",
|
||||||
@@ -8873,7 +8873,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-network"
|
name = "sc-network"
|
||||||
version = "0.50.1"
|
version = "0.50.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
@@ -8920,7 +8920,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-network-common"
|
name = "sc-network-common"
|
||||||
version = "0.48.0"
|
version = "0.48.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -8930,7 +8930,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-network-gossip"
|
name = "sc-network-gossip"
|
||||||
version = "0.50.0"
|
version = "0.50.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -8949,7 +8949,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-network-light"
|
name = "sc-network-light"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
@@ -8970,7 +8970,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-network-sync"
|
name = "sc-network-sync"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"async-channel",
|
"async-channel",
|
||||||
@@ -9005,7 +9005,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-network-transactions"
|
name = "sc-network-transactions"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -9024,7 +9024,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-network-types"
|
name = "sc-network-types"
|
||||||
version = "0.16.0"
|
version = "0.16.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bs58",
|
"bs58",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -9043,7 +9043,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-offchain"
|
name = "sc-offchain"
|
||||||
version = "45.0.0"
|
version = "45.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"fnv",
|
"fnv",
|
||||||
@@ -9077,7 +9077,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-proposer-metrics"
|
name = "sc-proposer-metrics"
|
||||||
version = "0.20.0"
|
version = "0.20.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"substrate-prometheus-endpoint",
|
"substrate-prometheus-endpoint",
|
||||||
@@ -9086,7 +9086,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-rpc"
|
name = "sc-rpc"
|
||||||
version = "45.0.0"
|
version = "45.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
@@ -9116,7 +9116,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-rpc-api"
|
name = "sc-rpc-api"
|
||||||
version = "0.49.0"
|
version = "0.49.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -9135,7 +9135,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-rpc-server"
|
name = "sc-rpc-server"
|
||||||
version = "22.0.0"
|
version = "22.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"dyn-clone",
|
"dyn-clone",
|
||||||
"forwarded-header-value",
|
"forwarded-header-value",
|
||||||
@@ -9159,7 +9159,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-rpc-spec-v2"
|
name = "sc-rpc-spec-v2"
|
||||||
version = "0.50.0"
|
version = "0.50.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -9192,7 +9192,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-service"
|
name = "sc-service"
|
||||||
version = "0.51.0"
|
version = "0.51.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"directories",
|
"directories",
|
||||||
@@ -9255,7 +9255,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-state-db"
|
name = "sc-state-db"
|
||||||
version = "0.38.0"
|
version = "0.38.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -9266,7 +9266,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-sysinfo"
|
name = "sc-sysinfo"
|
||||||
version = "42.0.0"
|
version = "42.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_more 0.99.20",
|
"derive_more 0.99.20",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -9286,7 +9286,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-telemetry"
|
name = "sc-telemetry"
|
||||||
version = "28.1.0"
|
version = "28.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -9305,7 +9305,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-tracing"
|
name = "sc-tracing"
|
||||||
version = "39.0.0"
|
version = "39.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"console",
|
"console",
|
||||||
@@ -9333,7 +9333,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-tracing-proc-macro"
|
name = "sc-tracing-proc-macro"
|
||||||
version = "11.1.0"
|
version = "11.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-crate 3.3.0",
|
"proc-macro-crate 3.3.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -9344,7 +9344,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-transaction-pool"
|
name = "sc-transaction-pool"
|
||||||
version = "39.0.0"
|
version = "39.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -9376,7 +9376,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-transaction-pool-api"
|
name = "sc-transaction-pool-api"
|
||||||
version = "39.0.0"
|
version = "39.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -9393,7 +9393,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sc-utils"
|
name = "sc-utils"
|
||||||
version = "18.0.1"
|
version = "18.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-channel",
|
"async-channel",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -9787,7 +9787,6 @@ dependencies = [
|
|||||||
"hex",
|
"hex",
|
||||||
"log",
|
"log",
|
||||||
"modular-frost",
|
"modular-frost",
|
||||||
"parity-scale-codec",
|
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"schnorr-signatures",
|
"schnorr-signatures",
|
||||||
"schnorrkel",
|
"schnorrkel",
|
||||||
@@ -9854,7 +9853,6 @@ dependencies = [
|
|||||||
"dkg",
|
"dkg",
|
||||||
"futures",
|
"futures",
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
|
||||||
"serai-client",
|
"serai-client",
|
||||||
"serai-cosign",
|
"serai-cosign",
|
||||||
"serai-db",
|
"serai-db",
|
||||||
@@ -9892,7 +9890,6 @@ dependencies = [
|
|||||||
"blake2 0.11.0-rc.0",
|
"blake2 0.11.0-rc.0",
|
||||||
"borsh",
|
"borsh",
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
|
||||||
"schnorrkel",
|
"schnorrkel",
|
||||||
"serai-client",
|
"serai-client",
|
||||||
"serai-cosign-types",
|
"serai-cosign-types",
|
||||||
@@ -10262,10 +10259,13 @@ dependencies = [
|
|||||||
"ciphersuite 0.4.2",
|
"ciphersuite 0.4.2",
|
||||||
"dalek-ff-group",
|
"dalek-ff-group",
|
||||||
"dkg-musig",
|
"dkg-musig",
|
||||||
|
"embedwards25519",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
|
"schnorr-signatures",
|
||||||
"schnorrkel",
|
"schnorrkel",
|
||||||
|
"secq256k1",
|
||||||
"sp-core",
|
"sp-core",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -10603,6 +10603,7 @@ dependencies = [
|
|||||||
"scale-info",
|
"scale-info",
|
||||||
"serai-coins-pallet",
|
"serai-coins-pallet",
|
||||||
"serai-primitives",
|
"serai-primitives",
|
||||||
|
"sp-api",
|
||||||
"sp-core",
|
"sp-core",
|
||||||
"sp-io",
|
"sp-io",
|
||||||
"sp-runtime",
|
"sp-runtime",
|
||||||
@@ -10986,7 +10987,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-api"
|
name = "sp-api"
|
||||||
version = "36.0.1"
|
version = "36.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"docify",
|
"docify",
|
||||||
"hash-db",
|
"hash-db",
|
||||||
@@ -11008,7 +11009,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-api-proc-macro"
|
name = "sp-api-proc-macro"
|
||||||
version = "22.0.1"
|
version = "22.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"blake2 0.10.6",
|
"blake2 0.10.6",
|
||||||
@@ -11022,7 +11023,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-application-crypto"
|
name = "sp-application-crypto"
|
||||||
version = "40.1.0"
|
version = "40.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
@@ -11034,7 +11035,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-arithmetic"
|
name = "sp-arithmetic"
|
||||||
version = "26.1.0"
|
version = "26.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"docify",
|
"docify",
|
||||||
"integer-sqrt",
|
"integer-sqrt",
|
||||||
@@ -11048,7 +11049,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-authority-discovery"
|
name = "sp-authority-discovery"
|
||||||
version = "36.0.0"
|
version = "36.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
@@ -11060,7 +11061,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-block-builder"
|
name = "sp-block-builder"
|
||||||
version = "36.0.0"
|
version = "36.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sp-api",
|
"sp-api",
|
||||||
"sp-inherents",
|
"sp-inherents",
|
||||||
@@ -11070,7 +11071,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-blockchain"
|
name = "sp-blockchain"
|
||||||
version = "39.0.0"
|
version = "39.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11089,7 +11090,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-consensus"
|
name = "sp-consensus"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"futures",
|
"futures",
|
||||||
@@ -11103,7 +11104,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-consensus-babe"
|
name = "sp-consensus-babe"
|
||||||
version = "0.42.1"
|
version = "0.42.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11121,7 +11122,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-consensus-grandpa"
|
name = "sp-consensus-grandpa"
|
||||||
version = "23.1.0"
|
version = "23.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"finality-grandpa",
|
"finality-grandpa",
|
||||||
"log",
|
"log",
|
||||||
@@ -11138,7 +11139,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-consensus-slots"
|
name = "sp-consensus-slots"
|
||||||
version = "0.42.1"
|
version = "0.42.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
@@ -11149,7 +11150,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-core"
|
name = "sp-core"
|
||||||
version = "36.1.0"
|
version = "36.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"array-bytes",
|
"array-bytes",
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
@@ -11194,7 +11195,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-crypto-hashing"
|
name = "sp-crypto-hashing"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"blake2b_simd",
|
"blake2b_simd",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
@@ -11207,7 +11208,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-crypto-hashing-proc-macro"
|
name = "sp-crypto-hashing-proc-macro"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"sp-crypto-hashing",
|
"sp-crypto-hashing",
|
||||||
@@ -11217,7 +11218,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-database"
|
name = "sp-database"
|
||||||
version = "10.0.0"
|
version = "10.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"kvdb",
|
"kvdb",
|
||||||
"parking_lot 0.12.4",
|
"parking_lot 0.12.4",
|
||||||
@@ -11226,7 +11227,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-debug-derive"
|
name = "sp-debug-derive"
|
||||||
version = "14.0.0"
|
version = "14.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -11236,7 +11237,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-externalities"
|
name = "sp-externalities"
|
||||||
version = "0.30.0"
|
version = "0.30.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"environmental",
|
"environmental",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11246,7 +11247,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-genesis-builder"
|
name = "sp-genesis-builder"
|
||||||
version = "0.17.0"
|
version = "0.17.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
@@ -11258,7 +11259,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-inherents"
|
name = "sp-inherents"
|
||||||
version = "36.0.0"
|
version = "36.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"impl-trait-for-tuples",
|
"impl-trait-for-tuples",
|
||||||
@@ -11271,7 +11272,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-io"
|
name = "sp-io"
|
||||||
version = "40.0.1"
|
version = "40.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"docify",
|
"docify",
|
||||||
@@ -11297,7 +11298,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-keyring"
|
name = "sp-keyring"
|
||||||
version = "41.0.0"
|
version = "41.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sp-core",
|
"sp-core",
|
||||||
"sp-runtime",
|
"sp-runtime",
|
||||||
@@ -11307,7 +11308,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-keystore"
|
name = "sp-keystore"
|
||||||
version = "0.42.0"
|
version = "0.42.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"parking_lot 0.12.4",
|
"parking_lot 0.12.4",
|
||||||
@@ -11318,7 +11319,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-maybe-compressed-blob"
|
name = "sp-maybe-compressed-blob"
|
||||||
version = "11.0.0"
|
version = "11.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zstd",
|
"zstd",
|
||||||
@@ -11327,7 +11328,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-metadata-ir"
|
name = "sp-metadata-ir"
|
||||||
version = "0.10.0"
|
version = "0.10.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-metadata",
|
"frame-metadata",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11337,7 +11338,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-offchain"
|
name = "sp-offchain"
|
||||||
version = "36.0.0"
|
version = "36.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sp-api",
|
"sp-api",
|
||||||
"sp-core",
|
"sp-core",
|
||||||
@@ -11347,7 +11348,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-panic-handler"
|
name = "sp-panic-handler"
|
||||||
version = "13.0.2"
|
version = "13.0.2"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"regex",
|
"regex",
|
||||||
@@ -11356,7 +11357,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-rpc"
|
name = "sp-rpc"
|
||||||
version = "34.0.0"
|
version = "34.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustc-hash 1.1.0",
|
"rustc-hash 1.1.0",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -11366,7 +11367,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-runtime"
|
name = "sp-runtime"
|
||||||
version = "41.1.0"
|
version = "41.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"docify",
|
"docify",
|
||||||
"either",
|
"either",
|
||||||
@@ -11394,7 +11395,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-runtime-interface"
|
name = "sp-runtime-interface"
|
||||||
version = "29.0.1"
|
version = "29.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"impl-trait-for-tuples",
|
"impl-trait-for-tuples",
|
||||||
@@ -11413,7 +11414,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-runtime-interface-proc-macro"
|
name = "sp-runtime-interface-proc-macro"
|
||||||
version = "18.0.0"
|
version = "18.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"expander",
|
"expander",
|
||||||
@@ -11426,7 +11427,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-session"
|
name = "sp-session"
|
||||||
version = "38.1.0"
|
version = "38.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"scale-info",
|
"scale-info",
|
||||||
@@ -11440,7 +11441,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-staking"
|
name = "sp-staking"
|
||||||
version = "38.0.0"
|
version = "38.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"impl-trait-for-tuples",
|
"impl-trait-for-tuples",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11453,7 +11454,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-state-machine"
|
name = "sp-state-machine"
|
||||||
version = "0.45.0"
|
version = "0.45.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hash-db",
|
"hash-db",
|
||||||
"log",
|
"log",
|
||||||
@@ -11473,12 +11474,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-std"
|
name = "sp-std"
|
||||||
version = "14.0.0"
|
version = "14.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-storage"
|
name = "sp-storage"
|
||||||
version = "22.0.0"
|
version = "22.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"impl-serde",
|
"impl-serde",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11490,7 +11491,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-timestamp"
|
name = "sp-timestamp"
|
||||||
version = "36.0.0"
|
version = "36.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11502,7 +11503,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-tracing"
|
name = "sp-tracing"
|
||||||
version = "17.1.0"
|
version = "17.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"tracing",
|
"tracing",
|
||||||
@@ -11513,7 +11514,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-transaction-pool"
|
name = "sp-transaction-pool"
|
||||||
version = "36.0.0"
|
version = "36.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sp-api",
|
"sp-api",
|
||||||
"sp-runtime",
|
"sp-runtime",
|
||||||
@@ -11522,7 +11523,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-trie"
|
name = "sp-trie"
|
||||||
version = "39.1.0"
|
version = "39.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ahash",
|
"ahash",
|
||||||
"hash-db",
|
"hash-db",
|
||||||
@@ -11544,7 +11545,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-version"
|
name = "sp-version"
|
||||||
version = "39.0.0"
|
version = "39.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"impl-serde",
|
"impl-serde",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11561,7 +11562,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-version-proc-macro"
|
name = "sp-version-proc-macro"
|
||||||
version = "15.0.0"
|
version = "15.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"proc-macro-warning",
|
"proc-macro-warning",
|
||||||
@@ -11573,7 +11574,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-wasm-interface"
|
name = "sp-wasm-interface"
|
||||||
version = "21.0.1"
|
version = "21.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"impl-trait-for-tuples",
|
"impl-trait-for-tuples",
|
||||||
@@ -11585,7 +11586,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "sp-weights"
|
name = "sp-weights"
|
||||||
version = "31.1.0"
|
version = "31.1.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bounded-collections",
|
"bounded-collections",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
@@ -11762,7 +11763,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-bip39"
|
name = "substrate-bip39"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hmac 0.12.1",
|
"hmac 0.12.1",
|
||||||
"pbkdf2",
|
"pbkdf2",
|
||||||
@@ -11774,12 +11775,12 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-build-script-utils"
|
name = "substrate-build-script-utils"
|
||||||
version = "11.0.0"
|
version = "11.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-frame-rpc-system"
|
name = "substrate-frame-rpc-system"
|
||||||
version = "44.0.0"
|
version = "44.0.0"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"docify",
|
"docify",
|
||||||
"frame-system-rpc-runtime-api",
|
"frame-system-rpc-runtime-api",
|
||||||
@@ -11799,7 +11800,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-prometheus-endpoint"
|
name = "substrate-prometheus-endpoint"
|
||||||
version = "0.17.3"
|
version = "0.17.3"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper 1.4.1",
|
"hyper 1.4.1",
|
||||||
@@ -11813,7 +11814,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "substrate-wasm-builder"
|
name = "substrate-wasm-builder"
|
||||||
version = "26.0.1"
|
version = "26.0.1"
|
||||||
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=2bfdaed4b3614de2fe7d10e4ece3e6a912833e90#2bfdaed4b3614de2fe7d10e4ece3e6a912833e90"
|
source = "git+https://github.com/serai-dex/patch-polkadot-sdk?rev=ece373ca1e8aaee67844eebcca28b5e016136dba#ece373ca1e8aaee67844eebcca28b5e016136dba"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"build-helper",
|
"build-helper",
|
||||||
"cargo_metadata",
|
"cargo_metadata",
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ frost = { package = "modular-frost", path = "../crypto/frost" }
|
|||||||
frost-schnorrkel = { path = "../crypto/schnorrkel" }
|
frost-schnorrkel = { path = "../crypto/schnorrkel" }
|
||||||
|
|
||||||
hex = { version = "0.4", default-features = false, features = ["std"] }
|
hex = { version = "0.4", default-features = false, features = ["std"] }
|
||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std", "derive", "bit-vec"] }
|
|
||||||
borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] }
|
borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] }
|
||||||
|
|
||||||
zalloc = { path = "../common/zalloc" }
|
zalloc = { path = "../common/zalloc" }
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ workspace = true
|
|||||||
blake2 = { version = "0.11.0-rc.0", default-features = false, features = ["alloc"] }
|
blake2 = { version = "0.11.0-rc.0", default-features = false, features = ["alloc"] }
|
||||||
schnorrkel = { version = "0.11", default-features = false, features = ["std"] }
|
schnorrkel = { version = "0.11", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std", "derive"] }
|
|
||||||
borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] }
|
borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] }
|
||||||
serai-client = { path = "../../substrate/client", default-features = false, features = ["serai"] }
|
serai-client = { path = "../../substrate/client", default-features = false, features = ["serai"] }
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ use std::{sync::Arc, collections::HashMap, time::Instant};
|
|||||||
|
|
||||||
use blake2::{Digest, Blake2s256};
|
use blake2::{Digest, Blake2s256};
|
||||||
|
|
||||||
use scale::{Encode, Decode};
|
|
||||||
use borsh::{BorshSerialize, BorshDeserialize};
|
use borsh::{BorshSerialize, BorshDeserialize};
|
||||||
|
|
||||||
use serai_client::{
|
use serai_client::{
|
||||||
@@ -80,68 +79,6 @@ enum HasEvents {
|
|||||||
No,
|
No,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An intended cosign.
|
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, BorshSerialize, BorshDeserialize)]
|
|
||||||
pub struct CosignIntent {
|
|
||||||
/// The global session this cosign is being performed under.
|
|
||||||
pub global_session: [u8; 32],
|
|
||||||
/// The number of the block to cosign.
|
|
||||||
pub block_number: u64,
|
|
||||||
/// The hash of the block to cosign.
|
|
||||||
pub block_hash: [u8; 32],
|
|
||||||
/// If this cosign must be handled before further cosigns are.
|
|
||||||
pub notable: bool,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A cosign.
|
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, BorshSerialize, BorshDeserialize)]
|
|
||||||
pub struct Cosign {
|
|
||||||
/// The global session this cosign is being performed under.
|
|
||||||
pub global_session: [u8; 32],
|
|
||||||
/// The number of the block to cosign.
|
|
||||||
pub block_number: u64,
|
|
||||||
/// The hash of the block to cosign.
|
|
||||||
pub block_hash: [u8; 32],
|
|
||||||
/// The actual cosigner.
|
|
||||||
pub cosigner: ExternalNetworkId,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl CosignIntent {
|
|
||||||
/// Convert this into a `Cosign`.
|
|
||||||
pub fn into_cosign(self, cosigner: ExternalNetworkId) -> Cosign {
|
|
||||||
let CosignIntent { global_session, block_number, block_hash, notable: _ } = self;
|
|
||||||
Cosign { global_session, block_number, block_hash, cosigner }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Cosign {
|
|
||||||
/// The message to sign to sign this cosign.
|
|
||||||
///
|
|
||||||
/// This must be signed with schnorrkel, the context set to `COSIGN_CONTEXT`.
|
|
||||||
pub fn signature_message(&self) -> Vec<u8> {
|
|
||||||
// We use a schnorrkel context to domain-separate this
|
|
||||||
self.encode()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A signed cosign.
|
|
||||||
#[derive(Clone, Debug, BorshSerialize, BorshDeserialize)]
|
|
||||||
pub struct SignedCosign {
|
|
||||||
/// The cosign.
|
|
||||||
pub cosign: Cosign,
|
|
||||||
/// The signature for the cosign.
|
|
||||||
pub signature: [u8; 64],
|
|
||||||
}
|
|
||||||
|
|
||||||
impl SignedCosign {
|
|
||||||
fn verify_signature(&self, signer: serai_client::Public) -> bool {
|
|
||||||
let Ok(signer) = schnorrkel::PublicKey::from_bytes(&signer.0) else { return false };
|
|
||||||
let Ok(signature) = schnorrkel::Signature::from_bytes(&self.signature) else { return false };
|
|
||||||
|
|
||||||
signer.verify_simple(COSIGN_CONTEXT, &self.cosign.signature_message(), &signature).is_ok()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
create_db! {
|
create_db! {
|
||||||
Cosign {
|
Cosign {
|
||||||
// The following are populated by the intend task and used throughout the library
|
// The following are populated by the intend task and used throughout the library
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ use tokio::sync::mpsc;
|
|||||||
|
|
||||||
use serai_db::{Get, DbTxn, Db as DbTrait, create_db, db_channel};
|
use serai_db::{Get, DbTxn, Db as DbTrait, create_db, db_channel};
|
||||||
|
|
||||||
use scale::Encode;
|
|
||||||
use serai_client::validator_sets::primitives::ExternalValidatorSet;
|
use serai_client::validator_sets::primitives::ExternalValidatorSet;
|
||||||
|
|
||||||
use tributary_sdk::{TransactionKind, TransactionError, ProvidedError, TransactionTrait, Tributary};
|
use tributary_sdk::{TransactionKind, TransactionError, ProvidedError, TransactionTrait, Tributary};
|
||||||
@@ -479,7 +478,8 @@ pub(crate) async fn spawn_tributary<P: P2p>(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let genesis = <[u8; 32]>::from(Blake2s::<U32>::digest((set.serai_block, set.set).encode()));
|
let genesis =
|
||||||
|
<[u8; 32]>::from(Blake2s::<U32>::digest(borsh::to_vec(&(set.serai_block, set.set)).unwrap()));
|
||||||
|
|
||||||
// Since the Serai block will be finalized, then cosigned, before we handle this, this time will
|
// Since the Serai block will be finalized, then cosigned, before we handle this, this time will
|
||||||
// be a couple of minutes stale. While the Tributary will still function with a start time in the
|
// be a couple of minutes stale. While the Tributary will still function with a start time in the
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ workspace = true
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bitvec = { version = "1", default-features = false, features = ["std"] }
|
bitvec = { version = "1", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["std", "derive", "bit-vec"] }
|
|
||||||
borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] }
|
borsh = { version = "1", default-features = false, features = ["std", "derive", "de_strict_order"] }
|
||||||
|
|
||||||
dkg = { path = "../../crypto/dkg", default-features = false, features = ["std"] }
|
dkg = { path = "../../crypto/dkg", default-features = false, features = ["std"] }
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use scale::{Encode, Decode};
|
|
||||||
use borsh::{BorshSerialize, BorshDeserialize};
|
use borsh::{BorshSerialize, BorshDeserialize};
|
||||||
|
|
||||||
use dkg::Participant;
|
use dkg::Participant;
|
||||||
@@ -178,14 +177,13 @@ impl Keys {
|
|||||||
signature_participants,
|
signature_participants,
|
||||||
signature,
|
signature,
|
||||||
);
|
);
|
||||||
_public_db::Keys::set(txn, set.network, &(set.session, tx.encode()));
|
_public_db::Keys::set(txn, set.network, &(set.session, tx));
|
||||||
}
|
}
|
||||||
pub(crate) fn take(
|
pub(crate) fn take(
|
||||||
txn: &mut impl DbTxn,
|
txn: &mut impl DbTxn,
|
||||||
network: ExternalNetworkId,
|
network: ExternalNetworkId,
|
||||||
) -> Option<(Session, Transaction)> {
|
) -> Option<(Session, Transaction)> {
|
||||||
let (session, tx) = _public_db::Keys::take(txn, network)?;
|
_public_db::Keys::take(txn, network)
|
||||||
Some((session, <_>::decode(&mut tx.as_slice()).unwrap()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,13 +224,12 @@ impl SlashReports {
|
|||||||
slash_report,
|
slash_report,
|
||||||
signature,
|
signature,
|
||||||
);
|
);
|
||||||
_public_db::SlashReports::set(txn, set.network, &(set.session, tx.encode()));
|
_public_db::SlashReports::set(txn, set.network, &(set.session, tx));
|
||||||
}
|
}
|
||||||
pub(crate) fn take(
|
pub(crate) fn take(
|
||||||
txn: &mut impl DbTxn,
|
txn: &mut impl DbTxn,
|
||||||
network: ExternalNetworkId,
|
network: ExternalNetworkId,
|
||||||
) -> Option<(Session, Transaction)> {
|
) -> Option<(Session, Transaction)> {
|
||||||
let (session, tx) = _public_db::SlashReports::take(txn, network)?;
|
_public_db::SlashReports::take(txn, network)
|
||||||
Some((session, <_>::decode(&mut tx.as_slice()).unwrap()))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static SEND_LOCK: LazyLock<Mutex<()>> = LazyLock::new(|| Mutex::new(()));
|
|||||||
|
|
||||||
db_channel! {
|
db_channel! {
|
||||||
ProcessorBinCoordinator {
|
ProcessorBinCoordinator {
|
||||||
SentCoordinatorMessages: () -> Vec<u8>,
|
SentCoordinatorMessages: () -> messages::ProcessorMessage,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ impl CoordinatorSend {
|
|||||||
fn send(&mut self, msg: &messages::ProcessorMessage) {
|
fn send(&mut self, msg: &messages::ProcessorMessage) {
|
||||||
let _lock = SEND_LOCK.lock().unwrap();
|
let _lock = SEND_LOCK.lock().unwrap();
|
||||||
let mut txn = self.db.txn();
|
let mut txn = self.db.txn();
|
||||||
SentCoordinatorMessages::send(&mut txn, &borsh::to_vec(msg).unwrap());
|
SentCoordinatorMessages::send(&mut txn, msg);
|
||||||
txn.commit();
|
txn.commit();
|
||||||
self
|
self
|
||||||
.sent_message
|
.sent_message
|
||||||
@@ -114,12 +114,9 @@ impl Coordinator {
|
|||||||
let mut txn = db.txn();
|
let mut txn = db.txn();
|
||||||
match SentCoordinatorMessages::try_recv(&mut txn) {
|
match SentCoordinatorMessages::try_recv(&mut txn) {
|
||||||
Some(msg) => {
|
Some(msg) => {
|
||||||
let metadata = Metadata {
|
let metadata =
|
||||||
from: service,
|
Metadata { from: service, to: Service::Coordinator, intent: msg.intent() };
|
||||||
to: Service::Coordinator,
|
message_queue.queue_with_retry(metadata, borsh::to_vec(&msg).unwrap()).await;
|
||||||
intent: borsh::from_slice::<messages::ProcessorMessage>(&msg).unwrap().intent(),
|
|
||||||
};
|
|
||||||
message_queue.queue_with_retry(metadata, msg).await;
|
|
||||||
txn.commit();
|
txn.commit();
|
||||||
}
|
}
|
||||||
None => {
|
None => {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ use serai_primitives::{
|
|||||||
balance::{Amount, ExternalBalance},
|
balance::{Amount, ExternalBalance},
|
||||||
};
|
};
|
||||||
|
|
||||||
use borsh::BorshDeserialize;
|
|
||||||
use serai_db::{Get, DbTxn, create_db, db_channel};
|
use serai_db::{Get, DbTxn, create_db, db_channel};
|
||||||
|
|
||||||
use primitives::{Payment, ReceivedOutput};
|
use primitives::{Payment, ReceivedOutput};
|
||||||
@@ -22,9 +21,10 @@ create_db! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[rustfmt::skip]
|
||||||
db_channel! {
|
db_channel! {
|
||||||
UtxoScheduler {
|
UtxoScheduler {
|
||||||
PendingBranch: (key: &[u8], balance: ExternalBalance) -> Vec<u8>,
|
PendingBranch: <S: ScannerFeed>(key: &[u8], balance: ExternalBalance) -> TreeTransaction<AddressFor<S>>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,14 +103,13 @@ impl<S: ScannerFeed> Db<S> {
|
|||||||
balance: ExternalBalance,
|
balance: ExternalBalance,
|
||||||
child: &TreeTransaction<AddressFor<S>>,
|
child: &TreeTransaction<AddressFor<S>>,
|
||||||
) {
|
) {
|
||||||
PendingBranch::send(txn, key.to_bytes().as_ref(), balance, &borsh::to_vec(child).unwrap())
|
PendingBranch::<S>::send(txn, key.to_bytes().as_ref(), balance, child)
|
||||||
}
|
}
|
||||||
pub(crate) fn take_pending_branch(
|
pub(crate) fn take_pending_branch(
|
||||||
txn: &mut impl DbTxn,
|
txn: &mut impl DbTxn,
|
||||||
key: KeyFor<S>,
|
key: KeyFor<S>,
|
||||||
balance: ExternalBalance,
|
balance: ExternalBalance,
|
||||||
) -> Option<TreeTransaction<AddressFor<S>>> {
|
) -> Option<TreeTransaction<AddressFor<S>>> {
|
||||||
PendingBranch::try_recv(txn, key.to_bytes().as_ref(), balance)
|
PendingBranch::<S>::try_recv(txn, key.to_bytes().as_ref(), balance)
|
||||||
.map(|bytes| TreeTransaction::<AddressFor<S>>::deserialize(&mut bytes.as_slice()).unwrap())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,10 +123,7 @@ impl<D: Db> ContinuallyRan for CosignerTask<D> {
|
|||||||
|
|
||||||
let cosign = self.current_cosign.take().unwrap();
|
let cosign = self.current_cosign.take().unwrap();
|
||||||
LatestCosigned::set(&mut txn, self.session, &cosign.block_number);
|
LatestCosigned::set(&mut txn, self.session, &cosign.block_number);
|
||||||
let cosign = SignedCosign {
|
let cosign = SignedCosign { cosign, signature: Signature::from(signature).0 };
|
||||||
cosign,
|
|
||||||
signature: borsh::to_vec(&Signature::from(signature)).unwrap().try_into().unwrap(),
|
|
||||||
};
|
|
||||||
// Send the cosign
|
// Send the cosign
|
||||||
Cosign::send(&mut txn, self.session, &cosign);
|
Cosign::send(&mut txn, self.session, &cosign);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ workspace = true
|
|||||||
borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"] }
|
borsh = { version = "1", default-features = false, features = ["derive", "de_strict_order"] }
|
||||||
|
|
||||||
bitvec = { version = "1", default-features = false, features = ["alloc"] }
|
bitvec = { version = "1", default-features = false, features = ["alloc"] }
|
||||||
sp-core = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
serde = { version = "1", default-features = false, features = ["derive"], optional = true }
|
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 = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"], optional = true }
|
||||||
scale-info = { version = "2", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = ["serde"], optional = true }
|
sp-runtime = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", 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 }
|
frame-support = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false, optional = true }
|
||||||
|
|
||||||
serai-primitives = { path = "../primitives", version = "0.1", default-features = false }
|
serai-primitives = { path = "../primitives", version = "0.1", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ serde_json = { version = "1", optional = true }
|
|||||||
serai-abi = { path = "../abi", version = "0.1" }
|
serai-abi = { path = "../abi", version = "0.1" }
|
||||||
|
|
||||||
multiaddr = { version = "0.18", optional = true }
|
multiaddr = { version = "0.18", optional = true }
|
||||||
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", optional = true }
|
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", optional = true }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", optional = true }
|
||||||
frame-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", optional = true }
|
||||||
|
|
||||||
async-lock = "3"
|
async-lock = "3"
|
||||||
|
|
||||||
|
|||||||
@@ -22,17 +22,17 @@ workspace = true
|
|||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
scale-info = { version = "2", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-std = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
frame-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
serai-primitives = { path = "../primitives", default-features = false, features = ["serde", "non_canonical_scale_derivations"] }
|
serai-primitives = { path = "../primitives", default-features = false, features = ["serde", "non_canonical_scale_derivations"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = ["std"] }
|
sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
std = [
|
std = [
|
||||||
|
|||||||
@@ -22,15 +22,15 @@ workspace = true
|
|||||||
scale = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
|
scale = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
|
||||||
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
|
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
|
||||||
|
|
||||||
sp-std = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-io = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-api = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-core = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
frame-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, optional = true }
|
frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false, optional = true }
|
||||||
|
|
||||||
coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false }
|
coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ workspace = true
|
|||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
scale-info = { version = "2", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
dex-pallet = { package = "serai-dex-pallet", path = "../dex", 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 }
|
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 }
|
serai-primitives = { path = "../primitives", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
pallet-grandpa = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
pallet-timestamp = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-core = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-consensus-babe = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
std = [
|
std = [
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ workspace = true
|
|||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
scale-info = { version = "2", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
sp-std = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
coins-pallet = { package = "serai-coins-pallet", path = "../coins", 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 }
|
validator-sets-pallet = { package = "serai-validator-sets-pallet", path = "../validator-sets", default-features = false }
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ workspace = true
|
|||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
scale-info = { version = "2", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
sp-std = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-core = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-application-crypto = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
dex-pallet = { package = "serai-dex-pallet", path = "../dex", 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 }
|
coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false }
|
||||||
|
|||||||
@@ -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 = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "max-encoded-len"] }
|
||||||
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
scale-info = { version = "2", default-features = false, features = ["derive"] }
|
||||||
|
|
||||||
sp-std = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-application-crypto = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-io = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-core = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
frame-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
serai-primitives = { path = "../primitives", 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 }
|
emissions-pallet = { package = "serai-emissions-pallet", path = "../emissions", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
pallet-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
pallet-grandpa = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
pallet-timestamp = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
economic-security-pallet = { package = "serai-economic-security-pallet", path = "../economic-security", default-features = false }
|
economic-security-pallet = { package = "serai-economic-security-pallet", path = "../economic-security", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -34,16 +34,16 @@ secq256k1 = { path = "../../crypto/secq256k1" }
|
|||||||
|
|
||||||
libp2p = "0.54"
|
libp2p = "0.54"
|
||||||
|
|
||||||
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sp-keystore = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-keystore = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sp-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-timestamp = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-io = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sp-blockchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-blockchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sp-block-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-block-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sp-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
|
|
||||||
frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
frame-benchmarking = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
|
|
||||||
serai-runtime = { path = "../runtime", features = ["std"] }
|
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"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
|
|
||||||
sc-offchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-offchain = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-transaction-pool = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-transaction-pool = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-transaction-pool-api = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-basic-authorship = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-basic-authorship = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-executor = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-executor = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-service = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-service = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-client-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-client-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-network-common = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-network-common = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-network = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = [] }
|
sc-network = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false, features = [] }
|
||||||
|
|
||||||
sc-consensus = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-consensus = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-consensus-babe = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-consensus-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-consensus-grandpa = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-authority-discovery = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-authority-discovery = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
|
|
||||||
sc-telemetry = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-telemetry = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
sc-cli = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false, features = ["rocksdb"] }
|
sc-cli = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false, features = ["rocksdb"] }
|
||||||
|
|
||||||
sc-rpc-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
sc-rpc-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
|
|
||||||
substrate-frame-rpc-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
pallet-transaction-payment-rpc = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
|
|
||||||
serai-env = { path = "../../common/env" }
|
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"] }
|
monero-address = { git = "https://github.com/monero-oxide/monero-oxide", rev = "6966575e05fe09b77674c46984b21686ed9304ff", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
substrate-build-script-utils = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
substrate-build-script-utils = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|||||||
@@ -22,10 +22,13 @@ borsh = { version = "1", default-features = false, features = ["derive", "de_str
|
|||||||
bitvec = { version = "1", default-features = false, features = ["alloc"] }
|
bitvec = { version = "1", default-features = false, features = ["alloc"] }
|
||||||
scale = { package = "parity-scale-codec", version = "3", 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 }
|
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 }
|
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, features = ["alloc"] }
|
ciphersuite = { path = "../../crypto/ciphersuite", default-features = false, features = ["alloc"] }
|
||||||
|
schnorr-signatures = { path = "../../crypto/schnorr", default-features = false }
|
||||||
dalek-ff-group = { path = "../../crypto/dalek-ff-group", default-features = false, features = ["alloc"] }
|
dalek-ff-group = { path = "../../crypto/dalek-ff-group", default-features = false, features = ["alloc"] }
|
||||||
|
embedwards25519 = { path = "../../crypto/embedwards25519", default-features = false, features = ["alloc"] }
|
||||||
|
secq256k1 = { path = "../../crypto/secq256k1", default-features = false, features = ["alloc"] }
|
||||||
dkg = { package = "dkg-musig", path = "../../crypto/dkg/musig", default-features = false }
|
dkg = { package = "dkg-musig", path = "../../crypto/dkg/musig", default-features = false }
|
||||||
|
|
||||||
schnorrkel = { version = "0.11", default-features = false }
|
schnorrkel = { version = "0.11", default-features = false }
|
||||||
@@ -36,7 +39,22 @@ bech32 = { version = "0.11", default-features = false }
|
|||||||
rand_core = { version = "0.6", default-features = false, features = ["std"] }
|
rand_core = { version = "0.6", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
std = ["zeroize/std", "borsh/std", "bitvec/std", "scale?/std", "scale-info?/std", "sp-core/std", "ciphersuite/std", "dalek-ff-group/std", "dkg/std", "schnorrkel/std", "bech32/std"]
|
std = [
|
||||||
|
"zeroize/std",
|
||||||
|
"borsh/std",
|
||||||
|
"bitvec/std",
|
||||||
|
"scale?/std",
|
||||||
|
"scale-info?/std",
|
||||||
|
"sp-core/std",
|
||||||
|
"ciphersuite/std",
|
||||||
|
"schnorr-signatures/std",
|
||||||
|
"dalek-ff-group/std",
|
||||||
|
"embedwards25519/std",
|
||||||
|
"secq256k1/std",
|
||||||
|
"dkg/std",
|
||||||
|
"schnorrkel/std",
|
||||||
|
"bech32/std"
|
||||||
|
]
|
||||||
serde = []
|
serde = []
|
||||||
non_canonical_scale_derivations = ["scale", "scale-info"]
|
non_canonical_scale_derivations = ["scale", "scale-info"]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
@@ -3,6 +3,16 @@ use borsh::{BorshSerialize, BorshDeserialize};
|
|||||||
|
|
||||||
use sp_core::{ConstU32, bounded::BoundedVec};
|
use sp_core::{ConstU32, bounded::BoundedVec};
|
||||||
|
|
||||||
|
use ciphersuite::{
|
||||||
|
group::{ff::FromUniformBytes, GroupEncoding},
|
||||||
|
Ciphersuite,
|
||||||
|
};
|
||||||
|
use embedwards25519::Embedwards25519;
|
||||||
|
use secq256k1::Secq256k1;
|
||||||
|
use schnorr_signatures::SchnorrSignature;
|
||||||
|
|
||||||
|
use crate::network_id::ExternalNetworkId;
|
||||||
|
|
||||||
/// A Ristretto public key.
|
/// A Ristretto public key.
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
@@ -89,7 +99,7 @@ impl Zeroize for ExternalKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ExternalKey {
|
impl ExternalKey {
|
||||||
/// The maximum length for am external key.
|
/// The maximum length for an external key.
|
||||||
/*
|
/*
|
||||||
This support keys up to 96 bytes (such as BLS12-381 G2, which is the largest elliptic-curve
|
This support keys up to 96 bytes (such as BLS12-381 G2, which is the largest elliptic-curve
|
||||||
group element we might reasonably use as a key). This can always be increased if we need to
|
group element we might reasonably use as a key). This can always be increased if we need to
|
||||||
@@ -100,12 +110,236 @@ impl ExternalKey {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Key(s) on embedded elliptic curve(s).
|
/// Key(s) on embedded elliptic curve(s).
|
||||||
///
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize)]
|
||||||
/// This may be a single key if the external network uses the same embedded elliptic curve as
|
pub enum EmbeddedEllipticCurveKeys {
|
||||||
/// used for the key to oraclize onto Serai. Else, it'll be a key on the embedded elliptic curve
|
/// The embedded elliptic curve keys for a Bitcoin validator.
|
||||||
/// used for the key to oraclize onto Serai concatenated with the key on the embedded elliptic
|
Bitcoin(
|
||||||
/// curve used for the external network.
|
<<Embedwards25519 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
pub type EmbeddedEllipticCurveKeys = BoundedVec<u8, ConstU32<{ 2 * ExternalKey::MAX_LEN }>>;
|
<<Secq256k1 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
|
),
|
||||||
|
/// The embedded elliptic curve keys for an Ethereum validator.
|
||||||
|
Ethereum(
|
||||||
|
<<Embedwards25519 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
|
<<Secq256k1 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
|
),
|
||||||
|
/// The embedded elliptic curve key for a Monero validator.
|
||||||
|
Monero(<<Embedwards25519 as Ciphersuite>::G as GroupEncoding>::Repr),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl EmbeddedEllipticCurveKeys {
|
||||||
|
/// The network these keys are for.
|
||||||
|
pub fn network(&self) -> ExternalNetworkId {
|
||||||
|
match self {
|
||||||
|
Self::Bitcoin(_, _) => ExternalNetworkId::Bitcoin,
|
||||||
|
Self::Ethereum(_, _) => ExternalNetworkId::Ethereum,
|
||||||
|
Self::Monero(_) => ExternalNetworkId::Monero,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::Encode for EmbeddedEllipticCurveKeys {
|
||||||
|
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R {
|
||||||
|
match self {
|
||||||
|
EmbeddedEllipticCurveKeys::Bitcoin(e, s) | EmbeddedEllipticCurveKeys::Ethereum(e, s) => {
|
||||||
|
let mut res = [0; 66];
|
||||||
|
res[0] = self.network() as u8;
|
||||||
|
res[1 .. 33].copy_from_slice(e);
|
||||||
|
res[33 ..].copy_from_slice(s);
|
||||||
|
f(&res)
|
||||||
|
}
|
||||||
|
EmbeddedEllipticCurveKeys::Monero(e) => {
|
||||||
|
let mut res = [0; 33];
|
||||||
|
res[0] = self.network() as u8;
|
||||||
|
res[1 ..].copy_from_slice(e);
|
||||||
|
f(&res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::MaxEncodedLen for EmbeddedEllipticCurveKeys {
|
||||||
|
fn max_encoded_len() -> usize {
|
||||||
|
66
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::EncodeLike<EmbeddedEllipticCurveKeys> for EmbeddedEllipticCurveKeys {}
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::Decode for EmbeddedEllipticCurveKeys {
|
||||||
|
fn decode<I: scale::Input>(input: &mut I) -> Result<Self, scale::Error> {
|
||||||
|
let network_id = ExternalNetworkId::decode(&mut *input)?;
|
||||||
|
let embedwards25519 =
|
||||||
|
<<Embedwards25519 as Ciphersuite>::G as GroupEncoding>::Repr::decode(&mut *input)?;
|
||||||
|
Ok(match network_id {
|
||||||
|
ExternalNetworkId::Bitcoin => {
|
||||||
|
let secq256k1 = <[u8; 33]>::decode(&mut *input)?;
|
||||||
|
EmbeddedEllipticCurveKeys::Bitcoin(embedwards25519, secq256k1.into())
|
||||||
|
}
|
||||||
|
ExternalNetworkId::Ethereum => {
|
||||||
|
let secq256k1 = <[u8; 33]>::decode(&mut *input)?;
|
||||||
|
EmbeddedEllipticCurveKeys::Ethereum(embedwards25519, secq256k1.into())
|
||||||
|
}
|
||||||
|
ExternalNetworkId::Monero => EmbeddedEllipticCurveKeys::Monero(embedwards25519),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::DecodeWithMemTracking for EmbeddedEllipticCurveKeys {}
|
||||||
|
|
||||||
|
/// Key(s) on embedded elliptic curve(s) with the required proofs of knowledge.
|
||||||
|
#[derive(Clone, PartialEq, Eq, Debug, Zeroize)]
|
||||||
|
pub enum SignedEmbeddedEllipticCurveKeys {
|
||||||
|
/// The signed embedded elliptic curve keys for a Bitcoin validator.
|
||||||
|
Bitcoin(
|
||||||
|
<<Embedwards25519 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
|
<<Secq256k1 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
|
[u8; 64],
|
||||||
|
[u8; 65],
|
||||||
|
),
|
||||||
|
/// The signed embedded elliptic curve keys for an Ethereum validator.
|
||||||
|
Ethereum(
|
||||||
|
<<Embedwards25519 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
|
<<Secq256k1 as Ciphersuite>::G as GroupEncoding>::Repr,
|
||||||
|
[u8; 64],
|
||||||
|
[u8; 65],
|
||||||
|
),
|
||||||
|
/// The signed embedded elliptic curve key for a Monero validator.
|
||||||
|
Monero(<<Embedwards25519 as Ciphersuite>::G as GroupEncoding>::Repr, [u8; 64]),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl SignedEmbeddedEllipticCurveKeys {
|
||||||
|
/// The network these keys are for.
|
||||||
|
pub fn network(&self) -> ExternalNetworkId {
|
||||||
|
match self {
|
||||||
|
Self::Bitcoin(_, _, _, _) => ExternalNetworkId::Bitcoin,
|
||||||
|
Self::Ethereum(_, _, _, _) => ExternalNetworkId::Ethereum,
|
||||||
|
Self::Monero(_, _) => ExternalNetworkId::Monero,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Verify these key(s)' signature(s), returning the key(s) if valid.
|
||||||
|
pub fn verify(self, validator: Public) -> Option<EmbeddedEllipticCurveKeys> {
|
||||||
|
// Sample a unified challenge
|
||||||
|
let transcript = match &self {
|
||||||
|
Self::Bitcoin(e, s, e_sig, s_sig) => [
|
||||||
|
[ExternalNetworkId::Bitcoin as u8].as_slice(),
|
||||||
|
&validator.0,
|
||||||
|
e,
|
||||||
|
s,
|
||||||
|
&e_sig[.. 32],
|
||||||
|
&s_sig[.. 33],
|
||||||
|
]
|
||||||
|
.concat(),
|
||||||
|
Self::Ethereum(e, s, e_sig, s_sig) => [
|
||||||
|
[ExternalNetworkId::Ethereum as u8].as_slice(),
|
||||||
|
&validator.0,
|
||||||
|
e,
|
||||||
|
s,
|
||||||
|
&e_sig[.. 32],
|
||||||
|
&s_sig[.. 33],
|
||||||
|
]
|
||||||
|
.concat(),
|
||||||
|
Self::Monero(e, e_sig) => {
|
||||||
|
[[ExternalNetworkId::Monero as u8].as_slice(), &validator.0, e, &e_sig[.. 32]].concat()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let challenge = sp_core::hashing::blake2_512(&transcript);
|
||||||
|
|
||||||
|
// Verify the Schnorr signatures
|
||||||
|
match &self {
|
||||||
|
Self::Bitcoin(e, _, e_sig, _) | Self::Ethereum(e, _, e_sig, _) | Self::Monero(e, e_sig) => {
|
||||||
|
let sig = SchnorrSignature::<Embedwards25519>::read(&mut e_sig.as_slice()).ok()?;
|
||||||
|
if !sig.verify(
|
||||||
|
Embedwards25519::read_G(&mut e.as_slice()).ok()?,
|
||||||
|
<<Embedwards25519 as Ciphersuite>::F as FromUniformBytes<_>>::from_uniform_bytes(
|
||||||
|
&challenge,
|
||||||
|
),
|
||||||
|
) {
|
||||||
|
None?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
match &self {
|
||||||
|
Self::Bitcoin(_, s, _, s_sig) | Self::Ethereum(_, s, _, s_sig) => {
|
||||||
|
let sig = SchnorrSignature::<Secq256k1>::read(&mut s_sig.as_slice()).ok()?;
|
||||||
|
if !sig.verify(
|
||||||
|
Secq256k1::read_G(&mut s.as_slice()).ok()?,
|
||||||
|
<<Secq256k1 as Ciphersuite>::F as FromUniformBytes<_>>::from_uniform_bytes(&challenge),
|
||||||
|
) {
|
||||||
|
None?;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Self::Monero(_, _) => {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the keys
|
||||||
|
Some(match self {
|
||||||
|
Self::Bitcoin(e, s, _, _) => EmbeddedEllipticCurveKeys::Bitcoin(e, s),
|
||||||
|
Self::Ethereum(e, s, _, _) => EmbeddedEllipticCurveKeys::Ethereum(e, s),
|
||||||
|
Self::Monero(e, _) => EmbeddedEllipticCurveKeys::Monero(e),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::Encode for SignedEmbeddedEllipticCurveKeys {
|
||||||
|
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R {
|
||||||
|
match self {
|
||||||
|
SignedEmbeddedEllipticCurveKeys::Bitcoin(e, s, e_sig, s_sig) |
|
||||||
|
SignedEmbeddedEllipticCurveKeys::Ethereum(e, s, e_sig, s_sig) => {
|
||||||
|
let mut res = [0; 195];
|
||||||
|
res[0] = self.network() as u8;
|
||||||
|
res[1 .. 33].copy_from_slice(e);
|
||||||
|
res[33 .. 66].copy_from_slice(s);
|
||||||
|
res[66 .. 130].copy_from_slice(e_sig);
|
||||||
|
res[130 ..].copy_from_slice(s_sig);
|
||||||
|
f(&res)
|
||||||
|
}
|
||||||
|
SignedEmbeddedEllipticCurveKeys::Monero(e, e_sig) => {
|
||||||
|
let mut res = [0; 97];
|
||||||
|
res[0] = self.network() as u8;
|
||||||
|
res[1 .. 33].copy_from_slice(e);
|
||||||
|
res[33 ..].copy_from_slice(e_sig);
|
||||||
|
f(&res)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::EncodeLike<SignedEmbeddedEllipticCurveKeys> for SignedEmbeddedEllipticCurveKeys {}
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::Decode for SignedEmbeddedEllipticCurveKeys {
|
||||||
|
fn decode<I: scale::Input>(input: &mut I) -> Result<Self, scale::Error> {
|
||||||
|
let embedded_elliptic_curve_keys = EmbeddedEllipticCurveKeys::decode(input)?;
|
||||||
|
let embedwards25519_signature = <[u8; 64]>::decode(&mut *input)?;
|
||||||
|
Ok(match embedded_elliptic_curve_keys {
|
||||||
|
EmbeddedEllipticCurveKeys::Bitcoin(e, s) => {
|
||||||
|
let secq256k1_signature = <[u8; 65]>::decode(&mut *input)?;
|
||||||
|
SignedEmbeddedEllipticCurveKeys::Bitcoin(
|
||||||
|
e,
|
||||||
|
s,
|
||||||
|
embedwards25519_signature,
|
||||||
|
secq256k1_signature,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
EmbeddedEllipticCurveKeys::Ethereum(e, s) => {
|
||||||
|
let secq256k1_signature = <[u8; 65]>::decode(&mut *input)?;
|
||||||
|
SignedEmbeddedEllipticCurveKeys::Ethereum(
|
||||||
|
e,
|
||||||
|
s,
|
||||||
|
embedwards25519_signature,
|
||||||
|
secq256k1_signature,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
EmbeddedEllipticCurveKeys::Monero(e) => {
|
||||||
|
SignedEmbeddedEllipticCurveKeys::Monero(e, embedwards25519_signature)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[cfg(feature = "non_canonical_scale_derivations")]
|
||||||
|
impl scale::DecodeWithMemTracking for SignedEmbeddedEllipticCurveKeys {}
|
||||||
|
|
||||||
/// The key pair for a validator set.
|
/// The key pair for a validator set.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -6,6 +6,16 @@ use crate::coin::{ExternalCoin, Coin};
|
|||||||
|
|
||||||
/// Identifier for an embedded elliptic curve.
|
/// Identifier for an embedded elliptic curve.
|
||||||
#[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)]
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, Zeroize, BorshSerialize, BorshDeserialize)]
|
||||||
|
#[cfg_attr(
|
||||||
|
feature = "non_canonical_scale_derivations",
|
||||||
|
derive(
|
||||||
|
scale::Encode,
|
||||||
|
scale::Decode,
|
||||||
|
scale::MaxEncodedLen,
|
||||||
|
scale::DecodeWithMemTracking,
|
||||||
|
scale_info::TypeInfo
|
||||||
|
)
|
||||||
|
)]
|
||||||
pub enum EmbeddedEllipticCurve {
|
pub enum EmbeddedEllipticCurve {
|
||||||
/// The Embedwards25519 curve, defined over (embedded into) Ed25519's/Ristretto's scalar field.
|
/// The Embedwards25519 curve, defined over (embedded into) Ed25519's/Ristretto's scalar field.
|
||||||
Embedwards25519,
|
Embedwards25519,
|
||||||
@@ -50,14 +60,17 @@ impl ExternalNetworkId {
|
|||||||
///
|
///
|
||||||
/// This is guaranteed to return `[Embedwards25519]` or
|
/// This is guaranteed to return `[Embedwards25519]` or
|
||||||
/// `[Embedwards25519, *network specific curve*]`.
|
/// `[Embedwards25519, *network specific curve*]`.
|
||||||
pub fn embedded_elliptic_curves(&self) -> &'static [EmbeddedEllipticCurve] {
|
pub fn embedded_elliptic_curves(&self) -> impl Iterator<Item = EmbeddedEllipticCurve> {
|
||||||
match self {
|
match self {
|
||||||
// We need to generate a Ristretto key for oraclizing and a Secp256k1 key for the network
|
// We need to generate a Ristretto key for oraclizing and a Secp256k1 key for the network
|
||||||
Self::Bitcoin | Self::Ethereum => {
|
Self::Bitcoin | Self::Ethereum => {
|
||||||
&[EmbeddedEllipticCurve::Embedwards25519, EmbeddedEllipticCurve::Secq256k1]
|
[EmbeddedEllipticCurve::Embedwards25519, EmbeddedEllipticCurve::Secq256k1]
|
||||||
|
.as_slice()
|
||||||
|
.iter()
|
||||||
|
.copied()
|
||||||
}
|
}
|
||||||
// Since the oraclizing key curve is the same as the network's curve, we only need it
|
// Since the oraclizing key curve is the same as the network's curve, we only need it
|
||||||
Self::Monero => &[EmbeddedEllipticCurve::Embedwards25519],
|
Self::Monero => [EmbeddedEllipticCurve::Embedwards25519].as_slice().iter().copied(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
scale-info = { version = "2", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-version = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-api = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
serai-abi = { path = "../abi", default-features = false, features = ["substrate"] }
|
serai-abi = { path = "../abi", default-features = false, features = ["substrate"] }
|
||||||
|
|
||||||
frame-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-executive = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
serai-coins-pallet = { path = "../coins", default-features = false }
|
serai-coins-pallet = { path = "../coins", default-features = false }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
substrate-wasm-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90" }
|
substrate-wasm-builder = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba" }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
std = [
|
std = [
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ workspace = true
|
|||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
|
||||||
scale-info = { version = "2", 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 = "2bfdaed4b3614de2fe7d10e4ece3e6a912833e90", default-features = false }
|
sp-core = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-io = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
frame-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
serai-primitives = { path = "../primitives", default-features = false }
|
serai-primitives = { path = "../primitives", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -21,21 +21,22 @@ bitvec = { version = "1", default-features = false, features = ["alloc", "serde"
|
|||||||
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "bit-vec"] }
|
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"] }
|
scale-info = { version = "2", default-features = false, features = ["derive", "bit-vec"] }
|
||||||
|
|
||||||
sp-core = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-io = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
sp-runtime = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
sp-api = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
frame-system = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
frame-support = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
serai-primitives = { path = "../primitives", default-features = false, features = ["non_canonical_scale_derivations"] }
|
serai-primitives = { path = "../primitives", default-features = false, features = ["non_canonical_scale_derivations"] }
|
||||||
|
|
||||||
coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false }
|
coins-pallet = { package = "serai-coins-pallet", path = "../coins", default-features = false }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
#pallet-timestamp = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
#sp-consensus-babe = { 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 = "ece373ca1e8aaee67844eebcca28b5e016136dba", default-features = false }
|
||||||
|
|
||||||
#ciphersuite = { path = "../../../crypto/ciphersuite", default-features = false, features = ["std"] }
|
#ciphersuite = { path = "../../../crypto/ciphersuite", default-features = false, features = ["std"] }
|
||||||
#dalek-ff-group = { path = "../../../crypto/dalek-ff-group", default-features = false, features = ["std"] }
|
#dalek-ff-group = { path = "../../../crypto/dalek-ff-group", default-features = false, features = ["std"] }
|
||||||
@@ -58,6 +59,7 @@ std = [
|
|||||||
"sp-core/std",
|
"sp-core/std",
|
||||||
"sp-io/std",
|
"sp-io/std",
|
||||||
"sp-runtime/std",
|
"sp-runtime/std",
|
||||||
|
"sp-api/std",
|
||||||
|
|
||||||
"frame-system/std",
|
"frame-system/std",
|
||||||
"frame-support/std",
|
"frame-support/std",
|
||||||
|
|||||||
4
substrate/validator-sets/README.md
Normal file
4
substrate/validator-sets/README.md
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# Validator Sets
|
||||||
|
|
||||||
|
This pallet is responsible for managing the allocations of, inclusion of, and
|
||||||
|
rotation of validators.
|
||||||
53
substrate/validator-sets/src/embedded_elliptic_curve_keys.rs
Normal file
53
substrate/validator-sets/src/embedded_elliptic_curve_keys.rs
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
use sp_core::sr25519::Public;
|
||||||
|
|
||||||
|
use serai_primitives::{crypto::SignedEmbeddedEllipticCurveKeys, network_id::*};
|
||||||
|
|
||||||
|
use frame_support::storage::StorageDoubleMap;
|
||||||
|
|
||||||
|
pub(crate) trait EmbeddedEllipticCurveKeysStorage {
|
||||||
|
/// An opaque map storing keys on an embedded elliptic curve.
|
||||||
|
type EmbeddedEllipticCurveKeys: StorageDoubleMap<
|
||||||
|
ExternalNetworkId,
|
||||||
|
Public,
|
||||||
|
serai_primitives::crypto::EmbeddedEllipticCurveKeys,
|
||||||
|
Query = Option<serai_primitives::crypto::EmbeddedEllipticCurveKeys>,
|
||||||
|
>;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// An interface for managing validators' embedded elliptic curve keys.
|
||||||
|
pub(crate) trait EmbeddedEllipticCurveKeys {
|
||||||
|
/// Set a validator's embedded elliptic curve keys for an external network.
|
||||||
|
fn set_embedded_elliptic_curve_keys(
|
||||||
|
validator: Public,
|
||||||
|
keys: SignedEmbeddedEllipticCurveKeys,
|
||||||
|
) -> Result<(), ()>;
|
||||||
|
/// Check if a validator still needs to set embedded elliptic curve keys.
|
||||||
|
fn still_needs_to_set_embedded_elliptic_curve_keys(network: NetworkId, validator: Public)
|
||||||
|
-> bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<S: EmbeddedEllipticCurveKeysStorage> EmbeddedEllipticCurveKeys for S {
|
||||||
|
/// Set a validator's embedded elliptic curve keys, for an external network.
|
||||||
|
fn set_embedded_elliptic_curve_keys(
|
||||||
|
validator: Public,
|
||||||
|
keys: SignedEmbeddedEllipticCurveKeys,
|
||||||
|
) -> Result<(), ()> {
|
||||||
|
let keys = keys.verify(validator.into()).ok_or(())?;
|
||||||
|
S::EmbeddedEllipticCurveKeys::set(keys.network(), validator, Some(keys));
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Check if a validator still needs to set embedded elliptic curve keys.
|
||||||
|
fn still_needs_to_set_embedded_elliptic_curve_keys(
|
||||||
|
network: NetworkId,
|
||||||
|
validator: Public,
|
||||||
|
) -> bool {
|
||||||
|
match network {
|
||||||
|
// Validators never need to set embedded elliptic curve keys for Serai
|
||||||
|
NetworkId::Serai => return false,
|
||||||
|
NetworkId::External(network) => {
|
||||||
|
!S::EmbeddedEllipticCurveKeys::contains_key(network, validator)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,19 @@
|
|||||||
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
#![doc = include_str!("../README.md")]
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
|
|
||||||
#[cfg(test)]
|
extern crate alloc;
|
||||||
mod mock;
|
|
||||||
|
|
||||||
#[cfg(test)]
|
mod embedded_elliptic_curve_keys;
|
||||||
mod tests;
|
use embedded_elliptic_curve_keys::*;
|
||||||
|
|
||||||
|
mod allocations;
|
||||||
|
use allocations::*;
|
||||||
|
|
||||||
|
mod sessions;
|
||||||
|
use sessions::{*, GenesisValidators as GenesisValidatorsContainer};
|
||||||
|
|
||||||
|
/*
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
|
|
||||||
use scale::{Encode, Decode};
|
use scale::{Encode, Decode};
|
||||||
@@ -63,32 +71,31 @@ impl<T: pallet::Config> GetValidatorCount for MembershipProof<T> {
|
|||||||
u32::try_from(Babe::<T>::authorities().len()).unwrap()
|
u32::try_from(Babe::<T>::authorities().len()).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#[allow(
|
|
||||||
deprecated,
|
|
||||||
unreachable_patterns,
|
|
||||||
clippy::let_unit_value,
|
|
||||||
clippy::cast_possible_truncation,
|
|
||||||
clippy::ignored_unit_patterns
|
|
||||||
)] // TODO
|
|
||||||
#[frame_support::pallet]
|
#[frame_support::pallet]
|
||||||
pub mod pallet {
|
mod pallet {
|
||||||
|
use sp_core::sr25519::Public;
|
||||||
|
|
||||||
|
use frame_system::pallet_prelude::*;
|
||||||
|
use frame_support::pallet_prelude::*;
|
||||||
|
|
||||||
|
use serai_primitives::{
|
||||||
|
crypto::KeyPair, network_id::*, coin::*, balance::*, validator_sets::*, address::SeraiAddress,
|
||||||
|
};
|
||||||
|
|
||||||
|
use coins_pallet::Pallet as Coins;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[pallet::config]
|
#[pallet::config]
|
||||||
pub trait Config:
|
pub trait Config: frame_system::Config + coins_pallet::Config {
|
||||||
frame_system::Config<AccountId = Public>
|
|
||||||
+ coins_pallet::Config
|
|
||||||
+ dex_pallet::Config
|
|
||||||
+ pallet_babe::Config
|
|
||||||
+ pallet_grandpa::Config
|
|
||||||
+ TypeInfo
|
|
||||||
{
|
|
||||||
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
|
type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;
|
||||||
|
|
||||||
type ShouldEndSession: ShouldEndSession<BlockNumberFor<Self>>;
|
// type ShouldEndSession: ShouldEndSession<BlockNumberFor<Self>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO
|
||||||
#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, serde::Serialize, serde::Deserialize)]
|
#[derive(Clone, PartialEq, Eq, Debug, Encode, Decode, serde::Serialize, serde::Deserialize)]
|
||||||
pub struct AllEmbeddedEllipticCurveKeysAtGenesis {
|
pub struct AllEmbeddedEllipticCurveKeysAtGenesis {
|
||||||
pub embedwards25519: BoundedVec<u8, ConstU32<{ MAX_KEY_LEN }>>,
|
pub embedwards25519: BoundedVec<u8, ConstU32<{ MAX_KEY_LEN }>>,
|
||||||
@@ -112,26 +119,12 @@ pub mod pallet {
|
|||||||
GenesisConfig { networks: Default::default(), participants: Default::default() }
|
GenesisConfig { networks: Default::default(), participants: Default::default() }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#[pallet::pallet]
|
#[pallet::pallet]
|
||||||
pub struct Pallet<T>(PhantomData<T>);
|
pub struct Pallet<T>(PhantomData<T>);
|
||||||
|
|
||||||
/// The current session for a network.
|
/*
|
||||||
// Uses Identity for the lookup to avoid a hash of a severely limited fixed key-space.
|
|
||||||
#[pallet::storage]
|
|
||||||
#[pallet::getter(fn session)]
|
|
||||||
pub type CurrentSession<T: Config> = StorageMap<_, Identity, NetworkId, Session, OptionQuery>;
|
|
||||||
impl<T: Config> Pallet<T> {
|
|
||||||
pub fn latest_decided_session(network: NetworkId) -> Option<Session> {
|
|
||||||
let session = Self::session(network);
|
|
||||||
// we already decided about the next session for serai.
|
|
||||||
if network == NetworkId::Serai {
|
|
||||||
return session.map(|s| Session(s.0 + 1));
|
|
||||||
}
|
|
||||||
session
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The allocation required per key share.
|
/// The allocation required per key share.
|
||||||
// Uses Identity for the lookup to avoid a hash of a severely limited fixed key-space.
|
// Uses Identity for the lookup to avoid a hash of a severely limited fixed key-space.
|
||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
@@ -158,186 +151,79 @@ pub mod pallet {
|
|||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
pub(crate) type InSet<T: Config> =
|
pub(crate) type InSet<T: Config> =
|
||||||
StorageDoubleMap<_, Identity, NetworkId, Blake2_128Concat, Public, u64, OptionQuery>;
|
StorageDoubleMap<_, Identity, NetworkId, Blake2_128Concat, Public, u64, OptionQuery>;
|
||||||
|
|
||||||
impl<T: Config> Pallet<T> {
|
|
||||||
// This exists as InSet, for Serai, is the validators set for the next session, *not* the
|
|
||||||
// current set's validators
|
|
||||||
#[inline]
|
|
||||||
fn in_active_serai_set(account: Public) -> bool {
|
|
||||||
// TODO: is_member is internally O(n). Update Babe to use an O(1) storage lookup?
|
|
||||||
Babe::<T>::is_member(&BabeAuthorityId::from(account))
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if the account is included in an active set.
|
|
||||||
///
|
|
||||||
/// This will still include participants which were removed from the DKG.
|
|
||||||
pub fn in_active_set(network: NetworkId, account: Public) -> bool {
|
|
||||||
if network == NetworkId::Serai {
|
|
||||||
Self::in_active_serai_set(account)
|
|
||||||
} else {
|
|
||||||
InSet::<T>::contains_key(network, account)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if the account has been definitively included in an active or upcoming set.
|
|
||||||
///
|
|
||||||
/// This will still include participants which were removed from the DKG.
|
|
||||||
pub fn in_set(network: NetworkId, account: Public) -> bool {
|
|
||||||
if InSet::<T>::contains_key(network, account) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if network == NetworkId::Serai {
|
|
||||||
return Self::in_active_serai_set(account);
|
|
||||||
}
|
|
||||||
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if the account is present in the latest decided set.
|
|
||||||
///
|
|
||||||
/// This is useful when working with `allocation` and `total_allocated_stake`, which return the
|
|
||||||
/// latest information.
|
|
||||||
pub fn in_latest_decided_set(network: NetworkId, account: Public) -> bool {
|
|
||||||
InSet::<T>::contains_key(network, account)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct Abstractions<T: Config>(PhantomData<T>);
|
||||||
|
|
||||||
|
// Satisfy the `EmbeddedEllipticCurveKeys` abstraction
|
||||||
|
|
||||||
/// A key on an embedded elliptic curve.
|
|
||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
pub type EmbeddedEllipticCurveKeys<T: Config> = StorageDoubleMap<
|
type EmbeddedEllipticCurveKeys<T: Config> = StorageDoubleMap<
|
||||||
_,
|
_,
|
||||||
|
Identity,
|
||||||
|
ExternalNetworkId,
|
||||||
Blake2_128Concat,
|
Blake2_128Concat,
|
||||||
Public,
|
Public,
|
||||||
Identity,
|
serai_primitives::crypto::EmbeddedEllipticCurveKeys,
|
||||||
EmbeddedEllipticCurve,
|
|
||||||
BoundedVec<u8, ConstU32<{ MAX_KEY_LEN }>>,
|
|
||||||
OptionQuery,
|
OptionQuery,
|
||||||
>;
|
>;
|
||||||
|
|
||||||
/// The total stake allocated to this network by the active set of validators.
|
impl<T: Config> EmbeddedEllipticCurveKeysStorage for Abstractions<T> {
|
||||||
|
type EmbeddedEllipticCurveKeys = EmbeddedEllipticCurveKeys<T>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Satisfy the `Allocations` abstraction
|
||||||
|
|
||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
#[pallet::getter(fn total_allocated_stake)]
|
type Allocations<T: Config> =
|
||||||
pub type TotalAllocatedStake<T: Config> = StorageMap<_, Identity, NetworkId, Amount, OptionQuery>;
|
StorageMap<_, Blake2_128Concat, AllocationsKey, Amount, OptionQuery>;
|
||||||
|
// This has to use `Identity` per the documentation of `AllocationsStorage`
|
||||||
/// The current amount allocated to a validator set by a validator.
|
|
||||||
#[pallet::storage]
|
|
||||||
#[pallet::getter(fn allocation)]
|
|
||||||
pub type Allocations<T: Config> =
|
|
||||||
StorageMap<_, Blake2_128Concat, (NetworkId, Public), Amount, OptionQuery>;
|
|
||||||
/// A sorted view of the current allocations premised on the underlying DB itself being sorted.
|
|
||||||
/*
|
|
||||||
This uses Identity so we can take advantage of the DB's lexicographic ordering to iterate over
|
|
||||||
the key space from highest-to-lowest allocated.
|
|
||||||
|
|
||||||
This does remove the protection using a hash algorithm here offers against spam attacks (by
|
|
||||||
flooding the DB with layers, increasing lookup time and merkle proof sizes, not that we use
|
|
||||||
merkle proofs as Polkadot does).
|
|
||||||
|
|
||||||
Since amounts are represented with just 8 bytes, only 16 nibbles are presents. This caps the
|
|
||||||
potential depth caused by spam at 16 layers (as the underlying DB operates on nibbles).
|
|
||||||
|
|
||||||
While there is an entire 32-byte public key after this, a Blake hash of the key is inserted
|
|
||||||
after the amount to prevent the key from also being used to cause layer spam.
|
|
||||||
|
|
||||||
There's also a minimum stake requirement, which further reduces the potential for spam.
|
|
||||||
*/
|
|
||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
type SortedAllocations<T: Config> =
|
type SortedAllocations<T: Config> =
|
||||||
StorageMap<_, Identity, (NetworkId, [u8; 8], [u8; 16], Public), (), OptionQuery>;
|
StorageMap<_, Identity, SortedAllocationsKey, (), OptionQuery>;
|
||||||
impl<T: Config> Pallet<T> {
|
|
||||||
#[inline]
|
impl<T: Config> AllocationsStorage for Abstractions<T> {
|
||||||
fn sorted_allocation_key(
|
type Allocations = Allocations<T>;
|
||||||
network: NetworkId,
|
type SortedAllocations = SortedAllocations<T>;
|
||||||
key: Public,
|
|
||||||
amount: Amount,
|
|
||||||
) -> (NetworkId, [u8; 8], [u8; 16], Public) {
|
|
||||||
let amount = reverse_lexicographic_order(amount.0.to_be_bytes());
|
|
||||||
let hash = sp_io::hashing::blake2_128(&(network, amount, key).encode());
|
|
||||||
(network, amount, hash, key)
|
|
||||||
}
|
|
||||||
fn recover_amount_from_sorted_allocation_key(key: &[u8]) -> Amount {
|
|
||||||
let distance_from_end = 8 + 16 + 32;
|
|
||||||
let start_pos = key.len() - distance_from_end;
|
|
||||||
let mut raw: [u8; 8] = key[start_pos .. (start_pos + 8)].try_into().unwrap();
|
|
||||||
for byte in &mut raw {
|
|
||||||
*byte = !*byte;
|
|
||||||
}
|
|
||||||
Amount(u64::from_be_bytes(raw))
|
|
||||||
}
|
|
||||||
fn recover_key_from_sorted_allocation_key(key: &[u8]) -> Public {
|
|
||||||
Public(key[(key.len() - 32) ..].try_into().unwrap())
|
|
||||||
}
|
|
||||||
// Returns if this validator already had an allocation set.
|
|
||||||
fn set_allocation(network: NetworkId, key: Public, amount: Amount) -> bool {
|
|
||||||
let prior = Allocations::<T>::take((network, key));
|
|
||||||
if let Some(amount) = prior {
|
|
||||||
SortedAllocations::<T>::remove(Self::sorted_allocation_key(network, key, amount));
|
|
||||||
}
|
|
||||||
if amount.0 != 0 {
|
|
||||||
Allocations::<T>::set((network, key), Some(amount));
|
|
||||||
SortedAllocations::<T>::set(Self::sorted_allocation_key(network, key, amount), Some(()));
|
|
||||||
}
|
|
||||||
prior.is_some()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Doesn't use PrefixIterator as we need to yield the keys *and* values
|
// Satisfy the `Sessions` abstraction
|
||||||
// PrefixIterator only yields the values
|
|
||||||
struct SortedAllocationsIter<T: Config> {
|
|
||||||
_t: PhantomData<T>,
|
|
||||||
prefix: Vec<u8>,
|
|
||||||
last: Vec<u8>,
|
|
||||||
allocation_per_key_share: Amount,
|
|
||||||
}
|
|
||||||
impl<T: Config> SortedAllocationsIter<T> {
|
|
||||||
fn new(network: NetworkId) -> Self {
|
|
||||||
let mut prefix = SortedAllocations::<T>::final_prefix().to_vec();
|
|
||||||
prefix.extend(&network.encode());
|
|
||||||
Self {
|
|
||||||
_t: PhantomData,
|
|
||||||
prefix: prefix.clone(),
|
|
||||||
last: prefix,
|
|
||||||
allocation_per_key_share: Pallet::<T>::allocation_per_key_share(network).expect(
|
|
||||||
"SortedAllocationsIter iterating over a network without a set allocation per key share",
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl<T: Config> Iterator for SortedAllocationsIter<T> {
|
|
||||||
type Item = (Public, Amount);
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
|
||||||
let next = sp_io::storage::next_key(&self.last)?;
|
|
||||||
if !next.starts_with(&self.prefix) {
|
|
||||||
None?;
|
|
||||||
}
|
|
||||||
let key = Pallet::<T>::recover_key_from_sorted_allocation_key(&next);
|
|
||||||
let amount = Pallet::<T>::recover_amount_from_sorted_allocation_key(&next);
|
|
||||||
|
|
||||||
// We may have validators present, with less than the minimum allocation, due to block
|
// We use `Identity` as the hasher for `NetworkId` due to how constrained it is
|
||||||
// rewards
|
|
||||||
if amount.0 < self.allocation_per_key_share.0 {
|
|
||||||
None?;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.last = next;
|
|
||||||
Some((key, amount))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Pending deallocations, keyed by the Session they become unlocked on.
|
|
||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
#[pallet::getter(fn pending_deallocations)]
|
type GenesisValidators<T: Config> = StorageValue<_, GenesisValidatorsContainer, OptionQuery>;
|
||||||
type PendingDeallocations<T: Config> = StorageDoubleMap<
|
#[pallet::storage]
|
||||||
_,
|
type AllocationPerKeyShare<T: Config> = StorageMap<_, Identity, NetworkId, Amount, OptionQuery>;
|
||||||
Blake2_128Concat,
|
#[pallet::storage]
|
||||||
(NetworkId, Public),
|
type CurrentSession<T: Config> = StorageMap<_, Identity, NetworkId, Session, OptionQuery>;
|
||||||
Identity,
|
#[pallet::storage]
|
||||||
Session,
|
type LatestDecidedSession<T: Config> = StorageMap<_, Identity, NetworkId, Session, OptionQuery>;
|
||||||
Amount,
|
// This has to use `Identity` per the documentation of `SessionsStorage`
|
||||||
OptionQuery,
|
#[pallet::storage]
|
||||||
>;
|
type SelectedValidators<T: Config> =
|
||||||
|
StorageMap<_, Identity, SelectedValidatorsKey, u64, OptionQuery>;
|
||||||
|
#[pallet::storage]
|
||||||
|
type TotalAllocatedStake<T: Config> = StorageMap<_, Identity, NetworkId, Amount, OptionQuery>;
|
||||||
|
#[pallet::storage]
|
||||||
|
type DelayedDeallocations<T: Config> =
|
||||||
|
StorageDoubleMap<_, Blake2_128Concat, Public, Identity, Session, Amount, OptionQuery>;
|
||||||
|
|
||||||
|
impl<T: Config> SessionsStorage for Abstractions<T> {
|
||||||
|
type GenesisValidators = GenesisValidators<T>;
|
||||||
|
type AllocationPerKeyShare = AllocationPerKeyShare<T>;
|
||||||
|
type CurrentSession = CurrentSession<T>;
|
||||||
|
type LatestDecidedSession = LatestDecidedSession<T>;
|
||||||
|
type SelectedValidators = SelectedValidators<T>;
|
||||||
|
type TotalAllocatedStake = TotalAllocatedStake<T>;
|
||||||
|
type DelayedDeallocations = DelayedDeallocations<T>;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[pallet::event]
|
||||||
|
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
||||||
|
pub enum Event<T: Config> {}
|
||||||
|
|
||||||
|
/*
|
||||||
/// The generated key pair for a given validator set instance.
|
/// The generated key pair for a given validator set instance.
|
||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
#[pallet::getter(fn keys)]
|
#[pallet::getter(fn keys)]
|
||||||
@@ -353,12 +239,6 @@ pub mod pallet {
|
|||||||
#[pallet::storage]
|
#[pallet::storage]
|
||||||
pub type SeraiDisabledIndices<T: Config> = StorageMap<_, Identity, u32, Public, OptionQuery>;
|
pub type SeraiDisabledIndices<T: Config> = StorageMap<_, Identity, u32, Public, OptionQuery>;
|
||||||
|
|
||||||
/// Mapping from session to its starting block number.
|
|
||||||
#[pallet::storage]
|
|
||||||
#[pallet::getter(fn session_begin_block)]
|
|
||||||
pub type SessionBeginBlock<T: Config> =
|
|
||||||
StorageDoubleMap<_, Identity, NetworkId, Identity, Session, u64, ValueQuery>;
|
|
||||||
|
|
||||||
#[pallet::event]
|
#[pallet::event]
|
||||||
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
#[pallet::generate_deposit(pub(super) fn deposit_event)]
|
||||||
pub enum Event<T: Config> {
|
pub enum Event<T: Config> {
|
||||||
@@ -399,101 +279,30 @@ pub mod pallet {
|
|||||||
|
|
||||||
impl<T: Config> Pallet<T> {
|
impl<T: Config> Pallet<T> {
|
||||||
fn new_set(network: NetworkId) {
|
fn new_set(network: NetworkId) {
|
||||||
|
// TODO
|
||||||
|
let include_genesis_validators = true;
|
||||||
// TODO: prevent new set if it doesn't have enough stake for economic security.
|
// TODO: prevent new set if it doesn't have enough stake for economic security.
|
||||||
|
Abstractions::<T>::attempt_new_session(network, include_genesis_validators)
|
||||||
|
|
||||||
// Update CurrentSession
|
/* TODO
|
||||||
let session = {
|
|
||||||
let new_session =
|
|
||||||
CurrentSession::<T>::get(network).map_or(Session(0), |session| Session(session.0 + 1));
|
|
||||||
CurrentSession::<T>::set(network, Some(new_session));
|
|
||||||
new_session
|
|
||||||
};
|
|
||||||
|
|
||||||
// Clear the current InSet
|
|
||||||
assert_eq!(
|
|
||||||
InSet::<T>::clear_prefix(network, MAX_KEY_SHARES_PER_SET_U32, None).maybe_cursor,
|
|
||||||
None
|
|
||||||
);
|
|
||||||
|
|
||||||
let allocation_per_key_share = Self::allocation_per_key_share(network).unwrap().0;
|
|
||||||
|
|
||||||
let mut participants = vec![];
|
|
||||||
let mut total_allocated_stake = 0;
|
|
||||||
{
|
|
||||||
let mut iter = SortedAllocationsIter::<T>::new(network);
|
|
||||||
let mut key_shares = 0;
|
|
||||||
while key_shares < u64::from(MAX_KEY_SHARES_PER_SET_U32) {
|
|
||||||
let Some((key, amount)) = iter.next() else { break };
|
|
||||||
|
|
||||||
let these_key_shares =
|
|
||||||
(amount.0 / allocation_per_key_share).min(u64::from(MAX_KEY_SHARES_PER_SET_U32));
|
|
||||||
participants.push((key, these_key_shares));
|
|
||||||
|
|
||||||
total_allocated_stake += amount.0;
|
|
||||||
key_shares += these_key_shares;
|
|
||||||
}
|
|
||||||
amortize_excess_key_shares(&mut participants);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (key, shares) in &participants {
|
|
||||||
InSet::<T>::set(network, key, Some(*shares));
|
|
||||||
}
|
|
||||||
|
|
||||||
let set = ValidatorSet { network, session };
|
let set = ValidatorSet { network, session };
|
||||||
Pallet::<T>::deposit_event(Event::NewSet { set });
|
Pallet::<T>::deposit_event(Event::NewSet { set });
|
||||||
|
*/
|
||||||
// other networks set their Session(0) TAS once they set their keys but serai network
|
|
||||||
// doesn't have that so we set it here.
|
|
||||||
if network == NetworkId::Serai && session == Session(0) {
|
|
||||||
TotalAllocatedStake::<T>::set(network, Some(Amount(total_allocated_stake)));
|
|
||||||
}
|
|
||||||
|
|
||||||
Participants::<T>::set(network, Some(participants.try_into().unwrap()));
|
|
||||||
SessionBeginBlock::<T>::set(
|
|
||||||
network,
|
|
||||||
session,
|
|
||||||
<frame_system::Pallet<T>>::block_number().saturated_into::<u64>(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#[pallet::error]
|
#[pallet::error]
|
||||||
pub enum Error<T> {
|
pub enum Error<T> {
|
||||||
/// Validator Set doesn't exist.
|
/// The provided embedded elliptic curve keys were invalid.
|
||||||
NonExistentValidatorSet,
|
InvalidEmbeddedEllipticCurveKeys,
|
||||||
/// An invalid embedded elliptic curve key was specified.
|
/// Allocation was erroneous.
|
||||||
///
|
AllocationError(AllocationError),
|
||||||
/// This error not being raised does not mean the key was valid. Solely that it wasn't detected
|
/// Deallocation was erroneous.
|
||||||
/// by this pallet as invalid.
|
DeallocationError(DeallocationError),
|
||||||
InvalidEmbeddedEllipticCurveKey,
|
|
||||||
/// Trying to perform an operation requiring an embedded elliptic curve key, without an
|
|
||||||
/// embedded elliptic curve key.
|
|
||||||
MissingEmbeddedEllipticCurveKey,
|
|
||||||
/// Not enough allocation to obtain a key share in the set.
|
|
||||||
InsufficientAllocation,
|
|
||||||
/// Trying to deallocate more than allocated.
|
|
||||||
NotEnoughAllocated,
|
|
||||||
/// Allocation would cause the validator set to no longer achieve fault tolerance.
|
|
||||||
AllocationWouldRemoveFaultTolerance,
|
|
||||||
/// Allocation would cause the validator set to never be able to achieve fault tolerance.
|
|
||||||
AllocationWouldPreventFaultTolerance,
|
|
||||||
/// Deallocation would remove the participant from the set, despite the validator not
|
|
||||||
/// specifying so.
|
|
||||||
DeallocationWouldRemoveParticipant,
|
|
||||||
/// Deallocation would cause the validator set to no longer achieve fault tolerance.
|
|
||||||
DeallocationWouldRemoveFaultTolerance,
|
|
||||||
/// Deallocation to be claimed doesn't exist.
|
|
||||||
NonExistentDeallocation,
|
|
||||||
/// Validator Set already generated keys.
|
|
||||||
AlreadyGeneratedKeys,
|
|
||||||
/// An invalid MuSig signature was provided.
|
|
||||||
BadSignature,
|
|
||||||
/// Validator wasn't registered or active.
|
|
||||||
NonExistentValidator,
|
|
||||||
/// Deallocation would take the stake below what is required.
|
|
||||||
DeallocationWouldRemoveEconomicSecurity,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO
|
||||||
#[pallet::hooks]
|
#[pallet::hooks]
|
||||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
|
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
|
||||||
fn on_initialize(n: BlockNumberFor<T>) -> Weight {
|
fn on_initialize(n: BlockNumberFor<T>) -> Weight {
|
||||||
@@ -513,7 +322,7 @@ pub mod pallet {
|
|||||||
for (id, stake) in self.networks.clone() {
|
for (id, stake) in self.networks.clone() {
|
||||||
AllocationPerKeyShare::<T>::set(id, Some(stake));
|
AllocationPerKeyShare::<T>::set(id, Some(stake));
|
||||||
for participant in &self.participants {
|
for participant in &self.participants {
|
||||||
if Pallet::<T>::set_allocation(id, participant.0, stake) {
|
if Abstractions::<T>::set_allocation(id, participant.0, stake) {
|
||||||
panic!("participants contained duplicates");
|
panic!("participants contained duplicates");
|
||||||
}
|
}
|
||||||
EmbeddedEllipticCurveKeys::<T>::set(
|
EmbeddedEllipticCurveKeys::<T>::set(
|
||||||
@@ -531,12 +340,14 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
impl<T: Config> Pallet<T> {
|
impl<T: Config> Pallet<T> {
|
||||||
fn account() -> T::AccountId {
|
fn account() -> T::AccountId {
|
||||||
system_address(b"ValidatorSets").into()
|
SeraiAddress::system(b"ValidatorSets").into()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
// is_bft returns if the network is able to survive any single node becoming byzantine.
|
// is_bft returns if the network is able to survive any single node becoming byzantine.
|
||||||
fn is_bft(network: NetworkId) -> bool {
|
fn is_bft(network: NetworkId) -> bool {
|
||||||
let allocation_per_key_share = AllocationPerKeyShare::<T>::get(network).unwrap().0;
|
let allocation_per_key_share = AllocationPerKeyShare::<T>::get(network).unwrap().0;
|
||||||
@@ -544,7 +355,7 @@ pub mod pallet {
|
|||||||
let mut validators_len = 0;
|
let mut validators_len = 0;
|
||||||
let mut top = None;
|
let mut top = None;
|
||||||
let mut key_shares = 0;
|
let mut key_shares = 0;
|
||||||
for (_, amount) in SortedAllocationsIter::<T>::new(network) {
|
for (_, amount) in Abstractions::<T>::iter_allocations(network, allocation_per_key_share) {
|
||||||
validators_len += 1;
|
validators_len += 1;
|
||||||
|
|
||||||
key_shares += amount.0 / allocation_per_key_share;
|
key_shares += amount.0 / allocation_per_key_share;
|
||||||
@@ -573,53 +384,14 @@ pub mod pallet {
|
|||||||
amount: Amount,
|
amount: Amount,
|
||||||
block_reward: bool,
|
block_reward: bool,
|
||||||
) -> DispatchResult {
|
) -> DispatchResult {
|
||||||
let old_allocation = Self::allocation((network, account)).unwrap_or(Amount(0)).0;
|
/* TODO
|
||||||
let new_allocation = old_allocation + amount.0;
|
|
||||||
let allocation_per_key_share = Self::allocation_per_key_share(network).unwrap().0;
|
|
||||||
// If this is a block reward, we always allow it to be allocated
|
|
||||||
if (new_allocation < allocation_per_key_share) && (!block_reward) {
|
|
||||||
Err(Error::<T>::InsufficientAllocation)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
let increased_key_shares =
|
|
||||||
(old_allocation / allocation_per_key_share) < (new_allocation / allocation_per_key_share);
|
|
||||||
|
|
||||||
// Check if the net exhibited the ability to handle any single node becoming byzantine
|
|
||||||
let mut was_bft = None;
|
|
||||||
if increased_key_shares {
|
|
||||||
was_bft = Some(Self::is_bft(network));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Increase the allocation now
|
|
||||||
Self::set_allocation(network, account, Amount(new_allocation));
|
|
||||||
Self::deposit_event(Event::AllocationIncreased { validator: account, network, amount });
|
|
||||||
|
|
||||||
// Error if the net no longer can handle any single node becoming byzantine
|
|
||||||
if let Some(was_bft) = was_bft {
|
|
||||||
if was_bft && (!Self::is_bft(network)) {
|
|
||||||
Err(Error::<T>::AllocationWouldRemoveFaultTolerance)?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The above is_bft calls are only used to check a BFT net doesn't become non-BFT
|
// The above is_bft calls are only used to check a BFT net doesn't become non-BFT
|
||||||
// Check here if this call would prevent a non-BFT net from *ever* becoming BFT
|
// Check here if this call would prevent a non-BFT net from *ever* becoming BFT
|
||||||
if (new_allocation / allocation_per_key_share) >= (MAX_KEY_SHARES_PER_SET_U32 / 3).into() {
|
if (new_allocation / allocation_per_key_share) >= (MAX_KEY_SHARES_PER_SET_U32 / 3).into() {
|
||||||
Err(Error::<T>::AllocationWouldPreventFaultTolerance)?;
|
Err(Error::<T>::AllocationWouldPreventFaultTolerance)?;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// If they're in the current set, and the current set has completed its handover (so its
|
Abstractions::<T>::increase_allocation(network, account, amount, block_reward)
|
||||||
// currently being tracked by TotalAllocatedStake), update the TotalAllocatedStake
|
|
||||||
if let Some(session) = Self::session(network) {
|
|
||||||
if InSet::<T>::contains_key(network, account) && Self::handover_completed(network, session)
|
|
||||||
{
|
|
||||||
TotalAllocatedStake::<T>::set(
|
|
||||||
network,
|
|
||||||
Some(Amount(TotalAllocatedStake::<T>::get(network).unwrap_or(Amount(0)).0 + amount.0)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn session_to_unlock_on_for_current_set(network: NetworkId) -> Option<Session> {
|
fn session_to_unlock_on_for_current_set(network: NetworkId) -> Option<Session> {
|
||||||
@@ -652,6 +424,7 @@ pub mod pallet {
|
|||||||
account: T::AccountId,
|
account: T::AccountId,
|
||||||
amount: Amount,
|
amount: Amount,
|
||||||
) -> Result<bool, DispatchError> {
|
) -> Result<bool, DispatchError> {
|
||||||
|
/* TODO
|
||||||
// Check it's safe to decrease this set's stake by this amount
|
// Check it's safe to decrease this set's stake by this amount
|
||||||
if let NetworkId::External(n) = network {
|
if let NetworkId::External(n) = network {
|
||||||
let new_total_staked = Self::total_allocated_stake(NetworkId::from(n))
|
let new_total_staked = Self::total_allocated_stake(NetworkId::from(n))
|
||||||
@@ -665,18 +438,6 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let old_allocation =
|
|
||||||
Self::allocation((network, account)).ok_or(Error::<T>::NonExistentValidator)?.0;
|
|
||||||
let new_allocation =
|
|
||||||
old_allocation.checked_sub(amount.0).ok_or(Error::<T>::NotEnoughAllocated)?;
|
|
||||||
|
|
||||||
// If we're not removing the entire allocation, yet the allocation is no longer at or above
|
|
||||||
// the threshold for a key share, error
|
|
||||||
let allocation_per_key_share = Self::allocation_per_key_share(network).unwrap().0;
|
|
||||||
if (new_allocation > 0) && (new_allocation < allocation_per_key_share) {
|
|
||||||
Err(Error::<T>::DeallocationWouldRemoveParticipant)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
let decreased_key_shares =
|
let decreased_key_shares =
|
||||||
(old_allocation / allocation_per_key_share) > (new_allocation / allocation_per_key_share);
|
(old_allocation / allocation_per_key_share) > (new_allocation / allocation_per_key_share);
|
||||||
|
|
||||||
@@ -687,48 +448,14 @@ pub mod pallet {
|
|||||||
was_bft = Some(Self::is_bft(network));
|
was_bft = Some(Self::is_bft(network));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decrease the allocation now
|
|
||||||
// Since we don't also update TotalAllocatedStake here, TotalAllocatedStake may be greater
|
|
||||||
// than the sum of all allocations, according to the Allocations StorageMap
|
|
||||||
// This is intentional as this allocation has only been queued for deallocation at this time
|
|
||||||
Self::set_allocation(network, account, Amount(new_allocation));
|
|
||||||
|
|
||||||
if let Some(was_bft) = was_bft {
|
if let Some(was_bft) = was_bft {
|
||||||
if was_bft && (!Self::is_bft(network)) {
|
if was_bft && (!Self::is_bft(network)) {
|
||||||
Err(Error::<T>::DeallocationWouldRemoveFaultTolerance)?;
|
Err(Error::<T>::DeallocationWouldRemoveFaultTolerance)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// If we're not in-set, allow immediate deallocation
|
Sessions::<T>::decrease_allocation(network, account, amount)
|
||||||
if !Self::in_set(network, account) {
|
|
||||||
Self::deposit_event(Event::AllocationDecreased {
|
|
||||||
validator: account,
|
|
||||||
network,
|
|
||||||
amount,
|
|
||||||
delayed_until: None,
|
|
||||||
});
|
|
||||||
return Ok(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set it to PendingDeallocations, letting it be released upon a future session
|
|
||||||
// This unwrap should be fine as this account is active, meaning a session has occurred
|
|
||||||
let to_unlock_on = Self::session_to_unlock_on_for_current_set(network).unwrap();
|
|
||||||
let existing =
|
|
||||||
PendingDeallocations::<T>::get((network, account), to_unlock_on).unwrap_or(Amount(0));
|
|
||||||
PendingDeallocations::<T>::set(
|
|
||||||
(network, account),
|
|
||||||
to_unlock_on,
|
|
||||||
Some(Amount(existing.0 + amount.0)),
|
|
||||||
);
|
|
||||||
|
|
||||||
Self::deposit_event(Event::AllocationDecreased {
|
|
||||||
validator: account,
|
|
||||||
network,
|
|
||||||
amount,
|
|
||||||
delayed_until: Some(to_unlock_on),
|
|
||||||
});
|
|
||||||
|
|
||||||
Ok(false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks if this session has completed the handover from the prior session.
|
// Checks if this session has completed the handover from the prior session.
|
||||||
@@ -779,15 +506,6 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_total_allocated_stake(network: NetworkId) {
|
|
||||||
let participants = Participants::<T>::get(network)
|
|
||||||
.expect("setting TotalAllocatedStake for a network without participants");
|
|
||||||
let total_stake = participants.iter().fold(0, |acc, (addr, _)| {
|
|
||||||
acc + Allocations::<T>::get((network, addr)).unwrap_or(Amount(0)).0
|
|
||||||
});
|
|
||||||
TotalAllocatedStake::<T>::set(network, Some(Amount(total_stake)));
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: This is called retire_set, yet just starts retiring the set
|
// TODO: This is called retire_set, yet just starts retiring the set
|
||||||
// Update the nomenclature within this function
|
// Update the nomenclature within this function
|
||||||
pub fn retire_set(set: ValidatorSet) {
|
pub fn retire_set(set: ValidatorSet) {
|
||||||
@@ -814,9 +532,6 @@ pub mod pallet {
|
|||||||
Self::deposit_event(Event::AcceptedHandover {
|
Self::deposit_event(Event::AcceptedHandover {
|
||||||
set: ValidatorSet { network: set.network, session: Session(set.session.0 + 1) },
|
set: ValidatorSet { network: set.network, session: Session(set.session.0 + 1) },
|
||||||
});
|
});
|
||||||
|
|
||||||
// Update the total allocated stake to be for the current set
|
|
||||||
Self::set_total_allocated_stake(set.network);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Take the amount deallocatable.
|
/// Take the amount deallocatable.
|
||||||
@@ -938,9 +653,10 @@ pub mod pallet {
|
|||||||
fn slash_serai_validator(validator: Public) {
|
fn slash_serai_validator(validator: Public) {
|
||||||
let network = NetworkId::Serai;
|
let network = NetworkId::Serai;
|
||||||
|
|
||||||
let mut allocation = Self::allocation((network, validator)).unwrap_or(Amount(0));
|
let mut allocation = Abstractions::<T>::get_allocation((network, validator))
|
||||||
|
.unwrap_or(Amount(0));
|
||||||
// reduce the current allocation to 0.
|
// reduce the current allocation to 0.
|
||||||
Self::set_allocation(network, validator, Amount(0));
|
Abstractions::<T>::set_allocation(network, validator, Amount(0));
|
||||||
|
|
||||||
// Take the pending deallocation from the current session
|
// Take the pending deallocation from the current session
|
||||||
allocation.0 += PendingDeallocations::<T>::take(
|
allocation.0 += PendingDeallocations::<T>::take(
|
||||||
@@ -1002,10 +718,12 @@ pub mod pallet {
|
|||||||
|
|
||||||
Some(keys.1.into_inner())
|
Some(keys.1.into_inner())
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pallet::call]
|
#[pallet::call]
|
||||||
impl<T: Config> Pallet<T> {
|
impl<T: Config> Pallet<T> {
|
||||||
|
/*
|
||||||
#[pallet::call_index(0)]
|
#[pallet::call_index(0)]
|
||||||
#[pallet::weight(0)] // TODO
|
#[pallet::weight(0)] // TODO
|
||||||
pub fn set_keys(
|
pub fn set_keys(
|
||||||
@@ -1066,31 +784,19 @@ pub mod pallet {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#[pallet::call_index(2)]
|
#[pallet::call_index(2)]
|
||||||
#[pallet::weight(0)] // TODO
|
#[pallet::weight(0)] // TODO
|
||||||
pub fn set_embedded_elliptic_curve_key(
|
pub fn set_embedded_elliptic_curve_keys(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
embedded_elliptic_curve: EmbeddedEllipticCurve,
|
keys: serai_primitives::crypto::SignedEmbeddedEllipticCurveKeys,
|
||||||
key: BoundedVec<u8, ConstU32<{ MAX_KEY_LEN }>>,
|
|
||||||
) -> DispatchResult {
|
) -> DispatchResult {
|
||||||
let validator = ensure_signed(origin)?;
|
let signer = ensure_signed(origin)?;
|
||||||
|
<Abstractions<T> as crate::EmbeddedEllipticCurveKeys>::set_embedded_elliptic_curve_keys(
|
||||||
// We don't have the curve formulas, nor the BigInt arithmetic, necessary here to validate
|
signer, keys,
|
||||||
// these keys. Instead, we solely check the key lengths. Validators are responsible to not
|
)
|
||||||
// provide invalid keys.
|
.map_err(|()| Error::<T>::InvalidEmbeddedEllipticCurveKeys)?;
|
||||||
let expected_len = match embedded_elliptic_curve {
|
|
||||||
EmbeddedEllipticCurve::Embedwards25519 => 32,
|
|
||||||
EmbeddedEllipticCurve::Secq256k1 => 33,
|
|
||||||
};
|
|
||||||
if key.len() != expected_len {
|
|
||||||
Err(Error::<T>::InvalidEmbeddedEllipticCurveKey)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
// This does allow overwriting an existing key which... is unlikely to be done?
|
|
||||||
// Yet it isn't an issue as we'll fix to the key as of any set's declaration (uncaring to if
|
|
||||||
// it's distinct at the latest block)
|
|
||||||
EmbeddedEllipticCurveKeys::<T>::set(validator, embedded_elliptic_curve, Some(key));
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1098,19 +804,14 @@ pub mod pallet {
|
|||||||
#[pallet::weight(0)] // TODO
|
#[pallet::weight(0)] // TODO
|
||||||
pub fn allocate(origin: OriginFor<T>, network: NetworkId, amount: Amount) -> DispatchResult {
|
pub fn allocate(origin: OriginFor<T>, network: NetworkId, amount: Amount) -> DispatchResult {
|
||||||
let validator = ensure_signed(origin)?;
|
let validator = ensure_signed(origin)?;
|
||||||
// If this network utilizes embedded elliptic curve(s), require the validator to have set the
|
|
||||||
// appropriate key(s)
|
|
||||||
for embedded_elliptic_curve in network.embedded_elliptic_curves() {
|
|
||||||
if !EmbeddedEllipticCurveKeys::<T>::contains_key(validator, *embedded_elliptic_curve) {
|
|
||||||
Err(Error::<T>::MissingEmbeddedEllipticCurveKey)?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Coins::<T>::transfer_internal(
|
Coins::<T>::transfer_internal(
|
||||||
validator,
|
validator,
|
||||||
Self::account(),
|
Self::account(),
|
||||||
Balance { coin: Coin::Serai, amount },
|
Balance { coin: Coin::Serai, amount },
|
||||||
)?;
|
)?;
|
||||||
Self::increase_allocation(network, validator, amount, false)
|
Abstractions::<T>::increase_allocation(network, validator, amount, false)
|
||||||
|
.map_err(Error::<T>::AllocationError)?;
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[pallet::call_index(4)]
|
#[pallet::call_index(4)]
|
||||||
@@ -1118,8 +819,9 @@ pub mod pallet {
|
|||||||
pub fn deallocate(origin: OriginFor<T>, network: NetworkId, amount: Amount) -> DispatchResult {
|
pub fn deallocate(origin: OriginFor<T>, network: NetworkId, amount: Amount) -> DispatchResult {
|
||||||
let account = ensure_signed(origin)?;
|
let account = ensure_signed(origin)?;
|
||||||
|
|
||||||
let can_immediately_deallocate = Self::decrease_allocation(network, account, amount)?;
|
let deallocation_timeline = Abstractions::<T>::decrease_allocation(network, account, amount)
|
||||||
if can_immediately_deallocate {
|
.map_err(Error::<T>::DeallocationError)?;
|
||||||
|
if matches!(deallocation_timeline, DeallocationTimeline::Immediate) {
|
||||||
Coins::<T>::transfer_internal(
|
Coins::<T>::transfer_internal(
|
||||||
Self::account(),
|
Self::account(),
|
||||||
account,
|
account,
|
||||||
@@ -1130,6 +832,7 @@ pub mod pallet {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
#[pallet::call_index(5)]
|
#[pallet::call_index(5)]
|
||||||
#[pallet::weight((0, DispatchClass::Operational))] // TODO
|
#[pallet::weight((0, DispatchClass::Operational))] // TODO
|
||||||
pub fn claim_deallocation(
|
pub fn claim_deallocation(
|
||||||
@@ -1149,8 +852,10 @@ pub mod pallet {
|
|||||||
Self::deposit_event(Event::DeallocationClaimed { validator: account, network, session });
|
Self::deposit_event(Event::DeallocationClaimed { validator: account, network, session });
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
#[pallet::validate_unsigned]
|
#[pallet::validate_unsigned]
|
||||||
impl<T: Config> ValidateUnsigned for Pallet<T> {
|
impl<T: Config> ValidateUnsigned for Pallet<T> {
|
||||||
type Call = Call<T>;
|
type Call = Call<T>;
|
||||||
@@ -1271,8 +976,8 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustfmt::skip]
|
impl<T: Config, V: Into<Public> + From<Public>> KeyOwnerProofSystem<(KeyTypeId, V)> for
|
||||||
impl<T: Config, V: Into<Public> + From<Public>> KeyOwnerProofSystem<(KeyTypeId, V)> for Pallet<T> {
|
Pallet<T> {
|
||||||
type Proof = MembershipProof<T>;
|
type Proof = MembershipProof<T>;
|
||||||
type IdentificationTuple = Public;
|
type IdentificationTuple = Public;
|
||||||
|
|
||||||
@@ -1371,18 +1076,21 @@ pub mod pallet {
|
|||||||
SeraiDisabledIndices::<T>::get(index).is_some()
|
SeraiDisabledIndices::<T>::get(index).is_some()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
sp_api::decl_runtime_apis! {
|
sp_api::decl_runtime_apis! {
|
||||||
#[api_version(1)]
|
#[api_version(1)]
|
||||||
pub trait ValidatorSetsApi {
|
pub trait ValidatorSetsApi {
|
||||||
/// Returns the validator set for a given network.
|
/// Returns the validator set for a given network.
|
||||||
fn validators(network_id: NetworkId) -> Vec<PublicKey>;
|
fn validators(
|
||||||
|
network_id: serai_primitives::network_id::NetworkId,
|
||||||
|
) -> Vec<serai_primitives::crypto::Public>;
|
||||||
|
|
||||||
/// Returns the external network key for a given external network.
|
/// Returns the external network key for a given external network.
|
||||||
fn external_network_key(
|
fn external_network_key(
|
||||||
network: ExternalNetworkId,
|
network: serai_primitives::network_id::ExternalNetworkId,
|
||||||
) -> Option<Vec<u8>>;
|
) -> Option<serai_primitives::crypto::ExternalKey>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use serai_primitives::{
|
|||||||
|
|
||||||
use frame_support::storage::{StorageValue, StorageMap, StorageDoubleMap, StoragePrefixedMap};
|
use frame_support::storage::{StorageValue, StorageMap, StorageDoubleMap, StoragePrefixedMap};
|
||||||
|
|
||||||
use crate::allocations::*;
|
use crate::{embedded_elliptic_curve_keys::EmbeddedEllipticCurveKeys, allocations::Allocations};
|
||||||
|
|
||||||
/// The list of genesis validators.
|
/// The list of genesis validators.
|
||||||
pub(crate) type GenesisValidators = BoundedVec<Public, ConstU32<{ MAX_KEY_SHARES_PER_SET_U32 }>>;
|
pub(crate) type GenesisValidators = BoundedVec<Public, ConstU32<{ MAX_KEY_SHARES_PER_SET_U32 }>>;
|
||||||
@@ -17,7 +17,7 @@ pub(crate) type GenesisValidators = BoundedVec<Public, ConstU32<{ MAX_KEY_SHARES
|
|||||||
/// The key for the SelectedValidators map.
|
/// The key for the SelectedValidators map.
|
||||||
pub(crate) type SelectedValidatorsKey = (ValidatorSet, [u8; 16], Public);
|
pub(crate) type SelectedValidatorsKey = (ValidatorSet, [u8; 16], Public);
|
||||||
|
|
||||||
pub(crate) trait SessionsStorage: AllocationsStorage {
|
pub(crate) trait SessionsStorage: EmbeddedEllipticCurveKeys + Allocations {
|
||||||
/// The genesis validators
|
/// The genesis validators
|
||||||
///
|
///
|
||||||
/// The usage of is shared with the rest of the pallet. `Sessions` only reads it.
|
/// The usage of is shared with the rest of the pallet. `Sessions` only reads it.
|
||||||
@@ -44,7 +44,8 @@ pub(crate) trait SessionsStorage: AllocationsStorage {
|
|||||||
///
|
///
|
||||||
/// This is opaque and to be exclusively read/write by `Sessions`.
|
/// This is opaque and to be exclusively read/write by `Sessions`.
|
||||||
// The value is how many key shares the validator has.
|
// The value is how many key shares the validator has.
|
||||||
type SelectedValidators: StorageMap<SelectedValidatorsKey, u64> + StoragePrefixedMap<u64>;
|
type SelectedValidators: StorageMap<SelectedValidatorsKey, u64, Query = Option<u64>>
|
||||||
|
+ StoragePrefixedMap<u64>;
|
||||||
|
|
||||||
/// The total allocated stake for a network.
|
/// The total allocated stake for a network.
|
||||||
///
|
///
|
||||||
@@ -91,20 +92,44 @@ fn clear_selected_validators<Storage: StoragePrefixedMap<u64>>(set: ValidatorSet
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) enum AllocationError {
|
/// An error when allocating.
|
||||||
|
#[derive(
|
||||||
|
scale::Encode,
|
||||||
|
scale::Decode,
|
||||||
|
scale::DecodeWithMemTracking,
|
||||||
|
scale_info::TypeInfo,
|
||||||
|
frame_support::PalletError,
|
||||||
|
)]
|
||||||
|
pub enum AllocationError {
|
||||||
|
/// The validator set didn't define an allocation requirement for a key share.
|
||||||
NoAllocationPerKeyShareSet,
|
NoAllocationPerKeyShareSet,
|
||||||
|
/// Validator is missing embedded elliptic curve keys.
|
||||||
|
MissingEmbeddedEllipticCurveKeys,
|
||||||
|
/// The allocation is less than the key share.
|
||||||
AllocationLessThanKeyShare,
|
AllocationLessThanKeyShare,
|
||||||
|
/// This allocation would introduce a single point of failure.
|
||||||
IntroducesSinglePointOfFailure,
|
IntroducesSinglePointOfFailure,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub(crate) enum DeallocationTimeline {
|
pub(crate) enum DeallocationTimeline {
|
||||||
Immediate,
|
Immediate,
|
||||||
Delayed { unlocks_at: Session },
|
Delayed { unlocks_at: Session },
|
||||||
}
|
}
|
||||||
pub(crate) enum DeallocationError {
|
|
||||||
|
/// An error when deallocating.
|
||||||
|
#[derive(
|
||||||
|
scale::Encode,
|
||||||
|
scale::Decode,
|
||||||
|
scale::DecodeWithMemTracking,
|
||||||
|
scale_info::TypeInfo,
|
||||||
|
frame_support::PalletError,
|
||||||
|
)]
|
||||||
|
pub enum DeallocationError {
|
||||||
|
/// The validator set didn't define an allocation requirement for a key share.
|
||||||
NoAllocationPerKeyShareSet,
|
NoAllocationPerKeyShareSet,
|
||||||
|
/// Not enough was allocated to enable this amount to be deallocated.
|
||||||
NotEnoughAllocated,
|
NotEnoughAllocated,
|
||||||
|
/// The remaining allocation was non-zero and would be less than a key share.
|
||||||
RemainingAllocationLessThanKeyShare,
|
RemainingAllocationLessThanKeyShare,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,6 +160,7 @@ pub(crate) trait Sessions {
|
|||||||
network: NetworkId,
|
network: NetworkId,
|
||||||
validator: Public,
|
validator: Public,
|
||||||
amount: Amount,
|
amount: Amount,
|
||||||
|
block_reward: bool,
|
||||||
) -> Result<(), AllocationError>;
|
) -> Result<(), AllocationError>;
|
||||||
|
|
||||||
/// Decrease a validator's allocation.
|
/// Decrease a validator's allocation.
|
||||||
@@ -264,15 +290,21 @@ impl<Storage: SessionsStorage> Sessions for Storage {
|
|||||||
network: NetworkId,
|
network: NetworkId,
|
||||||
validator: Public,
|
validator: Public,
|
||||||
amount: Amount,
|
amount: Amount,
|
||||||
|
block_reward: bool,
|
||||||
) -> Result<(), AllocationError> {
|
) -> Result<(), AllocationError> {
|
||||||
let Some(allocation_per_key_share) = Storage::AllocationPerKeyShare::get(network) else {
|
let Some(allocation_per_key_share) = Storage::AllocationPerKeyShare::get(network) else {
|
||||||
Err(AllocationError::NoAllocationPerKeyShareSet)?
|
Err(AllocationError::NoAllocationPerKeyShareSet)?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if Self::still_needs_to_set_embedded_elliptic_curve_keys(network, validator) {
|
||||||
|
Err(AllocationError::MissingEmbeddedEllipticCurveKeys)?;
|
||||||
|
}
|
||||||
|
|
||||||
let old_allocation = Self::get_allocation(network, validator).unwrap_or(Amount(0));
|
let old_allocation = Self::get_allocation(network, validator).unwrap_or(Amount(0));
|
||||||
// Safe so long as the SRI supply fits within a u64, per assumptions on how this is called
|
// Safe so long as the SRI supply fits within a u64, per assumptions on how this is called
|
||||||
let new_allocation = (old_allocation + amount).unwrap();
|
let new_allocation = (old_allocation + amount).unwrap();
|
||||||
if new_allocation < allocation_per_key_share {
|
// Always allow a block reward to be added
|
||||||
|
if (!block_reward) && (new_allocation < allocation_per_key_share) {
|
||||||
Err(AllocationError::AllocationLessThanKeyShare)?
|
Err(AllocationError::AllocationLessThanKeyShare)?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user