Commit Graph

1293 Commits

Author SHA1 Message Date
Bastian Köcher b50848ea53 Remove frame-executive that isn't required anymore (#355) 2021-03-04 16:33:26 +01:00
Bastian Köcher 937cd767ae Update Polkadot & Substrate (#354) 2021-03-04 14:20:28 +01:00
Cecile Tonglet 5cdbd7c42d Add a command to purge the relay chain only (#306)
* Add a command to purge the relay chain only

* WIP

* Update rococo-parachains/src/cli.rs

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

* Move cli stuff to its own crate

* Copyright dates

* Test not working for some reason...

* WIP

* Revert "WIP"

This reverts commit f97cd63742c7df822e4a6e52a29db5e0f56b7bfa.

* Fix test to use provided relay chain

* Apply suggestions from code review

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

* Add hint about which database could not be purged

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-03-03 13:40:22 +01:00
Andrew Jones 16bc09f710 Update to latest Substrate and Polkadot (#348)
* Update to latest Substrate and Polkadot

* log::debug!

* Add log dependecies to runtime

* Comma

* Fix tests
2021-03-03 13:20:17 +01:00
Bastian Köcher f511757069 Change the way we store, handle and validate the validation data (#342)
Currently validation data is shared by using a well known key between
the parachain system pallet and the validate block implementation. This
pr changes this by passing the parachain system directly to the validate
block implementation to make use of it. Besides that, we also store the
validation params in some thread local variable to make it inspectable
by parachain system. This moves the validation of validation data and
validation params to the parachain system pallet directly, instead of
having this hidden inside the validate block implementation.

Fixes: https://github.com/paritytech/cumulus/issues/217
2021-02-27 18:46:25 +01:00
Shaun Wang 9535ee26ab XCM handler: make send origin configurable. (#346) 2021-02-26 20:12:57 +01:00
Bastian Köcher 6b38755ec4 Same procedure as every day (#345) 2021-02-25 17:14:32 +01:00
Bastian Köcher fc8c690cf8 Update to latest Substrate & Polkadot (#341) 2021-02-24 20:15:52 +01:00
Shaun Wang d8126cdc13 Deposit XCM execution success and fail events. (#338) 2021-02-23 09:27:47 +01:00
Joshy Orndorff da79d42b6d Minor fixes and clarifications (#333) 2021-02-18 18:55:43 +01:00
Bastian Köcher 28d1d00747 Update Substrate & Polkadot again (#332) 2021-02-18 15:40:53 +01:00
Bastian Köcher f04ce0655b Update Substrate & Polkadot (#330) 2021-02-16 17:42:08 +01:00
Bastian Köcher 4820fa16b1 Parachain Consensus abstractions (#329)
* Move consensus to consensus-common crate

* Move the parachain consensus out of the collator

* Add first relay chain consensus stuff

* Remove some warnings

* Fix more stuff

* Fix collator test

* Change `ParachainConsensus` to take a mutable self

* Make everything compile

* Feedback
2021-02-16 12:45:30 +01:00
Bastian Köcher ec08d11d39 New genesis (#327)
* Update Substrate & Polkadot

* Update chainspecs

* Update again to fix test
2021-02-15 11:20:36 +01:00
Bastian Köcher 886a1e1c76 Move parachain inherent data into its own crate (#326)
This renames and moves the `SystemInherentData` into its own crate.
The struct is now called `ParachainInherentData`. Besides moving the
struct, this also moves the code for creating this struct into this crate.
2021-02-11 13:05:17 +01:00
Bastian Köcher fbacfe7937 The great refactor (#325)
* Move pallets to pallets folder and rename them

* Move genesis file to service

* Rename primitives to primitives-core

* Delete cumulus-runtime

* Move stuff to client folder and rename
2021-02-10 13:07:21 +01:00
Sergei Shulepov e065c5776b Migrate from MQCs in persisted validation data to merkle proofs (#317)
* 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>

* Fix compilation error in test-service

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-02-08 19:48:30 +01:00
Shawn Tabrizi b32ce07176 Fix HRMP Sibling Location (#318)
* Fix HRMP Location

* Add call to xcm handler
2021-02-08 14:09:50 +01:00
Sergei Shulepov 309bc92b78 MQC authorization (#308)
* MQC auth

Update polkadot

WIP

* Update polkadot

* Silly syntax errors

* Fix typo

* Leave some comments and docs

* Apply suggestions from code review

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

* Introduce the MessageQueueChain structure

* Move the HRMP channel relevance check below

* Fix the `receive_hrmp_after_pause` test

* ValidationData is passed by reference

* Replace "to cumulus" with "to the collator"

* Update the test so that they are same as in polkadot

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-02-02 18:12:20 +00:00
Bastian Köcher c3e3f44338 Block announce validation should use the correct Validation result (#315)
* Block announce validation should use the correct `Validation` result

The error variant is just for internal errors and we need to return
`Failure` always when the other node send us an invalid statement.

* Update network/src/lib.rs

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

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2021-01-30 00:49:14 +01:00
Cecile Tonglet 6438d328b8 Complete telemetry for parachain & relaychain (#301)
* Complete telemetry for parachain & relaychain

* Update Substrate & Polkadot
2021-01-29 16:02:31 +01:00
Bastian Köcher cb00749f24 Print an error when we can not find the genesis block (#313)
This changes the collator to print an error if the block that we can not
find is the genesis block, instead of only logging this as a `debug`
message. This should help people when they have registered the wrong
genesis state on the relay chain.
2021-01-29 13:09:06 +01:00
Bastian Köcher 0d086ae354 Update the chainspecs (#311) 2021-01-26 23:51:36 +01:00
Bastian Köcher 57b5ec4053 Switch to custom BlockAnnounceData (#310)
* Switch to custom `BlockAnnounceData`

Instead of sending a `SignedFullStatement` this switches to a new struct
`BlockAnnounceData` that is being send alongside the block announcement.
The signed full statement contains the candidate commitments, meaning it
could be a full runtime upgrade that we send alongside a block
announcement... To prevent this, we now only send the candidate receipt
and the compact statement.

* Update to latest polkadot
2021-01-26 03:32:03 +01:00
Sergei Shulepov b5f6580da1 parachain-system (#296)
* rename parachain-{upgrade -> system}

* Merge message-broker into parachain-system

* Remove message-broker and clean up

* Update docs

* Test upward messages sending

And also update the relay-sproof-builder so that it allows to set the
relay dispatch queue size for the given parachain.

* Test horizontal message sending

* Remove old inherent definitions
2021-01-21 15:53:00 +01:00
Cecile Tonglet 8c6febdd3b Update Polkadot & Substrate (#300) 2021-01-20 17:35:05 +01:00
Sergei Shulepov d6a7bc4e30 Replace ValidationData with PersistedValidationData (#291)
* Replace ValidationData with PersistedValidationData

* Update polkadot
2021-01-19 15:20:12 +01:00
cheme 8ebcf10e31 Ignore offchain indexing in validation function. (#297)
* Missing set_offchain_storage overload.

* right name

* Ignore offchain indexing in validation function.
2021-01-19 11:12:11 +01:00
Bastian Köcher a9a03e106d Add trace logging for the POV size (#294)
* Add trace logging for the POV size

* :(
2021-01-18 13:48:36 +01:00
BenWhiteJam 5a117c30a7 update local setup to rococo-v1 (#293) 2021-01-15 21:50:43 +01:00
Sergei Shulepov 9b6448c657 Remove polkadot-validation dependency (#290) 2021-01-14 20:59:02 +01:00
Bastian Köcher b0652ec26a Update to latest (#289) 2021-01-14 17:50:56 +01:00
Black3HDF 8b815c759b eliminate space (#288) 2021-01-14 17:06:57 +01:00
Sergei Shulepov 464e54affd Inform the PVF with the latest relevant relay chain state (#279)
* Update polkadot

* Extend cumulus primitives with some relay chain exports

Follow https://github.com/paritytech/polkadot/pull/2194 to see the
polkadot PR

* collator: collect the state proof

This commit changes cumulus-collator so that it takes the relay chain
state at the relay parent and creates a storage proof that contains all
the required data for PVF.

* parachain-upgrade: use the proofs instead

This change is needed to make cumulus logic to not longer depend on the
transient validation data. As part of this change, in order to preserve
the current behavior `code_upgrade_allowed` now is computed on the
parachain side, rather than provided by polkadot.

Turned out that this requires to know the self parachain id so it was
added where needed.

* message-broker: use relay state to track limits

this should make sending messages safe from accidentally running over
the relay chain limits that were previously unknown.

* Update polkadot

So that `relay_storage_root` is available through `ValidationParams`

* Check `relay_storage_root` matches expected

Check that `relay_storage_root` submitted by the collator matches the
one that we receive in `validate_block` through `ValidationParams`

* Add a missing check for `dmq_mqc_head` while we are at it

* Update polkadot

* Fix tests that use the relay storage root

* Apply suggestions from code review

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

* Update message-broker/src/lib.rs

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

* Remove unneeded (&_)

* Fix unwraps

* Polish basti's suggestion

* Fix merge

* Bring back the System::can_set_code check

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-01-13 14:40:26 +01:00
Bastian Köcher 322eda8f69 Update (#284)
* Update yeah

* Update spec_version
2021-01-12 13:18:24 +01:00
BenWhiteJam 95d3b001d5 add local setup to README (#283)
* adds local setup RelayChain, ParaChain and Registration

* cleanup

* removes metadata types adds parachain id placeholder

* spelling

* update parachain id information

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-01-11 21:48:07 +01:00
Bastian Köcher 5dfd0756ef Update... (#282) 2021-01-08 13:16:21 +01:00
Bastian Köcher 9f0085c097 Wait for block import in parachain consensus (#271)
* Wait for block import in parachain consensus

There was a bug in the parachain consensus that when importing a relay
chain block that sets a new best parachain block, but the required
parachain block was not yet imported. This pr fixes this by waiting for
the block to be imported.

* Finish docs
2021-01-05 22:14:27 +00:00
Joshy Orndorff 518c6fac33 remove borrowed box (#272) 2021-01-05 22:34:57 +01:00
Bastian Köcher a98bd78c0e Update to latest Substrate & Polkadot (#280)
* Update to latest Substrate & Polkadot

* Update the chain specs

* Update polkadot properly...

* Update chainspecs again...

* Again...
2021-01-05 22:33:31 +01:00
lumir-mrkva 44dbe6aa9e upgrade to latest polkadot (#278)
* upgrade to latest polkadot

* ss58 in tests

* format

* removed unused import
2021-01-04 00:22:17 +01:00
Bastian Köcher 09b27cec90 Rococo V1 (#268)
* Update

* Update the chain specs

* Update to latest master & master

* add current tick bootnodes

* Update again

* Add track bootnodes

* add trick and track bootnodes

* Update the chain specs

* Update

Co-authored-by: Erin Grasmick <erin@parity.io>
2020-12-22 10:00:58 +01:00
Sergei Shulepov 0a5b53cdce Plumb polkadot backend into cumulus-collator (#269)
* The problem in the nutshell

* Make it compile

* make tests pass

* Update the parachain-upgrade module

* Fix collator tests

Co-authored-by: Bastian Köcher <git@kchr.de>
2020-12-21 20:27:54 +01:00
Bastian Köcher c5d184f748 Update to latest master 2020-12-18 12:45:06 +01:00
Shawn Tabrizi 4f1c6baf8e Add XCM Handler (#267)
* initial mock

* integrate xcm-handler into runtime

* expose xcm send error

* oops

* better comment
2020-12-17 18:42:00 +01:00
Alexander Krupenkin a060991bbe Update to latest polkadot & substrate (#266) 2020-12-16 10:50:05 +01:00
Sergei Shulepov aba8f46ec9 Integrate HRMP (#258)
* HRMP message ingestion

* Plumb hrmp_watermark to build_collation

* Plumb hrmp_watermark to ValidationResult

* Plumb hrmp outbound messages

* Implement message-broker part of HRMP

* Kill UPWARD_MESSAGES as well

Otherwise, they will get resent each block

* Add sudo versions for easier testing

* Remove the xcmp module

Not useful for the moment

* Doc for HRMP message handler

* Estimate the weight upper bound for on_finalize

* Remove a redundant type annotation

* fix spelling of a method

* Apply suggestions from code review

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

* Deabbreviate dmp and hrmp in the message ingestion type

* Don't use binary_search since it's broken by a following rotate

Instead use the linear search. We can afford linear search here since
due to limited scalability of HRMP we can only have at most a couple of
dozens of channels.

* Fix the watermark

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-12-15 04:42:31 +00:00
Alexander Krupenkin ea10fa8230 Upgdate to latest polkadot & substrate (#263)
* Upgdate to latest polkadot & substrate

* Fix code formatting (cargo fmt)

* Fix unit tests
2020-12-10 14:28:02 +01:00
Bastian Köcher f327cd96dc Update to latest master & master (#260) 2020-12-04 23:49:12 +01:00
Sergei Shulepov 352aecd7a1 Plumb polkadot client into the collator struct (#255)
* plumb polkadot_client into Collator

* plumb para_id into Collator

* promote retrieve_dmq_contents to a method

* remove the retrieve_dmq_contents closure
2020-12-03 23:02:19 +01:00