Skip to content

Commit

Permalink
Merge pull request #218 from iotaledger/feat/next-version
Browse files Browse the repository at this point in the history
Merge 0.1.0 into master
  • Loading branch information
luca-moser authored Feb 3, 2020
2 parents 70d9ccc + 0753dc7 commit fa821f9
Show file tree
Hide file tree
Showing 429 changed files with 27,720 additions and 12,730 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ''

---

<!--- Remove text and sections that do not apply -->
<!--- Please anonymize personal data such as IP addresses -->

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
- Go to ...
- Edit config to ...
- See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Environment information:**
- OS: [e.g. Ubuntu 18.04]
- RAM: [e.g. 4 GB]
- Cores: [e.g. 4 Cores]
- Type: [e.g. Raspberry Pi 3B+, VPS, ...]
- GoShimmer version [e.g. 0.2.1]

**Additional context**
Add any other context about the problem here [e.g. GoShimmer logs, errors, screenshots]
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release

on:
release:
types: [published]

jobs:
Release:
name: Release
runs-on: [ubuntu-latest]
container:
image: iotmod/goreleaser-cgo-cross-compiler:1.13.5
volumes: [/repo]

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Release GoShimmer
run: goreleaser --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test GoShimmer
on:
push:
pull_request:
types: [opened, reopened]
jobs:

build:
name: Test GoShimmer
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Run Tests
run: go test ./...
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Logs
logs/*
testNodes/*
*.log

# Project files
.idea

Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "IOTAtangle"]
path = IOTAtangle
url = https://github.com/glumb/IOTAtangle.git
[submodule "socket.io-client"]
path = socket.io-client
url = https://github.com/socketio/socket.io-client.git
102 changes: 102 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Documentation at http://goreleaser.com

# Project name
project_name: GoShimmer

# Environment variables
env:
- GO111MODULE=on

# Builds
builds:
# macOS AMD64
- id: goshimmer-darwin-amd64
binary: goshimmer
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
ldflags:
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
flags:
- -tags=pow_avx
main: main.go
goos:
- darwin
goarch:
- amd64
# Linux AMD64
- id: goshimmer-linux-amd64
binary: goshimmer
env:
- CGO_ENABLED=1
ldflags:
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
flags:
- -tags=pow_avx
main: main.go
goos:
- linux
goarch:
- amd64
# Windows AMD64
- id: goshimmer-windows-amd64
binary: goshimmer
env:
- CGO_ENABLED=1
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
ldflags:
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
flags:
- -tags=pow_avx
main: main.go
goos:
- windows
goarch:
- amd64

# Archives
archives:
- format: tar.gz
wrap_in_directory: true
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}-{{.Version}}_{{.Os}}_{{.Arch}}"
replacements:
amd64: x86_64
386: 32bit
arm: ARM
arm64: ARM64
darwin: macOS
linux: Linux
windows: Windows
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD
dragonfly: DragonFlyBSD
files:
- README.md
- LICENSE
- config.json

# Checksum
checksum:
name_template: "checksums.txt"

# Snapshot
snapshot:
name_template: "{{ .Tag }}"

# Changelog
changelog:
skip: true

# Release
release:
prerelease: auto
name_template: "{{.ProjectName}}-{{.Version}}"
github:
owner: iotaledger
name: goshimmer
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# v0.1.0 - 2020-01-31

> Note that this release is a complete breaking change, therefore node operators are instructed to upgrade.
This release mainly integrates the shared codebase between Hornet and GoShimmer called [hive.go](https://github.com/iotaledger/hive.go),
to foster improvements in both projects simultaneously. Additionally, the autopeering code from [autopeering-sim](https://github.com/iotaledger/autopeering-sim)
has been integrated into the codebase. For developers a Go client library is now available to communicate
with a GoShimmer node in order to issue, get and search zero value transactions and retrieve neighbor information.

A detailed list about the changes in v0.1.0 can be seen under the given [milestone](https://github.com/iotaledger/goshimmer/milestone/1?closed=1).

* Adds config keys to make bind addresses configurable
* Adds a `relay-checker` tool to check transaction propagation
* Adds database versioning
* Adds concrete shutdown order for plugins
* Adds BadgerDB garbage collection routine
* Adds SPA dashboard with TPS and memory chart, neighbors and Tangle explorer (`spa` plugin)
* Adds option to manually define autopeering seed/private keys
* Adds Golang CI and GitHub workflows as part of the continuous integration pipeline
* Adds back off policies when doing network operations
* Adds an open port check which checks whether NATs are configured properly
* Adds `netutil` package
* Adds the glumb visualizer backend as a plugin called `graph` (has to be manually enabled, check the readme)
* Adds rudimentary PoW as a rate control mechanism
* Adds the autopeering code from autopeering-sim
* Adds association between transactions and their address
* Adds the possibility to allow a node to function/start with gossiping disabled
* Adds buffered connections for gossip messages
* Adds an OAS/Swagger specification file for the web API
* Adds web API and refactors endpoints: `broadcastData`, `findTransactionHashes`,
`getNeighbors`, `getTransactionObjectsByHash`, `getTransactionTrytesByHash`, `getTransactionsToApprove`, `spammer`
* Adds a Go client library over the web API
* Adds a complete rewrite of the gossiping layer
* Fixes the autopeering visualizer to conform to the newest autopeering changes.
The visualizer can be accessed [here](http://ressims.iota.cafe/).
* Fixes parallel connections by improving the peer selection mechanism
* Fixes that LRU caches are not flushed correctly up on shutdown
* Fixes consistent application naming (removes instances of sole "Shimmer" in favor of "GoShimmer")
* Fixes several analysis server related issues
* Fixes race condition in the PoW code
* Fixes race condition in the `daemon` package
* Fixes several race conditions in the `analysis` package
* Fixes the database not being closed when the node shuts down
* Fixes `webauth` plugin to function properly with the web API
* Fixes solidification related issues
* Fixes several instances of overused goroutine spawning
* Upgrades to [BadgerDB](https://github.com/dgraph-io/badger) v2.0.1
* Upgrades to latest [iota.go](https://github.com/iotaledger/iota.go) library
* Removes sent count from spammed transactions
* Removes usage of `errors.Identifiable` and `github.com/pkg/errors` in favor of standard lib `errors` package
* Use `network`, `parameter`, `events`, `database`, `logger`, `daemon`, `workerpool` and `node` packages from hive.go
* Removes unused plugins (`zmq`, `dashboard`, `ui`)
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ EXPOSE 14626/tcp

# Copy the Pre-built binary file from the previous stage
COPY --from=build /go/bin/goshimmer .
# Copy the docker config
COPY docker.config.json config.json

ENTRYPOINT ["./goshimmer"]
1 change: 1 addition & 0 deletions IOTAtangle
Submodule IOTAtangle added at 07bba7
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
SHELL := /bin/bash
REPO := $(shell pwd)
GOFILES_NOVENDOR := $(shell go list -f "{{.Dir}}" ./...)
PACKAGES_NOVENDOR := $(shell go list ./...)
PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go

# Protobuf generated go files
PROTO_FILES = $(shell find . -path ./vendor -prune -o -type f -name '*.proto' -print)
PROTO_GO_FILES = $(patsubst %.proto, %.pb.go, $(PROTO_FILES))
PROTO_GO_FILES_REAL = $(shell find . -path ./vendor -prune -o -type f -name '*.pb.go' -print)

.PHONY: build
build: proto
go build -o goshimmer

# Protobuffing
.PHONY: proto
proto: $(PROTO_GO_FILES)

# If $GOPATH/bin/protoc-gen-go does not exist, we'll run this command to install it.
$(PROTOC_GEN_GO):
(GO111MODULE=off go get -v github.com/golang/protobuf/protoc-gen-go)

# Implicit compile rule for GRPC/proto files
%.pb.go: %.proto | $(PROTOC_GEN_GO)
protoc $< --go_out=plugins=grpc,paths=source_relative:.

.PHONY: clean_proto
clean_proto:
@rm -f $(PROTO_GO_FILES_REAL)

.PHONY: vet
vet:
@echo "Running go vet."
@go vet ${PACKAGES_NOVENDOR}

.PHONY: test
test: vet
go test -timeout 30s ./... ${GOPACKAGES_NOVENDOR}
Loading

0 comments on commit fa821f9

Please sign in to comment.