Commit Graph

1869 Commits

Author SHA1 Message Date
s3krit d42d9dd4f2 Prep for v0.8.26: bump version & substrate (#1851)
* bump version & substrate

* update release checklist md
2020-10-27 14:08:54 +01:00
Andronik Ordian fa1881458f fix compilation on nightly (#1850)
* runtime: annonate some types

* cargo update -p sp-io

* add wasm overwrites to Configuration in test-service

* rename overwrite to override

Co-authored-by: Andrew Plaza <andrew.plaza@parity.io>
2020-10-26 17:25:49 +00:00
Bastian Köcher f2a05330ed Update everything to latest wasm-builder (#1843)
This fixes some incompatibilities between wasm-builder and wasm-builder-runner.
2020-10-26 11:54:16 +00:00
Bastian Köcher 2163988f54 Improve and unify testing facilities (#1844)
* Improve and unify testing facilities

This improves the testing facilities by making the test client easier to
use. It also removes code that is not required for the test client.
Besides that it also moves the test service and test client under
`node/test`.

* Update Cargo.lock

* Update node/test/client/src/block_builder.rs

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

* Remove explicit lifetime annotation

* Fix warnings and add extra `BlockBuilderExt`

Co-authored-by: Andronik Ordian <write@reusable.software>
2020-10-25 14:45:30 +00:00
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
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
Sergei Shulepov 5ba73b5b7b test-runtime: fix indentation (#1817) 2020-10-14 12:21:20 +02: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
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
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
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
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 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
Peter Goodspeed-Niklaus 9a0f08bfe1 Revert "Remove Old Service, 2nd try (#1732)" (#1758)
This reverts commit 96f2615582.
2020-09-28 10:57:29 +00:00
Peter Goodspeed-Niklaus 96f2615582 Remove Old Service, 2nd try (#1732)
* Restore "Remove service, migrate all to service-new (#1630)"

i.e.
Revert "Revert "Remove service, migrate all to service-new (#1630)" (#1731)"

This reverts commit b4457f555b.

This allows us to get the changeset from #1630 into a new branch
which can be merged sometime in the future after appropriate burnin
tests have completed.

* remove ',)' from codebase outside of macros

* restore bdfl-preferred formatting

* attempt to improve destructuring formatting

* rename polkadot-service-new -> polkadot-service

* Apply suggestions from code review

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

* remove unused import

* Update runtime/rococo-v1/README.md

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

Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-09-28 08:23:02 +00:00
Gavin Wood d4bfb55c0f Companion for #7111 (Introduce cancel_proposal and blacklist) (#1728)
* Fixes

* update weights

* Fixes

* Fixes

* Fixes

* update weights

* "Update Substrate"

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
2020-09-24 21:52:20 +00:00
Sergei Shulepov a532315737 Parachains: Introduce a dummy module to include the Origin. (#1749)
That's because `construct_runtime` doesn't support a free-standing Origin. See the comment in parachains/src/origin.rs
2020-09-24 15:13:23 +00:00
Guillaume Thiolliere 944e192532 Companion: Handle construct_runtime breaking change. (#1692)
* use construct_runtime index

* fix

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-09-22 15:20:13 +00:00
Bastian Köcher 1934a74cc7 Companion for ModuleToIndex to PalletInfo rename (#1743)
* Companion for `ModuleToIndex` to `PalletInfo` rename

* "Update Substrate"

Co-authored-by: parity-processbot <>
Co-authored-by: Benjamin Kampmann <ben@gnunicorn.org>
2020-09-22 16:19:12 +02:00
Kian Paimani 04224aa4f6 Companion for substrate/pull/7161 (#1739)
* Companion for https://github.com/paritytech/substrate/pull/7161

* Update weights

* Update tests

* remove weight tests

* Update weights using benchmarking machine

./substrate2/target/release/substrate benchmark --chain dev --steps 50 --repeat 20 --pallet pallet_elections_phragmen --extrinsic "*" --raw --execution=wasm --wasm-execution=compiled --output

* "Update Substrate"

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
2020-09-22 16:01:06 +02:00
Shawn Tabrizi 9b099a22ac Companion for 7155 (WeightInfo for Babe and Grandpa) (#1736)
* Add WeightInfo to traits

* Update Cargo.lock

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-09-21 14:03:26 +00:00
Shawn Tabrizi e81506540e Companion PR for #7136 (WeightInfo for Session / Offences) (#1735)
* Update `pallet_offences` trait

* remove session weight tests

* "Update Substrate"

* Update Cargo.lock

* Update Cargo.lock

* remove unused code

Co-authored-by: parity-processbot <>
2020-09-21 11:25:24 +00:00
Shawn Tabrizi 872f41710f Companion PR for #7138 (WeightInfo for Scheduler) (#1734)
* Update scheduler from substrate

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-09-18 18:11:57 +00:00
Xiliang Chen a0acc6793b Companion PR for Bounties #5715 (#1336)
* update for treasury bounty

* update trait

* add weightinfo

* remove old weight tests

* "Update Substrate"

* remove unused deps

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
2020-09-18 13:23:18 +02:00
Peter Goodspeed-Niklaus b4457f555b Revert "Remove service, migrate all to service-new (#1630)" (#1731)
This reverts commit d531ba561c.
2020-09-18 11:18:22 +02:00
Peter Goodspeed-Niklaus d531ba561c Remove service, migrate all to service-new (#1630)
* import rococo into chain-spec

* make a few stabs at moving forward

* wip: rococo readme

* remove /service crate

- Move the chain-spec files to node-service
- update sufficient cargo files that polkadot-service-new builds
- not everything else builds yet

* wip: chase down some build errors in polkadot-cli

There's a lot more to go, but some progress has happened.

* make more progress getting polkadot-cli to build

* don't ignore polkadot.json within the res directory

* don't recreate pathbufs

* Prepare Polkadot to be used by Cumulus

This begins to make Polkadot usable from Cumulus.

* Remove old test

* migrate new_chain_ops fix from /service

* partially remove node/test-service

* Reset some changes

* Revert "partially remove node/test-service"

This reverts commit 7b8f9ba5bfc286a309df89853ae11facf3277ffb.

* WIP: replace v0 ParachainHost impl with v1 for test runtime

This is necessary because one of the current errors when building
the test service boils down to:

the trait bound `polkadot_test_runtime::RuntimeApiImpl<...>`:
  `polkadot_primitives::v1::ParachainHost<...>` is not satisfied

This is WIP because it appears to be causing some std leakage into
the wasm environment, or something; the compiler is currently
complaining about duplicate definitions of `panic_handler` and `oom`.
Presumably I have to identify all std types (Vec etc) and replace
them with sp_std equivalents.

* fix test runtime build

it wasn't std leakage, after all

* bump westend spec version

* use service-new as service within cli

* to revert: demo that forwarding the test runtime to the real impl blows up

* Revert "to revert: demo that forwarding the test runtime to the real impl blows up"

This reverts commit 68d2f385f378721c7433e3e39133434610cd2a51.

* Revert "Revert "to revert: demo that forwarding the test runtime to the real impl blows up""

This reverts commit 04cb1cbf8873b4429cb9c9fdccb7f4bb137dc720.

Might have just forgotten to disable default features

* More reverts

* MOARE

* plug in the runtime as the generic instantiation

This feels closer to a solution, but it still has problems: in particular,
it's assumed that Runtime implements all appropriate Trait traits,
which this one apparently does not.

* implement necessary traits to get the test runtime compiling

This is almost certainly not correct in some way; it really
looks like I need to mess with the construct_runtime! macro
somehow, to inject the inclusion trait's event type as a Event
variant. Still, better lock down this changeset while it all
compiles.

* add inclusion::Event as variant into Event enum

* implement unimplemented bits in kusama

* implement unimplemented bits in polkadot runtime

* implement unimplemented bits in westend runtime

* migrate client upgrades from master

* update test service with new node changes

* package metadata--that wasn't intended to be removed

* add parachains v1 modules to each runtime

It's not clear what precisely this does, but it's probably the right
thing to do.

* enable cli to opt out of full node features

* adjust rococo chainspec per example

https://github.com/paritytech/polkadot/blob/26f1fa47f7836ab4bee5d4aad127ebce748320dd/service/src/chain_spec.rs#L362

* try to fix Cargo.lock

Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Andronik Ordian <write@reusable.software>
2020-09-18 10:27:54 +02:00
Sergei Shulepov 9bb374fb90 Skeleton of the Router module (#1726)
The purpose of this commit is to establish a foundation of the router module, it paves the way for the implementation of other features.
2020-09-17 12:27:40 +02:00
Bastian Köcher 74261da964 Prepare Polkadot to be used by Cumulus (#1697)
* Prepare Polkadot to be used by Cumulus

This begins to make Polkadot usable from Cumulus.

* Remove old test

* Reset some changes

* More reverts

* MOARE

* Don't use `unimplemented!`
2020-09-16 17:29:34 -04:00
Shawn Tabrizi 2613ec66ca Companion for #7103 (WeightInfo for Vesting) (#1721)
* Add weights and new trait

* update more trait instances

* Use () for tests

* update for new type

* "Update Substrate"

* bump spec version

* bump more spec

Co-authored-by: parity-processbot <>
2020-09-16 22:37:00 +02:00
Kian Paimani b9d36c70e8 Bump Nominator Reward Limits (#1668)
* Add reward limits

* Fix weight tests and whatnot

* add weight files

* Update runtime/kusama/src/lib.rs

* "Update Substrate"

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
2020-09-16 12:47:54 +00:00
Pierre Krieger 994e5dc29b Update Substrate and bump version to 0.8.24 (#1720) 2020-09-16 11:56:28 +00:00
Wei Tang bfb41c715b Companion PR for #6984 (#1661)
* Add DefaultVote trait definition

* Check in cargo lock

* Update cargo lock

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-09-14 14:35:38 +00:00
joe petrowski a70ed93712 typo in proxy tests (#1713) 2020-09-14 10:39:22 +02:00
Fedor Sakharov 98660cbd94 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>
2020-09-10 16:54:59 +03:00
Shawn Tabrizi 4d31f8159d Remove Purchase Pallet from Polkadot + Westend (#1636)
* Remove purchase pallet

* Update runtime/common/src/purchase.rs

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

* Actually check and fix compile

* Add events to dummy

* Fix kusama too

* remove events where it did not exist historically

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-09-08 09:10:28 -04:00
Alexander Popiak 6591b03480 Companion PR: add weightinfo for collective (#1524)
* add and use generated weights for collective pallet

* correct pallet name

* MaxMembers

* add weight to technical collective

* Fix const assert

* update weights

* update import

* "Update Substrate"

* bump spec_version

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
2020-08-28 12:23:41 +02:00
s3krit e3b312dab0 Bump version to v0.8.23 (#1646)
* bump version to v0.8.23
* bump substrate
2020-08-26 19:07:54 +02:00
Shawn Tabrizi 4f72f246a5 Companion for Substrate #6929 (Execute verify logic when running benchmarks) (#1623)
* Update for substrate changes

* cargo update -p sp-io

* cargo update -p sp-io
2020-08-24 16:35:03 +02:00
RRTTI 591e9b7454 Update Kusama Council seats & Runners Up number (#1614)
* Update Kusama Council seats & Runners Up number

Update Kusama council seats to 19 and DesiredRunnersUp to 19 as well, increase representation of passive stake holders in the council and giving more visibility to runners up in Kusama Network (from 7 to 19): this will be more visibility to new candidates to expand options for stakeholders when voting.

* Update lib.rs

* Update lib.rs
2020-08-23 16:58:58 +02:00
Gavin Wood 640b2e8c50 Companion to #6770: Delayed Proxies (#1520)
* Fix up proxy

* Update weights

* Fixes

* rename 'proxy_announced' -> 'announced_proxy'

* flip rename

* update weight formulas

* Fixes

* fix merge

* Fix runtime

* Fix runtimes

* "Update Substrate"

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: parity-processbot <>
2020-08-23 11:12:58 +00:00
warfollowsme | ryabina.io d2c4e0cc8e Annotated parameter names for events (#1440)
* annotated parameter names for events

* Update runtime/parachains/src/inclusion.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-08-20 14:57:30 +00:00