Commit Graph

261 Commits

Author SHA1 Message Date
Bastian Köcher aeb275d3a7 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 b35deaed95 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 dfdee4cb52 Fix export genesis command (#395) 2021-04-11 10:34:31 +02:00
Bastian Köcher 50037a82e8 Do not accept --parachain-id and --chain together (#393) 2021-04-07 23:41:40 +02:00
Keith Yeung db7fdce9b1 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 c995f6c76e Update Substrate & Polkadot (#387)
* Update Substrate & Polkadot

* Enforce `ParachainSetCode`
2021-04-02 16:17:04 +02:00
Shawn Tabrizi ad5ece357e 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 042a9c969b Hook up XcmHandler to the system module (#381) 2021-03-30 10:26:10 +02:00
Bastian Köcher 4d680a5107 Update Substrate & Polkadot (#375)
* Update Substrate & Polkadot

* Remove `can_set_code` for now
2021-03-23 15:54:40 +01:00
Sebastian Thiel 4ad027079f Change spelling of 'PoVBlocks' to be consistent with other polkadot docs (#373) 2021-03-19 13:14:22 +01:00
Cecile Tonglet 9df91c783c 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 2731bd5858 Use correct HRMP path for parachain sibling (#366) 2021-03-16 13:23:22 -04:00
Bastian Köcher 8211ce13df Update to latest Substrate & Polkadot and also move cli crate (#365) 2021-03-12 14:39:58 +01:00
Bastian Köcher 64061a4117 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 321b4434ac Adapt code to new sc-telemetry (#362) 2021-03-11 13:45:02 +01:00
Shaun Wang 2b73fcf45d 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 20e5dfd37a Update Substrate & Polkadot (#359)
* Update Substrate & Polkadot

* Remove unused code
2021-03-09 15:11:43 +01:00
Shaun Wang 1eecfe1acb Update XcmError on sending failure. (#358) 2021-03-08 20:30:51 +01:00
Bastian Köcher 5fd6e1b4fd Remove frame-executive that isn't required anymore (#355) 2021-03-04 16:33:26 +01:00
Bastian Köcher 77344a96b1 Update Polkadot & Substrate (#354) 2021-03-04 14:20:28 +01:00
Cecile Tonglet e53a932fe4 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 fb649f19c2 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 d6bc185ed3 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 8ba3e66fd1 XCM handler: make send origin configurable. (#346) 2021-02-26 20:12:57 +01:00
Bastian Köcher 2c904359ca Same procedure as every day (#345) 2021-02-25 17:14:32 +01:00
Bastian Köcher a4b4264a5a Update to latest Substrate & Polkadot (#341) 2021-02-24 20:15:52 +01:00
Shaun Wang f82489dbee Deposit XCM execution success and fail events. (#338) 2021-02-23 09:27:47 +01:00
Joshy Orndorff 2c771e2cae Minor fixes and clarifications (#333) 2021-02-18 18:55:43 +01:00
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