* 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
* 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
* 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>
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
* 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
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.
* 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
* 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>
* 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>
* 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>
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.
* 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
* 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