-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added support for coretime-kusama/polkadot and people-kusama/polkadot #3961
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
Changes from 3 commits
2eec00d
2349ee0
778f385
d1e1a26
d20140d
9398a07
148ced8
515b31e
9aeabc9
c7dbfa8
a95bab8
39274bb
cff49c6
22f8f1a
35a7330
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "name": "Polkadot Coretime", | ||
| "id": "coretime-polkadot" | ||
bkontur marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "chainType": "Live", | ||
| "todo": "generate chain spec" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "name": "Kusama People", | ||
| "id": "people-kusama", | ||
| "chainType": "Live", | ||
| "todo": "generate chain spec" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "name": "Polkadot People", | ||
| "id": "people-polkadot", | ||
| "chainType": "Live", | ||
| "todo": "generate chain spec" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../parachains/chain-specs/coretime-kusama.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../parachains/chain-specs/coretime-polkadot.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../parachains/chain-specs/people-kusama.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../../parachains/chain-specs/people-polkadot.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,10 @@ use std::str::FromStr; | |
| /// Collects all supported People configurations. | ||
| #[derive(Debug, PartialEq)] | ||
| pub enum PeopleRuntimeType { | ||
| Kusama, | ||
| KusamaLocal, | ||
|
Member
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. We should not include the local variants. If people need them, they need to create the chain specs themselves. Most of the time you want for the local variants any way the latest code.
Contributor
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. Don't the benchmark scripts use local?
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. Well, I just remember @serban300's PR where he had to add this local variants to be able run fellows zombienet tests for BridgeHubKusama/BridgeHubPolkadot. We don't provide chain-specs for local variants here as I explained bellow: #3961 (comment). These local variants are needed for parsing I think,
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. We can improve and refactor whatever way, but let's continue here #3944 or is there any other issue?
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.
I think you need just chain-spec for benchmarks, e.g for fellows benchmarks, I just needed I didn't try to run benchmarks with |
||
| Polkadot, | ||
| PolkadotLocal, | ||
| Rococo, | ||
| RococoLocal, | ||
| RococoDevelopment, | ||
|
|
@@ -36,6 +40,10 @@ impl FromStr for PeopleRuntimeType { | |
|
|
||
| fn from_str(value: &str) -> Result<Self, Self::Err> { | ||
| match value { | ||
| kusama::PEOPLE_KUSAMA => Ok(PeopleRuntimeType::Kusama), | ||
| kusama::PEOPLE_KUSAMA_LOCAL => Ok(PeopleRuntimeType::KusamaLocal), | ||
| polkadot::PEOPLE_POLKADOT => Ok(PeopleRuntimeType::Polkadot), | ||
| polkadot::PEOPLE_POLKADOT_LOCAL => Ok(PeopleRuntimeType::PolkadotLocal), | ||
| rococo::PEOPLE_ROCOCO => Ok(PeopleRuntimeType::Rococo), | ||
| rococo::PEOPLE_ROCOCO_LOCAL => Ok(PeopleRuntimeType::RococoLocal), | ||
| rococo::PEOPLE_ROCOCO_DEVELOPMENT => Ok(PeopleRuntimeType::RococoDevelopment), | ||
|
|
@@ -52,6 +60,12 @@ impl PeopleRuntimeType { | |
|
|
||
| pub fn load_config(&self) -> Result<Box<dyn ChainSpec>, String> { | ||
| match self { | ||
| PeopleRuntimeType::Kusama => Ok(Box::new(GenericChainSpec::from_json_bytes( | ||
| &include_bytes!("../../chain-specs/people-kusama.json")[..], | ||
| )?)), | ||
| PeopleRuntimeType::Polkadot => Ok(Box::new(GenericChainSpec::from_json_bytes( | ||
| &include_bytes!("../../chain-specs/people-polkadot.json")[..], | ||
| )?)), | ||
| PeopleRuntimeType::Rococo => Ok(Box::new(GenericChainSpec::from_json_bytes( | ||
| &include_bytes!("../../chain-specs/people-rococo.json")[..], | ||
| )?)), | ||
|
|
@@ -82,6 +96,10 @@ impl PeopleRuntimeType { | |
| "westend-development", | ||
| ParaId::new(1004), | ||
| ))), | ||
| other => Err(std::format!( | ||
| "No default config present for {:?}, you should provide a chain-spec as json file!", | ||
seadanda marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| other | ||
| )), | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -318,3 +336,13 @@ pub mod westend { | |
| }) | ||
| } | ||
| } | ||
|
|
||
| pub mod kusama { | ||
| pub(crate) const PEOPLE_KUSAMA: &str = "people-kusama"; | ||
| pub(crate) const PEOPLE_KUSAMA_LOCAL: &str = "people-kusama-local"; | ||
| } | ||
|
|
||
| pub mod polkadot { | ||
| pub(crate) const PEOPLE_POLKADOT: &str = "people-polkadot"; | ||
| pub(crate) const PEOPLE_POLKADOT_LOCAL: &str = "people-polkadot-local"; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| title: Added support for coretime-kusama/polkadot and people-kusama/polkadot | ||
|
|
||
| doc: | ||
| - audience: Node Operator | ||
| description: | | ||
| The support for running `coretime-kusama` and `people-kusama` collators with `polkadot-parachain-bin` have been added. | ||
|
|
||
| crates: | ||
| - name: polkadot-parachain-bin | ||
| bump: minor |
Uh oh!
There was an error while loading. Please reload this page.