Commit Graph

4454 Commits

Author SHA1 Message Date
Alan Sapede 27d5584fba Improves EVM gas price check (#7051) 2020-09-08 22:40:52 +02:00
Dan Forbes 5db3a4f500 Clarify Nicks docs (#7049) 2020-09-08 17:35:21 +00:00
André Silva 2a7a539e82 babe, grandpa: waive fees on valid equivocation report (#6981)
* babe: waive fees on report_equivocation

* grandpa: waive fees on report_equivocation

* babe: add test for fee waiving on valid equivocation report

* grandpa: add test for fee waiving on valid equivocation report

* grandpa: remove stray comment
2020-09-08 12:05:36 +02:00
Pierre Krieger 7c7ad18d4e Update the service tasks Grafana dashboard (#7038) 2020-09-08 09:59:37 +00:00
Gavin Wood 03720ec08a Revert "Fix broken link to democracy pallet. (#7026)" (#7047)
This reverts commit c775a529f1.
2020-09-08 11:59:12 +02:00
Nikita Puzankov c775a529f1 Fix broken link to democracy pallet. (#7026)
Old link was broken, and I put a new one.
2020-09-08 11:56:48 +02:00
joshua-mir 97b06e1eaf Add metadata shadows to multisig pallet (#7029)
* Add metadata shadows to multisig pallet

* Update frame/multisig/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-09-08 11:41:27 +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
cheme 186fa587cf Ignore wasm_gc for debug build. (#6962)
* Ignore gc for debug build.

* alternate implementation

* Update utils/wasm-builder/src/lib.rs

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

* fix

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-09-08 09:27:10 +02:00
Dan Forbes 77a3656663 Update Nicks docs to clarify that it is not production-ready (#6990) 2020-09-07 17:38:14 +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
Joshy Orndorff aba092e8be Node template complete import pipeline (#7014)
* Use complete import pipeline

* Line length

Co-authored-by: Dan Forbes <dan@danforbes.dev>
2020-09-07 12:15:01 +02: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
Kian Paimani e6ce3e7ac0 Fix compact npos solution edge count calculation (#7021)
This edge count is used for weighing, and it is somewhat trivial to review and verify that the current implementation was ignoring `votes16` field of the struct. As reminder, the struct is like this: 
```rust

struct Compact {
  votes1: ... ,
  votes2: ..., 
  ...,
  votes16: ...,
}
```

I already will fix this in https://github.com/paritytech/substrate/pull/7007, but since it might take a while, this one can go in asap and make it to the very next runtime.
2020-09-04 14:29:34 +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
Max Inden aa5a10802c *: Update to Prometheus v0.10.0 (#6964)
* *: Update to Prometheus v0.10.0-rc.1

* *: Update to Prometheus v0.10.0
2020-09-01 11:23:10 +00:00
gabriel klawitter c8a0d8bc5b ci: deploy alerting rules: fix run on changes (#6998)
* ci: deploy alerting rules: fix run on changes

Co-authored-by: Max Inden <mail@max-inden.de>
2020-09-01 12:48:03 +02:00
Ashley 57dd0facbb Move subcommands from sc-cli to nodes (#6948) 2020-09-01 09:06:22 +00:00
Xiliang Chen d2dcb5ce7a fix pallet-evm features (#6995) 2020-09-01 05:26:25 +02:00
Ashley 48269e0031 Change browser-demo build.sh to use python 3 again (#6992) 2020-08-31 17:05:29 +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
Gerben van de Wiel 9b4315a62d Inverting events set and changed in nicks pallet (#6989)
Fixing #6988
2020-08-31 14:20:41 +00:00
cheme 734d30bf5d Update substrate bip39 version. (#6955)
* update bip39 version

* and lock
2020-08-31 14:16:30 +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
Alexander Popiak ff1e8150e1 add generated weight info for pallet-collective (#6789)
* add benchmark for disapprove_proposal

* use generated WeightInfo for pallet-collective weights

* order collective benchmark params alphabetically to get a consistent ordering

* address review comments

* remove default impl of WeightInfo for ()

* remove comments about weight changes

* add default weights

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* whitelist voter account in benchmark

* update weights

* MaxMembers configurable

* remove base weight comment

* add weight to technical collective

* another DB whitelist optimization

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
2020-08-28 08:46:43 +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
André Silva a79c34778c babe: fix report_equivocation weight (#6936)
* babe: fix report_equivocation weight

* node: bump spec_version

* babe: fix floor in report_equivocation weight calculation

Co-authored-by: Gavin Wood <gavin@parity.io>

* grandpa: fix floor in report_equivocation weight calculation

* babe, grandpa: add test for weight_for::report_equivocation

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-08-26 18:27:44 +02:00
Kian Paimani 314d948687 Better prime election. (#6939)
* Better prime election.

* improve docs

* more sensible variable names

* link to Borda count wiki

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-08-26 18:26:56 +02:00
Shawn Tabrizi e69d12e76c Support Staking Payout to Any Account (#6832)
* Support staking payout to any account

* fix offences benchmarks
2020-08-26 18:26:33 +02: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
Kian Paimani 8856be80bc Fix staking fuzzer. (#6954) 2020-08-26 10:15:12 +02:00
Bastian Köcher f418ad2195 Remove implementation of Randomness for () (#6959) 2020-08-26 09:05:49 +02:00
Shawn Tabrizi b80191d0ff Fix unwraps and other issues with benchmarks (#6957)
* Fix unwraps and other issues with benchmarks

* undo changes to contracts pallet
2020-08-25 21:40:27 +00:00
Guillaume Thiolliere d628c62d6d update tracing attribute (#6950) 2020-08-24 15:33:15 +00:00
Swezey dd0d7f78f8 Add ShiftNrg Network SS58 address type (#6942) 2020-08-24 16:22:25 +02: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
Max Inden f04afd596b .maintain/monitoring/alerting-rules: Add fd alert (#6946)
Alert on high file descriptor allocation.
2020-08-24 15:37:07 +02: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
Shawn Tabrizi 4462f7150d Enable verification logic when executing benchmarks (#6929)
* Add `--verify` flag to benchmark execution

* make it so `--verify` can be used for getting the actual benchmarks

* undo manual testing

* oops

* use benchmark config struct

* verify is default on, docs update

* remove clone

* improve formatting

* fix test

* bump impl for ci
2020-08-24 15:24:00 +02: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