-
Notifications
You must be signed in to change notification settings - Fork 16
Added check-runtime to CI #404
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
Draft
antkve
wants to merge
10
commits into
main
Choose a base branch
from
ak-ci-add-check-runtime
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+215
−75
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2fb89ba
Moved to new runtime constructions
antkve 96d87d8
Update runtimes/bulletin-westend/src/lib.rs
antkve 5d3bf3f
Merge branch 'main' into ak-construct-runtime
karolk91 95f9c41
Added check-runtime step to bulletin CI
antkve e6f6c78
Fixed metadata hash issue
antkve f3dfd9d
Limited check-runtime to westend
antkve 9e719f8
Added comment
antkve 65f3441
Update .github/workflows/check-runtime-migration.yml
antkve 36b1900
Merge branch 'main' into ak-ci-add-check-runtime
antkve 95c8bbd
Merge branch 'main' into ak-ci-add-check-runtime
antkve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| #![cfg_attr(not(feature = "std"), no_std)] | ||
| // `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256. | ||
| #![recursion_limit = "256"] | ||
|
|
||
| extern crate alloc; | ||
|
|
@@ -40,8 +39,12 @@ use sp_runtime::{ | |
| use sp_version::NativeVersion; | ||
| use sp_version::RuntimeVersion; | ||
|
|
||
| use frame_support::{ | ||
| dispatch::GetDispatchInfo, | ||
| genesis_builder_helper::{build_state, get_preset}, | ||
| }; | ||
| pub use frame_support::{ | ||
| construct_runtime, parameter_types, | ||
| parameter_types, | ||
| traits::{ | ||
| ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, Get, KeyOwnerProofSystem, OriginTrait, | ||
| Randomness, StorageInfo, | ||
|
|
@@ -54,10 +57,6 @@ pub use frame_support::{ | |
| }, | ||
| StorageValue, | ||
| }; | ||
| use frame_support::{ | ||
| dispatch::GetDispatchInfo, | ||
| genesis_builder_helper::{build_state, get_preset}, | ||
| }; | ||
| pub use frame_system::Call as SystemCall; | ||
| pub use pallet_timestamp::Call as TimestampCall; | ||
|
|
||
|
|
@@ -558,35 +557,66 @@ where | |
| } | ||
| } | ||
|
|
||
| construct_runtime!( | ||
| pub struct Runtime { | ||
| System: frame_system = 0, | ||
| // Babe must be called before Session | ||
| Babe: pallet_babe = 1, | ||
| Timestamp: pallet_timestamp = 2, | ||
| Utility: pallet_utility = 3, | ||
| // Authorship must be before session in order to note author in the correct session. | ||
| Authorship: pallet_authorship = 10, | ||
| Offences: pallet_offences = 11, | ||
| Historical: pallet_session::historical = 12, | ||
| ValidatorSet: pallet_validator_set = 13, | ||
| Session: pallet_session = 14, | ||
| Grandpa: pallet_grandpa = 15, | ||
|
|
||
| // Storage | ||
| TransactionStorage: pallet_transaction_storage = 40, | ||
|
|
||
| // Bridge | ||
| RelayerSet: pallet_relayer_set = 50, | ||
| BridgePolkadotGrandpa: pallet_bridge_grandpa = 51, | ||
| BridgePolkadotParachains: pallet_bridge_parachains = 52, | ||
| BridgePolkadotMessages: pallet_bridge_messages = 53, | ||
|
|
||
| // Local Root | ||
| Sudo: pallet_sudo = 61, | ||
| Proxy: pallet_proxy = 62, | ||
| } | ||
| ); | ||
| #[frame_support::runtime(legacy_ordering)] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @antkve we don't need to modify bulletin-polkadot solochain runtime, it will be remove soon |
||
| mod runtime { | ||
| #[runtime::runtime] | ||
| #[runtime::derive( | ||
| RuntimeCall, | ||
| RuntimeEvent, | ||
| RuntimeError, | ||
| RuntimeOrigin, | ||
| RuntimeTask, | ||
| RuntimeFreezeReason, | ||
| RuntimeHoldReason, | ||
| RuntimeSlashReason, | ||
| RuntimeLockId, | ||
| RuntimeViewFunction | ||
| )] | ||
| pub struct Runtime; | ||
|
|
||
| #[runtime::pallet_index(0)] | ||
| pub type System = frame_system; | ||
| // Babe must be called before Session | ||
| #[runtime::pallet_index(1)] | ||
| pub type Babe = pallet_babe; | ||
| #[runtime::pallet_index(2)] | ||
| pub type Timestamp = pallet_timestamp; | ||
| #[runtime::pallet_index(3)] | ||
| pub type Utility = pallet_utility; | ||
| // Authorship must be before session in order to note author in the correct session. | ||
| #[runtime::pallet_index(10)] | ||
| pub type Authorship = pallet_authorship; | ||
| #[runtime::pallet_index(11)] | ||
| pub type Offences = pallet_offences; | ||
| #[runtime::pallet_index(12)] | ||
| pub type Historical = pallet_session::historical; | ||
| #[runtime::pallet_index(13)] | ||
| pub type ValidatorSet = pallet_validator_set; | ||
| #[runtime::pallet_index(14)] | ||
| pub type Session = pallet_session; | ||
| #[runtime::pallet_index(15)] | ||
| pub type Grandpa = pallet_grandpa; | ||
|
|
||
| // Storage | ||
| #[runtime::pallet_index(40)] | ||
| pub type TransactionStorage = pallet_transaction_storage; | ||
|
|
||
| // Bridge | ||
| #[runtime::pallet_index(50)] | ||
| pub type RelayerSet = pallet_relayer_set; | ||
| #[runtime::pallet_index(51)] | ||
| pub type BridgePolkadotGrandpa = pallet_bridge_grandpa; | ||
| #[runtime::pallet_index(52)] | ||
| pub type BridgePolkadotParachains = pallet_bridge_parachains; | ||
| #[runtime::pallet_index(53)] | ||
| pub type BridgePolkadotMessages = pallet_bridge_messages; | ||
|
|
||
| // Local Root | ||
| #[runtime::pallet_index(61)] | ||
| pub type Sudo = pallet_sudo; | ||
| #[runtime::pallet_index(62)] | ||
| pub type Proxy = pallet_proxy; | ||
| } | ||
|
|
||
| /// The address format for describing accounts. | ||
| pub type Address = sp_runtime::MultiAddress<AccountId, ()>; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antkve please, add here some specific/short desc what
@polkadot-api/check-runtime@latestis really checking