Custom RPC for Merkle Mountain Range pallet (#8137)

* Add MMR custom RPC.

* Change RuntimeApi to avoid hardcoding leaf type.

* Properly implement the new RuntimeAPI and wire up RPC.

* Extract Offchain DB as separate execution extension.

* Enable offchain DB access for offchain calls.

* Fix offchain_election tests.

* Skip block initialisation for proof generation.

* Fix integration test setup.

* Fix offchain tests. Not sure how I missed them earlier 🤷.

* Fix long line.

* One more test missing.

* Update mock for multi-phase.

* Address review grumbbles.

* Address review grumbles.

* Fix line width of a comment
This commit is contained in:
Tomasz Drwięga
2021-03-10 16:28:56 +01:00
committed by GitHub
parent 9637faae0c
commit f3d4355a20
37 changed files with 837 additions and 350 deletions
+21
View File
@@ -4112,6 +4112,7 @@ dependencies = [
"node-primitives",
"node-runtime",
"pallet-contracts-rpc",
"pallet-mmr-rpc",
"pallet-transaction-payment-rpc",
"sc-chain-spec",
"sc-client-api",
@@ -5041,6 +5042,24 @@ dependencies = [
"sp-std",
]
[[package]]
name = "pallet-mmr-rpc"
version = "3.0.0"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
"pallet-mmr-primitives",
"parity-scale-codec",
"serde",
"serde_json",
"sp-api",
"sp-blockchain",
"sp-core",
"sp-rpc",
"sp-runtime",
]
[[package]]
name = "pallet-multisig"
version = "3.0.0"
@@ -7548,6 +7567,7 @@ dependencies = [
"fnv",
"futures 0.3.12",
"futures-timer 3.0.2",
"hex",
"hyper 0.13.9",
"hyper-rustls",
"lazy_static",
@@ -9336,6 +9356,7 @@ dependencies = [
"sc-consensus",
"sc-executor",
"sc-light",
"sc-offchain",
"sc-service",
"serde",
"serde_json",