core

command module
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 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 - $5 monthly plan (1 cpu, 1GB memory, 40GB ssd, 2TB bandwidth)
  • Vultr - Cloud Compute $5 monthly plan (1 cpu, 1GB memory, 25GB ssd, 1TB bandwidth)
  • Digital Ocean - Droplet $5 monthly plan (1 cpu, 25GB ssd, 1TB bandwidth)
  • Linode - $5 monthly plan (1 cpu, 1GB memory, 25GB ssd, 1TB bandwidth)
  • .
  • 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.
Acquire testnet ether and testnet tokens
Register and setup Infura api key

Run binary from github releases

  • Install:
    $ wget https://github.com/DOSNetwork/core/releases/download/v1.0-beta.23/config.json
    $ wget https://github.com/DOSNetwork/core/releases/download/v1.0-beta.23/dos.sh
    $ sudo chmod +x dos.sh
    
  • Use a existing keystore (optional):
    $ mkdir vault
    $ cp oldKeyStore vault/
    
  • Start:
    $ ./dos.sh start
    
  • Check client status :
    $ ./dos.sh status
    
  • Stop client :
    $ ./dos.sh stop
    
  • Debuging an issue :
    $ ./dos.sh log
    

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-beta.20
    
  • 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.

Run with docker image

  • TODO

Status

  • Verifiable Secret Sharing
  • Distributed Key Generation (Pedersen's DKG approach)
  • Paring Library and Threshold BLS Signature
  • Distributed Randomness Generation
  • Gossip & DHT Implementation
  • P2P NAT Support
  • Json / Xml / Html Request Parser
  • Dockerization and Client Deployment Script
  • Integration with Ethereum On-chain System Contracts
  • P2P Network Performance Tuning
  • Staking & Delegation Contracts with a User-friendly Dashboard
  • Network Status Scanner/Explorer
  • Test with geth lightnode mode and experiment with parity clients

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