Commit Graph

1242 Commits

Author SHA1 Message Date
Sergei Shulepov abb282dfd0 Runtime API for checking validation outputs (#1842)
* annoying whitespaces

* update guide

Add `CheckValidationOutputs` runtime api and also change the
candidate-validation stuff

* promote ValidationOutputs to global primitives

i.e. move it from node specific primitives to global v1 primitives. This
will be needed when we share it later in the runtime inclusion module

* refactor acceptance checks in the inclusion module

factor out the common code to share it during the block inclusion and
for the forthcoming CheckValidationOutputs runtime api.

Also note that the acceptance criteria was updated to incorporate checks
that exist now in candidate-validation

* plumb the runtime api outside

* extract validation_data from ValidationOutputs

* use runtime-api to check validation outputs

apart from that refactor, update docs and tidy a bit

* Update the maxium code size

This is to fix a test that performs an upgrade.
2020-10-24 01:48:36 -05:00
Fedor Sakharov ec49d81307 Availability store pruning (#1820)
* Initial commit

* Move tests to separate module

* Move timestamps to the newtype

* Change idx name

* Use Duration for consts and update chunk records

* Ordering::Equal

* Update node/core/av-store/src/lib.rs

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

* put_ methods do the array sorting

* Fix get_block_number

* Change StoreChunk message type and relay parent method

* Add chunk tests

* Fix block number computation for StoreChunk

* Duration instead of u64 everywhere

* Add a clarifying comment

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
2020-10-24 06:03:57 +00:00
s3krit da121e4183 update generate_release_text.rb (#1812) 2020-10-23 14:37:53 -05:00
Bernhard Schuster 9ba8753916 chore: add cargo spellcheck configuration and custom topic specifc dictionary (#1841) 2020-10-23 17:28:23 +02:00
Cecile Tonglet fd138d4adb Companion PR for substrate #7328 (#1825)
* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Update node/service/src/lib.rs

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

* WIP

* "Update Substrate"

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: parity-processbot <>
2020-10-21 15:32:06 +00:00
s3krit 747103dfd2 Automation for new release process (#1754) 2020-10-20 18:24:54 +02:00
s3krit 032c68850d [CI] Docker image updates (#1799) 2020-10-19 15:44:14 +02:00
Bastian Köcher bf142f97c4 Companion for Substrate#7350 (#1829)
* Companion for Substrate#7350

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-19 08:45:11 +00:00
Shawn Tabrizi 11bbb076cc Companion PR for Substrate #7233 (#1791)
* Update constant weight signatures

* Keep timestamp constant time

* constant as_derivative

* cargo update -p sp-io

Co-authored-by: parity-processbot <>
2020-10-17 13:58:23 +00:00
Bastian Köcher a7e9aedbc5 Add ParasSudoWrapper to test-runtime and bring back register_parachain to test-service (#1811)
* Make register/deregister parachain dispatchables

This makes `register_parachain` and `deregister_parachain` of
`Registrar` dispatchables.

Besides that it brings back the functionality of the test node to
register a parachain.

* Fix tests

* PR review comments
2020-10-16 09:45:03 +02:00
André Silva 3687c5df11 runtime: remove finality-tracker (#1762)
* runtime: remove finality-tracker

* runtime: bump spec_version

* update substrate
2020-10-15 21:26:37 +00:00
Andronik Ordian 979b9c5556 av-store: create a db dir if missing (#1819) 2020-10-15 15:09:48 +02:00
Ashley c7e729e07b Companion PR for 'Add missing fields to the light sync state #7225' (#1801)
* Add sync_state_items

* Add SyncStateRpc

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-15 10:28:00 +00:00
Sergei Shulepov 5ba73b5b7b test-runtime: fix indentation (#1817) 2020-10-14 12:21:20 +02:00
Bastian Köcher 38c0623617 Companion for Substrate#7318 (#1810)
* Companion for Substrate#7318

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-14 08:22:49 +00:00
s3krit 7639a32657 bump matrix-message-action to v0.0.3 (#1809) 2020-10-13 16:04:06 +02:00
Max Inden 60e66f6af0 Revert "revert enabling authority discovery by default (#1532)" (#1807)
This reverts commit a7b6c91f80.

The authority discovery module was initially enabled by default on
validator and sentry nodes with commit 59f5eb4. This change was later on
reverted in a7b6c91. With this commit the authority discovery module is
again enabled by default.
2020-10-13 12:09:10 +00:00
Pierre Krieger 23b7542fee Tweak Cargo.tomls to make burnin easier (#1805) 2020-10-13 13:32:30 +02:00
Bastian Köcher 7699b09ea6 Make new_client public and change its signature (#1808) 2020-10-12 19:55:09 +02:00
Bastian Köcher 25914bb5e1 Rename node_handles to overseer_handler (#1803)
They are not node handles anymore ;)
2020-10-09 17:32:45 +02:00
Bastian Köcher d985b9aa02 Remove collating_for argument from service (#1802)
The collator is now enabled in a different way and we don't require this
argument anymore.
2020-10-09 14:55:26 +00:00
Andronik Ordian e62b300f47 Companion PR for #7247 (incremental priority group updates) (#1800)
* validator discovery: use incremental updates for priority_group

* validator discovery: fix compilation

* validator discovery: remove Sync bound on Net

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-09 14:34:17 +00:00
Rakan Alhneiti bd75a4ce18 Update to work with async keystore – Companion PR for #7000 (#1740)
* Fix keystore types

* Use SyncCryptoStorePtr

* Borrow keystore

* Fix unused imports

* Fix polkadot service

* Fix bitfield-distribution tests

* Fix indentation

* Fix backing tests

* Fix tests

* Fix provisioner tests

* Removed SyncCryptoStorePtr

* Fix services

* Address PR feedback

* Address PR feedback - 2

* Update CryptoStorePtr imports to be from sp_keystore

* Typo

* Fix CryptoStore import

* Document the reason behind using filesystem keystore

* Remove VALIDATORS

* Fix duplicate dependency

* Mark sp-keystore as optional

* Fix availability distribution

* Fix call to sign_with

* Fix keystore usage

* Remove tokio and fix parachains Cargo config

* Typos

* Fix keystore dereferencing

* Fix CryptoStore import

* Fix provisioner

* Fix node backing

* Update services

* Cleanup dependencies

* Use sync_keystore

* Fix node service

* Fix node service - 2

* Fix node service - 3

* Rename CryptoStorePtr to SyncCryptoStorePtr

* "Update Substrate"

* Apply suggestions from code review

* Update node/core/backing/Cargo.toml

* Update primitives/src/v0.rs

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

* Fix wasm build

* Update Cargo.lock

Co-authored-by: parity-processbot <>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-10-09 10:54:03 +00:00
Jun Jiang a2044bb87e Update index.html (#1798) 2020-10-09 08:57:35 +00:00
Kian Paimani c5d041041f Companion for substrate/pull/6896 (#1610)
* make polkadot work again,

* Fix build

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-08 15:10:21 +00:00
Peter Goodspeed-Niklaus c2941a2789 Remove old service, 3rd try (#1776)
* Remove old service, 3rd try

i.e.
Revert "Revert "Remove Old Service, 2nd try (#1732)" (#1758)"

This reverts commit 9a0f08bfe1.

Closes #1757.

We now have some evidence that the polkadot validator was producing
blocks after all; the reason the blocks_constructed metric was 0 was
that as a new metric it hadn't yet been incorporated into that
branch's codebase. See
https://github.com/paritytech/polkadot/issues/1757#issuecomment-700977602

As this PR is based on a newer `master` branch than the previous one,
that should hopefully no longer be an issue.

* paras trait now has an Origin type

* initial work running a two node local net

* use the right incantations so the nodes produce blocks together

* improve internal documentation

Co-authored-by: Bastian Köcher <git@kchr.de>
2020-10-08 12:54:29 +02:00
Bastian Köcher f2d7b6f5ac Make AllSubsystems usage easier in tests (#1794)
* Make `AllSubsystems` usage easier in tests

This makes the usage of `AllSubsystems` easier in tests by introducing
new methods.

- `dummy` initializes `AllSubsystems` with all systems set to dummy
- `replace_*` to replace any subsystem

Besides that this pr adds a `ForwardSubsystem` that is also useful for
tests. This subsystem will forward all incoming messages to the given channel.

* Update node/overseer/src/lib.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Update node/subsystem/src/lib.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Update node/subsystem/src/lib.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Move ForwardSubsystem and add a test

* Break some lines

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-10-08 11:27:19 +02:00
Shawn Tabrizi fc1153681e XCM: Land XCM Builder (#1793)
* Land XCM Builder

* Clean up Cargo dependencies

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-10-07 16:32:53 +00:00
Bastian Köcher 2b798f8571 Use Pin<Box<>> for collation future (#1792) 2020-10-07 11:29:00 +00:00
Fedor Sakharov 7f4646505a Advertise to already connected validators (#1790)
* Advertise to already connected validators

* Merge the loops and check the view

* Extend a test to capture new logic

* Fix a comment

* Update node/network/collator-protocol/src/collator_side.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Update comment

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-10-07 10:42:08 +00:00
Bastian Köcher 325c24580e Pass relay parent as argument when collating (#1789)
This pr changes the collation function to also pass the current relay
parent the parachain block should be build on.
2020-10-06 18:37:19 +00:00
Andronik Ordian d00bdfef08 chain-api subsystem: implement BlockHeader messsage (#1778)
* chain-api subsystem: implement BlockHeader messsage

* update the guide
2020-10-06 16:46:54 +02:00
Andronik Ordian abf76d27dc collator: fix a typo (#1788)
* collator: fix a typo

* collator: fix more typos

* collator: fix even more typos
2020-10-06 13:00:18 +00:00
Andronik Ordian ca89e3edbe NetworkBridge: validator (authorities) discovery api (#1699)
* stupid, but it compiles

* redo

* cleanup

* add ValidatorDiscovery to msgs

* sketch network bridge code

* ConnectToAuthorities instead of validators

* more stuff

* cleanup

* more stuff

* complete ConnectToAuthoritiesState

* Update node/network/bridge/src/lib.rs

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

* Collator protocol subsystem (#1659)

* WIP

* The initial implementation of the collator side.

* Improve comments

* Multiple collation requests

* Add more tests and comments to validator side

* Add comments, remove dead code

* Apply suggestions from code review

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

* Fix build after suggested changes

* Also connect to the next validator group

* Remove a Future impl and move TimeoutExt to util

* Minor nits

* Fix build

* Change FetchCollations back to FetchCollation

* Try this

* Final fixes

* Fix build

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

* handle multiple in-flight connection requests

* handle cancelled requests

* Update node/core/runtime-api/src/lib.rs

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>

* redo it again

* more stuff

* redo it again

* update comments

* workaround Future is not Send

* fix trailing spaces

* clarify comments

* bridge: fix compilation in tests

* update more comments

* small fixes

* port collator protocol to new validator discovery api

* collator tests compile

* collator tests pass

* do not revoke a request when the stream receiver is closed

* make revoking opt-in

* fix is_fulfilled

* handle request revokation in collator

* tests

* wait for validator connections asyncronously

* fix compilation

* relabel my todos

* apply Fedor's patch

* resolve reconnection TODO

* resolve revoking TODO

* resolve channel capacity TODO

* resolve peer cloning TODO

* resolve peer disconnected TODO

* resolve PeerSet TODO

* wip tests

* more tests

* resolve Arc TODO

* rename pending to non_revoked

* one more test

* extract utility function into util crate

* fix compilation in tests

* Apply suggestions from code review

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

* revert pin_project removal

* fix while let loop

* Revert "revert pin_project removal"

This reverts commit ae7f529d8de982ef66c3007dd1ff74c6ddce80d2.

* fix compilation

* Update node/subsystem/src/messages.rs

* docs on pub items

* guide updates

* remove a TODO

* small guide update

* fix a typo

* link to the issue

* validator discovery: on_request docs

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2020-10-06 13:34:57 +02:00
Sergei Shulepov 96f6b5ae2d Registrar v1 follow-ups (#1786)
* parachains: use the root origin for mock

* registrar: notify the router module about the cleanup

* add missing call to schedule_para_cleanup
2020-10-06 11:07:52 +00:00
Bastian Köcher a4662104db Make collation an optional return (#1787)
This pr changes the collator interface function to return an optional
collation instead of a collation. This is required as the parachain
itself can fail to generate a valid collation for various reason. Now if
the collation fails it will return `None`.

Besides that the pr adds some `RuntimeDebug` derive for `ValidationData`
and removes some whitespaces.
2020-10-06 11:57:10 +02:00
Sergei Shulepov 22e7d54f4d XCM: Land xcm-handler and xcm-executor (#1771)
Co-authored-by: Gavin Wood <gavin@parity.io>
2020-10-06 10:03:07 +02:00
Gavin Wood ecc1273dd3 v0.8.25 (#1785)
* Bump version

* Update RELEASE.md

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-05 17:30:40 +02:00
Peter Goodspeed-Niklaus f31c904140 add two node local net script (#1781)
* initial work running a two node local net

* use the right incantations so the nodes produce blocks together

* improve internal documentation
2020-10-05 14:51:40 +00:00
Jaco Greeff 98effb7d65 Adjust max nominators down to 128 (from 256) (#1782) 2020-10-05 16:02:30 +02:00
Kian Paimani 4d5b7a6245 Companion for substrate/pull/7215 (#1768)
* Companion for substrate/pull/7215

* More fixes

* Fix build

* fix

* Fix again with normal

* Fix build

* Latest changes

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-04 14:12:34 +02:00
Shawn Tabrizi 8d36e9b0f0 Remove Stale Upgrades (#1780)
* Remove stale upgrades

* add back origin migration

* remove unused
2020-10-02 16:45:04 +02:00
Shawn Tabrizi 2de057020f Update Polkadot Weights for Substrate 2.0 (#1761)
* Update benchmark list

* copy weights from substrate

* Run benchmarks on Polkadot

* Update kusama benchmark list

* update westend benchmark list

* Run benchmarks on Kusama

* update payout staking weights

* cargo update -p sp-io

* remove babe and grandpa from benchmark list

* remove babe and grandpa weights

* re-run staking weights

* update staking weights

* copy weights from Polkadot into Westend

* Update Cargo.lock
2020-10-02 15:45:59 +02:00
Fedor Sakharov 07a3f73811 Parachains v1 registrar module. (#1559)
* Initial commit.

* Fix build

* Add comments, remove Event

* Dont expose calls

* Remove TODO and origins

* Fix merge

* Enable or disable parathread registration
2020-10-01 19:00:59 -04:00
Bastian Köcher 5d8ae8d024 Derive From for AllMessages and simplify send_msg (#1774) 2020-10-01 16:22:15 +00:00
Andronik Ordian 579614d127 implement remaining subsystem metrics (#1770)
* overseer metrics: messages relayed

* provisioner metrics: cosmetic changes

* candidate selection metrics: cosmetic changes

* availability bitfields metrics

* availability distribution metrics

* PoV distribution metrics

* statement-distribution: small simplification

* statement-distribution: extract log target into a const

* statement-distribution: metrics

* address review nits
2020-10-01 12:08:03 +02:00
Bastian Köcher 693d40831d Companion for https://github.com/paritytech/substrate/pull/7236 (#1773)
* Companion for https://github.com/paritytech/substrate/pull/7236

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-01 09:31:04 +00:00
Denis Pisarev d089baf2d4 WIP: remove deprecated only/except clauses, build is now manual on PRs (#1769)
* change (CI): soon to be deprecated only changed to rules, build is now manual on PRs

* change (CI): add workflow to avoid doubled pipelines, remove second job

* debug (CI): unblock pipeline from waiting a manual action
2020-09-30 22:17:00 +02:00
Bastian Köcher 1f55a92b5a Increase Westend spec_version (#1766)
This is required to ensure that on chain isn't seen as compatible to
current master.
2020-09-29 20:09:34 +02:00
Andronik Ordian de05bec4d6 move Metrics to utils (#1765) 2020-09-29 11:42:20 +00:00