git.delta.rocks / unique-network / refs/commits / f78f490e83cf

difftreelog

Merge pull request #1067 from UniqueNetwork/fix/frontier-pending-inherents

Yaroslav Bolyukin2024-06-05parents: #ff95602 #b6db046.patch.diff
in: master

6 files changed

modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -1,4 +1,4 @@
-RUST_TOOLCHAIN=nightly-2024-02-21
+RUST_TOOLCHAIN=nightly-2024-04-10
 POLKADOT_LAUNCH_BRANCH=unique-network
 RELAY_CHAIN_TYPE=westend
 CHAINQL=v0.4.1
modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -23,11 +23,11 @@
 
 [[package]]
 name = "addr2line"
-version = "0.21.0"
+version = "0.22.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb"
+checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678"
 dependencies = [
- "gimli 0.28.1",
+ "gimli 0.29.0",
 ]
 
 [[package]]
@@ -240,7 +240,7 @@
  "proc-macro-error",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -475,9 +475,9 @@
 
 [[package]]
 name = "async-executor"
-version = "1.11.0"
+version = "1.12.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b10202063978b3351199d68f8b22c4e47e4b1b822f8d43fd862d5ea8c006b29a"
+checksum = "c8828ec6e544c02b0d6691d21ed9f9218d0384a82542855073c2a3f58304aaf0"
 dependencies = [
  "async-task",
  "concurrent-queue",
@@ -617,7 +617,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -653,7 +653,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -664,16 +664,16 @@
 
 [[package]]
 name = "backtrace"
-version = "0.3.71"
+version = "0.3.72"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d"
+checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11"
 dependencies = [
- "addr2line 0.21.0",
+ "addr2line 0.22.0",
  "cc",
  "cfg-if",
  "libc",
  "miniz_oxide",
- "object 0.32.2",
+ "object 0.35.0",
  "rustc-demangle",
 ]
 
@@ -759,7 +759,7 @@
  "regex",
  "rustc-hash",
  "shlex",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -925,12 +925,11 @@
 
 [[package]]
 name = "blocking"
-version = "1.6.0"
+version = "1.6.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88"
+checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea"
 dependencies = [
  "async-channel 2.3.1",
- "async-lock 3.3.0",
  "async-task",
  "futures-io",
  "futures-lite 2.3.0",
@@ -1236,9 +1235,9 @@
 
 [[package]]
 name = "clang-sys"
-version = "1.7.0"
+version = "1.8.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1"
+checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
 dependencies = [
  "glob",
  "libc",
@@ -1277,7 +1276,7 @@
  "heck 0.5.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -1555,9 +1554,9 @@
 
 [[package]]
 name = "crc32fast"
-version = "1.4.0"
+version = "1.4.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
+checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
 dependencies = [
  "cfg-if",
 ]
@@ -1683,7 +1682,7 @@
  "cumulus-primitives-core",
  "futures",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "polkadot-node-primitives",
  "polkadot-node-subsystem",
  "polkadot-overseer",
@@ -1796,7 +1795,7 @@
  "futures",
  "futures-timer",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "polkadot-node-primitives",
  "polkadot-parachain-primitives",
  "polkadot-primitives",
@@ -1978,7 +1977,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2175,7 +2174,7 @@
  "cumulus-relay-chain-interface",
  "cumulus-relay-chain-rpc-interface",
  "futures",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "polkadot-availability-recovery",
  "polkadot-collator-protocol",
  "polkadot-core-primitives",
@@ -2299,7 +2298,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2339,7 +2338,7 @@
  "proc-macro2",
  "quote",
  "scratch",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2356,7 +2355,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2461,7 +2460,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2563,7 +2562,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2587,7 +2586,7 @@
  "proc-macro2",
  "quote",
  "regex",
- "syn 2.0.65",
+ "syn 2.0.66",
  "termcolor",
  "toml 0.8.13",
  "walkdir",
@@ -2768,7 +2767,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2779,7 +2778,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -2896,9 +2895,9 @@
 
 [[package]]
 name = "event-listener"
-version = "5.3.0"
+version = "5.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d9944b8ca13534cdfb2800775f8dd4902ff3fc75a50101466decadfdf322a24"
+checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba"
 dependencies = [
  "concurrent-queue",
  "parking",
@@ -2921,7 +2920,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1"
 dependencies = [
- "event-listener 5.3.0",
+ "event-listener 5.3.1",
  "pin-project-lite 0.2.14",
 ]
 
@@ -3051,7 +3050,7 @@
  "prettier-please",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -3109,7 +3108,7 @@
 [[package]]
 name = "fc-api"
 version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "async-trait",
  "fp-storage",
@@ -3121,7 +3120,7 @@
 [[package]]
 name = "fc-consensus"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "async-trait",
  "fp-consensus",
@@ -3137,7 +3136,7 @@
 [[package]]
 name = "fc-db"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "async-trait",
  "fc-api",
@@ -3146,7 +3145,7 @@
  "log",
  "parity-db",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-db",
  "smallvec",
  "sp-blockchain",
@@ -3158,7 +3157,7 @@
 [[package]]
 name = "fc-mapping-sync"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "fc-db",
  "fc-storage",
@@ -3167,7 +3166,7 @@
  "futures",
  "futures-timer",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-api",
  "sc-utils",
  "sp-api",
@@ -3179,7 +3178,7 @@
 [[package]]
 name = "fc-rpc"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -3234,7 +3233,7 @@
 [[package]]
 name = "fc-rpc-core"
 version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -3249,7 +3248,7 @@
 [[package]]
 name = "fc-storage"
 version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -3324,7 +3323,7 @@
  "log",
  "num-traits",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "scale-info",
 ]
 
@@ -3393,7 +3392,7 @@
 [[package]]
 name = "fp-account"
 version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "hex",
  "impl-serde",
@@ -3412,7 +3411,7 @@
 [[package]]
 name = "fp-consensus"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "ethereum",
  "parity-scale-codec",
@@ -3424,7 +3423,7 @@
 [[package]]
 name = "fp-ethereum"
 version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -3437,7 +3436,7 @@
 [[package]]
 name = "fp-evm"
 version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "evm",
  "frame-support",
@@ -3453,7 +3452,7 @@
 [[package]]
 name = "fp-rpc"
 version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -3470,7 +3469,7 @@
 [[package]]
 name = "fp-self-contained"
 version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "frame-support",
  "parity-scale-codec",
@@ -3482,7 +3481,7 @@
 [[package]]
 name = "fp-storage"
 version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "parity-scale-codec",
  "serde",
@@ -3578,7 +3577,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -3713,7 +3712,7 @@
  "proc-macro2",
  "quote",
  "sp-crypto-hashing",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -3726,7 +3725,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -3737,7 +3736,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -3920,7 +3919,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -4073,6 +4072,12 @@
 ]
 
 [[package]]
+name = "gimli"
+version = "0.29.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
+
+[[package]]
 name = "glob"
 version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4090,7 +4095,7 @@
  "futures-timer",
  "no-std-compat",
  "nonzero_ext",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "portable-atomic",
  "quanta",
  "rand",
@@ -4741,7 +4746,7 @@
  "futures-util",
  "hyper",
  "jsonrpsee-types",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "pin-project",
  "rand",
  "rustc-hash",
@@ -4783,7 +4788,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -4881,7 +4886,7 @@
 checksum = "bf7a85fe66f9ff9cd74e169fdd2c94c6e1e74c412c99a73b4df3200b5d3760b2"
 dependencies = [
  "kvdb",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
 ]
 
 [[package]]
@@ -4892,7 +4897,7 @@
 dependencies = [
  "kvdb",
  "num_cpus",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "regex",
  "rocksdb",
  "smallvec",
@@ -5017,7 +5022,7 @@
  "multihash 0.17.0",
  "multistream-select",
  "once_cell",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "pin-project",
  "quick-protobuf",
  "rand",
@@ -5037,7 +5042,7 @@
  "futures",
  "libp2p-core",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "smallvec",
  "trust-dns-resolver",
 ]
@@ -5199,7 +5204,7 @@
  "libp2p-identity",
  "libp2p-tls",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "quinn-proto",
  "rand",
  "rustls 0.20.9",
@@ -5315,7 +5320,7 @@
  "futures-rustls",
  "libp2p-core",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "quicksink",
  "rw-stream-sink",
  "soketto",
@@ -5411,9 +5416,9 @@
 
 [[package]]
 name = "libz-sys"
-version = "1.1.16"
+version = "1.1.18"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9"
+checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e"
 dependencies = [
  "cc",
  "pkg-config",
@@ -5561,7 +5566,7 @@
  "macro_magic_core",
  "macro_magic_macros",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -5575,7 +5580,7 @@
  "macro_magic_core_macros",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -5586,7 +5591,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -5597,7 +5602,7 @@
 dependencies = [
  "macro_magic_core",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -5753,7 +5758,7 @@
  "hashlink",
  "lioness",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "rand_chacha 0.3.1",
  "rand_distr",
@@ -6243,7 +6248,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -6274,6 +6279,15 @@
 ]
 
 [[package]]
+name = "object"
+version = "0.35.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
 name = "oid-registry"
 version = "0.6.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -6790,7 +6804,7 @@
 [[package]]
 name = "pallet-base-fee"
 version = "1.0.0"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "fp-evm",
  "frame-support",
@@ -7113,7 +7127,7 @@
 [[package]]
 name = "pallet-ethereum"
 version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -7136,7 +7150,7 @@
 [[package]]
 name = "pallet-evm"
 version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "environmental",
  "evm",
@@ -7218,7 +7232,7 @@
 [[package]]
 name = "pallet-evm-precompile-simple"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#7656405def86265ed578133a4dd628112dbb795d"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v1.9.0#0b08553e48ce2e9a237478ccd1aebef9d935a5ab"
 dependencies = [
  "fp-evm",
  "ripemd",
@@ -7887,7 +7901,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -8282,7 +8296,7 @@
  "log",
  "lz4",
  "memmap2 0.5.10",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "siphasher",
  "snap",
@@ -8347,9 +8361,9 @@
 
 [[package]]
 name = "parking_lot"
-version = "0.12.2"
+version = "0.12.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb"
+checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
 dependencies = [
  "lock_api",
  "parking_lot_core 0.9.10",
@@ -8467,7 +8481,7 @@
  "pest_meta",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -8508,7 +8522,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -8790,7 +8804,7 @@
  "fatality",
  "futures",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "polkadot-node-metrics",
  "polkadot-node-network-protocol",
  "polkadot-node-subsystem",
@@ -9150,7 +9164,7 @@
  "log",
  "mick-jaeger",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "polkadot-node-primitives",
  "polkadot-primitives",
  "sc-network",
@@ -9283,7 +9297,7 @@
  "kvdb",
  "parity-db",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "pin-project",
  "polkadot-node-jaeger",
  "polkadot-node-metrics",
@@ -9314,7 +9328,7 @@
  "futures",
  "futures-timer",
  "orchestra",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "polkadot-node-metrics",
  "polkadot-node-network-protocol",
  "polkadot-node-primitives",
@@ -9549,7 +9563,7 @@
  "pallet-transaction-payment-rpc-runtime-api",
  "parity-db",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "polkadot-approval-distribution",
  "polkadot-availability-bitfield-distribution",
  "polkadot-availability-distribution",
@@ -9741,7 +9755,7 @@
  "polkavm-common 0.8.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -9753,7 +9767,7 @@
  "polkavm-common 0.9.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -9763,7 +9777,7 @@
 checksum = "15e85319a0d5129dc9f021c62607e0804f5fb777a05cdda44d750ac0732def66"
 dependencies = [
  "polkavm-derive-impl 0.8.0",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -9773,7 +9787,7 @@
 checksum = "8ba81f7b5faac81e528eb6158a6f3c9e0bb1008e0ffa19653bc8dea925ecb429"
 dependencies = [
  "polkavm-derive-impl 0.9.0",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -9917,7 +9931,7 @@
 checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3"
 dependencies = [
  "proc-macro2",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -9937,7 +9951,7 @@
 checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
 dependencies = [
  "proc-macro2",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -10021,14 +10035,14 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.83"
+version = "1.0.84"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b33eb56c327dec362a9e55b3ad14f9d2f0904fb5a5b03b513ab5465399e9f43"
+checksum = "ec96c6a92621310b51366f1e28d05ef11489516e93be030060e5fc12024a49d6"
 dependencies = [
  "unicode-ident",
 ]
@@ -10043,7 +10057,7 @@
  "fnv",
  "lazy_static",
  "memchr",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "thiserror",
 ]
 
@@ -10055,7 +10069,7 @@
 dependencies = [
  "dtoa",
  "itoa",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "prometheus-client-derive-encode",
 ]
 
@@ -10067,7 +10081,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -10135,7 +10149,7 @@
  "itertools 0.12.1",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -10538,7 +10552,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -11212,7 +11226,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -11267,7 +11281,7 @@
  "futures",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-executor",
  "sc-transaction-pool-api",
  "sc-utils",
@@ -11299,7 +11313,7 @@
  "log",
  "parity-db",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-api",
  "sc-state-db",
  "schnellru",
@@ -11324,7 +11338,7 @@
  "libp2p-identity",
  "log",
  "mockall",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-api",
  "sc-utils",
  "serde",
@@ -11382,7 +11396,7 @@
  "num-rational",
  "num-traits",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-api",
  "sc-consensus",
  "sc-consensus-epochs",
@@ -11441,7 +11455,7 @@
  "futures",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-api",
  "sc-consensus",
  "sc-network",
@@ -11475,7 +11489,7 @@
  "jsonrpsee",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-consensus-beefy",
  "sc-rpc",
  "serde",
@@ -11515,7 +11529,7 @@
  "futures-timer",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "sc-block-builder",
  "sc-chain-spec",
@@ -11631,7 +11645,7 @@
 checksum = "7b8f8ddc63df8219768b729f9098ecd4362d2756b40784071cd44c3041f1d51d"
 dependencies = [
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-executor-common",
  "sc-executor-polkavm",
  "sc-executor-wasmtime",
@@ -11684,7 +11698,7 @@
  "cfg-if",
  "libc",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rustix 0.36.17",
  "sc-allocator",
  "sc-executor-common",
@@ -11718,7 +11732,7 @@
 checksum = "3ef7283da5d643ef89ed094e1b23451ec70386a9474d337cdaa0ef81870bb2d4"
 dependencies = [
  "array-bytes 6.2.3",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "serde_json",
  "sp-application-crypto",
  "sp-core",
@@ -11743,7 +11757,7 @@
  "mixnet",
  "multiaddr",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-api",
  "sc-network",
  "sc-transaction-pool-api",
@@ -11777,7 +11791,7 @@
  "log",
  "mockall",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "partial_sort",
  "pin-project",
  "rand",
@@ -11956,7 +11970,7 @@
  "num_cpus",
  "once_cell",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "sc-client-api",
  "sc-network",
@@ -11993,7 +12007,7 @@
  "jsonrpsee",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-block-builder",
  "sc-chain-spec",
  "sc-client-api",
@@ -12069,7 +12083,7 @@
  "jsonrpsee",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "sc-chain-spec",
  "sc-client-api",
@@ -12102,7 +12116,7 @@
  "jsonrpsee",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "pin-project",
  "rand",
  "sc-chain-spec",
@@ -12161,7 +12175,7 @@
 dependencies = [
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sp-core",
 ]
 
@@ -12231,7 +12245,7 @@
  "futures",
  "libp2p",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "pin-project",
  "rand",
  "sc-utils",
@@ -12254,7 +12268,7 @@
  "libc",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "regex",
  "rustc-hash",
  "sc-client-api",
@@ -12281,7 +12295,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -12296,7 +12310,7 @@
  "linked-hash-map",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sc-client-api",
  "sc-transaction-pool-api",
  "sc-utils",
@@ -12340,7 +12354,7 @@
  "futures-timer",
  "lazy_static",
  "log",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "prometheus",
  "sp-arithmetic",
 ]
@@ -12548,9 +12562,9 @@
 
 [[package]]
 name = "serde"
-version = "1.0.202"
+version = "1.0.203"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395"
+checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
 dependencies = [
  "serde_derive",
 ]
@@ -12566,13 +12580,13 @@
 
 [[package]]
 name = "serde_derive"
-version = "1.0.202"
+version = "1.0.203"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
+checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -12878,7 +12892,7 @@
  "log",
  "lru 0.11.1",
  "no-std-net",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "pin-project",
  "rand",
  "rand_chacha 0.3.1",
@@ -12986,7 +13000,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -13053,7 +13067,7 @@
  "futures",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "schnellru",
  "sp-api",
  "sp-consensus",
@@ -13195,7 +13209,7 @@
  "merlin",
  "parity-bip39",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "paste",
  "primitive-types",
  "rand",
@@ -13240,7 +13254,7 @@
 dependencies = [
  "quote",
  "sp-crypto-hashing",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -13250,7 +13264,7 @@
 checksum = "722cbecdbf5b94578137dbd07feb51e95f7de221be0c1ff4dcfe0bb4cd986929"
 dependencies = [
  "kvdb",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
 ]
 
 [[package]]
@@ -13261,7 +13275,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -13348,7 +13362,7 @@
 checksum = "bdbab8b61bd61d5f8625a0c75753b5d5a23be55d3445419acd42caf59cf6236b"
 dependencies = [
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "sp-core",
  "sp-externalities",
 ]
@@ -13511,7 +13525,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -13554,7 +13568,7 @@
  "hash-db",
  "log",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "smallvec",
  "sp-core",
@@ -13678,7 +13692,7 @@
  "memory-db",
  "nohash-hasher",
  "parity-scale-codec",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "scale-info",
  "schnellru",
@@ -13718,7 +13732,7 @@
  "parity-scale-codec",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -13759,7 +13773,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -14003,7 +14017,7 @@
  "proc-macro2",
  "quote",
  "rustversion",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -14141,9 +14155,9 @@
 
 [[package]]
 name = "syn"
-version = "2.0.65"
+version = "2.0.66"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2863d96a84c6439701d7a38f9de935ec562c8832cc55d1dde0f513b52fad106"
+checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -14290,7 +14304,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -14301,7 +14315,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -14420,16 +14434,16 @@
 
 [[package]]
 name = "tokio"
-version = "1.37.0"
+version = "1.38.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787"
+checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a"
 dependencies = [
  "backtrace",
  "bytes",
  "libc",
  "mio",
  "num_cpus",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "pin-project-lite 0.2.14",
  "signal-hook-registry",
  "socket2 0.5.7",
@@ -14439,13 +14453,13 @@
 
 [[package]]
 name = "tokio-macros"
-version = "2.2.0"
+version = "2.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
+checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a"
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -14568,7 +14582,7 @@
  "serde",
  "serde_spanned",
  "toml_datetime",
- "winnow 0.6.8",
+ "winnow 0.6.9",
 ]
 
 [[package]]
@@ -14636,7 +14650,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -14681,7 +14695,7 @@
  "proc-macro-crate 3.1.0",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -14799,7 +14813,7 @@
  "ipconfig",
  "lazy_static",
  "lru-cache",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "resolv-conf",
  "smallvec",
  "thiserror",
@@ -14979,6 +14993,7 @@
  "cumulus-relay-chain-inprocess-interface",
  "cumulus-relay-chain-interface",
  "cumulus-relay-chain-minimal-node",
+ "cumulus-test-relay-sproof-builder",
  "fc-api",
  "fc-consensus",
  "fc-db",
@@ -15392,7 +15407,7 @@
  "once_cell",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
  "wasm-bindgen-shared",
 ]
 
@@ -15426,7 +15441,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
  "wasm-bindgen-backend",
  "wasm-bindgen-shared",
 ]
@@ -15913,9 +15928,9 @@
 
 [[package]]
 name = "wide"
-version = "0.7.19"
+version = "0.7.21"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aab6594190de06d718a5dbc5fa781ab62f8903797056480e549ca74add6b7065"
+checksum = "cd8dc749a1b03f3c255a3064a4f5c0ee5ed09b7c6bc6d4525d31f779cd74d7fc"
 dependencies = [
  "bytemuck",
  "safe_arch",
@@ -16202,9 +16217,9 @@
 
 [[package]]
 name = "winnow"
-version = "0.6.8"
+version = "0.6.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3c52e9c97a68071b23e836c9380edae937f17b9c4667bd021973efc689f618d"
+checksum = "86c949fede1d13936a99f14fafd3e76fd642b556dd2ce96287fbe2e0151bfac6"
 dependencies = [
  "memchr",
 ]
@@ -16278,7 +16293,7 @@
  "Inflector",
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
@@ -16290,7 +16305,7 @@
  "futures",
  "log",
  "nohash-hasher",
- "parking_lot 0.12.2",
+ "parking_lot 0.12.3",
  "rand",
  "static_assertions",
 ]
@@ -16321,14 +16336,14 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
 name = "zeroize"
-version = "1.7.0"
+version = "1.8.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d"
+checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
 dependencies = [
  "zeroize_derive",
 ]
@@ -16341,7 +16356,7 @@
 dependencies = [
  "proc-macro2",
  "quote",
- "syn 2.0.65",
+ "syn 2.0.66",
 ]
 
 [[package]]
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -109,6 +109,7 @@
 cumulus-relay-chain-inprocess-interface = "0.10.0"
 cumulus-relay-chain-interface = "0.10.0"
 cumulus-relay-chain-minimal-node = "0.10.0"
+cumulus-test-relay-sproof-builder = "0.10.0"
 parachains-common = { default-features = false, version = "10.0.0"}
 frame-executive = { default-features = false, version = "31.0.0" }
 frame-support = { default-features = false, version = "31.0.0" }
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -52,17 +52,17 @@
 
 2. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.
 
-3. Install toolchain nightly-2024-02-21 and make it default:
+3. Install toolchain nightly-2024-04-10 and make it default:
 
 ```bash
-rustup toolchain install nightly-2024-02-21
-rustup default nightly-2024-02-21
+rustup toolchain install nightly-2024-04-10
+rustup default nightly-2024-04-10
 ```
 
 4. Add wasm target for nightly toolchain:
 
 ```bash
-rustup target add wasm32-unknown-unknown --toolchain nightly-2024-02-21
+rustup target add wasm32-unknown-unknown --toolchain nightly-2024-04-10
 ```
 
 5. Build:
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -43,6 +43,7 @@
 cumulus-relay-chain-interface = { workspace = true }
 cumulus-relay-chain-minimal-node = { workspace = true }
 cumulus-client-parachain-inherent = { workspace = true }
+cumulus-test-relay-sproof-builder = { workspace = true }
 frame-benchmarking = { workspace = true }
 frame-benchmarking-cli = { workspace = true }
 opal-runtime = { workspace = true, optional = true }
modifiednode/cli/src/service.rsdiffbeforeafterboth
before · node/cli/src/service.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617// std18use std::{19	collections::BTreeMap,20	marker::PhantomData,21	pin::Pin,22	sync::{Arc, Mutex},23	time::Duration,24};2526use cumulus_client_cli::CollatorOptions;27use cumulus_client_collator::service::CollatorService;28#[cfg(not(feature = "lookahead"))]29use cumulus_client_consensus_aura::collators::basic::{30	run as run_aura, Params as BuildAuraConsensusParams,31};32#[cfg(feature = "lookahead")]33use cumulus_client_consensus_aura::collators::lookahead::{34	run as run_aura, Params as BuildAuraConsensusParams,35};36use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport;37use cumulus_client_consensus_proposer::Proposer;38use cumulus_client_service::{39	build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, DARecoveryProfile,40	StartRelayChainTasksParams,41};42use cumulus_primitives_core::ParaId;43use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};44use fc_mapping_sync::{kv::MappingSyncWorker, EthereumBlockNotificationSinks, SyncStrategy};45use fc_rpc::{46	frontier_backend_client::SystemAccountId32StorageOverride, EthBlockDataCacheTask, EthConfig,47	EthTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, SchemaV2Override,48	SchemaV3Override, StorageOverride,49};50use fc_rpc_core::types::{FeeHistoryCache, FilterPool};51use fp_rpc::EthereumRuntimeRPCApi;52use fp_storage::EthereumStorageSchema;53use futures::{54	stream::select,55	task::{Context, Poll},56	Stream, StreamExt,57};58use jsonrpsee::RpcModule;59use polkadot_service::CollatorPair;60use sc_client_api::{AuxStore, Backend, BlockOf, BlockchainEvents, StorageProvider};61use sc_consensus::ImportQueue;62use sc_executor::{NativeElseWasmExecutor, NativeExecutionDispatch};63use sc_network::NetworkBlock;64use sc_network_sync::SyncingService;65use sc_rpc::SubscriptionTaskExecutor;66use sc_service::{Configuration, PartialComponents, TaskManager};67use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};68use serde::{Deserialize, Serialize};69use sp_api::ProvideRuntimeApi;70use sp_block_builder::BlockBuilder;71use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};72use sp_consensus_aura::sr25519::AuthorityPair as AuraAuthorityPair;73use sp_keystore::KeystorePtr;74use sp_state_machine::Backend as StateBackend;75use substrate_prometheus_endpoint::Registry;76use tokio::time::Interval;77use up_common::types::{opaque::*, Nonce};7879pub type ParachainHostFunctions = (80	sp_io::SubstrateHostFunctions,81	cumulus_client_service::storage_proof_size::HostFunctions,82);8384use crate::{85	chain_spec::RuntimeIdentification,86	rpc::{create_eth, create_full, EthDeps, FullDeps},87};8889/// Unique native executor instance.90#[cfg(feature = "unique-runtime")]91pub struct UniqueRuntimeExecutor;9293#[cfg(feature = "quartz-runtime")]94/// Quartz native executor instance.95pub struct QuartzRuntimeExecutor;9697/// Opal native executor instance.98pub struct OpalRuntimeExecutor;99100#[cfg(feature = "unique-runtime")]101impl NativeExecutionDispatch for UniqueRuntimeExecutor {102	/// Only enable the benchmarking host functions when we actually want to benchmark.103	#[cfg(feature = "runtime-benchmarks")]104	type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;105	/// Otherwise we only use the default Substrate host functions.106	#[cfg(not(feature = "runtime-benchmarks"))]107	type ExtendHostFunctions = ParachainHostFunctions;108109	fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {110		unique_runtime::api::dispatch(method, data)111	}112113	fn native_version() -> sc_executor::NativeVersion {114		unique_runtime::native_version()115	}116}117118#[cfg(feature = "quartz-runtime")]119impl NativeExecutionDispatch for QuartzRuntimeExecutor {120	/// Only enable the benchmarking host functions when we actually want to benchmark.121	#[cfg(feature = "runtime-benchmarks")]122	type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;123	/// Otherwise we only use the default Substrate host functions.124	#[cfg(not(feature = "runtime-benchmarks"))]125	type ExtendHostFunctions = ParachainHostFunctions;126127	fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {128		quartz_runtime::api::dispatch(method, data)129	}130131	fn native_version() -> sc_executor::NativeVersion {132		quartz_runtime::native_version()133	}134}135136impl NativeExecutionDispatch for OpalRuntimeExecutor {137	/// Only enable the benchmarking host functions when we actually want to benchmark.138	#[cfg(feature = "runtime-benchmarks")]139	type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;140	/// Otherwise we only use the default Substrate host functions.141	#[cfg(not(feature = "runtime-benchmarks"))]142	type ExtendHostFunctions = ParachainHostFunctions;143144	fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {145		opal_runtime::api::dispatch(method, data)146	}147148	fn native_version() -> sc_executor::NativeVersion {149		opal_runtime::native_version()150	}151}152153pub struct AutosealInterval {154	interval: Interval,155}156157impl AutosealInterval {158	pub fn new(config: &Configuration, interval: u64) -> Self {159		let _tokio_runtime = config.tokio_handle.enter();160		let interval = tokio::time::interval(Duration::from_millis(interval));161162		Self { interval }163	}164}165166impl Stream for AutosealInterval {167	type Item = tokio::time::Instant;168169	fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {170		self.interval.poll_tick(cx).map(Some)171	}172}173174pub fn open_frontier_backend<C: HeaderBackend<Block>>(175	client: Arc<C>,176	config: &Configuration,177) -> Result<Arc<fc_db::kv::Backend<Block>>, String> {178	let config_dir = config.base_path.config_dir(config.chain_spec.id());179	let database_dir = config_dir.join("frontier").join("db");180181	Ok(Arc::new(fc_db::kv::Backend::<Block>::new(182		client,183		&fc_db::kv::DatabaseSettings {184			source: fc_db::DatabaseSource::RocksDb {185				path: database_dir,186				cache_size: 0,187			},188		},189	)?))190}191192type FullClient<RuntimeApi, ExecutorDispatch> =193	sc_service::TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<ExecutorDispatch>>;194type FullBackend = sc_service::TFullBackend<Block>;195type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;196type ParachainBlockImport<RuntimeApi, ExecutorDispatch> =197	TParachainBlockImport<Block, Arc<FullClient<RuntimeApi, ExecutorDispatch>>, FullBackend>;198199/// Generate a supertrait based on bounds, and blanket impl for it.200macro_rules! ez_bounds {201	($vis:vis trait $name:ident$(<$($gen:ident $(: $($(+)? $bound:path)*)?),* $(,)?>)? $(:)? $($(+)? $super:path)* {}) => {202		$vis trait $name $(<$($gen $(: $($bound+)*)?,)*>)?: $($super +)* {}203		impl<T, $($($gen $(: $($bound+)*)?,)*)?> $name$(<$($gen,)*>)? for T204		where T: $($super +)* {}205	}206}207ez_bounds!(208	pub trait RuntimeApiDep<Runtime: RuntimeInstance>:209		sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block>210		+ sp_consensus_aura::AuraApi<Block, AuraId>211		+ fp_rpc::EthereumRuntimeRPCApi<Block>212		+ sp_session::SessionKeys<Block>213		+ sp_block_builder::BlockBuilder<Block>214		+ pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance>215		+ sp_api::ApiExt<Block>216		+ up_rpc::UniqueApi<Block, Runtime::CrossAccountId, AccountId>217		+ app_promotion_rpc::AppPromotionApi<Block, BlockNumber, Runtime::CrossAccountId, AccountId>218		+ up_pov_estimate_rpc::PovEstimateApi<Block>219		+ substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>220		+ sp_api::Metadata<Block>221		+ sp_offchain::OffchainWorkerApi<Block>222		+ cumulus_primitives_core::CollectCollationInfo<Block>223		// Deprecated, not used.224		+ fp_rpc::ConvertTransactionRuntimeApi<Block>225	{226	}227);228#[cfg(not(feature = "lookahead"))]229ez_bounds!(230	pub trait LookaheadApiDep {}231);232#[cfg(feature = "lookahead")]233ez_bounds!(234	pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}235);236237/// Starts a `ServiceBuilder` for a full service.238///239/// Use this macro if you don't actually need the full service, but just the builder in order to240/// be able to perform chain operations.241#[allow(clippy::type_complexity)]242pub fn new_partial<Runtime, RuntimeApi, ExecutorDispatch, BIQ>(243	config: &Configuration,244	build_import_queue: BIQ,245) -> Result<246	PartialComponents<247		FullClient<RuntimeApi, ExecutorDispatch>,248		FullBackend,249		FullSelectChain,250		sc_consensus::DefaultImportQueue<Block>,251		sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>,252		OtherPartial,253	>,254	sc_service::Error,255>256where257	sc_client_api::StateBackendFor<FullBackend, Block>: StateBackend<BlakeTwo256>,258	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>259		+ Send260		+ Sync261		+ 'static,262	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,263	Runtime: RuntimeInstance,264	ExecutorDispatch: NativeExecutionDispatch + 'static,265	BIQ: FnOnce(266		Arc<FullClient<RuntimeApi, ExecutorDispatch>>,267		Arc<FullBackend>,268		&Configuration,269		Option<TelemetryHandle>,270		&TaskManager,271	) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>,272{273	let telemetry = config274		.telemetry_endpoints275		.clone()276		.filter(|x| !x.is_empty())277		.map(|endpoints| -> Result<_, sc_telemetry::Error> {278			let worker = TelemetryWorker::new(16)?;279			let telemetry = worker.handle().new_telemetry(endpoints);280			Ok((worker, telemetry))281		})282		.transpose()?;283284	let executor = sc_service::new_native_or_wasm_executor(config);285286	let (client, backend, keystore_container, task_manager) =287		sc_service::new_full_parts::<Block, RuntimeApi, _>(288			config,289			telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),290			executor,291		)?;292	let client = Arc::new(client);293294	let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());295296	let telemetry = telemetry.map(|(worker, telemetry)| {297		task_manager298			.spawn_handle()299			.spawn("telemetry", None, worker.run());300		telemetry301	});302303	let select_chain = sc_consensus::LongestChain::new(backend.clone());304305	let transaction_pool = sc_transaction_pool::BasicPool::new_full(306		config.transaction_pool.clone(),307		config.role.is_authority().into(),308		config.prometheus_registry(),309		task_manager.spawn_essential_handle(),310		client.clone(),311	);312313	let eth_filter_pool: Option<FilterPool> = Some(Arc::new(Mutex::new(BTreeMap::new())));314315	let eth_backend = open_frontier_backend(client.clone(), config)?;316317	let import_queue = build_import_queue(318		client.clone(),319		backend.clone(),320		config,321		telemetry.as_ref().map(|telemetry| telemetry.handle()),322		&task_manager,323	)?;324325	let params = PartialComponents {326		backend,327		client,328		import_queue,329		keystore_container,330		task_manager,331		transaction_pool,332		select_chain,333		other: OtherPartial {334			telemetry,335			eth_filter_pool,336			eth_backend,337			telemetry_worker_handle,338		},339	};340341	Ok(params)342}343344macro_rules! clone {345    ($($i:ident),* $(,)?) => {346		$(347			let $i = $i.clone();348		)*349    };350}351352/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.353///354/// This is the actual implementation that is abstract over the executor and the runtime api.355#[sc_tracing::logging::prefix_logs_with("Parachain")]356pub async fn start_node<Runtime, RuntimeApi, ExecutorDispatch>(357	parachain_config: Configuration,358	polkadot_config: Configuration,359	collator_options: CollatorOptions,360	para_id: ParaId,361	hwbench: Option<sc_sysinfo::HwBench>,362) -> sc_service::error::Result<(TaskManager, Arc<FullClient<RuntimeApi, ExecutorDispatch>>)>363where364	sc_client_api::StateBackendFor<FullBackend, Block>: StateBackend<BlakeTwo256>,365	Runtime: RuntimeInstance + Send + Sync + 'static,366	<Runtime as RuntimeInstance>::CrossAccountId: Serialize,367	for<'de> <Runtime as RuntimeInstance>::CrossAccountId: Deserialize<'de>,368	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>369		+ Send370		+ Sync371		+ 'static,372	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,373	RuntimeApi::RuntimeApi: LookaheadApiDep,374	Runtime: RuntimeInstance,375	ExecutorDispatch: NativeExecutionDispatch + 'static,376{377	let parachain_config = prepare_node_config(parachain_config);378379	let params = new_partial::<Runtime, RuntimeApi, ExecutorDispatch, _>(380		&parachain_config,381		parachain_build_import_queue,382	)?;383	let OtherPartial {384		mut telemetry,385		telemetry_worker_handle,386		eth_filter_pool,387		eth_backend,388	} = params.other;389	let net_config = sc_network::config::FullNetworkConfiguration::new(&parachain_config.network);390391	let client = params.client.clone();392	let backend = params.backend.clone();393	let mut task_manager = params.task_manager;394395	let (relay_chain_interface, collator_key) = build_relay_chain_interface(396		polkadot_config,397		&parachain_config,398		telemetry_worker_handle,399		&mut task_manager,400		collator_options.clone(),401		hwbench.clone(),402	)403	.await404	.map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;405406	// Aura is sybil-resistant, collator-selection is generally too.407	let block_announce_validator =408		cumulus_client_network::AssumeSybilResistance::allow_seconded_messages();409410	let validator = parachain_config.role.is_authority();411	let prometheus_registry = parachain_config.prometheus_registry().cloned();412	let transaction_pool = params.transaction_pool.clone();413	let import_queue_service = params.import_queue.service();414415	let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =416		sc_service::build_network(sc_service::BuildNetworkParams {417			config: &parachain_config,418			net_config,419			client: client.clone(),420			transaction_pool: transaction_pool.clone(),421			spawn_handle: task_manager.spawn_handle(),422			import_queue: params.import_queue,423			block_announce_validator_builder: Some(Box::new(|_| {424				Box::new(block_announce_validator)425			})),426			warp_sync_params: None,427			block_relay: None,428		})?;429430	let select_chain = params.select_chain.clone();431432	let runtime_id = parachain_config.chain_spec.runtime_id();433434	// Frontier435	let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));436	let fee_history_limit = 2048;437438	let eth_pubsub_notification_sinks: Arc<439		EthereumBlockNotificationSinks<fc_mapping_sync::EthereumBlockNotification<Block>>,440	> = Default::default();441442	let overrides = overrides_handle(client.clone());443	let eth_block_data_cache = spawn_frontier_tasks(444		FrontierTaskParams {445			client: client.clone(),446			substrate_backend: backend.clone(),447			eth_filter_pool: eth_filter_pool.clone(),448			eth_backend: eth_backend.clone(),449			fee_history_limit,450			fee_history_cache: fee_history_cache.clone(),451			task_manager: &task_manager,452			prometheus_registry: prometheus_registry.clone(),453			overrides: overrides.clone(),454			sync_strategy: SyncStrategy::Parachain,455		},456		sync_service.clone(),457		eth_pubsub_notification_sinks.clone(),458	);459460	// Rpc461	let rpc_builder = Box::new({462		clone!(463			client,464			backend,465			eth_backend,466			eth_pubsub_notification_sinks,467			fee_history_cache,468			eth_block_data_cache,469			overrides,470			transaction_pool,471			network,472			sync_service,473		);474		move |deny_unsafe, subscription_task_executor: SubscriptionTaskExecutor| {475			clone!(476				backend,477				eth_block_data_cache,478				client,479				eth_backend,480				eth_filter_pool,481				eth_pubsub_notification_sinks,482				fee_history_cache,483				eth_block_data_cache,484				network,485				runtime_id,486				transaction_pool,487				select_chain,488				overrides,489			);490491			#[cfg(not(feature = "pov-estimate"))]492			let _ = backend;493494			let mut rpc_handle = RpcModule::new(());495496			let full_deps = FullDeps {497				client: client.clone(),498				runtime_id,499500				#[cfg(feature = "pov-estimate")]501				exec_params: uc_rpc::pov_estimate::ExecutorParams {502					wasm_method: parachain_config.wasm_method,503					default_heap_pages: parachain_config.default_heap_pages,504					max_runtime_instances: parachain_config.max_runtime_instances,505					runtime_cache_size: parachain_config.runtime_cache_size,506				},507508				#[cfg(feature = "pov-estimate")]509				backend,510511				deny_unsafe,512				pool: transaction_pool.clone(),513				select_chain,514			};515516			create_full::<_, _, _, Runtime, _>(&mut rpc_handle, full_deps)?;517518			let eth_deps = EthDeps {519				client,520				graph: transaction_pool.pool().clone(),521				pool: transaction_pool,522				is_authority: validator,523				network,524				eth_backend,525				// TODO: Unhardcode526				max_past_logs: 10000,527				fee_history_limit,528				fee_history_cache,529				eth_block_data_cache,530				// TODO: Unhardcode531				enable_dev_signer: false,532				eth_filter_pool,533				eth_pubsub_notification_sinks,534				overrides,535				sync: sync_service.clone(),536				pending_create_inherent_data_providers: |_, ()| async move { Ok(()) },537			};538539			create_eth::<540				_,541				_,542				_,543				_,544				_,545				_,546				DefaultEthConfig<FullClient<RuntimeApi, ExecutorDispatch>>,547			>(548				&mut rpc_handle,549				eth_deps,550				subscription_task_executor.clone(),551			)?;552553			Ok(rpc_handle)554		}555	});556557	sc_service::spawn_tasks(sc_service::SpawnTasksParams {558		rpc_builder,559		client: client.clone(),560		transaction_pool: transaction_pool.clone(),561		task_manager: &mut task_manager,562		config: parachain_config,563		keystore: params.keystore_container.keystore(),564		backend: backend.clone(),565		network,566		sync_service: sync_service.clone(),567		system_rpc_tx,568		telemetry: telemetry.as_mut(),569		tx_handler_controller,570	})?;571572	if let Some(hwbench) = hwbench {573		sc_sysinfo::print_hwbench(&hwbench);574575		if let Some(ref mut telemetry) = telemetry {576			let telemetry_handle = telemetry.handle();577			task_manager.spawn_handle().spawn(578				"telemetry_hwbench",579				None,580				sc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench),581			);582		}583	}584585	let announce_block = {586		let sync_service = sync_service.clone();587		Arc::new(Box::new(move |hash, data| {588			sync_service.announce_block(hash, data)589		}))590	};591592	let relay_chain_slot_duration = Duration::from_secs(6);593594	let overseer_handle = relay_chain_interface595		.overseer_handle()596		.map_err(|e| sc_service::Error::Application(Box::new(e)))?;597598	start_relay_chain_tasks(StartRelayChainTasksParams {599		client: client.clone(),600		announce_block: announce_block.clone(),601		para_id,602		relay_chain_interface: relay_chain_interface.clone(),603		task_manager: &mut task_manager,604		da_recovery_profile: if validator {605			DARecoveryProfile::Collator606		} else {607			DARecoveryProfile::FullNode608		},609		import_queue: import_queue_service,610		relay_chain_slot_duration,611		recovery_handle: Box::new(overseer_handle.clone()),612		sync_service: sync_service.clone(),613	})?;614615	if validator {616		start_consensus(617			client.clone(),618			transaction_pool,619			StartConsensusParameters {620				backend: backend.clone(),621				prometheus_registry: prometheus_registry.as_ref(),622				telemetry: telemetry.as_ref().map(|t| t.handle()),623				task_manager: &task_manager,624				relay_chain_interface: relay_chain_interface.clone(),625				sync_oracle: sync_service,626				keystore: params.keystore_container.keystore(),627				overseer_handle,628				relay_chain_slot_duration,629				para_id,630				collator_key: collator_key.expect("cli args do not allow this"),631				announce_block,632			},633		)?;634	}635636	start_network.start_network();637638	Ok((task_manager, client))639}640641/// Build the import queue for the the parachain runtime.642pub fn parachain_build_import_queue<Runtime, RuntimeApi, ExecutorDispatch>(643	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,644	backend: Arc<FullBackend>,645	config: &Configuration,646	telemetry: Option<TelemetryHandle>,647	task_manager: &TaskManager,648) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>649where650	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>651		+ Send652		+ Sync653		+ 'static,654	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,655	Runtime: RuntimeInstance,656	ExecutorDispatch: NativeExecutionDispatch + 'static,657{658	let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;659660	let block_import = ParachainBlockImport::new(client.clone(), backend);661662	cumulus_client_consensus_aura::import_queue::<663		sp_consensus_aura::sr25519::AuthorityPair,664		_,665		_,666		_,667		_,668		_,669	>(cumulus_client_consensus_aura::ImportQueueParams {670		block_import,671		client,672		create_inherent_data_providers: move |_, _| async move {673			let time = sp_timestamp::InherentDataProvider::from_system_time();674675			let slot =676				sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(677					*time,678					slot_duration,679				);680681			Ok((slot, time))682		},683		registry: config.prometheus_registry(),684		spawner: &task_manager.spawn_essential_handle(),685		telemetry,686	})687	.map_err(Into::into)688}689690pub struct StartConsensusParameters<'a> {691	backend: Arc<FullBackend>,692	prometheus_registry: Option<&'a Registry>,693	telemetry: Option<TelemetryHandle>,694	task_manager: &'a TaskManager,695	relay_chain_interface: Arc<dyn RelayChainInterface>,696	sync_oracle: Arc<SyncingService<Block>>,697	keystore: KeystorePtr,698	overseer_handle: OverseerHandle,699	relay_chain_slot_duration: Duration,700	para_id: ParaId,701	collator_key: CollatorPair,702	announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,703}704705// Clones ignored for optional lookahead collator706#[allow(clippy::redundant_clone)]707pub fn start_consensus<ExecutorDispatch, RuntimeApi, Runtime>(708	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,709	transaction_pool: Arc<710		sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>,711	>,712	parameters: StartConsensusParameters<'_>,713) -> Result<(), sc_service::Error>714where715	ExecutorDispatch: NativeExecutionDispatch + 'static,716	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>717		+ Send718		+ Sync719		+ 'static,720	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,721	RuntimeApi::RuntimeApi: LookaheadApiDep,722	Runtime: RuntimeInstance,723{724	let StartConsensusParameters {725		backend,726		prometheus_registry,727		telemetry,728		task_manager,729		relay_chain_interface,730		sync_oracle,731		keystore,732		overseer_handle,733		relay_chain_slot_duration,734		para_id,735		collator_key,736		announce_block,737	} = parameters;738	let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;739740	let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(741		task_manager.spawn_handle(),742		client.clone(),743		transaction_pool,744		prometheus_registry,745		telemetry,746	);747	let proposer = Proposer::new(proposer_factory);748749	let collator_service = CollatorService::new(750		client.clone(),751		Arc::new(task_manager.spawn_handle()),752		announce_block,753		client.clone(),754	);755756	let block_import = ParachainBlockImport::new(client.clone(), backend.clone());757758	let params = BuildAuraConsensusParams {759		create_inherent_data_providers: move |_, ()| async move { Ok(()) },760		block_import,761		para_client: client.clone(),762		#[cfg(feature = "lookahead")]763		para_backend: backend,764		para_id,765		relay_client: relay_chain_interface,766		sync_oracle,767		keystore,768		#[cfg(not(feature = "lookahead"))]769		slot_duration,770		proposer,771		collator_service,772		// With async-baking, we allowed to be both slower (longer authoring) and faster (multiple para blocks per relay block)773		#[cfg(not(feature = "lookahead"))]774		authoring_duration: Duration::from_millis(500),775		#[cfg(feature = "lookahead")]776		authoring_duration: Duration::from_millis(1500),777		overseer_handle,778		#[cfg(feature = "lookahead")]779		code_hash_provider: move |block_hash| {780			client781				.code_at(block_hash)782				.ok()783				.map(cumulus_primitives_core::relay_chain::ValidationCode)784				.map(|c| c.hash())785		},786		collator_key,787		relay_chain_slot_duration,788		#[cfg(not(feature = "lookahead"))]789		collation_request_receiver: None,790		#[cfg(feature = "lookahead")]791		reinitialize: false,792	};793794	task_manager.spawn_essential_handle().spawn(795		"aura",796		None,797		#[cfg(not(feature = "lookahead"))]798		run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _>(params),799		#[cfg(feature = "lookahead")]800		run_aura::<_, AuraAuthorityPair, _, _, _, _, _, _, _, _, _>(params),801	);802	Ok(())803}804805fn dev_build_import_queue<RuntimeApi, ExecutorDispatch>(806	client: Arc<FullClient<RuntimeApi, ExecutorDispatch>>,807	_: Arc<FullBackend>,808	config: &Configuration,809	_: Option<TelemetryHandle>,810	task_manager: &TaskManager,811) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error>812where813	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>814		+ Send815		+ Sync816		+ 'static,817	RuntimeApi::RuntimeApi:818		sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> + sp_api::ApiExt<Block>,819	ExecutorDispatch: NativeExecutionDispatch + 'static,820{821	Ok(sc_consensus_manual_seal::import_queue(822		Box::new(client),823		&task_manager.spawn_essential_handle(),824		config.prometheus_registry(),825	))826}827828pub struct OtherPartial {829	pub telemetry: Option<Telemetry>,830	pub telemetry_worker_handle: Option<TelemetryWorkerHandle>,831	pub eth_filter_pool: Option<FilterPool>,832	pub eth_backend: Arc<fc_db::kv::Backend<Block>>,833}834835struct DefaultEthConfig<C>(PhantomData<C>);836impl<C> EthConfig<Block, C> for DefaultEthConfig<C>837where838	C: StorageProvider<Block, FullBackend> + Sync + Send + 'static,839{840	type EstimateGasAdapter = ();841	type RuntimeStorageOverride = SystemAccountId32StorageOverride<Block, C, FullBackend>;842}843844/// Builds a new development service. This service uses instant seal, and mocks845/// the parachain inherent846pub fn start_dev_node<Runtime, RuntimeApi, ExecutorDispatch>(847	config: Configuration,848	autoseal_interval: u64,849	autoseal_finalize_delay: Option<u64>,850	disable_autoseal_on_tx: bool,851) -> sc_service::error::Result<TaskManager>852where853	Runtime: RuntimeInstance + Send + Sync + 'static,854	<Runtime as RuntimeInstance>::CrossAccountId: Serialize,855	for<'de> <Runtime as RuntimeInstance>::CrossAccountId: Deserialize<'de>,856	RuntimeApi: sp_api::ConstructRuntimeApi<Block, FullClient<RuntimeApi, ExecutorDispatch>>857		+ Send858		+ Sync859		+ 'static,860	RuntimeApi::RuntimeApi: RuntimeApiDep<Runtime> + 'static,861	ExecutorDispatch: NativeExecutionDispatch + 'static,862{863	use fc_consensus::FrontierBlockImport;864	use sc_consensus_manual_seal::{865		run_delayed_finalize, run_manual_seal, DelayedFinalizeParams, EngineCommand,866		ManualSealParams,867	};868869	let sc_service::PartialComponents {870		client,871		backend,872		mut task_manager,873		import_queue,874		keystore_container,875		select_chain: maybe_select_chain,876		transaction_pool,877		other:878			OtherPartial {879				telemetry,880				eth_filter_pool,881				eth_backend,882				telemetry_worker_handle: _,883			},884	} = new_partial::<Runtime, RuntimeApi, ExecutorDispatch, _>(885		&config,886		dev_build_import_queue::<RuntimeApi, ExecutorDispatch>,887	)?;888	let net_config = sc_network::config::FullNetworkConfiguration::new(&config.network);889	let prometheus_registry = config.prometheus_registry().cloned();890891	let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =892		sc_service::build_network(sc_service::BuildNetworkParams {893			config: &config,894			net_config,895			client: client.clone(),896			transaction_pool: transaction_pool.clone(),897			spawn_handle: task_manager.spawn_handle(),898			import_queue,899			block_announce_validator_builder: None,900			warp_sync_params: None,901			block_relay: None,902		})?;903904	let collator = config.role.is_authority();905906	let select_chain = maybe_select_chain;907908	if collator {909		let block_import = FrontierBlockImport::new(client.clone(), client.clone());910911		let env = sc_basic_authorship::ProposerFactory::new(912			task_manager.spawn_handle(),913			client.clone(),914			transaction_pool.clone(),915			prometheus_registry.as_ref(),916			telemetry.as_ref().map(|x| x.handle()),917		);918919		let transactions_commands_stream: Box<920			dyn Stream<Item = EngineCommand<Hash>> + Send + Sync + Unpin,921		> = Box::new(922			transaction_pool923				.pool()924				.validated_pool()925				.import_notification_stream()926				.filter(move |_| futures::future::ready(!disable_autoseal_on_tx))927				.map(|_| EngineCommand::SealNewBlock {928					create_empty: true,929					finalize: false,930					parent_hash: None,931					sender: None,932				}),933		);934935		let autoseal_interval = Box::pin(AutosealInterval::new(&config, autoseal_interval));936937		let idle_commands_stream: Box<938			dyn Stream<Item = EngineCommand<Hash>> + Send + Sync + Unpin,939		> = Box::new(autoseal_interval.map(|_| EngineCommand::SealNewBlock {940			create_empty: true,941			finalize: false,942			parent_hash: None,943			sender: None,944		}));945946		let commands_stream = select(transactions_commands_stream, idle_commands_stream);947948		let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;949		let client_set_aside_for_cidp = client.clone();950951		if let Some(delay_sec) = autoseal_finalize_delay {952			let spawn_handle = task_manager.spawn_handle();953954			task_manager.spawn_essential_handle().spawn_blocking(955				"finalization_task",956				Some("block-authoring"),957				run_delayed_finalize(DelayedFinalizeParams {958					client: client.clone(),959					delay_sec,960					spawn_handle,961				}),962			);963		}964965		task_manager.spawn_essential_handle().spawn_blocking(966			"authorship_task",967			Some("block-authoring"),968			run_manual_seal(ManualSealParams {969				block_import,970				env,971				client: client.clone(),972				pool: transaction_pool.clone(),973				commands_stream,974				select_chain: select_chain.clone(),975				consensus_data_provider: None,976				create_inherent_data_providers: move |block: Hash, ()| {977					let current_para_block = client_set_aside_for_cidp978						.number(block)979						.expect("Header lookup should succeed")980						.expect("Header passed in as parent should be present in backend.");981982					let client_for_xcm = client_set_aside_for_cidp.clone();983					async move {984						let time = sp_timestamp::InherentDataProvider::from_system_time();985986						let mocked_parachain = cumulus_client_parachain_inherent::MockValidationDataInherentDataProvider {987							current_para_block,988							relay_offset: 1000,989							relay_blocks_per_para_block: 2,990							para_blocks_per_relay_epoch: 0,991							xcm_config: cumulus_client_parachain_inherent::MockXcmConfig::new(992								&*client_for_xcm,993								block,994								Default::default(),995								Default::default(),996							),997							relay_randomness_config: (),998							raw_downward_messages: vec![],999							raw_horizontal_messages: vec![],1000							additional_key_values: None,1001						};10021003						let slot =1004						sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(1005							*time,1006							slot_duration,1007						);10081009						Ok((time, slot, mocked_parachain))1010					}1011				},1012			}),1013		);1014	}10151016	#[cfg(feature = "pov-estimate")]1017	let rpc_backend = backend.clone();10181019	let runtime_id = config.chain_spec.runtime_id();10201021	// Frontier1022	let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));1023	let fee_history_limit = 2048;10241025	let eth_pubsub_notification_sinks: Arc<1026		EthereumBlockNotificationSinks<fc_mapping_sync::EthereumBlockNotification<Block>>,1027	> = Default::default();10281029	let overrides = overrides_handle(client.clone());1030	let eth_block_data_cache = spawn_frontier_tasks(1031		FrontierTaskParams {1032			client: client.clone(),1033			substrate_backend: backend.clone(),1034			eth_filter_pool: eth_filter_pool.clone(),1035			eth_backend: eth_backend.clone(),1036			fee_history_limit,1037			fee_history_cache: fee_history_cache.clone(),1038			task_manager: &task_manager,1039			prometheus_registry,1040			overrides: overrides.clone(),1041			sync_strategy: SyncStrategy::Normal,1042		},1043		sync_service.clone(),1044		eth_pubsub_notification_sinks.clone(),1045	);10461047	// Rpc1048	let rpc_builder = Box::new({1049		clone!(1050			client,1051			backend,1052			eth_backend,1053			eth_pubsub_notification_sinks,1054			fee_history_cache,1055			eth_block_data_cache,1056			overrides,1057			transaction_pool,1058			network,1059			sync_service,1060		);1061		move |deny_unsafe, subscription_task_executor: SubscriptionTaskExecutor| {1062			clone!(1063				backend,1064				eth_block_data_cache,1065				client,1066				eth_backend,1067				eth_filter_pool,1068				eth_pubsub_notification_sinks,1069				fee_history_cache,1070				eth_block_data_cache,1071				network,1072				runtime_id,1073				transaction_pool,1074				select_chain,1075				overrides,1076			);10771078			#[cfg(not(feature = "pov-estimate"))]1079			let _ = backend;10801081			let mut rpc_module = RpcModule::new(());10821083			let full_deps = FullDeps {1084				runtime_id,10851086				#[cfg(feature = "pov-estimate")]1087				exec_params: uc_rpc::pov_estimate::ExecutorParams {1088					wasm_method: config.wasm_method,1089					default_heap_pages: config.default_heap_pages,1090					max_runtime_instances: config.max_runtime_instances,1091					runtime_cache_size: config.runtime_cache_size,1092				},10931094				#[cfg(feature = "pov-estimate")]1095				backend,1096				// eth_backend,1097				deny_unsafe,1098				client: client.clone(),1099				pool: transaction_pool.clone(),1100				select_chain,1101			};11021103			create_full::<_, _, _, Runtime, _>(&mut rpc_module, full_deps)?;11041105			let eth_deps = EthDeps {1106				client,1107				graph: transaction_pool.pool().clone(),1108				pool: transaction_pool,1109				is_authority: true,1110				network,1111				eth_backend,1112				// TODO: Unhardcode1113				max_past_logs: 10000,1114				fee_history_limit,1115				fee_history_cache,1116				eth_block_data_cache,1117				// TODO: Unhardcode1118				enable_dev_signer: false,1119				eth_filter_pool,1120				eth_pubsub_notification_sinks,1121				overrides,1122				sync: sync_service.clone(),1123				// We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.1124				pending_create_inherent_data_providers: |_, ()| async move { Ok(()) },1125			};11261127			create_eth::<1128				_,1129				_,1130				_,1131				_,1132				_,1133				_,1134				DefaultEthConfig<FullClient<RuntimeApi, ExecutorDispatch>>,1135			>(1136				&mut rpc_module,1137				eth_deps,1138				subscription_task_executor.clone(),1139			)?;11401141			Ok(rpc_module)1142		}1143	});11441145	sc_service::spawn_tasks(sc_service::SpawnTasksParams {1146		network,1147		sync_service,1148		client,1149		keystore: keystore_container.keystore(),1150		task_manager: &mut task_manager,1151		transaction_pool,1152		rpc_builder,1153		backend,1154		system_rpc_tx,1155		config,1156		telemetry: None,1157		tx_handler_controller,1158	})?;11591160	network_starter.start_network();1161	Ok(task_manager)1162}11631164fn overrides_handle<C, BE>(client: Arc<C>) -> Arc<OverrideHandle<Block>>1165where1166	C: ProvideRuntimeApi<Block> + StorageProvider<Block, BE> + AuxStore,1167	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,1168	C: Send + Sync + 'static,1169	C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,1170	BE: Backend<Block> + 'static,1171	BE::State: StateBackend<BlakeTwo256>,1172{1173	let mut overrides_map = BTreeMap::new();1174	overrides_map.insert(1175		EthereumStorageSchema::V1,1176		Box::new(SchemaV1Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,1177	);1178	overrides_map.insert(1179		EthereumStorageSchema::V2,1180		Box::new(SchemaV2Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,1181	);1182	overrides_map.insert(1183		EthereumStorageSchema::V3,1184		Box::new(SchemaV3Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,1185	);11861187	Arc::new(OverrideHandle {1188		schemas: overrides_map,1189		fallback: Box::new(RuntimeApiStorageOverride::new(client)),1190	})1191}11921193pub struct FrontierTaskParams<'a, C, B> {1194	pub task_manager: &'a TaskManager,1195	pub client: Arc<C>,1196	pub substrate_backend: Arc<B>,1197	pub eth_backend: Arc<fc_db::kv::Backend<Block>>,1198	pub eth_filter_pool: Option<FilterPool>,1199	pub overrides: Arc<OverrideHandle<Block>>,1200	pub fee_history_limit: u64,1201	pub fee_history_cache: FeeHistoryCache,1202	pub sync_strategy: SyncStrategy,1203	pub prometheus_registry: Option<Registry>,1204}12051206pub fn spawn_frontier_tasks<C, B>(1207	params: FrontierTaskParams<C, B>,1208	sync: Arc<SyncingService<Block>>,1209	pubsub_notification_sinks: Arc<1210		EthereumBlockNotificationSinks<fc_mapping_sync::EthereumBlockNotification<Block>>,1211	>,1212) -> Arc<EthBlockDataCacheTask<Block>>1213where1214	C: ProvideRuntimeApi<Block> + BlockOf,1215	C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,1216	C: BlockchainEvents<Block> + StorageProvider<Block, B>,1217	C: Send + Sync + 'static,1218	C::Api: EthereumRuntimeRPCApi<Block>,1219	C::Api: BlockBuilder<Block>,1220	B: Backend<Block> + 'static,1221	B::State: StateBackend<BlakeTwo256>,1222{1223	let FrontierTaskParams {1224		task_manager,1225		client,1226		substrate_backend,1227		eth_backend,1228		eth_filter_pool,1229		overrides,1230		fee_history_limit,1231		fee_history_cache,1232		sync_strategy,1233		prometheus_registry,1234	} = params;1235	// Frontier offchain DB task. Essential.1236	// Maps emulated ethereum data to substrate native data.1237	params.task_manager.spawn_essential_handle().spawn(1238		"frontier-mapping-sync-worker",1239		Some("frontier"),1240		MappingSyncWorker::new(1241			client.import_notification_stream(),1242			Duration::new(6, 0),1243			client.clone(),1244			substrate_backend,1245			overrides.clone(),1246			eth_backend,1247			3,1248			0,1249			sync_strategy,1250			sync,1251			pubsub_notification_sinks,1252		)1253		.for_each(|()| futures::future::ready(())),1254	);12551256	// Frontier `EthFilterApi` maintenance.1257	// Manages the pool of user-created Filters.1258	if let Some(eth_filter_pool) = eth_filter_pool {1259		// Each filter is allowed to stay in the pool for 100 blocks.1260		const FILTER_RETAIN_THRESHOLD: u64 = 100;1261		params.task_manager.spawn_essential_handle().spawn(1262			"frontier-filter-pool",1263			Some("frontier"),1264			EthTask::filter_pool_task(client.clone(), eth_filter_pool, FILTER_RETAIN_THRESHOLD),1265		);1266	}12671268	// Spawn Frontier FeeHistory cache maintenance task.1269	params.task_manager.spawn_essential_handle().spawn(1270		"frontier-fee-history",1271		Some("frontier"),1272		EthTask::fee_history_task(1273			client,1274			overrides.clone(),1275			fee_history_cache,1276			fee_history_limit,1277		),1278	);12791280	Arc::new(EthBlockDataCacheTask::new(1281		task_manager.spawn_handle(),1282		overrides,1283		50,1284		50,1285		prometheus_registry,1286	))1287}