export TAG=v0.2.3
git clone -b v0.2.3 https://github.com/0glabs/0g-chain
cd 0g-chain
git checkout tags/$TAG # Tag the desired version
make install
0gchaind version
0g basic setup
# Set home dir, example: /data/0gchain
export DIR=/data/0gchain
mkdir -pv $DIR
ln -sv $DIR $HOME/.0gchain
0gchaind config chain-id zgtendermint_16600-2
# A moniker is a human-readable name for your node. Moniker can contain only ASCII characters, and cannot exceed 70 characters.
0gchaind init <moniker> --chain-id zgtendermint_16600-2
To maximize sync speed for validators and other network providers that are running pruning nodes, the following settings are recommended:
Start 0gchaind process with environment variable and value GOGC=900; this instructs the golang garbage collector to wait until the heap has grown to 9x it's initial allocated size before running garbage collection
Start 0gchaind process with environment variable GOMEMLIMIT set to 66% of the total memory available to the 0gchaind process (e.g. GOMEMLIMIT=40GB for a node with 64 GB of memory) to ensure garbage collection runs whenever 66% of the total memory is used