Commit Graph

189 Commits

Author SHA1 Message Date
Shawn Tabrizi adaa63098b Add Basic XCM (#1934)
* basic setup

* fix compile

* add back xcmsink

* Update primitives.rs

* add downward xcm for sudo

* Update paras_sudo_wrapper.rs

* Update Cargo.lock

* some cleanups

* Add error log

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2020-12-14 10:11:08 +00:00
Robert Habermeier 15c253117d Add assignment keys to session keys, no separate approvals key (#2092)
* guide: merge backing and approval keys

* bump substrate master & update primitives

* use new SessionInfo struct in session_info

* session keys upgrade for Polkadot

* kusama & westend runtimes

* bump westend, kusama, and polkadot versions

* add session key to rococo & test-runtime

* update prepare-test-net to latest subkey

* update chain specs to support new para_assignment session key

* get cargo.lock from master

* formatting

* update kill_storage based on substrate master

* fix test-service

* assgn -> asgn

* use session info module for assignment session key
2020-12-10 20:30:27 -06:00
Alexander Theißen cadc8347b4 Companion for #7671 (child trie deletion host function) (#2077)
* Adapt to new kill_child_storage runtime interface version

* "Update Substrate"

* Update substrate

Co-authored-by: parity-processbot <>
2020-12-09 09:02:36 +00:00
Tomasz Drwięga f28333aedb Companion for #6629 (weight params refactor) (#1420)
* Change branch.

* Update runtime.

* Revert "Change branch."

This reverts commit 841c59f3398136c27cc235a29d7d459e8a4c8ce0.

* Update substrate.

* Fix tests.

* Fix compilation.

* Fix frame system imports.

* Fix usages of system

* Fix stuff.

* Fix compilation.

* Fixes.

* Fix block_weight usage.

* Bump substrate.
2020-12-08 12:55:57 +00:00
Martin Pugh 52537f3621 Bump substrate, and bump version to v0.8.27 (#2082)
* Bump version from v0.8.26 to v0.8.27

* bump substrate
2020-12-07 17:32:32 +01:00
dependabot[bot] 5294f2b302 Bump serde from 1.0.117 to 1.0.118 (#2075)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.117 to 1.0.118.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.117...v1.0.118)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-07 16:07:29 +01:00
Sergei Shulepov 62a95fc602 Sudo utility for establishing an HRMP channel (#2067)
* Clean up of visibility of helper fns

* Document HRMP channel dispatchables

* Provide the sudo_establish_hrmp_channel dispatchable function

* Apply suggestions from code review

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-12-04 13:19:01 +00:00
dependabot[bot] 76169aef3d Bump serde_json from 1.0.59 to 1.0.60 (#2065)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.59 to 1.0.60.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.59...v1.0.60)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-03 07:25:44 +00: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
yaanhyy 4fba9df943 add module to features/std (#2024)
Co-authored-by: hongyuanyang <hongyuanyang@huobi.com>
2020-11-27 09:45:31 +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
Sergei Shulepov 94670d8082 A simple check to reject obviously wrong validation code binaries (#1989)
* A simple check to reject obviously wrong validation code binaries

* Use wasm-magic constants in the tests.

* tabs not spaces

* move WASM_MAGIC into lib.rs
2020-11-19 19:22:17 +00:00
Andronik Ordian 0a8a607a58 update most of the dependencies (#1946)
* update tiny-keccak to 0.2

* update deps except bitvec and shared_memory

* fix some warning after futures upgrade

* remove useless package rename caused by bug in cargo-upgrade

* revert parity-util-mem *

* remove unused import

* cargo update

* remove all renames on parity-scale-codec

* remove the leftovers

* remove unused dep
2020-11-17 11:16:31 +01:00
Sergei Shulepov 2a25eacb22 sudo_queue_downward_message (#1941)
* Add a sudo wrapper for Dmp::queue_downward_message

* Apply suggestions from code review

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

* Stylistic changes

* Remove trailing whitespaces

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
2020-11-16 16:36:38 +01:00
Sergei Shulepov c69e5766db Breakdown the Router module on Dmp, Ump, Hrmp modules (#1939)
* Guide: Split router module in guide.

Now we have: DMP, UMP and Router module.

* Add a glossary entry for what used to be called Router

* Extract DMP

* Extract UMP

* Extract HRMP

* Switch over to new modules

* Router: goodbye sweet prince

* Link to messaging overview for details.

* Update missed rococo and test runtimes.

* Commit destroyed by rebase changes

* Don't deprecate Router but rather make it a meta-project

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

* Fix typos suggestion

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

* Fix repetition in the impl guide

* Clarify that processed_downward_messages has the u32 type

* Remove the router subdir.

* Deabbreviate DMP,UMP,HRMP

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2020-11-16 14:02:01 +00:00
Sergei Shulepov c96f8cfcca Implement HRMP (#1900)
* HRMP: Update the impl guide

* HRMP: Incorporate the channel notifications into the guide

* HRMP: Renaming in the impl guide

* HRMP: Constrain the maximum number of HRMP messages per candidate

This commit addresses the HRMP part of https://github.com/paritytech/polkadot/issues/1869

* XCM: Introduce HRMP related message types

* HRMP: Data structures and plumbing

* HRMP: Configuration

* HRMP: Data layout

* HRMP: Acceptance & Enactment

* HRMP: Test base logic

* Update adder collator

* HRMP: Runtime API for accessing inbound messages

Also, removing some redundant fully-qualified names.

* HRMP: Add diagnostic logging in acceptance criteria

* HRMP: Additional tests

* Self-review fixes

* save test refactorings for the next time

* Missed a return statement.

* a formatting blip

* Add missing logic for appending HRMP digests

* Remove the channel contents vectors which became empty

* Tighten HRMP channel digests invariants.

* Apply suggestions from code review

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

* Remove a note about sorting for channel id

* Add missing rustdocs to the configuration

* Clarify and update the invariant for HrmpChannelDigests

* Make the onboarding invariant less sloppy

Namely, introduce `Paras::is_valid_para` (in fact, it already is present
in the implementation) and hook up the invariant to that.

Note that this says "within a session" because I don't want to make it
super strict on the session boundary. The logic on the session boundary
should be extremely careful.

* Make `CandidateCheckContext` use T::BlockNumber for hrmp_watermark

Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
2020-11-06 15:35:36 +00:00
Sergei Shulepov a3e58350bb Upward Message Passing implementation (#1885)
* UMP: Update the impl guide

* UMP: Incorporate XCM related changes into the guide

* UMP: Data structures and configuration

* UMP: Initial plumbing

* UMP: Data layout

* UMP: Acceptance criteria & enactment

* UMP: Fix dispatcher bug and add the test for it

* UMP: Constrain the maximum size of an UMP message

This commit addresses the UMP part of https://github.com/paritytech/polkadot/issues/1869

* Fix failing test due to misconfiguration

* Make the type of RelayDispatchQueueSize be more apparent in the guide

* Revert renaming `max_upward_queue_capacity` to `max_upward_queue_count`

* convert spaces to tabs

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

* Update runtime/parachains/src/router/ump.rs

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

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2020-11-02 14:20:22 +00:00
Qinxuan Chen 39db0688de Companion for substrate #7159 (#1747)
* Companion for paritytech/substrate#7159

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* update WithdrawReason in xcm

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* "Update Substrate"

Co-authored-by: parity-processbot <>
2020-10-29 12:35:58 +00:00
Shawn Tabrizi 70ef6a6e12 Update Tips to go 100% to Author (#1836)
* 100% of tip goes to Author

* refactor dealwithfees into common

* add fee and tip test

* fix
2020-10-29 10:12:39 +00:00
Kian Paimani 65106d7792 Reconfigure on_initialize weight. (#1838)
* Reconfigure transaction payment and on_initialize weight.

* Some tests to investigate with

* fix build

* Update runtime/common/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* undo change to multiplier.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-27 21:05:04 +00:00
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 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
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
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
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
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
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
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
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
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
Pierre Krieger 994e5dc29b Update Substrate and bump version to 0.8.24 (#1720) 2020-09-16 11:56:28 +00: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
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
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
Robert Habermeier 57aef8eef5 Remove v0 parachains runtime (#1501)
* remove v0 parachains modules and switch to v1 primitives

* get tests compiling for runtime-common

* remove registrar module

* Add a dummy module

* remove runtime-parachains

* mostly remove old parachains code from polkadot-runtime

* remove slots::Trait implementation

* remove sp_std prelude import

* add a ZeroSizedTypeDifferentiator to dummy

* finish porting over polkadot runtime

* ZeroSizedTypeDifferentiator was actually unnecessary

* westend

* kusama

* test-runtime (no dummy modules)

* fix warning

* fix chain-specs

* fix test-service

* test-client

* remove dead import

* remove unused needed_extrinsics parameter

* runtimes compile

* remove rococo-v0

* remove remaining references to Rococo

* bump versions
2020-08-13 15:55:27 +02:00
Shawn Tabrizi 73f09e5154 Unalias Substrate Imports (#1530)
* cargo.toml updates

* session and system

* more

* more

* more

* more

* more

* fix

* compiles

* fix tests

* fix more tests

* fix mock

* fix deleted space

* Update validation/Cargo.toml

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

* Update Cargo.lock

* update rococo

* remove unused warning

* update add benchmarks

* rename weight file

* forgot a file

* Update chain_spec.rs

* Revert "remove unused warning"

This reverts commit 4227cd0d1525286fb466dccb817564c9b37f8645.

* fix merge

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-08-04 13:23:33 +00:00
Fedor Sakharov a9e3a1b11d Sudo wrapper for paras (#1517)
* Sudo wrapper for paras

* Move to separate module

* Add some docs
2020-08-03 21:32:57 +02:00
Gavin Wood 756f95c407 Update Substrate, bump versions, clean up sort (#1496)
* Sort cleanups

* Bump versions
2020-07-29 14:31:31 +02:00
Bastian Köcher 8f3317d056 Update scale codec to latest version to fix bug in future rustc version (#1491)
* Update scale codec to latest version to fix bug in future rustc version

Companion of: https://github.com/paritytech/substrate/pull/6746

* 'Update substrate'

Co-authored-by: parity-processbot <>
2020-07-28 20:43:38 +00:00
Robert Habermeier 09f602f8de Include a reference to the validation data in the candidate descriptor (#1442)
* rename GlobalValidationSchedule to GlobalValidationData

* guide: update candidate descriptor to contain validation data hash

* guide: add note in inclusion module about checking validation data hash

* primitives: update CandidateDescriptor to contain new hash

* fix payload computation

* add helpers for computing validation data to runtime modules

* guide: note routines

* inclusion: check validation data hash and fix local_validation_data bug

* add a case to candidate_checks and improve that test substantially

* bump versions

* address review comments

* add a test for including code upgrade

* bump kusama version

* bump westend & polkadot versions
2020-07-23 15:02:24 -04:00
Gavin Wood 1ff810ee10 Bump Substrate, version (#1456)
* Bump Substrate

* Bump
2020-07-22 19:43:27 +02:00
Xiliang Chen 143f5600f4 update impl_outer_origin (#1444) 2020-07-21 20:02:41 +02:00
Gavin Wood 3f57b1c6e8 Enable transfers (#1443)
* Enable transfers

Also quash any conviction from Referendum Zero; Sudo was always
going to have been removed so lock-voting doesn't make sense in
this case.

* Add test for migration; remove superfluous comment.

* Fixes

* Bump

* Weekly elections
2020-07-21 12:19:23 +02:00
Gavin Wood 760d49c551 Remove Sudo (#1437)
* Remove Sudo

NOTE: To ensure minimal index changes to pre-existing pallet deployments,
this is done with a "swap_remove" style; the previous last pallet
(Purchase), which is hitherto unused, has been shifted into the old index
of Sudo.

* Remove CC1 designation.

* Fixes

* Bump

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes
2020-07-20 17:47:09 +02:00
Gavin Wood c5bf161738 Bump version, enable full governance (#1433) 2020-07-20 12:18:27 +02:00
Shawn Tabrizi 3fa224bfa4 Pallet for Purchase (#1369)
* initial mock

* remove statement

* Merge branch 'master' into shawntabrizi-crowdsale

* only work for dead accounts

* Revert "Merge branch 'master' into shawntabrizi-crowdsale"

This reverts commit 5d26bc22f30fdbc58854dc64398bddc1f19c4d24.

* update storage name

* Re-mock

* Update comment

* payouts

* test signature verification

* Update wording

* fix tests

* support both free and locked balance

* Single statement set in configuration trait

* Configurable purchase limit, initiated status

* Account creation tests

* make note about `max_amount` check

* Update validity status tests

* update balance tests

* payment test

* finish tests

* enable in runtime

* Test and verify ed25519

* make purchase pallet more configurable on the fly

* Remove runtime check on purchase amount.

* clean up trait

* add basic weights

* add extra super saftey check for vesting

* Add vat tracking

* remove unused const

* Update to W3F Origins

* remove stale comment

* Support existing accounts w/o existing vesting schedule

* Update runtime/common/src/purchase.rs

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

* Add support for partially unlocked portion of purchased DOTs

* add trait import

* Expose constants from pallet

* Fixes

* Fixes

* Update runtime/polkadot/src/lib.rs

Co-authored-by: Gavin Wood <gavin@parity.io>
2020-07-17 14:23:56 +02:00
Gavin Wood 63a655afb0 Define BurnDestination, Kusama Treasury burns to Society (#6671) (#1421)
* Define BurnDestination, Kusama Treasury burns to Society.

* Fixes

* Remove the council elections enabling.

* Bump

* whitespace
2020-07-17 12:36:36 +02:00