Binary Setup

Pre-installation:

Before we get started, download:

Environment Setup:

Mac/ Unix:

First, make sure your GOPATH is correct, and pointing to the GO directory.
Note If this is your first time setting up a GO ENV, we recommend setting up in the default HOME directory.
For Mac your .bash_profile should contain:

export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

PC(Windows):

Your workspace can be located wherever you like, but we'll use C:\go-work in this example.
NOTE: GOPATH must not be the same path as your Go installation.

  • Create folder at C:\go-work.
  • Right click on "Start" and click on "Control Panel".
  • Select "System and Security", then click on "System".

From the menu on the left, select the "Advanced systems settings".

  • Click the "Environment Variables" button at the bottom.
  • Click "New" from the "User variables" section.
  • Type GOPATH into the "Variable name" field.
  • Type C:\go-work into the "Variable value" field.
  • Click OK.

Setup Project Path:

Before you clone the repo, create the project path to make sure it executes correctly. Go inside your GO folder(where you established your GO path) and create the following directory:
/src/github.com/pokt-network/

Download the Pocket Core repo inside the pokt-network folder.

Install Dependencies:

The project uses the dep package management system. To install dependencies, go into the pocket-core directory (where you cloned the repo) and run:

dep ensure

Build the pocket-core binary

To build the source code into an executable binary, build it using the go build command, as you can see in the example below:

go build -o ${GOPATH}/bin/pocket-core ./cmd/pocket_core/main.go

Running the pocket-core binary

The Pocket Core binary has multiple flags that help configure your Pocket Core instance(see below):

-cfile (string)

Specifies the filepath for chains.json

  • (default "[datadir]/chains.json")
  • (default "8080")

-datadirectory (string)

Setup a custom location for the datadirectory

  • (default: %APPDATA%\Pocket for Windows, ~/.pocket for Linux, ~/Library/Pocket for Mac)

-dfile (string)

Specifies the filepath for developer_whitelist.json

  • (default "[datadir]/developer_whitelist.json")

-disip (string)

Specifies the address of the centralized dispatcher

  • (default "localhost")

-disrport (string)

Specifies the relay port of the centralized dispatcher

  • (default "8081")

-gid (string)

Set the selfNode.GID for pocket core mvp

  • (default "GID1")

-ip

The public ip of your service node

  • (default uses 3rd party to find ip -> usually needs port forwarding)

-port

The public port of the service node

  • (default uses "8081")

-relayrpc

Whether or not to start the rpc server

  • (default true)

-relayrpcport (string)

Specified port to run relay rpc

  • (default "8081")

-sfile (string)

Specifies the filepath for service_whitelist.json

  • (default "[datadir]/service_whitelist.json")

What's Next

In order to participate using MVP, it is mandatory for node operators to register your GID upon configuring your Service Node.

Request your GID

Binary Setup


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.