Skip to content

Commit

Permalink
Merge pull request #297 from darwinia-network/denny_housekeeping
Browse files Browse the repository at this point in the history
House keeping Related.
  • Loading branch information
AurevoirXavier authored Feb 28, 2020
2 parents 5a50b74 + ae37d2f commit 823b6c5
Show file tree
Hide file tree
Showing 24 changed files with 373 additions and 383 deletions.
355 changes: 175 additions & 180 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
image:https://travis-ci.org/darwinia-network/darwinia.svg[Build Status (Travis CI),link=https://travis-ci.org/darwinia-network/darwinia]
image:https://img.shields.io/badge/License-Apache%202.0-blue.svg[License,link=https://opensource.org/licenses/Apache-2.0]

== Darwinia Relay Chain
== Darwinia Network

image:https://github.com/darwinia-network/rfcs/raw/master/logo/darwinia.png[image]

Darwinia Relay Chain is the hub relay chain connecting different Darwinia AppChains and can be connected to Polkadot as a Polkadot Parachain.
Darwinia is the hub chain connecting different application chains and can be connected to Polkadot as a Polkadot Parachain.

Darwinia also support to build the internet of tokens by introducing token bridges between different blockchain networks.

It could have two models, the Solo model and the Polkadot model. For more details, go to https://github.com/darwinia-network/rfcs/blob/master/RFC/zh_CN/0007-dawinia-token-staking-model.md#solo%E6%A8%A1%E5%BC%8F[RFC-0007].

Expand All @@ -21,7 +23,7 @@ image:https://github.com/darwinia-network/rfcs/raw/master/RFC/zh_CN/images/0007-

== Road Map

Darwinia Network provides game developers the scalability, cross-chain interoperability, and NFT identifiability, with seamless integrations to Polkadot, bridges to all major blockchains, and on-chain RNG services. For more details, go to link:ROADMAP.md[Road Map].
Darwinia Network provides application developers the scalability, cross-chain interoperability with seamless integrations to Polkadot, token bridges to all major blockchains etc. For more details, go to link:ROADMAP.md[Road Map].

// === So far

Expand Down Expand Up @@ -232,13 +234,13 @@ please kindly check following things before making an issue.
* using the latest nightly Rust
* build without `sccache`

== Joining the Canary Testnet
== Joining the Crab Testnet

// Latest known working version: ``

=== Quick start (professional):
* https://telemetry.polkadot.io/#list/Darwinia%20Canary%20Testnet[Telemetry]
* https://canary-wallet.darwinia.network[Darwinia Web Wallet]
* https://telemetry.polkadot.io/#list/Darwinia%20Crab%20Testnet[Telemetry]
* https://crab-wallet.darwinia.network[Darwinia Web Wallet]
* Bootnodes:
** `/ip4/45.249.244.33/tcp/20222/p2p/QmPCSb9yCRAXnqvG6AnX27X6gutvVDq4NBPDNJtnBmNk43`
** `/ip4/121.199.60.87/tcp/20222/p2p/QmaRDRZZpmY9FwjSwW8JhfkyaHc6XRHsLWnp6cLtyb3FCF`
Expand Down
72 changes: 36 additions & 36 deletions bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,44 +34,44 @@ serde = { version = "1.0.102", features = ["derive"] }
structopt = "=0.3.7"

# primitives
grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-authority-discovery = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-consensus = { version = "0.8", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-consensus-babe = { version = "0.8", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-core = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-finality-tracker = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-inherents = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-io = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-keyring = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-runtime = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-timestamp = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
grandpa-primitives = { version = "2.0.0", package = "sp-finality-grandpa", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-authority-discovery = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-consensus = { version = "0.8", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-consensus-babe = { version = "0.8", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-core = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-finality-tracker = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-inherents = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-io = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-keyring = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-runtime = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-timestamp = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

# client dependencies
grandpa = { version = "2.0.0", package = "sc-finality-grandpa", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-authority-discovery = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-basic-authority = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-chain-spec = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-client = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-client-api = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-client-db = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-consensus-babe = { version = "0.8", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-network = { version = "0.8", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-offchain = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-rpc = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-service = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-telemetry = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-transaction-pool = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-transaction-pool = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
grandpa = { version = "2.0.0", package = "sc-finality-grandpa", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-authority-discovery = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-basic-authority = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-chain-spec = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-client = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-client-api = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-client-db = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-consensus-babe = { version = "0.8", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-network = { version = "0.8", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-offchain = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-rpc = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-service = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-telemetry = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-transaction-pool = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-transaction-pool = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

# frame dependencies
frame-support = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
frame-system = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-authority-discovery = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-contracts = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-im-online = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-indices = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-timestamp = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-transaction-payment = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
frame-support = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
frame-system = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
pallet-authority-discovery = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
pallet-contracts = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
pallet-im-online = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
pallet-indices = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
pallet-timestamp = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
pallet-transaction-payment = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

# node-specific dependencies
node-executor = { path = "../executor" }
Expand All @@ -81,7 +81,7 @@ node-runtime = { path = "../runtime" }

# CLI-specific dependencies
ctrlc = { version = "3.1.3", features = ["termination"], optional = true }
node-transaction-factory = { version = "2.0.0", optional = true, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
node-transaction-factory = { version = "2.0.0", optional = true, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
tokio = { version = "0.1.22", optional = true }

sc-cli = { package = "darwinia-cli", optional = true, path = "../../../client/cli" }
Expand All @@ -101,7 +101,7 @@ wasm-bindgen-futures = { version = "0.3.22", optional = true }
structopt = "=0.3.7"
vergen = "3.0.4"

build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
build-script-utils = { version = "2.0.0", package = "substrate-build-script-utils", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

sc-cli = { package = "darwinia-cli", path = "../../../client/cli" }

Expand Down
4 changes: 2 additions & 2 deletions bin/node/cli/res/canary.json → bin/node/cli/res/crab.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Darwinia Canary Testnet",
"id": "canary_testnet",
"name": "Darwinia Crab Testnet",
"id": "crab_testnet",
"bootNodes": [],
"telemetryEndpoints": [
[
Expand Down
28 changes: 14 additions & 14 deletions bin/node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ pub struct Extensions {

/// Specialized `ChainSpec`.
pub type ChainSpec = sc_service::ChainSpec<GenesisConfig, Extensions>;
/// Canary testnet generator
pub fn canary_testnet_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/canary.json")[..])
/// Crab testnet generator
pub fn crab_testnet_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../res/crab.json")[..])
}

fn session_keys(
Expand Down Expand Up @@ -355,9 +355,9 @@ pub fn development_config() -> ChainSpec {
)
}

/// Canary local testnet config (multivalidator Alice + Bob)
/// Crab local testnet config (multivalidator Alice + Bob)
pub fn local_testnet_config() -> ChainSpec {
fn canary_config_genesis() -> GenesisConfig {
fn crab_config_genesis() -> GenesisConfig {
darwinia_genesis(
vec![
get_authority_keys_from_seed("Alice"),
Expand All @@ -382,9 +382,9 @@ pub fn local_testnet_config() -> ChainSpec {
}

ChainSpec::from_genesis(
"Darwinia Canary Testnet",
"canary_testnet",
canary_config_genesis,
"Darwinia Crab Testnet",
"crab_testnet",
crab_config_genesis,
vec![],
Some(TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(), 0)])),
Some("DAR"),
Expand All @@ -404,9 +404,9 @@ pub fn local_testnet_config() -> ChainSpec {
)
}

/// Canary testnet config generator
pub fn gen_canary_testnet_config() -> ChainSpec {
fn canary_config_genesis() -> GenesisConfig {
/// Crab testnet config generator
pub fn gen_crab_testnet_config() -> ChainSpec {
fn crab_config_genesis() -> GenesisConfig {
darwinia_genesis(
vec![
(
Expand Down Expand Up @@ -445,9 +445,9 @@ pub fn gen_canary_testnet_config() -> ChainSpec {
}

ChainSpec::from_genesis(
"Darwinia Canary Testnet",
"canary_testnet",
canary_config_genesis,
"Darwinia Crab Testnet",
"crab_testnet",
crab_config_genesis,
vec![],
Some(TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(), 0)])),
Some("DAR"),
Expand Down
16 changes: 8 additions & 8 deletions bin/node/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ pub enum ChainSpec {
Development,
/// Whatever the current runtime is, with simple Alice/Bob auths.
LocalTestnet,
/// Generate Canary testnet config.
GenCanaryTestnet,
/// The Canary testnet.
CanaryTestnet,
/// Generate Crab testnet config.
GenCrabTestnet,
/// The Crab testnet.
CrabTestnet,
/// Whatever the current runtime is with the "global testnet" defaults.
StagingTestnet,
}
Expand All @@ -51,8 +51,8 @@ impl ChainSpec {
ChainSpec::Development => chain_spec::development_config(),
ChainSpec::LocalTestnet => chain_spec::local_testnet_config(),
ChainSpec::StagingTestnet => chain_spec::staging_testnet_config(),
ChainSpec::GenCanaryTestnet => chain_spec::gen_canary_testnet_config(),
ChainSpec::CanaryTestnet => chain_spec::canary_testnet_config()?,
ChainSpec::GenCrabTestnet => chain_spec::gen_crab_testnet_config(),
ChainSpec::CrabTestnet => chain_spec::crab_testnet_config()?,
})
}

Expand All @@ -61,8 +61,8 @@ impl ChainSpec {
"dev" => Some(ChainSpec::Development),
"local" => Some(ChainSpec::LocalTestnet),
"staging" => Some(ChainSpec::StagingTestnet),
"gen" => Some(ChainSpec::GenCanaryTestnet),
"" | "canary" | "Canary" => Some(ChainSpec::CanaryTestnet),
"gen" => Some(ChainSpec::GenCrabTestnet),
"" | "crab" | "Crab" => Some(ChainSpec::CrabTestnet),
_ => None,
}
}
Expand Down
10 changes: 5 additions & 5 deletions bin/node/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ codec = { package = "parity-scale-codec", version = "1.0.0" }
trie-root = "0.15.2"

# github.com
sp-core = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-executor = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-io = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-state-machine = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-trie = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-core = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-executor = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-io = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-state-machine = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-trie = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

# darwinia
node-primitives = { path = "../primitives" }
Expand Down
4 changes: 2 additions & 2 deletions bin/node/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ authors = ["darwinia <hello@darwinia.network>"]
edition = "2018"

[dependencies]
sp-core = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-runtime = { version = "2.0.0", default-features = false, git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-core = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-runtime = { version = "2.0.0", default-features = false, git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion bin/node/rpc-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jsonrpc-core-client = { version = "14.0.3", features = ["http", "ws"] }
log = "0.4.8"

# github.com
sc-rpc = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-rpc = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

# darwinia
node-primitives = { path = "../primitives" }
12 changes: 6 additions & 6 deletions bin/node/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ edition = "2018"
jsonrpc-core = "14.0.3"

# github.com
pallet-contracts-rpc = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-transaction-payment-rpc = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sc-client = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-runtime = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
sp-transaction-pool = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
substrate-frame-rpc-system = { version = "2.0.0", git = "https://github.com/paritytech/substrate.git", tag = "pre-v2.0-3e65111" }
pallet-contracts-rpc = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
pallet-transaction-payment-rpc = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sc-client = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-runtime = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
sp-transaction-pool = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }
substrate-frame-rpc-system = { version = "2.0.0", git = "https://github.com/darwinia-network/substrate.git", branch = "darwinia-develop" }

# darwinia
node-primitives = { path = "../primitives" }
Expand Down
Loading

0 comments on commit 823b6c5

Please sign in to comment.