You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
I think it's time to introduce the notion of multiple different networks in the substrate-network crate.
We can already connect to multiple networks by creating multiple NetworkWorkers, but that's not a great solution as we duplicate a lot of resources, and is a problem if we ever switch to a single global DHT shared between all chains.
In terms of API, we should:
Create a NetworkId struct that is an opaque struct around a u64. They don't have any meaning by themselves. We can decide that 0 means "relay chain", and N means "parachain N", but that's not the concern of substrate-network.
Modify the config::Params struct to be able to pass multiple roles, Clients, specializations, etc. and associate them to a NetworkId.
The on_block_imported, on_block_finalized, trigger_repropagate, announce_block, gossip_consensus_message, request_justification, and with_spec functions would get a NetworkId parameter to indicate which client we're talking about.