Commit Graph

262 Commits

Author SHA1 Message Date
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
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