Run a Chiliz Chain Node
Launch, create, connect, and debug a node to sync with Chiliz Chain
Last updated
Was this helpful?
Launch, create, connect, and debug a node to sync with Chiliz Chain
Last updated
Was this helpful?
Running your own Chiliz Chain node offers enhanced control, privacy, and reliability, but requires more technical expertise and resources compared to using an existing RPC endpoint.
It allows you to transact and communicate with smart contracts on the Chiliz Chain
To run the Chiliz Chain node, you must have installed, either on your machine or your server. Therefore, please complete the before you proceed.
You can use the pre-built Docker images from the .
The recommended starting point to run a Chiliz Chain node is with the mounted data volume. If this method is used to recreate a Docker container, the data gets stored in the directory and can easily be reused or cloned to another node.
Create a directory and point to it in the -v
parameter in the following command:
To connect a client with a node, you must enable RPC HTTP and/or the WebSocket servers by specifying --http
and/or --ws
parameter groups respectively.
For example:
CAUTION
For security reasons, ensure you set appropriate values for the following parameters:
--http.corsdomain
--http.vhosts
--ws.origins
In some cases, you may want to increase the verbosity of the node, i.e. when you must debug either the node or the connecting client itself.
To do that, you can define a --verbosity
parameter. It can accept the following options (default is 3):
0=silent
1=error
2=warn
3=info
4=debug
5=detail
If you have launched the node using one of the above commands then your node process continues to run in the foreground. To stop this process, press CTRL+C.
Run the following command to remove the Docker container:
Run the following command to delete a directory:
The Chiliz Chain team strives to keep Chiliz Chain secure and modern, and we will therefore make hard fork now and then every year, such as the Dragon8 hard fork.
In the event of a hard fork, your node will be out of sync with the network. It is therefore important to follow our announcements, and update your node.
To keep your node updated, you can follow the following steps.
If you use Docker:
Ensure you stop and delete your existing Docker container while preserving the volumes that contain your database.
If you use your own binary:
Build from there with your toolset.
To run an archive node, you should add the following 2 params into the ccv2-geth call presented above:
To speed up the synchronization process of your Chiliz Chain node, you can rely on a snapshot — a recent copy (or archive/backup) of the blockchain data directory (datadir
). This method allows your node to become operational more quickly compared to syncing from scratch.
Each network has a dedicated snapshot:
If you intend to apply a snapshot to an existing node, ensure you delete the following directories and files within your datadir before restarting the node:
This step helps prevent potential conflicts arising from residual data.
Create a Data Directory:
Download the Snapshot:
Replace the URL with the Mainnet snapshot URL if needed.
Extract the Snapshot:
Run the Chiliz Chain Node:
Launch your node using .
.
Spicy Testnet:
Mainnet:
Visit Geth's to view the full list of available Geth parameters.