Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit d2fe4f3

Browse files
authored
Merge pull request #677 from iotaledger/develop
Merges v0.2.2 changes to master
2 parents 0be22ca + 1bfa13b commit d2fe4f3

File tree

226 files changed

+9797
-5763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+9797
-5763
lines changed

.dockerignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
LICENSE
55
README.md
66
CHANGELOG.md
7-
images/
87
docker-compose.yml
98

9+
images/
1010
tools/
11-
client/
1211

1312
# Database directory
1413
mainnetdb/

.github/workflows/integration-tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,3 +247,37 @@ jobs:
247247
with:
248248
name: ${{ env.TEST_NAME }}
249249
path: tools/integration-tests/logs
250+
251+
syncbeacon:
252+
name: syncbeacon
253+
env:
254+
TEST_NAME: syncbeacon
255+
runs-on: ubuntu-latest
256+
steps:
257+
258+
- name: Check out code
259+
uses: actions/checkout@v2
260+
261+
- name: Build GoShimmer image
262+
run: docker build -t iotaledger/goshimmer .
263+
264+
- name: Pull additional Docker images
265+
run: |
266+
docker pull angelocapossele/drand:latest
267+
docker pull gaiaadm/pumba:latest
268+
docker pull gaiadocker/iproute2:latest
269+
270+
- name: Run integration tests
271+
run: docker-compose -f tools/integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build
272+
273+
- name: Create logs from tester
274+
if: always()
275+
run: |
276+
docker logs tester &> tools/integration-tests/logs/tester.log
277+
278+
- name: Save logs as artifacts
279+
if: always()
280+
uses: actions/upload-artifact@v1
281+
with:
282+
name: ${{ env.TEST_NAME }}
283+
path: tools/integration-tests/logs

.github/workflows/release.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,20 @@ jobs:
88
name: GoReleaser
99
runs-on:
1010
- ubuntu-latest
11-
container:
12-
image: 'iotmod/goreleaser-cgo-cross-compiler:1.14.4'
13-
volumes:
14-
- /repo
1511
steps:
1612
- name: Checkout
1713
uses: actions/checkout@v2
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: 1.14
1818
- name: Copy config.default.json to config.json
1919
run: cp config.default.json config.json
20-
- name: Release GoShimmer
21-
run: goreleaser --rm-dist
20+
- name: Run GoReleaser
21+
uses: goreleaser/goreleaser-action@v2
22+
with:
23+
version: latest
24+
args: release --rm-dist
2225
env:
2326
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
2427
docker:

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
*.dll
55
*.so
66
*.dylib
7+
*.dat
8+
*.dat.bkp
9+
10+
# cli-wallet config
11+
tools/cli-wallet/config.json
712

813
# Test binary, build with `go test -c`
914
*.test

.goreleaser.yml

Lines changed: 98 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,98 @@
1-
# Documentation at http://goreleaser.com
2-
3-
# Project name
4-
project_name: GoShimmer
5-
6-
# Environment variables
7-
env:
8-
- GO111MODULE=on
9-
10-
# Builds
11-
builds:
12-
# macOS AMD64
13-
- id: goshimmer-darwin-amd64
14-
binary: goshimmer
15-
env:
16-
- CGO_ENABLED=0
17-
ldflags:
18-
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
19-
main: main.go
20-
goos:
21-
- darwin
22-
goarch:
23-
- amd64
24-
# Linux AMD64
25-
- id: goshimmer-linux-amd64
26-
binary: goshimmer
27-
env:
28-
- CGO_ENABLED=1
29-
ldflags:
30-
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
31-
flags:
32-
- -tags=pow_avx
33-
main: main.go
34-
goos:
35-
- linux
36-
goarch:
37-
- amd64
38-
# Windows AMD64
39-
- id: goshimmer-windows-amd64
40-
binary: goshimmer
41-
env:
42-
- CGO_ENABLED=1
43-
- CC=x86_64-w64-mingw32-gcc
44-
- CXX=x86_64-w64-mingw32-g++
45-
ldflags:
46-
- -s -w -X github.com/iotaledger/goshimmer/plugins/cli.AppVersion={{.Version}}
47-
flags:
48-
- -tags=pow_avx
49-
main: main.go
50-
goos:
51-
- windows
52-
goarch:
53-
- amd64
54-
55-
# Archives
56-
archives:
57-
- format: tar.gz
58-
wrap_in_directory: true
59-
format_overrides:
60-
- goos: windows
61-
format: zip
62-
name_template: "{{.ProjectName}}-{{.Version}}_{{.Os}}_{{.Arch}}"
63-
replacements:
64-
amd64: x86_64
65-
386: 32bit
66-
arm: ARM
67-
arm64: ARM64
68-
darwin: macOS
69-
linux: Linux
70-
windows: Windows
71-
openbsd: OpenBSD
72-
netbsd: NetBSD
73-
freebsd: FreeBSD
74-
dragonfly: DragonFlyBSD
75-
files:
76-
- README.md
77-
- LICENSE
78-
- config.json
79-
- snapshot.bin
80-
81-
# Checksum
82-
checksum:
83-
name_template: "checksums.txt"
84-
85-
# Snapshot
86-
snapshot:
87-
name_template: "{{ .Tag }}"
88-
89-
# Changelog
90-
changelog:
91-
skip: true
92-
93-
# Release
94-
release:
95-
prerelease: auto
96-
name_template: "{{.ProjectName}}-{{.Version}}"
97-
github:
98-
owner: iotaledger
99-
name: goshimmer
1+
# Documentation at http://goreleaser.com
2+
3+
# Project name
4+
project_name: GoShimmer
5+
6+
# Environment variables
7+
env:
8+
- GO111MODULE=on
9+
10+
# Builds
11+
builds:
12+
# GoShimmer AMD64 all OS
13+
- id: goshimmer
14+
binary: goshimmer
15+
env:
16+
- CGO_ENABLED=0
17+
ldflags:
18+
- -s -w -X github.com/iotaledger/goshimmer/plugins/banner.AppVersion={{.Version}}
19+
goos:
20+
- linux
21+
- darwin
22+
- windows
23+
goarch:
24+
- amd64
25+
26+
# cli-wallet AMD64 all OS
27+
- id: cli-wallet
28+
dir: ./tools/cli-wallet
29+
binary: cli-wallet
30+
env:
31+
- CGO_ENABLED=0
32+
goos:
33+
- linux
34+
- darwin
35+
- windows
36+
goarch:
37+
- amd64
38+
39+
# Archives
40+
archives:
41+
# GoShimmer with config and snapshot
42+
- id: goshimmer
43+
builds:
44+
- goshimmer
45+
name_template: "goshimmer-{{.Version}}_{{.Os}}_{{.Arch}}"
46+
replacements:
47+
amd64: x86_64
48+
arm: ARM
49+
arm64: ARM64
50+
darwin: macOS
51+
linux: Linux
52+
windows: Windows
53+
format_overrides:
54+
- goos: windows
55+
format: zip
56+
files:
57+
- README.md
58+
- LICENSE
59+
- config.json
60+
- snapshot.bin
61+
62+
# cli-wallet
63+
- id: cli-wallet
64+
builds:
65+
- cli-wallet
66+
name_template: "cli-wallet-{{.Version}}_{{.Os}}_{{.Arch}}"
67+
replacements:
68+
amd64: x86_64
69+
arm: ARM
70+
arm64: ARM64
71+
darwin: macOS
72+
linux: Linux
73+
windows: Windows
74+
format_overrides:
75+
- goos: windows
76+
format: zip
77+
files:
78+
- LICENSE
79+
80+
# Checksum
81+
checksum:
82+
name_template: "checksums.txt"
83+
84+
# Snapshot
85+
snapshot:
86+
name_template: "{{ .Tag }}"
87+
88+
# Changelog
89+
changelog:
90+
skip: true
91+
92+
# Release
93+
release:
94+
prerelease: auto
95+
name_template: "{{.ProjectName}}-{{.Version}}"
96+
github:
97+
owner: iotaledger
98+
name: goshimmer

CHANGELOG.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# v0.2.2 - 2020-07-27
2+
* Improves message and transaction validation:
3+
* Adjust max transaction inputs count;
4+
* Adds signature validation before issuance;
5+
* Enforce max message size in message factory.
6+
* Improves API:
7+
* Changes granularity of spammer API to accept messages per minute;
8+
* Adds API middleware and set CORS to allow from every origin;
9+
* Adds sendTransactionByJSON to allow a client to issue transactions by providing them in a JSON format;
10+
* Adds tool API endpoint to facilitate debugging of the solidification status;
11+
* Removes old API documentation;
12+
* Improves synchronization process:
13+
* Refactors message requester to be more reliable;
14+
* Improves solidification process;
15+
* Refactors worker pool management;
16+
* Replaces bootstrap plugin with the more secure and reliable beacon plugin.
17+
* Improves analysis-server dashboard:
18+
* Adds the ability to distinguish between different GoShimmer node versions;
19+
* Refactors the interaction between server side and dashboard;
20+
* Improves consensus visualization;
21+
* Improves dashboard tooling.
22+
* Adds a new electron-based wallet.
23+
* Increases max gossip packet size.
24+
* Adds command to the CLI to override database dirty flag.
25+
* Grafana local dashboard
26+
* Adds messages in database chart (solid, not solid, total)
27+
* Adds average solidification time chart
28+
* Adds Message Request Queue Size chart
29+
* **Breaking**: bumps network and database versions
30+
131
# v0.2.1 - 2020-07-01
232
* Adds PoW requirement to faucet payloads
333
* Adds tips broadcaster to ensure that all chains are getting solidified
@@ -167,4 +197,4 @@ A detailed list about the changes in v0.1.0 can be seen under the given [milesto
167197
* Removes sent count from spammed transactions
168198
* Removes usage of `errors.Identifiable` and `github.com/pkg/errors` in favor of standard lib `errors` package
169199
* Use `network`, `parameter`, `events`, `database`, `logger`, `daemon`, `workerpool` and `node` packages from hive.go
170-
* Removes unused plugins (`zmq`, `dashboard`, `ui`)
200+
* Removes unused plugins (`zmq`, `dashboard`, `ui`)

client/tools.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package client
2+
3+
import (
4+
"errors"
5+
"net/http"
6+
7+
webapi_tools "github.com/iotaledger/goshimmer/plugins/webapi/tools"
8+
)
9+
10+
const (
11+
routePastCone = "tools/pastcone"
12+
)
13+
14+
// PastConeExist checks that all of the messages in the past cone of a message are existing on the node
15+
// down to the genesis. Returns the number of messages in the past cone as well.
16+
func (api *GoShimmerAPI) PastConeExist(base58EncodedMessageID string) (*webapi_tools.PastConeResponse, error) {
17+
res := &webapi_tools.PastConeResponse{}
18+
19+
if err := api.do(
20+
http.MethodGet,
21+
routePastCone,
22+
&webapi_tools.PastConeRequest{ID: base58EncodedMessageID},
23+
res,
24+
); err != nil {
25+
return nil, err
26+
}
27+
28+
if res.Error != "" {
29+
return res, errors.New(res.Error)
30+
}
31+
return res, nil
32+
}

0 commit comments

Comments
 (0)