-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor manta genesis files, add
manta-testnet
(#1067)
* geneses: public manta testnet and polkadot-launchable manta-deva and -local Signed-off-by: Adam Reif <[email protected]> * delete checked-in testnet-genesis.json (collators are expected to use the file in the ansible repo) Signed-off-by: Adam Reif <[email protected]> * that multisig root for testnet was a semi-good idea. also fmt Signed-off-by: Adam Reif <[email protected]> * make root first collator not alice for pub testnet Signed-off-by: Adam Reif <[email protected]> * fix double endowment for first collator Signed-off-by: Adam Reif <[email protected]> * rename internal config fns Signed-off-by: Adam Reif <[email protected]> --------- Signed-off-by: Adam Reif <[email protected]> Co-authored-by: Georgi Zlatarev <[email protected]>
- Loading branch information
1 parent
0732a13
commit 7c389f9
Showing
6 changed files
with
266 additions
and
236 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 |
---|---|---|
@@ -0,0 +1,98 @@ | ||
// Copyright 2020-2023 Manta Network. | ||
// This file is part of Manta. | ||
// | ||
// Manta is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Manta is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with Manta. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! Manta Local Dev Network Configurations | ||
use super::*; | ||
use session_key_primitives::util::unchecked_account_id; | ||
|
||
pub fn genesis_spec_dev() -> MantaChainSpec { | ||
let genesis_collators: Vec<Collator> = vec![Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Alice"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Alice"), | ||
)]; | ||
let genesis_collators_clone = genesis_collators.clone(); // so we can move it into the constructor closure | ||
|
||
MantaChainSpec::from_genesis( | ||
"Manta Parachain Dev", | ||
"manta", | ||
ChainType::Local, | ||
move || manta_devnet_genesis(genesis_collators_clone.clone()), | ||
genesis_collators | ||
.into_iter() | ||
.filter_map(|collator| collator.nodeid) | ||
.collect(), | ||
None, | ||
Some(MANTA_PROTOCOL_ID), | ||
None, | ||
Some(manta_properties()), | ||
Extensions { | ||
relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(), | ||
para_id: MANTA_PARACHAIN_ID, | ||
}, | ||
) | ||
} | ||
|
||
pub fn genesis_spec_local() -> MantaChainSpec { | ||
let genesis_collators: Vec<Collator> = vec![ | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Alice"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Alice"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Bob"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Bob"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Charlie"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Charlie"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Dave"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Dave"), | ||
), | ||
Collator::new( | ||
unchecked_account_id::<sr25519::Public>("Eve"), | ||
None, | ||
SessionKeys::from_seed_unchecked("Eve"), | ||
), | ||
]; | ||
let genesis_collators_clone = genesis_collators.clone(); // so we can move it into the constructor closure | ||
|
||
MantaChainSpec::from_genesis( | ||
"Manta Parachain Local", | ||
"manta", | ||
ChainType::Local, | ||
move || manta_devnet_genesis(genesis_collators_clone.clone()), | ||
genesis_collators | ||
.into_iter() | ||
.filter_map(|collator| collator.nodeid) | ||
.collect(), | ||
None, | ||
Some(MANTA_PROTOCOL_ID), | ||
None, | ||
Some(manta_properties()), | ||
Extensions { | ||
relay_chain: POLKADOT_RELAYCHAIN_LOCAL_NET.into(), | ||
para_id: MANTA_PARACHAIN_ID, | ||
}, | ||
) | ||
} |
This file contains 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
Oops, something went wrong.