Compare commits

..

No commits in common. "main" and "pallet-networks" have entirely different histories.

3 changed files with 128 additions and 16 deletions

2
Cargo.lock generated
View File

@ -3836,7 +3836,7 @@ dependencies = [
[[package]]
name = "ghost-slow-clap"
version = "0.3.40"
version = "0.3.39"
dependencies = [
"frame-benchmarking",
"frame-support",

126
README.md
View File

@ -150,8 +150,28 @@ rustup default stable
rustup update
```
Add the nightly release and the nightly WebAssembly (wasm) targets
to your development environment by running the following commands:
```bash
rustup target add wasm32-unknown-unknown --toolchain stable
rustup update nightly
```
```bash
rustup target add wasm32-unknown-unknown --toolchain nightly
```
```bash
rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
```
If you are trying to install WebAssembly (wasm) on an ARM-based processor like the ones in Raspberry Pi try this instead:
```bash
rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-unknown-linux-gnu
```
**_IF error try_**
```bash
rustup target add wasm32-unknown-unknown --toolchain default
```
Verify the configuration of your development environment by running
@ -160,6 +180,10 @@ the following command:
rustup show
```
```bash
rustup +nightly show
```
You should see something like this:
![images/img_9.png](images/img_9.png)
@ -170,6 +194,13 @@ Now run:
rustup component add rust-src --toolchain stable
```
**_IF error try_**
```bash
rustup component add rust-src --toolchain default
```
## Install GHOST
Check if Git is already installed:
@ -180,7 +211,7 @@ git --version
Make a GHOST Directory and go to it:
```bash
mkdir ~/ghost && cd ~/ghost
mkdir ghost && cd ghost
```
Clone GHOST Node Git:
@ -195,7 +226,7 @@ cd ghost-node
Compile the node template by running the following command:
```bash
./scripts/starter.sh --release
cargo build --release
```
The build can take up to 20 minutes depending on the specifications of your machine.
@ -203,6 +234,7 @@ The build can take up to 20 minutes depending on the specifications of your mach
![images/img_12.png](images/img_12.png)
# Boot Node Qualification
## Boot Node Qualification Test
@ -288,7 +320,7 @@ Only `port 30333` should be opened.
Press _CTRL+C_ to stop the node.
# Launching GHOST TestNet
# Launching GHOST TestNet 3.1
Switch to main GIT branch:
```bash
@ -316,7 +348,66 @@ To generate the node key use the following command:
./target/release/ghost key generate-node-key --bin --file=/etc/ghost/node-key
```
Feel free to backup the file on a separate storage device.
Generate Wallet Key file with the following command:
```bash
./target/release/ghost key generate | grep "Secret seed" | awk '{$1=$2=""; sub(/^[ \t]+/, ""); print}' > /etc/ghost/wallet-key
```
Display the wallet-key on the screen by using cat command:
```bash
./target/release/ghost key inspect $(cat /etc/ghost/wallet-key)
```
![images/img_22.png](images/img_22.png)
Feel free to back the file on a separate storage device.
Generate Stash Key file with the following command:
```bash
./target/release/ghost key generate | grep "Secret seed" | awk '{$1=$2=""; sub(/^[ \t]+/, ""); print}' > /etc/ghost/stash-key
```
Display the stash-key on the screen by using cat command:
```bash
./target/release/ghost key inspect $(cat /etc/ghost/stash-key)
```
![images/img_23.png](images/img_23.png)
Generate Session Key file with the following command:
```bash
./target/release/ghost key generate | grep "Secret seed" | awk '{$1=$2=""; sub(/^[ \t]+/, ""); print}' > /etc/ghost/session-key
```
You have generates 4 types of Session Keys:
1. Session Key AUDI
2. Session Key BABE
3. Session Key SLOW
4. Session Key GRAN
Now let's display them!
Display the session-key//audi on the screen by using cat command:
```bash
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//audi"
```
![images/img_24.png](images/img_24.png)
Display the session-key//babe on the screen by using cat command:
```bash
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//babe"
```
![images/img_25.png](images/img_25.png)
Display the session-key//slow on the screen by using cat command:
```bash
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//slow"
```
![images/img_26.png](images/img_26.png)
Display the session-key//gran on the screen by using cat command:
```bash
./target/release/ghost key inspect "$(cat /etc/ghost/session-key)//gran" --scheme=ed25519
```
![images/img_27.png](images/img_27.png)
## Build and start the ghost-node
@ -346,7 +437,7 @@ sha256sum /etc/ghost/casper.json
You should see:
```
9da6045ed6d4fd844e3939573b31c013d0e564e542029330faa6d978cb4a915a
ad653233c978bfd00c5e4525b17628632bc4319c5f5f4b4dcc2f050ef3c3d145
```
Create running `ghost-node` service that starts on system boot using `--unit-file` flag.
@ -372,7 +463,10 @@ To choose default options press Enter here:
![images/img_30.png](images/img_30.png)
If you want to validate from this node press Enter:
Currently, you have to qualify to become a validator node through [GHOST Whales](https://ghostchain.io/whales-apply).
If you were NOT included in the [ghosties file](https://git.ghostchain.io/ghostchain/ghost-node/src/branch/main/service/ghosties) then you cannot be a validator node,
and you can only be a full node so for `disable validator mode? [y/N]` type `y`.
If you were included in the ghosties file you can press Enter:
```
disable validator mode? [y/N]: y
```
@ -417,6 +511,17 @@ Type `y` and press _Enter_ for create dedicated user for running `ghost-node`:
![images/img_37.png](images/img_37.png)
Now you can check whether or not the keys on your GHOST Node match those
in the [ghosties file](https://git.ghostchain.io/ghostchain/ghost-node/src/branch/main/service/ghosties) on GHOST Git.
If you are running a **Validator Node** and if you have followed
the Generating Keys Part you will see all `[+]`.
If you are a running a **Full Node** you will see errors:
(Press _Enter_ for prompts)
```bash
./scripts/starter.sh --check-keys
```
Full Node:
![images/img_38.png](images/img_38.png)
@ -430,7 +535,7 @@ Start `ghost-node`:
sudo systemctl start ghost-node
```
Wait ~60 seconds!
Wait 60 seconds!
Check node is started:
```bash
@ -440,6 +545,11 @@ sudo systemctl status ghost-node
For exit press _CTRL+C_
In order to insert keys run the following flags `--check-keys` `--insert-keys`:
```bash
./scripts/starter.sh --check-keys --insert-keys
```
Restart `ghost-node`:
```bash
sudo systemctl restart ghost-node

View File

@ -81,18 +81,20 @@ extract_seed() {
}
downgrade_compiler_if_needed() {
echo "[+] fetching the latest ghost-node source code"
git switch main
git pull origin main
# TODO: uncomment later
# echo "[+] fetching the latest ghost-node source code"
# git switch main
# git pull origin main
# 1.86.0 works fine, tested with:
# 1.83.0 works fine, tested with:
# ...
# 1.87.0 throws errors during compilation
# 1.88.0 throws errors during compilation
LATEST_TESTED_VERSION=86
LATEST_TESTED_VERSION=83
cargo_version=$(cargo --version | cut -d'.' -f2)
if [ "$cargo_version" -gt "$LATEST_TESTED_VERSION" ]; then
echo "[+] downgrading rustc compiler version to 1.86.0"
rustup default 1.86.0
echo "[+] downgrading rustc compiler version to 1.83.0"
rustup default 1.83.0
toolchain_name=$(rustup show | grep default | head -n 1 | cut -d' ' -f1)
rustup target add wasm32-unknown-unknown --toolchain $toolchain_name
rustup component add rust-src --toolchain $toolchain_name