Skip to content

Commit

Permalink
Add Flint CC2 genesis (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipstanislaus authored Jan 17, 2020
1 parent 6a3bdf9 commit 638b681
Show file tree
Hide file tree
Showing 3 changed files with 128 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Validator Bob:
Validator Alice (Pass libp2p address of Bob's node above as the bootnode here)
`./target/debug/centrifuge-chain --ws-external --validator --node-key=2a654a0958cd0e10626c36057c46a08018eaf2901f9bab74ecc1144f714300ac --rpc-cors=all --chain=fulvous --base-path /tmp/talice --bootnodes=/ip4/127.0.0.1/tcp/30333/p2p/QmNpeu3bJhESzriWMLRcxRgSCYDGQ6GdBHnJAf8bJexAd5 --rpc-port=9935 --ws-port=9945`

#### Using the genesis file,
#### Using the genesis file

Validator Bob:
`./target/debug/centrifuge-chain --ws-external --validator --node-key=66ef62065cfdc48929b5cb9c1bbc0a728e6d1d43b4ba1de13ccf76c7ecec66e9 --bob --rpc-cors=all --chain=testts/fulvous.raw.json --base-path /tmp/tbob`
Expand Down
124 changes: 124 additions & 0 deletions res/flint-cc2-spec.json

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ impl Alternative {
|| {
testnet_genesis(
vec![get_authority_keys_from_seed("Alice")],
get_account_id_from_seed::<sr25519::Public>("Alice"),
None,
true,
)
Expand All @@ -129,7 +128,6 @@ impl Alternative {
get_authority_keys_from_seed("Alice"),
get_authority_keys_from_seed("Bob"),
],
get_account_id_from_seed::<sr25519::Public>("Alice"),
None,
true,
)
Expand Down Expand Up @@ -165,7 +163,6 @@ impl Alternative {
hex!["42a6fcd852ef2fe2205de2a3d555e076353b711800c6b59aef67c7c7c1acf04d"].unchecked_into(), // TODO replace with other AccountId
),
],
hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"].into(),
Some(vec![
hex!["c405224448dcd4259816b09cfedbd8df0e6796b16286ea18efa2d6343da5992e"].into()
]),
Expand All @@ -182,8 +179,8 @@ impl Alternative {
// Flint initial spec
Alternative::Flint => {
ChainSpec::from_genesis(
"Flint Testnet CC1",
"flint-cc1",
"Flint Testnet CC2",
"flint-cc2",
|| {
testnet_genesis(
vec![
Expand All @@ -204,7 +201,6 @@ impl Alternative {
hex!["16cde0520759b2ac5bc63c0a5a5ca4f8b97e2757bd8e8484c25aa73fb0f93955"].unchecked_into(),
),
],
hex!["c4051f94a879bd014647993acb2d52c4059a872b6e202e70c3121212416c5842"].into(),
Some(vec![
hex!["c4051f94a879bd014647993acb2d52c4059a872b6e202e70c3121212416c5842"].into(),
]),
Expand All @@ -213,7 +209,7 @@ impl Alternative {
},
vec![],
Some(TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(), 0)])),
Some("flint-cc1"),
Some("flint-cc2"),
Some(get_default_properties("FRAD")),
Default::default(),
)
Expand All @@ -234,7 +230,6 @@ impl Alternative {

fn testnet_genesis(
initial_authorities: Vec<(AccountId, AccountId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId)>, // StashId, ControllerId, GrandpaId, BabeId, ImOnlineId, AuthorityDiscoveryId
root_key: AccountId,
endowed_accounts: Option<Vec<AccountId>>,
_enable_println: bool,
) -> GenesisConfig {
Expand Down Expand Up @@ -359,7 +354,6 @@ pub(crate) mod tests {
vec![
get_authority_keys_from_seed("Alice"),
],
get_account_id_from_seed::<sr25519::Public>("Alice"),
None,
false,
)
Expand All @@ -385,7 +379,6 @@ pub(crate) mod tests {
get_authority_keys_from_seed("Alice"),
get_authority_keys_from_seed("Bob"),
],
get_account_id_from_seed::<sr25519::Public>("Alice"),
None,
false,
)
Expand Down

0 comments on commit 638b681

Please sign in to comment.