Trie State migration rpc (#5180)

* update

* unsafe

* switch remote

* update rpc usage

* update cargo.lock

* lock from master

* updated lock
This commit is contained in:
cheme
2022-04-04 09:33:35 +02:00
committed by GitHub
parent 521f97ae48
commit 8f784d592a
4 changed files with 32 additions and 1 deletions
+24
View File
@@ -7275,6 +7275,7 @@ dependencies = [
"sp-keystore",
"sp-runtime",
"substrate-frame-rpc-system",
"substrate-state-trie-migration-rpc",
]
[[package]]
@@ -11021,6 +11022,29 @@ dependencies = [
"tokio",
]
[[package]]
name = "substrate-state-trie-migration-rpc"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=master#7a09b82772b0597cdae224f4b124d660dda9e82b"
dependencies = [
"jsonrpc-core",
"jsonrpc-core-client",
"jsonrpc-derive",
"log",
"parity-scale-codec",
"sc-client-api",
"sc-rpc-api",
"scale-info",
"serde",
"sp-core",
"sp-io",
"sp-runtime",
"sp-state-machine",
"sp-std",
"sp-trie",
"trie-db",
]
[[package]]
name = "substrate-test-client"
version = "2.0.1"
+2 -1
View File
@@ -512,6 +512,7 @@ where
let transaction_pool = transaction_pool.clone();
let select_chain = select_chain.clone();
let chain_spec = config.chain_spec.cloned_box();
let backend = backend.clone();
move |deny_unsafe,
subscription_executor: polkadot_rpc::SubscriptionTaskExecutor|
@@ -541,7 +542,7 @@ where
},
};
polkadot_rpc::create_full(deps).map_err(Into::into)
polkadot_rpc::create_full(deps, backend.clone()).map_err(Into::into)
}
};
+1
View File
@@ -29,3 +29,4 @@ pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrat
sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
beefy-gadget = { git = "https://github.com/paritytech/substrate", branch = "master" }
beefy-gadget-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
substrate-state-trie-migration-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
+5
View File
@@ -95,6 +95,7 @@ pub struct FullDeps<C, P, SC, B> {
/// Instantiate all RPC extensions.
pub fn create_full<C, P, SC, B>(
deps: FullDeps<C, P, SC, B>,
backend: Arc<B>,
) -> Result<RpcExtension, Box<dyn std::error::Error + Send + Sync>>
where
C: ProvideRuntimeApi<Block>
@@ -132,6 +133,10 @@ where
finality_provider,
} = grandpa;
io.extend_with(substrate_state_trie_migration_rpc::StateMigrationApi::to_delegate(
substrate_state_trie_migration_rpc::MigrationRpc::new(client.clone(), backend, deny_unsafe),
));
io.extend_with(SystemApi::to_delegate(FullSystem::new(client.clone(), pool, deny_unsafe)));
io.extend_with(TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone())));
io.extend_with(MmrApi::to_delegate(Mmr::new(client.clone())));