diff --git a/.scripts/release.sh b/.scripts/release.sh new file mode 100644 index 0000000..34d192f --- /dev/null +++ b/.scripts/release.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# This script cross-compiles binaries for various platforms + +# Download our release binary builder +go get -u github.com/mitchellh/gox + +# Specify platforms and release version +PLATFORMS="linux/amd64 linux/386 darwin/386 windows/amd64 windows/386" +RELEASE=$(git describe --tags) +echo "Building release $RELEASE" + +# Build Inertia Go binaries for specified platforms +gox -output="cumulus.$(git describe --tags).{{.OS}}.{{.Arch}}" \ + -osarch="$PLATFORMS" \ diff --git a/.static/create-transaction.png b/.static/create-transaction.png new file mode 100644 index 0000000..5598fba Binary files /dev/null and b/.static/create-transaction.png differ diff --git a/.travis.yml b/.travis.yml index d500570..41d81a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,15 @@ language: go sudo: false go: - - 1.7 +- '1.10' + before_install: - - go get github.com/mattn/goveralls +- go get github.com/mattn/goveralls +- go get github.com/golang/dep/cmd/dep + install: - - make install-glide - - make deps +- dep ensure + script: - - $HOME/gopath/bin/goveralls -service=travis-ci +- go test -coverprofile=coverage.out ./... +- goveralls -coverprofile=coverage.out -service=travis-ci diff --git a/Gopkg.lock b/Gopkg.lock new file mode 100644 index 0000000..d247420 --- /dev/null +++ b/Gopkg.lock @@ -0,0 +1,189 @@ +# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. + + +[[projects]] + name = "github.com/Sirupsen/logrus" + packages = ["."] + revision = "89742aefa4b206dcf400792f3bd35b542998eb3b" + +[[projects]] + name = "github.com/abiosoft/ishell" + packages = ["."] + revision = "1fe4da16846908f352ed09310705a9c84f4b9f97" + +[[projects]] + name = "github.com/chzyer/readline" + packages = ["."] + revision = "41eea22f717c616615e1e59aa06cf831f9901f35" + +[[projects]] + name = "github.com/davecgh/go-spew" + packages = ["spew"] + revision = "6d212800a42e8ab5c146b8ace3490ee17e5225f9" + +[[projects]] + name = "github.com/fatih/color" + packages = ["."] + revision = "67c513e5729f918f5e69786686770c27141a4490" + +[[projects]] + branch = "master" + name = "github.com/flynn-archive/go-shlex" + packages = ["."] + revision = "3f9db97f856818214da2e1057f8ad84803971cff" + +[[projects]] + name = "github.com/fsnotify/fsnotify" + packages = ["."] + revision = "4da3e2cfbabc9f751898f250b49f2439785783a1" + +[[projects]] + name = "github.com/google/uuid" + packages = ["."] + revision = "064e2069ce9c359c118179501254f67d7d37ba24" + version = "0.2" + +[[projects]] + name = "github.com/hashicorp/hcl" + packages = [ + ".", + "hcl/ast", + "hcl/parser", + "hcl/scanner", + "hcl/strconv", + "hcl/token", + "json/parser", + "json/scanner", + "json/token" + ] + revision = "8f6b1344a92ff8877cf24a5de9177bf7d0a2a187" + +[[projects]] + name = "github.com/inconshreveable/mousetrap" + packages = ["."] + revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" + version = "v1.0" + +[[projects]] + name = "github.com/magiconair/properties" + packages = ["."] + revision = "be5ece7dd465ab0765a9682137865547526d1dfb" + version = "v1.7.3" + +[[projects]] + name = "github.com/mattn/go-colorable" + packages = ["."] + revision = "5411d3eea5978e6cdc258b30de592b60df6aba96" + +[[projects]] + name = "github.com/mattn/go-isatty" + packages = ["."] + revision = "57fdcb988a5c543893cc61bce354a6e24ab70022" + +[[projects]] + name = "github.com/mitchellh/mapstructure" + packages = ["."] + revision = "d0303fe809921458f417bcf828397a65db30a7e4" + +[[projects]] + name = "github.com/pelletier/go-toml" + packages = ["."] + revision = "9c1b4e331f1e3d98e72600677699fbe212cd6d16" + +[[projects]] + name = "github.com/pmezard/go-difflib" + packages = ["difflib"] + revision = "d8ed2627bdf02c080bf22230dbb337003b7aba2d" + +[[projects]] + name = "github.com/spf13/afero" + packages = [ + ".", + "mem" + ] + revision = "36f8810e2e3d7eeac4ac05b57f65690fbfba62a2" + +[[projects]] + name = "github.com/spf13/cast" + packages = ["."] + revision = "acbeb36b902d72a7a4c18e8f3241075e7ab763e4" + version = "v1.1.0" + +[[projects]] + name = "github.com/spf13/cobra" + packages = ["."] + revision = "2df9a531813370438a4d79bfc33e21f58063ed87" + +[[projects]] + name = "github.com/spf13/jwalterweatherman" + packages = ["."] + revision = "0efa5202c04663c757d84f90f5219c1250baf94f" + +[[projects]] + name = "github.com/spf13/pflag" + packages = ["."] + revision = "e57e3eeb33f795204c1ca35f56c44f83227c6e66" + version = "v1.0.0" + +[[projects]] + name = "github.com/spf13/viper" + packages = ["."] + revision = "25b30aa063fc18e48662b86996252eabdcf2f0c7" + version = "v1.0.0" + +[[projects]] + name = "github.com/stretchr/testify" + packages = ["assert"] + revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0" + version = "v1.1.4" + +[[projects]] + name = "golang.org/x/crypto" + packages = [ + "pbkdf2", + "ssh/terminal" + ] + revision = "81e90905daefcd6fd217b62423c0908922eadb30" + +[[projects]] + name = "golang.org/x/sys" + packages = [ + "unix", + "windows" + ] + revision = "2d6f6f883a06fc0d5f4b14a81e4c28705ea64c15" + +[[projects]] + name = "golang.org/x/text" + packages = [ + "internal/gen", + "internal/triegen", + "internal/ucd", + "transform", + "unicode/cldr", + "unicode/norm" + ] + revision = "ac87088df8ef557f1e32cd00ed0b6fbc3f7ddafb" + +[[projects]] + name = "gopkg.in/fatih/set.v0" + packages = ["."] + revision = "27c40922c40b43fe04554d8223a402af3ea333f3" + +[[projects]] + name = "gopkg.in/kyokomi/emoji.v1" + packages = ["."] + revision = "7e06b236c489543f53868841f188a294e3383eab" + version = "v1.5" + +[[projects]] + name = "gopkg.in/yaml.v2" + packages = ["."] + revision = "eb3733d160e74a9c7e442f435eb3bea458e1d19f" + +[solve-meta] + analyzer-name = "dep" + analyzer-version = 1 + inputs-digest = "49d4bb58fb1f814a7502ffee1db11de5bf7a3a5b2e646feae3e951079fcff0d6" + solver-name = "gps-cdcl" + solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml new file mode 100644 index 0000000..c04b7d5 --- /dev/null +++ b/Gopkg.toml @@ -0,0 +1,46 @@ +# Gopkg.toml example +# +# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md +# for detailed Gopkg.toml documentation. +# +# required = ["github.com/user/thing/cmd/thing"] +# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] +# +# [[constraint]] +# name = "github.com/user/project" +# version = "1.0.0" +# +# [[constraint]] +# name = "github.com/user/project2" +# branch = "dev" +# source = "github.com/myfork/project2" +# +# [[override]] +# name = "github.com/x/y" +# version = "2.4.0" +# +# [prune] +# non-go = false +# go-tests = true +# unused-packages = true + + +[[constraint]] + name = "github.com/google/uuid" + version = "0.2.0" + +[[constraint]] + name = "github.com/spf13/viper" + version = "1.0.0" + +[[constraint]] + name = "github.com/stretchr/testify" + version = "~1.1.4" + +[[constraint]] + name = "gopkg.in/kyokomi/emoji.v1" + version = "1.5.0" + +[prune] + go-tests = true + unused-packages = true diff --git a/Makefile b/Makefile index e05ca22..454a633 100644 --- a/Makefile +++ b/Makefile @@ -1,23 +1,19 @@ .PHONY: test deps clean install_glide -PACKAGES = `go list ./... | grep -v vendor/` - all: cumulus cumulus: go build test: - go test $(PACKAGES) --cover + go test ./... --cover run-console: cumulus ./cumulus run -c deps: - glide install + go get -u github.com/golang/dep/cmd/dep + dep ensure clean: cumulus rm -f cumulus blockchain.json user.json logfile - -install-glide: - sh scripts/install_glide.sh diff --git a/README.md b/README.md index 4393139..532e720 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,86 @@ -# Cumulus +

+ +

-Crypto-currency that doesn't waste your time. +
+

Cumulus 💸

+
-[![ZenHub](https://raw.githubusercontent.com/ZenHubIO/support/master/zenhub-badge.png)](https://zenhub.com) -[![Coverage Status](https://coveralls.io/repos/github/ubclaunchpad/cumulus/badge.svg?branch=dev)](https://coveralls.io/github/ubclaunchpad/cumulus?branch=dev) -[![Build Status](https://travis-ci.org/ubclaunchpad/cumulus.svg?branch=dev)](https://travis-ci.org/ubclaunchpad/cumulus) -[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](https://godoc.org/github.com/ubclaunchpad/cumulus) +

+ Cryptocurrency that doesn't waste your time. +

+ +

+ + Build Status + + + + Coverage + + + + GoDocs + + + + Clean code + + + + Shipping faster with ZenHub + +

+ +
+ +## Introduction + +At [UBC Launch Pad](http://www.ubclaunchpad.com) we’ve been interested in crypto-currency and blockchain tech for a while now, and after several months of experimentation we’re excited to announce our latest project. Cumulus is a new cryptocurrency with its own blockchain and token. The current command line interface allows users to create wallets, mine coins, and send funds to other users. + +There are a lot of cryptocurrencies out there already, so it’s a fair question to ask what makes Cumulus special over other, more entrenched currencies like Bitcoin and Ethereum. The short answer is because we’re all excited by the possibilities created by this technology! In addition, there are many problems in the blockchain space that remain to be solved. Other cryptocurrencies have significant downsides like small block sizes and vast computation waste spent securing the network. We are addressing many of these problems in Cumulus. Beyond that, we see massive opportunities in this space in the years to come. Cumulus is the infrastructure on which we can build in the blockchain space as it matures. + +You can read more about Cumulus in the [Medium post introducting the project](https://medium.com/ubc-launch-pad-software-engineering-blog/introducing-cumulus-940456b7e05c) as well as the [extensive wiki documentation](https://github.com/ubclaunchpad/cumulus/wiki). ## Installation -Install dependencies. We need to manually use version 0.11.1 of Glide temporarily because 0.12 introduced a bug in recursive dependencies. +**MacOS** - the Cumulus CLI can be installed using [Homebrew](https://brew.sh): -Install Glide. -```sh -make install-glide +```bash +brew install ubclaunchpad/tap/cumulus ``` -Get dependencies. +**Windows** - the Cumulus CLI can be installed using [Scoop](http://scoop.sh): + +```bash +scoop bucket add ubclaunchpad https://github.com/ubclaunchpad/scoop-bucket +scoop install cumulus +``` + +You can check the installation and see the Cumulus CLI documentation by running: + +```bash +cumulus --help +``` + +## Building + +First, [install Go](https://golang.org/doc/install#install) and grab the Cumulus source code: + +```bash +go get -u github.com/ubclaunchpad/cumulus +``` + +Cumulus uses [dep](https://github.com/golang/dep) for dependency management. The following will install dep and run `dep ensure`: + ```sh make deps ``` -Build. +You can now build and run Cumulus: + ```sh -make +make run-console ``` ## Testing diff --git a/glide.lock b/glide.lock deleted file mode 100644 index de39459..0000000 --- a/glide.lock +++ /dev/null @@ -1,91 +0,0 @@ -hash: 4d8297229dc2aa4ab257d98205eed701d6ceaa35e9cb4f2da3c8f527fd89c36d -updated: 2017-08-28T21:48:19.17868382-07:00 -imports: -- name: github.com/abiosoft/ishell - version: 1fe4da16846908f352ed09310705a9c84f4b9f97 -- name: github.com/ammario/crand - version: f30c14fd0b28f2dd8d2e5849d5d1dc7751508ca1 -- name: github.com/chzyer/readline - version: 41eea22f717c616615e1e59aa06cf831f9901f35 -- name: github.com/fatih/color - version: 67c513e5729f918f5e69786686770c27141a4490 -- name: github.com/flynn-archive/go-shlex - version: 3f9db97f856818214da2e1057f8ad84803971cff -- name: github.com/fsnotify/fsnotify - version: 4da3e2cfbabc9f751898f250b49f2439785783a1 -- name: github.com/google/uuid - version: 064e2069ce9c359c118179501254f67d7d37ba24 -- name: github.com/hashicorp/hcl - version: 8f6b1344a92ff8877cf24a5de9177bf7d0a2a187 - subpackages: - - hcl/ast - - hcl/parser - - hcl/token - - json/parser - - hcl/scanner - - hcl/strconv - - json/scanner - - json/token -- name: github.com/inconshreveable/mousetrap - version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 -- name: github.com/magiconair/properties - version: be5ece7dd465ab0765a9682137865547526d1dfb -- name: github.com/mattn/go-colorable - version: 5411d3eea5978e6cdc258b30de592b60df6aba96 - repo: https://github.com/mattn/go-colorable -- name: github.com/mattn/go-isatty - version: 57fdcb988a5c543893cc61bce354a6e24ab70022 - repo: https://github.com/mattn/go-isatty -- name: github.com/mitchellh/mapstructure - version: d0303fe809921458f417bcf828397a65db30a7e4 -- name: github.com/pelletier/go-toml - version: 9c1b4e331f1e3d98e72600677699fbe212cd6d16 -- name: github.com/Sirupsen/logrus - version: 89742aefa4b206dcf400792f3bd35b542998eb3b -- name: github.com/spf13/afero - version: 36f8810e2e3d7eeac4ac05b57f65690fbfba62a2 - subpackages: - - mem -- name: github.com/spf13/cast - version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 -- name: github.com/spf13/cobra - version: 2df9a531813370438a4d79bfc33e21f58063ed87 -- name: github.com/spf13/jwalterweatherman - version: 0efa5202c04663c757d84f90f5219c1250baf94f -- name: github.com/spf13/pflag - version: e57e3eeb33f795204c1ca35f56c44f83227c6e66 -- name: github.com/spf13/viper - version: 25b30aa063fc18e48662b86996252eabdcf2f0c7 -- name: github.com/stretchr/testify - version: 69483b4bd14f5845b5a1e55bca19e954e827f1d0 - subpackages: - - assert -- name: golang.org/x/crypto - version: 81e90905daefcd6fd217b62423c0908922eadb30 - subpackages: - - ssh/terminal -- name: golang.org/x/sys - version: 2d6f6f883a06fc0d5f4b14a81e4c28705ea64c15 - subpackages: - - unix - - windows -- name: golang.org/x/text - version: ac87088df8ef557f1e32cd00ed0b6fbc3f7ddafb - subpackages: - - transform - - unicode/norm -- name: gopkg.in/fatih/set.v0 - version: 27c40922c40b43fe04554d8223a402af3ea333f3 -- name: gopkg.in/kyokomi/emoji.v1 - version: 7e06b236c489543f53868841f188a294e3383eab -- name: gopkg.in/yaml.v2 - version: eb3733d160e74a9c7e442f435eb3bea458e1d19f -testImports: -- name: github.com/davecgh/go-spew - version: 6d212800a42e8ab5c146b8ace3490ee17e5225f9 - subpackages: - - spew -- name: github.com/pmezard/go-difflib - version: d8ed2627bdf02c080bf22230dbb337003b7aba2d - subpackages: - - difflib diff --git a/glide.yaml b/glide.yaml deleted file mode 100644 index a64cebf..0000000 --- a/glide.yaml +++ /dev/null @@ -1,17 +0,0 @@ -package: github.com/ubclaunchpad/cumulus -import: -- package: github.com/Sirupsen/logrus -- package: github.com/google/uuid - version: ~0.2.0 -- package: github.com/spf13/cobra -- package: github.com/spf13/viper -- package: github.com/spf13/pflag -- package: github.com/stretchr/testify - version: ~1.1.4 - subpackages: - - assert -- package: github.com/abiosoft/ishell -- package: gopkg.in/kyokomi/emoji.v1 - version: ^1.5.0 -- package: gopkg.in/fatih/set.v0 - version: ~0.1.0 diff --git a/scripts/install_glide.sh b/scripts/install_glide.sh deleted file mode 100644 index 55abfae..0000000 --- a/scripts/install_glide.sh +++ /dev/null @@ -1,8 +0,0 @@ -go get github.com/Masterminds/glide -cd $GOPATH/src/github.com/Masterminds/glide -git checkout tags/v0.11.1 -go install - -glide --version - -cd $GOPATH/src/github.com/ubclaunchpad/cumulus