Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Dengjianping <djptux@gmail.com>
  • Loading branch information
Dengjianping committed Jun 30, 2022
2 parents edc399f + 985915d commit 572b6f4
Show file tree
Hide file tree
Showing 33 changed files with 2,645 additions and 294 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
types: opened

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MY_GITHUB_TOKEN: ${{ secrets.ORG_ISSUE_GITHUB_TOKEN }}


jobs:
assign_to_project:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
## [Unreleased]

### Breaking changes
-[\628](https://github.com/Manta-Network/Manta/pull/628) Improve RPC performance, add `max_receivers` and `max_senders` fields in the RPC request.

### Features

### Improvements
- [\#449](https://github.com/Manta-Network/Manta/pull/449) Remove strip from CI, and add strip profile to production.
- [\#576](https://github.com/Manta-Network/Manta/pull/576) Unfilter xtokens.transfer_multicurrencies and bump MaxAssetsForTransfer to 2.
- [\#607](https://github.com/Manta-Network/Manta/pull/607) Turn node client code into library for CLI project.
- [\#609](https://github.com/Manta-Network/Manta/pull/609) Update parameter path from `sdk` to `manta-parameters`.
- [\#614](https://github.com/Manta-Network/Manta/pull/614) Remove `OnRuntimeUpgrade` from calamari-runtime.
- [\#619](https://github.com/Manta-Network/Manta/pull/619) Add CI runtime upgrade test for Dolphin and improve test scenario.
Expand Down Expand Up @@ -54,7 +57,6 @@

### Bug fixes


## v3.1.5
### Breaking changes

Expand Down
49 changes: 24 additions & 25 deletions node/src/chain_specs/calamari.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,27 @@
// You should have received a copy of the GNU General Public License
// along with Manta. If not, see <http://www.gnu.org/licenses/>.

//! Calamari Chain Specifications

use super::*;
use crate::command::CALAMARI_PARACHAIN_ID;
use calamari_runtime::{CouncilConfig, DemocracyConfig, TechnicalCommitteeConfig};
use calamari_runtime::{CouncilConfig, DemocracyConfig, GenesisConfig, TechnicalCommitteeConfig};
use manta_primitives::helpers::{get_account_id_from_seed, get_collator_keys_from_seed};

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type CalamariChainSpec =
sc_service::GenericChainSpec<calamari_runtime::GenesisConfig, Extensions>;
/// Calamari Protocol Identifier
pub const CALAMARI_PROTOCOL_ID: &str = "calamari";

/// Kusama Relaychain Local Network Identifier
pub const KUSAMA_RELAYCHAIN_LOCAL_NET: &str = "kusama-local";

const CALAMARI_PROTOCOL_ID: &str = "calamari"; // for p2p network configuration
const KUSAMA_RELAYCHAIN_LOCAL_NET: &str = "kusama-local";
const KUSAMA_RELAYCHAIN_DEV_NET: &str = "kusama-dev";
/// Kusama Relaychain Development Network Identifier
pub const KUSAMA_RELAYCHAIN_DEV_NET: &str = "kusama-dev";

/// The default XCM version to set in genesis config.
const SAFE_XCM_VERSION: u32 = 2;
pub const SAFE_XCM_VERSION: u32 = 2;

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

/// Generate the calamari session keys from individual elements.
///
Expand All @@ -37,7 +43,7 @@ pub fn calamari_session_keys(keys: AuraId) -> calamari_runtime::opaque::SessionK
calamari_runtime::opaque::SessionKeys { aura: keys }
}

// calamari chain specs
/// Returns the [`Properties`] for the Calamari parachain.
pub fn calamari_properties() -> Properties {
let mut p = Properties::new();
p.insert("ss58format".into(), constants::CALAMARI_SS58PREFIX.into());
Expand All @@ -49,18 +55,14 @@ pub fn calamari_properties() -> Properties {
p
}

/// Returns the Calamari development chainspec.
pub fn calamari_development_config() -> CalamariChainSpec {
let properties = calamari_properties();

CalamariChainSpec::from_genesis(
// Name
"Calamari Parachain Development",
// ID
"calamari_dev",
ChainType::Local,
move || {
calamari_dev_genesis(
// initial collators.
vec![(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_collator_keys_from_seed("Alice"),
Expand All @@ -77,26 +79,22 @@ pub fn calamari_development_config() -> CalamariChainSpec {
None,
Some(CALAMARI_PROTOCOL_ID),
None,
Some(properties),
Some(calamari_properties()),
Extensions {
relay_chain: KUSAMA_RELAYCHAIN_DEV_NET.into(),
para_id: CALAMARI_PARACHAIN_ID,
},
)
}

/// Returns the Calamari local chainspec.
pub fn calamari_local_config() -> CalamariChainSpec {
let properties = calamari_properties();

CalamariChainSpec::from_genesis(
// Name
"Calamari Parachain Local",
// ID
"calamari_local",
ChainType::Local,
move || {
calamari_dev_genesis(
// initial collators.
vec![
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
Expand Down Expand Up @@ -137,7 +135,7 @@ pub fn calamari_local_config() -> CalamariChainSpec {
None,
Some(CALAMARI_PROTOCOL_ID),
None,
Some(properties),
Some(calamari_properties()),
Extensions {
relay_chain: KUSAMA_RELAYCHAIN_LOCAL_NET.into(),
para_id: CALAMARI_PARACHAIN_ID,
Expand All @@ -148,8 +146,8 @@ pub fn calamari_local_config() -> CalamariChainSpec {
fn calamari_dev_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
endowed_accounts: Vec<AccountId>,
) -> calamari_runtime::GenesisConfig {
calamari_runtime::GenesisConfig {
) -> GenesisConfig {
GenesisConfig {
system: calamari_runtime::SystemConfig {
code: calamari_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
Expand Down Expand Up @@ -210,6 +208,7 @@ fn calamari_dev_genesis(
}
}

/// Returns the Calamari testnet chainspec.
pub fn calamari_testnet_config() -> Result<CalamariChainSpec, String> {
let mut spec = CalamariChainSpec::from_json_bytes(
&include_bytes!("../../../genesis/calamari-testnet-genesis.json")[..],
Expand All @@ -218,14 +217,14 @@ pub fn calamari_testnet_config() -> Result<CalamariChainSpec, String> {
Ok(spec)
}

// Calamari testnet for ci jobs
/// Returns the Calamari testnet for CI chainspec.
pub fn calamari_testnet_ci_config() -> Result<CalamariChainSpec, String> {
CalamariChainSpec::from_json_bytes(
&include_bytes!("../../../genesis/calamari-testnet-ci-genesis.json")[..],
)
}

// Calamari mainnet
/// Returns the Calamari mainnet chainspec.
pub fn calamari_config() -> Result<CalamariChainSpec, String> {
CalamariChainSpec::from_json_bytes(
&include_bytes!("../../../genesis/calamari-genesis.json")[..],
Expand Down
40 changes: 20 additions & 20 deletions node/src/chain_specs/dolphin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,36 @@
// You should have received a copy of the GNU General Public License
// along with Manta. If not, see <http://www.gnu.org/licenses/>.

//! Dolphin Chain Specifications

use super::*;
use crate::command::DOLPHIN_PARACHAIN_ID;
use dolphin_runtime::{CouncilConfig, DemocracyConfig, GenesisConfig, TechnicalCommitteeConfig};
use manta_primitives::helpers::{get_account_id_from_seed, get_collator_keys_from_seed};

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type DolphinChainSpec = sc_service::GenericChainSpec<GenesisConfig, Extensions>;
/// Dolphin Protocol Identifier
pub const DOLPHIN_PROTOCOL_ID: &str = "dolphin";

const DOLPHIN_PROTOCOL_ID: &str = "dolphin"; // for p2p network configuration
const KUSAMA_RELAYCHAIN_LOCAL_NET: &str = "kusama-local";
const KUSAMA_RELAYCHAIN_DEV_NET: &str = "kusama-dev";
/// Kusama Relaychain Local Network Identifier
pub const KUSAMA_RELAYCHAIN_LOCAL_NET: &str = "kusama-local";

/// Kusama Relaychain Development Network Identifier
pub const KUSAMA_RELAYCHAIN_DEV_NET: &str = "kusama-dev";

/// The default XCM version to set in genesis config.
const SAFE_XCM_VERSION: u32 = 2;

/// Specialized `ChainSpec` for the normal parachain runtime.
pub type DolphinChainSpec = sc_service::GenericChainSpec<GenesisConfig, Extensions>;

/// Generate the dolphin session keys from individual elements.
///
/// The input must be a tuple of individual keys (a single arg for now since we have just one key).
pub fn dolphin_session_keys(keys: AuraId) -> dolphin_runtime::opaque::SessionKeys {
dolphin_runtime::opaque::SessionKeys { aura: keys }
}

// dolphin chain specs
/// Returns the [`Properties`] for the Dolphin parachain.
pub fn dolphin_properties() -> Properties {
let mut p = Properties::new();
p.insert("ss58format".into(), constants::CALAMARI_SS58PREFIX.into());
Expand All @@ -45,18 +52,14 @@ pub fn dolphin_properties() -> Properties {
p
}

/// Returns the Dolphin development chainspec.
pub fn dolphin_development_config() -> DolphinChainSpec {
let properties = dolphin_properties();

DolphinChainSpec::from_genesis(
// Name
"Dolphin Parachain Development",
// ID
"dolphin_dev",
ChainType::Local,
move || {
dolphin_dev_genesis(
// initial collators.
vec![(
get_account_id_from_seed::<sr25519::Public>("Alice"),
get_collator_keys_from_seed("Alice"),
Expand All @@ -74,26 +77,22 @@ pub fn dolphin_development_config() -> DolphinChainSpec {
None,
Some(DOLPHIN_PROTOCOL_ID),
None,
Some(properties),
Some(dolphin_properties()),
Extensions {
relay_chain: "".into(),
para_id: DOLPHIN_PARACHAIN_ID,
},
)
}

/// Returns the Dolphin local chainspec.
pub fn dolphin_local_config() -> DolphinChainSpec {
let properties = dolphin_properties();

DolphinChainSpec::from_genesis(
// Name
"Dolphin Parachain Local",
// ID
"dolphin_local",
ChainType::Local,
move || {
dolphin_dev_genesis(
// initial collators.
vec![
(
get_account_id_from_seed::<sr25519::Public>("Alice"),
Expand Down Expand Up @@ -135,7 +134,7 @@ pub fn dolphin_local_config() -> DolphinChainSpec {
None,
Some(DOLPHIN_PROTOCOL_ID),
None,
Some(properties),
Some(dolphin_properties()),
Extensions {
relay_chain: "".into(),
para_id: DOLPHIN_PARACHAIN_ID,
Expand All @@ -147,8 +146,8 @@ fn dolphin_dev_genesis(
invulnerables: Vec<(AccountId, AuraId)>,
root_key: AccountId,
endowed_accounts: Vec<AccountId>,
) -> dolphin_runtime::GenesisConfig {
dolphin_runtime::GenesisConfig {
) -> GenesisConfig {
GenesisConfig {
system: dolphin_runtime::SystemConfig {
code: dolphin_runtime::WASM_BINARY
.expect("WASM binary was not build, please build it!")
Expand Down Expand Up @@ -212,6 +211,7 @@ fn dolphin_dev_genesis(
}
}

/// Returns the Dolphin testnet chainspec.
pub fn dolphin_testnet_config() -> Result<DolphinChainSpec, String> {
let mut spec = DolphinChainSpec::from_json_bytes(
&include_bytes!("../../../genesis/dolphin-testnet-genesis.json")[..],
Expand Down
Loading

0 comments on commit 572b6f4

Please sign in to comment.