This document explains the gmet configuration and building process for setting up a Metadium BP node. This installation process is only necessary when building directly from the source code and not using pre-built files from GitHub.
Download Source Code
The go-metadium source code is publicly available on the Metadium GitHub repository; download it as follows:
Metadium's gmet supports rocksdb and leveldb, and you can choose the version to build using the USE_ROCKSDB option during the build process. Each version has a different format for the generated chain data, and they are not mutually compatible, so be sure to check the DB version you want to use before proceeding.
Below is the command for building, written based on the Ubuntu operating system recommended by Metadium:
git clone https://github.com/METADIUM/go-metadium.git
cd go-metadium
In case of rocksdb
make
In case of leveldb
make USE_ROCKSDB=NO
Copy and untar "build" to $GMET_HOME
GMET_HOME='/opt/meta'
sudo mkdir -p $GMET_HOME
sudo chown $USER:$USER $GMET_HOME
cp build/metadium.tar.gz $GMET_HOME/
cd $GMET_HOME
tar xvzf metadium.tar.gz
Start gmet
$GMET_HOME/bin/gmet.sh start
Check log
tail -F $GMET_HOME/logs/log
If there is a problem with library dependency due to the build environment, we recommend building using Docker, as shown below.
make USE_ROCKSDB=YES gmet-linux
Configuration
Once the build is complete, you can run the gmet node using the gmet.sh script. The gmet.sh script allows you to specify parameters for running the gmet node by creating a .rc configuration file for easy setup.
# vi $GMET_HOME/.rc
PORT=8588
DISCOVER=0 # 1 for enable discovery mode, 0 for disable discovery mode
TESTNET=1 # 1 for Testnet or remove this line for Mainnet
SYNC_MODE=full # snap, full or archive
GMET_OPTS="" # setup additional options