Commit Graph

3685 Commits

Author SHA1 Message Date
Vladimir Komendantskiy 0ce9657db2 added the Polymath subkey ID (#5705) 2020-04-20 21:05:45 +02:00
cheme 4ffcf98d8d Child trie api changes BREAKING (#4857)
Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
2020-04-20 15:21:22 +02:00
Shawn Tabrizi 7d9aa81bfc Implement try_mutate for storage value and storage double map (#5699)
* impl try_mutate for storage value and storage double map

* Docs + Reuse `try_mutate` in `mutate`
2020-04-20 15:05:20 +02:00
Ashley 319a00fb1c Add a crate to test the in-browser light client. (#4887)
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-04-20 14:45:13 +02:00
Bastian Köcher 1d1caed335 Improve tracing (#5698)
* Improve tracing implementation

* Enable tracing in runtime interfaces

* Switch to `TRACE` level
2020-04-20 14:37:27 +02:00
Pierre Krieger ca1c60c2cf Move around definitions in sc_network (#5701) 2020-04-20 14:35:17 +02:00
thiolliere e1ef69506a update code owners (#5700) 2020-04-20 13:37:05 +02:00
Jaco Greeff 8c52a2dae6 Pass max-total to RewardRemainder on end_era (#5697)
* Pass max-total to RewardRemainder on end_era

* add test and event

* add doc

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
2020-04-20 13:13:45 +02:00
Igor Matuszewski 4b1f7d187f Allow to expose a subset of unsafe RPCs (#5233)
* sc-cli: Use type-safe constructors for RPC/Prometheus interfaces

* service: Simplify rpc handler creation

Could probably be further simplifies once [this][commit] lands.

[commit]: https://github.com/paritytech/jsonrpc/commit/20485387ed06a48f1a70bf4d609a7cde6cf0accf

* service: Streamline some HTTP & WS server start logic

* client: Introduce a simple RPC policy mechanism

* rpc/system: Check unsafe RPCs

* rpc/offchain: Check unsafe RPCs

* rpc/author: Check unsafe RPCs
2020-04-20 11:03:58 +02:00
Joshy Orndorff d05dc090a8 Revise docs on randomness (#5497)
* Initial attempt to revise docs.

* Remove incorrect warning from Babe pallet

* Add more hints that collective flip is for low security
2020-04-19 11:57:16 +02:00
Pierre Krieger cff487dd22 Refactor misleading log in discovery (#5679)
* Refactor misleading log

* Forgot to git add the compilation fix
2020-04-18 14:04:23 +02:00
Eliott Teissonniere cacba117f8 subkey: compute and inspect a moduleid (#5676)
* create moduleid command

* fill README

* make it work on the last master
2020-04-18 00:17:36 +02:00
Pierre Krieger bc6ebabf23 Force libp2p 0.18.1 (#5689) 2020-04-17 23:00:44 +02:00
Pierre Krieger f544907bd2 Revert listening on IPv6 by default (#5687) 2020-04-17 20:34:23 +02:00
Ashley 95dc400bb8 Make network_config_path an Option (#5661)
* 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
2020-04-17 14:48:45 +02:00
Alexander Theißen 249a92aece Fix weight refund to use proper adjustment factor (#5640) 2020-04-17 12:20:04 +02:00
Gavin Wood fd2cb9ca83 Transaction versioning in the RuntimeVersion (#5582)
* Add transaction_version

* Semantic versioning for runtimes

* Move new field to bottom

* Versioning

* Runtime versioning stuff.

* Fix test

* Adds tests and fixes bugs

* Bump runtime

Co-authored-by: Bastian Köcher <git@kchr.de>
2020-04-17 12:10:31 +02:00
Nikolay Volf fea626ca84 Add prometheus registry to transaction pool, with couple of initial metrics (#5657)
* make new contructor

* add metrics to txpool

* fix review

* fix doc comment

* change to counters

* Update client/transaction-pool/src/metrics.rs

Co-Authored-By: Max Inden <mail@max-inden.de>

* Update client/transaction-pool/src/metrics.rs

Co-Authored-By: Max Inden <mail@max-inden.de>

* Update client/transaction-pool/src/metrics.rs

Co-Authored-By: Max Inden <mail@max-inden.de>

* Update client/transaction-pool/src/lib.rs

Co-Authored-By: Max Inden <mail@max-inden.de>

* Update client/transaction-pool/src/lib.rs

Co-Authored-By: Max Inden <mail@max-inden.de>

* use dedicated wrapper

Co-authored-by: Max Inden <mail@max-inden.de>
2020-04-17 11:02:45 +02:00
Xiliang Chen 7dcff4c1e2 emit TipClosed event on success tip payout (#5656)
* emit TipClosed event on success tip payout

* test for events

* bump version
2020-04-17 10:37:00 +02:00
Joshy Orndorff a42d87483c remove rustdocs script (#5675) 2020-04-17 10:35:50 +02:00
Shawn Tabrizi 276b27a7d4 Add migration for transaction-payment (#5673) 2020-04-17 09:56:17 +02:00
Bastian Köcher c5c9b56e94 Listen on ipv6 by default as well (#5677)
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.
2020-04-17 09:53:52 +02:00
Kian Paimani 762c741c55 Clean Phragmén Equlise API (#5452)
* Clean phragmen API and equalise()

* Stabilize new api

* Fix phragmen fuzzers

* More fixes

* Make fuzzers reproducible

* improvements

* Make equalize update assignments as well.

* total function for staked_assignment.

* Fix fuzzer build

* remvoe TODO

* Fix a bunch more.

* clean stray debug stuff

* Update primitives/phragmen/src/lib.rs

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* fix range function

* fix number generator

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
2020-04-17 09:53:30 +02:00
Pierre Krieger 0fd5643e84 Adjustments to Kademlia-related metrics (#5660)
* Turn kbuckets_num_nodes into a GaugeVec

* random_kademlia_queries -> kademlia_random_queries

* kademalia_random_queries_total now a CounterVec

* Add metrics about records store
2020-04-17 09:11:47 +02:00
Tomasz Drwięga bc0b8fbddf Add performance tracing to validate_transaction (#5671)
* Validate transaction timeouts

* Add timing

* Add tracing to transaction validation.

* Fix docs.

Co-authored-by: NikVolf <nikvolf@gmail.com>
2020-04-17 08:42:50 +02:00
Nikolay Volf 372f8b2c7e Batch signature verification (#5023)
* create parallel tasks extension

* make type system happy

* basic externalities

* test for dynamic extensions

* batching test

* remove premature verify_batch

* shnschnorrkel batch

* alter test

* shnschnorrkel test

* executive batching

* some docs

* also multi/any signatgures

* error propagation

* styling

* make verification extension optional

* experimental ed25519 parallelization

* some merge fallout

* utilize task executor

* merge fallout

* utilize task executor more

* another merge fallout

* feature-gate sp-io

* arrange toml

* fix no-std

* sr25519 batching and refactoring

* add docs

* fix name

* add newline

* fix block import test

* long sr25519 test

* blocking instead of parking

* move everything in crypto

* return batch_verify to check :)

* use condvars

* use multi-threaded executor for benches

* don't call via host interface

* try no spawning

* add true

* cleanup

* straighten batching

* remove signature check from this test (?)

* remove now pointless test

* remove another now useless test

* fix warnings

* Revert "remove another now useless test"

This reverts commit bbdec24bb67ed4373072daef7c863e1a8825bd8b.

* rethink the sp-io-part

* Revert "remove now pointless test"

This reverts commit 4d553066322e65782264caa6053d4cd5538df977.

* fix wording

* add  wording

* add todo and fix

* return check and fix

* add logging in sp-io

* Update primitives/io/src/batch_verifier.rs

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>

* address review and use std condvar

* account for early exit

* address reivew

* address review

* more suggestions

* add docs for batch verification

* remove unused

* more review suggestions

* move to sp-runtime

* add expects

* remove blocks

* use entry

* Update primitives/io/src/batch_verifier.rs

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

* Update primitives/externalities/src/extensions.rs

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

* update overlooked note

* remove stupid return

* Update primitives/io/src/lib.rs

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

* Update primitives/io/src/lib.rs

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

* fix wording

* bump spec_version

Co-authored-by: cheme <emericchevalier.pro@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-04-16 21:40:04 +02:00
Nikolay Volf 36243068bd update parity-util-mem (#5668) 2020-04-16 21:38:04 +02:00
Max Inden d742e88e79 client/authority-discovery: Allow to be run by sentry node (#5568)
* client/authority-discovery: Allow to be run by sentry node

When run as a sentry node, the authority discovery module does not
publish any addresses to the dht, but still discovers validators and
sentry nodes of validators.

* client/authority-discovery/src/lib: Wrap lines at 100 characters

* client/authority-discovery: Remove TODO and unused import

* client/authority-discovery: Pass role to new unit tests

* client/authority-discovery: Apply suggestions

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

* bin/node/cli/src/service: Use expressions instead of statements

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-04-16 18:11:26 +01:00
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
Max Inden 6bd93825ca client/authority-discovery: Rework error handling (#5631)
* client/authority-discovery: Rework error handling

Instead of `handle_dht_events` returning a `Result<(), Error>`, return
a `Poll<Error>` where `Poll::Pending` signals that there are no more
events to handle and `Poll::Ready(Error)` signals that a fatal error
occured. Non fatal errors are handled within `handle_dht_events`
directly, thus looping in `poll` is not necessary anymore.

* client/authority-discovery: Return () instead of error on termiantion

* Update client/authority-discovery/src/lib.rs

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-04-16 16:09:13 +01:00
Pierre Krieger 239d0998ea Several tweaks to networking Prometheus metrics (#5636) 2020-04-16 15:18:35 +02:00
Nikolay Volf 9a60df2c56 Trie integrated benchmark (#5616) 2020-04-16 15:18:16 +02:00
Bastian Köcher 240b304b4c Upgrade sysinfo to 0.13.3 (#5659)
This release includes a fix for an out of bound access that was reported
by one of the validators.
2020-04-16 12:59:31 +02:00
Nikolay Volf 84991146e3 don't use default features to drop some dependencies (#5658) 2020-04-16 12:08:16 +02:00
Toralf Wittner 4db45a85de Use a Kademlia instance per ProtocolId. (#5045) 2020-04-16 10:43:40 +02:00
Shawn Tabrizi 980b635c8d Weights to u64 + Balances Weights (#5446)
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2020-04-16 10:43:18 +02:00
Max Inden 1c7525fd4b client/authority-discovery: Increase request counter per request (#5632) 2020-04-16 10:42:08 +02:00
Denis Pisarev 2fe3ba3149 change (ci): stop using CARGO_HOME cache until the bug resolves (#5653) 2020-04-16 00:39:24 +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
Pierre Krieger 1c7a3fe7d5 Remove the tokio thread name (#5650) 2020-04-15 21:49:53 +02:00
André Silva 20b11b1770 client: avoid spamming telemetry on initial sync (#5651) 2020-04-15 21:49:21 +02:00
thiolliere 28edcbfe8d Implement iter for doublemap (#5504)
* implement iter for doublemap

* fmt

* fix tests

* fix staking mock

* address comment

* update doc and constraint for reversible hasher

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-04-15 16:49:08 +02:00
Arkadiy Paronyan 24fc051c86 Removed subdb dependency (#5646) 2020-04-15 15:55:45 +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
Pierre Krieger cff1390456 Report tasks metrics to Prometheus (#5619)
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
2020-04-15 11:10:03 +02:00
Bastian Köcher b267b1728f decl_runtime_apis! - check that a method without changed_in exists (#5635)
* `decl_runtime_apis!` - check that a method without `changed_in` exists

This adds another check to the macro that ensures that not only methods
with `changed_in` exists, but there are also the default methods exist.

* Update primitives/api/proc-macro/src/decl_runtime_apis.rs

Co-Authored-By: Nikolay Volf <nikvolf@gmail.com>

* Fix test

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
2020-04-15 00:02:14 +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
Fredrik Harrysson 889a9763dd Adding Process.toml for processbot (#5634) 2020-04-14 18:30:33 +02:00
Max Inden 61d64e2ca1 .maintain/sentry-node: Add monitoring to docker-compose stack (#5321)
* Substrate Dashboard example

* Improve README

* Update README_dashboard.md

* Add screenshots

* Minor fix

* Minor fix, image link

* .maintain/sentry-node: Add monitoring to docker-compose stack

With this patch a user can run the following fully configured and
monitored setup with a single command:

`docker-compose -f .maintain/sentry-node/docker-compose.yml up`

- 2 validators in two different network namespaces, connected via one
sentry node.

- Polkadot-js/apps to connect to one of the nodes above.

- Prometheus scraping the 3 Substrate nodes.

- Grafana displaying data from Prometheus with community dashboards

* .maintain/monitoring/grafana: Change default datasource name

* .maintain/monitoring/grafana: Add metric namespace option

* .maintain/monitoring/grafana: Remove `host` metric from most metrics

* .maintain/monitoring/grafana: Remove underscore from metric_namespace

* .maintain/monitoring: Use `instance` label instead of `hostname`

To identify a scrape target, one should use `instance` and not
`hostname` as multiple targets might run on the same node.

See https://prometheus.io/docs/concepts/jobs_instances/ for details.

* .maintain/monitoring: Introduce instance variable

* .maintain/monitoring/grafana: Rename substrate_block_height_number

* .maitain/monitoring/grafana: Use instance instead of host in legend

* .maintain/monitoring: Remove node exporter dependency

* .maintain/sentry-node/prometheus: Simplify configuration

* .maintain/monitoring/grafana: Update README and remove images

* .maintain/sentry-node: Improve docs

* .maintain/monitoring/grafana: Use metric_namespace template variable

* Use --sentry from v0.7.29 instead of a reserved-node

* .maintain/sentry-node: Revert sentry-a using validator-b as bootnode

Co-authored-by: DerFredy - @derfredy:matrix.org <derfredy@gmail.com>
Co-authored-by: david <davidd@custom.home>
2020-04-14 16:08:09 +02:00