Skip to main content
Version: Next

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.20+

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.

Go Official Download Page

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:

  1. Clone the repository:

    $ git clone https://github.com/pryzm-finance/pryzm-core.git
    $ cd pryzm-core
  2. Verify that you are on the correct branch or tag, if applicable:

    $ git checkout v0.16.0
  3. Configure the build (if necessary):

    $ make config
  4. Build the pryzmd binary using make:

    $ make pryzmd

    The build process may take some time, depending on your system and the size of the project.

  5. 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 TagDescription
netgoName resolution will use pure Go code
ledgerLedger 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.16.0
commit: 682770f2410ab0d33ac7f0c7203519d7a99fa2b6
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:

  1. Navigate to the test directory:

    $ cd pryzm-core/tests
  2. Run the tests using the appropriate command or script:

    $ make test
  3. Review the test results and verify that all tests pass successfully.