* init_logger: switch from log-based to tracing-based and add compatibility layer
* Move tracing profiling subscriber related config realization
* sp-tracing: change profiling to be a layer instead of a subscriber
* Enable profiling layer in cli
* Change all test env_logger init to sp_tracing::try_init_simple
* Remove all local env_logger dependency
* Add missing tracing-subscriber dependency
* frame-sudo: fix tests
* frame-support: fix tests
* Fix frame/pallet and executor tests
* Fix the remaining tests
* Use subscriber's try_init as recommended by @davidbarsky
* Be explict that the tracing-log feature is needed
* Set subscriber writer to stderr
* Shorter line width
* Update cargo lock tracing version
* Fix sc_tracing crate compile
* Fix sc_authority_discovery crate test
* unremove default-features
* Leave enabled to default true
* Warn if global default cannot be set
* Fix unused import
* Remove unused PROXY_TARGET
* Change all reference from rc5 to rc6
* Change all reference of rc2 to rc6
* Fix styling
* Fix typo
* make logger init error'ing
* re-fixing the test issue
Co-authored-by: Benjamin Kampmann <ben@parity.io>
* Stop sending messages on legacy substream altogether
* Ensure that handshake is sent back even in case of back-pressure
* Update client/network/src/protocol/generic_proto/handler/group.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Also process OpenRequest and Closed
* Also process OpenRequest and Closed
* Fix bad merge
* God I'm so lost with all these merges
* Immediately return Closed
* Add warning for sending on non-registered protocol
* Register GrandPa protocol in tests
* Update client/network/src/protocol/generic_proto/handler/group.rs
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Max Inden <mail@max-inden.de>
* Ensure that handshake is sent back even in case of back-pressure
* Update client/network/src/protocol/generic_proto/handler/group.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Also process OpenRequest and Closed
* Fix bad merge
* God I'm so lost with all these merges
* Immediately return Closed
Co-authored-by: Max Inden <mail@max-inden.de>
* client/*: Treat protocol name as str and not [u8]
Notification protocol names are in practice always valid utf8 strings.
Instead of treating them as such in the type system, thus far they were
casted to a [u8] at creation time.
With this commit protocol names are instead treated as valid utf8
strings throughout the codebase and passed as `Cow<'static, str>`
instead of `Cow<'static, [u8]>`. Among other things this eliminates the
need for string casting when logging.
* client/network: Don't allocate when protocol name is borrowed
* Wait for all notifications protocols to be open before reporting opening
* Update client/network/src/protocol/generic_proto/handler/notif_out.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Concern
* Fix attempt
* Another fix attempt
* Update client/network/src/protocol/generic_proto/handler/group.rs
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: parity-processbot <>
Co-authored-by: Max Inden <mail@max-inden.de>
* Add NetworkService::send_notifications
* Doc
* Doc
* API adjustment
* Address concerns
* Make it compile
* Start implementation
* Progress in the implementation
* Change implementation strategy again
* More work before weekend
* Finish changes
* Minor doc fix
* Revert some minor changes
* Apply suggestions from code review
* GroupError -> NotifsHandlerError
* Apply suggestions from code review
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
* state_transition_waker -> close_waker
* Apply suggestions from code review
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
* Finish renames in service.rs
* More renames
* More review suggestsions applied
* More review addressing
* Final change
* 512 -> 2048
Co-authored-by: Roman Borschel <romanb@users.noreply.github.com>
* Move the legacy protocol handshake to the legacy substream
* Fix tests
* Remove line that wasn't supposed to be committed
* Remove hack
* Rework how it's done
* Some little changes
* update_chain wasn't doing its thing
* Fix service tests not calling update_chain
* Update client/network/src/protocol/generic_proto/behaviour.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* [WIP]
* Revert "[WIP]"
This reverts commit 2b892e6a7637c0b1297e6ecdbb919321c9098ff5.
* Update client/network/src/protocol.rs
Co-authored-by: Max Inden <mail@max-inden.de>
* Fix received message not being handshake
* Update client/network/src/protocol/generic_proto/behaviour.rs
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Max Inden <mail@max-inden.de>
When a peer in `Incoming` state disconnects, the "alive" entry
in the `incoming` list for that peer must be updated (set to `false`).
Currently the entry that is updated may be an earlier entry for the
same peer that is already no longer alive. This can happen if a
peer repeatedly connects (incoming) and disconnects between invocations to
`poll()` of the behaviour.
* Add metrics about block requests
* Apply suggestions from code review
Co-Authored-By: Max Inden <mail@max-inden.de>
Co-authored-by: Gavin Wood <i@gavwood.com>
Co-authored-by: Max Inden <mail@max-inden.de>
* Drop client from sc-network and sc-client-db, move LongestChain to sc-client-api
* move leaves, cht, in_mem to sc-client-api, drop client from sc-finality-grandpa
* drop sc-service from sc-rpc
* drop sc-service from sc-consensus-aura
* drop sc-client from manual-seal and babe
* drop sc-client from utils/frame/rpc/system and utils/frame/benchmarking-cli
* drop sc-client from bin/node and bin/node-template
* drop sc-client
* fix tests
* remove check -p sc-client from gitlab.yml
* fix warnings
* fixes ui test
* fix light client tests
* adds associated Client type to AbstractService
* adds UsageProvider to Client
* fixed ui test, again
* tried and failed to get node-cli to compile for wasm
* thanks to tomaka for helping me get node-cli to compile for wasmm
* ui test pls pas 🙏🏾
* all tests passing 🪄
* no_run documentation code
* rm -f documentation code
* ClientProvider
* fix mega trait
* move LongestChain to sc-consensus, use adds minimal bounds to AbstractService::Client
* adds license to sc-consensus
Co-authored-by: Benjamin Kampmann <ben@parity.io>