go-miner

command module
v0.0.0-...-163fc3c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 36 Imported by: 0

README

Sukhavati Miner

Sukhavati Miner is a Golang implementation of Sukhavati full-node miner.

Requirements

Go 1.15 or newer.

Development

Sukhavati-Labs

Build from Source
Linux/Darwin
  • Clone source code to $GOPATH/src/github.com/Sukhavati-Labs/go-miner.
  • Go to project directory cd $GOPATH/src/github.com/Sukhavati-Labs/go-miner.
  • Run Makefile make build. An executable minerd would be generated in ./bin/.
Windows
  • Clone source code to $GOPATH/src/github.com/Sukhavati-Labs/go-miner.
  • Open terminal in $GOPATH/src/github.com/Sukhavati-Labs/go-miner.
  • Require environment variable as GO111MODULE="on".
  • Run go build -o bin/minerd.exe. An executable minerd.exe would be generated in ./bin/.
Contributing Code
Prerequisites
  • Install Golang 1.15 or newer.
  • Install the specific version or ProtoBuf, and related protoc-*:
# libprotoc
libprotoc 3.14.0
# https://github.com/protocolbuffers/protobuf/releases
# MacOS : brew install protobuf
# Windows: scoop install protobuf

# go get github.com/golang/protobuf@v1.4.3
protoc-gen-go

# github.com/gogo/protobuf 1.3.2
protoc-gen-gogo
# go get  github.com/gogo/protobuf/protoc-gen-gogo@v1.3.2
protoc-gen-gofast
# go get github.com/gogo/protobuf/protoc-gen-gofast@v1.3.2

# github.com/grpc-ecosystem/grpc-gateway 1.16.0
protoc-gen-grpc-gateway
# go get  github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v1.16.0
protoc-gen-swagger
# go get  github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v1.16.0
Modifying Code
# install goimports
go install golang.org/x/tools/cmd/goimports@latest
# install golangci
go get github.com/golangci/golangci-lint/cmd/golangci-lint@latest
  • New codes should be compatible with Go 1.15 or newer.
  • Run gofmt and goimports or golangci-lint run to lint go files.
  • Run make test before building executables.
Reporting Bugs

Contact Sukhavati community via community@sukhavati.io, and we will get back to you soon.

Documentation

API

A documentation for API is provided here.

Transaction Scripts

A documentation for Transaction Scripts is provided here.

License

Sukhavati Miner is licensed under the terms of the MIT license. See LICENSE for more information or see https://opensource.org/licenses/MIT.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
base58
Package base58 provides an API for working with modified base58 and Base58Check encodings.
Package base58 provides an API for working with modified base58 and Base58Check encodings.
bech32
Package bech32 provides a Go implementation of the bech32 format specified in BIP 173.
Package bech32 provides a Go implementation of the bech32 format specified in BIP 173.
cmd
database-upgrade
This package provides tools for Skt core database upgrades or repairs.
This package provides tools for Skt core database upgrades or repairs.
pb
ldb
LSN (log sequence number) This file is only used to check data correctness for 1.1.0
LSN (log sequence number) This file is only used to check data correctness for 1.1.0
memdb
Package memdb implements an instance of the database package that uses memory for the block storage.
Package memdb implements an instance of the database package that uses memory for the block storage.
Package errors implements a basic error wrapping pattern, so that errors can be annotated with additional information without losing the original error.
Package errors implements a basic error wrapping pattern, so that errors can be annotated with additional information without losing the original error.
p2p
discover
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
Package discv5 implements the RLPx v5 Topic Discovery Protocol.
netutil
Package netutil contains extensions to the net package.
Package netutil contains extensions to the net package.
upnp
Taken from taipei-torrent Just enough UPnP to be able to forward ports
Taken from taipei-torrent Just enough UPnP to be able to forward ports
poc
pocutil/crypto
Package crypto collects common cryptographic constants.
Package crypto collects common cryptographic constants.
pocutil/crypto/hash
Package hash provides interfaces for hash functions.
Package hash provides interfaces for hash functions.
pocutil/crypto/sha256
Package sha256 implements the SHA224 and SHA256 hash algorithms as defined in FIPS 180-4.
Package sha256 implements the SHA224 and SHA256 hash algorithms as defined in FIPS 180-4.
wallet/keystore/hdkeychain
Package hdkeychain provides an API for bitcoin hierarchical deterministic extended keys (BIP0032).
Package hdkeychain provides an API for bitcoin hierarchical deterministic extended keys (BIP0032).
wallet/keystore/zero
Package zero contains functions to clear data from byte slices and multi-precision integers.
Package zero contains functions to clear data from byte slices and multi-precision integers.
Package btcec implements support for the elliptic curves needed for bitcoin.
Package btcec implements support for the elliptic curves needed for bitcoin.
rpc
proto
Package rpcprotobuf is a reverse proxy.
Package rpcprotobuf is a reverse proxy.
Package txscript implements the bitcoin transaction script language.
Package txscript implements the bitcoin transaction script language.
pb

Jump to

Keyboard shortcuts

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