Skip to content

Commit f2680d0

Browse files
authored
Update standalone deployment (#137)
1 parent 3916293 commit f2680d0

File tree

8 files changed

+8385
-76
lines changed

8 files changed

+8385
-76
lines changed

chainspecs/standalone/tangle-standalone.json

Lines changed: 8309 additions & 0 deletions
Large diffs are not rendered by default.

node/src/chain_spec/minerva_testnet_fixtures.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ use tangle_rococo_runtime::{nimbus_session_adapter::VrfId, AccountId, ImOnlineId
2323

2424
/// Testnet root key
2525
pub fn get_testnet_root_key() -> AccountId {
26-
// Arana sudo key: 5F9jS22zsSzmWNXKt4kknBsrhVAokEQ9e3UcuBeg21hkzqWz
26+
// Standalone sudo key: 5F9jS22zsSzmWNXKt4kknBsrhVAokEQ9e3UcuBeg21hkzqWz
2727
hex!["888a3ab33eea2b827f15302cb26af0e007b067ccfbf693faff3aa7ffcfa25925"].into()
2828
}
2929

30-
/// Arana alpha bootnodes
30+
/// Standalone alpha bootnodes
3131
pub fn get_testnet_bootnodes() -> Vec<MultiaddrWithPeerId> {
3232
vec![
3333
"/ip4/18.118.130.41/tcp/30333/p2p/12D3KooWKpvw51KPvNx86jv6jLnkmnpiZubeT77LZDFyDTs7NAGW"
@@ -42,7 +42,7 @@ pub fn get_testnet_bootnodes() -> Vec<MultiaddrWithPeerId> {
4242
]
4343
}
4444

45-
/// Arana initial authorities
45+
/// Standalone initial authorities
4646
pub fn get_testnet_initial_authorities(
4747
) -> Vec<(AccountId, AuraId, DKGId, NimbusId, VrfId, ImOnlineId)> {
4848
vec![

node/src/chain_spec/rococo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use tangle_rococo_runtime::{
2525
ParachainStakingConfig, VAnchorBn254Config, VAnchorVerifierConfig, UNIT,
2626
};
2727

28-
/// Arana alpha bootnodes
28+
/// Tangle rococo bootnodes
2929
pub fn get_rococo_bootnodes() -> Vec<MultiaddrWithPeerId> {
3030
vec![
3131
"/ip4/140.82.21.142/tcp/30333/p2p/12D3KooWPa2aP9fASpyzq2zunUYQYRmc47kwER5NDjEac1ugxDGp"

primitives/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub mod fee {
110110

111111
/// The number of blocks in one session
112112
#[allow(clippy::identity_op)]
113-
pub const SESSION_PERIOD_BLOCKS: BlockNumber = 10 * crate::time::MINUTES;
113+
pub const SESSION_PERIOD_BLOCKS: BlockNumber = 1 * crate::time::HOURS;
114114

115115
/// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is
116116
/// used to limit the maximal weight of a single extrinsic.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,35 @@ fi
3131
PROJECT_ROOT=$(git rev-parse --show-toplevel)
3232
cd "$PROJECT_ROOT"
3333

34-
echo "** Generating arana local chainspec"
35-
./target/release/tangle-standalone build-spec --chain arana-local > ./chainspecs/arana-local.json
34+
echo "** Generating Standalone local chainspec"
35+
./target/release/tangle-standalone build-spec --chain standalone-local > ./chainspecs/standalone-local.json
3636

3737
echo "** Inserting keys **"
3838
./scripts/insert_keys.sh
3939

40-
echo "*** Start Webb DKG Standalone | Arana Local Config ***"
40+
echo "*** Start Webb DKG Standalone | Standalone Local Config ***"
4141
# Node 1
42-
./target/release/tangle-standalone --base-path=./tmp/standalone1 -lerror --chain ./chainspecs/arana-local.json --validator \
42+
./target/release/tangle-standalone --base-path=./tmp/standalone1 -lerror --chain ./chainspecs/standalone-local.json --validator \
4343
--rpc-cors all --unsafe-rpc-external --unsafe-ws-external \
4444
--port 30304 \
4545
--ws-port 9944 &
4646
# Node 2
47-
./target/release/tangle-standalone --base-path=./tmp/standalone2 -lerror --chain ./chainspecs/arana-local.json --validator \
47+
./target/release/tangle-standalone --base-path=./tmp/standalone2 -lerror --chain ./chainspecs/standalone-local.json --validator \
4848
--rpc-cors all --unsafe-rpc-external --unsafe-ws-external \
4949
--port 30305 \
5050
--ws-port 9945 &
5151
# Node 3
52-
./target/release/tangle-standalone --base-path=./tmp/standalone3 -lerror --chain ./chainspecs/arana-local.json --validator \
52+
./target/release/tangle-standalone --base-path=./tmp/standalone3 -lerror --chain ./chainspecs/standalone-local.json --validator \
5353
--rpc-cors all --unsafe-rpc-external --unsafe-ws-external \
5454
--port 30306 \
5555
--ws-port 9946 &
5656
# Node 4
57-
./target/release/tangle-standalone --base-path=./tmp/standalone4 -lerror --chain ./chainspecs/arana-local.json --validator \
57+
./target/release/tangle-standalone --base-path=./tmp/standalone4 -lerror --chain ./chainspecs/standalone-local.json --validator \
5858
--rpc-cors all --unsafe-rpc-external --unsafe-ws-external \
5959
--port 30307 \
6060
--ws-port 9947 &
6161
# Node 5
62-
./target/release/tangle-standalone --base-path=./tmp/standalone5 -linfo --validator --chain ./chainspecs/arana-local.json \
62+
./target/release/tangle-standalone --base-path=./tmp/standalone5 -linfo --validator --chain ./chainspecs/standalone-local.json \
6363
--rpc-cors all --unsafe-rpc-external --unsafe-ws-external \
6464
--ws-port 9948 \
6565
--port 30308 \

standalone/node/src/chain_spec.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// limitations under the License.
1414

1515
use crate::testnet_fixtures::{
16-
get_arana_bootnodes, get_arana_initial_authorities, get_testnet_root_key,
16+
get_standalone_bootnodes, get_standalone_initial_authorities, get_testnet_root_key,
1717
};
1818
use arkworks_setups::{common::setup_params, Curve};
1919
use hex_literal::hex;
@@ -247,23 +247,23 @@ pub fn local_testnet_config() -> Result<ChainSpec, String> {
247247
))
248248
}
249249

250-
pub fn arana_live_config() -> Result<ChainSpec, String> {
251-
let wasm_binary = WASM_BINARY.ok_or_else(|| "Arana wasm not available".to_string())?;
252-
let boot_nodes = get_arana_bootnodes();
250+
pub fn standalone_live_config() -> Result<ChainSpec, String> {
251+
let wasm_binary = WASM_BINARY.ok_or_else(|| "tangle wasm not available".to_string())?;
252+
let boot_nodes = get_standalone_bootnodes();
253253
let mut properties = sc_chain_spec::Properties::new();
254254
properties.insert("tokenSymbol".into(), "tTNT".into());
255255
properties.insert("tokenDecimals".into(), 18u32.into());
256256
properties.insert("ss58Format".into(), 42.into());
257257

258258
Ok(ChainSpec::from_genesis(
259-
"Arana",
260-
"arana",
259+
"Tangle Standalone",
260+
"tangle-standalone",
261261
ChainType::Development,
262262
move || {
263263
testnet_genesis(
264264
wasm_binary,
265265
// Initial PoA authorities
266-
get_arana_initial_authorities(),
266+
get_standalone_initial_authorities(),
267267
// initial nominators
268268
vec![],
269269
// Sudo account
@@ -284,7 +284,7 @@ pub fn arana_live_config() -> Result<ChainSpec, String> {
284284
],
285285
vec![],
286286
vec![],
287-
get_arana_initial_authorities().iter().map(|a| a.0.clone()).collect(),
287+
get_standalone_initial_authorities().iter().map(|a| a.0.clone()).collect(),
288288
true,
289289
)
290290
},
@@ -303,23 +303,23 @@ pub fn arana_live_config() -> Result<ChainSpec, String> {
303303
))
304304
}
305305

306-
pub fn arana_testnet_config() -> Result<ChainSpec, String> {
307-
let wasm_binary = WASM_BINARY.ok_or_else(|| "Arana wasm not available".to_string())?;
308-
let boot_nodes = get_arana_bootnodes();
306+
pub fn standalone_testnet_config() -> Result<ChainSpec, String> {
307+
let wasm_binary = WASM_BINARY.ok_or_else(|| "tangle wasm not available".to_string())?;
308+
let boot_nodes = get_standalone_bootnodes();
309309
let mut properties = sc_chain_spec::Properties::new();
310310
properties.insert("tokenSymbol".into(), "tTNT".into());
311311
properties.insert("tokenDecimals".into(), 18u32.into());
312312
properties.insert("ss58Format".into(), 42.into());
313313

314314
Ok(ChainSpec::from_genesis(
315-
"Arana Alpha",
316-
"arana-alpha",
315+
"Tangle Standalone Testnet",
316+
"tangle-standalone-testnet",
317317
ChainType::Development,
318318
move || {
319319
testnet_genesis(
320320
wasm_binary,
321321
// Initial PoA authorities
322-
get_arana_initial_authorities(),
322+
get_standalone_initial_authorities(),
323323
// initial nominators
324324
vec![],
325325
// Sudo account
@@ -340,7 +340,7 @@ pub fn arana_testnet_config() -> Result<ChainSpec, String> {
340340
],
341341
vec![],
342342
vec![],
343-
get_arana_initial_authorities().iter().map(|a| a.0.clone()).collect(),
343+
get_standalone_initial_authorities().iter().map(|a| a.0.clone()).collect(),
344344
true,
345345
)
346346
},
@@ -359,23 +359,23 @@ pub fn arana_testnet_config() -> Result<ChainSpec, String> {
359359
))
360360
}
361361

362-
// same as arana_testnet but without bootnodes so that we can spinup same network locally
363-
pub fn arana_local_config() -> Result<ChainSpec, String> {
364-
let wasm_binary = WASM_BINARY.ok_or_else(|| "Arana wasm not available".to_string())?;
362+
// same as tangle_testnet but without bootnodes so that we can spinup same network locally
363+
pub fn standalone_local_config() -> Result<ChainSpec, String> {
364+
let wasm_binary = WASM_BINARY.ok_or_else(|| "tangle wasm not available".to_string())?;
365365
let mut properties = sc_chain_spec::Properties::new();
366366
properties.insert("tokenSymbol".into(), "tTNT".into());
367367
properties.insert("tokenDecimals".into(), 18u32.into());
368368
properties.insert("ss58Format".into(), 42.into());
369369

370370
Ok(ChainSpec::from_genesis(
371-
"Arana Local",
372-
"arana-local",
371+
"Tangle Standalone Local",
372+
"tangle-standalone-local",
373373
ChainType::Development,
374374
move || {
375375
testnet_genesis(
376376
wasm_binary,
377377
// Initial PoA authorities
378-
get_arana_initial_authorities(),
378+
get_standalone_initial_authorities(),
379379
vec![],
380380
// Sudo account
381381
get_testnet_root_key(),
@@ -395,7 +395,7 @@ pub fn arana_local_config() -> Result<ChainSpec, String> {
395395
],
396396
vec![],
397397
vec![],
398-
get_arana_initial_authorities().iter().map(|a| a.0.clone()).collect(),
398+
get_standalone_initial_authorities().iter().map(|a| a.0.clone()).collect(),
399399
true,
400400
)
401401
},
@@ -522,8 +522,8 @@ fn testnet_genesis(
522522
grandpa: Default::default(),
523523
dkg: DKGConfig {
524524
authorities: initial_authorities.iter().map(|(.., x)| x.clone()).collect::<_>(),
525-
keygen_threshold: 5,
526-
signature_threshold: 3,
525+
keygen_threshold: 3,
526+
signature_threshold: 2,
527527
authority_ids: initial_authorities.iter().map(|(x, ..)| x.clone()).collect::<_>(),
528528
},
529529
dkg_proposals: DKGProposalsConfig { initial_chain_ids, initial_r_ids, initial_proposers },

standalone/node/src/command.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ impl SubstrateCli for Cli {
3939
Ok(match id {
4040
"dev" => Box::new(chain_spec::development_config()?),
4141
"" | "local" => Box::new(chain_spec::local_testnet_config()?),
42-
// generates the arana spec for testing locally
43-
"arana-local" => Box::new(chain_spec::arana_local_config()?),
44-
// generates the arana spec for testnet
45-
"arana-alpha" => Box::new(chain_spec::arana_testnet_config()?),
46-
// generates the arana spec for longterm testnet
47-
"arana" => Box::new(chain_spec::arana_live_config()?),
42+
// generates the standalone spec for testing locally
43+
"standalone-local" => Box::new(chain_spec::standalone_local_config()?),
44+
// generates the standalone spec for testnet
45+
"standalone-alpha" => Box::new(chain_spec::standalone_testnet_config()?),
46+
// generates the standalone spec for longterm testnet
47+
"standalone" => Box::new(chain_spec::standalone_live_config()?),
4848
path =>
4949
Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),
5050
})

standalone/node/src/testnet_fixtures.rs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ use tangle_runtime::AccountId;
2424

2525
/// Testnet root key
2626
pub fn get_testnet_root_key() -> AccountId {
27-
// Arana sudo key: 5F9jS22zsSzmWNXKt4kknBsrhVAokEQ9e3UcuBeg21hkzqWz
28-
hex!["888a3ab33eea2b827f15302cb26af0e007b067ccfbf693faff3aa7ffcfa25925"].into()
27+
// Standalone sudo key: 5CDZpRSZ14TmXorHTsTeksY7223FzsaLXPbpTPBUV6NaZSr1
28+
hex!["06c225d97d596c57e620aba15e1a8a69c7b334ffdab175788c6553f7dd181a56"].into()
2929
}
3030

31-
/// Arana alpha bootnodes
32-
pub fn get_arana_bootnodes() -> Vec<MultiaddrWithPeerId> {
31+
/// Standalone alpha bootnodes
32+
pub fn get_standalone_bootnodes() -> Vec<MultiaddrWithPeerId> {
3333
vec![
34-
"/ip4/140.82.21.142/tcp/30333/p2p/12D3KooWPU2eWyZrDMVtNBiKYKLGPJw8EDjbkYeXMyotmdVBKNnx"
34+
"/ip4/18.191.185.238/tcp/30333/p2p/12D3KooWPfrrLpP7rzHdkQ1bpPebq62TaUaEoA4qmGbyGUNySD8h"
3535
.parse()
3636
.unwrap(),
37-
"/ip4/149.28.81.60/tcp/30333/p2p/12D3KooWHXiHVg1YX9PHsa8NrS5ZWEoaKBydqZvLoegw2bcTiCtf"
37+
"/ip4/3.16.148.122/tcp/30333/p2p/12D3KooWA1EpUAKGHsgJc4ZfZnXS9wHzESMDDq8T7WzeHzP7pcj8"
3838
.parse()
3939
.unwrap(),
40-
"/ip4/45.32.66.129/tcp/30333/p2p/12D3KooWPEpgPPBArgEa1v7X7YR5UiZ6BLxmCsNqC8F6fJ6cULLc"
40+
"/ip4/3.143.253.232/tcp/30333/p2p/12D3KooWLGKC7vivZiSw8k82ANH5yzYvWcLJRa2n1u3Ym3WMg3K9"
4141
.parse()
4242
.unwrap(),
4343
]
4444
}
4545

46-
/// Arana initial authorities
47-
pub fn get_arana_initial_authorities(
46+
/// Standalone initial authorities
47+
pub fn get_standalone_initial_authorities(
4848
) -> Vec<(AccountId, AccountId, AuraId, GrandpaId, ImOnlineId, DKGId)> {
4949
vec![
5050
(
@@ -83,29 +83,29 @@ pub fn get_arana_initial_authorities(
8383
hex!["036aec5853fba2662f31ba89e859ac100daa6c58dc8fdaf0555565663f2b99f8f2"]
8484
.unchecked_into(),
8585
),
86-
(
87-
hex!["2c7f3cc085da9175414d1a9d40aa3aa161c8584a9ca62a938684dfbe90ae9d74"].into(),
88-
hex!["0a55e5245382700f35d16a5ea6d60a56c36c435bef7204353b8c36871f347857"].into(),
89-
hex!["9a457869037b3e7643db0b71e7340d5f319ec5b53be0bffbc8280fe9a6d6bd68"]
90-
.unchecked_into(),
91-
hex!["b0f002333f4fd657155dfcb4ac5c6ce04d0b2c68b64befa178d4357ceb05fe2d"]
92-
.unchecked_into(),
93-
hex!["9a457869037b3e7643db0b71e7340d5f319ec5b53be0bffbc8280fe9a6d6bd68"]
94-
.unchecked_into(),
95-
hex!["0297579c2b3896c65bf556e710ba361d76bff80827e30d70bc8f1d39049005c509"]
96-
.unchecked_into(),
97-
),
98-
(
99-
hex!["e0948453e7acbc6ac937e124eb01580191e99f4262d588d4524994deb6134349"].into(),
100-
hex!["6c73e5ee9f8614e7c9f23fd8f7257d12e061e75fcbeb3b50ed70eb87ba91f500"].into(),
101-
hex!["4eddfb7cdb385617475a383929a3f129acad452d5789f27ca94373a1fa877b15"]
102-
.unchecked_into(),
103-
hex!["d2eb206f8c7a64ce47828b33314806ac6cb915d464990eaff9f6435880c6e54f"]
104-
.unchecked_into(),
105-
hex!["4eddfb7cdb385617475a383929a3f129acad452d5789f27ca94373a1fa877b15"]
106-
.unchecked_into(),
107-
hex!["020d672a9e42b74d47f6280f8a5ea04f11f8ef53d9bcfba8a7c652ad0131a4d2f3"]
108-
.unchecked_into(),
109-
),
86+
// (
87+
// hex!["2c7f3cc085da9175414d1a9d40aa3aa161c8584a9ca62a938684dfbe90ae9d74"].into(),
88+
// hex!["0a55e5245382700f35d16a5ea6d60a56c36c435bef7204353b8c36871f347857"].into(),
89+
// hex!["9a457869037b3e7643db0b71e7340d5f319ec5b53be0bffbc8280fe9a6d6bd68"]
90+
// .unchecked_into(),
91+
// hex!["b0f002333f4fd657155dfcb4ac5c6ce04d0b2c68b64befa178d4357ceb05fe2d"]
92+
// .unchecked_into(),
93+
// hex!["9a457869037b3e7643db0b71e7340d5f319ec5b53be0bffbc8280fe9a6d6bd68"]
94+
// .unchecked_into(),
95+
// hex!["0297579c2b3896c65bf556e710ba361d76bff80827e30d70bc8f1d39049005c509"]
96+
// .unchecked_into(),
97+
// ),
98+
// (
99+
// hex!["e0948453e7acbc6ac937e124eb01580191e99f4262d588d4524994deb6134349"].into(),
100+
// hex!["6c73e5ee9f8614e7c9f23fd8f7257d12e061e75fcbeb3b50ed70eb87ba91f500"].into(),
101+
// hex!["4eddfb7cdb385617475a383929a3f129acad452d5789f27ca94373a1fa877b15"]
102+
// .unchecked_into(),
103+
// hex!["d2eb206f8c7a64ce47828b33314806ac6cb915d464990eaff9f6435880c6e54f"]
104+
// .unchecked_into(),
105+
// hex!["4eddfb7cdb385617475a383929a3f129acad452d5789f27ca94373a1fa877b15"]
106+
// .unchecked_into(),
107+
// hex!["020d672a9e42b74d47f6280f8a5ea04f11f8ef53d9bcfba8a7c652ad0131a4d2f3"]
108+
// .unchecked_into(),
109+
// ),
110110
]
111111
}

0 commit comments

Comments
 (0)