Installation

Running a Change Chain Node from Source

Before you begin, ensure your system meets the following software requirements:

  • Operating System: Ubuntu 18.04 or later (Linux), macOS, or Windows Subsystem for Linux (WSL)

  • Go Programming Language: Version 1.16 or later

  • Git: Latest version

  • gcc (GNU Compiler Collection): For compiling source code

1. Install Go

Linux/macOS

Download and install Go:

# For Linux
wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz

# For macOS
brew install go

Add Go to your PATH:

bashCopy codeecho "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc

Verify the installation:

Windows

Download the Windows installer from the official Go websitearrow-up-right and follow the installation instructions.

2. Install Git

Linux

macOS

Windows

Download and install Git from the official websitearrow-up-right.

3. Install gcc

Linux

macOS


Build and Start the Change Chain Node

1. Set the GOPATH

Set your Go workspace directory:

2. Create a Directory in Your GOPATH

Create the necessary directories:

3. Clone the Change Chain Repository

Navigate to the directory and clone the repository:

4. Run the Build Script

Navigate to the cloned repository and run the build script:

This script compiles the Change Chain node and places the executable in the build directory.

5. Start the Node

On Change Chain Mainnet

On Testnet

Note: To stop the node, press Ctrl + C.


Run with a Pre-Built Binary

If you prefer to use a pre-built binary instead of building from source, follow these steps:

1. Download

Visit the Change Chain Releases pagearrow-up-right and download the appropriate version for your operating system.

MacOS

  • Download: changechain-macos-<VERSION>.zip

  • Unzip:

    The resulting folder changechain-<VERSION> contains the binaries.

Linux (x86_64 PCs or Cloud Providers)

  • Download: changechain-linux-amd64-<VERSION>.tar.gz

  • Unzip:

    The resulting folder changechain-<VERSION>-linux contains the binaries.

2. Start the Node

MacOS

Mainnet:

Testnet:

Linux

Mainnet:

Testnet:


Networking

To successfully run the Change Chain node and participate in the network, ensure that your node can accept connections on network port 9651.

Running on a Cloud Provider

If you're running your node on a cloud service like AWS, Azure, or Google Cloud:

  • Configure your cloud instance's firewall settings to allow inbound and outbound traffic on port 9651.

  • Ensure your security groups and network access control lists (ACLs) permit traffic on this port.

Running on a Home Connection

If you're running your node from home:

  • Set up port forwarding on your router to forward external traffic on port 9651 to your machine's local IP address.

  • Check your computer's firewall settings to allow traffic on port 9651.

Note: To make API calls to your node from other machines, include the argument --http-host=0.0.0.0 when starting the node:


Bootstrapping

When starting your node for the first time, it needs to catch up with the latest network state, a process known as bootstrapping. This may take several hours depending on your internet connection and hardware performance.

Check Bootstrapping Progress

You can check if your node has finished bootstrapping a particular chain by using the info.isBootstrapped API method.

Example Command

Replace "chain": "C" with "X" or "P" to check the status of the other chains.

Interpreting the Response

  • If the response returns true, the chain has finished bootstrapping.

  • If the response returns false, the chain is still bootstrapping.


RPC Endpoints

Once your node has bootstrapped, the following RPC endpoints become available:

  • Change Chain: http://localhost:9651/ext/bc/C

If accessing remotely, replace localhost with your node's public IP address.

For detailed API documentation, refer to the Change Chain API Reference.

Last updated