* Adds test
* Ensure we are using the runtime version of the override/substitute wasm
* Update client/service/src/client/call_executor.rs
Co-authored-by: Anton <anton.kalyaev@gmail.com>
Co-authored-by: Anton <anton.kalyaev@gmail.com>
* Print "stalled" task on shutdown
When the node is shutting down, we give the Tokio runtime 60 seconds to shutdown. If after these 60
seconds there are still running tasks, we now print these tasks. This should help debugging nodes
that have stalled tasks.
This pr introduces a `TaskRegistry` that keeps track of all running tasks. Each task registers and
unregisters itself in this `TaskRegistry`.
* Fix rustdoc
* Update client/service/src/lib.rs
It changes the arguments of `HeaderBackend::status` method from: `BlockId<Block>` to: `Block::Hash`
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
Co-authored-by: parity-processbot <>
* rpc/chain_head: Add event structure for serialization
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Add tests for events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Add API trait for `chainHead`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Add RPC errors
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Manage subscription ID tracking for pinned blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Add tests for subscription management
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Constructor for the API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Placeholders for API implementation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Accept RPC subscription sink
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Generate the runtime API event
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement the `follow` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement the `body` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement the `header` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement the `storage` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement the `call` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement the `unpin` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update `Cargo.lock`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement `getGenesis` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Parse params from hex string
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Constuct API with genesis hash
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Add the finalized block to reported tree route
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Export the API and events for better ergonomics
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Add test module with helper functions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Test block events from the `follow` pubsub
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Test `genesisHash` getter
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Test `header` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Test `body` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Test calling into the runtime API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Test runtime for the `follow` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Add runtime code changes for `follow` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Remove space from rustdoc
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Use the `child_key` for storage queries
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Test `storage` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Test child trie query for `storage` method
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Event serialization typo
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Remove subscription aliases
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Add `NetworkConfig` parameter
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Named parameters as camelCase if present
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Implement From<ApiError> for RuntimeEvents
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Handle pruning of the best block in finalization window
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Generate initial block events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Verify that initial in-memory blocks are reported
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Verify the finalized event with forks and pruned blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Fix clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Separate logic for generating initial events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Handle stopping a subscription ID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Submit events until the "Stop" event is triggered
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Separate logic for handling new and finalized blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Extend subscription logic with subId handle
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Adjust to the new subscription mngmt API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Refuse RuntimeAPI calls without the runtime flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Verify RuntimeAPI calls without runtime flag
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Add best block per subscription
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Check storage keys for prefixes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Check storage queries with invalid prefixes
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Allow maximum number of pinned blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Test the maximum number of pinned blocks
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Adjust to origin/master and apply clippy
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* client/service: Enable the `chainHead` API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Stop subscription on client disconnect and add debug logs
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Fix sending `Stop` on subscription exit
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Check best block is descendent of latest finalized
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* chain_head/tests: Report events before pruning the best block
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Nonrecursive initial block generation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Generate initial events on subscription executor
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Reduce dev-dependencies for tokio
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Apply suggestions from code review
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* rpc/chain_head: Accept empty parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Use debug of `HexDisplay` for full format
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Enable subscription ID
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Use jsonrpsee 16.2 camelCase feature for paramaters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Use `NonZeroUsize` for `NetworkConfig` param
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/chain_head: Rename `runtime_updates` to `has_runtime_updates`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Sebastian Kunert <skunert49@gmail.com>
* Set genesis block data using the built genesis block
* Make resolve_state_version_from_wasm a separate function and some small refactorings
Useful for the commit following.
* Introduce trait BuildGenesisBlock
Substrate users can use this trait to implement their custom genesis block when constructing the
client.
* Make call_executor test compile
* cargo +nightly fmt --all
* Fix test
* Remove unnecessary clone
* FMT
* Apply review suggestions
* Revert changes to new_full_client() and new_full_parts() signature
* Remove needless `Block` type in `resolve_state_version_from_wasm`
* jsonrpsee v0.16
add backwards compatibility
run old http server on http only
* cargo fmt
* update jsonrpsee 0.16.1
* less verbose cors log
* fix nit in log: WS -> HTTP
* revert needless changes in Cargo.lock
* remove unused features in tower
* fix nits; add client-core feature
* jsonrpsee v0.16.2
* Move import queue out of `sc-network`
Add supplementary asynchronous API for the import queue which means
it can be run as an independent task and communicated with through
the `ImportQueueService`.
This commit removes removes block and justification imports from
`sc-network` and provides `ChainSync` with a handle to import queue so
it can import blocks and justifications. Polling of the import queue is
moved complete out of `sc-network` and `sc_consensus::Link` is
implemented for `ChainSyncInterfaceHandled` so the import queue
can still influence the syncing process.
* Fix tests
* Apply review comments
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update client/network/sync/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Bastian Köcher <git@kchr.de>
* Replace deprecated libp2p feature specs with correct ones
* Bump tokio to 1.21.2
* Replace async-std libp2p primitives with tokio ones
* minor: rustfmt
* Fix TestNet to run initialization in the tokio context
* Convert telemetry test from async-std to tokio
* Convert notifications tests from async-std to tokio
* Convert chain sync tests from async-std to tokio
* Ditch async-std completely
* Make executor mandatory
* Bump tokio to 1.22.0
* minor: rustfmt
* Explicitly use tokio runtime in tests
* Move more tests to explicit tokio runtime
* Explicitly set multithreaded runtime in tokio test
* minor: rustfmt
* minor: fix comment
* Replace async-std with tokio in MMR tests
* ed25519_verify: Support using dalek for historical blocks
The switch from `ed25519-dalek` to `ed25519-zebra` was actually a breaking change. `ed25519-zebra`
is more permissive. To support historical blocks when syncing a chain this pull request introduces
an externalities extension `UseDalekExt`. This extension is just used as a signaling mechanism to
`ed25519_verify` to use `ed25519-dalek` when it is present. Together with `ExtensionBeforeBlock` it
can be used to setup a node in way to sync historical blocks that require `ed25519-dalek`, because
they included a transaction that verified differently as when using `ed25519-zebra`.
This feature can be enabled in the following way. In the chain service file, directly after the
client is created, the following code should be added:
```
use sc_client_api::ExecutorProvider;
client.execution_extensions().set_extensions_factory(
sc_client_api::execution_extensions::ExtensionBeforeBlock::<Block, sp_io::UseDalekExt>::new(BLOCK_NUMBER_UNTIL_DALEK_SHOULD_BE_USED)
);
```
* Fix doc
* More fixes
* Update client/api/src/execution_extensions.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Fix merge and warning
* Fix docs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* BlockId removal: refactor: Backend::block_indexed_body
It changes the arguments of `Backend::block_indexed_body` method from: `BlockId<Block>` to: `&Block::Hash`
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
* trigger CI job
* BlockId removal: refactor: Backend::justifications
It changes the arguments of `Backend::justifications` method from: `BlockId<Block>` to: `&Block::Hash`
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
* trigger CI job
* trigger CI job
* bug fix
* match -> if
Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: Adrian Catangiu <adrian@parity.io>
It changes the arguments of `Backend::body` method from: `BlockId<Block>` to: `&Block::Hash`
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
Co-authored-by: parity-processbot <>
* Aura: Adds some compatibility mode to support old chains
In https://github.com/paritytech/substrate/pull/9132 we changed the way how we get the authorities
from the runtime. Before this mentioned pr we would call `initialize_block` before calling the
authorities runtime function. The problem with this was that when you have a block X that would
switch the authority set, it would already be signed by an authority of the new set. This was wrong,
as a block should only be signed by the current authority set. As this change is a hard fork, this
pr brings back the possibility for users that have a chain running with this old logic to upgrade.
They will need to use:
```
CompatibilityMode::UseInitializeBlock { until: some_block_in_the_future }
```
Using this compatibility mode will make the node behave like the old nodes, aka calling
`initialize_block` before doing the actual runtime call to `authorities`. Then when the given
`until` block is being build/imported the node switches to the new behaviour of not calling
`initialize_block` before. This is a hard fork, so the `until` block should be chosen wisely as a
point where all nodes in the network have upgraded.
* Fixes
* Make docs ready
* Update client/consensus/aura/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/aura/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update client/consensus/aura/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* FMT
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Introduce a middleware called `NetworkServiceProvider` which the
`ChainSync` can use to communicate with `NetworkService`. `ChainSync` is
given a `NetworkServiceHandle` which it uses to call `NetworkServiceProvider`
which then dispatches the calls to `NetworkService` on behalf of `ChainSync`.
This change will allow `ChainSync` to disconnect and report peers and
in the future it'll be possible to send requests and notifications
through the `NetworkServiceProvider`.
`NetworkServiceProvider` is needed only until the `ChainSync` object
has been removed from `Protocol`. After that, a normal `NetworkService`
handle can be passed onto `ChainSync` and these changes can be
deprecated.
Co-authored-by: parity-processbot <>
It changes the arguments of `Backend::begin_state_operation`
from: block: `BlockId<Block>` to: hash: `&Block::Hash`
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
* BlockId removal: refactor: BlockImportOperation+Bknd::finalize_block
It changes the arguments of methods of `BlockImportOperation` trait
from: block: `BlockId<Block>` to: hash: `&Block::Hash`
`Backend::finalize_block` was also changed.
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
* Review suggestion applied
thx to @davxy
* trigger CI job
* BlockId removal: refactor: Finalizer
It changes the arguments of methods of `Finalizer` trait from:
block: `BlockId<Block>` to: hash: `&Block::Hash`
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
* minor corrections
* failing test corrected
* minor rework
* BlockId removal: refactor: ProofProvider
It changes the arguments of methods of `ProofProvider` trait from:
block: `BlockId<Block>` to: hash: `&Block::Hash`
This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
* LightClientRequestHandler: excessive BlockIdTo bound removed
* imports cleanup
* formatting
* args tyeps cleanup
* Introduce `ChainSyncInterface`
`ChainSyncInterface` provides an asynchronous interface for other
subsystems to submit calls to `ChainSync`. This allows `NetworkService`
to delegate calls to `ChainSync` while still providing the same API
for other subsystems (for now). This makes it possible to move the
syncing code in piecemeal fashion out of `protocol.rs` as the calls
are just forwarded to `ChainSync`.
* Apply review comments
* Fix tests
* rpc/tx: Add transaction structures for serialization
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Add public facing `TransactionEvent`
To circumvent the fact that serde does not allow mixing
`#[serde(tag = "event")]` with
`#[serde(tag = "event", content = "block")]`
the public facing subscription structure is serialized
and deserialized to an intermmediate representation.
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Add trait for the `transaction` API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Convert RPC errors to transaction events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Implement `transaction` RPC methods
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tx-pool: Propagate tx index to events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tx-pool: Adjust testing to reflect tx index in events
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Convert tx-pool events for the new RPC spec
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Convert tx-pool `FinalityTimeout` event to `Dropped`
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* service: Enable the `transaction` API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Add tests for tx event encoding and decoding
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tx: Add indentation for subscriptions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Fix documentation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Serialize usize to hex
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tx-pool: Rename closure parameters
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* service: Separate RPC spec versions
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Use `H256` for testing block's hash
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Serialize numbers as string
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* tx-pool: Backward compatibility with RPC v1
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update client/rpc-spec-v2/src/transaction/transaction.rs
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
* rpc/tx: Remove comment about serde clone
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* rpc/tx: Use RPC custom error code for invalid tx format
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
* Update client/rpc-spec-v2/src/transaction/event.rs
Co-authored-by: James Wilson <james@jsdw.me>
* rpc/tx: Adjust internal structures for serialization/deserialization
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: James Wilson <james@jsdw.me>
* 1.Add pruning param "canonical" in sc-cli.
2.Make PruningMode's default value to ArchiveCanonical.
* Update tests in sc-state-db.
* Update tests in sc-state-db.
* 1.Add a new value `AllWithNonFinalized` in `enum BlocksPruning` which Corresponds to `blocks_pruning 0` in CLI .
2.Change value `All` to `AllFinalized` in `enum BlocksPruning` and make it to keep full finalized block history.
* Make some corresponding adjustments based on the content in the conversation.
* Update client/db/src/lib.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Apply suggestions from code review.
* 1.Change `blocks_pruning` to be like `state_pruning` .
* Fmt and add some doc.
* Update client/cli/src/params/pruning_params.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update client/cli/src/params/pruning_params.rs
Co-authored-by: Bastian Köcher <git@kchr.de>
* Update doc.
* Change `new_test_with_tx_storage` to take `BlocksPruning`.
* Fmt
Co-authored-by: Bastian Köcher <git@kchr.de>
* Use `array-bytes` for All Array/Bytes/Hex Operations
Signed-off-by: Xavier Lau <xavier@inv.cafe>
* Reorder
* Self Review
* Format
* Fix Tests
* Bump `array-bytes`
* Optimize large test res
Signed-off-by: Xavier Lau <xavier@inv.cafe>
Co-authored-by: parity-processbot <>
* Make `BasePath::new_temp_dir` return the same path for the program lifetime
Instead of returning always a different path, this now returns the same path for the entire lifetime
of the program. We still ensure that the path is cleared at the end of the program.
* Update client/service/src/config.rs
Co-authored-by: Koute <koute@users.noreply.github.com>
* Update client/service/src/config.rs
Co-authored-by: Nitwit <47109040+nitwit69@users.noreply.github.com>
* FMT
Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: Nitwit <47109040+nitwit69@users.noreply.github.com>
* Introduce `sc-network-bitswap`
Move the bitswap protocol out of `sc-network` to its own crate.
* Improve test coverage
* Remove mention of bitswap from `sc-network`
* Fix documentation
* Fix clippy and remove the void dependency
* Remove unneeded trait bound and bump prost to 0.11
* Remove native call
With the recent introduction of staging runtime apis the native call wasn't supported anymore. This
removes the entire support for this as it is not used anymore.
* FMT
* Fix benchmarks
* FIX ui tests