Launching CASPER TestNet 4.0 [~1 HR]

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

Introduction

Welcome to the CASPER TestNet 4.0 Launch Guide. In TestNet 3.1 we had 60 Nodes and ability to send $CSPR, GHOST Eye updates, staking, slashing, etc. In CASPER Testnet 4.0 users are able to bridge their $CSPR token from EVM to CASRPER Testnet using ghostDAO.

All existing TestNet 3.1 Full Nodes and Validators MUST update to TestNet 4.0 to take advantage of new functionality.

1. Prerequisites

Launching CASPER TestNet 4.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. Testing Connectivity Guide – test whether or not you node can become a Boot Node and set proper firewall rules.

2. GHOST Chain Key Generation

Generating Keys & Applying For Genesis Block Key Generation
Start with creating the following directory:

sudo mkdir /etc/ghost

Get your username:

whoami

Give the user permission to the directory and substitute {USERNAME} for the one from previous command:

sudo chown {USERNAME} /etc/ghost

Generating Node Keys

To generate the node key use the following command:

~/ghost/ghost-node/target/release/ghost key generate-node-key --bin --file=/etc/ghost/node-key
Generating Keys & Applying For Genesis Block Local Identity
Local Identity

3. Launching CASPER TestNet 4.0

Launching CASPER TestNet 4.0 Launch GHOST Node

Go to ghost-node directory:

cd ghost/ghost-node

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

GHOST Chain consists of 3 types of nodes:

  • Boot Node – a type of node that other nodes can connect to in order to verify their legitimacy
  • Validator Node – a type of node that has $GHST Staking Capability
  • Archival Node – a type of node that will store the archive of the GHOST Chain ledger

If you want to be a Full Node type y:

disable validator mode? [y/N]: N

If you want to be a Validator Node type N:

disable validator mode? [y/N]: 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/Fujisan2.mywire.org/tcp/30334/p2p/12D3KooWEKzDvyMu7JiJUhKmzXPAxp66eb5nFtEDqBPzepX3HK9p
Checking port 30334 for http://Fujisan2.mywire.org...
/dns/Fujisan3.mywire.org/tcp/30335/p2p/12D3KooWHtCncs582VHGXPLqHy2aYe2cBY5qLt9U7RFwn2U2cQQT
Checking port 30335 for http://Fujisan3.mywire.org...
/dns/Fujisan4.mywire.org/tcp/30336/p2p/12D3KooWFetfT6Ha8wxsvT4NhBjKvLdNDSWRSQQquXGmQBhxLRuV
Checking port 30336 for http://Fujisan4.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 enable ghost-node.service press Enter:

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

DO NOT start ghost-node.service press Enter:

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

Rebuild GHOST Node

Full rebuild of your node and make all dependencies global:

./scripts/starter.sh --hard-reset-i-know-what-im-doing

Recompiling will take some time!

Check GHOST Node version, the output should be ghost 0.8.2-72d6be6e29d:

ghost --version

Check checksum the output should be 9da6045ed6d4fd844e3939573b31c013d0e564e542029330faa6d978cb4a915a:

sha256sum /etc/ghost/casper.json

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.

Existing Full Nodes Migrating to TestNet 4.0

Launching CASPER TestNet 4.0 Migrating

Only follow this section if you currently have a GHOST TestNet 2.0, GHOST TestNet 3.0, or GHOST Testnet 3.1 Node.

Go to ghost-node directory:

cd /home/ghost/ghost-node

Switch to the most GHOST Chain PR from GHOST GIT:

git switch main

Pull the most recent GHOST Chain PR from GHOST GIT:

git pull origin main

Recompile your GHOST Node:

./scripts/starter.sh --hard-reset-i-know-what-im-doing

Check GHOST Node version, the output should be ghost 0.8.2-72d6be6e29d:

ghost --version

Check checksum the output should be 9da6045ed6d4fd844e3939573b31c013d0e564e542029330faa6d978cb4a915a:

sha256sum /etc/ghost/casper.json

Check GHOST Node log:

journalctl -f -u ghost-node

Troubleshooting

Launching CASPER TestNet 4.0 Troubleshooting
For future troubleshooting be aware of the following commands:

Systemd-journal Permission

Find your user:

whoami

Replace $USER with your user:

sudo usermod -aG systemd-journal $USER

Replace $USER with your user:

sudo usermod -aG adm $USER

Create new group:

newgrp systemd-journal

To see the logs produced by your ghost-node:

journalctl -f -u ghost-node

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 Chain?

GHOST Chain is a decentralized EVM bridge with a privacy layer providing a much needed cross-chain interoperability and anonimity in the web3 space.

Become Validator | GHOST Chain | ghostDAO Litepaper