This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Simplify trait bounds in network to prepare for collator-rpc#12082
Merged
skunert merged 37 commits intoparitytech:masterfrom Aug 31, 2022
Merged
Simplify trait bounds in network to prepare for collator-rpc#12082skunert merged 37 commits intoparitytech:masterfrom
skunert merged 37 commits intoparitytech:masterfrom
Conversation
koute
reviewed
Aug 25, 2022
koute
approved these changes
Aug 26, 2022
bkchr
approved these changes
Aug 31, 2022
3 tasks
|
Fyi ipfs clients don't seem to receive responses from substate bitswap anymore after this PR... Edit: Or rather this PR #12242 finishing the job |
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
…ech#12082) * Hack towards PoC * Abstract away runtime requirement * blockchainevents * Remove bitswap * Remove unused sync more * Remove unused features in network * Re-enable bitswap change * Remove `Chain` trait bound * Reimplement blockchain-rpc-events * Move network to cumulus * Make AuthorityDiscovery async * Remove `ProofProvider` requirement from network behaviour * Extract bitswap * Adjustments after merge * Remove HeaderMetadata trait from network * Introduce NetworkHeaderBackend * Add comments * Improve comments * Move NetworkHeaderBackend to new module * Improve naming, remove redundand send + sync * Clean up generics * Fix CI * Improve comment and readability * Remove NetworkHeaderBackend * Fix Cargo.lock Co-authored-by: Sebastian Kunert <skunert@Sebastians-MacBook-Pro.fritz.box>
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a preparation PR for paritytech/cumulus#989.
Why is this needed?
We will introduce a minimal relay chain node in cumulus, which only runs a subset
of all Polkadot subsystems and also only required network functionality.
This minimal node will connect to the relay chain via RPC and fetch the required information.
This PR refactors some issues in substrate to make implementing this RPC client easier, behaviour should not change.
Change Summary
I try to remove as many bounds as possible from the client instance that goes into the network.
ProofProviderwas already unused since the sync refactoringHeaderMetadatawas already unused since the sync refactoringBlockBackendis used in theBitswapprotocol. The protocol was already optional but required theBlockBackendbound. I introduce new abstractions, and Bitswap can now be passed into the network via parameters.NetworkHeaderBackendthat accepts onlyHashinstead ofBlockId, which resembles our RPC interface more