Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/release-02_create-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ jobs:
runtime: statemint
- category: assets
runtime: westmint
- category: collectives
runtime: collectives-polkadot
- category: contracts
runtime: contracts-rococo
- category: starters
Expand Down Expand Up @@ -148,6 +150,7 @@ jobs:
WESTMINT_DIGEST: ${{ github.workspace}}/westmint-srtool-json/westmint-srtool-digest.json
STATEMINE_DIGEST: ${{ github.workspace}}/statemine-srtool-json/statemine-srtool-digest.json
STATEMINT_DIGEST: ${{ github.workspace}}/statemint-srtool-json/statemint-srtool-digest.json
COLLECTIVES_POLKADOT_DIGEST: ${{ github.workspace}}/collectives-polkadot-srtool-json/collectives-polkadot-srtool-digest.json
ROCOCO_PARA_DIGEST: ${{ github.workspace}}/rococo-parachain-srtool-json/rococo-parachain-srtool-digest.json
CANVAS_KUSAMA_DIGEST: ${{ github.workspace}}/contracts-rococo-srtool-json/contracts-rococo-srtool-digest.json
REF1: ${{ github.event.inputs.ref1 }}
Expand All @@ -162,6 +165,7 @@ jobs:
ls -al $WESTMINT_DIGEST || true
ls -al $STATEMINE_DIGEST || true
ls -al $STATEMINT_DIGEST || true
ls -al $COLLECTIVES_POLKADOT_DIGEST || true
ls -al $ROCOCO_PARA_DIGEST || true
ls -al $CANVAS_KUSAMA_DIGEST || true
fi
Expand Down Expand Up @@ -212,6 +216,8 @@ jobs:
runtime: statemint
- category: assets
runtime: westmint
- category: collectives
runtime: collectives-polkadot
- category: contracts
runtime: contracts-rococo
- category: starters
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/srtool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
runtime: statemint
- category: assets
runtime: westmint
- category: collectives
runtime: collectives-polkadot
- category: contracts
runtime: contracts-rococo
- category: starters
Expand Down
84 changes: 84 additions & 0 deletions parachains/chain-specs/collectives-polkadot.json

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions parachains/chain-specs/collectives-westend.json

Large diffs are not rendered by default.

40 changes: 24 additions & 16 deletions polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum Runtime {
Westmint,
ContractsRococo,
CollectivesPolkadot,
CollectivesWestend,
}

trait ChainType {
Expand Down Expand Up @@ -89,6 +90,8 @@ fn runtime(id: &str) -> Runtime {
Runtime::ContractsRococo
} else if id.starts_with("collectives-polkadot") {
Runtime::CollectivesPolkadot
} else if id.starts_with("collectives-westend") {
Runtime::CollectivesWestend
} else {
Runtime::Generic
}
Expand Down Expand Up @@ -143,10 +146,13 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
Box::new(chain_spec::collectives::collectives_polkadot_development_config()),
"collectives-polkadot-local" =>
Box::new(chain_spec::collectives::collectives_polkadot_local_config()),
/* TODO:COLLECTIVES
"collectives-polkadot" =>
Box::new(chain_spec::collectives::collectives_polkadot_config()),
*/
"collectives-polkadot" => Box::new(chain_spec::ChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/collectives-polkadot.json")[..],
)?),
"collectives-westend" => Box::new(chain_spec::ChainSpec::from_json_bytes(
&include_bytes!("../../parachains/chain-specs/collectives-westend.json")[..],
)?),

// -- Contracts on Rococo
"contracts-rococo-dev" =>
Box::new(chain_spec::contracts::contracts_rococo_development_config()),
Expand All @@ -172,7 +178,7 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
),
Runtime::Westmint =>
Box::new(chain_spec::statemint::WestmintChainSpec::from_json_file(path.into())?),
Runtime::CollectivesPolkadot =>
Runtime::CollectivesPolkadot | Runtime::CollectivesWestend =>
Box::new(chain_spec::collectives::CollectivesPolkadotChainSpec::from_json_file(
path.into(),
)?),
Expand Down Expand Up @@ -229,7 +235,8 @@ impl SubstrateCli for Cli {
Runtime::Statemint => &statemint_runtime::VERSION,
Runtime::Statemine => &statemine_runtime::VERSION,
Runtime::Westmint => &westmint_runtime::VERSION,
Runtime::CollectivesPolkadot => &collectives_polkadot_runtime::VERSION,
Runtime::CollectivesPolkadot | Runtime::CollectivesWestend =>
&collectives_polkadot_runtime::VERSION,
Runtime::Shell => &shell_runtime::VERSION,
Runtime::Seedling => &seedling_runtime::VERSION,
Runtime::ContractsRococo => &contracts_rococo_runtime::VERSION,
Expand Down Expand Up @@ -304,7 +311,7 @@ macro_rules! construct_benchmark_partials {
)?;
$code
},
Runtime::CollectivesPolkadot => {
Runtime::CollectivesPolkadot | Runtime::CollectivesWestend => {
let $partials = new_partial::<collectives_polkadot_runtime::RuntimeApi, _>(
&$config,
crate::service::aura_build_import_queue::<_, AuraId>,
Expand Down Expand Up @@ -350,7 +357,7 @@ macro_rules! construct_async_run {
{ $( $code )* }.map(|v| (v, task_manager))
})
},
Runtime::CollectivesPolkadot => {
Runtime::CollectivesPolkadot | Runtime::CollectivesWestend => {
runner.async_run(|$config| {
let $components = new_partial::<collectives_polkadot_runtime::RuntimeApi, _>(
&$config,
Expand Down Expand Up @@ -488,7 +495,7 @@ pub fn run() -> Result<()> {
Runtime::Westmint => cmd.run::<Block, WestmintRuntimeExecutor>(config),
Runtime::Statemint =>
cmd.run::<Block, StatemintRuntimeExecutor>(config),
Runtime::CollectivesPolkadot =>
Runtime::CollectivesPolkadot | Runtime::CollectivesWestend =>
cmd.run::<Block, CollectivesPolkadotRuntimeExecutor>(config),
_ => Err(format!(
"Chain '{:?}' doesn't support benchmarking",
Expand Down Expand Up @@ -536,12 +543,13 @@ pub fn run() -> Result<()> {
Runtime::Statemint => runner.async_run(|config| {
Ok((cmd.run::<Block, StatemintRuntimeExecutor>(config), task_manager))
}),
Runtime::CollectivesPolkadot => runner.async_run(|config| {
Ok((
cmd.run::<Block, CollectivesPolkadotRuntimeExecutor>(config),
task_manager,
))
}),
Runtime::CollectivesPolkadot | Runtime::CollectivesWestend =>
runner.async_run(|config| {
Ok((
cmd.run::<Block, CollectivesPolkadotRuntimeExecutor>(config),
task_manager,
))
}),
Runtime::Shell => runner.async_run(|config| {
Ok((cmd.run::<Block, ShellRuntimeExecutor>(config), task_manager))
}),
Expand Down Expand Up @@ -621,7 +629,7 @@ pub fn run() -> Result<()> {
.await
.map(|r| r.0)
.map_err(Into::into),
Runtime::CollectivesPolkadot =>
Runtime::CollectivesPolkadot | Runtime::CollectivesWestend =>
crate::service::start_generic_aura_node::<
collectives_polkadot_runtime::RuntimeApi,
AuraId,
Expand Down