icodezjb
7f1bff9462
Speed up big chainspec json(~1.5 GB) load ( #10137 )
...
* Speed up chainspec json load
* Update client/chain-spec/src/chain_spec.rs
* Update client/chain-spec/src/chain_spec.rs
* Update client/chain-spec/src/chain_spec.rs
* Load the chainspec through `mmap`
Co-authored-by: icodezjb <icodezjb@users.noreply.github.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Jan Bujak <jan@parity.io >
2021-11-01 12:58:18 +00:00
Arkadiy Paronyan
710265a4f8
Fix transaction pool rejection ( #10138 )
...
* Fix transaction rejection
* Update client/service/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-11-01 09:17:50 +00:00
Koute
8c2ea19085
Strip out control codes from the logged messages ( #10081 )
...
* Strip out control codes from the logged messages
* Also strip away C1 control codes
* Add extra comments
* Clear the buffer after flushing; rename `write` to `flush`
* Move control code stripping into its own function
* Also strip out control codes from panic messages
* Also strip out Unicode left-to-right/right-to-left control codes
2021-11-01 08:46:32 +00:00
Bastian Köcher
47c7447106
Offchain-worker: Make it possible to disable http support ( #10087 )
...
* Offchain-worker: Make it possible to disable http support
If a chain doesn't require http support in its offchain workers, this pr enables them to disable the
http support.
* Switch to bitflags
* Use Capabilities
* Update client/offchain/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Fix test
* Update client/offchain/src/lib.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
2021-10-31 19:13:19 +01:00
Squirrel
744bc44de2
Removal of light client from substrate ( #9684 )
...
* Removal of light client from substrate
* add missing import
* These tests relate to there being light and non light clients.
* removing lightnodes from test
* cargo fmt
* not needed
* LightDataChecker not needed any longer
* cargo fmt
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Update client/service/test/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* cargo fmt
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-30 12:38:27 +00:00
dependabot[bot]
277d74fbb2
Bump libc from 0.2.103 to 0.2.105 ( #10115 )
...
Bumps [libc](https://github.com/rust-lang/libc ) from 0.2.103 to 0.2.105.
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.103...0.2.105 )
---
updated-dependencies:
- dependency-name: libc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-29 10:18:33 +00:00
Koute
3d5f093ddb
Speed up logging once again ( #9981 )
...
* Update `tracing`-related dependencies
* Enable `parking_lot` feature in `tracing-subscriber`
* Add an asynchronous stderr logger
* Make clippy happy
* Add an integration test for the logger
* Refactor `test_logger_filters`'s subprocess machinery into a separate function
* Use a child process instead of hooking into stderr for the test
* Add a doc comment for `MakeStderrWriter`
* Move the initialization into the `MakeStderrWriter`'s constructor
* Add an extra test case to trigger the logger's emergency flush mechanism
* Use the buffer's mutex for asynchronous flushes
* Remove vestigial `nix` dependency from one of the previous commits
2021-10-21 16:54:15 +00:00
Robert Klotzner
8e5b4e3826
Slightly improved documentation. ( #9976 )
...
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com >
Co-authored-by: Giles Cope <gilescope@gmail.com >
2021-10-19 18:52:50 +01:00
Pierre Krieger
724350418e
Don't print "Discovered new external" line for private IPs ( #10055 )
2021-10-19 13:56:09 +02:00
Bastian Köcher
d25d3896d7
Make duration calculation robust against clock drift ( #10042 )
...
It is possible that `Instant::now()` is returning an earlier clock time when being called a second
time. To guard against this, we should use `saturating_duration_since`.
2021-10-18 08:18:13 +00:00
Kian Paimani
e4f9213871
make the ws buffer size configurable ( #10013 )
...
* make the ws buffer size configurable
* Update client/cli/src/commands/run_cmd.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/cli/src/commands/run_cmd.rs
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com >
* Update client/cli/src/commands/run_cmd.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Final touches
* Apply suggestions from code review
* fix bench
* remove in buffer
* 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 >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-14 11:44:07 +00:00
Dan Shields
8db7ec9cc9
Migrate to docs.substrate.io throughout ( #10007 )
...
* all reverences of substrate.dev replaced with *correct* docs.substrate.io links
* fix links in non-cargo files, errors in replace
* homepage https://substrate.io
* cargo +nightly fmt
* FMT
Co-authored-by: Bastian Köcher <info@kchr.de >
2021-10-13 12:56:56 -06:00
dependabot[bot]
f2915e2931
Bump retain_mut from 0.1.3 to 0.1.4 ( #10021 )
...
Bumps [retain_mut](https://github.com/upsuper/retain_mut ) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/upsuper/retain_mut/releases )
- [Commits](https://github.com/upsuper/retain_mut/commits )
---
updated-dependencies:
- dependency-name: retain_mut
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-13 19:17:15 +02:00
Bastian Köcher
1fb762dac9
Ensure we don't create gap epochs when importing multiple genesis epochs ( #10019 )
...
The babe `authoring_blocks` test was flaky because it could happen that
we imported the first block multiple times. This lead to import the
genesis epoch multiples times. `EpochChanges` was assuming that
importing a genesis epoch while there was already an imported epoch
means that there is a "gap". However, this wasn't true as we just
imported 2 genesis epochs. The bug is solved by checking that the
already imported epochs are not all genesis epochs.
2021-10-13 11:31:36 +00:00
dependabot[bot]
71c8d423ca
Bump parity-scale-codec from 2.2.0 to 2.3.1 ( #9998 )
...
* Bump parity-scale-codec from 2.2.0 to 2.3.1
Bumps [parity-scale-codec](https://github.com/paritytech/parity-scale-codec ) from 2.2.0 to 2.3.1.
- [Release notes](https://github.com/paritytech/parity-scale-codec/releases )
- [Changelog](https://github.com/paritytech/parity-scale-codec/blob/master/CHANGELOG.md )
- [Commits](https://github.com/paritytech/parity-scale-codec/compare/v2.2...parity-scale-codec-v2.3.1 )
---
updated-dependencies:
- dependency-name: parity-scale-codec
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
* Update UI test expectations
* Update UI test expectations
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
2021-10-13 06:49:17 +00:00
Chris Sosnin
806b426a8f
sc-executor-wasmtime: upgrade wasmtime to 0.30.0 ( #10003 )
...
* sc-executor-wasmtime: upgrade wasmtime to 0.30.0
Changes related to memory64 proposal implementation,
for additional details see bytecodealliance/wasmtime#3153
* sc-executor-wasmtime: introduce parallel_compilation flag
* typos
2021-10-12 15:15:23 +00:00
Squirrel
98c157886c
Switch to using ss58-registry crate ( #9755 )
...
* Switch to using ss58-registry crate
* Custom(42) is now eq to Substrate
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com >
2021-10-12 09:54:40 +01:00
Wei Tang
582ac8f932
pow: add Version for quick-check of metadata state and refactor lock handling ( #9698 )
...
* pow: add Version for quick-check of metadata state and refactor lock handling
* typo: mut self -> self
* Run rustfmt
* typo: grammar
2021-10-12 03:50:21 +00:00
Bastian Köcher
acd39cbc6c
sc-offchain: Fix flaky http tests ( #10000 )
2021-10-11 19:50:12 +02:00
dependabot[bot]
991bc30148
Bump pin-project from 1.0.5 to 1.0.8 ( #9999 )
...
Bumps [pin-project](https://github.com/taiki-e/pin-project ) from 1.0.5 to 1.0.8.
- [Release notes](https://github.com/taiki-e/pin-project/releases )
- [Changelog](https://github.com/taiki-e/pin-project/blob/main/CHANGELOG.md )
- [Commits](https://github.com/taiki-e/pin-project/compare/v1.0.5...v1.0.8 )
---
updated-dependencies:
- dependency-name: pin-project
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-11 15:24:24 +00:00
dependabot[bot]
e98a2edfc9
Bump syn from 1.0.76 to 1.0.80 ( #9995 )
...
Bumps [syn](https://github.com/dtolnay/syn ) from 1.0.76 to 1.0.80.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/1.0.76...1.0.80 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-11 12:23:02 +00:00
dependabot[bot]
c7a7d1911d
Bump quote from 1.0.9 to 1.0.10 ( #9980 )
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.9 to 1.0.10.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.9...1.0.10 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-11 04:25:52 +00:00
dependabot[bot]
ee7b4f06d7
Bump hex-literal from 0.3.1 to 0.3.3 ( #9974 )
...
Bumps [hex-literal](https://github.com/RustCrypto/utils ) from 0.3.1 to 0.3.3.
- [Release notes](https://github.com/RustCrypto/utils/releases )
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.1...hex-literal-v0.3.3 )
---
updated-dependencies:
- dependency-name: hex-literal
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-09 14:23:57 +00:00
Dan Shields
3319cad9be
add note on --dev behavior ( #9953 )
...
* add note on `--dev` behavior
* Update client/cli/src/params/shared_params.rs
* Update client/cli/src/params/shared_params.rs
* clippy fmt
* Update client/cli/src/params/shared_params.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
* Update client/cli/src/params/shared_params.rs
Co-authored-by: adoerr <0xad@gmx.net >
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-10-09 06:16:27 +00:00
Andronik Ordian
12f958faa8
NetworkService: change remove_from_peers_set to accept PeerIds ( #9964 )
...
* NetworkService: expose split_multiaddr_and_peer_id
* Revert "NetworkService: expose split_multiaddr_and_peer_id"
This reverts commit 47b9a0d57c3617e64d01c449afca8896bd4bb6b6.
* change remove_from_peer_set to accets PeerIds
* fixes
* try fixing it
* try fixing it again
* FMT
* revert me
* Revert "revert me"
This reverts commit 1ea34f473f1aedc8b3e6e888d1ad2e1b45eaa1e0.
2021-10-08 15:31:18 +00:00
Bastian Köcher
f4b287c7c4
Disable log reloading by default ( #9966 )
...
* Disable log reloading by default
This disables the log reloading that was enabled by default. The problem
is that the log reload implementation of `tracing` is using a lock to
make the layer replaceable. This lock needs to be locked every time we
need to check if a particular target is enabled (assuming the log level
is high enough). This kills the performance when for example
`sometarget=trace` logging is enabled.
* 🤦
* Remove unused parameter
* Fix test
* Fix
2021-10-08 11:46:08 +00:00
Bastian Köcher
d61d710bb8
Use correct db path for parity-db ( #9971 )
...
This was overseen in: https://github.com/paritytech/substrate/pull/9500
2021-10-08 12:05:07 +02:00
dependabot[bot]
3fcc4d7e17
Bump regex from 1.4.3 to 1.5.4 ( #9969 )
...
Bumps [regex](https://github.com/rust-lang/regex ) from 1.4.3 to 1.5.4.
- [Release notes](https://github.com/rust-lang/regex/releases )
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/regex/compare/1.4.3...1.5.4 )
---
updated-dependencies:
- dependency-name: regex
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-08 09:40:16 +00:00
Bastian Köcher
451413f47e
Transaction pool: Adds benchmark and improves performance ( #9958 )
...
* Yep
* Make it compile
* Make the benchmark work
* Some stuff
* Optimize transaction pool `BestIterator`
* Some docs
* Fix more warnings
* Fix compilation
* FMT
2021-10-08 10:02:25 +02:00
Wei Tang
a5926462c1
Remove unnecessary mut reference in handle_justification ( #9968 )
2021-10-08 02:44:24 +00:00
dependabot[bot]
cec88b7144
Bump tracing from 0.1.25 to 0.1.29 ( #9956 )
...
Bumps [tracing](https://github.com/tokio-rs/tracing ) from 0.1.25 to 0.1.29.
- [Release notes](https://github.com/tokio-rs/tracing/releases )
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.25...tracing-0.1.29 )
---
updated-dependencies:
- dependency-name: tracing
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 17:18:13 +02:00
Robert Klotzner
44824ae472
Expose set_reserved_peers ( #9960 )
2021-10-07 14:03:47 +00:00
dependabot[bot]
370439ee82
Bump prometheus from 0.11.0 to 0.12.0 ( #9454 )
...
Bumps [prometheus](https://github.com/tikv/rust-prometheus ) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/tikv/rust-prometheus/releases )
- [Changelog](https://github.com/tikv/rust-prometheus/blob/master/CHANGELOG.md )
- [Commits](https://github.com/tikv/rust-prometheus/compare/v0.11.0...v0.12.0 )
---
updated-dependencies:
- dependency-name: prometheus
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 12:13:29 +00:00
Davide Gessa
44d1425e5c
Replace is_global to is_private, maybe fixing #9922 ( #9943 )
...
* replace is_global to is_private, maybe fixing #9922
* use of ip_network for private_ipv4 filtering
* check is_global for both ip4 and ip6
* fix for rustfmt
2021-10-07 09:51:01 +00:00
Arkadiy Paronyan
e6ff531d0b
Warp sync part II ( #9284 )
...
* Gap sync
* Gap epoch test
* Simplified network requests
* Update client/db/src/utils.rs
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
* Fixed v1 migration and added some comments
* Next epoch is always regular
* Removed fork tree change
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* Added a comment and converted assert to error
Co-authored-by: cheme <emericchevalier.pro@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-07 09:31:39 +00:00
Squirrel
9f1c3acb7d
Avoid hangs in tests ( #9949 )
...
* Avoid hangs in tests
* set timeout for 10 mins.
2021-10-07 09:08:57 +00:00
dependabot[bot]
c45981f789
Bump parity-db from 0.3.1 to 0.3.2 ( #9944 )
...
Bumps [parity-db](https://github.com/paritytech/parity-db ) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/paritytech/parity-db/releases )
- [Commits](https://github.com/paritytech/parity-db/commits )
---
updated-dependencies:
- dependency-name: parity-db
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-06 18:45:25 +02:00
Bastian Köcher
6f40318ca2
--dev implies --tmp (#9938 )
...
* `--dev` implies `--tmp`
This changes `--dev` to imply `--tmp` when no explicit `--base-path` is provided.
* Update client/cli/src/commands/run_cmd.rs
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io >
2021-10-06 09:20:21 +00:00
Koute
dbc97029b6
Update multiple dependencies ( #9936 )
2021-10-05 14:22:28 +00:00
Koute
400f3e6579
Speed up timestamp generation when logging ( #9933 )
...
* Speed up timestamp generation when logging
* Align to review comments.
* Correct a typo
2021-10-05 12:15:18 +00:00
Squirrel
3a53892e2f
Improved file not found error message ( #9931 )
...
* Say where you looked for the file
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-05 09:42:33 +01:00
Bastian Köcher
cb77e783b7
Require crypto scheme for insert-key ( #9909 )
...
* Require crypto scheme for `insert-key`
We should not "guess" the scheme as this can depend on the
implementation of the runtime etc.
* FMT
2021-10-04 20:55:36 +00:00
Tomasz Drwięga
8ae18720e6
Introduce block authorship soft deadline ( #9663 )
...
* Soft limit.
* Add soft deadline tests.
* cargo +nightly fmt --all
* Fix sc-service test.
* Improving tests
2021-10-04 14:30:46 +00:00
Squirrel
c9410186f1
add clippy to CI ( #9694 )
...
* Focus on correctness lints. This relies on a compiler patch that landed 8th July 2021.
If people are using an earlier version of the compiler everything will still work unless they try and run clippy.
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io >
2021-10-03 17:09:26 +01:00
Robert Habermeier
06c4e20992
Ensure BeforeBestBlockBy voting rule accounts for base ( #9920 )
...
* Ensure BeforeBestBlockBy voting rule accounts for base
* fmt
Co-authored-by: Andronik Ordian <write@reusable.software >
2021-10-03 15:15:30 +02:00
Tomasz Drwięga
085935dd0a
Quickly skip invalid transactions during block authorship. ( #9789 )
...
* Support skipping invalid transactions in the iterator.
* Expose concrete iterator.
* cargo +nightly fmt --all
* More consistent placement.
* Update Cargo.lock
* Pass transaction to 'report_invalid'
2021-10-01 14:25:13 +00:00
Liu-Cheng Xu
00973f5b62
Clean up sc-peerset ( #9806 )
...
* Clean up sc-peerset
* cargo +nightly fmt --all
* Nit
* Nit
* .
* Nit
* .
* Apply suggestions from code review
* .
* Update client/peerset/src/peersstate.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-10-01 09:43:55 +00:00
Bastian Köcher
a58b5a947f
Fix basic authorship flaky test ( #9906 )
...
The test is flaky because sometimes we hit the 9 seconds deadline when
the CI was probably on high load. To "solve" this we just use an huge
deadline that should never be triggered. The deadline isn't required anyway.
2021-09-30 14:58:28 +02:00
Éloïs
6898e8416b
add feature wasmtime-jitdump ( #9871 )
...
* add feature wasmtime-jitdump
* remove unwrap
* always enable wasmtime/jitdump feature
* env WASMTIME_PROFILING_STRATEGY: retun an error for unknown value
* Add doc for env var WASMTIME_PROFILING_STRATEGY
* Update client/executor/wasmtime/Cargo.toml
Co-authored-by: Sergei Shulepov <s.pepyakin@gmail.com >
* warning instead of error
* Update client/executor/wasmtime/src/runtime.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
* update doc: unknown value cause warning instead of error
* log warning only once
* static right next to the usage
Co-authored-by: Sergei Shulepov <s.pepyakin@gmail.com >
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com >
2021-09-29 22:10:12 +02:00
Liu-Cheng Xu
802afa9f22
Return target_hash for finality_target instead of an Option ( #9867 )
...
* .
cargo +nightly fmt --all
* Fix test
* Simplify test
* They are already imported
* Needless clone()
2021-09-29 13:03:09 +00:00