Commit Graph

3411 Commits

Author SHA1 Message Date
Gavin Wood eba4fb764a Don't lock if we're not voting with conviction (#5247)
* Don't lock if we're not voting with conviction

* Add test
2020-03-13 13:01:17 +01:00
Marcio Diaz 74ed6978e1 Fix identity benchmark (#5229)
* Set identity before calling set_subs.

* Remove -1.
2020-03-13 10:46:25 +01:00
joe petrowski abb67d1ecf Emit events to bonding and unbonding ops in Staking pallet (#5228)
* add events to bonding and unbonding ops

* add semicolon on event line

* fix nits
2020-03-13 00:38:25 +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
Gavin Wood 6f2aaf9d11 Remove balances migration. (#5224)
* Remove balances migration.

* Remove extraneous code

* Remove old test
2020-03-12 14:13:05 +01:00
Seun Lanlege 9898fc7e81 removes use of sc_client::Client from sc_network (#5147)
* removes use of sc_client::Client from sc_network

* rename BlockProvider to BlockBackend

* fix broken test
2020-03-12 14:02:04 +01:00
Stanislav Tkach 6e1b4cd560 Update sysinfo version to 0.11 (#5216) 2020-03-12 14:00:07 +01:00
Gavin Wood 2387543ecb Split fees and tips between author and treasury independently (#5207)
* Split fees and tips between author and treasury independently

* Docs and cleanup

* Fix test
2020-03-12 00:15:39 +01:00
Arkadiy Paronyan dc0bf210fb ChainSpec trait (#5185)
* ChainSpec trait

* Apply suggestions from code review

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

* Added docs

* Fixed build

* Fixed build

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-03-12 00:00:10 +01:00
Max Inden d2345e8d5c client/authority-discovery: Instrument code with Prometheus (#5195)
* client/authority-discovery: Instrument code with Prometheus

Introduce Prometheus metrics into the authority discovery module
enabling one to observe:

- authority_discovery_times_published_total

- authority_discovery_amount_external_addresses_last_published

- authority_discovery_times_requested_total

- authority_discovery_dht_event_received

* client/authority-discovery/src/lib.rs: Reword metric help texts

Co-Authored-By: Ashley <ashley.ruglys@gmail.com>

* client/authority-discovery/src/lib.rs: Reword metric help text

Co-Authored-By: Ashley <ashley.ruglys@gmail.com>

* client/authority-discovery/tests: Fix struct instantiation + basic test

Co-authored-by: Ashley <ashley.ruglys@gmail.com>
2020-03-11 23:59:33 +01:00
Max Inden c9c7d655f1 .maintain/sentry-node/docker-compose: Expose Prometheus endpoin… (#5196)
This patch adds the Prometheus endpoint port of validator A to the
exposed ports to access it from the host network namespace.
2020-03-11 18:32:47 +01:00
Gavin Wood e05e494f74 Refactor session away from needless double_maps (#5202)
* Meat and bones.

* Fix migration

* Update frame/balances/src/migration.rs

Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2020-03-11 16:27:47 +01:00
Marcio Diaz 914ce67fd7 Add dev chain as default chain for benchmarks. (#5204) 2020-03-11 12:44:48 +01:00
Hero Bird e5e0ca7389 Split ext_clear_storage out from ext_set_storage (#5103)
* split out ext_clear_storage from ext_set_storage contracts API

* update tests to adjust for the ext_set_storage changes

* adjust COMPLEXITY for the ext_set_storage API changes

* remove value_len == 0 constraint for ext_set_storage

* bump spec_version

* remove guarantee from COMPLEXITY of ext_clear_storage

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-03-11 09:46:20 +01:00
Stanislav Tkach 93ee3104e7 Use CLI to configure max instances cache (#5177)
* 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>
2020-03-11 09:43:37 +01:00
Pierre Krieger f21680209f Minor fixes for Android compilation (#5209)
* Minor fixes for Android

* Update parity-multiaddr

* Bump in service Cargo.toml too
2020-03-10 20:54:58 +01:00
thiolliere 1b4dcd1f23 Staking improve payout_validator (#5208)
* add documentation and optimise payout_validator a bit

* bump spec version to be safe

this is just in case clipped exposure and exposure have different fields
own and total. This shouldn't be the case but better be safe in case
storage is wrong.

* Update frame/staking/src/lib.rs

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
2020-03-10 20:54:29 +01:00
Bastian Köcher 60b65695e2 Make wasm-builder select dependencies more sensitive (#5162)
Up to now `wasm-builder` iterated over all packages that were not part
of the wasm workspace and added the files to the `rerun-if-changed`
list. However, this included to many files and resulted in needless
re-compilations in `Cumulus` for example.
2020-03-10 20:52:36 +01:00
Bastian Köcher 57ecc10cf1 Remove secp256k1 from WASM build (#5187)
* Remove `secp256k1` from WASM build

* Bring back full public key parse on native

* Add extra method to create from a full public key
2020-03-10 14:10:57 +01:00
Gavin Wood d1cac6cd19 Sort address types and mark reserved. (#5189)
* Sort address types and mark reserved.

* Typos

* Fix warning
2020-03-10 14:08:29 +01:00
s3krit d56c374b47 CI: Check runtime version against last release, not master (#5203) 2020-03-10 14:02:34 +01:00
Denis Pisarev def94f012e Necessary warnings test (#5206)
* test run warnings test

* fix dependency

* fail on warnings is now necessary
2020-03-10 13:59:26 +01:00
Ashley 3429967122 Use libp2p's implementation of a wasm websocket transport (#5089)
* Update to libp2p 0.16.2

* Use libp2ps implementation of a wasm websocket transport

* Remove explicit Configuration type in node-cli

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-03-10 11:14:20 +01:00
Bastian Köcher 1cfcf5cbfe Don't include :code by default in storage proofs (#5179)
* Don't include `:code` by default in storage proofs (#5060)

* Adds test to verify that the runtime currently is always contained in
the proof

* Start passing the runtime wasm code from the outside

* Fix compilation

* More build fixes

* Make the test work as expected now :)

* Last fixes

* Fixes benchmarks

* Review feedback

* Apply suggestions from code review

Co-Authored-By: Sergei Pepyakin <sergei@parity.io>

* Review feedback

* Fix compilation

Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>

* Fix compilation and change the way `RuntimeCode` works

* Fix tests

* Switch to `Cow`

Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
2020-03-10 11:13:20 +01:00
Max Inden 0cc3b96076 client/service/src/builder.rs: Add build_info metric (#5192)
* client/service/src/builder.rs: Add build_info metric

Add static Prometheus metric exposing the chain name, the version and
the commit.

* client/service/src/builder.rs: Move node_role to static metrics

The Prometheus metrics `node_role` is static and thus there is no need
to keep a reference of it within `ServiceMetrics`. This follows the
example of the `build_info` metric.

* client/service/src/builder.rs: Adjust indentation
2020-03-10 11:12:32 +01:00
Igor Matuszewski 3d73dd1c3b Make sc-offchain tests more resilient on macOS (#5191)
* offchain: Simplify bits of http code

* offchain: Sort dev-dependencies

* deps: Bump parity-multiaddr to 0.7.3

Fixes build failure when using:
rustc 1.43.0-nightly (96bb8b31c 2020-03-05).

* offchain: Raise FD limit for HTTP tests

* offchain: Reword the comment on increasing the test fd limit
2020-03-10 10:45:10 +01:00
Bastian Köcher d2c51e3c59 Make sure to always run wasm-builder for the HOST architecture (#5199) 2020-03-10 10:44:56 +01:00
André Silva cfd6824e57 grandpa: improve handling of global gossip messages (#5133)
* grandpa: only gossip commits to peers on the same set

* grandpa: track commits uniquely by round and set

* grandpa: fix communication test

* grandpa: add tests for commit gossip handling

* grandpa: add missing docs
2020-03-09 16:46:03 -07:00
thiolliere 2aac500d61 Change space to tab (#5193) 2020-03-09 16:32:24 +01:00
Max Inden e8f3c6a686 client/network-gossip: Merge GossipEngine and GossipEngineInner (#5042)
* client/network-gossip: Merge GossipEngine and GossipEngineInner

Given that GossipEngine and GossipEngineInner are not shared between
threads anyone (public interface + background tasks), neither depends on
being Send or Sync. Thus one can merge the two as done in this patch.
One only needs to wrap an `Arc<Mutex<>>` around the whole structure when
the owner (e.g. finality-grandpa) needs to share the gossip engine
between threads.

* client/finality-grandpa: Wrap GossipEngine in Arc Mutex & lock it on use

GossipEngine in itself has no need to be Send and Sync, given that it
does not rely on separately spawned background tasks anymore. Given that
finality-grandpa shares the `NetworkBridge` potentially between threads
its components need to be clonable, thus this patch wraps `GossipEngine`
in an `Arc<Mutex<>>`.
2020-03-09 16:31:29 +01:00
Bastian Köcher 67f10b9195 Improve debug implementation of CheckNonce and CheckEra (#5156) 2020-03-09 12:39:49 +01:00
Jianping Deng da9e7861f8 Add 6 as address type of ss58 for Bifrost Network (#5184) 2020-03-09 12:39:17 +01:00
Shawn Tabrizi 0971fff470 Update logic to cancel_deferred_slash (#5186)
* Update logic to cancel_deferred_slash

* More idiomatic

* bump spec

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-03-09 12:39:05 +01:00
Marcio Diaz 013fb6ae18 Benchmark Vesting (#5048)
* Init macro

* Refactor function.

* Add feature

* vested transfer benchmark

* Fix features

* Forgot to push this fix

* bump impl

* Nits.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-03-09 10:12:20 +01:00
Gavin Wood 1c94a03780 Second migration fix (#5178)
* Second migration fix

* Fix check-runtime script

* Another fix to the CI

* Revert changes.

* Bump runtime
2020-03-06 23:46:38 +01:00
André Silva 1290ae3e92 node: reset flaming fir testnet (#5176) 2020-03-06 22:20:57 +00:00
Pierre Krieger 9c6d53f436 Fix NotificationStreamClosed reported when it shouldn't (#5160)
* Fix NotificationStreamClosed reported when it shouldn't

* Fix test

* Add test

* Update client/network/src/protocol.rs

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

* Oops, fix test

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-03-06 21:24:51 +01:00
Nikolay Volf 4aac39c667 Fix possible corner case in revalidation (#5172)
* remove all from members

* add test
2020-03-06 21:24:39 +01:00
Gavin Wood 615dc00702 Migration fix (#5174) 2020-03-06 21:23:14 +01:00
Ashley 7177d2fb2b Fix browser node (#5166) 2020-03-06 18:34:53 +01:00
André Silva 9eaa972c21 client: fix notification sinks leak during initial sync (#5161)
* client: fix notification sinks leak during initial sync

* client: add test for notification sink cleanup

* Make it compile

* Further cleanup

* client: fix test for notification sinks cleanup

Co-authored-by: Bastian Köcher <git@kchr.de>
2020-03-06 18:32:50 +01:00
Nikolay Volf 5e1667c406 Add state/database caches to prometheus (#5165)
* add state/database caches to prometheus

* also state-db memory

* use suggestions from review
2020-03-06 18:32:33 +01:00
Alexander Krupenkin d84a583805 adding a ss58 format for Plasm Network (#5155) 2020-03-06 18:32:18 +01:00
Joshy Orndorff 91c1e1a85e Increase node template max block weight (#5171) 2020-03-06 18:32:00 +01:00
thiolliere 71ff24c79e Fix staking bug (#5170)
* fix staking bug

* add some guarantee note in SessionManager while it is not fixed in staking

* bumpd impl version
2020-03-06 18:31:48 +01:00
André Silva 3a792a55cd client: don't log on 0 gossip messages (#5173) 2020-03-06 18:31:35 +01:00
Bastian Köcher c244b1d036 Revert "Build block without checking signatures (#4916)" (#5159)
* Revert "Build block without checking signatures (#4916)"

This reverts commit e50f610907.

* Some further clean ups
2020-03-06 15:27:59 +01:00
Gavin Wood bbaf96e047 Revert quote fixed version and upgrade failure (#5152)
* Revert "use fixed quote (#5135)"

This reverts commit 8bf855b09d.

* Upgrade failure version

* Update frame/staking/reward-curve/Cargo.toml

Co-Authored-By: André Silva <andre.beat@gmail.com>

* Ahh I'm dumb

Co-authored-by: Gavin Wood <github@gavwood.com>
Co-authored-by: André Silva <andre.beat@gmail.com>
2020-03-05 22:14:55 +01:00
Gavin Wood d957220435 Add lots of networking metrics for Prometheus (#5126)
* Add some metrics

* Address concerns
2020-03-05 21:38:41 +01:00
Gavin Wood dbe0211137 Add Github Action for Matrix release bot (#5117) 2020-03-05 17:11:46 +01:00