Commit Graph

42 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
Dan Shields ad5dd362b4 Add wasmtime feature to all parachain clients (#1058)
* add wasmtime feature to all parachain clients

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2022-03-01 20:41:21 +00: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 60ae6ad1d3 Update Substrate & Polkadot (#861) 2021-12-15 03:10:12 +00:00
Bastian Köcher 2a8c07bf0b Update to latest Polkadot & Substrate (#850)
* Update to latest Polkadot & Substrate

* More fixes
2021-12-10 12:08:41 +01:00
Keith Yeung 1bfbc7fe0c Add CheckNonZeroSender to runtime configs (#847)
* Add CheckNonZeroSender to runtime configs

* cargo update -p polkadot-primitives

* Fixes

* Fixes
2021-12-09 14:53:51 +01:00
Bastian Köcher d0b5e2b56f Adds support for returning a custom header from validate_block (#825)
* 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
2021-12-03 12:49:13 +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
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
Andrew Jones 035a576008 Metadata v14 (companion to #3336) (#564)
* Remove event pallet::metadata attributes

* Add scale-info deps, TypeInfo derives, update call variants

* Update metadata runtime APIs

* Add missing scale_info dependency, update rococo runtime API

* Add missing scale_info dependency

* Remove pushed diener patches

* Cargo.lock

* Add missing scale-info dependencies

* Fixes

* Statemint runtime fixes

* Call struct variant empty matches

* Add missing scale-info dependency

* Fixes

* scale-info 1.0

* cargo update -p xcm

* update lock

* Update Cargo.lock

* update to latest polkadot

* remove rpc_http_threads

https://github.com/paritytech/substrate/pull/9737

* replace task executor with tokio handler

https://github.com/paritytech/substrate/pull/9737

* fix test compilation?

* Update Cargo.lock

* cargo update

* remove unused

* Update substrate and polkadot

* Update test/client/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-09-16 12:11:05 +02:00
Squirrel a0532634e1 less deps (#606) 2021-09-12 23:22:14 +02:00
Bastian Köcher 52bc169b52 Upgrade Substrate & Polkadot (#583) 2021-08-22 21:22:36 +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
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 1d4c02cc4e Update Substrate & Polkadot (#387)
* Update Substrate & Polkadot

* Enforce `ParachainSetCode`
2021-04-02 16:17:04 +02: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 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
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
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
Sergei Shulepov d6a7bc4e30 Replace ValidationData with PersistedValidationData (#291)
* Replace ValidationData with PersistedValidationData

* Update polkadot
2021-01-19 15:20:12 +01:00
Sergei Shulepov 464e54affd Inform the PVF with the latest relevant relay chain state (#279)
* 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>
2021-01-13 14:40:26 +01:00
Bastian Köcher 9f0085c097 Wait for block import in parachain consensus (#271)
* Wait for block import in parachain consensus

There was a bug in the parachain consensus that when importing a relay
chain block that sets a new best parachain block, but the required
parachain block was not yet imported. This pr fixes this by waiting for
the block to be imported.

* Finish docs
2021-01-05 22:14:27 +00:00
Sergei Shulepov 0a5b53cdce Plumb polkadot backend into cumulus-collator (#269)
* The problem in the nutshell

* Make it compile

* make tests pass

* Update the parachain-upgrade module

* Fix collator tests

Co-authored-by: Bastian Köcher <git@kchr.de>
2020-12-21 20:27:54 +01:00
Bastian Köcher 63efcc49c3 Wait for relay chain block import before validatiing a block announcement (#227)
* Start with something

* Whatever

* Update

* MOARE

* Make cumulus-network compile and tests work

* Update more and fixes

* More stuff

* More fixes

* Make collator build

* Make test almost work

* Remove contracts runtime

* More test work

* Make service compile

* Fix test-service

* Fix test client

* More fixes

* Fix collator test

* Fix network tests (again)

* Make everything compile, finally

* Fix tests

* Write test that should fail

* Add `WaitOnRelayChainBlock`

* Update git versions

* Make it all work

* Update logging

* Switch to provided method for pushing an extrinsic

* Try to debug CI

* Aaaa

* Only use Debug

* Updates

* Use native execution to hopefully make CI happy...
2020-11-23 00:21:02 +01:00
Bastian Köcher 182109ef5f Switch to polkadot master branch (#230)
* Switch to polkadot master branch

* Fix compilation
2020-11-09 13:05:00 +01:00
Bastian Köcher 76f9ecae47 Update Cumulus for Parachains V1 (#224)
* Start with something

* Whatever

* Update

* MOARE

* Make cumulus-network compile and tests work

* Update more and fixes

* More stuff

* More fixes

* Make collator build

* Make test almost work

* Remove contracts runtime

* More test work

* Make service compile

* Fix test-service

* Fix test client

* More fixes

* Fix collator test

* Fix network tests (again)

* Make everything compile, finally

* Fix tests

* Update to latest masters

* Remove ignore

* Switch to different branch in polkadot for now

* Update reference

* Make it compile with latest changes

* Update collator/src/lib.rs

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>

* Update to latest upstream

* Update to latest master

* Fix test

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2020-11-08 22:18:09 +01:00
Cecile Tonglet 4d150a0199 Uniformize tests (#220)
* Initial commit

Forked at: 5bbab68f02
Parent branch: origin/master

* Copy runtime module from rococo

Forked at: 5bbab68f02
Parent branch: origin/master

* Also copy dependencies pallets and primitives

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* test-service

* Move integration test

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* Not sure what went wrong...

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* fmt

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* Remove pallet contracts (not used)

* Remove pallet parachain-info and token-dealer (not used)

* Sort dependencies alphabetically

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* CumulusTestNode for testing

* Speed up block generation

* Fix improper shutdown

* rustfmt

* runtime: replace const by storage

* Fix for previous commit

* Remove some generics

* Move generate_genesis_state to cumulus-primitives

* fmt

* Remove message_example

* fixup! Remove message_example

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* Half the solution to previous commit :(

* Revert "Fix for previous commit"

This reverts commit 60010bab6797487093ac8c790b3a536f7ca0895b.

* Revert "runtime: replace const by storage"

This reverts commit c64b3a46f0325a98922015e0cbf3570e2e431774.

Not working for some reason...

* Use helper

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* Remove test-primitives

* Revert "Half the solution to previous commit :("

This reverts commit 9a8f89f9f06252198e6405057043c6b313f1aea4.

* Revert "Revert "Half the solution to previous commit :(""

This reverts commit 6a93f0f09d74ccdc3738dd78a777c483427c03ce.

* Test with some extra extrinsics

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* Remove message broker
2020-10-07 08:51:01 +00:00
Bastian Köcher 6f50d0928d Add parachains for rococo (#144)
* Add parachains for rococo

* Fix chain specs

* Update to revert log rotation

* Support selecting the chain in `export-genesis-state`

* Add subcommand for exporting the genesis wasm of a Parachain

* Update stuff

* Fix `export-genesis-wasm`

* Update the polkadot ref

* Add bootNodes address

* Add bootNodes address - track

* Add bootNodes address - trick

* Fix incorrect peer id (trick)

* Fixes https://github.com/paritytech/cumulus/issues/157

* Update chainspecs

* Update specs again

* Set correct sudo account

* Update properties

* Update readme

* Update `Cargo.lock`

* Switch to rococo-branch

Co-authored-by: Evaldo <contato@evaldofelipe.com>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2020-08-04 17:33:20 +02:00
Bastian Köcher cd7e06c643 Update Substrate & Polkadot (#84) 2020-04-29 14:23:18 +02:00
Cecile Tonglet e880fe43e9 Update polkadot & substrate (#55) 2020-02-10 18:01:59 +01:00
Cecile Tonglet 2941569e8a Update CLI (#53)
* Initial commit

Forked at: 0efd15c0c5
Parent branch: master

* Update substrate: more CLI improvement

* Update substrate and polkadot to cecton-cumulus-branch

* WIP

Forked at: 0efd15c0c5
Parent branch: master

* Update Cargo.lock

* WIP

Forked at: 0efd15c0c5
Parent branch: master

* WIP

Forked at: 0efd15c0c5
Parent branch: master

* Update Cargo.lock

* WIP

Forked at: 0efd15c0c5
Parent branch: master

* WIP

Forked at: 0efd15c0c5
Parent branch: master

* Test running node and interrupts

* WIP

Forked at: 0efd15c0c5
Parent branch: master

* Update Cargo.lock

* Update test/parachain/tests/running_the_node_and_interrupt.rs

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-02-10 12:39:32 +01:00
Cecile Tonglet 0efd15c0c5 Update substrate and polkadot (#50)
* Update Cargo.lock

* Fix for substrate update

* Update Cargo.lock

* Fix for substrate update

* Fix for substrate update

* Fix for substrate update

* Fix for substrate update

* Update Cargo.lock

* Fix for substrate update

* Fix for substrate update

* Fix for substrate update

* Fix for substrate update

* Fix for substrate update

* WIP

* Temporary fix until polkadot is fixed

* WIP

* WIP
2020-02-03 15:39:51 +01:00
Cecile Tonglet 7fb8b2fb47 Update substrate async api (#49)
* Update substrate: async API fix

* Fix to update polkadot and substrate

* Update substrate & polkadot to use cumulus-branch

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-02-01 16:28:33 +01:00
Bastian Köcher 1bcb147669 Make everything compile and fix tests 2020-01-14 22:23:16 +01:00
Bastian Köcher bc4499b640 Try to fix the build 2019-09-29 02:05:49 +02:00
Bastian Köcher 84c9092530 Update Substrate, Polkadot and switch to wasm-builder 2019-06-18 08:43:39 +02:00
Bastian Köcher d8e901300d Update to latest Substrate + Polkadot 2019-06-05 20:38:26 +02:00
Bastian Köcher 815e466c41 Trying to get the tests back working 2019-04-12 12:01:16 +02:00