Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Polkadot and Cumulus runtimes #1

Merged
merged 1,915 commits into from
Mar 23, 2023
Merged

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Mar 1, 2023

This merge request imports the runtime files from Polkadot and Cumulus.
The original setup imports (70598a19e5, 2c3cd0270). Then as a sync-up commit is applied to latest master (79b0d6e31a, 710fee562c3).

The reasoning for not directly deleting the copied files from Polkadot/Cumulus is to give the CI team some time ahead to set everything up. Once this happened we can make a clear cut and remove the code from the other repos and switch the dependencies over.

Status: Please review the following

  • All commits from the Polkadot and Cumulus repo are present for all files. Note that the hashes will not match.
  • Compiles successfully & tests work.
  • Workspace dependencies are referenced via path, not git or crates.

You can check the commit history of a file with:

git log --no-merges -M --oneline --follow -- system-parachains/runtimes/asset-hubs/assets-hub-kusama/src/lib.rs

Folder structure:

.
├── relay
│   ├── common
│   │   ├── slot_range_helper
│   │   │   └── src
│   │   └── src
│   │       ├── crowdloan
│   │       └── slots
│   └── runtimes
│       ├── kusama
│       │   ├── constants
│       │   └── src
│       ├── metrics
│       │   └── src
│       ├── parachains
│       │   └── src
│       ├── polkadot
│       │   ├── constants
│       │   └── src
│       └── test-runtime
│           ├── constants
│           └── src
└── system-parachains
    ├── common
    │   ├── pallets
    │   │   └── collator-selection
    │   └── src
    ├── integration-tests
    │   ├── collectives
    │   │   ├── 0_xcm
    │   │   └── 1_alliance
    │   ├── statemine
    │   │   └── xcm
    │   └── statemint
    │       └── xcm
    └── runtimes
        ├── asset-hubs
        │   ├── assets-hub-kusama
        │   ├── assets-hub-polkadot
        │   └── common
        ├── bridge-hubs
        │   ├── bridge-hub-kusama
        │   └── bridge-hub-polkadot
        └── collectives
            └── collectives-polkadot

TODOS:

  • Review Cargo.toml
    • License
    • Authors
    • Version

Kailai-Wang and others added 30 commits October 3, 2022 13:00
* First bits

* Create new origins

* Repot governance configs

* Tests for treasury spends

* Integrate treasury spend threshold origins

* Bump deps

* Add whitelist, configure treasury spend origins

* Add governance curves

* Enable curve's ceil to be configured

* Make compile

* Rest of new governance params

* Build fixes

* Fixes

* Fix warning

* Use new EnsureOrigin::try_successful_origin

* Some repotting

* Add files

* Ready for initial review

* Fixes

* Formatting

* Bump

* rename

* Derive MEL for Origin enum

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add benchmarks

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_conviction_voting

* Update Cargo.lock

* Update runtime/kusama/src/governance/origins.rs

Co-authored-by: Xiliang Chen <[email protected]>

* allow root to demote and promote, fixing benchmarks

* fix whitelist origin benchmarks

* typo

* cargo update -p sp-io

* add second referenda instance to benchmarks

* allow root to act as a 9th dan in track

* feature flag it

* cargo update -p sp-io

* fix merge

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_referenda

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_conviction_voting

* allow root to create auction

* Update mod.rs

* more origin fixes

* root isnt needed actually

* cargo update -p sp-io

* allow root to cancel slash

* initial stuff

* make copy data from kusama

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_referenda

* Update Cargo.lock

* commit new weight files

* more files

* use weight files

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_referenda

* Update Cargo.lock

* Update to latest master

* Formatting

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_ranked_collective

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_conviction_voting

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_conviction_voting

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_whitelist

* Rename Origin -> RuntimeOrigin

This was done in Substrate and is now needed here as well.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Tech Committee can promote to VI Dan

* Update runtime/kusama/src/governance/mod.rs

Co-authored-by: Amar Singh <[email protected]>

* Formatting

* Update runtime/kusama/src/governance/fellowship.rs

Co-authored-by: Amar Singh <[email protected]>

* Fixes

* Avoid updating extraneous deps

* Fix broken stuff

* ".git/.scripts/bench-bot.sh" runtime kusama-dev pallet_referenda

* Update runtime/kusama/src/governance/fellowship.rs

* Reorder EitherOf origins

Zero logic change to make the benchmarking work.
It uses the first successful origin which can only promote to rank 6.
By swapping the order we use Root which can always promote.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Revert param change and update doc

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: command-bot <>
Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: Xiliang Chen <[email protected]>
Co-authored-by: Keith Yeung <[email protected]>
Co-authored-by: Amar Singh <[email protected]>
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](servo/rust-smallvec@v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* beefy-mmr: Simplify hashing

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
* Create migration for config pallet

* Use XcmWeight in XCM pallet extrinsics

* Link to PR in doc comment

* cargo fmt

* Fix tests

* Fix tests

* Remove unused import

* Update runtime/parachains/src/configuration/migration.rs

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* Add missing on_runtime_upgrade implementation

* Use new migration API

* cargo fmt

* Fix log message

Co-authored-by: Oliver Tale-Yazdi <[email protected]>
* Remove `ContractAccessWeight`

* update lockfile for {"polkadot", "substrate"}

* update lockfile for {"substrate", "polkadot"}

Co-authored-by: parity-processbot <>
* Fixes

* Clear out old weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Resolve merges

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix weight traits

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* polkadot runtime: Clippy

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* rococo runtime: update pallet configs

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add preimage migration

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add all migrations

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Democracy is not on Westend

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* [Migration] Refund stored multisig calls (#6075)

* Add Preimages to referenda config

Needed since Gov V2 just merged.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add multisig migration to Westend+Rococo

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Fix Executive syntax

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Bump Substrate

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: parity-processbot <>
Co-authored-by: Roman Useinov <[email protected]>
* Adapt to new contracts runtime api

* Compile fix

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: parity-processbot <>
* update multiplier

* fix

* update lockfile for {"substrate"}

* fmt

* fix typo

Co-authored-by: parity-processbot <>
* Update following `pallet-vesting` configurable `WithdrawReasons`

* Update lib.rs

* Update lib.rs

* Update lib.rs

* update lockfile for {"substrate"}

* fix warning

Co-authored-by: Shawn Tabrizi <[email protected]>
Co-authored-by: parity-processbot <>
* Migrate Weights properly to v2

* Add missing on_runtime_upgrade implementation

* Fix benchmarks

* Apply suggestions from code review

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* cargo fmt

Co-authored-by: Oliver Tale-Yazdi <[email protected]>
* remove para lock check for now

* fmt

* manual para lock

* expose schedule_code_upgrade and set_current_head

* extrinsics and benchmarks

* use zero

* add weights

* fix variable name

* add and fix comments

* fix weights

* add back default lock

Co-authored-by: parity-processbot <>
* pallet-mmr: RPC API works with block numbers

* small fix

* update

* change types

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
* add force_open_hrmp_channel call

* typo

* fix benchmark

* Add HRMP benches to Polkadot

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* add benchmark data

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
* Reduce session for contracts to 10 minutes

* Build pallet-contracts with unstable interface

* Set `MinCandidates` to 0 to allow only invulnerables as collators
* make it work

* add migration

* fix

* Update utils/staking-miner/src/opts.rs

Co-authored-by: Niklas Adolfsson <[email protected]>

* Update utils/staking-miner/src/monitor.rs

* small tweaks

* Update utils/staking-miner/src/opts.rs

Co-authored-by: Bastian Köcher <[email protected]>

* fmt

* fix print'

* fmt

* update lockfile for {"substrate"}

Co-authored-by: Niklas Adolfsson <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: parity-processbot <>
* Add try-runtime feature

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* More feature gates

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add dummy command

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* update lockfile for {"polkadot", "substrate"}

* Fix code

* Remove unused import

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Imports...

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* fmt

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: parity-processbot <>
* Bump spec_version to 9310

* bump transaction_version (0.9.31) (#6171)

* Bump transaction_version for polkadot

* Bump transaction_version for kusama

* Bump transaction_version for rococo

* Bump transaction_version for westend

* Bump transaction_version for polkadot

* Bump transaction_version for kusama

* Bump transaction_version for rococo

* Bump transaction_version for westend

* Bump crate versions (0.9.31)
* Fix for issue #2403

* Nightly fmt

* Quick documentation fixes

* Default Implementation

* iter() function integrated

* Implemented iter functionalities

* Fmt

* small change

* updates node-network

* updates in dispute-coordinator

* Updates

* benchmarking fix

* minor fix

* test fixes in runtime api

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* Removal of [index], shorting of FromIterator, Renaming of GroupValidators to ValidatorGroups

* Removal of ops import

* documentation fixes for spell check

* implementation of generic type

* Refactoring

* Test and documentation fixes

* minor test fix

* minor test fix

* minor test fix

* Update node/network/statement-distribution/src/lib.rs

Co-authored-by: Andronik <[email protected]>

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* removed IterMut

* Update node/core/dispute-coordinator/src/import.rs

Co-authored-by: Andronik <[email protected]>

* Update node/core/dispute-coordinator/src/initialized.rs

Co-authored-by: Andronik <[email protected]>

* Update primitives/src/v2/mod.rs

Co-authored-by: Andronik <[email protected]>

* fmt

* IterMut

* documentation update

Co-authored-by: Andronik <[email protected]>

* minor adjustments and new TypeIndex trait

* spelling fix

* TypeIndex fix

Co-authored-by: Andronik <[email protected]>
* Adapt to new pallet contracts API

* Fix

* Fix runtime APIs

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: parity-processbot <>
* u16 -> u32

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
* u16 -> u32

* update lockfile for {"polkadot", "substrate"}

Co-authored-by: parity-processbot <>
* Typo

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add multisig weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Update multisig weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* update lockfile for {"substrate"}

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: parity-processbot <>
* Typo

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* Add multisig weights

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* cargo update -p polkadot-runtime-common

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
* [Companion] StakingInterface adjustments

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
Bumps [scale-info](https://github.com/paritytech/scale-info) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/paritytech/scale-info/releases)
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/paritytech/scale-info/commits/v2.3.0)

---
updated-dependencies:
- dependency-name: scale-info
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Replace parachain/parathread boolean by enum

* Address PR comments

* Update dependencies

* ParaType -> ParaKind

* Swap enum field order to avoid migration

* Rename paratype field to parakind

* Manual en-/decocing of Parakind

* Manual TypeInfo for ParaKind

* rename field back to parachain

* minor

* Update runtime/parachains/src/paras/mod.rs

Co-authored-by: Andrei Sandu <[email protected]>

* Manual serde Serialize and Deserialize for ParaKind

* cargo fmt

* Update runtime/parachains/src/paras/mod.rs

Co-authored-by: Andronik <[email protected]>

* Add test for serde_json encoding/decoding

* Move serde_json dep to dev-deps

Co-authored-by: Andrei Sandu <[email protected]>
Co-authored-by: Andronik <[email protected]>
* kusama: clean up executed migrations

* polkadot: clean up executed migrations

* westend: clean up executed migrations
ggwpez added 3 commits March 15, 2023 12:37
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Add a workspace Cargo.toml and reference all external dependencies as
'git' and all internals as 'path'.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
niklasad1 and others added 4 commits March 15, 2023 14:34
* companion for #13555

* update lockfile for {"substrate"}

* fix: `decl_TryRuntime` -> `decl_for_try_runtime`

---------

Co-authored-by: parity-processbot <>
* migrate to pools v4

* update types + weights

* rm BlockNumberToU32

* fmt

* fix

* update weights

* fix RocksDbWeight

* fix function name

* weights

* use 1 weight format

* update claim payout weights

* + as u64

* fix rebase + fmt

* add weights

* more weights

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime kusama-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime westend-dev pallet_nomination_pools

* fix

* fix

* ".git/.scripts/commands/bench/bench.sh" runtime polkadot-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime westend-dev pallet_nomination_pools

* ".git/.scripts/commands/bench/bench.sh" runtime kusama-dev pallet_nomination_pools

* add InitialGlobalMaxCommission

* revert

* global max commission migration generic

* remove StakingMigrationV11OldPallet

* initial global max commission

* adjust global max

* update lockfile for {"substrate"}

* Use master lock file

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <[email protected]>

---------

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
* runtime: Adjust `sp_api::Metadata` to the new API

Signed-off-by: Alexandru Vasile <[email protected]>

* update lockfile for {"substrate"}

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: parity-processbot <>
Cargo.toml Show resolved Hide resolved
lexnv and others added 12 commits March 15, 2023 19:22
* parachains: Adjust `sp_api::Metadata` to the new API

Signed-off-by: Alexandru Vasile <[email protected]>

* parachains: Implement new Metadata trait for bridge/polkadot

Signed-off-by: Alexandru Vasile <[email protected]>

* update lockfile for {"substrate", "polkadot"}

---------

Signed-off-by: Alexandru Vasile <[email protected]>
Co-authored-by: parity-processbot <>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Add a workspace Cargo.toml and reference all external dependencies as
'git' and all internals as 'path'.

Signed-off-by: Oliver Tale-Yazdi <[email protected]>
This reverts commit ccd918a.
Will be subsumed into the following "Sync" commit.
This reverts commit fb19e75.
Will be subsumed into the following "Sync" commit.
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
Cargo.toml Outdated Show resolved Hide resolved
Signed-off-by: Oliver Tale-Yazdi <[email protected]>
@bkchr bkchr merged commit 82bd4e4 into polkadot-fellows:main Mar 23, 2023
ggwpez pushed a commit that referenced this pull request Mar 30, 2023
…event (#6937)

* Limit disputes weight and remove initializer code

Signed-off-by: Andrei Sandu <[email protected]>

* const

Signed-off-by: Andrei Sandu <[email protected]>

* remove timeout test

Signed-off-by: Andrei Sandu <[email protected]>

* review feedback #1

Signed-off-by: Andrei Sandu <[email protected]>

* Remove the new weight limiting for disputes

Signed-off-by: Andrei Sandu <[email protected]>

* cargo lock

Signed-off-by: Andrei Sandu <[email protected]>

* Remove dispute_conclusion_by_time_out_period

Signed-off-by: Andrei Sandu <[email protected]>

* Enable migrations

Signed-off-by: Andrei Sandu <[email protected]>

* Update guide

Signed-off-by: Andrei Sandu <[email protected]>

* Fix comment

Signed-off-by: Andrei Sandu <[email protected]>

* More guide fixes

Signed-off-by: Andrei Sandu <[email protected]>

* Also migrate pending configs

Signed-off-by: Andrei Sandu <[email protected]>

* fix build

Signed-off-by: Andrei Sandu <[email protected]>

* fix test

Signed-off-by: Andrei Sandu <[email protected]>

---------

Signed-off-by: Andrei Sandu <[email protected]>
@ggwpez ggwpez deleted the oty-init branch June 12, 2023 12:17
bkchr pushed a commit that referenced this pull request Jul 14, 2023
…event (#6937)

* Limit disputes weight and remove initializer code

Signed-off-by: Andrei Sandu <[email protected]>

* const

Signed-off-by: Andrei Sandu <[email protected]>

* remove timeout test

Signed-off-by: Andrei Sandu <[email protected]>

* review feedback #1

Signed-off-by: Andrei Sandu <[email protected]>

* Remove the new weight limiting for disputes

Signed-off-by: Andrei Sandu <[email protected]>

* cargo lock

Signed-off-by: Andrei Sandu <[email protected]>

* Remove dispute_conclusion_by_time_out_period

Signed-off-by: Andrei Sandu <[email protected]>

* Enable migrations

Signed-off-by: Andrei Sandu <[email protected]>

* Update guide

Signed-off-by: Andrei Sandu <[email protected]>

* Fix comment

Signed-off-by: Andrei Sandu <[email protected]>

* More guide fixes

Signed-off-by: Andrei Sandu <[email protected]>

* Also migrate pending configs

Signed-off-by: Andrei Sandu <[email protected]>

* fix build

Signed-off-by: Andrei Sandu <[email protected]>

* fix test

Signed-off-by: Andrei Sandu <[email protected]>

---------

Signed-off-by: Andrei Sandu <[email protected]>
liamaharon pushed a commit to liamaharon/runtimes that referenced this pull request Dec 14, 2023
…or-runtime-benchmarks

Add runtime-benchmarks feature to chain spec generator
antonva pushed a commit to antonva/runtimes that referenced this pull request Feb 16, 2024
Replace deprecated CurrencyAdapter with FungibleAdapter
Ank4n pushed a commit to Ank4n/runtimes that referenced this pull request Nov 6, 2024
polkadot-fellows#1)

* Revert "wip(workspace): disable Encointer"

This reverts commit 0450dd2.

* bump encointer deps

* [encointer] add non_authority_keys to session genesis config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.