mirror of
https://git.ghostchain.io/proxmio/ghost-node.git
synced 2025-12-27 19:29:56 +00:00
Compare commits
8 Commits
neptune-ke
...
metanomad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
22aa1eeafd | ||
|
|
02b591f852 | ||
|
|
a33bbc7d97 | ||
|
|
825e471edf | ||
|
|
18c6094e3f | ||
|
|
e182e86590 | ||
|
|
98e65f891e | ||
|
|
5a8e3ce9f2 |
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -1186,7 +1186,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "3.5.18"
|
version = "3.5.19"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"casper-runtime-constants",
|
"casper-runtime-constants",
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
@@ -1203,7 +1203,6 @@ dependencies = [
|
|||||||
"ghost-networks",
|
"ghost-networks",
|
||||||
"ghost-runtime-common",
|
"ghost-runtime-common",
|
||||||
"ghost-slow-clap",
|
"ghost-slow-clap",
|
||||||
"hex-literal",
|
|
||||||
"log",
|
"log",
|
||||||
"pallet-alliance",
|
"pallet-alliance",
|
||||||
"pallet-authority-discovery",
|
"pallet-authority-discovery",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-cli"
|
name = "ghost-cli"
|
||||||
description = "Implementation of a Ghost Client Node in Rust"
|
description = "Implementation of the Ghost Client Node in Rust"
|
||||||
version.workspace = true
|
version.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "casper-runtime"
|
name = "casper-runtime"
|
||||||
version = "3.5.18"
|
version = "3.5.19"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
description = "Runtime of the Casper Network"
|
description = "Runtime of the Casper Network"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
@@ -17,7 +17,6 @@ codec = { features = ["derive", "max-encoded-len"], workspace = true }
|
|||||||
scale-info = { features = ["derive"], workspace = true }
|
scale-info = { features = ["derive"], workspace = true }
|
||||||
log = { workspace = true }
|
log = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
hex-literal = { workspace = true, default-features = true }
|
|
||||||
|
|
||||||
frame-support = { workspace = true }
|
frame-support = { workspace = true }
|
||||||
frame-system = { workspace = true }
|
frame-system = { workspace = true }
|
||||||
|
|||||||
@@ -214,141 +214,6 @@ fn testnet_config_genesis(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// staging
|
|
||||||
fn casper_staging_config_genesis() -> serde_json::Value {
|
|
||||||
use hex_literal::hex;
|
|
||||||
use sp_core::crypto::UncheckedInto;
|
|
||||||
|
|
||||||
// Following keys are used in genesis config for testing (casper) chains.
|
|
||||||
// DO NOT use them in production chains such as ghost.
|
|
||||||
let endowed_accounts = vec![
|
|
||||||
// sfErNwRgZ6ypB7wY8M2smXMZjxqUkc2TgUcNvC1JNQJFXS8bw
|
|
||||||
hex!["328d3b7c3046ef7700937d99fb2e98ce2591682c2b5dcf3f562e4da157650237"].into(),
|
|
||||||
// sfEwRjyvEQcpRQ1qbCZum27nEkTggKEt7DtqxwyYQULt9UuUN
|
|
||||||
hex!["3666e4e19f87bb8680495f31864ce1f1c69d4178002cc01911aef2cc7313f203"].into(),
|
|
||||||
// sfHcJxw5cgkvukZZyxcNUMCdbm9e7773orByLrGgAREka81TK
|
|
||||||
hex!["ac871e8bab00dd56ba3a1c0bd289357203dcaf10010b0b04ad7472870cd22a3c"].into(),
|
|
||||||
];
|
|
||||||
|
|
||||||
let initial_authorities: Vec<(
|
|
||||||
AccountId,
|
|
||||||
AccountId,
|
|
||||||
BabeId,
|
|
||||||
GrandpaId,
|
|
||||||
AuthorityDiscoveryId,
|
|
||||||
SlowClapId,
|
|
||||||
)> = vec![
|
|
||||||
(
|
|
||||||
// sfFXZmnDVnkQ781J2gbqUpi7K5KgMWMdM4eeii74xxGgKYnNN
|
|
||||||
hex!["507045c82be367f95408466cd054ca39bfa52697a3ef22809af14cf9de304f02"].into(),
|
|
||||||
// sfFXZmnDVnkQ781J2gbqUpi7K5KgMWMdM4eeii74xxGgKYnNN
|
|
||||||
hex!["507045c82be367f95408466cd054ca39bfa52697a3ef22809af14cf9de304f02"].into(),
|
|
||||||
// sfJeojACBa7WiH6tBwikBKAMU2oKmseEBD1GYUYATvfWuLcPa
|
|
||||||
hex!["daaaaab6a6e574099e24ae9bb75b543610edef9d374fa85a378edb573b47615f"].unchecked_into(),
|
|
||||||
// sfFdtzNxJdeEkgHxvk144rJKxf7wcYvgX5tqfgZRutW9YvAKE
|
|
||||||
hex!["55446f9a7aa99ced06b317c80ce90d56b84e56526775683af2525969e8da0b64"].unchecked_into(),
|
|
||||||
// sfE8gsMYAjAJHk5gyYZN7AW6pfmJ7V9H7xxWto24nmhzCUXaQ
|
|
||||||
hex!["12c14850562021eb99f58f90ab624fb6cfaf3ac9228a92f8b60115fe6a6af15a"].unchecked_into(),
|
|
||||||
// sfE3GKSrKZzrZpdapJ2VGRpPor45T4D4i8QBZNumSNGqGv7PX
|
|
||||||
hex!["0e9e698c7b2bf5ce3861cb4bc4ddf9e200237c282025b093ada850d764d12a35"].unchecked_into(),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
// sfHLqWNC4hMKHhwvPWmWcxZsDPhCTQKgh1Ap7pm3qML5GBTBa
|
|
||||||
hex!["a0ba0196e6ee7e6b5b0553035c5cb5c04e9725001b5732839d0529cbc00c9600"].into(),
|
|
||||||
// sfHLqWNC4hMKHhwvPWmWcxZsDPhCTQKgh1Ap7pm3qML5GBTBa
|
|
||||||
hex!["a0ba0196e6ee7e6b5b0553035c5cb5c04e9725001b5732839d0529cbc00c9600"].into(),
|
|
||||||
// sfGA6tPPF8dAc8QpMCMjxitG3j8sXPhkdpm5bwz4UsXAApUiw
|
|
||||||
hex!["6c4dd88b43e2011cf9a6a73d53446336ac9e04cdd4ca23587df63187ac455e49"].unchecked_into(),
|
|
||||||
// sfGxQZXFUQH1AXv82rpjiJHFs7YsdEuVGdyvKiS2Tajpvw6Se
|
|
||||||
hex!["8f9ea20bf4a807a8e710f7559dece86e94672b5b361de157bdaa5c1f37849f8d"].unchecked_into(),
|
|
||||||
// sfGz2enFUR22cQ5ey61MdtPqbCeEWZA1wsCFFSLGaK7vKnv8C
|
|
||||||
hex!["90db5ed339a559ed157995a48d781f44c7df972dfba4bc855e4b59fa46438e17"].unchecked_into(),
|
|
||||||
// sfEtwe5BoroNjkdLsvnjnMemUKiw8MS1X4YW8bepbbGvhS4LZ
|
|
||||||
hex!["3481cdcbcf37a4669c29a78cf9ceb39383a10ef0a18b36b92d149fdd0c24ae00"].unchecked_into(),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
// sfGq75CrCrkcfqNzyyidu3D4jW3AoJSzL5tKKuv1UbS16ezzy
|
|
||||||
hex!["8a0d0b66e827bf20e79f9a499317e73925ce4f422371067edfab690e43857f13"].into(),
|
|
||||||
// sfGq75CrCrkcfqNzyyidu3D4jW3AoJSzL5tKKuv1UbS16ezzy
|
|
||||||
hex!["8a0d0b66e827bf20e79f9a499317e73925ce4f422371067edfab690e43857f13"].into(),
|
|
||||||
// sfJo2ogBpssRAU9ZPTvuXFZEdmJw9pKsPydLjXe8DypRScjzT
|
|
||||||
hex!["e0f0a776ecc9fa5e1f22e2fa001fe3fba5aea52b9444bc894b45589d42132475"].unchecked_into(),
|
|
||||||
// sfHq3EVT1sqY7o5ki3zA6LEdRDfdFc29YaZN3w2Thhz6JD5ZF
|
|
||||||
hex!["b63c5a0cf342b9b04931bc8ed74d7d0165ab99ab5f8a4514797d4b299a4501fe"].unchecked_into(),
|
|
||||||
// sfEj3wrDy9EDLCAodyEdQEYxJpNnM8Etaj3RJ5bCBRzdaDced
|
|
||||||
hex!["2cf69452e9f2a8457119139408884941ed50f590c0fc0f2b044c4d82c69e4245"].unchecked_into(),
|
|
||||||
// sfE32RmBp1xX4KRTphVGLUJBxLGPN3Dzg9BwCJktxMf3iEwck
|
|
||||||
hex!["0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e"].unchecked_into(),
|
|
||||||
),
|
|
||||||
];
|
|
||||||
|
|
||||||
let ghost_accounts: Vec<(AccountId, u128, u8)> = casper_testnet_evm_accounts();
|
|
||||||
let evm_networks = casper_testnet_evm_networks();
|
|
||||||
|
|
||||||
const ENDOWMENT: u128 = 5_000 * CSPR;
|
|
||||||
const STASH: u128 = 500 * CSPR;
|
|
||||||
|
|
||||||
serde_json::json!({
|
|
||||||
"balances": {
|
|
||||||
"balances": endowed_accounts
|
|
||||||
.iter()
|
|
||||||
.map(|k: &AccountId| (k.clone(), ENDOWMENT))
|
|
||||||
.chain(initial_authorities.iter().map(|x| (x.0.clone(), STASH)))
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
},
|
|
||||||
"session": {
|
|
||||||
"keys": initial_authorities
|
|
||||||
.iter()
|
|
||||||
.map(|x| {
|
|
||||||
(
|
|
||||||
x.0.clone(),
|
|
||||||
x.0.clone(),
|
|
||||||
casper_session_keys(
|
|
||||||
x.2.clone(),
|
|
||||||
x.3.clone(),
|
|
||||||
x.4.clone(),
|
|
||||||
x.5.clone(),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
},
|
|
||||||
"staking": {
|
|
||||||
"validatorCount": 50,
|
|
||||||
"minimumValidatorCount": 4,
|
|
||||||
"stakers": initial_authorities
|
|
||||||
.iter()
|
|
||||||
.map(|x| {
|
|
||||||
(
|
|
||||||
x.0.clone(),
|
|
||||||
x.0.clone(),
|
|
||||||
STASH,
|
|
||||||
StakerStatus::<AccountId>::Validator,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
"invulnerables": initial_authorities.iter().map(|x| x.0.clone()).collect::<Vec<_>>(),
|
|
||||||
"forceEra": Forcing::ForceNone,
|
|
||||||
"slashRewardFraction": Perbill::from_percent(10)
|
|
||||||
},
|
|
||||||
"babe": {
|
|
||||||
"epochConfig": Some(BABE_GENESIS_EPOCH_CONFIG),
|
|
||||||
},
|
|
||||||
"ghostNetworks": {
|
|
||||||
"networks": evm_networks,
|
|
||||||
},
|
|
||||||
"ghostClaims": {
|
|
||||||
"total": ghost_accounts
|
|
||||||
.iter()
|
|
||||||
.fold(0, |acc, k| acc + k.1),
|
|
||||||
"membersAndRanks": ghost_accounts
|
|
||||||
.iter()
|
|
||||||
.map(|k| (k.0.clone(), k.2.clone()))
|
|
||||||
.collect::<Vec<_>>(),
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// development
|
// development
|
||||||
fn casper_development_config_genesis() -> serde_json::Value {
|
fn casper_development_config_genesis() -> serde_json::Value {
|
||||||
testnet_config_genesis(
|
testnet_config_genesis(
|
||||||
@@ -372,7 +237,6 @@ fn casper_local_config_genesis() -> serde_json::Value {
|
|||||||
pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option<sp_std::vec::Vec<u8>> {
|
pub fn get_preset(id: &sp_genesis_builder::PresetId) -> Option<sp_std::vec::Vec<u8>> {
|
||||||
let patch = match id.try_into() {
|
let patch = match id.try_into() {
|
||||||
Ok("development") => casper_development_config_genesis(),
|
Ok("development") => casper_development_config_genesis(),
|
||||||
Ok("staging") => casper_staging_config_genesis(),
|
|
||||||
Ok("local_testnet") => casper_local_config_genesis(),
|
Ok("local_testnet") => casper_local_config_genesis(),
|
||||||
_ => return None,
|
_ => return None,
|
||||||
};
|
};
|
||||||
@@ -386,6 +250,5 @@ pub fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
|
|||||||
Vec::from([
|
Vec::from([
|
||||||
sp_genesis_builder::PresetId::from("local_testnet"),
|
sp_genesis_builder::PresetId::from("local_testnet"),
|
||||||
sp_genesis_builder::PresetId::from("development"),
|
sp_genesis_builder::PresetId::from("development"),
|
||||||
sp_genesis_builder::PresetId::from("staging"),
|
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,13 +289,17 @@ if [ $UNIT_FILE = true ]; then
|
|||||||
echo "[!] user ghost not found"
|
echo "[!] user ghost not found"
|
||||||
if prompt "[?] do you want to create ghost user? (NOT RECOMMENDED: current $(whoami))"; then
|
if prompt "[?] do you want to create ghost user? (NOT RECOMMENDED: current $(whoami))"; then
|
||||||
sudo useradd --system --create-home $user_name
|
sudo useradd --system --create-home $user_name
|
||||||
|
else
|
||||||
|
user_name=$(whoami)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d $BASE_PATH ]; then
|
if [ ! -d $BASE_PATH ]; then
|
||||||
echo "[+] create folder for the node at '$BASE_PATH'"
|
echo "[+] create folder for the node at '$BASE_PATH'"
|
||||||
sudo mkdir $BASE_PATH
|
sudo mkdir $BASE_PATH
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
user_name=$(whoami)
|
if [ -z "$(stat -c "%U %G" $BASE_PATH | grep $user_name)" ]; then
|
||||||
fi
|
|
||||||
echo "[+] make $user_name owner of $BASE_PATH"
|
echo "[+] make $user_name owner of $BASE_PATH"
|
||||||
sudo chown -R "$user_name:" $BASE_PATH
|
sudo chown -R "$user_name:" $BASE_PATH
|
||||||
fi
|
fi
|
||||||
@@ -366,7 +370,8 @@ if [[ $ARGUMENTS = true ]]; then
|
|||||||
CLI_ARGS+=("--no-mdns")
|
CLI_ARGS+=("--no-mdns")
|
||||||
CLI_ARGS+=("--no-hardware-benchmarks")
|
CLI_ARGS+=("--no-hardware-benchmarks")
|
||||||
|
|
||||||
echo "[+] trying to save GHOST_CLI_ARGS=\"$(IFS=' '; echo "${CLI_ARGS[*]}")\"" > /tmp/ghost
|
echo "[+] trying to save new node arguments"
|
||||||
|
echo "GHOST_CLI_ARGS=\"$(IFS=' '; echo "${CLI_ARGS[*]}")\"" > /tmp/ghost
|
||||||
sudo cp /tmp/ghost /etc/default/ghost
|
sudo cp /tmp/ghost /etc/default/ghost
|
||||||
rm /tmp/ghost
|
rm /tmp/ghost
|
||||||
echo "[+] new CLI arguments stored in '/etc/default/ghost'"
|
echo "[+] new CLI arguments stored in '/etc/default/ghost'"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -38,12 +38,24 @@ Public key (hex) for babe : 0xe0f0a776ecc9fa5e1f22e2fa001fe3fba5aea52b9444bc894
|
|||||||
Public key (hex) for slow : 0x0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e
|
Public key (hex) for slow : 0x0e6fa6934f9e99fa84874f2ed9318825a0d5443a0ced984acfbd24ece72ba55e
|
||||||
Public key (hex) for gran : 0xb63c5a0cf342b9b04931bc8ed74d7d0165ab99ab5f8a4514797d4b299a4501fe
|
Public key (hex) for gran : 0xb63c5a0cf342b9b04931bc8ed74d7d0165ab99ab5f8a4514797d4b299a4501fe
|
||||||
|
|
||||||
### Neptune 2 ###
|
<<<<<<< HEAD
|
||||||
Local identity : 12D3KooWPQXpz8UM9uBsB7pcv12pLCLbYdk8W3SHrZBgiju2fbAs
|
### Neptune ###
|
||||||
Public key (hex) wallet : 0x425ccd7bda4f5c76788ba23bc0381d7a2e496179c93301208c57501c80a4232a
|
Local identity : 12D3KooWJXBYA7cUQLLenEfT7hmCjBJ6fyikDy8YhNz4aLfwbBC8
|
||||||
|
Public key (hex) wallet : 0x6e4429a8fa85cfe2a60488af446d57e719207831b2579b937325645e110bb666
|
||||||
===============================================================================================
|
===============================================================================================
|
||||||
Public key (hex) stash : 0x6c0283f4c688f0e75ad546c790bbd5961c1a6931543aa589f368f8272c44b758
|
Public key (hex) for stash : 0x3a6626211a2dd35683fd7cb5f2f343d75f2b698d6c48c2d6eb1cdbe116e32315
|
||||||
Public key (hex) audi : 0x00946618c353e4c6546b87f9ca1089b846b0ea4658ee8e6d9d1200c24cb5ee27
|
Public key (hex) for audi : 0x86676ad3cd2d970b86dee2f25d4318f9bba40455111f16300e114e7f00c58706
|
||||||
Public key (hex) babe : 0x74fa7381a7a74b316afb6793a00387eed9d95d46a69866cbb316b5d9c918af0e
|
Public key (hex) for babe : 0x6c0aec49974aaff08ff962a2d8d7857227d027ed27a272cbc4acaa1ee937db0f
|
||||||
Public key (hex) slow : 0x520e74f8c5853ec8577932327ad3247656db25b74c79ad09adb431b271002401
|
Public key (hex) for slow : 0x009712519ba7dad1c682c871b94573ccaba8b7d530f7194fb16bf553fd7ae67d
|
||||||
Public key (hex) gran : 0x236d2fa03f4ed8cb65de7e514d7540159b328f1c170dd402b094ad7fbf547218
|
Public key (hex) for gran : 0x935becdfb2e0d4fcd46ba82e680cfc447180de6b85ec42d17f1396a520b0c04f
|
||||||
|
=======
|
||||||
|
### Metanomad ###
|
||||||
|
Local identity : 12D3KooWJASrFcdtDNpWfaNLdbjHJVMz7FStySNvi2iDvjeqWRTJ
|
||||||
|
Public key (hex) wallet : 0x385dc4812133d58e558e5483401807dbdb040717d09dedd51839ef37628f0362
|
||||||
|
===============================================================================================
|
||||||
|
Public key (hex) for stash : 0x80e719e6eea7eef6f057b5b8d968817dc3e54f3251ea666b2748ee148b106c75
|
||||||
|
Public key (hex) for audi : 0x8618f3160621c67fcba8d147672998f7b8fea4f4cdf89bc4b08b06cee6ef0070
|
||||||
|
Public key (hex) for babe : 0x62e37d8b5990c7e45a1003e29898d2fc92d63616fbe24f7ba2fa8e862bf2e97a
|
||||||
|
Public key (hex) for slow : 0x1cada737675d125c16ab6180d3bede543de0519d6bb70e871cd55b197e31cf4d
|
||||||
|
Public key (hex) for gran : 0x492ae5b511805073e5adc66f51766b81c02450bcb5d3ef45e6b9cec7aa1b71c8
|
||||||
|
>>>>>>> a33bbc7d976c806a0094a4212fd62292ba56d989
|
||||||
|
|||||||
Reference in New Issue
Block a user