Building pryzmd
Binary
The pryzmd
binary is an essential component of the blockchain network. This guide outlines the steps required to build the pryzmd
binary using the make
command.
Prerequisites
Before proceeding with the build process, ensure that the following prerequisites are met:
- Dependencies:
- go 1.22+
Installing Go
We suggest the following two ways to install Go. Check out the official docs (opens new window)and Go installer for the correct download for your operating system. Alternatively, you can install Go yourself from the command line. Detailed below are standard default installation locations, but feel free to customize.
Ubuntu:
At the time of this writing, the latest release is 1.22.3. We're going to download the tarball, extract it to /usr/local, and export GOROOT to our $PATH
curl -OL https://go.dev/dl/go1.22.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xvf https://go.dev/dl/go1.22.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
Build Tools
To build the pryzmd
binary, you need to have the following build tools installed:
make
: A build automation tool.gcc
: The GNU Compiler Collection.
If you don't have these tools installed, you can install them by running the following commands:
$ sudo apt-get update
$ sudo apt-get install -y make gcc
Build Process
To build the pryzmd
binary, follow these steps:
-
Clone the repository:
$ git clone https://github.com/pryzm-finance/pryzm-core.git
$ cd pryzm-core -
Verify that you are on the correct branch or tag, if applicable:
$ git checkout v0.18.0
-
Configure the build (if necessary):
$ make config
-
Build the
pryzmd
binary usingmake
:$ make pryzmd
The build process may take some time, depending on your system and the size of the project.
-
Upon successful completion of the build, the
pryzmd
binary will be generated in the designated output directory.
Build Tags
Build tags indicate special features that have been enabled in the binary.
Build Tag | Description |
---|---|
netgo | Name resolution will use pure Go code |
ledger | Ledger devices are supported (hardware wallets) |
Verify Installation
You can verify your installation by running the following command:
pryzmd version --long
You should see something similar to the following:
name: pryzm
server_name: pryzmd
version: v0.18.0
commit: 28e667f1dc15f6c2ff10790e62b017869f9d6725
build_tags: netgo,ledger
go: go version go1.22.3 linux/amd64
Testing
After building the pryzmd
binary, it is crucial to perform thorough testing to ensure its functionality and compatibility. Follow these steps to run the tests:
-
Navigate to the test directory:
$ cd pryzm-core/tests
-
Run the tests using the appropriate command or script:
$ make test
-
Review the test results and verify that all tests pass successfully.