Skip to content

Commit

Permalink
testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
nasa8x committed Oct 8, 2020
1 parent 8ed98ba commit 517c72c
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Generic Substrate node implementation in Rust."
build = "build.rs"
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
default-run = "substrate"
default-run = "geek"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"

Expand All @@ -25,7 +25,7 @@ is-it-maintained-issue-resolution = { repository = "paritytech/substrate" }
is-it-maintained-open-issues = { repository = "paritytech/substrate" }

[[bin]]
name = "substrate"
name = "geek"
path = "bin/main.rs"
required-features = ["cli"]

Expand Down
71 changes: 71 additions & 0 deletions bin/node/cli/res/testnet.json

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion bin/node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ pub fn flaming_fir_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/flaming-fir.json")[..])
}

// Geek testnet generator
pub fn geek_testnet_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/testnet.json")[..])
}

fn session_keys(
grandpa: GrandpaId,
babe: BabeId,
Expand Down Expand Up @@ -347,7 +352,7 @@ pub fn development_config() -> ChainSpec {
None,
None,
Default::default(),
)
)
}

fn local_testnet_genesis() -> GenesisConfig {
Expand Down
1 change: 1 addition & 0 deletions bin/node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ impl SubstrateCli for Cli {
Ok(match id {
"dev" => Box::new(chain_spec::development_config()),
"local" => Box::new(chain_spec::local_testnet_config()),
"testnet" => Box::new(chain_spec::geek_testnet_config()?),
"" | "fir" | "flaming-fir" => Box::new(chain_spec::flaming_fir_config()?),
"staging" => Box::new(chain_spec::staging_testnet_config()),
path => Box::new(chain_spec::ChainSpec::from_json_file(
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 @@ -51,7 +51,7 @@ pub mod time {
/// `SLOT_DURATION` should have the same value.
///
/// <https://research.web3.foundation/en/latest/polkadot/BABE/Babe/#6-practical-results>
pub const MILLISECS_PER_BLOCK: Moment = 3000;
pub const MILLISECS_PER_BLOCK: Moment = 6000;
pub const SECS_PER_BLOCK: Moment = MILLISECS_PER_BLOCK / 1000;

pub const SLOT_DURATION: Moment = MILLISECS_PER_BLOCK;
Expand Down
2 changes: 1 addition & 1 deletion bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl pallet_balances::Trait for Runtime {
}

parameter_types! {
pub const TransactionByteFee: Balance = 10 * MILLICENTS;
pub const TransactionByteFee: Balance = 1 * MILLICENTS;
pub const TargetBlockFullness: Perquintill = Perquintill::from_percent(25);
pub AdjustmentVariable: Multiplier = Multiplier::saturating_from_rational(1, 100_000);
pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128);
Expand Down

0 comments on commit 517c72c

Please sign in to comment.