Commit Graph

895 Commits

Author SHA1 Message Date
Wei Tang 9fdd4672b0 Use tracing-based subscriber logging (#6825)
* 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>
2020-09-17 11:04:43 +02:00
Bastian Köcher 0a6f7b08d7 Send import notification always for re-orgs (#7118)
* Send import notification always for re-orgs

This pr changes the behavior of sending import notifications. Before we
only send notifications when importing blocks on the tip of the chain or
on similar conditions. However we did not send a notification when we
for example being in a state where we import multiple blocks to catch
up. If we re-org in this process, systems like the transaction pool
would not be notified about this re-org. This means, that we would also
not resubmit transactions of these retracted blocks. This pr fixes this,
by always sending a notification on a re-org.

See
https://github.com/substrate-developer-hub/substrate-node-template/issues/82
for some context about the bug.

* Update client/service/src/client/client.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-09-16 16:43:43 +02: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
Pierre Krieger eadf5b09f9 Allow remotes to not open a legacy substream (#7075)
* Allow remotes to not open a legacy substream

* Misc fixes

* Special case first protocol as the one bearing the handshake
2020-09-14 15:08:23 +00:00
Wei Tang e18ddc6d4a pow: support uniform tie breaking in fork choice (#7073)
* pow: support uniform tie breaking in fork choice

* Update client/consensus/pow/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Refactor fetch seal

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-09-14 15:03:26 +00:00
Roman Borschel 51706a7620 Upgrade to libp2p-0.28. (#7077)
* Upgrade to libp2p-0.28

* Clean up test imports.

* CI

* CI

* CI?

* CI once more.

* One more.

* CI

* CI

* CI
2020-09-14 14:27:58 +00:00
Jon Häggblad 2da6adfdf1 grandpa-rpc don't share subscription manager, only executor (#7039)
* service builder: fix todo about jsonrpc Option workaround

* grandpa-rpc: only share executor instead of sub manager

* grandpa-rpc: fix compilation

* grandpa-rpc: rename to subscription_executor

* node/cli: remove another unused jsonrpc dependency

* grandpa: apply style fixes from code review

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-09-14 11:02:37 +00:00
Denis Pisarev be5dc02d3b Fail docs on warnings (#5923)
* change (ci): docs job optimized; runs every commit; fails on warnings

* change (ci): rename jobs; temporary allow failing

* change (ci): better warnings filtering

* fix (ci): hotfix Docker release

* test (ci): run docs job with flags

* test (ci): pwd fails

* change (ci): pass just //doc dir as an artifact; debug

* change (ci): return to the previous structure; undebug

* change (ci): typo

* rebase on upstream 2

* fix the jobname

* Fix some warnings (#7079)

* Partial fix for transaction priority (#7034)

* Partial fix for priority stuff.

* Small fix

* Fix tests.

* Update frame/transaction-payment/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Better doc

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* What happens if we remove wat? (#7056)

* What happens if we remove wat?

* Update Cargo.lock

* Make SlashingSpans Public (#6961)

* Make SlashingSpans Public

Offchain Applications will often need to inspect this type because it is directly used in staking election, thus worthy of being `pub`. Rest of the slashing api can remain private, only this and the `fn last_non_zero_slash()` of `SlashingSpans` are of interest.

* Update frame/staking/src/lib.rs

* client/authority-discovery/src/service: Improve docs (#7059)

* Decrease poll interval (#7063)

* Remove unused code (#7027)

Signed-off-by: Jimmy Chu <jimmychu0807@gmail.com>

* Disambiguate `BlockNumber` type in `decl_module` (#7061)

* Disambiguate `BlockNumber` type in `decl_module`

* fix `frame-support-tests`

* fix ui tests

* fix trait order

* Implement `FromStr` for `Ss58AddressFormat` (#7068)

* Implement `FromStr` for `Ss58AddressFormat`

* Update primitives/core/src/crypto.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Set reserved nodes with offchain worker. (#6996)

* add offchain worker api to set reserved nodes.

* new offchain api to get node public key.

* node public key from converter

* refactor set reserved nodes ocw api.

* new ndoe authorization pallet

* remove unnecessary clone and more.

* more

* tests for node authorization pallet

* remove dependency

* fix build

* more tests.

* refactor

* Update primitives/core/src/offchain/testing.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* format code

* expose NetworkService

* remove NetworkStateInfo in offchain

* replace NodePublicKey with PeerId.

* set max length of peer id.

* clear more

* use BTreeSet for set of peers.

* decode opaque peer id.

* extract NetworkProvider for client offchain.

* use OpaquePeerId in node authorization pallet.

* fix test

* better documentation

* fix test

* doc

* more fix

* Update primitives/core/src/offchain/mod.rs

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Update client/offchain/src/api.rs

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* derive serialize and deserialize

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Fix some warnings

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: s3krit <pugh@s3kr.it>
Co-authored-by: Jimmy Chu <jimmy@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: kaichao <kaichaosuna@gmail.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Fix more doc errors

* More doc fixes

* Remove subdb to make `rustdoc` happy

* Make the line length check happy

* Fix compilation error

* Another try

* Allow unused

Co-authored-by: Dan Forbes <dan@danforbes.dev>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: s3krit <pugh@s3kr.it>
Co-authored-by: Jimmy Chu <jimmy@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: kaichao <kaichaosuna@gmail.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
2020-09-11 17:39:16 +02:00
Ashley ae2de4c2b2 Fix build sync spec (#7086) 2020-09-11 13:54:03 +00:00
Ashley 614c6a743f Add a build-sync-spec subcommand and remove the CHT roots from the light sync state. (#6999)
* Move subcommands from sc-cli to nodes

* Add --build-sync-spec subcommand

* Remove CHTs from snapshots

* Keep ProvideChtRoots
2020-09-11 14:50:12 +02:00
Bastian Köcher 3abcd72f8f Support hex encoded secret key for --node-key (#7052)
* Support hex encoded secret key for `--node-key`

Adds support for reading a hex encoded secret key when being passed as
file via `--node-key`.

* Make the key loading uniform

* Switch to `hex::decode`
2020-09-11 14:05:43 +02:00
kaichao 91c0213413 Set reserved nodes with offchain worker. (#6996)
* add offchain worker api to set reserved nodes.

* new offchain api to get node public key.

* node public key from converter

* refactor set reserved nodes ocw api.

* new ndoe authorization pallet

* remove unnecessary clone and more.

* more

* tests for node authorization pallet

* remove dependency

* fix build

* more tests.

* refactor

* Update primitives/core/src/offchain/testing.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Update frame/node-authorization/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* format code

* expose NetworkService

* remove NetworkStateInfo in offchain

* replace NodePublicKey with PeerId.

* set max length of peer id.

* clear more

* use BTreeSet for set of peers.

* decode opaque peer id.

* extract NetworkProvider for client offchain.

* use OpaquePeerId in node authorization pallet.

* fix test

* better documentation

* fix test

* doc

* more fix

* Update primitives/core/src/offchain/mod.rs

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* Update client/offchain/src/api.rs

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

* derive serialize and deserialize

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-09-10 15:26:09 +00:00
Max Inden d9e25594e9 client/authority-discovery/src/service: Improve docs (#7059) 2020-09-09 15:08:26 +00:00
Sergei Shulepov a137160924 Change wabt to wat (#7050) 2020-09-08 22:49:54 +02:00
Benjamin Kampmann 4ef025b761 Downgrade wabt = 0.9.1 (#7042) 2020-09-08 08:52:04 +00:00
Bastian Köcher ae0f7e58b0 Make --file optional for generate-node-key (#7043)
This pr makes the `--file` argument optional to `generate-node-key`.
If the argument is not given, the secret node key will be printed to
`stdout`. The public node key will always be printed to `stderr`.
2020-09-08 10:32:37 +02:00
Max Inden f677b40ed7 client/authority-discovery: Throttle DHT requests (#7018)
* client/authority-discovery: Throttle DHT requests

Instead of passing one DHT query for each authority down to the network
every query interval, only pass MAX_IN_FLIGHT_LOOKUPS at a given point
in time, triggering new ones when previous ones return.

* client/authority-discovery/worker/test: Fix wrong constant
2020-09-07 10:17:28 +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
André Silva 23b254e4e9 grandpa: report metrics on prevotes and precommits cast (#6970)
* grandpa: report metrics on prevotes and precommits cast

* Update client/finality-grandpa/src/environment.rs

Co-authored-by: Max Inden <mail@max-inden.de>

* Update client/finality-grandpa/src/environment.rs

Co-authored-by: Max Inden <mail@max-inden.de>

Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-04 10:01:14 +01:00
Seun Lanlege b0ff817ba0 manual seal is now consensus agnostic (#7010)
* manual seal is now consensus agnostic

* pr grumbles
2020-09-03 12:55:12 +00:00
Pierre Krieger 34980ec88a Stop sending messages on legacy substream altogether (#6975)
* 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>
2020-09-02 15:28:03 +00:00
Max Inden 1d10db3184 frame/authority-discovery: Have authorities() return both current and next (#6788)
* frame/authority-discovery: Have authorities() return both current and next

Authority address lookups on the DHT happen periodically (every 10
mintues) and are rather slow (~10 seconds).

In order to smooth the transition period between two sessions, have the
runtime module return both the current as well as the next authority
set. Thereby the client authority module will:

1. Publish its addresses one session in advance.

2. Prefetch the addresses of authorities of the next session in advance.

* frame/authority-discovery: Deduplicate authority ids

* frame/authority-discovery: Don't dedup on_genesis authorities

* frame/authority-discovery: Remove mut and sort on comparison in tests

* frame/authority-discovery: Use BTreeSet for deduplication
2020-09-02 15:20:51 +00:00
Pierre Krieger 2f9e2577c1 Ensure that handshake is sent back even in case of back-pressure (#6979)
* 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>
2020-09-02 14:30:41 +00:00
Ashley 57dd0facbb Move subcommands from sc-cli to nodes (#6948) 2020-09-01 09:06:22 +00:00
Pierre Krieger 860362869b Silence the error about non-registered protocols (#6987)
* Silence the error about non-registered protocols

* Silence the other two locations as well
2020-08-31 15:41:17 +00:00
Max Inden 875daa31bf client/cli/src/config: Warn on low file descriptor limit (#6956)
* client/cli/src/config: Warn on low file descriptor limit

Substrate sets the soft file descriptor limit to the hard limit at
startup. In the case of the latter being low already (< 10_000) a
Substrate node under high demand might run into issues e.g. when opening
up new TCP connections or persisting data to the database.

With this commit a warn message is printed to stderr.

* client/cli/Cargo.toml: Update to fdlimit 0.2.0
2020-08-31 12:37:06 +00:00
Pierre Krieger e9d446a4ce Use AsyncReadExt::read_exact, not just read (#6977) 2020-08-31 08:55:43 +00:00
Andronik Ordian d0a58a7360 update kvdb-rocksdb to 0.9.1 and rocksdb to 6.11.4 (#6963) 2020-08-29 03:30:13 +00:00
Max Inden 8fd343e39d client/*: Treat protocol name as str and not [u8] (#6967)
* 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
2020-08-28 15:34:25 +00:00
Pierre Krieger 37d0e00d83 Implement request-responses protocols (#6634)
* Implement request-responses protocols

* Add tests

* Fix sc-cli

* Apply suggestions from code review

Co-authored-by: Max Inden <mail@max-inden.de>

* Fix naming

* Fix other issues

* Other naming fix

* Fix error logging

* Max sizes to u64

* Don't kill connections on refusal to process

* Adjust comment

Co-authored-by: Max Inden <mail@max-inden.de>
2020-08-27 12:53:20 +00:00
Guillaume Thiolliere 5b7af66384 fix bench db wipe (#6965) 2020-08-26 18:36:37 +00:00
Pierre Krieger 1bd6082cf7 Enforce that ProtocolId is a string (#6953)
* Enforce that ProtocolId is a string

* Fix test
2020-08-26 12:27:30 +00:00
Max Inden 9a17d58960 client/authority-discovery: Limit number of addresses per authority (#6947)
* client/authority-discovery: Test addresses per authority limit

* client/authority-discovery: Limit number of addresses per authority
2020-08-24 14:17:39 +00:00
Guillaume Thiolliere 9b42720ac5 Fix benchmark read/write key tracker for keys in child storages. (#6905)
* WIP: read child trie and write child trie

* add test

* refactor a bit + improve log

* better naming

* trigger CI

* Revert "trigger CI"

This reverts commit d0aadaeb6a12fc6c39f01b3c1b5725d19f085865.
2020-08-24 13:40:16 +00:00
André Silva e05055c91c grandpa: always create and send justification if there are any subscribers (#6935)
* grandpa: use bytes type for justification rpc notification

* grandpa: always create justification if there are rpc subscribers

* grandpa: wording

* grandpa: replace notify_justification macro with function

* grandpa: prefer Option<&T> over &Option<T>
2020-08-24 13:29:17 +00:00
Ashley c8ca2ce183 Dynamically generate CHT roots on a full client (#6944)
* Generate CHT roots on a full client

* add changes_trie_root function

* Add a test

* Line widths

* Fix sc-service-test

* Clarify comments

* Revert comments
2020-08-24 15:11:21 +02:00
Ashley f009f6c227 Add a LightSyncState field to the chain spec (#6894)
* Reset code, almost ready for PR

* Improved build_hardcoded_spec

* Fix line widths

* Fix tests

* Fix sc-service-test

* Suggestions from code review

* Rename to LightSyncState

* It's not syncing :^(

* It syncs!

* Remove rpc call

* Convert spaces to tabs

* Moved sc-service things to export_sync_state.rs

* Fix tests

* Wait for syncing with network_status_sinks

* Remove sc-network from node-template

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Various changes, split the flag up into 2 pieces to make testing easier.

* Update client/cli/src/commands/build_spec_cmd.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Revert a lot of changes

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-08-24 08:34:16 +00:00
Max Inden 5c500aa783 client/authority-discovery: Append PeerId to Multiaddr at most once (#6933)
* client/authority-discovery/worker: Extract address getter

* client/authority-discovery: Test for no duplicate p2p components

* client/authority-discovery: Append PeerId to Multiaddr at most once

When collecting the addresses to be published for the local node,
`addresses_to_publish` adds the local nodes `PeerId` to each
`Multiaddr`. Before doing so, ensure the `Multiaddr` does not already
contain one.

* client/authority-discovery: Remove explicit return
2020-08-24 09:37:32 +02:00
Pierre Krieger 6d9928e4bf Wait for all notifications protocols to be open before reporting opening (#6821)
* 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>
2020-08-23 22:26:42 +02:00
Bastian Köcher e7f25ebda8 Fix printing of subkey when using the --network override (#6932)
* Fix printing of subkey when using the `--network` override

This fixes a bug where `--network` did not printed the account ss58 address for the
requested network. Basically we now always print all account ss58 addresses using the
requested network.

* Review comments

* Fixes test

* Update client/cli/src/commands/inspect.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update client/cli/src/commands/utils.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Fix more tests

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-08-22 12:53:39 +00:00
Qinxuan Chen 8ae1695526 Remove duplicated dependencies (#6930)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2020-08-21 16:25:58 +02:00
Max Inden 69e349bd51 *: Update to next libp2p version 0.24.0 (#6891)
* *: Update to next libp2p version (likely v0.24.0)

* Revert "*: Update to next libp2p version (likely v0.24.0)"

This reverts commit ffe1545aba6c2557a2843579de331f3fc1c60743.

* */Cargo.toml: Update to libp2p v0.24.0

* client/network/src/service: Handle ConnectionClosed returning Option

* Cargo.*: Test kad usize conversion

* Revert "Cargo.*: Test kad usize conversion"

This reverts commit ad317879782f982cb4a4c76029a72b5b97e82bec.

* Cargo.lock: Update to libp2p-kad v0.22.1

* client/cli/Cargo.toml: Update to libp2p 0.24.0
2020-08-21 06:25:23 +00:00
Pierre Krieger 09662dc873 Remove the legacy requests-answering protocols (#6709)
Co-authored-by: parity-processbot <>
2020-08-20 15:53:37 +00:00
Pierre Krieger 74cf119d4a Try un-ignore flaky test (#6923) 2020-08-20 15:10:00 +00:00
Benjamin Kampmann 2416aa7999 prepping for releasing rc6 (#6922)
* Bump version

* update test-utils crates to be ready for publishing

* adding changelog

* Adding automaticly generated READMEs

* fixing versions

* another version mishap
2020-08-20 17:04:42 +02:00
Cecile Tonglet 6f59c95c89 Clean shutdown for subcommands (#6909) 2020-08-20 16:38:00 +02:00
Seun Lanlege 6963272451 Merge Subkey into sc-cli (#4954)
* draft

* revert

* WIP

* all that remains is tests

* update Cargo.lock

* tests WIP

* WIP refactor node-template-runtime and node-runtime

* implments sc_cli::RuntimeAdapter for node_template_runtime::Runtime

* final draft

* fix update_config for subcommands

* proper AccountId decoding

* test-runtime tests

* revert

* move RuntimeAdapter to cli-utils

* use &'static str for TryFrom::<&'a str>::Error for Ss58AddressFormat

* tests

* add frame-system to sc-cli dev-dependencies

* add frame-system to sc-cli dev-dependencies

* fix ui test

* wip

* fixed inspect test

* bump impl version

* bump impl version, fixx spaces remove todos

* pallet-balances-cli, rustc for some reason cannot resolve pallet_balances_cli in node-cli 😩

* wip

* Subcommand::run takes &self

* can't believe i missed that 🤦🏾‍♂️

* bump wasm-bindgen for some reason

* adds key subcommand, rename generate-node-key to generate-node-id

* cargo update and crossed fingers 🤞🏽

* update ui test

* update more ui tests

* should be all good now

* revert subkey change

* revert subkey change

* adds frame-utilities-cli

* Apply suggestions from code review

Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>

* removes frame from sc-cli, fix license

* my editor and ci disagrees on line width

* bump spec version

* turn off default features for parity-scale-codec

* enable full_crypto feature for sp-core in cli-utils

* merge frame-utilities-cli with pallet-balances-cli

* remove full_crypto feature from sp_core in cli-utils

* bump Cargo.lock

* cli-utils -> frame-utils

* rename BlockNumber to GenericNumber, fix spaces

* fix spaces

* construct additional_signed manually

* sign test

* remove unused vars

* implement subkey with frame-utilities-cli and sc_cli

* fix moduleid test

* CI and clion disagree on line widths

* adds associated Params type to SignedExtensionProvider

* Apply suggestions from code review

Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>

* move some code around

* removes unneccesary generic params

* moves module_id back to frame_utilities_cli

* Apply suggestions from code review

Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* remove print_ext

* remove MaybeDisplay from pallet_balances::Trait::Balance

* a lot of stuff tbh

* adds ExtrasParamsBuilder

* remove tests for ModuleIdCmd

* address comments from PR

* bump Cargo.lock

* manually insert key into keystore

* remove unnecessary SharedParams

* add validation to vanity pattern, remove unused arg

* remove SharedParams from Sign, Vanity, Verify

* remove SharedParams from ModuleIdCmd, remove expect from Verify, new line to Cargo.toml

* remove SharedParams from InsertCmd

* 🤦🏾‍♂️

* deleted prometheus.yml

* move a few things around

* fix vanity test

Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Benjamin Kampmann <ben@parity.io>
2020-08-20 09:55:03 +00:00
Shawn Tabrizi 481ad884d6 Dynamic Benchmarking DB Whitelist (#6815)
* Add `get_whitelist` api

* add whitelisted caller

* Whitelist caller

* remove caller 0

* initial piping of origin (not actual value yet)

* remove attempt to pass origin around

* Add whitelist for `DidUpdate` storage on `pallet_timestamp`

* fix traits

* only add to whitelist if !contains

* PassBy not implemented error

* Whitelist read/writes explicitly per key

* update docs

* reduce trait constraint

* copy pasta

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* rename functions @apopiak

* missed some renaming

* enable doc tests

* Update docs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
2020-08-19 16:15:50 +00:00
André Silva 8b5ced7fa7 babe: handle error when checking/reporting equivocations (#6915) 2020-08-19 18:11:14 +02:00
Bastian Köcher 7bf838f225 Combine default values used at initialization in a trait (#6857)
This moves default values used in the Substrate code base when
initializing a service into a common trait. Currently this trait only
contains listen ports, but this could be extended in the future.
Essentially this will make overriding these values much easier for
Cumulus, where we have 2 nodes running in one binary.
2020-08-19 17:30:56 +02:00