Skip to main content
Version: Next

Building pryzm feeder Binary

The pryzm feeder binary is an essential component of the blockchain network. This guide outlines the steps required to build the pryzm feeder binary using the make command.

Prerequisites

Before proceeding with the build process, ensure that the following prerequisites are met:

  • Dependencies:
    • node
    • pnpm

Installing Node.js and pnpm

At the time of this writing, the latest Node.js release for version 18 is v18.18.0. We're going to download the official binary, extract it to /usr/local, and add the node and npm binaries to our $PATH.

Step 1: Download the Node.js binary

You can choose between the .gz and .xz formats:

  • For .gz format:

    wget https://nodejs.org/download/release/latest-v18.x/node-v18.18.0-linux-x64.tar.gz
  • For .xz format:

    wget https://nodejs.org/download/release/latest-v18.x/node-v18.18.0-linux-x64.tar.xz

Step 2: Extract the tarball to /usr/local

  • If you downloaded the .gz format:

    sudo tar -xf node-v18.18.0-linux-x64.tar.gz -C /usr/local --strip-components=1
  • If you downloaded the .xz format:

    sudo tar -xf node-v18.18.0-linux-x64.tar.xz -C /usr/local --strip-components=1

Step 3: Verify the installation

node -v
npm -v

Step 4: Install pnpm globally using npm

npm install -g pnpm

Step 5: Verify the pnpm installation

pnpm -v

Build Process

To build the pryzm feeder binary, follow these steps:

  1. Clone the repository:

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

    $ git checkout v0.4.1
  3. Build the pryzm feeder binary using make:

    $ pnpm install
    $ pnpm compile

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

  4. Upon successful completion of the build, the pryzm feeder binary will be generated in the designated output directory.

Testing

After building the pryzm feeder binary, it is crucial to perform thorough testing to ensure its functionality and compatibility. Follow these steps to run the tests:

  1. Run the tests using the appropriate command:

    $ pnpm test
  2. Run the integration tests using the prizmoke framework:

    $ cd pryzmoke-tests
    $ pnpm install
    $ pnpm test
  3. Review the test results and verify that all tests pass successfully.