How to Run a Test-Net Node
Last updated
Last updated
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 Xenea is still under development. Therefore, please use Geth to connect to the testnet.
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.
Create a Directory for Blockchain Data:
Choose a location on your client machine where you want to store the blockchain data.
Run this command: to Initialize genesis file:
./geth --datadir ./data init ./genesis.json
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
Add peers:
admin.addPeer("enode://16c70e5650630dd7d898c5dbde4278cdad8fdeb6a6983846d9e87b3f89f097851e0568e6489fbe3ff79e8828b6fbf5f22d5fe999f7ea09d196abdc71a91ba39a@3.128.163.227: 30303")
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
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.
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.
Initialize genesis file:
• Run the following command to Initialize genesis file:
./geth --datadir ./data init ./genesis.json
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
Add peers:
admin.addPeer("enode://16c70e5650630dd7d898c5dbde4278cdad8fdeb6a6983846d9e87b3f89f097851e0568e6489fbe3ff79e8828b6fbf5f22d5fe999f7ea09d196abdc71a91ba39a@3.128.163.227: 30303")
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).