mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 07:11:03 +00:00
Add prospective-parachain subsystem to minimal-relay-node + QoL improvements (#2223)
This PR contains some fixes and cleanups for parachain nodes: 1. When using async backing, node no longer complains about being unable to reach the prospective-parachain subsystem. 2. Parachain warp sync now informs users that the finalized para block has been retrieved. ``` 2023-11-08 13:24:42 [Parachain] 🎉 Received finalized parachain header #5747719 (0xa0aa…674b) from the relay chain. ``` 3. When a user supplied an invalid `--relay-chain-rpc-url`, we were crashing with a very verbose message. Removed the `expect` and improved the error message. ``` 2023-11-08 13:57:56 [Parachain] No valid RPC url found. Stopping RPC worker. 2023-11-08 13:57:56 [Parachain] Essential task `relay-chain-rpc-worker` failed. Shutting down service. Error: Service(Application(WorkerCommunicationError("RPC worker channel closed. This can hint and connectivity issues with the supplied RPC endpoints. Message: oneshot canceled"))) ```
This commit is contained in:
@@ -24,6 +24,7 @@ use polkadot_network_bridge::{
|
||||
NetworkBridgeTx as NetworkBridgeTxSubsystem,
|
||||
};
|
||||
use polkadot_node_collation_generation::CollationGenerationSubsystem;
|
||||
use polkadot_node_core_prospective_parachains::ProspectiveParachainsSubsystem;
|
||||
use polkadot_node_core_runtime_api::RuntimeApiSubsystem;
|
||||
use polkadot_node_network_protocol::{
|
||||
peer_set::PeerSetProtocolNames,
|
||||
@@ -144,7 +145,7 @@ fn build_overseer(
|
||||
spawner.clone(),
|
||||
))
|
||||
.statement_distribution(DummySubsystem)
|
||||
.prospective_parachains(DummySubsystem)
|
||||
.prospective_parachains(ProspectiveParachainsSubsystem::new(Metrics::register(registry)?))
|
||||
.approval_distribution(DummySubsystem)
|
||||
.approval_voting(DummySubsystem)
|
||||
.gossip_support(DummySubsystem)
|
||||
|
||||
@@ -171,12 +171,7 @@ async fn new_minimal_relay_chain(
|
||||
);
|
||||
}
|
||||
|
||||
let genesis_hash = relay_chain_rpc_client
|
||||
.block_get_hash(Some(0))
|
||||
.await
|
||||
.expect("Genesis block hash is always available; qed")
|
||||
.unwrap_or_default();
|
||||
|
||||
let genesis_hash = relay_chain_rpc_client.block_get_hash(Some(0)).await?.unwrap_or_default();
|
||||
let peer_set_protocol_names =
|
||||
PeerSetProtocolNames::new(genesis_hash, config.chain_spec.fork_id());
|
||||
let is_authority = if role.is_authority() { IsAuthority::Yes } else { IsAuthority::No };
|
||||
|
||||
Reference in New Issue
Block a user