How to Run a Test-Net Node

A step-by-step guide to setting up the client machine for running a CVC-Testnet private blockchain network using Geth

Clients can connect through either Ubuntu or Windows platforms. Here we provide details for both platforms.

Please Note:

The original functionality of the CROSSVALUE Chain is still under development. Therefore, please use Geth to connect to the testnet.

Connecting through Ubuntu Machine

  1. Install Geth:

Download and install Geth (Go Ethereum) on the client machine. You can find the appropriate installer or binary for your operating system from the official Geth repository: https://github.com/ethereum/go-ethereum

Follow the installation instructions specific to your operating system.

  1. Create a Directory for Blockchain Data:

Choose a location on your client machine where you want to store the blockchain data.

  1. Run this command: to Initialize genesis file:

./geth --datadir ./data init ./genesis.json

  1. Start Geth with Connection Parameters:

Run the following command to start Geth on the client machine and connect it to the server:

./geth --networkid 5555 --datadir "./data" --syncmode full --http --allow-insecure-unlock --authrpc.port 8551 -­http.corsdomain "*" --http.port 8545 console

  1. Add peers:

admin.addPeer("enode://16c70e5650630dd7d898c5dbde4278cdad8fdeb6a6983846d9e87b3f89f097851e0568e6489fbe3ff79e8828b6fbf5f22d5fe999f7ea09d196abdc71a91ba39a@3.128.163.227: 30303")

  1. Verify Connectivity:

• After executing the above command, Geth will start and attempt to connect to the server.

• In the Geth console on the client machine, you should see logs indicating the connection status and synchronization progress.

• To verify that the client is connected to the server, run the following command in the Geth console: admin.peers

Connecting through Windows Machine

  1. Install Geth:

Download and install Geth (Go Ethereum) on the client machine. You can find the appropriate installer or binary for your operating system from the official Geth repository: https://github.com/ethereum/go-ethereum Follow the installation instructions specific to your operating system.

  1. Create a Directory for Blockchain Data

• Choose a location on your client machine where you want to store the blockchain data.

• Create a new directory at the chosen location to store the data.

  1. Initialize genesis file:

• Run the following command to Initialize genesis file:

./geth --datadir ./data init ./genesis.json

  1. Start Geth with Connection Parameters:

• Run the following command to start Geth on the client machine and connect it to the server:

./geth --networkid 5555 --datadir "./data" --syncmode full --http --allow-insecure-unlock --authrpc.port 8551 -­http.corsdomain "*" --http.port 8545 console

  1. Add peers:

admin.addPeer("enode://16c70e5650630dd7d898c5dbde4278cdad8fdeb6a6983846d9e87b3f89f097851e0568e6489fbe3ff79e8828b6fbf5f22d5fe999f7ea09d196abdc71a91ba39a@3.128.163.227: 30303")

  1. Verify Connectivity:

• After executing the above command, Geth will start and attempt to connect to the server.

• In the Geth console on the client machine, you should see logs indicating the connection status and synchronization progress.

• To verify that the client is connected to the server, run the following command in the Geth console: admin.peers

This will display a list of connected peers, including the server node. If the connection is successful, you should see the server's information in the output.

Congratulations!

You have now set up the client machine to connect to the private blockchain network running on the server. You can interact with the network using the Geth console on the client machine, execute transactions, deploy smart contracts, and more.

Please note:

To adjust any necessary network configurations, such as firewall rules or security groups, to allow communication between the server and client machines on the required ports (e.g., 30303 for peer-to-peer communication).

Last updated