-
Notifications
You must be signed in to change notification settings - Fork 110
Developer Setup Guide
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.
To get started find out how to install the following pre-requisites for your current system:
- Go version: 1.11 https://golang.org.
- Install dep for dependency management.
After the pre-requisites have been installed, the next step is to set up your GO enviroment.
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.
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/...
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
To run the Pocket Core unit tests, navigate into the tests directory and enter:
go test ./...
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.
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
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.