Launching GHOST TestNet 2.0 [~1 HR]

  • Post author:
  • Post category:Guide
You are currently viewing Launching GHOST TestNet 2.0 [~1 HR]

Introduction

Welcome to the GHOST TestNet 2.0 Launch guide. In TestNet 1.0 only 2 nodes ran at any one point in time. One node was Alice and another was Bob. The main goal with TestNet 2.0 is to create blockchain that has as many nodes as possible running 24/7 from as many geographical locations as possible. TestNet 2.0 nodes that have participated in the genesis block will receive some $CSPR coin for future testing that may or may not include send/receive and staking functionality.

1. Prerequisites

Launching GHOST TestNet 2.0 Prerequisites

Before you can proceed with launching you GHOST Node please make sure to go though the following guide:

  1. GHOST Chain Startup Guide – create the proper environment and install GHOST Chain.
  2. Generating Keys & Applying for Genesis Block – generate GHOST Node keys and apply for TestNet genesis block. **OPTIONAL** Only do this if you have been preapproved by GHOST validators.
  3. Testing Connectivity Guide – test whether or not you node can become a Boot Node and set proper firewall rules.

2. Launching GHOST TestNet 2.0

Launching GHOST TestNet 2.0 Launch GHOST Node

Stop ghost-node:

sudo systemctl stop ghost-node

Go to ghost-node directory:

cd ghost/ghost-node

Remove ghost ledger:

sudo rm -rf /var/lib/ghost

Switch to main GIT branch:

git switch main

Make sure ghost-node is up to date:

git pull origin main

Recompile ghost-node using starter.sh and --release flag. Make ghost-node service being able to be started by default user using --make-global:

./scripts/starter.sh --release --make-global

The default option is capitalized which is N, you can also press Enter to choose the default option. In this case we want to recompile so type y and press Enter to proceed:

'cargo build --release ' is what you want? [y/N]:

Recompiling will take some time!

Check the hash of the build:

sha256sum /etc/ghost/casper.json

You should see:

6c1bab2e9...b49fbc5008

Create running ghost-node service that starts on system boot using --unit-file flag. And we must set up the ghost-node launch command by setting arguments using --set-arguments flag:

./scripts/starter.sh --unit-file --set-arguments

Only change the defaults if you are advanced otherwise press Enter for the following prompts.

If this is your first node simply press Enter to proceed with the default. If this is your second node you should type a different port here, for example 30334, and then you should open this port on your firewall and create a dedicated port forwarding rule on your router as specified in the Testing Connectivity Guide:

specify p2p protocol TCP port (default: 30333):

To choose default options press Enter here:

specify JSON-RPC server TCP port: (default: 9945): 
specify the chain specification (default: /etc/ghost/casper.json):
specify node's secret key file for p2p networking (default: /etc/ghost/node-key):

It is recommended that you give your node a Name you can recognize:

specify name for the node (default: RANDOM_NAME):

Validator Node vs Full Node

Currently you have to qualify to become a validator node through GHOST Whales. If you were NOT included in the ghosties file 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 the you can press Enter:

disable validator mode? [y/N]: y

You can press Enter here:

enable prometheus? [y/N]:

Boot Node

For the following prompt:

list of bootnodes if any:

Paste one of the following Boot Node address:

IMPORTANT!!!
If you want your node to become a GHOST Chain Boot Node and to have a dedicated Boot Node Address listed in this guide please follow the Create Custom Boot Node Address guide and let us know in GHOST Whales.
Boot Node Address Port Status
/dns/bootnode69.chain.ghostchain.io/tcp/30334/p2p/12D3KooWF9SWxz9dmy6vfndQhoxqCa7PESaoFWEiF8Jkqh4xKDRf
Checking port 30334 for https://bootnode69.chain.ghostchain.io...
/dns/bootnode70.chain.ghostchain.io/tcp/30333/p2p/12D3KooWP3h5dSdqcpvsCr7fp1jyfqDj291QDZ68a4gY6VQ8T1nW
Checking port 30333 for https://bootnode70.chain.ghostchain.io...
/dns/ghostvision.mywire.org/tcp/30333/p2p/12D3KooWR5JJQ9mALPpnSxfZm5M23AByitSfxpei9ZDghU1NLNeW
Checking port 30333 for https://ghostvision.mywire.org...
/dns/ghostvision.mywire.org/tcp/30334/p2p/12D3KooWDs4i6VoK4dpwGSUVtZENzSmsbQk3tF63gYT745x7eAb2
Checking port 30334 for https://ghostvision.mywire.org...
/dns/ghostvision.mywire.org/tcp/30335/p2p/12D3KooWJMiF7LUmDZ17NJRi9yHusHG4hrLGxoPv6sS7K2Vpn9P2
Checking port 30335 for https://ghostvision.mywire.org...
/ip4/84.247.181.131/tcp/30333/p2p/12D3KooWJXBYA7cUQLLenEfT7hmCjBJ6fyikDy8YhNz4aLfwbBC8
Checking port 30333 for http://84.247.181.131...
/ip4/47.199.13.160/tcp/30333/p2p/12D3KooWQHiwqRokC3BmDrZ9LszxwFj7vjJ2adJDZPVQvRJXSA42
Checking port 30333 for http://47.199.13.160...
/ip4/85.190.242.68/tcp/30334/p2p/12D3KooWEcJAQHs59gD3hDWU5UXxc9nNQcS6dPe3cnFtL8bBuEnw
Checking port 30334 for http://85.190.242.68...
/ip4/47.199.13.160/tcp/30334/p2p/12D3KooWB4758nu1pXuFiawKZ6R8ZRYzHS367afPnyJKScmLQ81x
Checking port 30334 for http://47.199.13.160...
/ip4/47.199.13.160/tcp/30335/p2p/12D3KooWRHyMrQDqQLbEtADi84FBtxn4gu7iu9VKtFPvhHLsoSsF
Checking port 30335 for http://47.199.13.160...
/ip4/47.199.13.160/tcp/30336/p2p/12D3KooWD6YmEzC44HDZ5pDbQ8MU2V2i3e9vq7ay1pE7QoAC37e2
Checking port 30336 for http://47.199.13.160...
/ip4/47.199.13.160/tcp/30337/p2p/12D3KooWJbwRwvYxZCVtzw7hUq3CuA9LrzotgEcAT6zkc9sc81w4
Checking port 30337 for http://47.199.13.160...
/dns/Fujisan1.mywire.org/tcp/30333/p2p/12D3KooWHZubqyhyU68wfWvhtXJCdSH6mJW8DPz45xK2zG6eXkHo
Checking port 30333 for http://Fujisan1.mywire.org...
/dns/Fujisan1.mywire.org/tcp/30334/p2p/12D3KooWHZubqyhyU68wfWvhtXJCdSH6mJW8DPz45xK2zG6eXkHo
Checking port 30334 for http://Fujisan1.mywire.org...
/dns/Fujisan1.mywire.org/tcp/30335/p2p/12D3KooWHZubqyhyU68wfWvhtXJCdSH6mJW8DPz45xK2zG6eXkHo
Checking port 30335 for http://Fujisan1.mywire.org...
/dns/Fujisan1.mywire.org/tcp/30336/p2p/12D3KooWHZubqyhyU68wfWvhtXJCdSH6mJW8DPz45xK2zG6eXkHo
Checking port 30336 for http://Fujisan1.mywire.org...

Changing unit-file name is optional, otherwise press Enter:

[?] name for the unit file (default: ghost-node.service)

IF ERROR and [!] user ghost not found pops up press y:

[!] user ghost not found
[?] do you want to create ghost user? (NOT RECOMMENDED: current root) [y/N]:
[+] make ghost owner of /var/lib/ghost
[+] prepare unit file for the ghost-node.service
[+] reloading systemd because of updated unit file

DO NOT start and enable ghost-node.service press Enter:

[?] do you want to start the ghost-node.service? [y/N]:
[?] do you want to enable the ghost-node.service? [y/N]:
[+] execution finished

Now you can check whether or not the keys on your GHOST Node match those in the ghosties file on GHOST Git. If you are running a Validator Node and if you have followed the Generating Keys Guide you will see all [+]. If you are a running a Full Node you will see errors:

./scripts/starter.sh --check-keys

If you have followed Generating Keys Guide these should contain default paths so press Enter:

[?] path to the file with wallet key: (default: /etc/ghost/wallet-key)
[?] path to the file with stash key: (default: /etc/ghost/stash-key)
[?] path to the file with session key: (default: /etc/ghost/session-key)

Validator Nodes --check-keys results:

Launching GHOST TestNet 2.0 Starter.sh Check Keys Flag
starter.sh –check-keys flag results for Validator Nodes

Full Nodes --check-keys results:

Launching GHOST TestNet 2.0 Starter.sh Check Keys Flag Full Node
starter.sh –check-keys flag results for Full Nodes

Start ghost-node:

sudo systemctl start ghost-node

Wait 60 seconds!

In order to insert keys run the following flags --check-keys --insert-keys:

./scripts/starter.sh --check-keys --insert-keys

Restart ghost-node:

sudo systemctl restart ghost-node

Enable ghost-node:

sudo systemctl enable ghost-node

To see the logs produced by your ghost-node:

journalctl -f -u ghost-node

To exit journalctl -f -u ghost-node Press CTRL + C.

Finally, go to GHOST Telemetry so see your node live on the map.

Congratulations! You have an operational GHOST Node.

3. Troubleshooting

Launching GHOST TestNet 2.0 Troubleshooting
For future troubleshooting be aware of the following commands:

Update GHOST Node

Go to GHOST directory:

cd ghost/ghost-node

Pull the most recent GHOST Node Repo:

git pull origin main

Set arguments. In one of the prompts it is recommended that you give your node a Name you can recognize:

./scripts/starter.sh --set-arguments
## do all steps

Check GHOST Node log:

journalctl -f -u ghost-node

To exit journalctl -f -u ghost-node Press CTRL + C.

Delete GHOST Chain ledger

sudo systemctl stop ghost-node
sudo rm -rf /var/lib/ghost
./scripts/starter.sh --unit-file
sudo systemctl start ghost-node

Check session keys

./scripts/starter.sh --check-keys --insert-keys
sudo ls -l /var/lib/ghost/chains/casper_staging_testnet/keystore/
sudo systemctl restart ghost-node.service

Miscellaneous

To soft reload the entire system:

sudo systemctl daemon-reload

To stop ghost-node:

sudo systemctl stop ghost-node

To restart ghost-node:

sudo systemctl restart ghost-node

To see the logs produced by your ghost-node:

journalctl -f -u ghost-node

What is GHOST?

GHOST Ecosystem is at the forefront of decentralized cross-chain interoperability, providing the ability to transfer tokens, NFTs, and other digital assets across multiple blockchains.

ghostAirdrop | ghostAirdrop Bot | Medium | Telegram | Twitter | Website