Commit Graph

15 Commits

Author SHA1 Message Date
Shawn Tabrizi ff5d56fb76 cargo +nightly fmt (#3540)
* cargo +nightly fmt

* add cargo-fmt check to ci

* update ci

* fmt

* fmt

* skip macro

* ignore bridges
2021-08-02 10:47:33 +00:00
Shaun Wang 22f076c6d3 Update para sudo wrapper pallet to FRAME v2 (#3074)
* Migrate para sudo wrapper pallet to pallet attribute macro.

* Apply review suggestions.
2021-06-01 20:34:47 +00:00
Gavin Wood adc238ad86 XCM revamp (#2836)
* Remove unused relaying XCM

* Aggregate HRMP (XCMP/HMP) messages. Payloads for spambot.

* Revert lock

* Fix

* Broken example

* Introduce fee payment mechanics into XCM.

* Weight limitations on XCM execution

* Mock environment for tests and the first test

* Tests for XCM and a few refactors.

* Remove code that's not ready

* Fix for an XCM and an additional test

* Query response system

* XCMP message dispatch system reimagining

- Moved most of the logic into xcm-handler pallet
- Altered the outgoing XCMP API from push to pull
- Changed underlying outgoing queue data structures to avoid multi-page read/writes
- Introduced queuing for incoming messages
- Introduced signal messages as a flow-control sub-stream
- Introduced flow-control with basic threshold back-pressure
- Introduced overall weight limitation on messages executed
- Additonal alterations to XCM APIs for the new system

* Some build fixes

* Remove the Encode bounds sprayed around

* More faff

* Fix bounds amek use latest scale codec.

* remove println

* fixes

* Fix XcmExecutor Tests

* Fix XCM bounds using derivative crate

* Refactor names of XcmGeneric &c into Xcm

* Repot the xcm-executor into xcm-builder

* Docs

* Docs

* Fixes

* Update xcm/src/lib.rs

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

* Fixes

* Docs

* Update runtime/parachains/src/ump.rs

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

* Docs

* Fixes

* Fixes

* Fixes

* Docs

* Fixes

* Fixes

* Introduce transfer_asset specialisation.

* Fixes

* Fixes

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-04-07 22:38:29 +02:00
Robert Habermeier 251b6ca7bf remove WASM_MAGIC (#2832)
* remove WASM_MAGIC

* fix test warnings
2021-04-07 12:00:22 +03:00
Shawn Tabrizi 67e95d1b8e Parachain Onboarding Extras (#2713)
* clear_lease

* schedule upgrade and downgrade

* fix compile

* comments
2021-03-26 22:41:07 +01:00
Shawn Tabrizi a5defa7c7f Session Delayed Para Changes / Actions Queue (#2406)
* initial implementation of lifecycles and upgrades

* clean up a bit

* fix doc comment

* more rigid lifecycle checks

* include paras which are transitioning, and lifecycle query

* format guide

* update api

* update guide

* explicit outgoing state, fix genesis

* handle outgoing with transitioning paras

* do not include transitioning paras in identifier

* Update roadmap/implementers-guide/src/runtime/paras.md

* Update roadmap/implementers-guide/src/runtime/paras.md

* Update roadmap/implementers-guide/src/runtime/paras.md

* Apply suggestions from code review

* Use matches macro

* Correct terms

* Apply suggestions from code review

* actions queue

* Revert "actions queue"

This reverts commit b2e9011ec8937d6c73e99292416c9692aeb30f73.

* collapse onboarding state

* starting actions queue

* consolidate actions queue

* schedule para initialize result

* more actions queue for upgrade/downgrade

* clean up with fully implemented actions queue

* fix tests

* fix scheduler tests

* fix hrmp tests

* fix test

* doc fixes

* fix hrmp test w/ valid para

* Update paras.md

* fix paras registrar

* Update propose_parachain.rs

* fix merge

* Introduce "shared" module

* fix rococo build

* fix up and use shared

* guide updates

* add shared config to common tests

* add shared to test-runtime

* remove println

* fix note

Co-authored-by: Gavin Wood <gavin@parity.io>
2021-02-18 21:20:18 -06:00
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
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
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
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
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 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 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