Falco Hirschenberger
b581604aa7
Apply some clippy lints ( #11154 )
...
* Apply some clippy hints
* Revert clippy ci changes
* Update client/cli/src/commands/generate.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/inspect_key.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/db/src/bench.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/src/client/block_rules.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/transactions.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/network/src/protocol.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Revert due to missing `or_default` function.
* Fix compilation and simplify code
* Undo change that corrupts benchmark.
* fix clippy
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/state-db/src/noncanonical.rs
remove leftovers!
* Update client/tracing/src/logging/directives.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/fork-tree/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* added needed ref
* Update frame/referenda/src/benchmarking.rs
* Simplify byte-vec creation
* let's just not overlap the ranges
* Correction
* cargo fmt
* Update utils/frame/benchmarking-cli/src/shared/stats.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/pallet/command.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Giles Cope <gilescope@gmail.com >
2022-04-30 21:28:27 +00:00
Koute
b9a20ce86b
Further reduce the CPU overhead of networking metrics ( #10875 )
...
* Simplify `num_connected_peers`
* Track requested peer counts
* Revert "Track requested peer counts"
This reverts commit 9f1c8704353df6afc17ed7e9f4ab8d8e29466ae4.
* Remove `substrate_sub_libp2p_peerset_num_requested` metric
* Remove two unused functions that I forgot to get rid of in previous commit
2022-02-18 12:35:43 +00:00
Bastian Köcher
f3662b4bba
Happy new year 2022 ( #10573 )
2022-01-03 09:22:14 +01:00
Pierre Krieger
443bdc20d6
Remove Prometheus metrics prefix ( #9543 )
...
* Remove Prometheus metrics prefix
* Fix line widths
* Missed some metrics
* Fix CLI
* Run rustfmt on modified files
* Missing prefixes
* Hopefully fix compilation
* Rustfmt protocol.rs
* Should compile now I guess
* Rustfmt
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-12-09 11:21:27 +01:00
Bastian Köcher
7b56ab15b4
Run cargo fmt on the whole code base ( #9394 )
...
* Run cargo fmt on the whole code base
* Second run
* Add CI check
* Fix compilation
* More unnecessary braces
* Handle weights
* Use --all
* Use correct attributes...
* Fix UI tests
* AHHHHHHHHH
* 🤦
* Docs
* Fix compilation
* 🤷
* Please stop
* 🤦 x 2
* More
* make rustfmt.toml consistent with polkadot
Co-authored-by: André Silva <andrerfosilva@gmail.com >
2021-07-21 14:32:32 +00:00
Max Inden
3f629f743b
client/network: Use request response for block requests ( #7478 )
...
* client/network: Add scaffolding for finality req to use req resp
#sc
* client/network/src/finality_requests: Remove
* client/network/src/behaviour: Pass request id down to sync
* client/network: Use request response for block requests
* client/network: Move handler logic into *_*_handler.rs
* client/network: Track ongoing finality requests in protocol.rs
* client/network: Remove commented out finalization initialization
* client/network: Add docs for request handlers
* client/network/finality_request_handler: Log errors
* client/network/block_request_handler: Log errors
* client/network: Format
* client/network: Handle block request failure
* protocols/network: Fix tests
* client/network/src/behaviour: Handle request sending errors
* client/network: Move response handling into custom method
* client/network/protocol: Handle block response errors
* client/network/protocol: Remove tracking of obsolete requests
* client/network/protocol: Remove block request start time tracking
This will be handled generically via request-responses.
* client/network/protocol: Refactor on_*_request_started
* client/network: Pass protocol config instead of protocol name
* client/network: Pass protocol config in tests
* client/network/config: Document request response configs
* client/network/src/_request_handler: Document protocol config gen
* client/network/src/protocol: Document Peer request values
* client/network: Rework request response to always use oneshot
* client/network: Unified metric reporting for all request protocols
* client/network: Move protobuf parsing into protocol.rs
* client/network/src/protocol: Return pending events after poll
* client/network: Improve error handling and documentation
* client/network/behaviour: Remove outdated error types
* Update client/network/src/block_request_handler.rs
Co-authored-by: Ashley <ashley.ruglys@gmail.com >
* Update client/network/src/finality_request_handler.rs
Co-authored-by: Ashley <ashley.ruglys@gmail.com >
* client/network/protocol: Reduce reputation on timeout
* client/network/protocol: Refine reputation changes
* client/network/block_request_handler: Set and explain queue length
* client/service: Deny block requests when light client
* client/service: Fix role matching
* client: Enforce line width
* client/network/request_responses: Fix unit tests
* client/network: Expose time to build response via metrics
* client/network/request_responses: Fix early connection closed error
* client/network/protocol: Fix line length
* client/network/protocol: Disconnect on most request failures
* client/network/protocol: Disconnect peer when oneshot is canceled
* client/network/protocol: Disconnect peer even when connection closed
* client/network/protocol: Remove debugging log line
* client/network/request_response: Use Clone::clone for error
* client/network/request_response: Remove outdated comment
With libp2p v0.33.0 libp2p-request-response properly sends inbound
failures on connections being closed.
Co-authored-by: Addie Wagenknecht <addie@nortd.com >
Co-authored-by: Ashley <ashley.ruglys@gmail.com >
2021-01-05 18:20:54 +00:00
Bastian Köcher
e3e651f72c
Happy new year ( #7814 )
...
* Happy new year
Updates the copyright years and fixes wrong license headers.
* Fix the template
* Split HEADER into HEADER-APACHE & HEADER-GPL
2021-01-04 09:03:13 +00:00
André Silva
1871a95088
grandpa: remove light-client specific block import pipeline ( #7546 )
...
* grandpa: remove light-client specific block import
* consensus, network: remove finality proofs
2020-11-23 14:28:55 +00:00
Max Inden
3d94d80309
client/network: Expose number of entries per Kademlia bucket ( #7104 )
...
Extend `sub_libp2p_kbuckets_num_nodes` Prometheus metric to expose the
number of nodes per bucket per Kademlia instance instead of only per
Kademlia instance.
2020-09-15 09:34:22 +00:00
Roman Borschel
ec47877288
Refactor & detach network metrics. ( #6986 )
...
* Refactor sc-network/service metrics.
1. Aggregate sc-network metrics into a submodule, introducing
two more sourced metrics to avoid duplicate atomics.
2. Decouple periodic sc-service network metrics from other
metrics, so that they can be updated independently.
* Update client/service/src/metrics.rs
* Update client/service/src/metrics.rs
2020-09-06 19:59:05 +02:00