Skip to content

Commit

Permalink
Merge pull request Joystream#41 from Joystream/testnet-1
Browse files Browse the repository at this point in the history
live testnet 1
  • Loading branch information
mnaamani authored Feb 28, 2019
2 parents d97eefc + ef18397 commit 03f87d8
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 123 deletions.
6 changes: 3 additions & 3 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ authors = ['Joystream']
build = 'build.rs'
edition = '2018'
name = 'joystream-node'
version = '0.10.0'
version = '0.10.1'

[[bin]]
name = 'joystream-node'
Expand Down
69 changes: 69 additions & 0 deletions res/joy_testnet_1.json

Large diffs are not rendered by default.

98 changes: 0 additions & 98 deletions res/sparta.json

This file was deleted.

2 changes: 1 addition & 1 deletion runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ['Joystream']
edition = '2018'
name = 'joystream-node-runtime'
version = '0.9.1'
version = '1.0.0'

[features]
default = ['std']
Expand Down
5 changes: 5 additions & 0 deletions runtime/src/governance/proposals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ decl_module! {

Self::deposit_event(RawEvent::ProposalVetoed(proposal_id));
}

fn set_approval_quorum(new_value: u32) {
ensure!(new_value > 0, "approval quorom must be greater than zero");
<ApprovalQuorum<T>>::put(new_value);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion runtime/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ path = '..'
authors = ['Joystream']
edition = '2018'
name = 'joystream-node-runtime-wasm'
version = '0.9.1'
version = '1.0.0'
38 changes: 19 additions & 19 deletions src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ pub enum Alternative {
LocalTestnet,
/// Staging testnet
StagingTestnet,
/// Sparta testnet
Sparta,
/// Testnet - the current live testnet
LiveTestnet,
}

impl Alternative {
Expand Down Expand Up @@ -71,7 +71,7 @@ impl Alternative {
None
),
Alternative::StagingTestnet => staging_testnet_config(),
Alternative::Sparta => sparta_config()?,
Alternative::LiveTestnet => live_testnet_config()?,
})
}

Expand All @@ -80,25 +80,25 @@ impl Alternative {
"dev" => Some(Alternative::Development),
"local" => Some(Alternative::LocalTestnet),
"staging" => Some(Alternative::StagingTestnet),
"" | "sparta" => Some(Alternative::Sparta),
"" | "testnet" => Some(Alternative::LiveTestnet),
_ => None,
}
}
}

/// Sparta testnet generator
pub fn sparta_config() -> Result<ChainSpec, String> {
ChainSpec::from_embedded(include_bytes!("../res/sparta.json"))
/// LiveTestnet generator
pub fn live_testnet_config() -> Result<ChainSpec, String> {
ChainSpec::from_embedded(include_bytes!("../res/joy_testnet_1.json"))
}

/// Staging testnet config.
/// Staging testnet config
pub fn staging_testnet_config() -> ChainSpec {
let boot_nodes = vec![
String::from("/dns4/testnet-boot.joystream.org/tcp/30333/p2p/QmRMZZQDsDDg2bsYRBFT9FiWsFXpWfgGHqJFYcRfz9Pfyi")
];
ChainSpec::from_genesis(
"Joystream Testnet",
"joystream_testnet_2",
"Joystream Staging Testnet",
"joystream_staging_3",
staging_testnet_config_genesis,
boot_nodes,
Some(STAGING_TELEMETRY_URL.into()),
Expand Down Expand Up @@ -137,7 +137,7 @@ fn staging_testnet_config_genesis () -> GenesisConfig {
ids: endowed_accounts.clone(),
}),
balances: Some(BalancesConfig {
balances: endowed_accounts.iter().map(|&k| (k, 10_000_000 * DOLLARS)).collect(),
balances: endowed_accounts.iter().map(|&k| (k, 100_000_000 * DOLLARS)).collect(),
existential_deposit: 0,
transfer_fee: 0,
creation_fee: 0,
Expand All @@ -152,17 +152,17 @@ fn staging_testnet_config_genesis () -> GenesisConfig {
}),
session: Some(SessionConfig {
validators: initial_authorities.iter().cloned().map(Into::into).collect(),
session_length: 5 * MINUTES,
session_length: 10 * MINUTES,
}),
staking: Some(StakingConfig {
current_era: 0,
intentions: initial_authorities.iter().cloned().map(Into::into).collect(),
offline_slash: Perbill::from_billionths(1_000_000),
session_reward: Perbill::from_billionths(2_065),
offline_slash: Perbill::from_millionths(10_000), // 1/ 100 => 1%
session_reward: Perbill::from_millionths(1_000), // 1/1000 => 0.1% (min stake -> 1000 units for reward to be GT 0)
current_offline_slash: 0,
current_session_reward: 0,
validator_count: 10,
sessions_per_era: 12,
sessions_per_era: 6,
bonding_duration: 60 * MINUTES,
offline_slash_grace: 4,
minimum_validator_count: 1,
Expand All @@ -177,19 +177,19 @@ fn staging_testnet_config_genesis () -> GenesisConfig {
announcing_period: 3 * DAYS,
voting_period: 1 * DAYS,
revealing_period: 1 * DAYS,
council_size: 6,
council_size: 12,
candidacy_limit: 25,
min_council_stake: 10 * DOLLARS,
new_term_duration: 14 * DAYS,
min_voting_stake: 1 * DOLLARS,
}),
proposals: Some(ProposalsConfig {
approval_quorum: 60,
approval_quorum: 66,
min_stake: 2 * DOLLARS,
cancellation_fee: 50 * CENTS,
cancellation_fee: 10 * CENTS,
rejection_fee: 1 * DOLLARS,
voting_period: 2 * DAYS,
name_max_len: 32,
name_max_len: 512,
description_max_len: 10_000,
wasm_code_max_len: 2_000_000,
}),
Expand Down

0 comments on commit 03f87d8

Please sign in to comment.