difftreelog
feat(Scheduler [WIP]) critical improvements
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -42,7 +42,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -77,7 +77,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [
- "getrandom 0.2.3",
+ "getrandom 0.2.4",
"once_cell",
"version_check",
]
@@ -108,15 +108,15 @@
[[package]]
name = "anyhow"
-version = "1.0.51"
+version = "1.0.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203"
+checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0"
[[package]]
name = "approx"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "072df7202e63b127ab55acfe16ce97013d5b97bf160489336d3f1840fd78e99e"
+checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6"
dependencies = [
"num-traits",
]
@@ -225,7 +225,7 @@
"parking",
"polling",
"slab",
- "socket2 0.4.2",
+ "socket2 0.4.4",
"waker-fn",
"winapi 0.3.9",
]
@@ -288,7 +288,7 @@
"memchr",
"num_cpus",
"once_cell",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"pin-utils",
"slab",
"wasm-bindgen-futures",
@@ -296,9 +296,9 @@
[[package]]
name = "async-std-resolver"
-version = "0.20.3"
+version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed4e2c3da14d8ad45acb1e3191db7a918e9505b6f155b218e70a7c9a1a48c638"
+checksum = "dbf3e776afdf3a2477ef4854b85ba0dff3bd85792f685fb3c68948b4d304e4f0"
dependencies = [
"async-std",
"async-trait",
@@ -310,9 +310,9 @@
[[package]]
name = "async-task"
-version = "4.0.3"
+version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0"
+checksum = "677d306121baf53310a3fd342d88dc0824f6bbeace68347593658525565abee8"
[[package]]
name = "async-trait"
@@ -335,7 +335,7 @@
"futures-sink",
"futures-util",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -348,7 +348,7 @@
"futures-sink",
"futures-util",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -385,9 +385,9 @@
[[package]]
name = "backtrace"
-version = "0.3.63"
+version = "0.3.64"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6"
+checksum = "5e121dee8023ce33ab248d9ce1493df03c3b38a659b240096fcbd7048ff9c31f"
dependencies = [
"addr2line 0.17.0",
"cc",
@@ -432,7 +432,7 @@
dependencies = [
"beefy-primitives",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"parity-scale-codec",
"parking_lot 0.11.2",
@@ -460,7 +460,7 @@
dependencies = [
"beefy-gadget",
"beefy-primitives",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -494,9 +494,9 @@
[[package]]
name = "bimap"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50ae17cabbc8a38a1e3e4c1a6a664e9a09672dc14d0896fa8d865d3a5a446b07"
+checksum = "bc0455254eb5c6964c4545d8bac815e1a1be4f3afe0ae695ea539c12d728d44b"
[[package]]
name = "bincode"
@@ -621,7 +621,7 @@
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
"block-padding 0.2.1",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -853,9 +853,9 @@
[[package]]
name = "bumpalo"
-version = "3.8.0"
+version = "3.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c"
+checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899"
[[package]]
name = "byte-slice-cast"
@@ -899,15 +899,15 @@
[[package]]
name = "cache-padded"
-version = "1.1.1"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
+checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c"
[[package]]
name = "camino"
-version = "1.0.5"
+version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52d74260d9bf6944e2208aa46841b4b8f0d7ffc0849a06837b2f510337f86b2b"
+checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23"
dependencies = [
"serde",
]
@@ -1025,7 +1025,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -1039,13 +1039,13 @@
[[package]]
name = "clang-sys"
-version = "1.3.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90"
+checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21"
dependencies = [
"glob",
"libc",
- "libloading 0.7.2",
+ "libloading 0.7.3",
]
[[package]]
@@ -1228,18 +1228,18 @@
[[package]]
name = "crc32fast"
-version = "1.3.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836"
+checksum = "a2209c310e29876f7f0b2721e7e26b84aff178aa3da5d091f9bfbf47669e60e3"
dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "crossbeam-channel"
-version = "0.5.1"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
+checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
@@ -1258,9 +1258,9 @@
[[package]]
name = "crossbeam-epoch"
-version = "0.9.5"
+version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd"
+checksum = "97242a70df9b89a65d0b6df3c4bf5b9ce03c5b7309019777fbde37e7537f8762"
dependencies = [
"cfg-if 1.0.0",
"crossbeam-utils",
@@ -1271,9 +1271,9 @@
[[package]]
name = "crossbeam-utils"
-version = "0.8.5"
+version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"
+checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120"
dependencies = [
"cfg-if 1.0.0",
"lazy_static",
@@ -1301,7 +1301,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"subtle 2.4.1",
]
@@ -1311,7 +1311,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"subtle 2.4.1",
]
@@ -1372,7 +1372,7 @@
"cumulus-client-consensus-common",
"cumulus-client-network",
"cumulus-primitives-core",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"parking_lot 0.10.2",
"polkadot-node-primitives",
@@ -1395,7 +1395,7 @@
"async-trait",
"cumulus-client-consensus-common",
"cumulus-primitives-core",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-client",
"sc-client-api",
@@ -1424,7 +1424,7 @@
dependencies = [
"async-trait",
"dyn-clone",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-primitives",
"sc-client-api",
@@ -1443,7 +1443,7 @@
source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"parity-scale-codec",
"parking_lot 0.10.2",
@@ -1466,7 +1466,7 @@
source = "git+https://github.com/UniqueNetwork/cumulus.git?branch=polkadot-v0.9.14#d361390046a6ea3c6510deb75e9dbaf7f9ddccb8"
dependencies = [
"cumulus-primitives-core",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"parity-scale-codec",
"polkadot-node-primitives",
@@ -1829,7 +1829,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
]
[[package]]
@@ -1941,7 +1941,7 @@
"ed25519",
"rand 0.7.3",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"zeroize",
]
@@ -2117,9 +2117,9 @@
[[package]]
name = "event-listener"
-version = "2.5.1"
+version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59"
+checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71"
[[package]]
name = "evm"
@@ -2206,7 +2206,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
]
[[package]]
@@ -2223,9 +2223,9 @@
[[package]]
name = "fastrand"
-version = "1.5.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b394ed3d285a429378d3b384b9eb1285267e7df4b166df24b7a6939a04dc392e"
+checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf"
dependencies = [
"instant",
]
@@ -2233,14 +2233,14 @@
[[package]]
name = "fc-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"async-trait",
"derive_more",
"fc-db",
"fp-consensus",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"parity-scale-codec",
"sc-client-api",
@@ -2260,7 +2260,7 @@
[[package]]
name = "fc-db"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"fp-storage",
"kvdb",
@@ -2276,13 +2276,13 @@
[[package]]
name = "fc-mapping-sync"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"fc-consensus",
"fc-db",
"fp-consensus",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"sc-client-api",
@@ -2294,7 +2294,7 @@
[[package]]
name = "fc-rpc"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"ethereum-types",
@@ -2306,7 +2306,7 @@
"fp-evm",
"fp-rpc",
"fp-storage",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-util",
"jsonrpc-core",
"jsonrpc-pubsub",
@@ -2338,7 +2338,7 @@
[[package]]
name = "fc-rpc-core"
version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum-types",
"jsonrpc-core",
@@ -2376,7 +2376,7 @@
checksum = "e8ac3ff5224ef91f3c97e03eb1de2db82743427e91aaa5ac635f454f0b164f5a"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"num-traits",
@@ -2399,9 +2399,9 @@
[[package]]
name = "fixedbitset"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "398ea4fabe40b9b0d885340a2a991a44c8a645624075ad966d21f88688e2b69e"
+checksum = "279fb028e20b3c4c320317955b77c5e0c9701f05a1d309905d6fc702cdc5053e"
[[package]]
name = "flate2"
@@ -2459,7 +2459,7 @@
[[package]]
name = "fp-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"parity-scale-codec",
@@ -2473,7 +2473,7 @@
[[package]]
name = "fp-evm"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"evm",
"impl-trait-for-tuples",
@@ -2487,7 +2487,7 @@
[[package]]
name = "fp-rpc"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"ethereum-types",
@@ -2504,7 +2504,7 @@
[[package]]
name = "fp-self-contained"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.9.0",
"frame-support",
@@ -2521,7 +2521,7 @@
[[package]]
name = "fp-storage"
version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
[[package]]
name = "frame-benchmarking"
@@ -2784,9 +2784,9 @@
[[package]]
name = "futures"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cd0210d8c325c245ff06fd95a3b13689a1a276ac8cfa8e8720cb840bfb84b9e"
+checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4"
dependencies = [
"futures-channel",
"futures-core",
@@ -2799,9 +2799,9 @@
[[package]]
name = "futures-channel"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27"
+checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b"
dependencies = [
"futures-core",
"futures-sink",
@@ -2809,15 +2809,15 @@
[[package]]
name = "futures-core"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445"
+checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7"
[[package]]
name = "futures-executor"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b808bf53348a36cab739d7e04755909b9fcaaa69b7d7e588b37b6ec62704c97"
+checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a"
dependencies = [
"futures-core",
"futures-task",
@@ -2827,9 +2827,9 @@
[[package]]
name = "futures-io"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11"
+checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2"
[[package]]
name = "futures-lite"
@@ -2842,15 +2842,15 @@
"futures-io",
"memchr",
"parking",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"waker-fn",
]
[[package]]
name = "futures-macro"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a89f17b21645bc4ed773c69af9c9a0effd4a3f1a3876eadd453469f8854e7fdd"
+checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c"
dependencies = [
"proc-macro2",
"quote",
@@ -2870,15 +2870,15 @@
[[package]]
name = "futures-sink"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af"
+checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508"
[[package]]
name = "futures-task"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12"
+checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72"
[[package]]
name = "futures-timer"
@@ -2894,9 +2894,9 @@
[[package]]
name = "futures-util"
-version = "0.3.18"
+version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e"
+checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164"
dependencies = [
"futures 0.1.31",
"futures-channel",
@@ -2906,7 +2906,7 @@
"futures-sink",
"futures-task",
"memchr",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"pin-utils",
"slab",
]
@@ -2922,9 +2922,9 @@
[[package]]
name = "generic-array"
-version = "0.14.4"
+version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
+checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803"
dependencies = [
"typenum",
"version_check",
@@ -2945,9 +2945,9 @@
[[package]]
name = "getrandom"
-version = "0.2.3"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
+checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
dependencies = [
"cfg-if 1.0.0",
"libc",
@@ -3002,22 +3002,21 @@
[[package]]
name = "gloo-timers"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e"
+checksum = "4d12a7f4e95cfe710f1d624fb1210b7d961a5fb05c4fd942f4feab06e61f590e"
dependencies = [
"futures-channel",
"futures-core",
"js-sys",
"wasm-bindgen",
- "web-sys",
]
[[package]]
name = "h2"
-version = "0.3.9"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f072413d126e57991455e0a922b31e4c8ba7c2ffbebf6b78b4f8521397d65cd"
+checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e"
dependencies = [
"bytes 1.1.0",
"fnv",
@@ -3027,16 +3026,16 @@
"http",
"indexmap",
"slab",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-util",
"tracing",
]
[[package]]
name = "handlebars"
-version = "4.1.6"
+version = "4.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "167fa173496c9eadd8749cca6f8339ac88e248f3ad2442791d0b743318a94fc0"
+checksum = "25546a65e5cf1f471f3438796fc634650b31d7fcde01d444c309aeb28b92e3a8"
dependencies = [
"log",
"pest",
@@ -3154,7 +3153,7 @@
checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1"
dependencies = [
"digest 0.9.0",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"hmac 0.8.1",
]
@@ -3171,13 +3170,13 @@
[[package]]
name = "http"
-version = "0.2.5"
+version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b"
+checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03"
dependencies = [
"bytes 1.1.0",
"fnv",
- "itoa",
+ "itoa 1.0.1",
]
[[package]]
@@ -3188,7 +3187,7 @@
dependencies = [
"bytes 1.1.0",
"http",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
]
[[package]]
@@ -3233,10 +3232,10 @@
"http-body",
"httparse",
"httpdate",
- "itoa",
- "pin-project-lite 0.2.7",
- "socket2 0.4.2",
- "tokio 1.14.0",
+ "itoa 0.4.8",
+ "pin-project-lite 0.2.8",
+ "socket2 0.4.4",
+ "tokio 1.16.1",
"tower-service",
"tracing",
"want",
@@ -3254,7 +3253,7 @@
"log",
"rustls",
"rustls-native-certs",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-rustls",
"webpki",
]
@@ -3315,7 +3314,7 @@
checksum = "ae8ab7f67bad3240049cb24fb9cb0b4c2c6af4c245840917fbbdededeee91179"
dependencies = [
"async-io",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-lite",
"if-addrs",
"ipnet",
@@ -3364,9 +3363,9 @@
[[package]]
name = "indexmap"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
+checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223"
dependencies = [
"autocfg",
"hashbrown",
@@ -3384,9 +3383,9 @@
[[package]]
name = "integer-encoding"
-version = "1.1.7"
+version = "3.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48dc51180a9b377fd75814d0cc02199c20f8e99433d6762f650d39cdbbd3b56f"
+checksum = "90c11140ffea82edce8dcd74137ce9324ec24b3cf0175fc9d7e29164da9915b8"
[[package]]
name = "integer-sqrt"
@@ -3403,7 +3402,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64fa110ec7b8f493f416eed552740d10e7030ad5f63b2308f82c9608ec2df275"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 2.0.2",
]
@@ -3466,6 +3465,12 @@
checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
[[package]]
+name = "itoa"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
+
+[[package]]
name = "jobserver"
version = "0.1.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3476,9 +3481,9 @@
[[package]]
name = "js-sys"
-version = "0.3.55"
+version = "0.3.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84"
+checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04"
dependencies = [
"wasm-bindgen",
]
@@ -3490,7 +3495,7 @@
checksum = "d2b99d4207e2a04fb4581746903c2bb7eb376f88de9c699d0f3e10feeac0cd3a"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-pubsub",
"log",
@@ -3505,7 +3510,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-executor",
"futures-util",
"log",
@@ -3520,7 +3525,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b51da17abecbdab3e3d4f26b01c5ec075e88d3abe3ab3b05dc9aa69392764ec0"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-client-transports",
]
@@ -3542,7 +3547,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1dea6e07251d9ce6a552abfb5d7ad6bc290a4596c8dcc3d795fae2bbdc1f3ff"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"hyper",
"jsonrpc-core",
"jsonrpc-server-utils",
@@ -3558,7 +3563,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "382bb0206323ca7cda3dcd7e245cea86d37d02457a02a975e3378fb149a48845"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
@@ -3573,7 +3578,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240f87695e6c6f62fb37f05c02c04953cf68d6408b8c1c89de85c7a0125b1011"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"lazy_static",
"log",
@@ -3589,12 +3594,12 @@
checksum = "fa4fdea130485b572c39a460d50888beb00afb3e35de23ccd7fad8ff19f0e0d4"
dependencies = [
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"globset",
"jsonrpc-core",
"lazy_static",
"log",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-stream",
"tokio-util",
"unicase",
@@ -3606,7 +3611,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f892c7d766369475ab7b0669f417906302d7c0fb521285c0a0c92e52e7c8e946"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-server-utils",
"log",
@@ -3679,17 +3684,17 @@
"arrayvec 0.7.2",
"async-trait",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"http",
"jsonrpsee-types",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rustls-native-certs",
"serde",
"serde_json",
"soketto",
"thiserror",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tokio-rustls",
"tokio-util",
]
@@ -3858,9 +3863,9 @@
[[package]]
name = "libc"
-version = "0.2.111"
+version = "0.2.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e167738f1866a7ec625567bae89ca0d44477232a4f7c52b1c7f2adc2c98804f"
+checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c"
[[package]]
name = "libloading"
@@ -3874,9 +3879,9 @@
[[package]]
name = "libloading"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52"
+checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
dependencies = [
"cfg-if 1.0.0",
"winapi 0.3.9",
@@ -3896,7 +3901,7 @@
dependencies = [
"atomic",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"lazy_static",
"libp2p-core",
"libp2p-deflate",
@@ -3924,7 +3929,7 @@
"libp2p-yamux",
"multiaddr",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"smallvec",
"wasm-timer",
]
@@ -3940,7 +3945,7 @@
"ed25519-dalek",
"either",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"lazy_static",
"libsecp256k1 0.7.0",
@@ -3949,13 +3954,13 @@
"multihash 0.14.0",
"multistream-select",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"prost",
"prost-build",
"rand 0.8.4",
"ring",
"rw-stream-sink",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"smallvec",
"thiserror",
"unsigned-varint 0.7.1",
@@ -3970,7 +3975,7 @@
checksum = "51a800adb195f33de63f4b17b63fe64cfc23bf2c6a0d3d0d5321328664e65197"
dependencies = [
"flate2",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
]
@@ -3981,7 +3986,7 @@
checksum = "bb8f89d15cb6e3c5bc22afff7513b11bab7856f2872d3cfba86f7f63a06bc498"
dependencies = [
"async-std-resolver",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"smallvec",
@@ -3996,7 +4001,7 @@
dependencies = [
"cuckoofilter",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4017,7 +4022,7 @@
"byteorder",
"bytes 1.1.0",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex_fmt",
"libp2p-core",
"libp2p-swarm",
@@ -4026,7 +4031,7 @@
"prost-build",
"rand 0.7.3",
"regex",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"smallvec",
"unsigned-varint 0.7.1",
"wasm-timer",
@@ -4038,7 +4043,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cca1275574183f288ff8b72d535d5ffa5ea9292ef7829af8b47dcb197c7b0dcd"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4060,14 +4065,14 @@
"bytes 1.1.0",
"either",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
"prost",
"prost-build",
"rand 0.7.3",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"smallvec",
"uint",
"unsigned-varint 0.7.1",
@@ -4084,7 +4089,7 @@
"async-io",
"data-encoding",
"dns-parser",
- "futures 0.3.18",
+ "futures 0.3.19",
"if-watch",
"lazy_static",
"libp2p-core",
@@ -4092,7 +4097,7 @@
"log",
"rand 0.8.4",
"smallvec",
- "socket2 0.4.2",
+ "socket2 0.4.4",
"void",
]
@@ -4118,7 +4123,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"nohash-hasher",
@@ -4136,14 +4141,14 @@
dependencies = [
"bytes 1.1.0",
"curve25519-dalek 3.2.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"lazy_static",
"libp2p-core",
"log",
"prost",
"prost-build",
"rand 0.8.4",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"snow",
"static_assertions",
"x25519-dalek",
@@ -4156,7 +4161,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80ef7b0ec5cf06530d9eb6cf59ae49d46a2c45663bde31c25a12f682664adbcf"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
@@ -4173,7 +4178,7 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"prost",
@@ -4188,9 +4193,9 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f1a458bbda880107b5b36fcb9b5a1ef0c329685da0e203ed692a8ebe64cc92c"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"salsa20",
"sha3 0.9.1",
@@ -4204,12 +4209,12 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libp2p-core",
"libp2p-swarm",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"prost",
"prost-build",
"rand 0.7.3",
@@ -4227,14 +4232,14 @@
dependencies = [
"asynchronous-codec 0.6.0",
"bimap",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
"prost",
"prost-build",
"rand 0.8.4",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"thiserror",
"unsigned-varint 0.7.1",
"void",
@@ -4249,11 +4254,11 @@
dependencies = [
"async-trait",
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"libp2p-swarm",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"rand 0.7.3",
"smallvec",
"unsigned-varint 0.7.1",
@@ -4267,7 +4272,7 @@
checksum = "3f5184a508f223bc100a12665517773fb8730e9f36fc09eefb670bf01b107ae9"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
"rand 0.7.3",
@@ -4293,14 +4298,14 @@
checksum = "7399c5b6361ef525d41c11fcf51635724f832baf5819b30d3d873eabb4fbae4b"
dependencies = [
"async-io",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"if-watch",
"ipnet",
"libc",
"libp2p-core",
"log",
- "socket2 0.4.2",
+ "socket2 0.4.4",
]
[[package]]
@@ -4310,7 +4315,7 @@
checksum = "b8b7563e46218165dfd60f64b96f7ce84590d75f53ecbdc74a7dd01450dc5973"
dependencies = [
"async-std",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"log",
]
@@ -4321,7 +4326,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1008a302b73c5020251f9708c653f5ed08368e530e247cc9cd2f109ff30042cf"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"js-sys",
"libp2p-core",
"parity-send-wrapper",
@@ -4336,7 +4341,7 @@
checksum = "22e12df82d1ed64969371a9e65ea92b91064658604cc2576c2757f18ead9a1cf"
dependencies = [
"either",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-rustls",
"libp2p-core",
"log",
@@ -4353,7 +4358,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e7362abb8867d7187e7e93df17f460d554c997fc5c8ac57dc1259057f6889af"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p-core",
"parking_lot 0.11.2",
"thiserror",
@@ -4403,7 +4408,7 @@
"libsecp256k1-gen-genmult",
"rand 0.8.4",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"typenum",
]
@@ -4489,9 +4494,9 @@
[[package]]
name = "lock_api"
-version = "0.4.5"
+version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109"
+checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b"
dependencies = [
"scopeguard",
]
@@ -4517,9 +4522,9 @@
[[package]]
name = "lru"
-version = "0.7.0"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c748cfe47cb8da225c37595b3108bea1c198c84aaae8ea0ba76d01dda9fc803"
+checksum = "274353858935c992b13c0ca408752e2121da852d07dec7ce5f108c77dfa14d1f"
dependencies = [
"hashbrown",
]
@@ -4615,9 +4620,9 @@
[[package]]
name = "memmap2"
-version = "0.5.0"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4647a11b578fead29cdbb34d4adef8dd3dc35b876c9c6d5240d83f205abfe96e"
+checksum = "fe3179b85e1fd8b14447cbebadb75e45a1002f541b925f0bfec366d56a81c56d"
dependencies = [
"libc",
]
@@ -4675,7 +4680,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"thiserror",
"tracing",
@@ -4683,12 +4688,12 @@
[[package]]
name = "mick-jaeger"
-version = "0.1.6"
+version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eaa77fad8461bb1e0d01be11299e24c6e544007715ed442bfec29f165dc487ae"
+checksum = "fd2c2cc134e57461f0898b0e921f0a7819b5e3f3a4335b9aa390ce81a5f36fb9"
dependencies = [
- "futures 0.3.18",
- "rand 0.7.3",
+ "futures 0.3.19",
+ "rand 0.8.4",
"thrift",
]
@@ -4818,9 +4823,9 @@
"blake2s_simd",
"blake3",
"digest 0.9.0",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"multihash-derive",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"sha3 0.9.1",
"unsigned-varint 0.5.1",
]
@@ -4832,9 +4837,9 @@
checksum = "752a61cd890ff691b4411423d23816d5866dd5621e4d1c5687a53b94b5a979d8"
dependencies = [
"digest 0.9.0",
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"multihash-derive",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"unsigned-varint 0.7.1",
]
@@ -4865,9 +4870,9 @@
checksum = "56a336acba8bc87c8876f6425407dbbe6c417bf478b22015f8fb0994ef3bc0ab"
dependencies = [
"bytes 1.1.0",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"smallvec",
"unsigned-varint 0.7.1",
]
@@ -5018,9 +5023,9 @@
[[package]]
name = "num_cpus"
-version = "1.13.0"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
+checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
dependencies = [
"hermit-abi",
"libc",
@@ -5039,9 +5044,9 @@
[[package]]
name = "once_cell"
-version = "1.8.0"
+version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
+checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
[[package]]
name = "opaque-debug"
@@ -5062,7 +5067,7 @@
checksum = "7337d80c23c2d8b1349563981bc4fb531220733743ba8115454a67b181173f0d"
dependencies = [
"dtoa",
- "itoa",
+ "itoa 0.4.8",
"open-metrics-client-derive-text-encode",
"owning_ref",
]
@@ -5080,9 +5085,9 @@
[[package]]
name = "openssl-probe"
-version = "0.1.4"
+version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a"
+checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
[[package]]
name = "ordered-float"
@@ -5096,7 +5101,7 @@
[[package]]
name = "orml-vesting"
version = "0.4.1-dev"
-source = "git+https://github.com/UniqueNetwork/open-runtime-module-library?branch=polkadot-v0.9.14#324372ec6e0d26df652eab3d4fb818646c630bf6"
+source = "git+https://github.com/UniqueNetwork/open-runtime-module-library?branch=polkadot-v0.9.14#8d7122899566e9c48b52d1de17c900ef6753c7a3"
dependencies = [
"frame-support",
"frame-system",
@@ -5505,7 +5510,7 @@
[[package]]
name = "pallet-ethereum"
version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"ethereum 0.10.0",
"ethereum-types",
@@ -5517,6 +5522,7 @@
"fp-storage",
"frame-support",
"frame-system",
+ "log",
"pallet-balances",
"pallet-evm",
"pallet-timestamp",
@@ -5534,7 +5540,7 @@
[[package]]
name = "pallet-evm"
version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#324d0a8ae8d64783f86bf017085571a8960c59cb"
+source = "git+https://github.com/uniquenetwork/frontier.git?branch=unique-polkadot-v0.9.14#3d10aebdc465249246b5ccc9c177eb5340c09d9b"
dependencies = [
"evm",
"evm-gasometer",
@@ -6355,9 +6361,9 @@
[[package]]
name = "parity-db"
-version = "0.3.5"
+version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78a95abf24f1097c6e3181abbbbfc3630b3b5e681470940f719b69acb4911c7f"
+checksum = "68de01cff53da5574397233383dd7f5c15ee958c348245765ea8cb09f2571e6b"
dependencies = [
"blake2-rfc",
"crc32fast",
@@ -6410,11 +6416,11 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9981e32fb75e004cc148f5fb70342f393830e0a4aa62e3cc93b50976218d42b6"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libc",
"log",
"rand 0.7.3",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"winapi 0.3.9",
]
@@ -6503,7 +6509,7 @@
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [
"instant",
- "lock_api 0.4.5",
+ "lock_api 0.4.6",
"parking_lot_core 0.8.5",
]
@@ -6632,27 +6638,27 @@
[[package]]
name = "pin-project"
-version = "0.4.28"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f"
+checksum = "9615c18d31137579e9ff063499264ddc1278e7b1982757ebc111028c4d1dc909"
dependencies = [
- "pin-project-internal 0.4.28",
+ "pin-project-internal 0.4.29",
]
[[package]]
name = "pin-project"
-version = "1.0.8"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08"
+checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e"
dependencies = [
- "pin-project-internal 1.0.8",
+ "pin-project-internal 1.0.10",
]
[[package]]
name = "pin-project-internal"
-version = "0.4.28"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e"
+checksum = "044964427019eed9d49d9d5bbce6047ef18f37100ea400912a9fa4a3523ab12a"
dependencies = [
"proc-macro2",
"quote",
@@ -6661,9 +6667,9 @@
[[package]]
name = "pin-project-internal"
-version = "1.0.8"
+version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389"
+checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb"
dependencies = [
"proc-macro2",
"quote",
@@ -6678,9 +6684,9 @@
[[package]]
name = "pin-project-lite"
-version = "0.2.7"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
+checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
[[package]]
name = "pin-utils"
@@ -6705,7 +6711,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -6719,7 +6725,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -6733,8 +6739,8 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.19",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6754,8 +6760,8 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.19",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6775,7 +6781,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"frame-benchmarking-cli",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"polkadot-node-core-pvf",
"polkadot-service",
@@ -6826,7 +6832,7 @@
dependencies = [
"always-assert",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -6859,8 +6865,8 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
- "lru 0.7.0",
+ "futures 0.3.19",
+ "lru 0.7.2",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-network-protocol",
@@ -6894,7 +6900,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-network-protocol",
"polkadot-node-subsystem",
@@ -6915,7 +6921,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"parking_lot 0.11.2",
"polkadot-node-network-protocol",
@@ -6933,7 +6939,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-erasure-coding",
"polkadot-node-primitives",
@@ -6953,10 +6959,10 @@
dependencies = [
"bitvec",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"kvdb",
- "lru 0.7.0",
+ "lru 0.7.2",
"merlin",
"parity-scale-codec",
"polkadot-node-jaeger",
@@ -6980,7 +6986,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bitvec",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"kvdb",
"parity-scale-codec",
@@ -7000,7 +7006,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bitvec",
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-erasure-coding",
"polkadot-node-primitives",
"polkadot-node-subsystem",
@@ -7017,7 +7023,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7033,7 +7039,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-node-core-pvf",
"polkadot-node-primitives",
@@ -7050,7 +7056,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
"polkadot-primitives",
@@ -7065,7 +7071,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"kvdb",
"parity-scale-codec",
@@ -7084,7 +7090,7 @@
dependencies = [
"bitvec",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"kvdb",
"parity-scale-codec",
"polkadot-node-primitives",
@@ -7101,7 +7107,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-primitives",
"polkadot-node-subsystem",
"polkadot-primitives",
@@ -7115,7 +7121,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-subsystem",
"polkadot-primitives",
@@ -7132,7 +7138,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bitvec",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"polkadot-node-subsystem",
"polkadot-node-subsystem-util",
@@ -7150,11 +7156,11 @@
"assert_matches",
"async-process",
"async-std",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libc",
"parity-scale-codec",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-core-primitives",
"polkadot-node-subsystem-util",
"polkadot-parachain",
@@ -7177,7 +7183,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"memory-lru",
"parity-util-mem",
"polkadot-node-subsystem",
@@ -7213,7 +7219,7 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"metered-channel",
"substrate-prometheus-endpoint",
@@ -7226,7 +7232,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-node-jaeger",
"polkadot-node-primitives",
@@ -7243,7 +7249,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"bounded-vec",
- "futures 0.3.18",
+ "futures 0.3.19",
"parity-scale-codec",
"polkadot-parachain",
"polkadot-primitives",
@@ -7275,7 +7281,7 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"polkadot-node-jaeger",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
@@ -7295,12 +7301,12 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"itertools",
- "lru 0.7.0",
+ "lru 0.7.2",
"metered-channel",
"parity-scale-codec",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-node-jaeger",
"polkadot-node-metrics",
"polkadot-node-network-protocol",
@@ -7320,9 +7326,9 @@
version = "0.9.14"
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
- "lru 0.7.0",
+ "lru 0.7.2",
"parity-util-mem",
"parking_lot 0.11.2",
"polkadot-node-metrics",
@@ -7342,10 +7348,10 @@
source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.14#80dfb926f40114841d3894fd75f39098dff9d5d4"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"metered-channel",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"polkadot-node-network-protocol",
"polkadot-node-primitives",
"polkadot-overseer-gen-proc-macro",
@@ -7620,12 +7626,12 @@
"beefy-gadget",
"beefy-primitives",
"frame-system-rpc-runtime-api",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex-literal",
"kusama-runtime",
"kvdb",
"kvdb-rocksdb",
- "lru 0.7.0",
+ "lru 0.7.2",
"pallet-babe",
"pallet-im-online",
"pallet-mmr-primitives",
@@ -7717,7 +7723,7 @@
dependencies = [
"arrayvec 0.5.2",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"indexmap",
"parity-scale-codec",
"polkadot-node-network-protocol",
@@ -7810,7 +7816,7 @@
"frame-benchmarking",
"frame-system",
"futures 0.1.31",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex",
"pallet-balances",
"pallet-staking",
@@ -7851,7 +7857,7 @@
"sp-state-machine",
"substrate-test-client",
"tempfile",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tracing",
]
@@ -7893,9 +7899,9 @@
[[package]]
name = "ppv-lite86"
-version = "0.2.15"
+version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba"
+checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
[[package]]
name = "primitive-types"
@@ -7968,9 +7974,9 @@
[[package]]
name = "proc-macro2"
-version = "1.0.33"
+version = "1.0.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a"
+checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029"
dependencies = [
"unicode-xid",
]
@@ -8087,9 +8093,9 @@
[[package]]
name = "quote"
-version = "1.0.10"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
+checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145"
dependencies = [
"proc-macro2",
]
@@ -8161,14 +8167,14 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [
- "getrandom 0.2.3",
+ "getrandom 0.2.4",
]
[[package]]
name = "rand_distr"
-version = "0.4.2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "964d548f8e7d12e102ef183a0de7e98180c9f8729f555897a857b96e48122d2f"
+checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
dependencies = [
"num-traits",
"rand 0.8.4",
@@ -8253,7 +8259,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [
- "getrandom 0.2.3",
+ "getrandom 0.2.4",
"redox_syscall 0.2.10",
]
@@ -8377,9 +8383,9 @@
[[package]]
name = "retain_mut"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11000e6ba5020e53e7cc26f73b91ae7d5496b4977851479edb66b694c0675c21"
+checksum = "51dd4445360338dab5116712bee1388dc727991d51969558a8882ab552e6db30"
[[package]]
name = "ring"
@@ -8521,7 +8527,7 @@
"cc",
"errno",
"io-lifetimes",
- "itoa",
+ "itoa 0.4.8",
"libc",
"linux-raw-sys",
"once_cell",
@@ -8604,8 +8610,8 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020"
dependencies = [
- "futures 0.3.18",
- "pin-project 0.4.28",
+ "futures 0.3.19",
+ "pin-project 0.4.29",
"static_assertions",
]
@@ -8660,7 +8666,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"ip_network",
"libp2p",
@@ -8685,7 +8691,7 @@
version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -8725,7 +8731,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"impl-trait-for-tuples",
- "memmap2 0.5.0",
+ "memmap2 0.5.2",
"parity-scale-codec",
"sc-chain-spec-derive",
"sc-network",
@@ -8754,7 +8760,7 @@
dependencies = [
"chrono",
"fdlimit",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex",
"libp2p",
"log",
@@ -8782,7 +8788,7 @@
"structopt",
"thiserror",
"tiny-bip39",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -8791,7 +8797,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"log",
"parity-scale-codec",
@@ -8844,7 +8850,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libp2p",
"log",
@@ -8869,7 +8875,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"parity-scale-codec",
"sc-block-builder",
@@ -8899,7 +8905,7 @@
"async-trait",
"derive_more",
"fork-tree",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"merlin",
"num-bigint",
@@ -8940,7 +8946,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -8977,7 +8983,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -9097,7 +9103,7 @@
"dyn-clone",
"finality-grandpa",
"fork-tree",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -9131,7 +9137,7 @@
dependencies = [
"derive_more",
"finality-grandpa",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -9154,7 +9160,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"ansi_term",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-util-mem",
@@ -9195,7 +9201,7 @@
"either",
"fnv",
"fork-tree",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"hex",
"ip_network",
@@ -9203,10 +9209,10 @@
"linked-hash-map",
"linked_hash_set",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"parity-scale-codec",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"prost",
"prost-build",
"rand 0.7.3",
@@ -9236,11 +9242,11 @@
version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"libp2p",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"sc-network",
"sp-runtime",
"substrate-prometheus-endpoint",
@@ -9254,7 +9260,7 @@
dependencies = [
"bytes 1.1.0",
"fnv",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"hex",
"hyper",
@@ -9280,7 +9286,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p",
"log",
"sc-utils",
@@ -9302,7 +9308,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"jsonrpc-core",
"jsonrpc-pubsub",
@@ -9333,7 +9339,7 @@
version = "0.10.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -9358,7 +9364,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-http-server",
"jsonrpc-ipc-server",
@@ -9367,7 +9373,7 @@
"log",
"serde_json",
"substrate-prometheus-endpoint",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -9378,7 +9384,7 @@
"async-trait",
"directories",
"exit-future",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"hash-db",
"jsonrpc-core",
@@ -9387,7 +9393,7 @@
"parity-scale-codec",
"parity-util-mem",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"sc-block-builder",
"sc-chain-spec",
@@ -9429,7 +9435,7 @@
"substrate-prometheus-endpoint",
"tempfile",
"thiserror",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"tracing",
"tracing-futures",
]
@@ -9476,11 +9482,11 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"chrono",
- "futures 0.3.18",
+ "futures 0.3.19",
"libp2p",
"log",
"parking_lot 0.11.2",
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"rand 0.7.3",
"serde",
"serde_json",
@@ -9535,7 +9541,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"intervalier",
"linked-hash-map",
"log",
@@ -9563,7 +9569,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"serde",
"sp-blockchain",
@@ -9576,7 +9582,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"lazy_static",
"prometheus",
@@ -9669,9 +9675,9 @@
[[package]]
name = "security-framework"
-version = "2.4.2"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87"
+checksum = "3fed7948b6c68acbb6e20c334f55ad635dc0f75506963de4464289fbd3b051ac"
dependencies = [
"bitflags",
"core-foundation",
@@ -9682,9 +9688,9 @@
[[package]]
name = "security-framework-sys"
-version = "2.4.2"
+version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e"
+checksum = "a57321bf8bc2362081b2599912d2961fe899c0efadf1b4b2f8d48b3e253bb96c"
dependencies = [
"core-foundation-sys",
"libc",
@@ -9743,18 +9749,18 @@
[[package]]
name = "serde"
-version = "1.0.131"
+version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1"
+checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.131"
+version = "1.0.136"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2"
+checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9"
dependencies = [
"proc-macro2",
"quote",
@@ -9763,11 +9769,11 @@
[[package]]
name = "serde_json"
-version = "1.0.72"
+version = "1.0.78"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527"
+checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085"
dependencies = [
- "itoa",
+ "itoa 1.0.1",
"ryu",
"serde",
]
@@ -9811,9 +9817,9 @@
[[package]]
name = "sha2"
-version = "0.9.8"
+version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa"
+checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
@@ -9864,9 +9870,9 @@
[[package]]
name = "signal-hook"
-version = "0.3.12"
+version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c35dfd12afb7828318348b8c408383cf5071a086c1d4ab1c0f9840ec92dbb922"
+checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d"
dependencies = [
"libc",
"signal-hook-registry",
@@ -9883,9 +9889,9 @@
[[package]]
name = "signature"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788"
+checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4"
[[package]]
name = "simba"
@@ -9928,9 +9934,9 @@
[[package]]
name = "smallvec"
-version = "1.7.0"
+version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
+checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
[[package]]
name = "snap"
@@ -9951,7 +9957,7 @@
"rand_core 0.6.3",
"ring",
"rustc_version 0.3.3",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"subtle 2.4.1",
"x25519-dalek",
]
@@ -9969,9 +9975,9 @@
[[package]]
name = "socket2"
-version = "0.4.2"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516"
+checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0"
dependencies = [
"libc",
"winapi 0.3.9",
@@ -9986,7 +9992,7 @@
"base64",
"bytes 1.1.0",
"flate2",
- "futures 0.3.18",
+ "futures 0.3.19",
"httparse",
"log",
"rand 0.8.4",
@@ -10092,9 +10098,9 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
- "lru 0.7.0",
+ "lru 0.7.2",
"parity-scale-codec",
"parking_lot 0.11.2",
"sp-api",
@@ -10111,7 +10117,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"futures-timer 3.0.2",
"log",
"parity-scale-codec",
@@ -10200,7 +10206,7 @@
"byteorder",
"dyn-clonable",
"ed25519-dalek",
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"hash256-std-hasher",
"hex",
@@ -10220,7 +10226,7 @@
"schnorrkel",
"secrecy",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"sp-core-hashing",
"sp-debug-derive",
"sp-externalities",
@@ -10244,7 +10250,7 @@
dependencies = [
"blake2-rfc",
"byteorder",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"sp-std",
"tiny-keccak",
"twox-hash",
@@ -10328,7 +10334,7 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"hash-db",
"libsecp256k1 0.7.0",
"log",
@@ -10365,7 +10371,7 @@
dependencies = [
"async-trait",
"derive_more",
- "futures 0.3.18",
+ "futures 0.3.19",
"merlin",
"parity-scale-codec",
"parking_lot 0.11.2",
@@ -10706,9 +10712,9 @@
[[package]]
name = "ss58-registry"
-version = "1.9.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "827441708a5dd8ca54e6b79690dc06d1bede78e61961e667f683c23c16ef964c"
+checksum = "8319f44e20b42e5c11b88b1ad4130c35fe2974665a007b08b02322070177136a"
dependencies = [
"Inflector",
"proc-macro2",
@@ -10782,9 +10788,9 @@
[[package]]
name = "structopt"
-version = "0.3.25"
+version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c"
+checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
dependencies = [
"clap",
"lazy_static",
@@ -10834,7 +10840,7 @@
"hmac 0.11.0",
"pbkdf2 0.8.0",
"schnorrkel",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"zeroize",
]
@@ -10852,7 +10858,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"frame-system-rpc-runtime-api",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
@@ -10879,7 +10885,7 @@
"hyper",
"log",
"prometheus",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -10888,7 +10894,7 @@
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
"async-trait",
- "futures 0.3.18",
+ "futures 0.3.19",
"hex",
"parity-scale-codec",
"sc-client-api",
@@ -10913,9 +10919,9 @@
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.14#de6033a2aa4f0191877200516fbc2655399faa4b"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"substrate-test-utils-derive",
- "tokio 1.14.0",
+ "tokio 1.16.1",
]
[[package]]
@@ -10958,9 +10964,9 @@
[[package]]
name = "syn"
-version = "1.0.82"
+version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
+checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b"
dependencies = [
"proc-macro2",
"quote",
@@ -10987,19 +10993,19 @@
[[package]]
name = "target-lexicon"
-version = "0.12.2"
+version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d9bffcddbc2458fa3e6058414599e3c838a022abae82e5c67b4f7f80298d5bff"
+checksum = "d7fa7e55043acb85fca6b3c01485a2eeb6b69c5d21002e273c79e465f43b7ac1"
[[package]]
name = "tempfile"
-version = "3.2.0"
+version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
dependencies = [
"cfg-if 1.0.0",
+ "fastrand",
"libc",
- "rand 0.8.4",
"redox_syscall 0.2.10",
"remove_dir_all",
"winapi 0.3.9",
@@ -11045,9 +11051,9 @@
[[package]]
name = "thread_local"
-version = "1.1.3"
+version = "1.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
+checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
dependencies = [
"once_cell",
]
@@ -11063,9 +11069,9 @@
[[package]]
name = "thrift"
-version = "0.13.0"
+version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c6d965454947cc7266d22716ebfd07b18d84ebaf35eec558586bbb2a8cb6b5b"
+checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e"
dependencies = [
"byteorder",
"integer-encoding",
@@ -11097,7 +11103,7 @@
"pbkdf2 0.4.0",
"rand 0.7.3",
"rustc-hash",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"thiserror",
"unicode-normalization",
"wasm-bindgen",
@@ -11142,20 +11148,19 @@
[[package]]
name = "tokio"
-version = "1.14.0"
+version = "1.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144"
+checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a"
dependencies = [
- "autocfg",
"bytes 1.1.0",
"libc",
"memchr",
"mio 0.7.14",
"num_cpus",
"once_cell",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"signal-hook-registry",
- "tokio-macros 1.6.0",
+ "tokio-macros 1.7.0",
"winapi 0.3.9",
]
@@ -11172,9 +11177,9 @@
[[package]]
name = "tokio-macros"
-version = "1.6.0"
+version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9efc1aba077437943f7515666aa2b882dfabfbfdf89c819ea75a8d6e9eaba5e"
+checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
dependencies = [
"proc-macro2",
"quote",
@@ -11188,7 +11193,7 @@
checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6"
dependencies = [
"rustls",
- "tokio 1.14.0",
+ "tokio 1.16.1",
"webpki",
]
@@ -11199,8 +11204,8 @@
checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3"
dependencies = [
"futures-core",
- "pin-project-lite 0.2.7",
- "tokio 1.14.0",
+ "pin-project-lite 0.2.8",
+ "tokio 1.16.1",
]
[[package]]
@@ -11214,8 +11219,8 @@
"futures-io",
"futures-sink",
"log",
- "pin-project-lite 0.2.7",
- "tokio 1.14.0",
+ "pin-project-lite 0.2.8",
+ "tokio 1.16.1",
]
[[package]]
@@ -11235,21 +11240,21 @@
[[package]]
name = "tracing"
-version = "0.1.29"
+version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105"
+checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9"
dependencies = [
"cfg-if 1.0.0",
- "pin-project-lite 0.2.7",
+ "pin-project-lite 0.2.8",
"tracing-attributes",
"tracing-core",
]
[[package]]
name = "tracing-attributes"
-version = "0.1.18"
+version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e"
+checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716"
dependencies = [
"proc-macro2",
"quote",
@@ -11258,11 +11263,12 @@
[[package]]
name = "tracing-core"
-version = "0.1.21"
+version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4"
+checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23"
dependencies = [
"lazy_static",
+ "valuable",
]
[[package]]
@@ -11271,7 +11277,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2"
dependencies = [
- "pin-project 1.0.8",
+ "pin-project 1.0.10",
"tracing",
]
@@ -11353,9 +11359,9 @@
[[package]]
name = "trust-dns-proto"
-version = "0.20.3"
+version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad0d7f5db438199a6e2609debe3f69f808d074e0a2888ee0bccb45fe234d03f4"
+checksum = "ca94d4e9feb6a181c690c4040d7a24ef34018d8313ac5044a61d21222ae24e31"
dependencies = [
"async-trait",
"cfg-if 1.0.0",
@@ -11377,9 +11383,9 @@
[[package]]
name = "trust-dns-resolver"
-version = "0.20.3"
+version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f6ad17b608a64bd0735e67bde16b0636f8aa8591f831a25d18443ed00a699770"
+checksum = "ecae383baad9995efaa34ce8e57d12c3f305e545887472a492b838f4b5cfb77a"
dependencies = [
"cfg-if 1.0.0",
"futures-util",
@@ -11432,9 +11438,9 @@
[[package]]
name = "twox-hash"
-version = "1.6.1"
+version = "1.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e"
+checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0"
dependencies = [
"cfg-if 1.0.0",
"rand 0.8.4",
@@ -11443,9 +11449,9 @@
[[package]]
name = "typenum"
-version = "1.14.0"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec"
+checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
[[package]]
name = "uc-rpc"
@@ -11473,9 +11479,9 @@
[[package]]
name = "uint"
-version = "0.9.1"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f"
+checksum = "1b1b413ebfe8c2c74a69ff124699dd156a7fa41cb1d09ba6df94aa2f2b0a4a3a"
dependencies = [
"byteorder",
"crunchy",
@@ -11546,7 +11552,7 @@
"fp-rpc",
"frame-benchmarking",
"frame-benchmarking-cli",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-pubsub",
"log",
@@ -11610,7 +11616,7 @@
"fc-rpc",
"fc-rpc-core",
"fp-rpc",
- "futures 0.3.18",
+ "futures 0.3.19",
"jsonrpc-core",
"jsonrpc-pubsub",
"pallet-ethereum",
@@ -11726,7 +11732,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05"
dependencies = [
- "generic-array 0.14.4",
+ "generic-array 0.14.5",
"subtle 2.4.1",
]
@@ -11834,6 +11840,12 @@
]
[[package]]
+name = "valuable"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
+
+[[package]]
name = "value-bag"
version = "1.0.0-alpha.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11857,9 +11869,9 @@
[[package]]
name = "version_check"
-version = "0.9.3"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
[[package]]
name = "void"
@@ -11908,9 +11920,9 @@
[[package]]
name = "wasm-bindgen"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce"
+checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06"
dependencies = [
"cfg-if 1.0.0",
"wasm-bindgen-macro",
@@ -11918,9 +11930,9 @@
[[package]]
name = "wasm-bindgen-backend"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b"
+checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca"
dependencies = [
"bumpalo",
"lazy_static",
@@ -11933,9 +11945,9 @@
[[package]]
name = "wasm-bindgen-futures"
-version = "0.4.28"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39"
+checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395"
dependencies = [
"cfg-if 1.0.0",
"js-sys",
@@ -11945,9 +11957,9 @@
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9"
+checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -11955,9 +11967,9 @@
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab"
+checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc"
dependencies = [
"proc-macro2",
"quote",
@@ -11968,9 +11980,9 @@
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.78"
+version = "0.2.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc"
+checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2"
[[package]]
name = "wasm-gc-api"
@@ -11989,7 +12001,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"js-sys",
"parking_lot 0.11.2",
"pin-utils",
@@ -12075,7 +12087,7 @@
"log",
"rsix",
"serde",
- "sha2 0.9.8",
+ "sha2 0.9.9",
"toml",
"winapi 0.3.9",
"zstd",
@@ -12188,9 +12200,9 @@
[[package]]
name = "web-sys"
-version = "0.3.55"
+version = "0.3.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb"
+checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -12310,9 +12322,9 @@
[[package]]
name = "which"
-version = "4.2.2"
+version = "4.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9"
+checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2"
dependencies = [
"either",
"lazy_static",
@@ -12471,7 +12483,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d9028f208dd5e63c614be69f115c1b53cacc1111437d4c765185856666c107"
dependencies = [
- "futures 0.3.18",
+ "futures 0.3.19",
"log",
"nohash-hasher",
"parking_lot 0.11.2",
@@ -12487,18 +12499,18 @@
[[package]]
name = "zeroize"
-version = "1.4.3"
+version = "1.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d68d9dcec5f9b43a30d38c49f91dfedfaac384cb8f085faca366c26207dd1619"
+checksum = "7c88870063c39ee00ec285a2f8d6a966e5b6fb2becc4e8dac77ed0d370ed6006"
dependencies = [
"zeroize_derive",
]
[[package]]
name = "zeroize_derive"
-version = "1.2.2"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73"
+checksum = "81e8f13fef10b63c06356d65d416b070798ddabcadc10d3ece0c5be9b3c7eddb"
dependencies = [
"proc-macro2",
"quote",
@@ -12508,18 +12520,18 @@
[[package]]
name = "zstd"
-version = "0.9.0+zstd.1.5.0"
+version = "0.9.2+zstd.1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07749a5dc2cb6b36661290245e350f15ec3bbb304e493db54a1d354480522ccd"
+checksum = "2390ea1bf6c038c39674f22d95f0564725fc06034a47129179810b2fc58caa54"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
-version = "4.1.1+zstd.1.5.0"
+version = "4.1.3+zstd.1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c91c90f2c593b003603e5e0493c837088df4469da25aafff8bce42ba48caf079"
+checksum = "e99d81b99fb3c2c2c794e3fe56c305c63d5173a16a46b5850b07c935ffc7db79"
dependencies = [
"libc",
"zstd-sys",
@@ -12527,9 +12539,9 @@
[[package]]
name = "zstd-sys"
-version = "1.6.1+zstd.1.5.0"
+version = "1.6.2+zstd.1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "615120c7a2431d16cf1cf979e7fc31ba7a5b5e5707b29c8a99e5dbf8a8392a33"
+checksum = "2daf2f248d9ea44454bfcb2516534e8b8ad2fc91bf818a1885495fc42bc8ac9f"
dependencies = [
"cc",
"libc",
pallets/scheduler/src/lib.rsdiffbeforeafterboth1// This file is part of Substrate.23// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.4// SPDX-License-Identifier: Apache-2.056// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.1718//! # Scheduler19//! A module for scheduling dispatches.20//!21//! - [`Config`]22//! - [`Call`]23//! - [`Module`]24//!25//! ## Overview26//!27//! This module exposes capabilities for scheduling dispatches to occur at a28//! specified block number or at a specified period. These scheduled dispatches29//! may be named or anonymous and may be canceled.30//!31//! **NOTE:** The scheduled calls will be dispatched with the default filter32//! for the origin: namely `frame_system::Config::BaseCallFilter` for all origin33//! except root which will get no filter. And not the filter contained in origin34//! use to call `fn schedule`.35//!36//! If a call is scheduled using proxy or whatever mecanism which adds filter,37//! then those filter will not be used when dispatching the schedule call.38//!39//! ## Interface40//!41//! ### Dispatchable Functions42//!43//! * `schedule` - schedule a dispatch, which may be periodic, to occur at a44//! specified block and with a specified priority.45//! * `cancel` - cancel a scheduled dispatch, specified by block number and46//! index.47//! * `schedule_named` - augments the `schedule` interface with an additional48//! `Vec<u8>` parameter that can be used for identification.49//! * `cancel_named` - the named complement to the cancel function.5051// Ensure we're `no_std` when compiling for Wasm.52#![cfg_attr(not(feature = "std"), no_std)]53#![allow(clippy::type_complexity, clippy::boxed_local, clippy::unused_unit)]5455mod benchmarking;56pub mod weights;5758use sp_std::{prelude::*, marker::PhantomData, borrow::Borrow};59use codec::{Encode, Decode, Codec};60use sp_runtime::{61 RuntimeDebug,62 traits::{Zero, One, BadOrigin, Saturating},63};64use frame_support::{65 decl_module, decl_storage, decl_event, decl_error,66 dispatch::{Dispatchable, DispatchError, DispatchResult, Parameter},67 traits::{68 Get,69 schedule::{self, DispatchTime},70 OriginTrait, EnsureOrigin, IsType,71 },72 weights::{GetDispatchInfo, Weight},73};74use frame_system::{self as system, ensure_signed};75pub use weights::WeightInfo;76use up_sponsorship::SponsorshipHandler;77use scale_info::TypeInfo;7879pub const MAX_TASK_ID_LENGTH_IN_BYTES: u32 = 16;8081/// Our pallet's configuration trait. All our types and constants go in here. If the82/// pallet is dependent on specific other pallets, then their configuration traits83/// should be added to our implied traits list.84///85/// `system::Config` should always be included in our implied traits.86/// //87pub trait Config: system::Config {88 /// The overarching event type.89 type Event: From<Event<Self>> + Into<<Self as system::Config>::Event>;9091 /// The aggregated origin which the dispatch will take.92 type Origin: OriginTrait<PalletsOrigin = Self::PalletsOrigin>93 + From<Self::PalletsOrigin>94 + IsType<<Self as system::Config>::Origin>;9596 /// The caller origin, overarching type of all pallets origins.97 type PalletsOrigin: From<system::RawOrigin<Self::AccountId>> + Codec + TypeInfo + Clone + Eq;9899 /// The aggregated call type.100 type Call: Parameter101 + Dispatchable<Origin = <Self as Config>::Origin>102 + GetDispatchInfo103 + From<system::Call<Self>>;104105 /// The maximum weight that may be scheduled per block for any dispatchables of less priority106 /// than `schedule::HARD_DEADLINE`.107 type MaximumWeight: Get<Weight>;108109 /// Required origin to schedule or cancel calls.110 type ScheduleOrigin: EnsureOrigin<<Self as system::Config>::Origin>;111112 /// The maximum number of scheduled calls in the queue for a single block.113 /// Not strictly enforced, but used for weight estimation.114 type MaxScheduledPerBlock: Get<u32>;115116 /// Sponsoring function117 type SponsorshipHandler: SponsorshipHandler<Self::AccountId, <Self as Config>::Call>;118119 /// Weight information for extrinsics in this pallet.120 type WeightInfo: WeightInfo;121}122123// pub type SelfWeightInfo<T> = <T as system::Config>::WeightInfo;124125/// Just a simple index for naming period tasks.126pub type PeriodicIndex = u32;127/// The location of a scheduled task that can be used to remove it.128pub type TaskAddress<BlockNumber> = (BlockNumber, u32);129130#[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))]131#[derive(Clone, RuntimeDebug, Encode, Decode)]132struct ScheduledV1<Call, BlockNumber> {133 maybe_id: Option<Vec<u8>>,134 priority: schedule::Priority,135 call: Call,136 maybe_periodic: Option<schedule::Period<BlockNumber>>,137}138139/// Information regarding an item to be executed in the future.140#[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))]141#[derive(Clone, RuntimeDebug, Encode, Decode, TypeInfo)]142pub struct ScheduledV2<Call, BlockNumber, PalletsOrigin, AccountId> {143 /// The unique identity for this task, if there is one.144 maybe_id: Option<Vec<u8>>,145 /// This task's priority.146 priority: schedule::Priority,147 /// The call to be dispatched.148 call: Call,149 /// If the call is periodic, then this points to the information concerning that.150 maybe_periodic: Option<schedule::Period<BlockNumber>>,151 /// The origin to dispatch the call.152 origin: PalletsOrigin,153 _phantom: PhantomData<AccountId>,154}155156/// The current version of Scheduled struct.157pub type Scheduled<Call, BlockNumber, PalletsOrigin, AccountId> =158 ScheduledV2<Call, BlockNumber, PalletsOrigin, AccountId>;159160// A value placed in storage that represents the current version of the Scheduler storage.161// This value is used by the `on_runtime_upgrade` logic to determine whether we run162// storage migration logic.163#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)]164enum Releases {165 V1,166 V2,167}168169impl Default for Releases {170 fn default() -> Self {171 Releases::V1172 }173}174175#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]176pub struct CallSpec {177 module: u32,178 method: u32,179}180181decl_storage! {182 trait Store for Module<T: Config> as Scheduler {183 /// Items to be executed, indexed by the block number that they should be executed on.184 pub Agenda: map hasher(twox_64_concat) T::BlockNumber185 => Vec<Option<Scheduled<<T as Config>::Call, T::BlockNumber, T::PalletsOrigin, T::AccountId>>>;186187 pub SpecAgenda: map hasher(twox_64_concat) T::BlockNumber188 => Vec<Option<CallSpec>>;189190 /// Lookup from identity to the block number and index of the task.191 Lookup: map hasher(twox_64_concat) Vec<u8> => Option<TaskAddress<T::BlockNumber>>;192193 /// Storage version of the pallet.194 ///195 /// New networks start with last version.196 StorageVersion build(|_| Releases::V2): Releases;197 }198}199200decl_event!(201 pub enum Event<T> where <T as system::Config>::BlockNumber {202 /// Scheduled some task. \[when, index\]203 Scheduled(BlockNumber, u32),204 /// Canceled some task. \[when, index\]205 Canceled(BlockNumber, u32),206 /// Dispatched some task. \[task, id, result\]207 Dispatched(TaskAddress<BlockNumber>, Option<Vec<u8>>, DispatchResult),208 }209);210211decl_error! {212 pub enum Error for Module<T: Config> {213 /// Failed to schedule a call214 FailedToSchedule,215 /// Cannot find the scheduled call.216 NotFound,217 /// Given target block number is in the past.218 TargetBlockNumberInPast,219 /// Reschedule failed because it does not change scheduled time.220 RescheduleNoChange,221 }222}223224decl_module! {225 /// Scheduler module declaration.226 pub struct Module<T: Config> for enum Call227 where228 origin: <T as system::Config>::Origin229 {230 type Error = Error<T>;231 fn deposit_event() = default;232233234 /// Anonymously schedule a task.235 ///236 /// # <weight>237 /// - S = Number of already scheduled calls238 /// - Base Weight: 22.29 + .126 * S µs239 /// - DB Weight:240 /// - Read: Agenda241 /// - Write: Agenda242 /// - Will use base weight of 25 which should be good for up to 30 scheduled calls243 /// # </weight>244 #[weight = <T as Config>::WeightInfo::schedule(T::MaxScheduledPerBlock::get())]245 fn schedule(origin,246 when: T::BlockNumber,247 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,248 priority: schedule::Priority,249 call: Box<<T as Config>::Call>,250 )251 {252 let origin = <T as Config>::Origin::from(origin);253 Self::do_schedule(DispatchTime::At(when), maybe_periodic, priority, origin.caller().clone(), *call)?;254 }255256 /// Cancel an anonymously scheduled task.257 ///258 /// # <weight>259 /// - S = Number of already scheduled calls260 /// - Base Weight: 22.15 + 2.869 * S µs261 /// - DB Weight:262 /// - Read: Agenda263 /// - Write: Agenda, Lookup264 /// - Will use base weight of 100 which should be good for up to 30 scheduled calls265 /// # </weight>266 #[weight = <T as Config>::WeightInfo::cancel(T::MaxScheduledPerBlock::get())]267 fn cancel(origin, when: T::BlockNumber, index: u32) {268 T::ScheduleOrigin::ensure_origin(origin.clone())?;269 let origin = <T as Config>::Origin::from(origin);270 Self::do_cancel(Some(origin.caller().clone()), (when, index))?;271 }272273 /// Schedule a named task.274 ///275 /// # <weight>276 /// - S = Number of already scheduled calls277 /// - Base Weight: 29.6 + .159 * S µs278 /// - DB Weight:279 /// - Read: Agenda, Lookup280 /// - Write: Agenda, Lookup281 /// - Will use base weight of 35 which should be good for more than 30 scheduled calls282 /// # </weight>283 #[weight = <T as Config>::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get())]284 fn schedule_named(origin,285 id: Vec<u8>,286 when: T::BlockNumber,287 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,288 priority: schedule::Priority,289 call: Box<<T as Config>::Call>,290 ) {291 T::ScheduleOrigin::ensure_origin(origin.clone())?;292 let origin = <T as Config>::Origin::from(origin);293 Self::do_schedule_named(294 id, DispatchTime::At(when), maybe_periodic, priority, origin.caller().clone(), *call295 )?;296 }297298 /// Cancel a named scheduled task.299 ///300 /// # <weight>301 /// - S = Number of already scheduled calls302 /// - Base Weight: 24.91 + 2.907 * S µs303 /// - DB Weight:304 /// - Read: Agenda, Lookup305 /// - Write: Agenda, Lookup306 /// - Will use base weight of 100 which should be good for up to 30 scheduled calls307 /// # </weight>308 #[weight = <T as Config>::WeightInfo::cancel_named(T::MaxScheduledPerBlock::get())]309 fn cancel_named(origin, id: Vec<u8>) {310 T::ScheduleOrigin::ensure_origin(origin.clone())?;311 let origin = <T as Config>::Origin::from(origin);312 Self::do_cancel_named(Some(origin.caller().clone()), id)?;313 }314315 /// Anonymously schedule a task after a delay.316 ///317 /// # <weight>318 /// Same as [`schedule`].319 /// # </weight>320 #[weight = <T as Config>::WeightInfo::schedule(T::MaxScheduledPerBlock::get())]321 fn schedule_after(origin,322 after: T::BlockNumber,323 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,324 priority: schedule::Priority,325 call: Box<<T as Config>::Call>,326 ) {327 T::ScheduleOrigin::ensure_origin(origin.clone())?;328 let origin = <T as Config>::Origin::from(origin);329 Self::do_schedule(330 DispatchTime::After(after), maybe_periodic, priority, origin.caller().clone(), *call331 )?;332 }333334 /// Schedule a named task after a delay.335 ///336 /// # <weight>337 /// Same as [`schedule_named`].338 /// # </weight>339 #[weight = <T as Config>::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get())]340 fn schedule_named_after(origin,341 id: Vec<u8>,342 after: T::BlockNumber,343 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,344 priority: schedule::Priority,345 call: Box<<T as Config>::Call>,346 ) {347 T::ScheduleOrigin::ensure_origin(origin.clone())?;348 let origin = <T as Config>::Origin::from(origin);349 Self::do_schedule_named(350 id, DispatchTime::After(after), maybe_periodic, priority, origin.caller().clone(), *call351 )?;352 }353354 /// Execute the scheduled calls355 ///356 /// # <weight>357 /// - S = Number of already scheduled calls358 /// - N = Named scheduled calls359 /// - P = Periodic Calls360 /// - Base Weight: 9.243 + 23.45 * S µs361 /// - DB Weight:362 /// - Read: Agenda + Lookup * N + Agenda(Future) * P363 /// - Write: Agenda + Lookup * N + Agenda(future) * P364 /// # </weight>365 fn on_initialize(now: T::BlockNumber) -> Weight {366 let limit = T::MaximumWeight::get();367 let mut queued = Agenda::<T>::take(now).into_iter()368 .enumerate()369 .filter_map(|(index, s)| s.map(|inner| (index as u32, inner)))370 .collect::<Vec<_>>();371 if queued.len() as u32 > T::MaxScheduledPerBlock::get() {372 log::warn!(373 target: "runtime::scheduler",374 "Warning: This block has more items queued in Scheduler than \375 expected from the runtime configuration. An update might be needed."376 );377 }378 queued.sort_by_key(|(_, s)| s.priority);379 let base_weight: Weight = T::DbWeight::get().reads_writes(1, 2); // Agenda + Agenda(next)380 let mut total_weight: Weight = 0;381 queued.into_iter()382 .enumerate()383 .scan(base_weight, |cumulative_weight, (order, (index, s))| {384 *cumulative_weight = cumulative_weight385 .saturating_add(s.call.get_dispatch_info().weight);386387 let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(388 s.origin.clone()389 ).into();390391 if ensure_signed(origin).is_ok() {392 // AccountData for inner call origin accountdata.393 *cumulative_weight = cumulative_weight394 .saturating_add(T::DbWeight::get().reads_writes(1, 1));395 }396397 if s.maybe_id.is_some() {398 // Remove/Modify Lookup399 *cumulative_weight = cumulative_weight.saturating_add(T::DbWeight::get().writes(1));400 }401 if s.maybe_periodic.is_some() {402 // Read/Write Agenda for future block403 *cumulative_weight = cumulative_weight.saturating_add(T::DbWeight::get().reads_writes(1, 1));404 }405406 Some((order, index, *cumulative_weight, s))407 })408 .filter_map(|(order, index, cumulative_weight, mut s)| {409 // We allow a scheduled call if any is true:410 // - It's priority is `HARD_DEADLINE`411 // - It does not push the weight past the limit.412 // - It is the first item in the schedule413 if s.priority <= schedule::HARD_DEADLINE || cumulative_weight <= limit || order == 0 {414415 let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(416 s.origin.clone()417 ).into();418 let sender = ensure_signed(origin).unwrap_or_default();419 let who_will_pay = T::SponsorshipHandler::get_sponsor(&sender, &s.call).unwrap_or(sender);420 let sponsor = T::PalletsOrigin::from(system::RawOrigin::Signed(who_will_pay));421 let r = s.call.clone().dispatch(sponsor.into());422 let maybe_id = s.maybe_id.clone();423 if let Some((period, count)) = s.maybe_periodic {424 if count > 1 {425 s.maybe_periodic = Some((period, count - 1));426 } else {427 s.maybe_periodic = None;428 }429 let next = now + period;430 // If scheduled is named, place it's information in `Lookup`431 if let Some(ref id) = s.maybe_id {432 let next_index = Agenda::<T>::decode_len(now + period).unwrap_or(0);433 Lookup::<T>::insert(id, (next, next_index as u32));434 }435 Agenda::<T>::append(next, Some(s));436 } else if let Some(ref id) = s.maybe_id {437 Lookup::<T>::remove(id);438 }439 Self::deposit_event(RawEvent::Dispatched(440 (now, index),441 maybe_id,442 r.map(|_| ()).map_err(|e| e.error)443 ));444 total_weight = cumulative_weight;445 None446 } else {447 Some(Some(s))448 }449 })450 .for_each(|unused| {451 let next = now + One::one();452 Agenda::<T>::append(next, unused);453 });454455 total_weight456 }457 }458}459460impl<T: Config> Module<T> {461 fn resolve_time(when: DispatchTime<T::BlockNumber>) -> Result<T::BlockNumber, DispatchError> {462 let now = frame_system::Pallet::<T>::block_number();463464 let when = match when {465 DispatchTime::At(x) => x,466 // The current block has already completed it's scheduled tasks, so467 // Schedule the task at lest one block after this current block.468 DispatchTime::After(x) => now.saturating_add(x).saturating_add(One::one()),469 };470471 if when <= now {472 return Err(Error::<T>::TargetBlockNumberInPast.into());473 }474475 Ok(when)476 }477478 fn do_schedule(479 when: DispatchTime<T::BlockNumber>,480 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,481 priority: schedule::Priority,482 origin: T::PalletsOrigin,483 call: <T as Config>::Call,484 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {485 let when = Self::resolve_time(when)?;486487 // sanitize maybe_periodic488 let maybe_periodic = maybe_periodic489 .filter(|p| p.1 > 1 && !p.0.is_zero())490 // Remove one from the number of repetitions since we will schedule one now.491 .map(|(p, c)| (p, c - 1));492 let s = Some(Scheduled {493 maybe_id: None,494 priority,495 call,496 maybe_periodic,497 origin,498 _phantom: PhantomData::<T::AccountId>::default(),499 });500 Agenda::<T>::append(when, s);501 let index = Agenda::<T>::decode_len(when).unwrap_or(1) as u32 - 1;502 if index > T::MaxScheduledPerBlock::get() {503 log::warn!(504 target: "runtime::scheduler",505 "Warning: There are more items queued in the Scheduler than \506 expected from the runtime configuration. An update might be needed.",507 );508 }509 Self::deposit_event(RawEvent::Scheduled(when, index));510511 Ok((when, index))512 }513514 fn do_cancel(515 origin: Option<T::PalletsOrigin>,516 (when, index): TaskAddress<T::BlockNumber>,517 ) -> Result<(), DispatchError> {518 let scheduled = Agenda::<T>::try_mutate(when, |agenda| {519 agenda.get_mut(index as usize).map_or(520 Ok(None),521 |s| -> Result<Option<Scheduled<_, _, _, _>>, DispatchError> {522 if let (Some(ref o), Some(ref s)) = (origin, s.borrow()) {523 if *o != s.origin {524 return Err(BadOrigin.into());525 }526 };527 Ok(s.take())528 },529 )530 })?;531 if let Some(s) = scheduled {532 if let Some(id) = s.maybe_id {533 Lookup::<T>::remove(id);534 }535 Self::deposit_event(RawEvent::Canceled(when, index));536 Ok(())537 } else {538 Err(Error::<T>::NotFound.into())539 }540 }541542 fn do_reschedule(543 (when, index): TaskAddress<T::BlockNumber>,544 new_time: DispatchTime<T::BlockNumber>,545 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {546 let new_time = Self::resolve_time(new_time)?;547548 if new_time == when {549 return Err(Error::<T>::RescheduleNoChange.into());550 }551552 Agenda::<T>::try_mutate(when, |agenda| -> DispatchResult {553 let task = agenda.get_mut(index as usize).ok_or(Error::<T>::NotFound)?;554 let task = task.take().ok_or(Error::<T>::NotFound)?;555 Agenda::<T>::append(new_time, Some(task));556 Ok(())557 })?;558559 let new_index = Agenda::<T>::decode_len(new_time).unwrap_or(1) as u32 - 1;560 Self::deposit_event(RawEvent::Canceled(when, index));561 Self::deposit_event(RawEvent::Scheduled(new_time, new_index));562563 Ok((new_time, new_index))564 }565566 fn do_schedule_named(567 id: Vec<u8>,568 when: DispatchTime<T::BlockNumber>,569 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,570 priority: schedule::Priority,571 origin: T::PalletsOrigin,572 call: <T as Config>::Call,573 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {574 // ensure id length does not exceed expectations & is unique575 if id.len() > MAX_TASK_ID_LENGTH_IN_BYTES.try_into().unwrap()576 || Lookup::<T>::contains_key(&id)577 {578 return Err(Error::<T>::FailedToSchedule.into());579 }580581 let when = Self::resolve_time(when)?;582583 // sanitize maybe_periodic584 let maybe_periodic = maybe_periodic585 .filter(|p| p.1 > 1 && !p.0.is_zero())586 // Remove one from the number of repetitions since we will schedule one now.587 .map(|(p, c)| (p, c - 1));588589 let s = Scheduled {590 maybe_id: Some(id.clone()),591 priority,592 call,593 maybe_periodic,594 origin,595 _phantom: Default::default(),596 };597 Agenda::<T>::append(when, Some(s));598 let index = Agenda::<T>::decode_len(when).unwrap_or(1) as u32 - 1;599 if index > T::MaxScheduledPerBlock::get() {600 log::warn!(601 target: "runtime::scheduler",602 "Warning: There are more items queued in the Scheduler than \603 expected from the runtime configuration. An update might be needed.",604 );605 }606 let address = (when, index);607 Lookup::<T>::insert(&id, &address);608 Self::deposit_event(RawEvent::Scheduled(when, index));609610 Ok(address)611 }612613 fn do_cancel_named(origin: Option<T::PalletsOrigin>, id: Vec<u8>) -> DispatchResult {614 Lookup::<T>::try_mutate_exists(id, |lookup| -> DispatchResult {615 if let Some((when, index)) = lookup.take() {616 let i = index as usize;617 Agenda::<T>::try_mutate(when, |agenda| -> DispatchResult {618 if let Some(s) = agenda.get_mut(i) {619 if let (Some(ref o), Some(ref s)) = (origin, s.borrow()) {620 if *o != s.origin {621 return Err(BadOrigin.into());622 }623 }624 *s = None;625 }626 Ok(())627 })?;628 Self::deposit_event(RawEvent::Canceled(when, index));629 Ok(())630 } else {631 Err(Error::<T>::NotFound.into())632 }633 })634 }635636 fn do_reschedule_named(637 id: Vec<u8>,638 new_time: DispatchTime<T::BlockNumber>,639 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {640 let new_time = Self::resolve_time(new_time)?;641642 Lookup::<T>::try_mutate_exists(643 id,644 |lookup| -> Result<TaskAddress<T::BlockNumber>, DispatchError> {645 let (when, index) = lookup.ok_or(Error::<T>::NotFound)?;646647 if new_time == when {648 return Err(Error::<T>::RescheduleNoChange.into());649 }650651 Agenda::<T>::try_mutate(when, |agenda| -> DispatchResult {652 let task = agenda.get_mut(index as usize).ok_or(Error::<T>::NotFound)?;653 let task = task.take().ok_or(Error::<T>::NotFound)?;654 Agenda::<T>::append(new_time, Some(task));655656 Ok(())657 })?;658659 let new_index = Agenda::<T>::decode_len(new_time).unwrap_or(1) as u32 - 1;660 Self::deposit_event(RawEvent::Canceled(when, index));661 Self::deposit_event(RawEvent::Scheduled(new_time, new_index));662663 *lookup = Some((new_time, new_index));664665 Ok((new_time, new_index))666 },667 )668 }669}670671impl<T: Config> schedule::Anon<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>672 for Module<T>673{674 type Address = TaskAddress<T::BlockNumber>;675676 fn schedule(677 when: DispatchTime<T::BlockNumber>,678 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,679 priority: schedule::Priority,680 origin: T::PalletsOrigin,681 call: <T as Config>::Call,682 ) -> Result<Self::Address, DispatchError> {683 Self::do_schedule(when, maybe_periodic, priority, origin, call)684 }685686 fn cancel((when, index): Self::Address) -> Result<(), ()> {687 Self::do_cancel(None, (when, index)).map_err(|_| ())688 }689690 fn reschedule(691 address: Self::Address,692 when: DispatchTime<T::BlockNumber>,693 ) -> Result<Self::Address, DispatchError> {694 Self::do_reschedule(address, when)695 }696697 fn next_dispatch_time((when, index): Self::Address) -> Result<T::BlockNumber, ()> {698 Agenda::<T>::get(when)699 .get(index as usize)700 .ok_or(())701 .map(|_| when)702 }703}704705impl<T: Config> schedule::Named<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>706 for Module<T>707{708 type Address = TaskAddress<T::BlockNumber>;709710 fn schedule_named(711 id: Vec<u8>,712 when: DispatchTime<T::BlockNumber>,713 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,714 priority: schedule::Priority,715 origin: T::PalletsOrigin,716 call: <T as Config>::Call,717 ) -> Result<Self::Address, ()> {718 Self::do_schedule_named(id, when, maybe_periodic, priority, origin, call).map_err(|_| ())719 }720721 fn cancel_named(id: Vec<u8>) -> Result<(), ()> {722 Self::do_cancel_named(None, id).map_err(|_| ())723 }724725 fn reschedule_named(726 id: Vec<u8>,727 when: DispatchTime<T::BlockNumber>,728 ) -> Result<Self::Address, DispatchError> {729 Self::do_reschedule_named(id, when)730 }731732 fn next_dispatch_time(id: Vec<u8>) -> Result<T::BlockNumber, ()> {733 Lookup::<T>::get(id)734 .and_then(|(when, index)| Agenda::<T>::get(when).get(index as usize).map(|_| when))735 .ok_or(())736 }737}738739#[cfg(test)]740#[allow(clippy::from_over_into)]741mod tests {742 use super::*;743744 use frame_support::{745 ord_parameter_types, parameter_types, traits::Contains, weights::constants::RocksDbWeight,746 };747 use sp_core::H256;748 use sp_runtime::{749 Perbill,750 testing::Header,751 traits::{BlakeTwo256, IdentityLookup},752 };753 use frame_system::{EnsureOneOf, EnsureRoot, EnsureSignedBy};754 use crate as scheduler;755756 mod logger {757 use super::*;758 use std::cell::RefCell;759760 thread_local! {761 static LOG: RefCell<Vec<(OriginCaller, u32)>> = RefCell::new(Vec::new());762 }763 pub trait Config: system::Config {764 type Event: From<Event> + Into<<Self as system::Config>::Event>;765 }766 decl_event! {767 pub enum Event {768 Logged(u32, Weight),769 }770 }771 decl_module! {772 pub struct Module<T: Config> for enum Call773 where774 origin: <T as system::Config>::Origin,775 <T as system::Config>::Origin: OriginTrait<PalletsOrigin = OriginCaller>776 {777 fn deposit_event() = default;778779 #[weight = *weight]780 fn log(origin, i: u32, weight: Weight) {781 Self::deposit_event(Event::Logged(i, weight));782 LOG.with(|log| {783 log.borrow_mut().push((origin.caller().clone(), i));784 })785 }786787 #[weight = *weight]788 fn log_without_filter(origin, i: u32, weight: Weight) {789 Self::deposit_event(Event::Logged(i, weight));790 LOG.with(|log| {791 log.borrow_mut().push((origin.caller().clone(), i));792 })793 }794 }795 }796 }797798 type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;799 // todo check current cumulus implementation, add changes accordingly, do something with signedExtra and (un)checked extrinsic (integral to Scheduler?)800 // todo to include pallet in runtime, not only uncomment but also (implement?) trait801 type Block = frame_system::mocking::MockBlock<Test>;802803 frame_support::construct_runtime!(804 pub enum Test where805 Block = Block,806 NodeBlock = Block,807 UncheckedExtrinsic = UncheckedExtrinsic,808 {809 System: frame_system::{Pallet, Call, Config, Storage, Event<T>},810 Logger: logger::{Pallet, Call, Event},811 Scheduler: scheduler::{Pallet, Call, Storage, Event<T>},812 }813 );814815 // Scheduler must dispatch with root and no filter, this tests base filter is indeed not used.816 pub struct BaseFilter;817 impl Contains<Call> for BaseFilter {818 fn contains(call: &Call) -> bool {819 !matches!(call, Call::Logger(logger::Call::log { .. }))820 }821 }822823 parameter_types! {824 pub const BlockHashCount: u64 = 250;825 pub BlockWeights: frame_system::limits::BlockWeights =826 frame_system::limits::BlockWeights::simple_max(2_000_000_000_000);827 }828 impl system::Config for Test {829 type BaseCallFilter = BaseFilter;830 type BlockWeights = ();831 type BlockLength = ();832 type DbWeight = RocksDbWeight;833 type Origin = Origin;834 type Call = Call;835 type Index = u64;836 type BlockNumber = u64;837 type Hash = H256;838 type Hashing = BlakeTwo256;839 type AccountId = u64;840 type Lookup = IdentityLookup<Self::AccountId>;841 type Header = Header;842 type Event = Event;843 type BlockHashCount = BlockHashCount;844 type Version = ();845 type PalletInfo = PalletInfo;846 type AccountData = ();847 type OnNewAccount = ();848 type OnKilledAccount = ();849 type SystemWeightInfo = ();850 type SS58Prefix = ();851 type OnSetCode = ();852 }853 impl logger::Config for Test {854 type Event = Event;855 }856 parameter_types! {857 pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * BlockWeights::get().max_block;858 pub const MaxScheduledPerBlock: u32 = 10;859 }860 ord_parameter_types! {861 pub const One: u64 = 1;862 }863864 impl Config for Test {865 type Event = Event;866 type Origin = Origin;867 type PalletsOrigin = OriginCaller;868 type Call = Call;869 type MaximumWeight = MaximumSchedulerWeight;870 type ScheduleOrigin = EnsureOneOf<u64, EnsureRoot<u64>, EnsureSignedBy<One, u64>>;871 type MaxScheduledPerBlock = MaxScheduledPerBlock;872 type WeightInfo = ();873 type SponsorshipHandler = ();874 }875}1// This file is part of Substrate.23// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.4// SPDX-License-Identifier: Apache-2.056// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.1718//! # Scheduler19//! A module for scheduling dispatches.20//!21//! - [`Config`]22//! - [`Call`]23//! - [`Module`]24//!25//! ## Overview26//!27//! This module exposes capabilities for scheduling dispatches to occur at a28//! specified block number or at a specified period. These scheduled dispatches29//! may be named or anonymous and may be canceled.30//!31//! **NOTE:** The scheduled calls will be dispatched with the default filter32//! for the origin: namely `frame_system::Config::BaseCallFilter` for all origin33//! except root which will get no filter. And not the filter contained in origin34//! use to call `fn schedule`.35//!36//! If a call is scheduled using proxy or whatever mecanism which adds filter,37//! then those filter will not be used when dispatching the schedule call.38//!39//! ## Interface40//!41//! ### Dispatchable Functions42//!43//! * `schedule` - schedule a dispatch, which may be periodic, to occur at a44//! specified block and with a specified priority.45//! * `cancel` - cancel a scheduled dispatch, specified by block number and46//! index.47//! * `schedule_named` - augments the `schedule` interface with an additional48//! `Vec<u8>` parameter that can be used for identification.49//! * `cancel_named` - the named complement to the cancel function.5051// Ensure we're `no_std` when compiling for Wasm.52#![cfg_attr(not(feature = "std"), no_std)]53#![allow(clippy::type_complexity, clippy::boxed_local, clippy::unused_unit)]5455mod benchmarking;56pub mod weights;5758use sp_std::{prelude::*, marker::PhantomData, borrow::Borrow};59use codec::{Encode, Decode, Codec};60use sp_runtime::{61 RuntimeDebug,62 traits::{Zero, One, BadOrigin, Saturating, SignedExtension},63};64use frame_support::{65 decl_module, decl_storage, decl_event, decl_error,66 dispatch::{Dispatchable, DispatchError, DispatchResult, Parameter},67 traits::{68 Get,69 schedule::{self, DispatchTime},70 OriginTrait, EnsureOrigin, IsType,71 },72 weights::{GetDispatchInfo, Weight},73};74use frame_system::{self as system, ensure_signed};75pub use weights::WeightInfo;76use up_sponsorship::SponsorshipHandler;77use scale_info::TypeInfo;7879/// Our pallet's configuration trait. All our types and constants go in here. If the80/// pallet is dependent on specific other pallets, then their configuration traits81/// should be added to our implied traits list.82///83/// `system::Config` should always be included in our implied traits.84/// //85pub trait Config: system::Config {86 /// The overarching event type.87 type Event: From<Event<Self>> + Into<<Self as system::Config>::Event>;8889 /// The aggregated origin which the dispatch will take.90 type Origin: OriginTrait<PalletsOrigin = Self::PalletsOrigin>91 + From<Self::PalletsOrigin>92 + IsType<<Self as system::Config>::Origin>;9394 /// The caller origin, overarching type of all pallets origins.95 type PalletsOrigin: From<system::RawOrigin<Self::AccountId>> + Codec + TypeInfo + Clone + Eq;9697 /// The aggregated call type.98 type Call: Parameter99 + Dispatchable<Origin = <Self as Config>::Origin>100 + GetDispatchInfo101 + From<system::Call<Self>>;102103 /// The maximum weight that may be scheduled per block for any dispatchables of less priority104 /// than `schedule::HARD_DEADLINE`.105 type MaximumWeight: Get<Weight>;106107 /// Required origin to schedule or cancel calls.108 type ScheduleOrigin: EnsureOrigin<<Self as system::Config>::Origin>;109110 /// The maximum number of scheduled calls in the queue for a single block.111 /// Not strictly enforced, but used for weight estimation.112 type MaxScheduledPerBlock: Get<u32>;113114 /// Sponsoring function115 type SponsorshipHandler: SponsorshipHandler<Self::AccountId, <Self as Config>::Call>;116117 /// Weight information for extrinsics in this pallet.118 type WeightInfo: WeightInfo;119120 /// Unchecked extrinsic type as expected by the runtime that uses this pallet.121 type PaymentHandler: SignedExtension;122}123124pub const MAX_TASK_ID_LENGTH_IN_BYTES: u8 = 16;125126pub const PERIODIC_CALLS_LIMIT: u32 = 100;127128// pub type SelfWeightInfo<T> = <T as system::Config>::WeightInfo;129130/// Just a simple index for naming period tasks.131pub type PeriodicIndex = u32;132/// The location of a scheduled task that can be used to remove it.133pub type TaskAddress<BlockNumber> = (BlockNumber, u32);134135#[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))]136#[derive(Clone, RuntimeDebug, Encode, Decode)]137struct ScheduledV1<Call, BlockNumber> {138 maybe_id: Option<Vec<u8>>,139 priority: schedule::Priority,140 call: Call,141 maybe_periodic: Option<schedule::Period<BlockNumber>>,142}143144/// Information regarding an item to be executed in the future.145#[cfg_attr(any(feature = "std", test), derive(PartialEq, Eq))]146#[derive(Clone, RuntimeDebug, Encode, Decode, TypeInfo)]147pub struct ScheduledV2<Call, BlockNumber, PalletsOrigin, AccountId> {148 /// The unique identity for this task, if there is one.149 maybe_id: Option<Vec<u8>>,150 /// This task's priority.151 priority: schedule::Priority,152 /// The call to be dispatched.153 call: Call,154 /// If the call is periodic, then this points to the information concerning that.155 maybe_periodic: Option<schedule::Period<BlockNumber>>,156 /// The origin to dispatch the call.157 origin: PalletsOrigin,158 _phantom: PhantomData<AccountId>,159}160161/// The current version of Scheduled struct.162pub type Scheduled<Call, BlockNumber, PalletsOrigin, AccountId> =163 ScheduledV2<Call, BlockNumber, PalletsOrigin, AccountId>;164165// A value placed in storage that represents the current version of the Scheduler storage.166// This value is used by the `on_runtime_upgrade` logic to determine whether we run167// storage migration logic.168#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo)]169enum Releases {170 V1,171 V2,172}173174impl Default for Releases {175 fn default() -> Self {176 Releases::V1177 }178}179180#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)]181pub struct CallSpec {182 module: u32,183 method: u32,184}185186decl_storage! {187 trait Store for Module<T: Config> as Scheduler {188 /// Items to be executed, indexed by the block number that they should be executed on.189 pub Agenda: map hasher(twox_64_concat) T::BlockNumber190 => Vec<Option<Scheduled<<T as Config>::Call, T::BlockNumber, T::PalletsOrigin, T::AccountId>>>;191192 pub SpecAgenda: map hasher(twox_64_concat) T::BlockNumber193 => Vec<Option<CallSpec>>;194195 /// Lookup from identity to the block number and index of the task.196 Lookup: map hasher(twox_64_concat) Vec<u8> => Option<TaskAddress<T::BlockNumber>>;197198 /// Storage version of the pallet.199 ///200 /// New networks start with last version.201 StorageVersion build(|_| Releases::V2): Releases;202 }203}204205decl_event!(206 pub enum Event<T> where <T as system::Config>::BlockNumber {207 /// Scheduled some task. \[when, index\]208 Scheduled(BlockNumber, u32),209 /// Canceled some task. \[when, index\]210 Canceled(BlockNumber, u32),211 /// Dispatched some task. \[task, id, result\]212 Dispatched(TaskAddress<BlockNumber>, Option<Vec<u8>>, DispatchResult),213 }214);215216decl_error! {217 pub enum Error for Module<T: Config> {218 /// Failed to schedule a call219 FailedToSchedule,220 /// Cannot find the scheduled call.221 NotFound,222 /// Given target block number is in the past.223 TargetBlockNumberInPast,224 /// Reschedule failed because it does not change scheduled time.225 RescheduleNoChange,226 }227}228229decl_module! {230 /// Scheduler module declaration.231 pub struct Module<T: Config> for enum Call232 where233 origin: <T as system::Config>::Origin234 {235 type Error = Error<T>;236 fn deposit_event() = default;237238239 /// Anonymously schedule a task.240 ///241 /// # <weight>242 /// - S = Number of already scheduled calls243 /// - Base Weight: 22.29 + .126 * S µs244 /// - DB Weight:245 /// - Read: Agenda246 /// - Write: Agenda247 /// - Will use base weight of 25 which should be good for up to 30 scheduled calls248 /// # </weight>249 #[weight = <T as Config>::WeightInfo::schedule(T::MaxScheduledPerBlock::get())]250 fn schedule(origin,251 when: T::BlockNumber,252 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,253 priority: schedule::Priority,254 call: Box<<T as Config>::Call>,255 )256 {257 let origin = <T as Config>::Origin::from(origin);258 Self::do_schedule_nameless(DispatchTime::At(when), maybe_periodic, priority, origin.caller().clone(), *call)?;259 }260261 /// Cancel an anonymously scheduled task.262 ///263 /// # <weight>264 /// - S = Number of already scheduled calls265 /// - Base Weight: 22.15 + 2.869 * S µs266 /// - DB Weight:267 /// - Read: Agenda268 /// - Write: Agenda, Lookup269 /// - Will use base weight of 100 which should be good for up to 30 scheduled calls270 /// # </weight>271 #[weight = <T as Config>::WeightInfo::cancel(T::MaxScheduledPerBlock::get())]272 fn cancel(origin, when: T::BlockNumber, index: u32) {273 T::ScheduleOrigin::ensure_origin(origin.clone())?;274 let origin = <T as Config>::Origin::from(origin);275 Self::do_cancel(Some(origin.caller().clone()), (when, index))?;276 }277278 /// Schedule a named task.279 ///280 /// # <weight>281 /// - S = Number of already scheduled calls282 /// - Base Weight: 29.6 + .159 * S µs283 /// - DB Weight:284 /// - Read: Agenda, Lookup285 /// - Write: Agenda, Lookup286 /// - Will use base weight of 35 which should be good for more than 30 scheduled calls287 /// # </weight>288 #[weight = <T as Config>::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get())]289 fn schedule_named(origin,290 id: Vec<u8>,291 when: T::BlockNumber,292 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,293 priority: schedule::Priority,294 call: Box<<T as Config>::Call>,295 ) {296 T::ScheduleOrigin::ensure_origin(origin.clone())?;297 let origin = <T as Config>::Origin::from(origin);298 Self::do_schedule_named(299 id, DispatchTime::At(when), maybe_periodic, priority, origin.caller().clone(), *call300 )?;301 }302303 /// Cancel a named scheduled task.304 ///305 /// # <weight>306 /// - S = Number of already scheduled calls307 /// - Base Weight: 24.91 + 2.907 * S µs308 /// - DB Weight:309 /// - Read: Agenda, Lookup310 /// - Write: Agenda, Lookup311 /// - Will use base weight of 100 which should be good for up to 30 scheduled calls312 /// # </weight>313 #[weight = <T as Config>::WeightInfo::cancel_named(T::MaxScheduledPerBlock::get())]314 fn cancel_named(origin, id: Vec<u8>) {315 T::ScheduleOrigin::ensure_origin(origin.clone())?;316 let origin = <T as Config>::Origin::from(origin);317 Self::do_cancel_named(Some(origin.caller().clone()), id)?;318 }319320 /// Anonymously schedule a task after a delay.321 ///322 /// # <weight>323 /// Same as [`schedule`].324 /// # </weight>325 #[weight = <T as Config>::WeightInfo::schedule(T::MaxScheduledPerBlock::get())]326 fn schedule_after(origin,327 after: T::BlockNumber,328 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,329 priority: schedule::Priority,330 call: Box<<T as Config>::Call>,331 ) {332 T::ScheduleOrigin::ensure_origin(origin.clone())?;333 let origin = <T as Config>::Origin::from(origin);334 Self::do_schedule_nameless(335 DispatchTime::After(after), maybe_periodic, priority, origin.caller().clone(), *call336 )?;337 }338339 /// Schedule a named task after a delay.340 ///341 /// # <weight>342 /// Same as [`schedule_named`].343 /// # </weight>344 #[weight = <T as Config>::WeightInfo::schedule_named(T::MaxScheduledPerBlock::get())]345 fn schedule_named_after(origin,346 id: Vec<u8>,347 after: T::BlockNumber,348 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,349 priority: schedule::Priority,350 call: Box<<T as Config>::Call>,351 ) {352 T::ScheduleOrigin::ensure_origin(origin.clone())?;353 let origin = <T as Config>::Origin::from(origin);354 Self::do_schedule_named(355 id, DispatchTime::After(after), maybe_periodic, priority, origin.caller().clone(), *call356 )?;357 }358359 /// Execute the scheduled calls360 ///361 /// # <weight>362 /// - S = Number of already scheduled calls363 /// - N = Named scheduled calls364 /// - P = Periodic Calls365 /// - Base Weight: 9.243 + 23.45 * S µs366 /// - DB Weight:367 /// - Read: Agenda + Lookup * N + Agenda(Future) * P368 /// - Write: Agenda + Lookup * N + Agenda(future) * P369 /// # </weight>370 fn on_initialize(now: T::BlockNumber) -> Weight {371 let limit = T::MaximumWeight::get();372 let mut queued = Agenda::<T>::take(now)373 .into_iter()374 .enumerate()375 .filter_map(|(index, s)| s.map(|inner| (index as u32, inner)))376 .collect::<Vec<_>>();377 if queued.len() as u32 > T::MaxScheduledPerBlock::get() {378 log::warn!(379 target: "runtime::scheduler",380 "Warning: This block has more items queued in Scheduler than \381 expected from the runtime configuration. An update might be needed."382 );383 }384 queued.sort_by_key(|(_, s)| s.priority);385 let base_weight: Weight = T::DbWeight::get().reads_writes(1, 2); // Agenda + Agenda(next)386 let mut total_weight: Weight = 0; // T::WeightInfo::on_initialize(0)387 queued.into_iter()388 .enumerate()389 .scan(base_weight, |cumulative_weight, (order, (index, s))| {390 *cumulative_weight = cumulative_weight391 .saturating_add(s.call.get_dispatch_info().weight);392393 let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(394 s.origin.clone()395 ).into();396397 if ensure_signed(origin).is_ok() {398 // AccountData for inner call origin accountdata.399 *cumulative_weight = cumulative_weight400 .saturating_add(T::DbWeight::get().reads_writes(1, 1));401 }402403 if s.maybe_id.is_some() {404 // Remove/Modify Lookup405 *cumulative_weight = cumulative_weight.saturating_add(T::DbWeight::get().writes(1));406 }407 if s.maybe_periodic.is_some() {408 // Read/Write Agenda for future block409 *cumulative_weight = cumulative_weight.saturating_add(T::DbWeight::get().reads_writes(1, 1));410 }411412 Some((order, index, *cumulative_weight, s))413 })414 .filter_map(|(order, index, cumulative_weight, mut s)| {415 // We allow a scheduled call if any is true:416 // - It's priority is `HARD_DEADLINE`417 // - It does not push the weight past the limit.418 // - It is the first item in the schedule419 if s.priority <= schedule::HARD_DEADLINE || cumulative_weight <= limit || order == 0 {420421 // let origin = <<T as Config>::Origin as From<T::PalletsOrigin>>::from(422 // s.origin.clone()423 // ).into();424 // let sender = ensure_signed(origin).unwrap_or_default();425 // let who_will_pay = T::SponsorshipHandler::get_sponsor(&sender, &s.call).unwrap_or(sender);426 // let sponsor = T::PalletsOrigin::from(system::RawOrigin::Signed(who_will_pay));427 // let r = s.call.clone().dispatch(sponsor.into());428 let maybe_id = s.maybe_id.clone();429 if let Some((period, count)) = s.maybe_periodic {430 if count > 1 {431 s.maybe_periodic = Some((period, count - 1));432 } else {433 s.maybe_periodic = None;434 }435 let next = now + period;436 // If scheduled is named, place it's information in `Lookup`437 if let Some(ref id) = s.maybe_id {438 let next_index = Agenda::<T>::decode_len(now + period).unwrap_or(0);439 Lookup::<T>::insert(id, (next, next_index as u32));440 }441 Agenda::<T>::append(next, Some(s));442 } else if let Some(ref id) = s.maybe_id {443 Lookup::<T>::remove(id);444 }445 Self::deposit_event(RawEvent::Dispatched(446 (now, index),447 maybe_id,448 Ok(())// r.map(|_| ()).map_err(|e| e.error)449 ));450 total_weight = cumulative_weight;451 None452 } else {453 Some(Some(s))454 }455 })456 .for_each(|unused| {457 let next = now + One::one();458 Agenda::<T>::append(next, unused);459 });460461 total_weight462 }463 }464}465466impl<T: Config> Module<T> {467 fn resolve_time(when: DispatchTime<T::BlockNumber>) -> Result<T::BlockNumber, DispatchError> {468 let now = frame_system::Pallet::<T>::block_number();469470 let when = match when {471 DispatchTime::At(x) => x,472 // The current block has already completed it's scheduled tasks, so473 // Schedule the task at lest one block after this current block.474 DispatchTime::After(x) => now.saturating_add(x).saturating_add(One::one()),475 };476477 if when <= now {478 return Err(Error::<T>::TargetBlockNumberInPast.into());479 }480481 Ok(when)482 }483484 fn do_schedule(485 maybe_id: Option<Vec<u8>>,486 when: DispatchTime<T::BlockNumber>,487 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,488 priority: schedule::Priority,489 origin: T::PalletsOrigin,490 call: <T as Config>::Call,491 ) -> Result<(T::BlockNumber, u32), DispatchError> {492 let when = Self::resolve_time(when)?;493494 let sender = ensure_signed(495 <<T as Config>::Origin as From<T::PalletsOrigin>>::from(origin.clone()).into()496 ).unwrap_or_default();497 let who_will_pay = T::SponsorshipHandler::get_sponsor(&sender, &call).unwrap_or(sender);498 let sponsor = T::PalletsOrigin::from(system::RawOrigin::Signed(who_will_pay));499 let r = call.clone().dispatch(sponsor.into());500501 //T::PaymentHandler::validate(sponsor.into(), call.clone(), ); todo dispatch call502503 // sanitize maybe_periodic504 let maybe_periodic = maybe_periodic505 .filter(|p| p.1 > 1 && !p.0.is_zero())506 // Limit the repetitions to 100 calls and remove one from the number of repetitions since we will schedule one now.507 .map(|(p, c)| (p, std::cmp::min(c, PERIODIC_CALLS_LIMIT) - 1));508 509 let s = Some(Scheduled {510 maybe_id,511 priority,512 call,513 maybe_periodic,514 origin,515 _phantom: PhantomData::<T::AccountId>::default(),516 });517 Agenda::<T>::append(when, s);518 let index = Agenda::<T>::decode_len(when).unwrap_or(1) as u32 - 1;519 if index > T::MaxScheduledPerBlock::get() {520 log::warn!(521 target: "runtime::scheduler",522 "Warning: There are more items queued in the Scheduler than \523 expected from the runtime configuration. An update might be needed.",524 );525 }526527 Ok((when, index))528 }529530 fn do_schedule_nameless(531 when: DispatchTime<T::BlockNumber>,532 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,533 priority: schedule::Priority,534 origin: T::PalletsOrigin,535 call: <T as Config>::Call,536 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {537 let address = Self::do_schedule(None, when, maybe_periodic, priority, origin, call)?;538 let (when, index) = address;539540 Self::deposit_event(RawEvent::Scheduled(when, index));541542 Ok(address)543 }544545 fn do_cancel(546 origin: Option<T::PalletsOrigin>,547 (when, index): TaskAddress<T::BlockNumber>,548 ) -> Result<(), DispatchError> {549 let scheduled = Agenda::<T>::try_mutate(when, |agenda| {550 agenda.get_mut(index as usize).map_or(551 Ok(None),552 |s| -> Result<Option<Scheduled<_, _, _, _>>, DispatchError> {553 if let (Some(ref o), Some(ref s)) = (origin, s.borrow()) {554 if *o != s.origin {555 return Err(BadOrigin.into());556 }557 };558 Ok(s.take())559 },560 )561 })?;562 if let Some(s) = scheduled {563 if let Some(id) = s.maybe_id {564 Lookup::<T>::remove(id);565 }566 Self::deposit_event(RawEvent::Canceled(when, index));567 Ok(())568 } else {569 Err(Error::<T>::NotFound.into())570 }571 }572573 fn do_reschedule(574 (when, index): TaskAddress<T::BlockNumber>,575 new_time: DispatchTime<T::BlockNumber>,576 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {577 let new_time = Self::resolve_time(new_time)?;578579 if new_time == when {580 return Err(Error::<T>::RescheduleNoChange.into());581 }582583 Agenda::<T>::try_mutate(when, |agenda| -> DispatchResult {584 let task = agenda.get_mut(index as usize).ok_or(Error::<T>::NotFound)?;585 let task = task.take().ok_or(Error::<T>::NotFound)?;586 Agenda::<T>::append(new_time, Some(task));587 Ok(())588 })?;589590 let new_index = Agenda::<T>::decode_len(new_time).unwrap_or(1) as u32 - 1;591 Self::deposit_event(RawEvent::Canceled(when, index));592 Self::deposit_event(RawEvent::Scheduled(new_time, new_index));593594 Ok((new_time, new_index))595 }596597 fn do_schedule_named(598 id: Vec<u8>,599 when: DispatchTime<T::BlockNumber>,600 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,601 priority: schedule::Priority,602 origin: T::PalletsOrigin,603 call: <T as Config>::Call,604 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {605 // ensure id length does not exceed expectations & is unique606 if id.len() > MAX_TASK_ID_LENGTH_IN_BYTES.try_into().unwrap()607 || Lookup::<T>::contains_key(&id)608 {609 return Err(Error::<T>::FailedToSchedule.into());610 }611612 let address = Self::do_schedule(Some(id.clone()), when, maybe_periodic, priority, origin, call)?;613 let (when, index) = address;614615 Lookup::<T>::insert(&id, &address);616 Self::deposit_event(RawEvent::Scheduled(when, index));617 Ok(address)618 }619620 fn do_cancel_named(origin: Option<T::PalletsOrigin>, id: Vec<u8>) -> DispatchResult {621 Lookup::<T>::try_mutate_exists(id, |lookup| -> DispatchResult {622 if let Some((when, index)) = lookup.take() {623 let i = index as usize;624 Agenda::<T>::try_mutate(when, |agenda| -> DispatchResult {625 if let Some(s) = agenda.get_mut(i) {626 if let (Some(ref o), Some(ref s)) = (origin, s.borrow()) {627 if *o != s.origin {628 return Err(BadOrigin.into());629 }630 }631 *s = None;632 }633 Ok(())634 })?;635 Self::deposit_event(RawEvent::Canceled(when, index));636 Ok(())637 } else {638 Err(Error::<T>::NotFound.into())639 }640 })641 }642643 fn do_reschedule_named(644 id: Vec<u8>,645 new_time: DispatchTime<T::BlockNumber>,646 ) -> Result<TaskAddress<T::BlockNumber>, DispatchError> {647 let new_time = Self::resolve_time(new_time)?;648649 Lookup::<T>::try_mutate_exists(650 id,651 |lookup| -> Result<TaskAddress<T::BlockNumber>, DispatchError> {652 let (when, index) = lookup.ok_or(Error::<T>::NotFound)?;653654 if new_time == when {655 return Err(Error::<T>::RescheduleNoChange.into());656 }657658 Agenda::<T>::try_mutate(when, |agenda| -> DispatchResult {659 let task = agenda.get_mut(index as usize).ok_or(Error::<T>::NotFound)?;660 let task = task.take().ok_or(Error::<T>::NotFound)?;661 Agenda::<T>::append(new_time, Some(task));662663 Ok(())664 })?;665666 let new_index = Agenda::<T>::decode_len(new_time).unwrap_or(1) as u32 - 1;667 Self::deposit_event(RawEvent::Canceled(when, index));668 Self::deposit_event(RawEvent::Scheduled(new_time, new_index));669670 *lookup = Some((new_time, new_index));671672 Ok((new_time, new_index))673 },674 )675 }676}677678impl<T: Config> schedule::Anon<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>679 for Module<T>680{681 type Address = TaskAddress<T::BlockNumber>;682683 fn schedule(684 when: DispatchTime<T::BlockNumber>,685 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,686 priority: schedule::Priority,687 origin: T::PalletsOrigin,688 call: <T as Config>::Call,689 ) -> Result<Self::Address, DispatchError> {690 Self::do_schedule_nameless(when, maybe_periodic, priority, origin, call)691 }692693 fn cancel((when, index): Self::Address) -> Result<(), ()> {694 Self::do_cancel(None, (when, index)).map_err(|_| ())695 }696697 fn reschedule(698 address: Self::Address,699 when: DispatchTime<T::BlockNumber>,700 ) -> Result<Self::Address, DispatchError> {701 Self::do_reschedule(address, when)702 }703704 fn next_dispatch_time((when, index): Self::Address) -> Result<T::BlockNumber, ()> {705 Agenda::<T>::get(when)706 .get(index as usize)707 .ok_or(())708 .map(|_| when)709 }710}711712impl<T: Config> schedule::Named<T::BlockNumber, <T as Config>::Call, T::PalletsOrigin>713 for Module<T>714{715 type Address = TaskAddress<T::BlockNumber>;716717 fn schedule_named(718 id: Vec<u8>,719 when: DispatchTime<T::BlockNumber>,720 maybe_periodic: Option<schedule::Period<T::BlockNumber>>,721 priority: schedule::Priority,722 origin: T::PalletsOrigin,723 call: <T as Config>::Call,724 ) -> Result<Self::Address, ()> {725 Self::do_schedule_named(id, when, maybe_periodic, priority, origin, call).map_err(|_| ())726 }727728 fn cancel_named(id: Vec<u8>) -> Result<(), ()> {729 Self::do_cancel_named(None, id).map_err(|_| ())730 }731732 fn reschedule_named(733 id: Vec<u8>,734 when: DispatchTime<T::BlockNumber>,735 ) -> Result<Self::Address, DispatchError> {736 Self::do_reschedule_named(id, when)737 }738739 fn next_dispatch_time(id: Vec<u8>) -> Result<T::BlockNumber, ()> {740 Lookup::<T>::get(id)741 .and_then(|(when, index)| Agenda::<T>::get(when).get(index as usize).map(|_| when))742 .ok_or(())743 }744}745746#[cfg(test)]747#[allow(clippy::from_over_into)]748mod tests {749 use super::*;750751 use frame_support::{752 ord_parameter_types, parameter_types, traits::Contains, weights::constants::RocksDbWeight,753 };754 use sp_core::H256;755 use sp_runtime::{756 Perbill,757 testing::Header,758 traits::{BlakeTwo256, IdentityLookup},759 };760 use frame_system::{EnsureOneOf, EnsureRoot, EnsureSignedBy};761 use crate as scheduler;762763 mod logger {764 use super::*;765 use std::cell::RefCell;766767 thread_local! {768 static LOG: RefCell<Vec<(OriginCaller, u32)>> = RefCell::new(Vec::new());769 }770 pub trait Config: system::Config {771 type Event: From<Event> + Into<<Self as system::Config>::Event>;772 }773 decl_event! {774 pub enum Event {775 Logged(u32, Weight),776 }777 }778 decl_module! {779 pub struct Module<T: Config> for enum Call780 where781 origin: <T as system::Config>::Origin,782 <T as system::Config>::Origin: OriginTrait<PalletsOrigin = OriginCaller>783 {784 fn deposit_event() = default;785786 #[weight = *weight]787 fn log(origin, i: u32, weight: Weight) {788 Self::deposit_event(Event::Logged(i, weight));789 LOG.with(|log| {790 log.borrow_mut().push((origin.caller().clone(), i));791 })792 }793794 #[weight = *weight]795 fn log_without_filter(origin, i: u32, weight: Weight) {796 Self::deposit_event(Event::Logged(i, weight));797 LOG.with(|log| {798 log.borrow_mut().push((origin.caller().clone(), i));799 })800 }801 }802 }803 }804805 type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;806 type Block = frame_system::mocking::MockBlock<Test>;807808 frame_support::construct_runtime!(809 pub enum Test where810 Block = Block,811 NodeBlock = Block,812 UncheckedExtrinsic = UncheckedExtrinsic,813 {814 System: frame_system::{Pallet, Call, Config, Storage, Event<T>},815 Logger: logger::{Pallet, Call, Event},816 Scheduler: scheduler::{Pallet, Call, Storage, Event<T>},817 }818 );819820 // Scheduler must dispatch with root and no filter, this tests base filter is indeed not used.821 pub struct BaseFilter;822 impl Contains<Call> for BaseFilter {823 fn contains(call: &Call) -> bool {824 !matches!(call, Call::Logger(logger::Call::log { .. }))825 }826 }827828 parameter_types! {829 pub const BlockHashCount: u64 = 250;830 pub BlockWeights: frame_system::limits::BlockWeights =831 frame_system::limits::BlockWeights::simple_max(2_000_000_000_000);832 }833 impl system::Config for Test {834 type BaseCallFilter = BaseFilter;835 type BlockWeights = ();836 type BlockLength = ();837 type DbWeight = RocksDbWeight;838 type Origin = Origin;839 type Call = Call;840 type Index = u64;841 type BlockNumber = u64;842 type Hash = H256;843 type Hashing = BlakeTwo256;844 type AccountId = u64;845 type Lookup = IdentityLookup<Self::AccountId>;846 type Header = Header;847 type Event = Event;848 type BlockHashCount = BlockHashCount;849 type Version = ();850 type PalletInfo = PalletInfo;851 type AccountData = ();852 type OnNewAccount = ();853 type OnKilledAccount = ();854 type SystemWeightInfo = ();855 type SS58Prefix = ();856 type OnSetCode = ();857 }858 impl logger::Config for Test {859 type Event = Event;860 }861 parameter_types! {862 pub MaximumSchedulerWeight: Weight = Perbill::from_percent(80) * BlockWeights::get().max_block;863 pub const MaxScheduledPerBlock: u32 = 10;864 }865 ord_parameter_types! {866 pub const One: u64 = 1;867 }868869 impl Config for Test {870 type Event = Event;871 type Origin = Origin;872 type PalletsOrigin = OriginCaller;873 type Call = Call;874 type MaximumWeight = MaximumSchedulerWeight;875 type ScheduleOrigin = EnsureOneOf<u64, EnsureRoot<u64>, EnsureSignedBy<One, u64>>;876 type MaxScheduledPerBlock = MaxScheduledPerBlock;877 type WeightInfo = ();878 type SponsorshipHandler = ();879 type PaymentHandler = ();880 }881}runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -798,11 +798,11 @@
type BlockNumberProvider = RelayChainBlockNumberProvider<Runtime>;
}
-// parameter_types! {
-// pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *
-// RuntimeBlockWeights::get().max_block;
-// pub const MaxScheduledPerBlock: u32 = 50;
-// }
+parameter_types! {
+ pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *
+ RuntimeBlockWeights::get().max_block;
+ pub const MaxScheduledPerBlock: u32 = 50;
+}
type EvmSponsorshipHandler = (
pallet_unique::UniqueEthSponsorshipHandler<Runtime>,
@@ -814,17 +814,18 @@
pallet_evm_transaction_payment::BridgeSponsorshipHandler<Runtime>,
);
-// impl pallet_unq_scheduler::Config for Runtime {
-// type Event = Event;
-// type Origin = Origin;
-// type PalletsOrigin = OriginCaller;
-// type Call = Call;
-// type MaximumWeight = MaximumSchedulerWeight;
-// type ScheduleOrigin = EnsureSigned<AccountId>;
-// type MaxScheduledPerBlock = MaxScheduledPerBlock;
-// type SponsorshipHandler = SponsorshipHandler;
-// type WeightInfo = ();
-// }
+impl pallet_unq_scheduler::Config for Runtime {
+ type Event = Event;
+ type Origin = Origin;
+ type PalletsOrigin = OriginCaller;
+ type Call = Call;
+ type MaximumWeight = MaximumSchedulerWeight;
+ type ScheduleOrigin = EnsureSigned<AccountId>;
+ type MaxScheduledPerBlock = MaxScheduledPerBlock;
+ type SponsorshipHandler = SponsorshipHandler;
+ type WeightInfo = ();
+ type PaymentHandler = pallet_charge_transaction::ChargeTransactionPayment<Runtime>;
+}
impl pallet_evm_transaction_payment::Config for Runtime {
type EvmSponsorshipHandler = EvmSponsorshipHandler;
@@ -885,7 +886,7 @@
// Unique Pallets
Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
Unique: pallet_unique::{Pallet, Call, Storage, Event<T>} = 61,
- // Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
+ Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
// free = 63
Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
tests/package.jsondiffbeforeafterboth--- a/tests/package.json
+++ b/tests/package.json
@@ -64,6 +64,7 @@
"testOverflow": "mocha --timeout 9999999 -r ts-node/register ./**/overflow.test.ts",
"testSetVariableMetadataSponsoringRateLimit": "mocha --timeout 9999999 -r ts-node/register ./**/setVariableMetadataSponsoringRateLimit.test.ts",
"testInflation": "mocha --timeout 9999999 -r ts-node/register ./**/inflation.test.ts",
+ "testScheduler": "mocha --timeout 9999999 -r ts-node/register ./**/scheduler.test.ts",
"testPalletPresence": "mocha --timeout 9999999 -r ts-node/register ./**/pallet-presence.test.ts",
"testBlockProduction": "mocha --timeout 9999999 -r ts-node/register ./**/block-production.test.ts",
"testEnableDisableTransfers": "mocha --timeout 9999999 -r ts-node/register ./**/enableDisableTransfer.test.ts",
tests/src/scheduler.test.tsdiffbeforeafterboth--- a/tests/src/scheduler.test.ts
+++ b/tests/src/scheduler.test.ts
@@ -14,14 +14,23 @@
setCollectionSponsorExpectSuccess,
confirmSponsorshipExpectSuccess,
} from './util/helpers';
+import {IKeyringPair} from '@polkadot/types/types';
chai.use(chaiAsPromised);
-describe.skip('Integration Test scheduler base transaction', () => {
+describe('Integration Test scheduler base transaction', () => {
+ let alice: IKeyringPair;
+ let bob: IKeyringPair;
+
+ before(async() => {
+ await usingApi(async () => {
+ alice = privateKey('//Alice');
+ bob = privateKey('//Bob');
+ });
+ });
+
it('User can transfer owned token with delay (scheduler)', async () => {
await usingApi(async () => {
- const alice = privateKey('//Alice');
- const bob = privateKey('//Bob');
// nft
const nftCollectionId = await createCollectionExpectSuccess();
const newNftTokenId = await createItemExpectSuccess(alice, nftCollectionId, 'NFT');