Skip to content

Commit

Permalink
Plasm Network mainnet (#149)
Browse files Browse the repository at this point in the history
* Plasm Network mainnet genesis

* Bump frame modules

* Added mainnet genesis into subkey

* Added bootnodes

* Bump version in README
  • Loading branch information
akru committed Apr 30, 2020
1 parent 747d7f2 commit f52ab04
Show file tree
Hide file tree
Showing 14 changed files with 402 additions and 53 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Install additional build tools:

Install Plasm node from git source:

cargo install --force --git https://github.com/staketechnologies/Plasm --tag v0.7.1 plasm-cli
cargo install --force --git https://github.com/staketechnologies/Plasm --tag v1.0.0 plasm-cli

Run node in [Plasm testnet](https://telemetry.polkadot.io/#/PlasmTestnet%20v1):

Expand Down
342 changes: 342 additions & 0 deletions bin/node/cli/res/plasm.json

Large diffs are not rendered by default.

57 changes: 31 additions & 26 deletions bin/node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,54 +170,59 @@ pub fn dusty_config() -> ChainSpec {
ChainSpec::from_json_bytes(&include_bytes!("../res/dusty.json")[..]).unwrap()
}

/// Plasm mainnet file config.
pub fn plasm_config() -> ChainSpec {
ChainSpec::from_json_bytes(&include_bytes!("../res/plasm.json")[..]).unwrap()
}

/*
/// Dusty native config.
pub fn dusty_config() -> ChainSpec {
/// Mainnet native config.
pub fn plasm_config() -> ChainSpec {
ChainSpec::from_genesis(
"Dusty",
"dusty",
"Plasm",
"plasm",
ChainType::Live,
dusty_genesis,
plasm_genesis,
vec![],
Some(sc_telemetry::TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(),0)]).unwrap()),
Some(DUSTY_PROTOCOL_ID),
serde_json::from_str(DUSTY_PROPERTIES).unwrap(),
Some(PLASM_PROTOCOL_ID),
serde_json::from_str(PLASM_PROPERTIES).unwrap(),
Default::default(),
)
}
fn dusty_genesis() -> GenesisConfig {
// Dusty initial authorities
fn plasm_genesis() -> GenesisConfig {
// Plasm initial authorities
let authorities = vec![
( // akru
hex!["16eb796bee0c857db3d646ee7070252707aec0c7d82b2eda856632f6a2306a58"].into(),
hex!["ac2bbc1877441591e997a7bd8043f4df4f7ca69bd05a762b0661ec376f64f551"].unchecked_into(),
hex!["0e95fb00ea007cd02b7b0065840d4572aeab5dbf77f148a62330168e7092703d"].unchecked_into(),
hex!["34141c0c21335e3d0ee1a036793cd329a1a24abd617fc37ce2382c340be96a56"].into(),
hex!["e0c4aae64015c19224b8a054a072a375168ccde72d3d960e8b06f2bb30167d4a"].unchecked_into(),
hex!["9cc6e9120f5fae0ec6d2b1d6ca8a14bed7a5055a66daf8e64e41cb2700678584"].unchecked_into(),
),
( // staketech-01
hex!["48cdc7ef880c80e8475170f206381d2cb13a87c209452fc6d8a1e14186d61b28"].into(),
hex!["70887b6d5241f2483fd7f199697a2f4ccfe3aedbfa60fe0c82fe476a4b08a320"].unchecked_into(),
hex!["c62110354d58905bbfa894a1d82f0c175dfc7720758b28d18bc2118ef5f54f91"].unchecked_into(),
hex!["84fb8020ed0b8e4ca4b574b9480ff2f4d37a0b46ce46e65d05468f9d65150d21"].into(),
hex!["fe6d0ed26feab814e4c844f639dd7b5c9c1da84f130bf047e4a37d9b57c5a214"].unchecked_into(),
hex!["f5c5a9d0a9d19f9ee41a8e442758674294035cde4703c4ace5d4f2683ca2243f"].unchecked_into(),
),
( // staketech-02
hex!["38cdc7ef880c80e8475170f206381d2cb13a87c209452fc6d8a1e14186d61b28"].into(),
hex!["d409311bae981d87dee63d4c799723a33d509d7388db4c530a10e607937e547d"].unchecked_into(),
hex!["36aaade466263a00ec16a1a1c301636ff8488fc28a08e6a7eca7ac8496e35dca"].unchecked_into(),
hex!["8e067f3e41cdd90c11ac2f7f3b1a70ee511867fa4e7dfd85f08ff16c3245ad01"].into(),
hex!["6c35e8a3eb4839ea8b7438ae59d7d49fe43529943b2812ea5f704d6f9cee640e"].unchecked_into(),
hex!["7a6a1d203f0ee6112b108faa17808f88b89b5f3fdfea9e4434ae51d28a81508f"].unchecked_into(),
),
( // staketech-03
hex!["28cdc7ef880c80e8475170f206381d2cb13a87c209452fc6d8a1e14186d61b28"].into(),
hex!["266f53d34490e10e6c818a1f6208dd285a74c01e022cb3b725cf5888bc89136f"].unchecked_into(),
hex!["c379204b0b450bb62006a0df2b4abac72c79909248fc0f30ce0b05fcb9c102fa"].unchecked_into(),
hex!["32b0c306a3f85902e504ed971ca0323f42c3fd209cb275aaabcc22f1c054da79"].into(),
hex!["f617e63ea7f69f5d83e3718b30db7a5b1d41abb24835a92053bc8bcd252c861c"].unchecked_into(),
hex!["8f6d7375f702f327b3779ef8ba567530764ea9f71dc638dafbadd29786640eec"].unchecked_into(),
),
( // staketech-04
hex!["18cdc7ef880c80e8475170f206381d2cb13a87c209452fc6d8a1e14186d61b28"].into(),
hex!["96e2554353e7a8de10a388a5dda42096d3c7768403f3735d0a939bc3fd39bc54"].unchecked_into(),
hex!["674bd4f2670c0e99edcccd5d3821c54b9d559580a31d8e2ca1e88c1e3db28021"].unchecked_into(),
hex!["1e4f5e33dfb4fc38e3b2c3bf91eae6c5443095627d1e0a8595354fcbb2163a2c"].into(),
hex!["80a9e57aace4b42c158ab336360bca4b8373ae049b58357c04df29a37b564f35"].unchecked_into(),
hex!["139e66014a330d35cbd662905e9e4ad4fb8d6ef0d3681d95f53cbf9c0abb7967"].unchecked_into(),
),
];
// akru
let root_key = hex!["16eb796bee0c857db3d646ee7070252707aec0c7d82b2eda856632f6a2306a58"];
// Stake Technologies
let root_key = hex!["4217f22e9a29af49fd087008d593d07b73d628867f95402885c0651da2c8a432"];
// token holders
let holders = HOLDERS.to_vec();
Expand Down
5 changes: 3 additions & 2 deletions bin/node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use sc_cli::SubstrateCli;

impl SubstrateCli for Cli {
fn impl_name() -> &'static str {
"Plasm Node"
"plasm"
}

fn impl_version() -> &'static str {
Expand Down Expand Up @@ -35,7 +35,8 @@ impl SubstrateCli for Cli {
Ok(match id {
"dev" => Box::new(chain_spec::development_config()),
"local" => Box::new(chain_spec::local_testnet_config()),
"" | "dusty" => Box::new(chain_spec::dusty_config()),
"dusty" => Box::new(chain_spec::dusty_config()),
"" | "plasm" => Box::new(chain_spec::plasm_config()),
path => Box::new(chain_spec::ChainSpec::from_json_file(
std::path::PathBuf::from(path),
)?),
Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub mod currency {
/// PLASM GENESIS TOKEN HODERS
pub static ref HOLDERS: Vec<(plasm_primitives::AccountId, Balance)> = sp_std::vec![
// Stake Technologies & affilation participants
(hex!["16eb796bee0c857db3d646ee7070252707aec0c7d82b2eda856632f6a2306a58"].into(), 71020337610241566546887)
(hex!["2424a6cab9711ae2f8572a221c52308842639344887175d1f08e66e71b003d6e"].into(), 71020337610241566546887)
// Direct Lockdrop participants
, (to_account(&hex!["1f57f692ecc6c7031f7b89e283a14a111a273ef5ca4295ed114cef5faed3f1a66da013f76b420d7a054aec6e76ecc077a70dc9951dc41b1679e20d1d9eb665b0"][..]), 216982973545339075380)
, (to_account(&hex!["dc9381468a9712dfae81b5c88827cd824c189db9f7f49d4571cfe67b498b691204ae6d4c354a3677788828830649b682c91eeef379daec40f56a9ac7c4a669bd"][..]), 245318656574379798128)
Expand Down
8 changes: 4 additions & 4 deletions bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

/// Runtime version.
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("dusty"),
spec_name: create_runtime_str!("plasm"),
impl_name: create_runtime_str!("staketechnologies-plasm"),
authoring_version: 4,
authoring_version: 1,
// Per convention: if the runtime behavior changes, increment spec_version
// and set impl_version to equal spec_version. If only runtime
// implementation changes and behavior does not, then leave spec_version as
// is and increment impl_version.
spec_version: 42,
impl_version: 42,
spec_version: 1,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
};

Expand Down
7 changes: 4 additions & 3 deletions bin/subkey/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ fn get_app<'a, 'b>() -> App<'a, 'b> {
SubCommand::with_name("transfer")
.about("Author and sign a Node pallet_balances::Transfer transaction with a given (secret) key")
.args_from_usage("
[genesis] -g, --genesis <genesis> 'The genesis hash or a recognised \
chain identifier (dusty).'
[genesis] -g, --genesis [genesis] 'The genesis hash or a recognised \
chain identifier (plasm, dusty).'
<from> 'The signing secret key URI.'
<to> 'The destination account public key URI.'
<amount> 'The number of units to transfer.'
Expand Down Expand Up @@ -429,8 +429,9 @@ where
}

fn read_genesis_hash(matches: &ArgMatches) -> H256 {
let genesis_hash: Hash = match matches.value_of("genesis").unwrap_or("dusty") {
let genesis_hash: Hash = match matches.value_of("genesis").unwrap_or("plasm") {
"dusty" => hex!["5bde5ea1f236802c5711abd3b0ca9fc748d654b2c1055290fdf7bf2b4f282428"].into(),
"plasm" => hex!["3e86364d4b4894021cb2a0390bcf2feb5517d5292f2de2bb9404227e908b0b8b"].into(),
h => hex::decode(h)
.ok()
.and_then(|x| Decode::decode(&mut &x[..]).ok())
Expand Down
2 changes: 1 addition & 1 deletion frame/dapps-staking/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-dapps-staking"
version = "0.1.0"
version = "1.0.0"
authors = [
"Takumi Yamashita <takumi@stake.co.jp>",
"Aleksandr Krupenkin <aleksandr@stake.co.jp>"
Expand Down
2 changes: 1 addition & 1 deletion frame/operator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-contract-operator"
version = "0.1.0"
version = "1.0.0"
authors = ["Takumi Yamashita <takumi@stake.co.jp>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion frame/plasm-lockdrop/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-plasm-lockdrop"
version = "0.1.0"
version = "1.0.0"
authors = ["Aleksandr Krupenkin <aleksandr@stake.co.jp>"]
edition = "2018"

Expand Down
2 changes: 1 addition & 1 deletion frame/plasm-rewards/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-plasm-rewards"
version = "0.1.0"
version = "1.0.0"
authors = [
"Takumi Yamashita <takumi@stake.co.jp>",
"Aleksandr Krupenkin <aleksandr@stake.co.jp>"
Expand Down
2 changes: 1 addition & 1 deletion frame/plasm-validator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-plasm-validator"
version = "0.1.0"
version = "1.0.0"
authors = [
"Takumi Yamashita <takumi@stake.co.jp>",
"Aleksandr Krupenkin <aleksandr@stake.co.jp>"
Expand Down
2 changes: 1 addition & 1 deletion frame/trading/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-operator-trading"
version = "0.1.0"
version = "1.0.0"
authors = ["Takumi Yamashita <takumi@stake.co.jp>"]
edition = "2018"

Expand Down

0 comments on commit f52ab04

Please sign in to comment.