Commit Graph

326 Commits

Author SHA1 Message Date
Chevdor 5f96d5eea8 Refactor paths and runtime names (#507)
chore: refactor for consistant naming of the crates and paths of the runtimes

* tests: ignore folder created by the tests
* chore: refactoring
* Update polkadot-parachains/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-06-28 14:24:03 +02:00
Joshy Orndorff a8c3f11c44 Adds a mock provider for the parachain inherent (#484)
* Bring in code from moonbeam

* move it to mock.rs

* Actually build it 🤦
2021-06-23 10:37:50 +02:00
zjb0807 9a1e8af944 Fix CandidateRemoved event (#503) 2021-06-22 18:59:54 +02:00
JesseAbram 5aca3b54d8 min collator check (#498)
* min collator check

* change statemint/mine min candidates

* Ci pass

* Update pallets/collator-selection/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update pallets/collator-selection/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Apply suggestions from code review

* build fixes

* add error messages to errors

* added validator register check

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-06-22 18:59:14 +02:00
Shawn Tabrizi 69ca715506 fix rename (#502) 2021-06-20 13:38:03 +02:00
André Silva 8f733a6c2c use max_block_proposal_slot_portion (#499)
* use max_block_proposal_slot_portion

* remove patch now that Substrate PR is merged

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2021-06-20 11:05:08 +00:00
Shawn Tabrizi 12a2b28541 Fix Max Block Weight (#501)
* fix max block weight

* fix milli per block too
2021-06-19 14:47:05 +02:00
cheme 0027f5e248 ensure early drop of proof memory. (#500) 2021-06-18 19:29:42 +02:00
Bastian Köcher a81071c1cb Update Polkadot & Substrate (#497) 2021-06-17 11:18:30 +02:00
Sergei Shulepov 1f3458a0e3 WIP: Update Substrate & Polkadot (#496)
* WIP: Update Substrate

* Update Substrate & Polkadot

* fixes

* more fixes

* few missing origins

* use spawn_essential_handle

* bump polkadot dep

* remove newlines

* fix test

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-06-17 09:37:03 +02:00
Shawn Tabrizi f45c55be3b Remove All Assets and Uniques from NonTransfer Proxy (#486)
* remove all assets and uniques from `NonTransfer` proxy

* fix merge
2021-06-16 23:02:38 +00:00
Bastian Köcher d8e3f8a4ae Rename pallet-session-benchmarking crate (#495)
This is required to support patching Substrate, as otherwise there are
two crates with the same name.
2021-06-16 12:53:42 +02:00
Bastian Köcher d6f06bf5d9 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 80b739d886 Make sure system tests are checking for the correct result (#491) 2021-06-13 12:23:13 +02:00
Bastian Köcher 2dc281b482 Bring support for calling check_inherents (#490)
* Start

* More work

* Add proc-macro for `validate_block`

* Make everything compile

* Add some test
2021-06-12 20:21:46 +02:00
Bastian Köcher c5819c9e78 Use polkadot-client instead of polkadot service where possible (#489) 2021-06-11 12:56:14 +02:00
Guillaume Thiolliere b36e4dbca5 update substrate/polkadot with construct_runtime changes (#485)
* update substrate/polkadot with construct_runtime changes

* fix update

* Fixes

* More fixes

* fix test, but might be wrong fix

Co-authored-by: Bastian Köcher <info@kchr.de>
2021-06-10 17:50:09 +02:00
Chevdor 8373f510cf feat(ci): update runtime build workflow (#471)
* feat(ci): update runtime build workflow

- switch to a tag for the chevdor/srtool-actions
- trigger to only tags & ignore folders not involved in the runtime
- add weekly build schedule
- add timestamp to the artifacts
2021-06-10 17:28:29 +02:00
JesseAbram 37e474a947 Add session weight (#477)
* session weight

* decouple session benchmarking and collator selection

* removed mock

* licensing

* benchmarking script

* set benchmarking into runtime

* Update scripts/benchmarks.sh

* real weights

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-06-08 13:24:19 +02:00
cheme e8b4b36446 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 e588583b79e1a64e2a54157b40968aa6b586fbbe.

* 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 acb2bc4f00 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
Xiliang Chen 0a5dbafd53 update substrate & polkadot (#472)
* update substrate

* try again
2021-06-04 16:43:29 +02:00
e.g. magical unicorn 23d7afceb4 Add raw chainspecs for Westmint and Statemine (#470)
* add raw chainspecs

* rename chain specs

* add statemine to accepted --chain values

* fix up westmint chainspec

* fix up westmint chainspec

* add token symbol and decimals to statemine chain spec

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
2021-06-04 15:12:06 +02:00
Bastian Köcher 782c0264ac Update Substrate & Polkadot (#469) 2021-06-03 19:50:18 +02:00
Chevdor 24ddf1b0ce Add srtool + subwasm workflow (#462)
Add github workflow to build the westmint and statemine runtimes with srtool and subwasm

Co-authored-by: Alexander Popiak <alexander.popiak@gmail.com>
2021-06-03 14:46:43 +02:00
Bastian Köcher ecb0478a49 Decrease log levels (#464)
It doesn't make sense to log them as a warning, especially when it could
happen that a parachain id could be reused over the lifetime of a relay
chain.
2021-06-03 12:48:28 +02:00
Alexander Popiak 50245e5add Statemine Release Prep (#460)
* set default para id to 1000

* add genesis value generation script

* add statemine chain spec and genesis values

* add westmint chain spec and genesis values

* rename chain specs to _genesis to indicate that they are not usable for syncing the chain

* adjust chain names to reduce confusion

* add westmint chain spec

* set chain id to shell

* comment out statemine chain spec

* fix build

Co-authored-by: joepetrowski <joe@parity.io>
2021-06-02 16:27:46 +02:00
Bastian Köcher ba81b0b56c Do not require the collator key to be passed (#459) 2021-06-02 11:43:45 +02:00
Gavin Wood 3a06a47aa7 Bump XCM weight to something more conservative (#458) 2021-06-02 09:22:49 +02:00
Gavin Wood fccdc2da9a Add NFTs to Statemine (#456)
* Add NFTs to Statemine

* Update NFT deposits

* add_benchmark

* add feature flag

* std feature too

* add weights

* add `transfer_ownership` to `NonTransfer` blacklist

* fix merge

* add `approve_transfer` to `NonTransfer` blacklist

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-06-02 09:00:18 +02:00
joe petrowski b60d1e36d2 add transfer_ownership to NonTransfer blacklist (#457) 2021-06-02 07:29:29 +02:00
Gavin Wood eaa9f64671 Add Statemint (#452)
* Add Statemint

* Versioning.

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Benchmarking

* kick patch (paritytech/statemin#88)

* Westmint Chain Spec (paritytech/statemint#90)

* Tidy the common .toml

* Update weights

* add westmint sudo key comment

* Port consensus stuff

* fix typo

* fix typo ... again

* Recognise Westmint

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-06-01 21:31:03 +02:00
Bastian Köcher 5b2bc585de Update Substrate & Polkadot (#454) 2021-05-31 07:54:31 +02:00
Bastian Köcher d5b802ce28 Check that we have set the validation data inherent (#451) 2021-05-28 23:35:26 +02:00
Bastian Köcher 07b3c44be8 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
Shawn Tabrizi e286e0451c rococo-collator -> polkadot-collator (#449) 2021-05-24 11:14:12 +02:00
Bastian Köcher c884c10b88 Some changes for Statemint (#448)
* Make Aura and relay chain verifier buildable

* AHHH

* Ahhh2

* Ahhh3

* Move `ParachainBlockImport`

* Updates because of Substrate

* Revert "AHHH"

This reverts commit 3f7c84327e1036ed71a8e2bd30f6416d32bae5a2.

* Fix warning
2021-05-23 13:29:43 +02:00
Sergei Shulepov 093b574d13 Slap runtime_version macro everywhere (#444)
* Slap runtime_version macro everywhere

* Update Substrate

This includes the fix of compilation for macOS platforms.
2021-05-19 12:34:02 +02:00
Bastian Köcher d458d2622b 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
Bastian Köcher 3bcd7f0fd8 Fix chain spec handling (#438)
Before when loading a chain spec from a file it was always using the
rococo parachains runtime genesis config. This leaded to problems when
trying to convert a shell chain spec json file to a raw chain spec.
2021-05-13 23:35:15 +02:00
Gavin Wood 96cb16c384 Companion for #3010 (Reserve Xfer extrinsic) (#434)
* Companion for #3010 (Reserve Xfer extrinsic)

* cargo update -p xcm

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-13 08:07:39 +02:00
Gavin Wood 23d04ceb3c Companion for #3007 (Track teleported assets) (#436)
* Companion for #3007: Track teleported assets

* Bump

* Try fix the breakage

Co-authored-by: Sergei Shulepov <sergei@parity.io>
2021-05-12 22:51:28 +02:00
Bastian Köcher 3194febb1f Rename rococo-collator to polkadot-collator (#435)
* Rename `rococo-collator` to `polkadot-collator`

Also contains some other small changes.

* Test fixes and some further search&replace
2021-05-12 17:53:22 +02:00
Gavin Wood 8cd71668a3 Companion #2995: Dispatchable for teleporting assets (#431)
* Companion #2995: Dispatchable for teleporting assets

* Fixes

* Fixes

* Fixes

* Fixes

* Bump Substrate

* Bump Polkadot

* Fixes
2021-05-11 15:41:52 +02:00
Bastian Köcher 8accc88e76 Aura consensus for parachains (#371)
* 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>

* Start with something

* Update Substrate & Polkadot

* Start to make it compile

* Make it compile

* Begin with something

* Yep

* I'm a hacker

* Bring back the builder

* Make it work in some way

* Compile

* Parachains use their own "slot"

* Adds cumulus-pallet-aura

* Wrap AuRa import queue to disable equivocation checking by default

* Pass slot duration

* Check the seal when validating a block

* Adds missing file

* Try to make the seal working

* Fix it

* Some fixes

* Bring in the latest features to cleanup the code

* Update and make it compile

* Improve the import

* Start fixing

* More work

* Fix fix fix

* Make everything compile

* Small cleanups

* Rename and more docs

* Docs

* Fixes fixes fixes

* Update rococo-parachains/src/chain_spec.rs

* Update client/consensus/aura/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update client/consensus/aura/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update primitives/parachain-inherent/Cargo.toml

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update primitives/parachain-inherent/Cargo.toml

* Update primitives/parachain-inherent/Cargo.toml

* Update primitives/parachain-inherent/Cargo.toml

Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2021-05-10 14:43:00 +02:00
Keith Yeung 647a9e6df9 Upgrade pallets to FRAMEv2 (#404)
* Upgrade parachain info pallet to FRAMEv2

* Upgrade parachain system pallet to FRAMEv2

* Use Pallet<T> instead of Module<T>

* Upgrade XCMP queue pallet to FRAMEv2

* Correctly specify the metadata for events in xcmp-queue pallet

* Apply suggestions from code review

* Update pallets/parachain-system/src/tests.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-05-08 22:18:01 +02:00
Joshy Orndorff 2641c5b830 Make --collator reusable and imply --validator (#380)
* Reusable RunCmd struct

* wire new run command through service

* Fill in the rest of the methods

* attempt normalization

* Settle on the borrowing approach

* add the normalize call

* bump substrate

* Update client/cli/src/lib.rs

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

* Update docs

* Update client/cli/src/lib.rs

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-05-06 14:38:25 +00:00
Bastian Köcher 5847e78fd9 Update Substrate & Polkadot (#428) 2021-05-04 22:32:06 +02:00
Bastian Köcher 530c95d2df Update Substrate & Polkadot (#427)
* Update Substrate & Polkadot

* Fixes
2021-05-04 09:48:41 +02:00
Gavin Wood dd5ad841a0 DMP Queue pallet (#416)
* Introduce the converter into the hub

* Parachain recognises Rococo governance body as admin

* Whitespace

* Use UsingComponents for fee payment in XCM

* Fixes

* Fixes for XCM permissions

* Remove encode_call test

* Fixes

* Rococo Collator supports Shell runtime

* Fixes

* Fixes

* Initial draft of DMP Queue pallet

* DMP Queue builds.

* Companion for Polkadot gav-allow-xcm-exec

* Bump

* Fix std

* Fixes

* fix and improve docs

* fix compile errors in tests

* add test for try_service_message

* update cargo.lock

* Fixes

* Make test name read well

* Fixes

* Add a couple of simple tests

* Tests

* Tests

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

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

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

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

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

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

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

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

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

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

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

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

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

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Chain ID and ParaID don't collide

* Fixes

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

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

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

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Fixes

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-02 16:11:58 +02:00