Skip to content

derekoutis/pocket-core

 
 

Repository files navigation

Pocket Core

Official golang implementation of the Pocket Network Protocol.

Overview

The Pocket Core application will allow anyone to spin up a Pocket Network full node, with options to enable/disable functionality and modules according to each deployment. For more information on the Pocket Network Protocol you can visit pokt.network.

How to run it

If you don't have the pocket-core binaries, scroll down to the "How to build" section for instructions on building from source.

The Pocket Core binary, pocket-core, accepts many arguments.

Here, we break them all down by category:

Arguments for service nodes

  -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")

Arguments for dispatcher nodes

  -dbend string
    	specifies the database endpoint for the centralized dispatcher 
	(default "dynamodb.us-east-2.amazonaws.com")

  -dbtable string
    	specifies the database tablename for the centralized dispatcher 
	(default "dispatchPeers")
		
  -dismode int
    	specifies the mode by which the dispatcher is operating 
	(0) Normal, (1) Migrate, (2) Deprecated
	
  -dispatch
      	specifies if this node is operating as a dispatcher

How to build

If your environment is not set up, visit our Developer Setup Guide to make sure you have everything you need to get the project up and running.

After your environment is set up, run: go build pokt-network/pocket-core/cmd/pocket_core/main.go

How to test

To run the Pocket Core unit tests, use the go testing tools and the go test ./... command within the tests directory

How to contribute

Pocket Core is an open source project, and as such we welcome any contribution from anyone on the internet. Please read our Developer Setup Guide on how get started.

Please fork, code and submit a Pull Request for the Pocket Core Team to review and merge. We ask that you please follow the guidelines below in order to submit your contributions for review:

High impact or architectural changes

Reach out to us on Telegram and start a discussion with the Pocket Core Team regarding your change before you start working. Communication is key for open source projects and asynchronous contributions.

For an active research forum, checkout and post on our forum.

Coding style

  • Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
  • (Optional) Use Editor Config to help your Text Editor keep the same formatting used throughout the project.
  • Code must be documented adhering to the official Go commentary guidelines.
  • Pull requests need to be based on and opened against the `staging` branch.

Contact

About

Official implementation of the Pocket Network Protocol

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 92.1%
  • Shell 6.1%
  • Dockerfile 1.8%