* network: Only insert global addresses into the DHT.
Currently every address reported via libp2p-identify is inserted into
the DHT which thus contains a multitude of unreachable addresses such
as from 127.0.0.0/8 or 10.0.0.0/8.
Issue #5099 suggested a dedicated service over UDP to gauge the
reachability of an address, which would however incur extra I/O costs
and be of limited use.
As an alternative and simpler tactic, this PR only allows global IP
addresses to be inserted into the DHT unless an explicit command-line
flag `--allow-non-global-addresses-in-dht` is given or a node is
started with `--dev`. This opt-in behaviour is meant to allow
site-local networks to still make use of a DHT.
* Enable non-global in more test setups.
* Replace command-line option with different name.
* Another test fix.
* Make network_config_path an Option
* Fix network tests
* Use None as the network config path
* Fix cli
* Don't make PathBuf an Option in a cli context
Instead of just listening on ipv4 by default, this enables listening on
ipv6 as well. While doing this, it also fixes a bug which lead to always
listen on all sockets, even if we specify listen addresses explicitly.
* 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>
* Make verbosity level mandatory instead of defaulting to 0 when using --telemetry-url
* Update README docs
* Change TelemetryError struct to enum
* Return TelemetryParsingError instead of a Boxed dyn error
* Replace spaces by tabs
* Add example of expected format for telemetry-url
* Remove UrlParsingError; Call to_string instead of parse for TelemetryEndpoints url
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>
* 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>
The signal handler will be reset to the default system one. This means
the program will be exited instead of panicking. This is required to
support piping in the console.
* Check for url validity when creating TelemetryEndpoints
* Update code that used TelemetryEndpoints::new()
* Update commennts that referred to TelemetryEndpoints::new()
* Add tests for telemetry
* Fix typo and fix code in docs
* Return error on failing to override telemetry
* Use expect instead of suppressing errors on must-be-valid telemetry endpoints
* Update telemetry unit tests to use expect instead of unwrap
* Implement custom deserializer for TelemetryEndpoints
* Fix typo
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* switching to released wasmtime
* update depdencies in general
* Update fdlimit
* Update parity common deps
* Also update schnorrkel
* update kvdb-rocksdb
* update further dependents
* also update primitive types
* update cargo.lock
* update merlin
* Bumping evm version
* 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>
* Use CLI to configure max instances cache
* Fix tests
* Move default value into CLI
* Use SmallVec
* Apply review comments
* Get rid of `SmallVec`
Co-authored-by: Bastian Köcher <git@kchr.de>
The only up-to-date deployment of PolkadotJS apps is currently on https://polkadot.js.org/apps/.
https://substrate-ui.parity.io is only useful as deliberately kept outdated version of Apps, to be used for projects still on Substrate 1.0
It cannot be used with the up-to-date chains running the Substrate 2.0 codebase, and probably won't be maintained much longer.
* Make export blocks default to json on stdout
* Multiline instead of single line to stay under 100 cols
* Change --json flag to --binary, defaulting to json
This patch renames the crate for the following two reasons:
1. The prometheus-exporter crate introduces native in-process Prometheus
style instrumentation to the Substrate project. Within the Prometheus
ecosystem the term "exporter" is used for external processes exposing
metrics for e.g. the Linux Kernel. In-process exposition would be
described via the term "endpoint".
2. "prometheus-exporter" is generic and ignores the fact that it is only
usable within the context of Substrate. In addition the name
"prometheus-exporter" is already taken on crates.io.
* setting first batch of descriptions
* fix what I just broke
* next batch
* and pallets, too
* last batch
* set cargo.lock
* keep'em dev-deps
* bump version to alpha.2
* Initial commit
Forked at: ad90ab7ec9
Parent branch: origin/master
* Increase killing grace period of CLI tests and display more info
* Use --dev everywhere possible
* Put pruning mode to its own params struct
* Add pruning params to export-blocks command
* Added missing file
* Removed not-dev mode in tests
* Add pruning mode to the revert command
* Decrease killing grace period again
* Move back unsafe_pruning to import_params
* Applied proposed changes
* setting versions to development pre-release
fixing version in dependencies
* unset already released wasm-builder
* do not publish test crates
* adding licenses
* setting homepage metadata
* set repository url
Related to #4776
Related to https://github.com/paritytech/polkadot/pull/832
To summarize the changes:
1. I did not manage to validate with types the service's Configuration. But I did reduce the possibility of errors by moving all the "fill" functions to their respective structopts
2. I split params.rs to multiple modules: one module params for just CLI parameters and one module commands for CLI subcommands (and RunCmd). Every command and params are in their own file so things are grouped better together and easier to remove
3. I removed the run and run_subcommand helpers as they are not helping much anymore. Running a command is always a set of 3 commands: 1. init 2. update config 3. run. This still allow the user to change the config before arguments get parsed or right after.
4. I added tests for all subcommands.
5. [deleted]
Overall the aim is to improve the situation with the Configuration and the optional parameters, add tests, make the API more consistent and simpler.
* Refactor rebase master prometheus_v0.3
* Milestone1: Final Version of v0.3
* no-std or warm compatibility issues, grapana-data -source code reference and correction,applicable
* Cargo.lock paritytech/master rebase
* prometheus networking.rs del, grafana-data-source networking.rs pub edit and note
* chore: reflect various feedback
* Spaces to tabs.
* Replace grafana and tidy
* Add generics
* Add photo back
* Re-fix spaces in primitives/consensus/babe/src/inherents.rs
* Refactor rebase master prometheus_v0.3
* Milestone1: Final Version of v0.3
* no-std or warm compatibility issues, grapana-data -source code reference and correction,applicable
* prometheus networking.rs del, grafana-data-source networking.rs pub edit and note
* chore: reflect various feedback
* Replace grafana and tidy
* Add generics
* Add photo back
* Re-fix spaces in primitives/consensus/babe/src/inherents.rs
* chore: revert this file back to paritytech/master inherents.rs.
* Add newline at EOF
* Tidy
* Use local registry
* fix typo
Co-Authored-By: Max Inden <mail@max-inden.de>
* chore: Apply review feedback
* endpoint -> exporter
* fix readme
* Remove lazy_static, use ServiceMetrics struct instead
* Switch to using GaugeVecs
* chore: without nightly , edit README
* block_height -> block_height_number
* Switch to a ready_transactions_number gauge
* Update utils/prometheus/src/lib.rs
Co-Authored-By: Max Inden <mail@max-inden.de>
* no-prometheus flag add
* /metrics url Input check
* remove prometheus in Tracing
* remove prometheus in Tracing
* chore: master code rebase edit
* gitlab-check-web-wasm edit code
* From:from and cargo.lock update
* with_prometheus_registry add background_tasks
* utils/prometheus/src/lib.rs: Restructure #[cfg] for wasm without hyper
Given that Hyper is not compatible with WASM targets it needs to be
excluded from WASM builds. Instead of introducing #[cfg] lines
throughout the crate, this patch splits the crate into two: known_os and
unknown_os (WASM).
* utils/prometheus/src/lib.rs: Feature gate known_os module
* client/cli/src/lib.rs: Re-add newline at end of file
Co-authored-by: JeseonLEE <zeroday26@gmail.com>
Co-authored-by: Gavin Wood <github@gavwood.com>
Co-authored-by: Ashley <ashley.ruglys@gmail.com>
Co-authored-by: Hyungsuk Kang <hskang9@gmail.com>
This prs cleans up some of the frame benchmarking stuff:
- Move CLI into `frame-benchmarking-cli`. No frame related CLI should
exists in the default Substrate CLI.
- Move all traits and types related to frame benchmarking into the
`frame-benchmarking` trait. Frame types should be isolated in Frame.
* Add command-line flag to enable yamux flow control.
We never enabled proper flow-control for yamux streams which may cause
stream buffers to exceed their configured limit when the stream
producer outpaces the stream consumer. By switching the window update
mode to on-read, producers will only receive more sending credit when
all data has been consumed from the stream buffer. Using this option
creates backpressure on producers. However depending on the protocol
there is a risk of deadlock, if both endpoints concurrently attempt to
send more data than they have credit for and neither side reads before
finishing their writes. To facilitate proper testing, this PR adds a
command-line flag `use-yamux-flow-control`.
* Replace comment with generic message.