core

command module
v1.0.2-m Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 16 Imported by: 0

README

DOS Client and Core Libraries

Go Report Card Maintainability GoDoc

Prerequisites:

Cloud Server / VPS Recommendations
  • AWS Lightsail - Linux virtual server (1 cpu, 1GB memory, 40GB ssd, 2TB bandwidth)
  • Google Cloud Platform - Compute Engine General purpose (N2)
  • Vultr - Cloud Compute (1 cpu, 1GB memory, 25GB ssd, 1TB bandwidth)
  • Digital Ocean - Droplet (1 cpu, 25GB ssd, 1TB bandwidth)
  • Linode - Shared virtual Instances (1 cpu, 1GB memory, 25GB ssd, 1TB bandwidth)
  • [Others]
  • Ubuntu 18.04 x64 LTS or higher
  • An IPv4 address
    • Run $ dig +short myip.opendns.com @resolver1.opendns.com
    • Or get it from cloud server providers. Most vps / cloud server
  • With below ports open:
    • udp port 7946
    • tcp port 7946,9501
  • It's recommended to generate ssh login key pairs and setup public key authentication instead of using password login for server security and funds safety:
    • Learn how to setup SSH public key authentication on Ubuntu 18.04 and disable password logins.
Bonding enough DOS tokens to run a node
  • Acquire at least 800,000 DOS tokens, (and optional - acquire several DropBurn token to reduce (up to 30%) the amount of DOS tokens needed to start a node, distribution plan be out later).
  • Replace your node ip address in config.json
  • Node runners currently earn three types of incomes: (Self-bonded) staking rewards, (other delegators') staking reward shares, oracle request processing fees.
Register and setup Infura api key

Run with docker image

  • docker pull dosnetwork/dosnode:v1.0.1-m

Building binary from source

  • Install Go and setup golang workingspace like below:

    $ sudo apt-get install golang 
    $ sudo apt-get install go-dep 
    $ sudo apt-get install build-essential
    
  • Open ~/.bashrc and set $GOPATH and $PATH environmental variables:

    $ vim ~/.bashrc
      export GOPATH=$HOME/go
      export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
    $ source ~/.bashrc
    
  • Download source code:

    $ mkdir -p $GOPATH/src/github.com/DOSNetwork
    $ cd $GOPATH/src/github.com/DOSNetwork && git clone https://github.com/DOSNetwork/core.git
    $ cd core
    $ git checkout v1.0.0-m
    
  • Build:

    • $ make vendor - to prepare dependencies for building
    • $ make - to build release version client
  • Run:

    $ ./dos.sh start
    
  • Dev tips:

    • $ go fmt ./... to reformat go source code.
    • $ golint to fix style mistakes conflicting with effective go. (golint tool for vim users.)
    • $ make devClient to build develoment version client.
    • $ make updateSubmodule to fetch latest system contracts from repo, instead of making contract modifications locally.
    • $ make gen to generate binding files for system contracts.
    • $ make clean to remove built binaries or unnecessary generated files.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
group
edwards25519
Package edwards25519 provides an optimized Go implementation of a Twisted Edwards curve that is isomorphic to Curve25519.
Package edwards25519 provides an optimized Go implementation of a Twisted Edwards curve that is isomorphic to Curve25519.
internal/marshalling
Package marshalling provides a common implementation of (un)marshalling method using Writer and Reader.
Package marshalling provides a common implementation of (un)marshalling method using Writer and Reader.
mod
Package mod contains a generic implementation of finite field arithmetic on integer fields with a constant modulus.
Package mod contains a generic implementation of finite field arithmetic on integer fields with a constant modulus.
nist
Package nist implements cryptographic groups and ciphersuites based on the NIST standards, using Go's built-in crypto library.
Package nist implements cryptographic groups and ciphersuites based on the NIST standards, using Go's built-in crypto library.
p2p
nat
Package nat implements NAT handling facilities
Package nat implements NAT handling facilities
Package share implements Shamir secret sharing and polynomial commitments.
Package share implements Shamir secret sharing and polynomial commitments.
dkg/pedersen
Package dkg implements the protocol described in "A threshold cryptosystem without a trusted party" by Torben Pryds Pedersen.
Package dkg implements the protocol described in "A threshold cryptosystem without a trusted party" by Torben Pryds Pedersen.
vss/pedersen
Package vss implements the verifiable secret sharing scheme from "Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing" by Torben Pryds Pedersen.
Package vss implements the verifiable secret sharing scheme from "Non-Interactive and Information-Theoretic Secure Verifiable Secret Sharing" by Torben Pryds Pedersen.
sign
bls
Package bls implements the Boneh-Lynn-Shacham (BLS) signature scheme which was introduced in the paper "Short Signatures from the Weil Pairing".
Package bls implements the Boneh-Lynn-Shacham (BLS) signature scheme which was introduced in the paper "Short Signatures from the Weil Pairing".
schnorr
Package schnorr implements the vanilla Schnorr signature scheme.
Package schnorr implements the vanilla Schnorr signature scheme.
tbls
Package tbls implements the (t,n)-threshold Boneh-Lynn-Shacham signature scheme.
Package tbls implements the (t,n)-threshold Boneh-Lynn-Shacham signature scheme.
Package suites allows callers to look up Kyber suites by name.
Package suites allows callers to look up Kyber suites by name.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL