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

Polkadot V1.6.0 #1310

Merged
merged 57 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
6225a29
update to v1.6.0
ferrell-code Jan 30, 2024
f3994e6
update primitives
ferrell-code Jan 31, 2024
dba5130
bump a few pallets
ferrell-code Jan 31, 2024
403605e
compile more pallets
ferrell-code Jan 31, 2024
a7adb80
[no-ci] finish compiling pallets
ferrell-code Jan 31, 2024
bbe7334
[no ci] update calamari
ferrell-code Jan 31, 2024
a7ef2e0
calamari xcmp module configuration
ferrell-code Feb 2, 2024
86c9230
[no ci] compile calamari runtime
ferrell-code Feb 2, 2024
c8b68b2
[no ci] get lottery test to compile
ferrell-code Feb 2, 2024
e141110
[no ci] manta runtime update
ferrell-code Feb 2, 2024
5ca69b4
[no ci] update client
ferrell-code Feb 2, 2024
81917bd
[no ci] some client fixes and add rust toolchain info
ferrell-code Feb 3, 2024
e148335
[no ci] compile node, a bit broken still
ferrell-code Feb 13, 2024
2d0206c
[no ci] wip integration test fix
ferrell-code Feb 13, 2024
561fbb9
[no ci] fix integration test
ferrell-code Feb 15, 2024
f95946a
[no ci] update mocks to correctly process xcm
ferrell-code Feb 15, 2024
e370a57
[no ci] compile calamari integration test
ferrell-code Feb 16, 2024
49cee80
[no ci] runtime benchmarks fix
ferrell-code Feb 16, 2024
e0dd42d
[no ci] runtime benchmarks now compiles
ferrell-code Feb 16, 2024
0f3bc42
[no ci] Fix some warnings
ferrell-code Feb 16, 2024
5afd98d
fix some failed integration tests
ferrell-code Feb 18, 2024
9929ead
[no ci] fix more integration test
ferrell-code Feb 18, 2024
644e3f3
[no ci] fix tx pause unit tests
ferrell-code Feb 18, 2024
50acb9e
[no ci] fix tx pause tests
ferrell-code Feb 18, 2024
0f41be4
[no ci] fix some client issue
ferrell-code Feb 21, 2024
34b8cd9
[no ci] clean up chain specs
ferrell-code Feb 21, 2024
1479a3d
[no ci] try-runtime to work
ferrell-code Feb 21, 2024
de31046
[no ci] use nimbus consensus... uses deprecated function for now
ferrell-code Feb 22, 2024
7a30fff
[no ci] add concrete weight values
ferrell-code Mar 4, 2024
18b1c5a
update ci
ferrell-code Mar 4, 2024
9380318
[no ci]Add comments for async backing
Dengjianping Mar 15, 2024
214b92b
merge in manta
ferrell-code Apr 1, 2024
9d92e45
[no ci] compile with moonkit
ferrell-code Apr 2, 2024
d4b97ab
[no ci] fix block import issue, now panics on execution
ferrell-code Apr 5, 2024
ecbf318
Use forked moonkit
Dengjianping Apr 8, 2024
0f245cd
[no ci] dont implement vrf, cleanup client code
ferrell-code Apr 8, 2024
5de032a
[no ci] remove compilation warnings
ferrell-code Apr 8, 2024
63d95c7
[no ci] update runtimes
ferrell-code Apr 8, 2024
0a73df3
add logic to disallow blocks on consecutive relay slots
ferrell-code Apr 9, 2024
ee01e3e
use clippy
ferrell-code Apr 9, 2024
a1e007f
get tests to compile
ferrell-code Apr 9, 2024
2fd5d43
[no ci] bump workflows
ferrell-code Apr 9, 2024
b6a357c
fix all clippy lints and fix failing tests
ferrell-code Apr 9, 2024
6c03b13
Fix benchmarking for frame-system
Dengjianping Apr 14, 2024
c912ced
fix compilation
ferrell-code Apr 14, 2024
847a8ed
fix runtime-bench compilation
ferrell-code Apr 14, 2024
52cbf8e
remove sudo migration and update vesting pallet Cargo.toml
ferrell-code Apr 15, 2024
dda1d90
Fix benchmarking for vesting
Dengjianping Apr 16, 2024
64e17d3
add dev mode
ferrell-code Apr 16, 2024
e87bd91
fix manta integration tests
ferrell-code Apr 16, 2024
258c84e
Fix aura block importing
Dengjianping Apr 18, 2024
05f0876
fix block import to use delayed best block
ferrell-code Apr 18, 2024
cf2559d
fix benchmarking
ferrell-code Apr 18, 2024
d6effc3
fix benchmark
ferrell-code Apr 19, 2024
f16625d
update treasury in manta to spend via root
ferrell-code Apr 19, 2024
b28287b
keep serde feature gated
ferrell-code Apr 23, 2024
18e79c8
revert serde change
ferrell-code Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4,950 changes: 3,236 additions & 1,714 deletions Cargo.lock

Large diffs are not rendered by default.

263 changes: 132 additions & 131 deletions Cargo.toml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ serde = { workspace = true }
# Substrate frames
frame-benchmarking = { workspace = true }
frame-benchmarking-cli = { workspace = true }
frame-support = { workspace = true }
try-runtime-cli = { workspace = true, optional = true }

# RPC related dependencies
Expand All @@ -34,8 +35,10 @@ jsonrpsee = { workspace = true, features = ["server"] }
pallet-transaction-payment-rpc = { workspace = true }
sc-transaction-pool-api = { workspace = true }

frame-system-rpc-runtime-api = { workspace = true }
pallet-farming-rpc-api = { workspace = true }
pallet-farming-rpc-runtime-api = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
zenlink-protocol = { workspace = true, features = ["std"] }
zenlink-protocol-rpc = { workspace = true }
zenlink-protocol-runtime-api = { workspace = true, features = ["std"] }
Expand All @@ -62,6 +65,7 @@ sc-tracing = { workspace = true }
sc-transaction-pool = { workspace = true }

# Substrate primitives
pallet-transaction-payment = { workspace = true, features = ["std"] }
sp-api = { workspace = true, features = ["std"] }
sp-application-crypto = { workspace = true, features = ["std"] }
sp-arithmetic = { workspace = true, features = ["std"] }
Expand All @@ -76,8 +80,10 @@ sp-keystore = { workspace = true, features = ["std"] }
sp-offchain = { workspace = true, features = ["std"] }
sp-runtime = { workspace = true, features = ["std"] }
sp-session = { workspace = true, features = ["std"] }
sp-std = { workspace = true, features = ["std"] }
sp-timestamp = { workspace = true, features = ["std"] }
sp-transaction-pool = { workspace = true, features = ["std"] }
sp-version = { workspace = true, features = ["std"] }
substrate-prometheus-endpoint = { workspace = true }

# Cumulus dependencies
Expand All @@ -86,6 +92,7 @@ cumulus-client-consensus-aura = { workspace = true }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-relay-chain = { workspace = true }
cumulus-client-network = { workspace = true }
cumulus-client-parachain-inherent = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-primitives-core = { workspace = true, features = ["std"] }
cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] }
Expand All @@ -109,6 +116,7 @@ xcm = { workspace = true, features = ["std"] }
calamari-runtime = { workspace = true, features = ["std"] }
manta-primitives = { workspace = true, features = ["std"] }
manta-runtime = { workspace = true, features = ["std"] }
manta-support = { workspace = true, features = ["rpc", "serde"] }
pallet-lottery = { workspace = true, features = ["rpc"] }
pallet-manta-pay = { workspace = true, features = ["rpc", "runtime"] }
pallet-manta-sbt = { workspace = true, features = ["rpc", "runtime"] }
Expand Down
7 changes: 3 additions & 4 deletions node/src/aura_or_nimbus_consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ where
{
async fn verify(
&mut self,
block_params: BlockImportParams<Block, ()>,
) -> Result<BlockImportParams<Block, ()>, String> {
block_params: BlockImportParams<Block>,
) -> Result<BlockImportParams<Block>, String> {
// We assume the outermost digest item is the block seal ( we have no two-step consensus )
let seal = block_params
.header
Expand Down Expand Up @@ -141,10 +141,9 @@ pub fn import_queue<Client, Block: BlockT, InnerBI>(
spawner: &impl sp_core::traits::SpawnEssentialNamed,
registry: Option<&substrate_prometheus_endpoint::Registry>,
telemetry: Option<TelemetryHandle>,
) -> ClientResult<BasicQueue<Block, InnerBI::Transaction>>
) -> ClientResult<BasicQueue<Block>>
where
InnerBI: BlockImport<Block, Error = ConsensusError> + Send + Sync + 'static,
InnerBI::Transaction: Send,
Client::Api: BlockBuilderApi<Block>,
Client: ProvideRuntimeApi<Block> + Send + Sync + 'static,
Client: sc_client_api::AuxStore + sc_client_api::UsageProvider<Block>,
Expand Down
50 changes: 17 additions & 33 deletions node/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
use crate::{
client::{RuntimeApiCommon, RuntimeApiNimbus},
instant_finalize::InstantFinalizeBlockImport,
service::{Client, StateBackend, TransactionPool},
service::{FullClient, StateBackend, TransactionPool},
};
use std::future::Future;

pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Index as Nonce};
pub use manta_primitives::types::{AccountId, Balance, Block, Hash, Header, Nonce};
use polkadot_service::CollatorPair;
use session_key_primitives::AuraId;
use std::sync::Arc;
Expand All @@ -38,15 +38,13 @@ use sp_blockchain::HeaderBackend;
use sp_keystore::KeystorePtr;
use substrate_prometheus_endpoint::Registry;

use cumulus_client_cli::CollatorOptions;
use cumulus_client_cli::{CollatorOptions, RelayChainMode};
use cumulus_client_consensus_common::ParachainConsensus;
use cumulus_client_parachain_inherent::{MockValidationDataInherentDataProvider, MockXcmConfig};
use cumulus_primitives_core::ParaId;
use cumulus_primitives_parachain_inherent::{
MockValidationDataInherentDataProvider, MockXcmConfig,
};
use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain;
use cumulus_relay_chain_interface::{RelayChainInterface, RelayChainResult};
use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node;
use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node_with_rpc;

use nimbus_consensus::{
BuildNimbusConsensusParams, NimbusConsensus, NimbusManualSealConsensusDataProvider,
Expand All @@ -64,13 +62,8 @@ pub async fn build_relay_chain_interface(
Arc<(dyn RelayChainInterface + 'static)>,
Option<CollatorPair>,
)> {
if !collator_options.relay_chain_rpc_urls.is_empty() {
build_minimal_relay_chain_node(
polkadot_config,
task_manager,
collator_options.relay_chain_rpc_urls,
)
.await
if let RelayChainMode::ExternalRpc(rpc) = collator_options.relay_chain_mode {
build_minimal_relay_chain_node_with_rpc(polkadot_config, task_manager, rpc).await
} else {
build_inprocess_relay_chain(
polkadot_config,
Expand All @@ -83,25 +76,19 @@ pub async fn build_relay_chain_interface(
}

/// build parachain nimbus consensus
pub fn build_nimbus_consensus<RuntimeApi>(
pub fn build_nimbus_consensus(
id: ParaId,
client: Arc<Client<RuntimeApi>>,
client: Arc<FullClient>,
backend: Arc<sc_client_db::Backend<Block>>,
prometheus_registry: Option<&Registry>,
telemetry: Option<TelemetryHandle>,
task_manager: &TaskManager,
relay_chain_interface: Arc<dyn RelayChainInterface>,
transaction_pool: Arc<TransactionPool<RuntimeApi>>,
transaction_pool: Arc<TransactionPool>,
_sync_oracle: Arc<NetworkService<Block, Hash>>,
keystore: KeystorePtr,
force_authoring: bool,
) -> Result<Box<dyn ParachainConsensus<Block>>, Error>
where
RuntimeApi: ConstructRuntimeApi<Block, Client<RuntimeApi>> + Send + Sync + 'static,
RuntimeApi::RuntimeApi: RuntimeApiCommon<StateBackend = StateBackend>
+ RuntimeApiNimbus
+ sp_consensus_aura::AuraApi<Block, AuraId>,
{
) -> Result<Box<dyn ParachainConsensus<Block>>, Error> {
let spawn_handle = task_manager.spawn_handle();
let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
spawn_handle,
Expand All @@ -116,7 +103,7 @@ where
let relay_chain_interface = relay_chain_interface.clone();
async move {
let parachain_inherent =
cumulus_primitives_parachain_inherent::ParachainInherentData::create_at(
cumulus_client_parachain_inherent::ParachainInherentDataProvider::create_at(
relay_parent,
&relay_chain_interface,
&validation_data,
Expand Down Expand Up @@ -151,17 +138,13 @@ where
}

/// build standalone mode dev consensus using manual instant seal
pub fn build_dev_nimbus_consensus<RuntimeApi>(
client: Arc<Client<RuntimeApi>>,
transaction_pool: Arc<TransactionPool<RuntimeApi>>,
pub fn build_dev_nimbus_consensus(
client: Arc<FullClient>,
transaction_pool: Arc<TransactionPool>,
keystore_container: &KeystoreContainer,
select_chain: LongestChain<TFullBackend<Block>, Block>,
task_manager: &TaskManager,
) -> Result<impl Future<Output = ()> + Send + 'static, Error>
where
RuntimeApi: ConstructRuntimeApi<Block, Client<RuntimeApi>> + Send + Sync + 'static,
RuntimeApi::RuntimeApi: RuntimeApiCommon<StateBackend = StateBackend> + RuntimeApiNimbus,
{
) -> Result<impl Future<Output = ()> + Send + 'static, Error> {
use futures::{Stream, StreamExt};
use sc_consensus_manual_seal::{run_manual_seal, EngineCommand, ManualSealParams};

Expand Down Expand Up @@ -227,6 +210,7 @@ where
),
raw_downward_messages: vec![],
raw_horizontal_messages: vec![],
additional_key_values: None,
};

Ok((time, mocked_parachain))
Expand Down
20 changes: 12 additions & 8 deletions node/src/chain_specs/calamari.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ use super::*;
use crate::command::CALAMARI_PARACHAIN_ID;
#[allow(unused_imports)]
use calamari_runtime::{
currency::KMA, opaque::SessionKeys, CouncilConfig, DemocracyConfig, GenesisConfig,
LotteryConfig, ParachainStakingConfig, TechnicalCommitteeConfig,
currency::KMA, opaque::SessionKeys, CouncilConfig, DemocracyConfig, LotteryConfig,
ParachainStakingConfig, Runtime, RuntimeGenesisConfig, TechnicalCommitteeConfig, WASM_BINARY,
};
use core::marker::PhantomData;
use session_key_primitives::util::unchecked_account_id;

/// Calamari Protocol Identifier
pub const CALAMARI_PROTOCOL_ID: &str = "calamari";

Expand All @@ -37,7 +39,7 @@ pub const KUSAMA_RELAYCHAIN_DEV_NET: &str = "kusama-dev";
pub const CALAMARI_SAFE_XCM_VERSION: u32 = 3;

/// Calamari Chain Spec
pub type CalamariChainSpec = sc_service::GenericChainSpec<GenesisConfig, Extensions>;
pub type CalamariChainSpec = sc_service::GenericChainSpec<RuntimeGenesisConfig, Extensions>;

/// Returns the [`Properties`] for the Calamari parachain.
pub fn calamari_properties() -> Properties {
Expand Down Expand Up @@ -82,6 +84,7 @@ pub fn calamari_development_config() -> CalamariChainSpec {
relay_chain: KUSAMA_RELAYCHAIN_DEV_NET.into(),
para_id: CALAMARI_PARACHAIN_ID,
},
&WASM_BINARY.expect("WASM binary was not build, please build it!"),
)
}

Expand Down Expand Up @@ -153,19 +156,18 @@ pub fn calamari_local_config(localdev: bool) -> CalamariChainSpec {
relay_chain: KUSAMA_RELAYCHAIN_LOCAL_NET.into(),
para_id: CALAMARI_PARACHAIN_ID,
},
WASM_BINARY.expect("WASM binary was not build, please build it!"),
)
}

fn calamari_dev_genesis(
invulnerables: Vec<(AccountId, SessionKeys)>,
delegations: Vec<(AccountId, AccountId, Balance)>,
endowed_accounts: Vec<AccountId>,
) -> GenesisConfig {
GenesisConfig {
) -> RuntimeGenesisConfig {
RuntimeGenesisConfig {
system: calamari_runtime::SystemConfig {
code: calamari_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
_config: PhantomData::<Runtime>,
},
balances: calamari_runtime::BalancesConfig {
balances: endowed_accounts[..endowed_accounts.len() / 2]
Expand Down Expand Up @@ -199,6 +201,7 @@ fn calamari_dev_genesis(
},
parachain_info: calamari_runtime::ParachainInfoConfig {
parachain_id: CALAMARI_PARACHAIN_ID.into(),
_config: PhantomData::<Runtime>,
},
collator_selection: calamari_runtime::CollatorSelectionConfig {
invulnerables: invulnerables.iter().cloned().map(|(acc, _)| acc).collect(),
Expand Down Expand Up @@ -233,6 +236,7 @@ fn calamari_dev_genesis(
parachain_system: Default::default(),
polkadot_xcm: calamari_runtime::PolkadotXcmConfig {
safe_xcm_version: Some(CALAMARI_SAFE_XCM_VERSION),
_config: PhantomData::<Runtime>,
},
lottery: LotteryConfig {
min_deposit: 5_000 * KMA,
Expand Down
3 changes: 3 additions & 0 deletions node/src/chain_specs/manta/local_testnets_geneses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//! Manta Local Dev Network Configurations

use super::*;
use manta_runtime::WASM_BINARY;
use session_key_primitives::util::unchecked_account_id;

pub fn genesis_spec_dev() -> MantaChainSpec {
Expand Down Expand Up @@ -44,6 +45,7 @@ pub fn genesis_spec_dev() -> MantaChainSpec {
relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(),
para_id: MANTA_PARACHAIN_ID,
},
WASM_BINARY.expect("WASM binary was not build, please build it!"),
)
}

Expand Down Expand Up @@ -106,5 +108,6 @@ pub fn genesis_spec_local(localdev: bool) -> MantaChainSpec {
relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(),
para_id: MANTA_PARACHAIN_ID,
},
WASM_BINARY.expect("WASM binary was not build, please build it!"),
)
}
4 changes: 2 additions & 2 deletions node/src/chain_specs/manta/mainnet_genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Collator {
}
}

fn genesis_config(genesis_collators: Vec<Collator>) -> GenesisConfig {
fn genesis_config(genesis_collators: Vec<Collator>) -> RuntimeGenesisConfig {
const TOTAL_ISSUANCE: Balance = 1_000_000_000 * MANTA;
const INITIAL_CONTROLLER_BALANCE: Balance = 5_000 * MANTA;
const INITIAL_COLLATOR_BALANCE: Balance = 100 * MANTA;
Expand Down Expand Up @@ -83,7 +83,7 @@ fn genesis_config(genesis_collators: Vec<Collator>) -> GenesisConfig {
"won't be able to register collator, balance in account set too low"
);

GenesisConfig {
RuntimeGenesisConfig {
system: manta_runtime::SystemConfig {
code: manta_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
Expand Down
16 changes: 9 additions & 7 deletions node/src/chain_specs/manta/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@

use super::*;
use crate::command::MANTA_PARACHAIN_ID;
use core::marker::PhantomData;
use manta_runtime::{
opaque::SessionKeys, staking::NORMAL_COLLATOR_MINIMUM_STAKE, CouncilConfig, DemocracyConfig,
GenesisConfig, LotteryConfig, ParachainStakingConfig, PolkadotXcmConfig,
LotteryConfig, ParachainStakingConfig, PolkadotXcmConfig, Runtime, RuntimeGenesisConfig,
TechnicalCommitteeConfig,
};
use sc_service::config::MultiaddrWithPeerId;
Expand All @@ -46,7 +47,8 @@ pub const POLKADOT_RELAYCHAIN_DEV_NET: &str = "polkadot-dev";
pub const MANTA_SAFE_XCM_VERSION: u32 = 3;

/// Manta Chain Specification
pub type MantaChainSpec = sc_service::GenericChainSpec<manta_runtime::GenesisConfig, Extensions>;
pub type MantaChainSpec =
sc_service::GenericChainSpec<manta_runtime::RuntimeGenesisConfig, Extensions>;

#[derive(Clone)]
struct Collator {
Expand Down Expand Up @@ -90,7 +92,7 @@ pub fn manta_development_config() -> MantaChainSpec {
}

// common helper to create the above configs
fn manta_devnet_genesis(genesis_collators: Vec<Collator>) -> GenesisConfig {
fn manta_devnet_genesis(genesis_collators: Vec<Collator>) -> RuntimeGenesisConfig {
let root_key = genesis_collators.first().unwrap().acc.clone();

const INITIAL_COLLATOR_BALANCE: Balance = 1_000_000_000 * MANTA;
Expand All @@ -104,11 +106,9 @@ fn manta_devnet_genesis(genesis_collators: Vec<Collator>) -> GenesisConfig {
"won't be able to register collator, balance in account set too low"
);

GenesisConfig {
RuntimeGenesisConfig {
system: manta_runtime::SystemConfig {
code: manta_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
.to_vec(),
_config: PhantomData::<Runtime>,
},
balances: manta_runtime::BalancesConfig {
balances: endowments.clone(),
Expand All @@ -134,6 +134,7 @@ fn manta_devnet_genesis(genesis_collators: Vec<Collator>) -> GenesisConfig {
},
parachain_info: manta_runtime::ParachainInfoConfig {
parachain_id: MANTA_PARACHAIN_ID.into(),
_config: PhantomData::<Runtime>,
},
collator_selection: manta_runtime::CollatorSelectionConfig {
invulnerables: vec![],
Expand All @@ -155,6 +156,7 @@ fn manta_devnet_genesis(genesis_collators: Vec<Collator>) -> GenesisConfig {
parachain_system: Default::default(),
polkadot_xcm: PolkadotXcmConfig {
safe_xcm_version: Some(MANTA_SAFE_XCM_VERSION),
_config: PhantomData::<Runtime>,
},
asset_manager: Default::default(),
democracy: DemocracyConfig::default(),
Expand Down
3 changes: 3 additions & 0 deletions node/src/chain_specs/manta/public_testnet_genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ use hex_literal::hex;
use sc_telemetry::TelemetryEndpoints;
use sp_core::crypto::UncheckedInto;

use manta_runtime::WASM_BINARY;

pub fn genesis_spec() -> MantaChainSpec {
let genesis_collators: Vec<Collator> = vec![
Collator::new(
Expand Down Expand Up @@ -89,5 +91,6 @@ pub fn genesis_spec() -> MantaChainSpec {
relay_chain: POLKADOT_STAGING_NET.into(),
para_id: MANTA_PARACHAIN_ID,
},
WASM_BINARY.expect("WASM binary was not build, please build it!"),
)
}
3 changes: 2 additions & 1 deletion node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ pub enum Subcommand {
PurgeChain(cumulus_client_cli::PurgeChainCmd),

/// Export the genesis state of the parachain.
ExportGenesisState(cumulus_client_cli::ExportGenesisStateCommand),
#[command(alias = "export-genesis-state")]
ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand),

/// Export the genesis wasm of the parachain.
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),
Expand Down