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):
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:

/dns/bootnode69.chain.ghostchain.io/tcp/30334/p2p/12D3KooWF9SWxz9dmy6vfndQhoxqCa7PESaoFWEiF8Jkqh4xKDRf

/dns/bootnode70.chain.ghostchain.io/tcp/30333/p2p/12D3KooWP3h5dSdqcpvsCr7fp1jyfqDj291QDZ68a4gY6VQ8T1nW

/dns/ghostvision.mywire.org/tcp/30333/p2p/12D3KooWR5JJQ9mALPpnSxfZm5M23AByitSfxpei9ZDghU1NLNeW

/dns/ghostvision.mywire.org/tcp/30334/p2p/12D3KooWDs4i6VoK4dpwGSUVtZENzSmsbQk3tF63gYT745x7eAb2

/ip4/47.157.91.117/tcp/30333/p2p/12D3KooWDWU21S6yxDapSnKAS3JnhaQBkT4iNTNQ8NpB4QgNUzxr

/ip4/47.157.91.117/tcp/30334/p2p/12D3KooWEKzDvyMu7JiJUhKmzXPAxp66eb5nFtEDqBPzepX3HK9p

/ip4/47.157.91.117/tcp/30335/p2p/12D3KooWMC5FA2uJKvgKY5jGZWgtLgMc6M8d3x325GDZR6DheksD

/ip4/47.157.91.117/tcp/30336/p2p/12D3KooWDFkZ2thS7K3ftgkfCJ4XQEpZsXHyCNrVsw7b5iUMNUTZ

/ip4/47.157.91.117/tcp/30337/p2p/12D3KooWPLLgziNZq1tDRqdfv9KM9iKtyVdekQkJWiHjGjzFdkpa

/ip4/47.157.91.117/tcp/30338/p2p/12D3KooWGnywkXptYLyGuUhDnEhkq3MAwsDNrtnb2Ev2qD6SRbKS

/ip4/84.247.181.131/tcp/30333/p2p/12D3KooWJXBYA7cUQLLenEfT7hmCjBJ6fyikDy8YhNz4aLfwbBC8

IMPORTANT!!!
If you want your node to become a GHOST Chain Boot Node and to have a dedicated URL listed in this guide lets us know in GHOST Whales.

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.

Congratulations! You have an operational GHOST Node.

3. Troubleshooting

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

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

To delete old ledger:

sudo systemctl stop ghost-node

sudo rm -rf /var/lib/ghost

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

sudo systemctl start ghost-node

To 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

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