-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to call arbitrary runtime apis using RelayChainInterface (#5521)
When using the relay chain though a `Arc<dyn RelayChainInterface>` there is no way to call arbitrary runtime apis. Both implementations of that trait allow this, so it feels natural to expose this functionality in the trait. This PR adds a `call_runtime_api` method to RelayChainInterface trait, and a separate function also named `call_runtime_api` which allows the caller to specify the input and output types, as opposed to having to encode them. This generic function cannot be part of the trait because a `dyn Trait` object cannot have generic methods. --------- Co-authored-by: Bastian Köcher <git@kchr.de>
- Loading branch information
1 parent
86bb5cb
commit 5a43147
Showing
8 changed files
with
136 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Allow to call arbitrary runtime apis using RelayChainInterface | ||
|
||
doc: | ||
- audience: Node Dev | ||
description: | | ||
This PR adds a `call_runtime_api` method to RelayChainInterface trait, and a separate function also named `call_runtime_api` | ||
which allows the caller to specify the input and output types, as opposed to having to encode them. | ||
|
||
crates: | ||
- name: cumulus-relay-chain-interface | ||
bump: patch | ||
- name: cumulus-client-consensus-common | ||
bump: patch | ||
- name: cumulus-client-pov-recovery | ||
bump: patch | ||
- name: cumulus-client-network | ||
bump: patch | ||
- name: cumulus-relay-chain-inprocess-interface | ||
bump: patch | ||
- name: cumulus-relay-chain-rpc-interface | ||
bump: patch |