Commit Graph

1293 Commits

Author SHA1 Message Date
Bastian Köcher 16b7b72271 Check that we have set the validation data inherent (#451) 2021-05-28 23:35:26 +02:00
Bastian Köcher 7ffb205b0d Pov recovery for parachains (#445)
* Start with a failing integration test & some refactorings

* More work

* Make it "work"

* Add `NullConsensus` for the test

* More refactorings

* Move stuff over to its own crate

* Refactorings

* Integrate it into `service` and make the test working

* Docs and some exit condition

* Use the real import queue

* Fix tests

* Update client/pov-recovery/src/active_candidate_recovery.rs

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

* Fetch slot duration from the relay chain

* Docs

* Fixes

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2021-05-26 15:02:42 +02:00
Shawn Tabrizi 36c6da180a rococo-collator -> polkadot-collator (#449) 2021-05-24 11:14:12 +02:00
Bastian Köcher 6565a95343 Some changes for Statemint (#448)
* Make Aura and relay chain verifier buildable

* AHHH

* Ahhh2

* Ahhh3

* Move `ParachainBlockImport`

* Updates because of Substrate

* Revert "AHHH"

This reverts commit 3f7c84327e1036ed71a8e2bd30f6416d32bae5a2.

* Fix warning
2021-05-23 13:29:43 +02:00
Sergei Shulepov 70afaae2cf Slap runtime_version macro everywhere (#444)
* Slap runtime_version macro everywhere

* Update Substrate

This includes the fix of compilation for macOS platforms.
2021-05-19 12:34:02 +02:00
Bastian Köcher 6674430f6e Introduce CollectCollationInfo runtime api (#443)
* Introduce `CollectCollationInfo` runtime api

Instead of using well known keys to communicate information about a
collation between the runtime and the collator, we now use a runtime api
for this.

* Fixes bug

* Apply suggestions from code review

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

* Doc update

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2021-05-17 16:33:33 +02:00
Bastian Köcher 5245525bb2 Fix chain spec handling (#438)
Before when loading a chain spec from a file it was always using the
rococo parachains runtime genesis config. This leaded to problems when
trying to convert a shell chain spec json file to a raw chain spec.
2021-05-13 23:35:15 +02:00
Gavin Wood c515f165e9 Companion for #3010 (Reserve Xfer extrinsic) (#434)
* Companion for #3010 (Reserve Xfer extrinsic)

* cargo update -p xcm

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-13 08:07:39 +02:00
Gavin Wood 84bd37817a Companion for #3007 (Track teleported assets) (#436)
* Companion for #3007: Track teleported assets

* Bump

* Try fix the breakage

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2021-05-12 22:51:28 +02:00
Bastian Köcher eb23023c45 Rename rococo-collator to polkadot-collator (#435)
* Rename `rococo-collator` to `polkadot-collator`

Also contains some other small changes.

* Test fixes and some further search&replace
2021-05-12 17:53:22 +02:00
Gavin Wood 63231bc3eb Companion #2995: Dispatchable for teleporting assets (#431)
* Companion #2995: Dispatchable for teleporting assets

* Fixes

* Fixes

* Fixes

* Fixes

* Bump Substrate

* Bump Polkadot

* Fixes
2021-05-11 15:41:52 +02:00
Bastian Köcher d01bc247cb Aura consensus for parachains (#371)
* Update polkadot

* Migrate all uses of MQC heads to merkle proofs

* Mass rename `relay_parent_storage_root`

* Restore parachain-system tests

* Update polkadot and libp2p swarm for testing

* Collapse match into an if let

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

* Start with something

* Update Substrate & Polkadot

* Start to make it compile

* Make it compile

* Begin with something

* Yep

* I'm a hacker

* Bring back the builder

* Make it work in some way

* Compile

* Parachains use their own "slot"

* Adds cumulus-pallet-aura

* Wrap AuRa import queue to disable equivocation checking by default

* Pass slot duration

* Check the seal when validating a block

* Adds missing file

* Try to make the seal working

* Fix it

* Some fixes

* Bring in the latest features to cleanup the code

* Update and make it compile

* Improve the import

* Start fixing

* More work

* Fix fix fix

* Make everything compile

* Small cleanups

* Rename and more docs

* Docs

* Fixes fixes fixes

* Update rococo-parachains/src/chain_spec.rs

* Update client/consensus/aura/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update client/consensus/aura/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update primitives/parachain-inherent/Cargo.toml

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update primitives/parachain-inherent/Cargo.toml

* Update primitives/parachain-inherent/Cargo.toml

* Update primitives/parachain-inherent/Cargo.toml

Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2021-05-10 14:43:00 +02:00
Keith Yeung 78ad174b15 Upgrade pallets to FRAMEv2 (#404)
* Upgrade parachain info pallet to FRAMEv2

* Upgrade parachain system pallet to FRAMEv2

* Use Pallet<T> instead of Module<T>

* Upgrade XCMP queue pallet to FRAMEv2

* Correctly specify the metadata for events in xcmp-queue pallet

* Apply suggestions from code review

* Update pallets/parachain-system/src/tests.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-05-08 22:18:01 +02:00
Joshy Orndorff af28a85afc Make --collator reusable and imply --validator (#380)
* Reusable RunCmd struct

* wire new run command through service

* Fill in the rest of the methods

* attempt normalization

* Settle on the borrowing approach

* add the normalize call

* bump substrate

* Update client/cli/src/lib.rs

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

* Update docs

* Update client/cli/src/lib.rs

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-05-06 14:38:25 +00:00
Bastian Köcher b9056fed59 Update Substrate & Polkadot (#428) 2021-05-04 22:32:06 +02:00
Bastian Köcher 6364eeeef1 Update Substrate & Polkadot (#427)
* Update Substrate & Polkadot

* Fixes
2021-05-04 09:48:41 +02:00
Gavin Wood 3f687171c2 DMP Queue pallet (#416)
* Introduce the converter into the hub

* Parachain recognises Rococo governance body as admin

* Whitespace

* Use UsingComponents for fee payment in XCM

* Fixes

* Fixes for XCM permissions

* Remove encode_call test

* Fixes

* Rococo Collator supports Shell runtime

* Fixes

* Fixes

* Initial draft of DMP Queue pallet

* DMP Queue builds.

* Companion for Polkadot gav-allow-xcm-exec

* Bump

* Fix std

* Fixes

* fix and improve docs

* fix compile errors in tests

* add test for try_service_message

* update cargo.lock

* Fixes

* Make test name read well

* Fixes

* Add a couple of simple tests

* Tests

* Tests

* Update pallets/dmp-queue/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update pallets/dmp-queue/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update pallets/dmp-queue/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update pallets/dmp-queue/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update pallets/dmp-queue/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update pallets/dmp-queue/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update pallets/dmp-queue/src/lib.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Chain ID and ParaID don't collide

* Fixes

* Update pallets/dmp-queue/src/lib.rs

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

* Update pallets/dmp-queue/src/lib.rs

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

* Fixes

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-02 16:11:58 +02:00
Gavin Wood 315c5d1c15 Chain ID and ParaID don't collide (#425) 2021-04-30 17:52:42 +02:00
Gavin Wood 42c18b8cb5 Fix condition (#424)
Closes #419
2021-04-30 15:17:21 +02:00
Gavin Wood 7d315cf9ab Strip down Shell to bare minimum (#421)
* Strip down shell

* Fixes

* Fixes

* Fixes

* Fixes
2021-04-29 18:21:48 +02:00
Gavin Wood 5edcffbcc8 Companion for #2953 (#418)
* Companion for #2953

* Fixes

* Fixes
2021-04-29 00:24:03 +02:00
Sergei Shulepov 3fa1ccc5ef Panic instead of ensure (#413)
Instead of `ensure` with dedicated errors use `panic` or `assert`. See
for details #410

Closes #410

Co-authored-by: Gavin Wood <gavin@parity.io>
2021-04-28 22:22:09 +02:00
Gavin Wood 4f56cc7fb5 Integrate Shell runtime into collator (#414)
* Introduce the converter into the hub

* Parachain recognises Rococo governance body as admin

* Whitespace

* Use UsingComponents for fee payment in XCM

* Fixes

* Fixes for XCM permissions

* Remove encode_call test

* Fixes

* Rococo Collator supports Shell runtime

* Fixes

* Fixes
2021-04-28 18:35:55 +02:00
Gavin Wood 0ab15b2e05 Integrate a governance XCM origin (#407)
* Introduce the converter into the hub

* Parachain recognises Rococo governance body as admin

* Whitespace

* Use UsingComponents for fee payment in XCM

* Fixes

* Fixes for XCM permissions

* Remove encode_call test

* Fixes

* Fixes

* Fixes
2021-04-28 14:41:18 +02:00
Guillaume Thiolliere 859524f2f1 Bump polkadot + fix parachain unnamed field (#412)
* parachain unnamed field

* bump polkadot: cargo udpate -p xcm

* Update lock

* Fixes

* Fixes

Co-authored-by: Gav Wood <gavin@parity.io>
2021-04-27 18:56:08 +02:00
Shawn Tabrizi 2180cf4820 Bump polkadot and substrate deps (#408) 2021-04-25 22:11:33 +02:00
Gavin Wood 689cb16660 Two-stage upgrade for parachains (#392)
* Authorised upgrade doesn't pay fee

* Origin not needed

* Fixes
2021-04-16 12:45:55 +02:00
Cecile Tonglet 8c37b0d450 Runtime upgrade test (#364) 2021-04-16 09:48:13 +02:00
Bastian Köcher 51577808eb Update Substrate & Polkadot (#405) 2021-04-14 22:13:37 +02:00
Gavin Wood 18c9e4e13a Docs (#401) 2021-04-14 10:54:35 +02:00
Gavin Wood 5fe32eb0d4 XCM revamp & Ping pallet (#391)
* Add spambot

* Fixes

* Add some extra functions to spambot, bump version

* Lock..

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

* Fix tests, bump Polkadot.

* Fix HMP tests

* Rename Hrmp -> Xcmp for handler/sender

* Use master branch

* Test Xcm message passing & rename away from HMP

* Docs

* Introduce fee payment mechanics into XCM.

* Rename spambot -> ping

* Lock

* 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

* Should process any remaining XCM messages when we're not doing anything else.

* Update API usage and preparation for the big build.

* Some build fixes

* Build fixes

* xcm-handler builds

* Fix warnings

* Docs

* Parachains system builds

* Parachain runtime building

* Fix build

* Introduce transfer_asset specialisation.

* Fixes

* Two-stage upgrade for parachains.

* Fixes

* Fixes

* Updates for message sending.

* Repotting/renaming. Add primitives/utility.

* Remove real-overseer and bump refs

* Configure & document Rococo XCM runtime.

* Add shell runtime, some companion changes for #8589

* Bumps & fixes

* Fix test

* Build fix

* Update pallets/xcmp-queue/src/lib.rs

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>

* Make tests compile

* Apply suggestions from code review

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

* remove unused

* remove unused event stuff

* Adds proper validation-worker to make integration tests work

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* import saturating

* remove panic test

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-04-14 09:36:59 +02:00
Joshy Orndorff a70ab40cdc Make set_validation_data public (#399) 2021-04-13 21:20:10 +02:00
Bastian Köcher 498595a5b7 Remove pov hash comparison when waiting on a block to announce (#396)
* Remove pov hash comparison when waiting on a block to announce

Internally we get notified on the channel for our candidate anyway.
Besides that polkadot will compress the pov which leads to a different
pov hash and thus, would lead to a failing check on the `pov_hash`.

* Fix

* Fix tests
2021-04-12 19:26:55 +02:00
Bastian Köcher 959f5852ed Approve block announcements of backed blocks (#394)
* Approve block announcements of backed blocks

If we receive a block announcement without a statement attached that
matches the latest backed block, it is valid and we need to approve the
block announcement to download the block.

* Fix tests

* Approve block announcement if it comes from the best known block

* Fetch backed block only when required
2021-04-12 13:54:07 +02:00
Bastian Köcher 605ab2b957 Fix export genesis command (#395) 2021-04-11 10:34:31 +02:00
Bastian Köcher 3b4ca53f6c Do not accept --parachain-id and --chain together (#393) 2021-04-07 23:41:40 +02:00
Keith Yeung cbd72e7ab8 Declare Error type in decl_module! (#390)
* Declare Error type in decl_module! for parachain-systems

* Declare Error type in decl_module! for xcm-handler
2021-04-07 11:38:41 +02:00
Bastian Köcher 1d4c02cc4e Update Substrate & Polkadot (#387)
* Update Substrate & Polkadot

* Enforce `ParachainSetCode`
2021-04-02 16:17:04 +02:00
Shawn Tabrizi dc666c7e82 Improve Storage and Add set_upgrade_block to Validation Function Upgrade (#383)
* set_upgrade_block

* Update lib.rs

* Use Two Storage Items for Validation Function Upgrade

* note issue #374

* fix docs nits

* Apply suggestions from code review

* Update pallets/parachain-system/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-03-31 11:42:48 +02:00
Sergei Shulepov 88075102d3 Hook up XcmHandler to the system module (#381) 2021-03-30 10:26:10 +02:00
Bastian Köcher a8bf0e1a7f Update Substrate & Polkadot (#375)
* Update Substrate & Polkadot

* Remove `can_set_code` for now
2021-03-23 15:54:40 +01:00
Sebastian Thiel 662e9dcbdb Change spelling of 'PoVBlocks' to be consistent with other polkadot docs (#373) 2021-03-19 13:14:22 +01:00
Cecile Tonglet a90308b7ce Fix incorrect prefix for "Prepared block for proposing at" (#305)
* Fix incorrect prefix for "Prepared block for proposing at"

* Update Substrate & Polkadot

* Fix quotes & codec

* WIP

* Fix logger rename

* Revert "WIP"

This reverts commit af2fe967bb5841a55024783dbccf6c75cba6ab1a.

* WIP

* CLEANUP

* Working state

* WIP

* WIP
2021-03-17 10:46:55 +01:00
Vincent Geddes 8f1ef9d6e1 Use correct HRMP path for parachain sibling (#366) 2021-03-16 13:23:22 -04:00
Bastian Köcher 00bc5cd2da Update to latest Substrate & Polkadot and also move cli crate (#365) 2021-03-12 14:39:58 +01:00
Bastian Köcher cb9d1019c4 Fix block propagation between non-collator nodes (#363)
* Create builder for test nodes

* Fix syncing issue

* Adds missing file
2021-03-11 22:29:19 +01:00
Cecile Tonglet a3d50f2dd7 Adapt code to new sc-telemetry (#362) 2021-03-11 13:45:02 +01:00
Shaun Wang cb5a244f3d Support xcm local execution in xcm-handler. (#357)
* Support xcm local execution in xcm handler.

* Add docs.
2021-03-09 22:57:44 +01:00
Bastian Köcher c7d2446ba5 Update Substrate & Polkadot (#359)
* Update Substrate & Polkadot

* Remove unused code
2021-03-09 15:11:43 +01:00
Shaun Wang 56f60a122e Update XcmError on sending failure. (#358) 2021-03-08 20:30:51 +01:00