-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: Enable ChainSpec for polkadot-parachain #5205
Conversation
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
This reverts commit 2675d44.
@@ -281,12 +282,13 @@ pub(crate) trait NodeSpec { | |||
let transaction_pool = transaction_pool.clone(); | |||
let backend_for_rpc = backend.clone(); | |||
|
|||
Box::new(move |deny_unsafe, _| { | |||
Box::new(move |deny_unsafe: sc_rpc::DenyUnsafe, _| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the type needed now in contrast to before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've hit the autocomplete by mistake :D No longer needed since I was able to obtain the same by moving the initialization to the substrate builder
This reverts commit cc90001. Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
The CI pipeline was cancelled due to failure one of the required jobs. |
Signed-off-by: Alexandru Vasile <[email protected]>
Testing done:
|
Signed-off-by: Alexandru Vasile <[email protected]>
Nice one, with this refactor now all users of polkadot-sdk gets the entire rpc v2 API without having to use their own rpc extensions for it. |
prdoc/pr_5205.prdoc
Outdated
- Runtime Dev | ||
- Node Dev | ||
description: | | ||
Enables the `chainSpec_v1` rpc-v2 API for polkadot-parachains. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to re-phrase this as:
The substrate-service-builder now includes the entire rpc v2 API. The chainspec API was previously defined as rpc extension where for instance chains would need to enable it explicitly for it to be enabled which isn't the case anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
* master: (51 commits) Remove unused feature gated code from the minimal template (#5237) make polkadot-parachain startup errors pretty (#5214) Coretime auto-renew (#4424) network/strategy: Backoff and ban overloaded peers to avoid submitting the same request multiple times (#5029) Fix frame crate usage doc (#5222) beefy: Tolerate pruned state on runtime API call (#5197) rpc: Enable ChainSpec for polkadot-parachain (#5205) Add an adapter for configuring AssetExchanger (#5130) Replace env_logger with sp_tracing (#5065) Adjust sync templates flow to use new release branch (#5182) litep2p/discovery: Publish authority records with external addresses only (#5176) Run UI tests in CI for some other crates (#5167) Remove `pallet::getter` usage from the pallet-balances (#4967) pallet-timestamp: `UnixTime::now` implementation logs error only if called at genesis (#5055) [CI] Cache try-runtime check (#5179) [Backport] version bumps and the prdocs reordering from stable2407 (#5178) [subsystem-benchmark] Update availability-distribution-regression-bench baseline after recent subsystem changes (#5180) Remove pallet::getter usage from proxy (#4963) Remove pallet::getter macro usage from pallet-election-provider-multi-phase (#4487) [email protected] (#5177) ...
This PR enables the
chainSpec_v1
class for the polkadot-parachian.The chainSpec is part of the rpc-v2 which is spec-ed at: https://github.com/paritytech/json-rpc-interface-spec/blob/main/src/api/chainSpec.md.
This also paves the way for enabling a future
chainSpec_unstable_spec
on all nodes.Closes: #5191
cc @paritytech/subxt-team