Commit Graph

33 Commits

Author SHA1 Message Date
Robert Habermeier 8eee3c37c4 Companion for primitives consolidation into v2 (#1071)
* branches

* update all primitives references

* fmt

* Update Polkadot & Substrate

* Again

Co-authored-by: Bastian Köcher <info@kchr.de>
2022-03-10 09:33:05 +00:00
Dan Shields 65454fbf96 Update Cumulus to common Cargo formmating scheme (#1050)
* Update throughout with common Cargo formating scheme
2022-03-02 00:07:29 -07:00
wigy 6af1dd5f6f Companion to "Updating scale to v3" (#1013)
* Updating dependencies

* Adapting code to scale v3

* cargo fmt

* Fix compilation

* Update Cargo.lock

* TIL  exists

Co-authored-by: Bastian Köcher <info@kchr.de>
2022-02-25 13:40:24 +00:00
Bastian Köcher 753f58caac Return compressed PoV from collation (#942)
* Return compressed PoV from collation

This enables us to also print the size of the compressed PoV.

* FMT

* Update Polkadot & Substrate

* Fix compilation

* Fixes

* FMT
2022-02-07 21:04:56 +00:00
Bastian Köcher 2f9e97ce02 Fix solo to para custom header return (#882)
* Adds an integration test for testing the migration

* Fix the custom validation header use case
2022-01-03 20:14:14 +01:00
cheme b9ba74892a Companion for substrate#9732 (#678)
* 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 <>
2021-12-24 11:28:43 +00:00
Sebastian Kunert 7b42df10f3 Introduce interface for relay chain interaction (#835) 2021-12-22 19:02:11 +01:00
Dan Shields ec401ce1d0 move to rust 2021 (#759)
* move to rust 2021

* fix formatting, more moves
2021-11-16 15:12:06 +01:00
sandreim b968e54fe5 Companion to substrate #10196 - Add group name in task metrics (#732)
* Use blank task group name

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* cargo fmt

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Update

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* update Cargo.lock and switch from 0.9.12 to master

* format with LATEST nightly

Co-authored-by: Andronik Ordian <write@reusable.software>
2021-11-11 19:41:36 +00:00
Bastian Köcher 0fad3ae44c Same procedure as not every day (#636)
* Same procedure as not every day

* Remove warning

* Update
2021-10-01 13:23:56 +02:00
Keith Yeung 1aab3349cc Use DecodeLimit for decoding XCM messages (#605)
* Use DecodeLimit for decoding XCM messages

* Use decode_all_with_depth_limit in appropriate places

* Use decode_all while decoding byte vector

* cargo fmt
2021-09-19 15:29:34 +03:00
Chevdor 1dd000a011 ci: add quick-check with rustfmt (#615)
* ci: add quick-check with clippy and rustfmt

* chore: rustfmt round

* chore: set the same rustfmt config than substrate

* chore: fix formatting

* cI: remove clippy

* ci: switch to nightly for the checks

* ci: fix toolchains and naming

* ci: Limit the check to formatting

* chore: fix formatting

* Update .rustfmt.toml

* Update .rustfmt.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-09-16 16:57:52 +02:00
Squirrel a0532634e1 less deps (#606) 2021-09-12 23:22:14 +02:00
Robert Habermeier 6c8f1f7b3c bump deps, fix aura-ext pallet, and fill in stubs for XCM (#600)
* bump deps, fix aura-ext pallet, and fill in stubs for XCM

* response handler, asset trap, asset claims

* subscription_service

* update xcmp-queue mock

* fix tests

* Update polkadot deps

Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-09-04 14:57:48 -05:00
Bastian Köcher 53c5340eff Log pov size as info (#558) 2021-08-03 21:52:41 +02:00
Bastian Köcher f5de2f93af Update Substrate & Polkadot (#551)
* Update Substrate & Polkadot

* Update client/service/src/lib.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Update client/service/src/lib.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

Co-authored-by: Andronik Ordian <write@reusable.software>
2021-07-27 22:42:39 +02:00
Bastian Köcher 594f2f4347 Update Substrate & Polkadot (#540) 2021-07-20 16:11:56 +02:00
Bastian Köcher d0b57c1ad4 Update Substrate & Polkadot (#523) 2021-07-05 23:35:28 +02:00
Bastian Köcher d3b4279f14 Adds support for checking the timestamp inherent while validating a block (#494)
* 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>
2021-06-16 10:53:47 +02:00
cheme d935b81e70 Compact proof. (#295)
* compact, need to be made optional and look into/compress child trie
roots/state.

* proto with child trie support

* Missing set_offchain_storage overload.

* right name

* Ignore offchain indexing in validation function.

* patch trie-db

* decompress from iter

* use compressed proof

* remove wasm blob from proof (no inject plugged yet)

* change lock

* update trie

* change in toml

* Revert "change in toml"

This reverts commit aa5c56850ef461ce3cb774213a92af4b1dd6cee5.

* use patch to branches

* i

* i:wq

* switch branch

* ii

* ok, needed to patch the runtime by putting substrate patch in polkadot
project.

* test passing with this conf

* actual lazy code fetch

* patch issue

* Code reorg

* restore commented tests.

* update deps.

* remove polka patch

* fixes

* remove patch

* revert cargo.lock

* cargo update -p sp-trie polkadot-service

* fix collator test (using parent state root).

* Update pallets/parachain-system/src/validate_block/implementation.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove encode_witness test function.

* Update pallets/parachain-system/src/validate_block/implementation.rs

* Fix compilation

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-06-08 11:51:32 +02:00
Bastian Köcher 794bc23de4 Do not include :code in the storage proof if not required (#480)
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.
2021-06-07 16:17:19 +02:00
Bastian Köcher 7ffb205b0d Pov recovery for parachains (#445)
* Start with a failing integration test & some refactorings

* More work

* Make it "work"

* Add `NullConsensus` for the test

* More refactorings

* Move stuff over to its own crate

* Refactorings

* Integrate it into `service` and make the test working

* Docs and some exit condition

* Use the real import queue

* Fix tests

* Update client/pov-recovery/src/active_candidate_recovery.rs

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>

* Fetch slot duration from the relay chain

* Docs

* Fixes

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2021-05-26 15:02:42 +02:00
Bastian Köcher 6674430f6e Introduce CollectCollationInfo runtime api (#443)
* 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>
2021-05-17 16:33:33 +02:00
Gavin Wood 5fe32eb0d4 XCM revamp & Ping pallet (#391)
* Add spambot

* Fixes

* Add some extra functions to spambot, bump version

* Lock..

* Aggregate HRMP (XCMP/HMP) messages. Payloads for spambot.

* Fix tests, bump Polkadot.

* Fix HMP tests

* Rename Hrmp -> Xcmp for handler/sender

* Use master branch

* Test Xcm message passing & rename away from HMP

* Docs

* Introduce fee payment mechanics into XCM.

* Rename spambot -> ping

* Lock

* XCMP message dispatch system reimagining

- Moved most of the logic into xcm-handler pallet
- Altered the outgoing XCMP API from push to pull
- Changed underlying outgoing queue data structures to avoid multi-page read/writes
- Introduced queuing for incoming messages
- Introduced signal messages as a flow-control sub-stream
- Introduced flow-control with basic threshold back-pressure
- Introduced overall weight limitation on messages executed
- Additonal alterations to XCM APIs for the new system

* Should process any remaining XCM messages when we're not doing anything else.

* Update API usage and preparation for the big build.

* Some build fixes

* Build fixes

* xcm-handler builds

* Fix warnings

* Docs

* Parachains system builds

* Parachain runtime building

* Fix build

* Introduce transfer_asset specialisation.

* Fixes

* Two-stage upgrade for parachains.

* Fixes

* Fixes

* Updates for message sending.

* Repotting/renaming. Add primitives/utility.

* Remove real-overseer and bump refs

* Configure & document Rococo XCM runtime.

* Add shell runtime, some companion changes for #8589

* Bumps & fixes

* Fix test

* Build fix

* Update pallets/xcmp-queue/src/lib.rs

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>

* Make tests compile

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* remove unused

* remove unused event stuff

* Adds proper validation-worker to make integration tests work

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* import saturating

* remove panic test

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-04-14 09:36:59 +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 1d4c02cc4e Update Substrate & Polkadot (#387)
* Update Substrate & Polkadot

* Enforce `ParachainSetCode`
2021-04-02 16:17:04 +02: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
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 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
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