Commit Graph

233 Commits

Author SHA1 Message Date
Bastian Köcher 7fe3b32aa9 Update Substrate & Polkadot again (#332) 2021-02-18 15:40:53 +01:00
Bastian Köcher 8dac4f75ad Update Substrate & Polkadot (#330) 2021-02-16 17:42:08 +01:00
Bastian Köcher d3f9c7db38 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 5f5df0485a New genesis (#327)
* Update Substrate & Polkadot

* Update chainspecs

* Update again to fix test
2021-02-15 11:20:36 +01:00
Bastian Köcher ba0bdc84a5 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 119e0859b9 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 a4998998a9 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 9c125817f0 Fix HRMP Sibling Location (#318)
* Fix HRMP Location

* Add call to xcm handler
2021-02-08 14:09:50 +01:00
Sergei Shulepov 274b3f618b 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 75c5c3d4ef 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 52fcabdbb0 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 bf33585b01 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 c6ba3b5654 Update the chainspecs (#311) 2021-01-26 23:51:36 +01:00
Bastian Köcher 2f40e59e22 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 615ac5fefe 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 b31a6b38a9 Update Polkadot & Substrate (#300) 2021-01-20 17:35:05 +01:00
Sergei Shulepov 3fd6ec6bf1 Replace ValidationData with PersistedValidationData (#291)
* Replace ValidationData with PersistedValidationData

* Update polkadot
2021-01-19 15:20:12 +01:00
cheme ae9b659969 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 e78aaec3ed Add trace logging for the POV size (#294)
* Add trace logging for the POV size

* :(
2021-01-18 13:48:36 +01:00
BenWhiteJam 010f106e24 update local setup to rococo-v1 (#293) 2021-01-15 21:50:43 +01:00
Sergei Shulepov f8bde26e63 Remove polkadot-validation dependency (#290) 2021-01-14 20:59:02 +01:00
Bastian Köcher 2218df9b74 Update to latest (#289) 2021-01-14 17:50:56 +01:00
Black3HDF 87a82c4730 eliminate space (#288) 2021-01-14 17:06:57 +01:00
Sergei Shulepov b424d0f5e1 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 af07b819d1 Update (#284)
* Update yeah

* Update spec_version
2021-01-12 13:18:24 +01:00
BenWhiteJam a6c1b4a5da 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 fa7c33ea9d Update... (#282) 2021-01-08 13:16:21 +01:00
Bastian Köcher 9dc7cc5735 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 ed8fc4f4a3 remove borrowed box (#272) 2021-01-05 22:34:57 +01:00
Bastian Köcher d51f1d8563 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 30021251fc 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 cd0e40a6eb 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 f0315a16d3 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 bfad1abe8b Update to latest master 2020-12-18 12:45:06 +01:00
Shawn Tabrizi afc50e8ade 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 8226063135 Update to latest polkadot & substrate (#266) 2020-12-16 10:50:05 +01:00
Sergei Shulepov c84c9b6bb0 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 1c5add6a39 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 092f0e9149 Update to latest master & master (#260) 2020-12-04 23:49:12 +01:00
Sergei Shulepov 233b347a58 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
Bastian Köcher 5a97db73fb Update (#253) 2020-12-02 17:16:23 +01:00
Robert Habermeier 996219d6ec Update parachain registration script to new extrinsic (#252)
* Update parachain registration script to new extrinsic

* Update parachain registration script
2020-12-02 08:53:45 +01:00
Sergei Shulepov f27b7acb8f Update polkadot to the latest master (#251)
* update cumulus to latest polkadot

* s/Trait/Config

To be more consistent with the new naming.

* Update Cargo.lock

* fix network tests
2020-12-01 19:21:40 +01:00
Bastian Köcher c0d80a7c95 Fix syncing issues (#249) 2020-11-26 22:14:12 +01:00
Sergei Shulepov 6e60648f49 Update Polkadot to the latest master (#248)
* Update polkadot to 982c9e

* Fix tests in collator-network
2020-11-26 16:39:19 +01:00
Bastian Köcher e6f37cb7cf Update everything to latest master (#247) 2020-11-25 15:45:49 +01:00
Bastian Köcher 35c2609b8b Update to latest master (#246) 2020-11-23 19:09:25 +01:00
Bastian Köcher e5b4e8cae7 Wait for relay chain block import before validatiing a block announcement (#227)
* Start with something

* Whatever

* Update

* MOARE

* Make cumulus-network compile and tests work

* Update more and fixes

* More stuff

* More fixes

* Make collator build

* Make test almost work

* Remove contracts runtime

* More test work

* Make service compile

* Fix test-service

* Fix test client

* More fixes

* Fix collator test

* Fix network tests (again)

* Make everything compile, finally

* Fix tests

* Write test that should fail

* Add `WaitOnRelayChainBlock`

* Update git versions

* Make it all work

* Update logging

* Switch to provided method for pushing an extrinsic

* Try to debug CI

* Aaaa

* Only use Debug

* Updates

* Use native execution to hopefully make CI happy...
2020-11-23 00:21:02 +01:00
Bastian Köcher b11ec7ea9f Bring back log prefixing (#245) 2020-11-23 00:08:52 +01:00
Sergei Shulepov 2d7f37ed1d Integrate UMP into message-broker (#244) 2020-11-20 21:32:58 +01:00