WEMIX3.0
Search…
Install Guide
End Point Node

Build

WEMIX3.0 is implemented based on Ethereum, so the build method is the same as go-ethereum, except that geth has been changed to gwemix.
First, the developer downloads the go-wemix source code by executing the following command on the Linux machine.
git clone https://github.com/wemixarchive/go-wemix.git
Afterward, go to the go-wemix directory and run the command below to start gwemix build. Depending on the USE_ROCKSDB option, it is built as Rocksdb or Leveldb. Since the two databases are not compatible, checking the db version is a must when using chaindata received from another machine.
This chapter is described based on the Ubuntu environment. To build gwemix directly from the source code in the Ubuntu environment, you must follow these steps:
Ubuntu 22.04 LTS
Ubuntu 20.04.4 or 18.04.6 LTS

Dependency

sudo apt-get update
sudo apt-get install -y build-essential golang

Download source code

git clone https://github.com/wemixarchive/go-wemix.git
cd go-wemix

In case of rocksdb

make

In case of leveldb

make USE_ROCKSDB=NO

Copy and untar "build" to/opt/nxt

sudo mkdir /opt/nxt
sudo chown $USER:$USER /opt/nxt
cp build/gwemix.tar.gz /opt/nxt/
cd /opt/nxt
tar xvzf gwemix.tar.gz

Create .rc at /opt/nxt with the following info

PORT=8588
DISCOVER=1
TESTNET=1 # 1 for Testnet, 0 for Mainnet
SYNC_MODE=full
GWEMIX_OPTS="--rpc.allow-unprotected-txs"

Start gwemix

/opt/nxt/bin/gwemix.sh start

Check log

tail -F /opt/nxt/logs/log

Dependency

sudo apt-get update
sudo apt-get install -y build-essential

Install go version 1.18.4

wget https://go.dev/dl/go1.18.4.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.18.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
source $HOME/.profile

Download source code

git clone https://github.com/wemixarchive/go-wemix.git
cd go-wemix

In case of rocksdb

make

In case of leveldb

make USE_ROCKSDB=NO

Copy and untar "build" to /opt/nxt

sudo mkdir /opt/nxt
sudo chown $USER:$USER /opt/nxt
cp build/gwemix.tar.gz /opt/nxt/
cd /opt/nxt
tar xvzf gwemix.tar.gz

Create .rc at /opt/nxt with the following info

PORT=8588
DISCOVER=1
TESTNET=1 # 1 for Testnet, 0 for Mainnet
SYNC_MODE=full
GWEMIX_OPTS="--rpc.allow-unprotected-txs"

Start gwemix

/opt/nxt/bin/gwemix.sh start

Check log

tail -F /opt/nxt/logs/log
When executing the make, logrot and gwemix.tar.gz are instatly built for installation convenience and are saved as compressed files in the build directory. The generated gwemix.tar.gz includes the following files.
bin/gwemix ## gwemix binary
bin/gwemix.sh ## gwemix control shell script
bin/logrot ## log rotator

Build with Docker Image

WEMIX3.0 can utilize docker images to resolve library dependencies. If you are building on Linux or MacOS X, you can use the following procedure to build. Space or special characters are not supported.
Currently, docker build is not supported in Apple Chip MacOS and Windows. We will provide support later.
Rocksdb
Leveldb
make USE_ROCKSDB=YES gwemix-linux
make USE_ROCKSDB=NO gwemix-linux
To copy and install gwemix.tar.gz binary built through Docker into the Ubuntu environment, follow these steps:
Ubuntu 22.04 or 20.04.4 LTS
Ubuntu 18.04.6 LTS

Rocksdb only

sudo apt-get install -y libsnappy-dev libjemalloc-dev
cd /usr/lib/x86_64-linux-gnu/
sudo ln -sf libjemalloc.so.2 libjemalloc.so.1

Copy and untar "build" to /opt/nxt

sudo mkdir /opt/nxt
sudo chown $USER:$USER /opt/nxt
#copy your build "gwemix.tar.gz" to /opt/nxt
cd /opt/nxt
tar xvzf gwemix.tar.gz

Create .rc at /opt/nxt

PORT=8588
DISCOVER=1
TESTNET=1 # 1 for Testnet, 0 for Mainnet
SYNC_MODE=full
GMET_OPTS="--rpc.allow-unprotected-txs"

Start gwemix

/opt/nxt/bin/gwemix.sh start

Check log

tail -F /opt/nxt/logs/log

Rocksdb only

sudo apt-get isntall libjemalloc1

Copy and untar "build" to /opt/nxt

sudo mkdir /opt/nxt
sudo chown $USER:$USER /opt/nxt
#copy your build "gwemix.tar.gz" to /opt/nxt
cd /opt/nxt
tar xvzf gwemix.tar.gz

Create .rc at /opt/nxt

PORT=8588
DISCOVER=1
TESTNET=1 # 1 for Testnet, 0 for Mainnet
SYNC_MODE=full
GMET_OPTS="--rpc.allow-unprotected-txs"

Start gwemix

/opt/nxt/bin/gwemix.sh start

Check log

tail -F /opt/nxt/logs/log