Commit Graph

1382 Commits

Author SHA1 Message Date
Andronik Ordian 87e0b6fe65 remove unused code (#2058) 2020-12-02 14:18:18 +00:00
Bastian Köcher 890ae589d4 Make it possible for the adder collator to calculate any state (#2056)
* Make it possible for the adder collator to calculate any state

This is very useful for when wanting to have multiple running or when
wanting to restart the collator.

* Update parachain/test-parachains/adder/collator/src/lib.rs

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2020-12-02 14:15:30 +00:00
Robert Habermeier 709f990fb2 be more careful about fusing in select! (#2052) 2020-12-02 14:52:51 +01:00
Bastian Köcher b13052de12 Use correct logging target for network bridge (#2057) 2020-12-02 13:00:23 +00:00
dependabot[bot] 26b8dbe120 Bump wasm-bindgen-futures from 0.4.18 to 0.4.19 (#2054)
Bumps [wasm-bindgen-futures](https://github.com/rustwasm/wasm-bindgen) from 0.4.18 to 0.4.19.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 08:54:36 +01:00
Robert Habermeier 9071120de1 guide: Availability Recovery (#2011)
* expand description

* basics of availability recovery

* finish availability recovery

* fill out missing text

* Update roadmap/implementers-guide/src/node/availability/availability-recovery.md

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>

* fix signal handling

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
2020-12-01 14:58:31 -05:00
Fedor Sakharov d5a39dffef Cadidate selection check assignment (#2042)
* Cadidate selection check assignment

* Apply suggestions from code review

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

* Review fixes

* Punish collator for wrong announcements

* Update node/core/candidate-selection/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
2020-12-01 13:43:00 -05:00
Sergei Shulepov 917a5cce62 adder-collator cli flags (#2051)
* Accept --parachain-id in adder-collator

* adder-collator: Support a file chainspec

This change is to make it more similar to what we have in cumlus.
2020-12-01 19:20:20 +01:00
Sergei Shulepov e8c43576d4 execute_with_client: add 'static bound for Backend (#2049)
This is not a big change since the user definition AbstractClient already is 'static.
2020-12-01 14:22:24 +00:00
dependabot[bot] 36c11201cc Bump wasm-bindgen from 0.2.68 to 0.2.69 (#2044)
Bumps [wasm-bindgen](https://github.com/rustwasm/wasm-bindgen) from 0.2.68 to 0.2.69.
- [Release notes](https://github.com/rustwasm/wasm-bindgen/releases)
- [Changelog](https://github.com/rustwasm/wasm-bindgen/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rustwasm/wasm-bindgen/compare/0.2.68...0.2.69)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 13:18:30 +01:00
dependabot[bot] 9d961e2023 Bump structopt from 0.3.20 to 0.3.21 (#2046)
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.20 to 0.3.21.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.20...v0.3.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-01 09:41:36 +01:00
Robert Habermeier 414acdfc54 small improvements for parachains consensus (#2040)
* introduce a waiting period before selecting candidates and bitfields

* add network_bridge=debug tracing for rep

* change to 2.5s timeout in proposer

* pass timeout to proposer

* move timeout back to provisioner

* grumbles

* Update node/core/provisioner/src/lib.rs

* Fix nitpicks

* Fix bug

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
2020-11-30 22:52:30 +01:00
Robert Habermeier 0f4395fc44 parachains runtime: configurable maximum validators per core (#2043)
* parachains runtime: configurable maximum validators per core

* update guide and add test
2020-11-30 20:18:02 +00:00
Pierre Krieger 8081c54428 Update Substrate again (#2041) 2020-11-30 19:26:44 +01:00
Robert Habermeier 1008465413 Move candidate validation to the background (#2028)
* refactor some functions to not rely on `self`

* factor out common elements of seconding and attesting

* Add Spawn to backing FromJob

* do candidate validation in background

* tests

* address grumbles
2020-11-30 17:01:03 +00:00
Bastian Köcher 536dceb4f6 Simplify subsystem jobs (#2037)
* Simplify subsystem jobs

This pr simplifies the subsystem jobs interface. Instead of requiring an
extra message that is used to signal that a job should be ended, a job
now ends when the receiver returns `None`. Besides that it changes the
interface to enforce that messages to a job provide a relay parent.

* Drop ToJobTrait

* Remove FromJob

We always convert this message to FromJobCommand anyway.
2020-11-30 17:01:26 +01:00
Guillaume Thiolliere 2d4aa3a42e Companion: Rename pallet trait Trait to Config (#2014)
* rename Trait -> Config

* revert diener changes

* rename HostConfig to ActiveConfig as more meaningful

* fix merge

* "Update Substrate"

* cargo update -p sp-io

Co-authored-by: parity-processbot <>
2020-11-30 15:13:43 +00:00
Pierre Krieger 7df537fcdd cargo update -p sp-io (#2038) 2020-11-30 14:47:23 +00:00
Bastian Köcher 9ce186227c Process runtime api requests in the background (#2035)
This pr changes how the runtime api subsystem processes runtime api
requests. Instead of answering all of them in the subsystem task and
thus, making all requests sequential, we now answer them in a background
task. This enables us to serve multiple requests at once.
2020-11-30 10:41:47 +00:00
dependabot[bot] f2606dbd4b Bump nix from 0.19.0 to 0.19.1 (#2033)
Bumps [nix](https://github.com/nix-rust/nix) from 0.19.0 to 0.19.1.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.19.0...v0.19.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-30 10:08:36 +01:00
Andronik Ordian bbb036e304 util: implement FusedStream for Jobs (#2031) 2020-11-28 23:14:37 +01:00
Robert Habermeier d6307a4978 allow jobs to spawn sub-tasks (#2030)
* allow jobs to spawn sub-tasks

* fix fallout in subsytems
2020-11-28 15:12:43 -05:00
Robert Habermeier 0c84214814 change approval voting counting procedure (#1972)
* change approval voting counting procedure

* language

* Update roadmap/implementers-guide/src/node/approval/approval-voting.md

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* improve language

* time-shifting

* tweak time-shifting

* expand

* typo

* tweaks to ensure we always get woken up

* move timing check into `tranches_to_approve`

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
2020-11-28 18:35:46 +00:00
Andronik Ordian f8181fa1f2 erasure-coding: do not panic on 1 validator (#2022)
* erasure-coding: do not panic on 1 validator

* tabify fuzz tests

* remove num_validators length check

* remove unused import

* move erasure_coding_fuzzer to fuzzer

* change the authors to admit (at) parity.io

* Apply suggestions from code review

Co-authored-by: Sergei Shulepov <sergei@parity.io>

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2020-11-27 16:49:00 -05:00
André Silva 700b40679c proposer: guard all provisioner data work with timeout (#2026) 2020-11-27 19:39:22 +01:00
Robert Habermeier 0a79d663e4 Move erasure root out of candidate commitments and into descriptor (#2010)
* guide: move erasure-root to candidate descriptor

* primitives: move erasure root to descriptor

* guide: unify candidate commitments and validation outputs

* primitives: unify validation outputs and candidate commitments

* parachains-runtime: fix fallout

* runtimes: fix fallout

* collation generation: fix fallout

* fix stray reference in primitives

* fix fallout in node-primitives

* fix remaining fallout in collation generation

* fix fallout in candidate validation

* fix fallout in runtime API subsystem

* fix fallout in subsystem messages

* fix fallout in candidate backing

* fix fallout in availability distribution

* don't clone

* clone

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2020-11-27 16:39:42 +00:00
yaanhyy 4fba9df943 add module to features/std (#2024)
Co-authored-by: hongyuanyang <hongyuanyang@huobi.com>
2020-11-27 09:45:31 +01:00
Martin Pugh 642826ba07 Fix check_runtime.sh (#2020) 2020-11-26 20:17:16 +01:00
Vincent Ulitzsch 7d8eb5b2ac Add a fuzzer for the erasure coding (#2021)
* Commit a fuzzer for the erase coding

* Replace tabs with spaces for the erase coding fuzzer

* Apply suggestions from code review

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-11-26 17:51:52 +00:00
Bastian Köcher e761c99852 Make sure we don't send messages multiple times in the availability distribution subsystem (#2015) 2020-11-26 15:13:44 +00:00
Bastian Köcher 119eb34fa8 Bump spec versions to ensure that we don't run in native (#2017) 2020-11-26 13:13:12 +01:00
Andronik Ordian 39a12b68f6 past-session validator discovery APIs (#2009)
* guide: fix formatting for SessionInfo module

* primitives: SessionInfo type

* punt on approval keys

* ah, revert the type alias

* session info runtime module skeleton

* update the guide

* runtime/configuration: sync with the guide

* runtime/configuration: setters for newly added fields

* runtime/configuration: set codec indexes

* runtime/configuration: update test

* primitives: fix SessionInfo definition

* runtime/session_info: initial impl

* runtime/session_info: use initializer for session handling (wip)

* runtime/session_info: mock authority discovery trait

* guide: update the initializer's order

* runtime/session_info: tests skeleton

* runtime/session_info: store n_delay_tranches in Configuration

* runtime/session_info: punt on approval keys

* runtime/session_info: add some basic tests

* Update primitives/src/v1.rs

* small fixes

* remove codec index annotation on structs

* fix off-by-one error

* validator_discovery: accept a session index

* runtime: replace validator_discovery api with session_info

* Update runtime/parachains/src/session_info.rs

Co-authored-by: Sergei Shulepov <sergei@parity.io>

* runtime/session_info: add a comment about missing entries

* runtime/session_info: define the keys

* util: expose connect_to_past_session_validators

* util: allow session_info requests for jobs

* runtime-api: add mock test for session_info

* collator-protocol: add session_index to test state

* util: fix error message for runtime error

* fix compilation

* fix tests after merge with master

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2020-11-26 11:02:50 +00:00
Bastian Köcher 4ce744818c Some code cleanup in overseer (#2008)
* Some code cleanup in overseer

- Switches to select! in the overseer run loop to be more fair about
message processing between the different sources.
- Added a check to only send `ActiveLeaves` if the update actually
contains any data.

* Move the check

* Restore old behavior

* Simplify message sending and signal sending to subsystems

* Update node/subsystem/src/lib.rs
2020-11-25 09:27:50 +00:00
Fedor Sakharov 994d621f2c PoV Distribution optimization (#1990)
* Initial commit

* Remove unnecessary struct

* Some review nits

* Update node/network/pov-distribution/src/lib.rs

* Update parachain/test-parachains/adder/collator/tests/integration.rs

* Review nits

* notify_all_we_are_awaiting

* Both ways of peers connections should work the same

* Add mod-level docs to error.rs

* Avoid multiple connection requests at same parent

* Dont bail on errors

* FusedStream for ConnectionRequests

* Fix build after merge

* Improve error handling

* Remove whitespace formatting
2020-11-25 09:20:54 +00:00
Robert Habermeier 51f6cb1979 Approval Distribution Subsystem (#1951)
* skeleton flow control

* tweaks & rename to approvals distribution

* Update roadmap/implementers-guide/src/node/approval/approval-distribution.md

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* Update roadmap/implementers-guide/src/node/approval/approval-distribution.md

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* add a `NewBlocks` message and dispatch

* new data format for approval distribution

* guide: update view to include finalized block number

* approvals: document view updating

* pruning when peers disconnect

* add remaining message types

* fix link

* network message type

* handle incoming assignments

* import_and_circulate_approval

* handle new blocks

* address review comments

* address review comments and use nifty VRFProof

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
2020-11-24 23:40:07 -05:00
Robert Habermeier 5603e0f166 Session management for approval voting (#1973)
* elaborate on runtime API

* clarify what to do if the runtime API calls fail

* Update roadmap/implementers-guide/src/node/approval/approval-voting.md

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* Update roadmap/implementers-guide/src/node/approval/approval-voting.md

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-11-24 16:44:02 -05:00
Bastian Köcher 884b432035 Do not send messages twice in bitfield distribution (#2005)
* Do not send messages twice in bitfield distribution

This removes a bug which resulted in sending bitfield messages multiple
times by not checking if we already relayed them. Besides that it also
adds an optimization to not relay a message to a peer that send us
this message.

* Review comments

* Break some lines
2020-11-24 16:40:36 -05:00
Robert Habermeier 74efba2a21 backing: reorder votes to match bitfield in backed candidate (#2006) 2020-11-24 10:23:41 -05:00
Bastian Köcher 0186ba8daf Switch to wasm-builder 3.0.0 (#2004)
* Switch to wasm-builder 3.0.0

* Fix deterministic wasm build check
2020-11-24 12:31:32 +00:00
Bastian Köcher 698de0b4fa Make sure we inform statement listeners about received statements (#1999) 2020-11-24 10:50:27 +00:00
aaron 495172c585 Update docker.md (#2000)
when you use `CMD ["/usr/local/bin/polkadot"]` in dockerfile, you don’t need to use `polkadot` while creating a container.
2020-11-24 09:59:45 +01:00
dependabot[bot] 748cbfd820 Bump tracing from 0.1.21 to 0.1.22 (#2001)
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.21 to 0.1.22.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.21...tracing-0.1.22)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-24 09:44:27 +01:00
dependabot[bot] bac1e6e45e Bump assert_cmd from 1.0.1 to 1.0.2 (#2003)
Bumps [assert_cmd](https://github.com/assert-rs/assert_cmd) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/assert-rs/assert_cmd/releases)
- [Changelog](https://github.com/assert-rs/assert_cmd/blob/master/CHANGELOG.md)
- [Commits](https://github.com/assert-rs/assert_cmd/compare/v1.0.1...v1.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-24 09:25:29 +01:00
dependabot[bot] 1f8e926507 Bump color-eyre from 0.5.7 to 0.5.8 (#2002)
Bumps [color-eyre](https://github.com/yaahc/color-eyre) from 0.5.7 to 0.5.8.
- [Release notes](https://github.com/yaahc/color-eyre/releases)
- [Changelog](https://github.com/yaahc/color-eyre/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yaahc/color-eyre/compare/v0.5.7...v0.5.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-24 09:25:04 +01:00
Max Inden 63bf63e442 *: Update authority discovery and remove WorkerConfig (#1953)
* *: Update authority discovery and remove WorkerConfig

With https://github.com/paritytech/substrate/pull/7545 the authority
discovery module queries and publishes addresses on an exponentially
increasing interval. Doing so should make custom configurations
obsolete, as operations are retried in a timely fashion in the first
minutes.

* */Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing

* Revert "*/Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing"

This reverts commit 0785943a1e377454f088814ef20f4432de09da7a.

* "Update Substrate"

* Revert ""Update Substrate""

This reverts commit 377b221e1853b2c383f0c416d686535b545796cb.

* Cargo.lock: Manual Substrate update

* node/test/service/src/lib: Remove unused import

* parachain/test-parachains/adder: Remove unused import

Co-authored-by: parity-processbot <>
2020-11-23 18:23:18 +00:00
André Silva ec2928234c companion for substrate#7546 (#1954)
* companion for substrate#7546

* update to substrate master
2020-11-23 15:07:58 +00:00
Andronik Ordian 69b103b1d5 overseer: send_msg should not return an error (#1995)
* send_message should not return an error

* Apply suggestions from code review

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>

* s/send_logging_error/send_and_log_error

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
2020-11-23 12:42:14 +01:00
dependabot[bot] 8cdb063f72 Bump async-trait from 0.1.41 to 0.1.42 (#1996)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.41 to 0.1.42.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.41...0.1.42)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-23 08:28:21 +00:00
Bastian Köcher b9a9e836ca Improve collator side of the collator-protocol (#1955)
* Improve collator side of the collator-protocol

This pr improves the collator-protocol implementation of the collator
side. Besides cleaning up code and rewriting it, the following changed:

- Before on `PeerViewChange` we send an advertisment to every peer, now
this only happens for validators.
- It also adds a check that we send an advertisment message only once
for a connected peer.
- If the same validator was part of the current and next group, we
requested to be connected to this validator two times. This is also
fixed now.
- Instead of having only one connection request, we now are being able
to store multiple of them. This is required as we can have multiple
active leafs at any point of time.

* Switch to common `ConnectionRequests`

* Update node/network/collator-protocol/src/collator_side.rs
2020-11-22 12:55:05 +01:00
Martin Pugh 7abcd42fd2 add parity-keyring to install instructions (#1993) 2020-11-20 21:40:45 +01:00