Pierre Krieger
95ee37d242
Add alternative RPC methods to system_networkState ( #5643 )
...
* Add alternatives to system_networkState
* Fix tests
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2020-04-16 16:36:14 +01:00
Pierre Krieger
239d0998ea
Several tweaks to networking Prometheus metrics ( #5636 )
2020-04-16 15:18:35 +02:00
Toralf Wittner
4db45a85de
Use a Kademlia instance per ProtocolId. ( #5045 )
2020-04-16 10:43:40 +02:00
Pierre Krieger
efde6056f6
Temporarily increase notifications buffer size ( #5644 )
...
* Temporarily increase notifications buffer size
* Add a 511.0 bucket
2020-04-15 23:27:33 +02:00
Gavin Wood
91af5b6fcc
New database trait ( #5549 )
...
* Introduce trait
* The trait
* Generic
* Basic impls.
* Remove unneeded bounds
* Minor changes
* Switch over to the new DB trait
* Integrated parity-db and added CLI for db selection
* Default impl.
* Fix logs.
* Started integrating subdb
* Apply suggestions from code review
Co-Authored-By: Cecile Tonglet <cecile@parity.io >
* Apply suggestions from code review
Co-Authored-By: Nikolay Volf <nikvolf@gmail.com >
* Enable subdb
* Bump parity-db
* Fixed CLI macro
* Fixed browser build
* Fixed features
* Sort out features
* Use parity-db from crates.io
* Typo
Co-authored-by: arkpar <arkady.paronyan@gmail.com >
Co-authored-by: Cecile Tonglet <cecile@parity.io >
Co-authored-by: Nikolay Volf <nikvolf@gmail.com >
2020-04-15 14:38:39 +02:00
Benjamin Kampmann
3426d662f7
Switch pre-release version to dev ( #5637 )
2020-04-15 13:18:08 +02:00
Benjamin Kampmann
51f9bb3c0e
Prepping release of alpha.6 ( #5629 )
...
* bumping version
* cargo update
* adding changelog
2020-04-14 21:41:49 +02:00
Pierre Krieger
1e1b0e2767
Give names to channels ( #5626 )
...
* Give names to channels
* Fix
* A couple more changes
* More minor tweaks
* Fix test
2020-04-14 14:49:41 +02:00
Arkadiy Paronyan
76a5555031
More robust sync ( #5604 )
...
* More robust ancestry search
* Punish peers for being on the wrong fork
* Update client/network/src/protocol/sync.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-13 19:09:43 +02:00
Pierre Krieger
877a7ab531
Add metrics for the events in the network output channels ( #5597 )
...
* Add metrics for the events in the network output channels
* Documentation fixes
* A couple fixes
* Fix panic at destruction
* Rework for direct Prometheus integration
* Don't lock on the Receiver
* Another review address
* Address review
* Update client/network/src/service/out_events.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
* Fix bad event name
* Fix descriptions
* Fix names
* client/network/service/out_events: Apply remaining suggestions
Co-authored-by: Max Inden <mail@max-inden.de >
2020-04-09 20:30:34 +02:00
Pierre Krieger
ac9a852028
Update to libp2p 0.18 ( #5602 )
...
* Update to libp2p 0.18
* Update Cargo.lock
* Also bump in browser-utils
2020-04-09 18:41:21 +02:00
Roman Borschel
40c56deea3
Do not prematurely emit CustomProtocolClosed on connection close. ( #5595 )
2020-04-09 12:41:34 +02:00
Pierre Krieger
cebd073649
Report local force-closing connections to Prometheus ( #5575 )
...
* Report local force-closing connections to Prometheus
* Also report ping timeouts separately
* Address concerns of #5571
2020-04-09 11:24:01 +02:00
Pierre Krieger
0cc2e4df89
Fix #5516 ( #5560 )
...
* Add a failing test
* Make test not freeze
* Fix the bug
* Fix spaces
* Fix tests
* Apply suggestions from code review
Co-Authored-By: Toralf Wittner <tw@dtex.org >
* Make sure test doesn't succeed if nothing happened
* Fix build
* Do the events change
Co-authored-by: Toralf Wittner <tw@dtex.org >
2020-04-08 13:32:22 +02:00
Pierre Krieger
571f1daa49
Add more Prometheus metrics ( #5571 )
...
* Add more Prometheus metrics
* Update client/network/src/service.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
* Update client/network/src/service.rs
Co-Authored-By: Max Inden <mail@max-inden.de >
Co-authored-by: Gavin Wood <gavin@parity.io >
Co-authored-by: Max Inden <mail@max-inden.de >
2020-04-08 11:14:35 +02:00
Roman Borschel
f8c8355ac7
libp2p-next ( #5278 )
...
* Adapt to rust-libp2p#1440.
* Further adapt to libp2p/master.
* Update to libp2p-0.17
* Finishing touches.
* Remove stray TODO.
* Incorporate review feedback.
* Remove unused import.
2020-04-08 09:23:21 +02:00
Gavin Wood
0253793d90
More emoji ( #5556 )
2020-04-07 11:55:46 +01:00
Cecile Tonglet
3da069e359
CLI: refactoring: remove Options from sc_service::Configuration's fields ( #5271 )
...
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Rename IntoConfiguration to CliConfiguration
* Renamed into_configuration to create_configuration
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Move keystore params to its own module
* Use in-memory keystore even for build-spec
* Enforce proper value for node name
* dev_key_seed
* Telemetry endpoints
* rustfmt
* Converted all RunCmd
* rustfmt
* Added export-blocks
* Missed something
* Removed config_path in NetworkConfiguration (not used)
* Fixed warnings
* public_addresses is used but never set, keeping it
* Merge Configuration.node and NetworkConfiguration.node_name
...because they are the same thing
* Added: import-blocks
* Adding a proc_macro to help impl SubstrateCli
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Re-export spec_factory from sc_cli
* Re-added all the commands
* Refactored node_key_params
* Fixed previous refucktoring
* Clean-up and removed full_version()
* Renamed get_is_dev to not confuse with Configuration field
* Fixed sc-cli-derive example
* Fixing tests
* Fixing tests and removing some (will re-add later)
* Fixing more tests
* Removes the need of type parameter
* Converting bin/node and simplifying API
* Converting more
* Converting last command
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Fixing tests and added default for WasmExecutionMethod
* Fixing stuff
* Fixed something I broke oops
* Update Cargo.lock
* Moving things around
* Convert everything to Result
* Added new macros to simplify the impl of CliConfiguration
* Added a macro to generate CliConfiguration automatically for subcommands
* Revert... too many macros (this one is not really useful)
This reverts commit 9c516dd38b40fbc420b02c1f8e61d5b2b1a4e434.
* Renamed is_dev to get_is_dev
Good enough for now
* Fixed name roles (this is plural, not singular)
* Clean-up
* Re-export NodeKeyConfig and TelemetryEndpoints from sc_service
* Improve styling/formatting
* Added copyrights
* Added doc and fixed warnings
* Added myself to code owners
* Yes it is needed according to the history
* Revert formatting
* Fixing conflict
* Updated build.rs
* Cargo.lock
* Clean-up
* Update client/cli-derive/Cargo.toml
Co-Authored-By: Seun Lanlege <seunlanlege@gmail.com >
* Fail if using proc_macro and build.rs is not set properly
* Dropped all get_ in front of methods
* Clean-up
* Fixing proc macro missing env var
* Get the configuration inside the Runtime (needed for polkadot)
* Clean-up
* Get is_dev from argument like the others
* Get chain ID instead of chain spec from shared params
* &self is passed to spec_factory/load_spec
* Wrong text
* Fix example
* Officialize macro and made a cool doc
* Renamed spec_factory to load_spec (substrate_cli_configuration)
* Removed not so useful ChainSpec
* Renamed SubstrateCLI to SubstrateCli
* Added changelog for impl_version being full now
* Renamed Runtime to Runner
* Update changelog to show example
* Removed option on database cache size
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Fix on removal of option
* typo
* Clean-up imports
* Added info in Cargo.toml
* typo
* remarks
* Moved function for build.rs to substrate-build-script-utils
* Fixed example & test of cli-derive
* Moved function for build.rs to substrate-build-script-utils
* Renamed substrate_cli_configuration to substrate_cli oops
It implements SubstrateCli not CliConfiguration!
* Added documentation and wrapper macro
* Removed option on database cache size
* Removed option on database cache size
* Clean-up
* Reduce risk of errors due to typos
* Removed option on database cache size
* Added NOTE as suggested
* Added doc as suggested
* Fixed test
* typo
* renamed runtime to runner
* Fixed weird argument
* More commas
* Moved client/cli-derive to client/cli/derive
* Added 7 tests for the macros
* Improve error message
* Upgrade assert_cmd
* Fixing missing stuff
* Fixed unused import
* Improve SubstrateCli doc
* Applied suggestions
* Fix and clean-up imports
* Started replacing macros WIP
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* Started removing substrate_cli
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* WIP
Forked at: d6aa8e954c
Parent branch: origin/master
* fixed bug introduced while refactoring
* Renamed NetworkConfigurationParams to NetworkParams for consistency sake
* Fixed test
* Update client/cli/src/commands/runcmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/runcmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/check_block_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update bin/node/cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
This reverts commit 5906776953392c02beac6bc0bf50f8cbe1a12a01.
* Revert "Update client/cli/src/commands/check_block_cmd.rs"
This reverts commit f705f42b7f3d732be001141afee210fe46a1ef47.
* Revert "Update client/cli/src/commands/export_blocks_cmd.rs"
This reverts commit 8d57c0550164449e6eb2d3bacb04c750c714fcea.
* Revert "Update client/cli/src/commands/runcmd.rs"
This reverts commit 93e74cf5d2e1c0dc49cdff8608d59fc40fc59338.
* Revert "Update client/cli/src/commands/runcmd.rs"
This reverts commit 11d527ba345c0d79f0d3b5b071933d95474d0614.
* Update client/cli/src/commands/export_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/import_blocks_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Changed ::sc_cli to $crate in the macro
* fixed tests
* fixed conflicts
* Fixing test
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/pruning_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Remove comment as suggested
* Apply suggestion
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/commands/purge_chain_cmd.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update utils/frame/benchmarking-cli/src/command.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/runner.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/pruning_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/node_key_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/params/network_params.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/cli/src/config.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com >
* Added doc
* Fixed error introduced after applying suggestion
* Revert "Update client/cli/src/params/pruning_params.rs"
This reverts commit 0574d06a4f1efd86e94c1214420a12e7a4be0099.
* Print error
* Apply suggestions from code review
* Remove useless Results
* Fixed CI failing on polkadot approval
Co-authored-by: Seun Lanlege <seunlanlege@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2020-04-07 11:38:07 +02:00
Pierre Krieger
dba0fcbaea
Prometheus Metrics: Turn notifications_total counter into notifications_sizes histogram ( #5535 )
...
* Turn notifications_total into notifications_sizes
* Address review
2020-04-06 18:36:46 +02:00
Benjamin Kampmann
247822bb33
Additional Metrics collected and exposed via prometheus ( #5414 )
...
This PR refactors the metrics measuring and Prometheus exposing entity in sc-service into its own submodule and extends the parameters it exposes by:
- system load average (over one, five and 15min)
- the TCP connection state of the process (lsof), refs #5304
- number of tokio threads
- number of known forks
- counter for items in each unbounded queue (with internal unbounded channels)
- number of file descriptors opened by this process (*nix only at this point)
- number of system threads (*nix only at this point)
refs #4679
Co-authored-by: Max Inden <mail@max-inden.de >
Co-authored-by: Ashley <ashley.ruglys@gmail.com >
2020-04-04 15:13:35 +02:00
Pierre Krieger
8c03a4fcef
Split the Roles in three types ( #5520 )
...
* Split the Roles bitfield in three
* Forgot to include some changes
* Fix cli test
* More test fixes
* Oh God, merging master broke other tests
* Didn't run the doctests
* Address review
* I'm trying to fix the build blindly because it's taking a good hour to compile on my machine
* Address some review
* Also update the peerset's API to make sense
* Fix peerset tests
* Fix browser node
* client: distinguish between local and network authority
Co-authored-by: André Silva <andre.beat@gmail.com >
2020-04-03 19:08:14 +02:00
Pierre Krieger
c9f3d16f44
Improve warning about notifications queue and remove spurious triggers ( #5512 )
...
* Better logging for notifications and buffer size increase
* Address review
* Improve warning about notifications queue and remove spurious triggers
2020-04-03 14:14:55 +02:00
Pierre Krieger
e8dfb37aaf
Add a sub_libp2p_notifications_queues_size Prometheus metric ( #5503 )
...
* Add a sub_libp2p_notifications_queues_size Prometheus metric
* Fix network tests
* Address review
2020-04-03 08:43:55 +02:00
Gavin Wood
3b43429729
More emojies and spaces ( #5498 )
...
* More emojies and spaces
* Sync emojis
* More emoji
2020-04-02 20:17:39 +02:00
Pierre Krieger
a8aedfa16f
Switch to new light client protocol ( #5472 )
...
* Switch to the new protocol
* Oops, forgot to remove light_dispatch.rs
* Fix tests
* Address review
2020-04-01 19:44:42 +02:00
Gavin Wood
b86c7e87a9
A few missing emojies ( #5490 )
...
* A few missing emojies
* P2p message emojis
* Add a bit of colour
* format
* Introduce a couple of spaces
* Some spaces
2020-04-01 19:41:48 +02:00
Pierre Krieger
84ff6ef157
Remove DiscoveryNetBehaviour trait ( #5430 )
2020-04-01 16:25:53 +01:00
Pierre Krieger
f04486e5bc
Increase limit on light client response size ( #5461 )
...
* Increase limit on light client response size
* Address review
2020-03-31 20:16:56 +02:00
Nikolay Volf
b4d83a4b54
And one more fix to flaky tests ( #5467 )
...
* imporoved intervallier version
* remove extra event
* use version 0.3.1
* fix warning
2020-03-31 12:15:31 +02:00
Cecile Tonglet
439887a773
Allow changing the behavior for imported blocks ( #5236 )
...
* Added option to disable default block announce
* Added on_block_imported on NetworkService
* Revert "Added on_block_imported on NetworkService"
This reverts commit ba360cad96e0cb041d7047af30df2a35eb112449.
* Do not announce block if set to not announce block
* Revert fix
* Moving default announce block to NetworkConfig
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* Removing boolean in favor of explicit call
* Fixing tests
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* WIP
Forked at: ad90ab7ec9
Parent branch: origin/master
* increase spec_version
* increase spec_version
* Fixed test
* Fixing test
* Renamed should_announce_imported_blocks to announce_imported_blocks
* Updated assert_cmd
2020-03-31 11:02:16 +02:00
Pierre Krieger
dbba4f8929
Fix tried to send handshake twice ( #5413 )
...
* Fix tried to send handshake twice
* Fix wrong boolean
* Change to debug
2020-03-30 13:33:46 +02:00
Pierre Krieger
462eaa3f41
Make transactions and block announces use notifications substre… ( #5360 )
...
* Make transactions and block announces use notifications
* Add documentation
2020-03-30 10:00:34 +02:00
pscott
408455f8bc
Build for only one target for docs.rs ( #5427 )
...
* Add docs.rs metadata to all cargo.toml files
* Remove docs.rs metada in substrate's cargo.toml
2020-03-30 09:46:30 +02:00
Bastian Köcher
1242a7df3c
Upgrade parity-scale-codec to 1.3.0 ( #5443 )
2020-03-28 22:16:05 +01:00
Nikolay Volf
eed0045a0c
update futures dependency ( #5426 )
2020-03-27 12:35:48 +01:00
Gavin Wood
acab5f0570
Add emojis ( #5420 )
2020-03-27 10:41:31 +01:00
Pierre Krieger
fdbbf14fa4
Improve sc-network's documentation for network protocols ( #5364 )
...
* Improve sc-network's documentation for network protocols
* Add note about protocol id
* Apply suggestions from code review
Co-Authored-By: Max Inden <mail@max-inden.de >
Co-authored-by: Max Inden <mail@max-inden.de >
2020-03-26 12:26:30 +01:00
Arkadiy Paronyan
d474864d67
Allow syncing to peers with finalized common block ( #5408 )
...
* Allow syncing to peers with finalized common block
* Added test
2020-03-26 09:13:09 +01:00
André Silva
3a136bdcf9
Internal version dependencies cleanup ( #5401 )
...
* always depend on latest alpha version
* integrate arithmetic fuzzer into root workspace
2020-03-25 15:02:39 +01:00
Bastian Köcher
6beb6acbd5
Print an error when a bootnode is on a different chain ( #5377 )
...
* Print an error when a bootnode is on a different chain
* Fix tests
2020-03-24 14:24:09 +00:00
Benjamin Kampmann
ba06d5ef64
Releasing 2.0.0-alpha.5 ( #5340 )
...
* bump pre-version
* Changelog alpha.4->alpha.5
* repo + homepage to sp-consensus-vrf
* Add default rocksdb feature to `frame-benchmarking-cli` (#5367 )
* Add default rocksdb feature
* Update Cargo.toml
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com >
2020-03-24 15:08:02 +01:00
Stanislav Tkach
4414d00082
Get rid of rustc_hex in favor of hex ( #5370 )
...
* Get rid of rustc_hex in favor of hex
* Use HexDisplay
2020-03-24 11:48:23 +01:00
Bastian Köcher
fde05dd236
Show an error when we connect to a bootnode with a different peer id ( #5365 )
...
Currently when we connect to a bootnode and it returns a different peer
id, than the one we provided, we disconnect silently. This pr changes
the behavior to printing an error when a bootnode returns a different
peer id than the provided one.
2020-03-23 18:49:49 +01:00
Pierre Krieger
1da48b3b3f
Rewrite reconnect_after_disconnect test ( #5351 )
2020-03-23 11:50:11 +01:00
Pierre Krieger
57af4facbd
Remove the #[doc(hidden)] reexports of sc_network ( #5264 )
...
* Remove the #[doc(hidden)] reexports of sc_network
* Fix tests not building
2020-03-20 16:42:00 +01:00
Arkadiy Paronyan
a66615446d
Fixed a couple of syncing issues ( #5277 )
...
* Don't queue duplicate blocks
* Keep queue_blocks on restart
2020-03-19 14:02:07 +01:00
Benjamin Kampmann
25e25a83b9
Releasing 2.0.0-alpha.4 ( #5279 )
...
* Version bump
* Split generate_changelog.sh into separate script
Can be run in the format `generate_changelog.sh $previous_version $version`.
* remove early exit from publish_draft_release.sh
* adding changelog
* ci: change last_github_release to also find pre-releases
Co-authored-by: Martin Pugh <pugh@s3kr.it >
2020-03-18 14:37:21 +01:00
Toralf Wittner
89b93d9d4b
sc-network: Return on Poll::Pending. ( #5295 )
...
If polling encounters a `Poll::Pending` we need to return it instead of
continuing the loop which may turn it into a blocking operation, causing
problems with executors.
2020-03-18 11:21:10 +00:00
Max Inden
e91d4be998
client/network/src/protocol: Refactor Prometheus metric logic ( #5266 )
...
* client/network/src/protocol: Start Prometheus metric help with capital
* client/network/src/protocol: Differentiate metric status as label
Prometheus query language is powerful through its multi-dimensional data
model. Metric names are hirarchical whereas labels enable data to become
multi-dimensional.
Exposing the justification of finality-proof status as a label allows
for more powerful queries.
* client/network/src/protocol: Remove 'Total' from non counter metric help
The word 'total' is reserved for accumulating counters. Counters have to
be monotonically increasing. `obsolete_requests` can decrease, thereby
it is defined as a `Gauge` and not a `Counter`.
For more details on metric naming see
https://prometheus.io/docs/practices/naming/
2020-03-17 11:47:55 +01:00
Seun Lanlege
3193b0d4aa
removes use of sc_client::Client from node-transaction-factory ( #5158 )
...
* removes use of sc_client::Client from node-transaction-factory
* move sc-block-builder to [dev-dependencies] in substrate-test-runtime
2020-03-12 19:19:38 +01:00