Skip to content

Developer Setup Guide

Andrew Nguyen edited this page Mar 7, 2019 · 5 revisions

Who's this guide for?

This guide is for anyone contributing to the development and implementation of Pocket Core. This guide will evolve alongside the development of this project and will be updated if any major changes affect this setup process.

Pre-Requisites

To get started find out how to install the following pre-requisites for your current system:

After the pre-requisites have been installed, the next step is to set up your GO enviroment.

Go environment

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:

# For Go project
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

Click here for PC to make sure your workplace is set correctly.

Set up project path

Before you clone the repo, we need to 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. From there, you can do a git checkout -b to a branch you want to contribute to:

  • mvp-staging - The Pocket-Core MVP
  • staging - The PC testnet

When you're done, your directory should look like:

/go/src/github.com/pokt-network/pocket-core/...

Installing dependencies

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

dep ensure

Run a test

To run the Pocket Core unit tests, navigate into the tests directory and enter:

go test ./...

Code style and formatting

The project is adhering to the official golang style guidelines found here. This will be taken into consideration when performing Pull Request reviews, as it will save the Pocket Core Team review time if your code is already formatted to standard.

(Optional) Using symlinks to setup GOPATH

You can always setup symlinks if you want to have control over your directory structure while developing any GO project. Just create a symlink from your projects directory to the

(Optional) Use EditorConfig

Pocket Core is already configured to use EditorConfig to help your favorite text editor to format your code up to the project standard and helping maintain the overall structure and readability the same for all files.

General

Home

How to contribute

Developer Setup Guide

MVP (Minimum Viable Pocket)

Service Node Setup

Setup Options

Docker Setup

Client Developers

API Documentation

Clone this wiki locally