# Installing the Mainchain Software
This documentation outlines how to install the Unification Mainchain software, in order to interact with any of the Mainchain networks and query data/send transactions.
If you intend to run a node and/or become a validator, follow the guide below:
# Installing the latest release binaries
The latest pre-compiled binaries are available for download from https://github.com/unification-com/mainchain/releases (opens new window).
undbinary has been compiled for Linux, OSX and Windows.
Download the latest version:
Once downloaded, you can verify the SHA256 checksum against those listed in the release's
checksums.txt, for example:
Extract them and copy the binaries to a suitable location - preferably a location in your
$PATH environment variable,
Once installed, verify:
und version --log_level=""
The output should match the latest release version tag.
# Building from Source
The Mainchain binaries can also be built from source.
make are required dependencies for building.
wget are recommended, and
jq is useful for
quickly looking up values in, for example
These can all be installed via your package manager:
sudo apt-get install git curl wget make jq
sudo yum install git curl wget make jq
# Install Go
Go 1.16+ is required to build the Mainchain binaries
go by following the official docs (opens new window).
Once Go is installed, set your
$PATH environment variable:
$ mkdir -p $HOME/go/bin $ echo "export PATH=$PATH:$(go env GOPATH)/bin" >> ~/.bash_profile $ source ~/.bash_profile
# Build and install the binaries
unless you are contributing to Mainchain development, it is recommended you checkout and build from the latest release
tag and not the
master branch if you intend to connect to a live, public network (e.g. TestNet/MainNet).
Download the latest tagged Mainchain release from https://github.com/unification-com/mainchain/releases (opens new window)
[latest-release-tag] required for the command below can also be obtained by running:
curl --silent "https://api.github.com/repos/unification-com/mainchain/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")'
$ git clone -b [latest-release-tag] https://github.com/unification-com/mainchain $ cd mainchain $ make install
This will install the two binaries
und into your
# Verify the installation
Run the following commands:
$ und version --long
If they have installed correctly, you should see output similar to the following:
name: UndMainchain server_name: und version: 1.5.1 commit: 8bbd2b3dabebf8186c19b452f5331071f79e48f1 build_tags: netgo go: go version go1.16.2 linux/amd64 build_deps: - github.com/99designs/[email protected] => github.com/cosmos/[email protected] - github.com/ChainSafe/[email protected] - ... SNIP ... cosmos_sdk_version: v0.42.11
The included Mainchain DevNet network can be used for development and testing of new features and bug fixes locally. To build the binaries for testing without installing, run:
This will output the binaries to the
./build directory located in the repository root.
See the DevNet docs for more information about running DevNet.
# CLI Help
und commands can have the
--help flag passed
to output details on what commands are available, and flags enabled for that
--help flag can be passed to subcommands, for example:
und query wrkchain --help