Commit Graph

213 Commits

Author SHA1 Message Date
Sergei Shulepov f8bde26e63 Remove polkadot-validation dependency (#290) 2021-01-14 20:59:02 +01:00
Bastian Köcher 2218df9b74 Update to latest (#289) 2021-01-14 17:50:56 +01:00
Black3HDF 87a82c4730 eliminate space (#288) 2021-01-14 17:06:57 +01:00
Sergei Shulepov b424d0f5e1 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 af07b819d1 Update (#284)
* Update yeah

* Update spec_version
2021-01-12 13:18:24 +01:00
BenWhiteJam a6c1b4a5da add local setup to README (#283)
* adds local setup RelayChain, ParaChain and Registration

* cleanup

* removes metadata types adds parachain id placeholder

* spelling

* update parachain id information

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-01-11 21:48:07 +01:00
Bastian Köcher fa7c33ea9d Update... (#282) 2021-01-08 13:16:21 +01:00
Bastian Köcher 9dc7cc5735 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
Joshy Orndorff ed8fc4f4a3 remove borrowed box (#272) 2021-01-05 22:34:57 +01:00
Bastian Köcher d51f1d8563 Update to latest Substrate & Polkadot (#280)
* Update to latest Substrate & Polkadot

* Update the chain specs

* Update polkadot properly...

* Update chainspecs again...

* Again...
2021-01-05 22:33:31 +01:00
lumir-mrkva 30021251fc upgrade to latest polkadot (#278)
* upgrade to latest polkadot

* ss58 in tests

* format

* removed unused import
2021-01-04 00:22:17 +01:00
Bastian Köcher cd0e40a6eb Rococo V1 (#268)
* Update

* Update the chain specs

* Update to latest master & master

* add current tick bootnodes

* Update again

* Add track bootnodes

* add trick and track bootnodes

* Update the chain specs

* Update

Co-authored-by: Erin Grasmick <erin@parity.io>
2020-12-22 10:00:58 +01:00
Sergei Shulepov f0315a16d3 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 bfad1abe8b Update to latest master 2020-12-18 12:45:06 +01:00
Shawn Tabrizi afc50e8ade Add XCM Handler (#267)
* initial mock

* integrate xcm-handler into runtime

* expose xcm send error

* oops

* better comment
2020-12-17 18:42:00 +01:00
Alexander Krupenkin 8226063135 Update to latest polkadot & substrate (#266) 2020-12-16 10:50:05 +01:00
Sergei Shulepov c84c9b6bb0 Integrate HRMP (#258)
* HRMP message ingestion

* Plumb hrmp_watermark to build_collation

* Plumb hrmp_watermark to ValidationResult

* Plumb hrmp outbound messages

* Implement message-broker part of HRMP

* Kill UPWARD_MESSAGES as well

Otherwise, they will get resent each block

* Add sudo versions for easier testing

* Remove the xcmp module

Not useful for the moment

* Doc for HRMP message handler

* Estimate the weight upper bound for on_finalize

* Remove a redundant type annotation

* fix spelling of a method

* Apply suggestions from code review

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

* Deabbreviate dmp and hrmp in the message ingestion type

* Don't use binary_search since it's broken by a following rotate

Instead use the linear search. We can afford linear search here since
due to limited scalability of HRMP we can only have at most a couple of
dozens of channels.

* Fix the watermark

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-12-15 04:42:31 +00:00
Alexander Krupenkin 1c5add6a39 Upgdate to latest polkadot & substrate (#263)
* Upgdate to latest polkadot & substrate

* Fix code formatting (cargo fmt)

* Fix unit tests
2020-12-10 14:28:02 +01:00
Bastian Köcher 092f0e9149 Update to latest master & master (#260) 2020-12-04 23:49:12 +01:00
Sergei Shulepov 233b347a58 Plumb polkadot client into the collator struct (#255)
* plumb polkadot_client into Collator

* plumb para_id into Collator

* promote retrieve_dmq_contents to a method

* remove the retrieve_dmq_contents closure
2020-12-03 23:02:19 +01:00
Bastian Köcher 5a97db73fb Update (#253) 2020-12-02 17:16:23 +01:00
Robert Habermeier 996219d6ec Update parachain registration script to new extrinsic (#252)
* Update parachain registration script to new extrinsic

* Update parachain registration script
2020-12-02 08:53:45 +01:00
Sergei Shulepov f27b7acb8f Update polkadot to the latest master (#251)
* update cumulus to latest polkadot

* s/Trait/Config

To be more consistent with the new naming.

* Update Cargo.lock

* fix network tests
2020-12-01 19:21:40 +01:00
Bastian Köcher c0d80a7c95 Fix syncing issues (#249) 2020-11-26 22:14:12 +01:00
Sergei Shulepov 6e60648f49 Update Polkadot to the latest master (#248)
* Update polkadot to 982c9e

* Fix tests in collator-network
2020-11-26 16:39:19 +01:00
Bastian Köcher e6f37cb7cf Update everything to latest master (#247) 2020-11-25 15:45:49 +01:00
Bastian Köcher 35c2609b8b Update to latest master (#246) 2020-11-23 19:09:25 +01:00
Bastian Köcher e5b4e8cae7 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 b11ec7ea9f Bring back log prefixing (#245) 2020-11-23 00:08:52 +01:00
Sergei Shulepov 2d7f37ed1d Integrate UMP into message-broker (#244) 2020-11-20 21:32:58 +01:00
Sergei Shulepov 001aa5bb00 update polkadot to f7ea3d07 (#243) 2020-11-20 15:40:16 +01:00
Sergei Shulepov e17fbb01ad Resurrect (a minimal version of) message-broker (#234)
This is mostly a copy of the predating version with exception of some
renaming and alterations (e.g. the message handler takes an inbound
downward message by value, not by reference).
2020-11-16 14:18:46 +01:00
Sergei Shulepov 8835ef8239 Make export-genesis-wasm output hex (#236)
* Add --raw flag to export-genesis-state

* Switch export-genesis-wasm to hex by default

Also add --raw flag. This makes it similar to `export-genesis-state`.
2020-11-11 20:27:35 +01:00
Sergei Shulepov e6999e97cc Integrate DMP into collation, take 2 (#233)
* Integrate DMP into collation

* Integrate processed_downward_messages as well
2020-11-11 12:27:09 +01:00
cheme 378f6e070b Use state machine externalities in validation runtime. (#214)
* test

* switch to branch

* Use modified.

* Use sp_externalities environmental primitives

* Change to latest no_std version, add missing host function boilerplate.

* remove comment (was used for debugging).

* fixes

* with_externalities factor

* Read merged change from overlay.
2020-11-10 12:23:55 +01:00
Bastian Köcher 0a8e1fb9a1 Switch to polkadot master branch (#230)
* Switch to polkadot master branch

* Fix compilation
2020-11-09 13:05:00 +01:00
Bastian Köcher 28338431fe 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
e. g 55364ac254 Update release-bot.yml (#228)
This should be using the most recent version of s3krit's github action otherwise it will fail
2020-11-03 19:18:13 +01:00
Cecile Tonglet 7b4ea8d8cb Uniformize tests (#220)
* Initial commit

Forked at: 56753b7717
Parent branch: origin/master

* Copy runtime module from rococo

Forked at: 56753b7717
Parent branch: origin/master

* Also copy dependencies pallets and primitives

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* test-service

* Move integration test

* CLEANUP

Forked at: 56753b7717
Parent branch: origin/master

* Not sure what went wrong...

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* CLEANUP

Forked at: 56753b7717
Parent branch: origin/master

* fmt

* CLEANUP

Forked at: 56753b7717
Parent branch: origin/master

* CLEANUP

Forked at: 56753b7717
Parent branch: origin/master

* Remove pallet contracts (not used)

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

* Sort dependencies alphabetically

* CLEANUP

Forked at: 56753b7717
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: 56753b7717
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: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
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: 56753b7717
Parent branch: origin/master

* CLEANUP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* WIP

Forked at: 56753b7717
Parent branch: origin/master

* CLEANUP

Forked at: 56753b7717
Parent branch: origin/master

* Remove message broker
2020-10-07 08:51:01 +00:00
Dan Shields adbd6cffac Fix collator link (#223) 2020-10-06 07:12:52 +00:00
Cecile Tonglet ba44e83f68 Add --collator flag as alternative to --validator (#222)
* Initial commit

Forked at: 56753b7717
Parent branch: origin/master

* Add --collator flag as alternative to --validator

* Apply suggestions from code review

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-10-02 10:24:20 +00:00
Cecile Tonglet 56753b7717 Test for not-validator mode (#167)
* WIP

Forked at: 10533db948
Parent branch: origin/master

* WIP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master
2020-09-16 11:44:52 +02:00
Cecile Tonglet badf52b1e1 Fix integration test again (#201)
* Initial commit

Forked at: 10533db948
Parent branch: origin/master

* WIP

Forked at: 10533db948
Parent branch: origin/master

* WIP

Forked at: 10533db948
Parent branch: origin/master

* WIP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* WIP

Forked at: 10533db948
Parent branch: origin/master

* Pushed branch for polkadot & substrate

* WIP

Forked at: 10533db948
Parent branch: origin/master

* using rococo and tick

* Revert "using rococo and tick"

This reverts commit d81db9246ff7061478649ffea3e49e417fcb6959.

* debug

* WIP

Forked at: 10533db948
Parent branch: origin/master

* Revert "Revert "using rococo and tick""

This reverts commit 45ec2be89f2b8af82da8dcb9d19d900571598766.

* WIP

Forked at: 10533db948
Parent branch: origin/master

* Update rococo-parachains/src/service.rs

* WIP

Forked at: 10533db948
Parent branch: origin/master

* WIP

Forked at: 10533db948
Parent branch: origin/master

* WIP

Forked at: 10533db948
Parent branch: origin/master

* Revert "WIP"

This reverts commit d3f63ed0a314ffe12c0066124076736017981b80.

* WIP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* Use inprocess validation

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* Fix failing test

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* increase logs

* Removed a bit of logs

* Revert branch change

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* Test without STDIN close detection

* Bypass validation pool

* Switch to rococo-branch

* Move start_test_collator to rococo-collator

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master

* CLEANUP

Forked at: 10533db948
Parent branch: origin/master
2020-09-16 06:54:34 +00:00
Victory Van 9c4519f0f4 fix typo (#212) 2020-09-09 10:38:52 +02:00
Joshy Orndorff cd15cbe605 Add workshop link to readme (#211) 2020-09-08 11:54:35 +02:00
cheme 345cb13493 Fail when storage is not in proof (#205)
* fail when storage is not in proof

* Single panic.
2020-08-24 22:11:05 +02:00
Bastian Köcher feaf09560c Add support for scheduling an upgrade without checks 2020-08-15 01:51:03 +02:00
Bastian Köcher 1dfeca65e3 Update Polkadot reference and remove ValidationFunction to make usage (#202)
* Update Polkadot reference and remove `ValidationFunction` to make usage
with polkadot-js easier

* Update again
2020-08-14 19:30:10 +02:00
Bastian Köcher 3114ec5ece Fix export-genesis-state (#200)
Fix `--parachain-id` CLI argument for `export-genesis-state` and don't
print genesis state without newline.
2020-08-13 09:53:02 +02:00
Bastian Köcher 9446b3c7e7 Implement storage::next_key (#195) 2020-08-12 09:54:12 +02:00