Commit Graph

584 Commits

Author SHA1 Message Date
Qinxuan Chen e05bd988ed Companion for #9061 (#3200)
* migrate pallet-randomness-collective-flip to new pallet attr macro

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* fix some nits

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* fix

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* some nits

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* update Substrate

Co-authored-by: parity-processbot <>
2021-06-14 11:29:39 +00:00
Shawn Tabrizi 7f344df160 Companion for #9085 (pub calls) (#3214)
* update to use pub dispatchables

* update Substrate

* Update claims.rs

* remove warning

Co-authored-by: parity-processbot <>
2021-06-12 19:13:16 +01:00
Shaun Wang 693302bee0 Update claims pallet to FRAME v2 (#3032)
* Migrate claims pallet to pallet attribute macro.

* Trigger CI.

* Update runtime/common/src/claims.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2021-06-12 16:26:52 +00:00
Shaun Wang 1a9dc0d8e9 Migrate mmr pallet to pallet attribute macro. (#3061) 2021-06-09 23:27:53 +00:00
Gavin Wood 3d6df31cbe Named reserve companion (#3176)
* fix build

* fix tests

* update

* fix

* update

* Bump

Co-authored-by: Bryan Chen <xlchen1291@gmail.com>
2021-06-04 11:17:59 +02:00
Zeke Mostov 127771ba38 Cleanup unused errors & events in lease coordination pallets (#3174)
* Cleanup unused errors & events in lease cordination modules

* Spelling
2021-06-04 00:01:30 -04:00
Martin Pugh b63184e4ec Bump version, substrate, beefy in prep for v0.9.4 (#3169)
* bump version, substrate, beefy

* bump substrate
2021-06-03 17:05:31 +02:00
Shaun Wang 512b366280 Update purchase pallet to FRAME v2 (#3075)
* Migrate purchase wrapper pallet to pallet attribute macro.

* Apply review suggestions.

* Update runtime/common/src/purchase.rs

* Update runtime/common/src/purchase.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-06-02 18:30:55 -04:00
Shaun Wang 22f076c6d3 Update para sudo wrapper pallet to FRAME v2 (#3074)
* Migrate para sudo wrapper pallet to pallet attribute macro.

* Apply review suggestions.
2021-06-01 20:34:47 +00:00
Shaun Wang ca10e33788 Migrate registrar pallet to pallet attribute macro. (#3063) 2021-06-01 20:32:31 +00:00
Martin Pugh 2174d9475e bump version & substrate (#3085) 2021-05-24 12:36:30 +02:00
Bernhard Schuster e8652e73db cargo spellcheck (#3067) 2021-05-22 00:15:47 +00:00
Gavin Wood 933c9ac2bf Reserves for bids during ending period persist until auction done (#3058)
* Reserves for bids during ending period persist until auction done

* Fixes

* Fixes

* Fixes

* Fixes

* Update auctions.rs
2021-05-20 10:15:52 +02:00
Shaun Wang 3137d94d11 Migrate crowdloan pallet to pallet attribute macro. (#3036) 2021-05-19 20:14:20 +00:00
Martin Pugh fe97c3a3a2 Bump version & spec version in prep for v0.9.2 (#3046)
* bump version & spec version

* update Cargo.lock

* bump substrate
2021-05-18 23:03:45 +02:00
Shaun Wang 8d30172a8f Update auctions pallet to FRAME v2 (#3031)
* Migrate auctions pallet to pallet attribute macro.

* Rename extra constants.
2021-05-18 11:40:15 +00:00
Shawn Tabrizi 10685f836d Check Parachain is Fully Registered Before Starting a Crowdloan (#3018)
* Add check that parachain is fully registered before starting crowdloan

* fix tests

* fix benchmarks
2021-05-14 10:59:12 +02:00
Shawn Tabrizi c68903f3bb Add Auctions and Crowdloans to Kusama and Westend (#2999)
* add to westend

* fixes

* fix runtime tests

* add to kusama

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_auctions.rs

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_crowdloan.rs

* fix auctions benchmarks

* add benchmark to kusama

* update weights

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::crowdloan --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_crowdloan.rs

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_auctions.rs

* update to use weights

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_auctions.rs

* Initiate auctions with 2/3 council

* add check and docs

* update crowdloan deposits

* move tests

* move other tests

* update ending period

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_auctions.rs

* fix origin

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::auctions --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_auctions.rs

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Gavin Wood <gavin@parity.io>
2021-05-11 22:29:01 +02:00
Gavin Wood b55344819f Extrinsic for reserving a parachain ID (#3008)
* Extrinsic for reserving a parachain ID

* Fixes

* Fixes

* Docs

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=westend-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/westend/src/weights/runtime_common_paras_registrar.rs

* Update runtime/common/src/paras_registrar.rs

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

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=runtime_common::paras_registrar --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/runtime_common_paras_registrar.rs

Co-authored-by: Parity Bot <admin@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2021-05-11 22:28:37 +02:00
Martin Pugh 25cd67436c Bump version to v0.9.1 and spec_version to v9010 (#3001)
* bump version and spec_version

* fix generate_release_text.rb

* Revert "fix generate_release_text.rb"

This reverts commit 9e01e0ae4f6db2155d123f69063db7d7564588e0.

* fix publish_draft_release

* fix publish_draft_release

* update target cache
2021-05-11 15:27:52 +02:00
Gavin Wood ce4edd0398 Make ParaId value of public paras non-discretionary (#2988)
* Make ParaId value of public paras non-discretionary

* Fixes

* Fixes

* fix tests

* fix benchmark tests

* dont use hardcoded number

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-05-07 17:52:26 +02:00
ferrell-code 002f49fb03 Companion for Substrate#8663 (#2945)
* add pallet_authorship to test

* update Substrate

Co-authored-by: parity-processbot <>
2021-05-03 04:13:23 +00:00
Martin Pugh 7a99a18d1d v0.9.0 prep (#2959)
* bump version and unify spec version

* bump substrate

* spec_version to 900
2021-04-29 18:21:58 +02:00
Martin Pugh 9c60982989 Bump version, bump substrate & update benchmarks in preparation for v0.8.31 (#2938)
* bump version

* bump cargo

* update benchmarks

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_identity --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
2021-04-28 13:23:54 +02:00
Guillaume Thiolliere 41e57c4509 change junction parachain id from named field to unnamed field (#2940)
* use unnamed field for parachain variant in junction

* remove outdated comment
2021-04-27 14:49:55 +02:00
Shawn Tabrizi 9c0bb140c8 Companion for substrate#8665 (Bounded Treasury) (#2932)
* Add MaxApprovals for Bounded Treasury

* update weight

* update Substrate

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=kusama-dev --steps=50 --repeat=20 --pallet=pallet_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/kusama/src/weights/

* cargo run --release --features=runtime-benchmarks -- benchmark --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_treasury --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./file_header.txt --output=./runtime/polkadot/src/weights/

Co-authored-by: parity-processbot <>
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
2021-04-26 16:09:42 +00:00
Shawn Tabrizi 4838603eb4 Companion for impl Zero and One for fixed point numbers (#2924)
* fix build

* Update Cargo.lock

Co-authored-by: Bryan Chen <xlchen1291@gmail.com>
2021-04-23 00:07:05 -04:00
Peter Goodspeed-Niklaus f822381c4c Companion for Trim compact solution for length during preparation (#2649)
* Companion for Trim compact solution for length during preparation

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

* eliminate potential for overflow in OffchainSolutionLengthLimit

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* update substrate: cargo update -p sp-io

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
2021-04-13 13:53:51 +00:00
Shawn Tabrizi 2d21599ec5 expose sample length in consts metadata (#2848) 2021-04-12 13:14:03 +02:00
Shawn Tabrizi 2c9a26e192 Change Auctions to Eight Lease Periods Per Slot (#2862)
* initial patch

* fix tests

* fix benchmarks

* expose `SlotRange` consts

* Update Cargo.lock

* fix tests

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2021-04-10 08:20:53 +00:00
Shawn Tabrizi 9babb09900 Introduce System Parachains into Registrar (#2858)
* initial stuff

* adjust deposit

* remove unused

* weight stuff

* Update integration_tests.rs

* Update paras_registrar.rs

* Update paras_registrar.rs

* add test

* Update paras_registrar.rs

Co-authored-by: parity-processbot <>
2021-04-09 21:07:49 +02:00
Gavin Wood c9102c11a4 XCM Revamp Continued (#2865)
* Introduce plurality XCM locations

* Add RelayedFrom

* DMP dispatch weight handling.

* Add pallet for XCM sending, add routing logic.

* Update error types & doc

* Fix warnings.

* Fixes

* Fixes

* Fixes

* Bump Substrate

* Fixes

* Docs

* Docs

* Docs

* Fixes

* Fixes

* Fixes

* Update xcm/pallet-xcm/src/lib.rs

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

* Docs

* Fixes

* Update lib.rs

* Fixes

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-04-09 20:34:28 +02:00
Shawn Tabrizi 322e1f3dff ModuleId to PalletId (#2864)
* lock substrate version for testing

* `ModuleId` to `PalletId`

* release substrate version

* Update Cargo.lock

Co-authored-by: Xavier Lau <c.estlavie@icloud.com>
2021-04-09 12:33:21 +02:00
André Silva 68626198f8 runtime: fix the session keys migration that includes the beefy key type (#2855)
Co-authored-by: Andronik Ordian <write@reusable.software>
2021-04-08 21:51:46 +02:00
Gavin Wood adc238ad86 XCM revamp (#2836)
* Remove unused relaying XCM

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

* Revert lock

* Fix

* Broken example

* Introduce fee payment mechanics into XCM.

* Weight limitations on XCM execution

* Mock environment for tests and the first test

* Tests for XCM and a few refactors.

* Remove code that's not ready

* Fix for an XCM and an additional test

* Query response system

* 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

* Some build fixes

* Remove the Encode bounds sprayed around

* More faff

* Fix bounds amek use latest scale codec.

* remove println

* fixes

* Fix XcmExecutor Tests

* Fix XCM bounds using derivative crate

* Refactor names of XcmGeneric &c into Xcm

* Repot the xcm-executor into xcm-builder

* Docs

* Docs

* Fixes

* Update xcm/src/lib.rs

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

* Fixes

* Docs

* Update runtime/parachains/src/ump.rs

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

* Docs

* Fixes

* Fixes

* Fixes

* Docs

* Fixes

* Fixes

* Introduce transfer_asset specialisation.

* Fixes

* Fixes

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-04-07 22:38:29 +02:00
Andronik Ordian 1e4517800b fix failing test (#2844) 2021-04-07 16:22:04 +00:00
Shawn Tabrizi 45be2ac97e Relax Origin Checks in Registrar, Add Lock to Registration (#2808)
* Relax Origin Checks in Registrar

* fix tests

* Update runtime/common/src/paras_registrar.rs

* introduce para locks

* apply a lock after upgrade

* add test

* add lock when creating crowdloan
2021-04-07 15:16:35 +02:00
Robert Habermeier 251b6ca7bf remove WASM_MAGIC (#2832)
* remove WASM_MAGIC

* fix test warnings
2021-04-07 12:00:22 +03:00
stanly-johnson 15dfdd68c0 feat: Add poke to Crowdloan (#2807)
* feat: Add poke to Crowdloan

* fixes

* less hard-coded benchmark

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-04-04 18:01:49 +02:00
Shawn Tabrizi 995d89c237 Crowdloan Dissolve Requires All Funds Refunded (#2770)
* implement auto refund

* add back retiring @jacogr

* bump substrate dep

* trying to get to work

* fix tests

* fix benchmarks

* Update runtime/common/src/crowdloan.rs

* fix docs

* remove unused traits

* remove unused

* unused

* Update runtime/common/src/crowdloan.rs

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Update runtime/common/src/crowdloan.rs

* Update crowdloan.rs

* Update runtime/common/src/crowdloan.rs

* Update runtime/common/src/crowdloan.rs

Co-authored-by: Gavin Wood <gavin@parity.io>

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
2021-04-04 13:31:35 +00:00
Shawn Tabrizi 85693d6883 Create Macro for Implementing SlotRange (#2788)
* Macro for generating `SlotRange`

* remove test code

* refactor slots into crate

* add no_std flag

* finish macro

* make compile

* fix copyright date

* don't assume lease periods per slot

* Update runtime/common/Cargo.toml

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* fixes

* Update lib.rs

* tests

* Move consts into struct

* docs

* fix compile

* Apply suggestions from code review

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

* Update Cargo.lock

* Update runtime/common/src/slot_range.rs

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>

* fixes

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-04-04 13:11:37 +02:00
Gavin Wood a960e2ff6d Companion for OnSetCode #8496 (#2794)
* Make build with OnSetCode

* Fixes

* update Substrate

Co-authored-by: parity-processbot <>
2021-04-01 15:19:57 +02:00
Tomasz Drwięga 5b77a89874 Merkle Mountain Range & BEEFY integration (#2101)
* Switch branch.

* Implement basic MMR leaf.

* Revert "Switch branch."

This reverts commit 7f4d41c67f27ca560c53fc63fd3bd06ac182403c.

* Bump substrate.

* Integrate BEEFY.

Bump all.

Fix missing imports.

* Use beefy pallet to get authorities.

* Bump BEEFY repo.

* Use next authority set instead of the current one.

* Start BEEFY service.

* Fix BEEFY start up.

* Cache BEEFY authority set.

* Add BEEFY ValidatorSetId to MMR

* Fix code.

* Apply suggestions from code review

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

* Review grumbles.

* Update beefy repo.

* Work-around missing protocol.

* Revert "Work-around missing protocol."

This reverts commit 0a6257a8bccc1c67e966898cdedc408c6469ffd6.

* Add beefy peers set config.

* Expose storage of BEEFY.

* Uncompress BEEFY keys for merkle tree.

* Update ordering.

* Switch to branch.

* Bump deps.

* Switch to custom beefy.

* Add MMR RuntimeApi and custom rpc.

* Add set length details.

* Fix compilation.

* Expose MmrLeaf storage.

* Expose MmrLeaf storage.

* Don't use session handler, and rather compute & cache beefy details on call.

* Don't use session handler, and rather compute & cache beefy details on call.

* Fixes.

* Update Cargo.lock.

* Switch back to master.

* Update lockfile.

* Fix xcm print issue.

* Cargo.lock.

* Use master branch.

* Remove extra dep.

* Fix tests.

* Update Cargo.lock

* Add BEEFY & MMR to westend.

* Implement session keys migration.

* Update testnet script.

* start BEEFY for all node types

* Update Cargo.lock

* fix Cargo.toml

* resolve another merge conflict

* add Westend BEEFY keys

* Apply suggestions from code review

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Update BEEFY.

* Add Rococo BEEFY keys

* resolve merge issue

* fix pallet indices

* fix Westend OldSessionKey

* remove unused imports in Westend runtime

* Fix compilation for Westend.

* address review

* start BEEFY gadget conditionally

* address review again

* fix typo

* remove duplicate

* remove another duplicate

* well

* add missing stuff

* cleanup Cargo.toml files

- revert unnecessary changes
- add missing /std dependencies
- remove unused dependencies

* runtime: remove unused structs from rococo runtime

* node: cleanup service

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
Co-authored-by: adoerr <0xad@gmx.net>
Co-authored-by: André Silva <andrerfosilva@gmail.com>
2021-04-01 12:50:04 +02:00
Shawn Tabrizi 02166f4e0c Add Root Functions to Parachains System (#2777)
* Add Root functions to Paras

* note past code

* fix build

* fix test build

* compile fix and force_queue_action
2021-03-30 21:54:21 +02:00
Shawn Tabrizi 76db00f398 Add Many Sanity Checks to Crowdloans (#2745)
* Add many sanity checks to Crowdloans

* fix tests

* test contribution block in integration test

* fix rococo build

* remove leaser from crowdloans

* fix docs and terms

* fix compile
2021-03-29 16:52:55 +02:00
Shawn Tabrizi afc9bf8f25 Allow Non Intersecting Bids in Para Auction (#2741)
* Update auctions.rs

* Add integration test

* check that bid to another para requires new funds
2021-03-29 14:41:43 +02:00
Shawn Tabrizi a6fd8f78e6 Emit an Event for Random Block Selected in Auction (#2740)
* Update auctions.rs

* Update auctions.rs
2021-03-29 01:38:16 +02:00
Shawn Tabrizi 69c7c52de6 Handle Onboarding in Current Lease Period (#2731)
* Lease out current period and trigger onboard

* Add test for trigger_onboard

* patch and add benchmark

* finish benchmarks

* Use result instead of panic for test_registrar

* nits
2021-03-27 20:16:10 +00:00
Shawn Tabrizi 7f6ef6fb7b Introduce add_memo for Crowdloans (#2728)
* Add memo, but don't use it yet

* add_memo

* add weights

* Update lib.rs

* Update crowdloan.rs

* add event
2021-03-27 16:36:48 +00:00
Shawn Tabrizi b1e81a7fb0 Fix Crowdloan Withdraw Requirements (#2723)
* prevent crowdloan withdraw from being griefed

* Update crowdloan.rs

* Update runtime/common/src/crowdloan.rs

* Update runtime/common/src/crowdloan.rs
2021-03-27 12:06:29 +01:00