This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 369
chain-spec: support for json config/patch (and GenesisBuilder API)
#2936
Open
michalkucharczyk
wants to merge
18
commits into
master
Choose a base branch
from
mku-chain-spec-support-for-genesis-builder-api
base: master
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.
Open
Changes from 9 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e52d278
ChainSpec: code moved from pallet_system to ChainSpec
michalkucharczyk 2241a03
Merge remote-tracking branch 'origin/master' into mku-chain-spec-supp…
0a216fe
Cargo.lock updated
michalkucharczyk 3855d9a
Merge remote-tracking branch 'origin/master' into mku-chain-spec-supp…
michalkucharczyk 3ea02db
ChainSpec: code moved from pallet_system to ChainSpec (FIX)
michalkucharczyk f70bc26
json_vs_legacy_tests: tests for json-based ChainSpecs added
michalkucharczyk 49ce346
parachains/runtimes: GenesisBuilder API implemented
michalkucharczyk 41916ff
chain-specs: RuntimeGenesisConfig removed, JSON patches added
michalkucharczyk 82fb8b3
dead code allowed for legacy tests
michalkucharczyk 44eff2d
Merge remote-tracking branch 'origin/master' into mku-chain-spec-supp…
9c32c33
Merge remote-tracking branch 'origin/master' into mku-chain-spec-supp…
michalkucharczyk 79baf70
parachains: missing sp-genesis-builder/std added for std feature
michalkucharczyk 1b2a67e
parachain-template: GenesisBuilder implemented + JSON patch in ChainSpec
michalkucharczyk 544dd82
removed RuntimeGenesisConfig from ChainSpec definition
michalkucharczyk 2b753a7
Merge remote-tracking branch 'origin/master' into mku-chain-spec-supp…
d2a7497
some docs for legacy tests added
michalkucharczyk 56515c5
fmt
michalkucharczyk 5c8631e
integration-tests: storages building migrated to GenesisConfig JSON p…
michalkucharczyk 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
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 |
|---|---|---|
|
|
@@ -51,6 +51,7 @@ use constants::{currency::*, fee::WeightToFee}; | |
| use frame_support::{ | ||
| construct_runtime, | ||
| dispatch::DispatchClass, | ||
| genesis_builder_helper::{build_config, create_default_config}, | ||
| parameter_types, | ||
| traits::{ | ||
| AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, | ||
|
|
@@ -1229,6 +1230,16 @@ impl_runtime_apis! { | |
| Ok(batches) | ||
| } | ||
| } | ||
|
|
||
| impl sp_genesis_builder::GenesisBuilder<Block> for Runtime { | ||
|
Contributor
Author
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. Do we need |
||
| fn create_default_config() -> Vec<u8> { | ||
| create_default_config::<RuntimeGenesisConfig>() | ||
| } | ||
|
|
||
| fn build_config(config: Vec<u8>) -> sp_genesis_builder::Result { | ||
| build_config::<RuntimeGenesisConfig>(config) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| struct CheckInherents; | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.