* Remove contracts RPC
* update lockfile for {"polkadot", "substrate"}
* Remove unused imports
* Properly set a max proof size for cumulus test runtime
* Properly set a max proof size for common runtimes
* Properly set the max proof size for all runtimes
Co-authored-by: parity-processbot <>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* Align to changes in substrate: `sp_io::storage::get` now returns `Bytes`
* Update substrate and polkadot to the newest master
* update lockfile for {"substrate", "polkadot"}
Co-authored-by: parity-processbot <>
* Ensure relay chain block number strictly increases
This is a safeguard for when async backing is enabled on the relay chain and multiple parachain
blocks per relay chain block are legal. We will need to later change this to support then multiple
parachain blocks per relay chain block.
* Make the check configurable
* Fix compilation
* Update pallets/parachain-system/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update pallets/parachain-system/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Fix test
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* state-update4 branch
* new ref
* Update to latest.
* update deps
* switch to host state version
* update
* fmt
* up
* remove trie patch
* remove patch
* fmt
* update
* set state_versions in runtimes
* state version from storage
* state version from storage
* seedling compat
* restore lock
* update lockfile for substrate
* update lockfile for polkadot
Co-authored-by: parity-processbot <>
* Adds support for returning a custom header from `validate_block`
This adds support for returning a custom header from `validate_block`. Before this, we always
returned the header of the block that was validated (and still do it by default). However, after
this pr it is possible to set a custom header or better custom head data that will be returned
instead from `validate_block`. This can be for example when a chain wants to fork.
* FMT
* Adds support for checking the timestamp inherent while validating a block
This adds support for checking the timestamp inherent while validating a
block. This will use the relay chain slot number * relay chain slot
duration to calculate a timestamp. This timestamp is used to check the
timestamp in the timestamp inherent.
* Update polkadot-parachains/rococo-runtime/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Update polkadot-parachains/statemine-runtime/src/lib.rs
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
* Update primitives/timestamp/src/lib.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Fix warnings
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This is basically a hack that prevents the inclusion of `:code` in the
storage proof. A proper fix requires some changes to the trie crate to
not include nodes that aren't read.
* Introduce `CollectCollationInfo` runtime api
Instead of using well known keys to communicate information about a
collation between the runtime and the collator, we now use a runtime api
for this.
* Fixes bug
* Apply suggestions from code review
Co-authored-by: Sergei Shulepov <sergei@parity.io>
* Doc update
Co-authored-by: Sergei Shulepov <sergei@parity.io>
* 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 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
* 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
* 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>