Skip to content

Commit

Permalink
Merge pull request #1745 from iotaledger/develop
Browse files Browse the repository at this point in the history
Merge latest develop changes into master
  • Loading branch information
luca-moser authored Oct 9, 2021
2 parents b5e056b + 8103bcf commit d47c227
Show file tree
Hide file tree
Showing 62 changed files with 2,416 additions and 10,730 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/deploy_docs_to_gh-pages.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Release & Devnet deploy
on:
workflow_dispatch:
inputs:
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ linters:
- gofumpt # Gofumpt checks whether code was gofumpt-ed. A more strict version of gofmt.
- goimports # Sorts and format imports.
- golint # golint checks style mistakes.
- godot # Check if comments end in a period [fast: true, auto-fix: true]
- gomnd # An analyzer to detect magic numbers.
- goprintffuncname # Checks that printf-like functions are named with f at the end.
- gosec # Inspects source code for security problems.
Expand Down Expand Up @@ -120,7 +121,6 @@ linters:
# gochecknoglobals: check that no global variables exist [fast: true, auto-fix: false]
# gochecknoinits: Checks that no init functions are present in Go code [fast: true, auto-fix: false]
# gocognit: Computes and checks the cognitive complexity of functions [fast: true, auto-fix: false]
# godot: Check if comments end in a period [fast: true, auto-fix: true]
# godox: Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false]
# gofmt: Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true]
# goheader: Checks is file header matches to pattern [fast: true, auto-fix: false]
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# v0.7.7 - 2021-10-09

> This release does **not** include changes to the consensus mechanism and still uses FPC+FCoB.
This is a **breaking** maintenance release. You must delete your current database and upgrade your node to further participate in the network.

The snapshot has been taken at 2021-10-08 2pm CEST.

Changelog:
- Changes the way the faucet plugin manages outputs in order to be able to service more funding requests.
- Fixes a nil pointer caused when a re-org is detected but the `RemoteLog` plugin is not enabled.
- Fixes an issue where the CLI wallet would no longer work under Windows.
- Use Go 1.17.2 docker image

# v0.7.6 - 2021-09-23

> This release does **not** include changes to the consensus mechanism and still uses FPC+FCoB.
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# syntax = docker/dockerfile:1.2.1

############################
# golang 1.17-buster amd64
FROM golang@sha256:cefedeae41e0bbbfa20bb1c37c3a43e0001fa541be9732f7bc6a28ecc154e9e4 AS build
# golang 1.17.2-buster multi-arch
FROM golang@sha256:5b036db95aaf91b8c75be815e2ba0ca0eecbfc3f57952c24c5d8c125970e2634 AS build

ARG BUILD_TAGS=rocksdb,builtin_static
# Download and include snapshot into resulting image by default.
Expand All @@ -29,7 +29,7 @@ RUN go mod verify
# 4. Verify that goshimmer binary is statically linked
RUN --mount=target=. \
--mount=type=cache,target=/root/.cache/go-build \
GOOS=linux GOARCH=amd64 go build \
go build \
-tags="$BUILD_TAGS" \
-ldflags='-w -s' \
-o /go/bin/goshimmer
Expand Down Expand Up @@ -71,4 +71,4 @@ COPY config.default.json /config.json
# Copy the Pre-built binary file from the previous stage
COPY --chown=nonroot:nonroot --from=build /go/bin/goshimmer /run/goshimmer

ENTRYPOINT ["/run/goshimmer", "--config=/config.json", "--messageLayer.snapshot.file=/snapshot.bin", "--database.directory=/tmp/mainnetdb"]
ENTRYPOINT ["/run/goshimmer", "--config=/config.json", "--messageLayer.snapshot.file=/snapshot.bin", "--database.directory=/tmp/mainnetdb"]
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h1 align="center">
<br>
<a href="https://goshimmer.docs.iota.org/"><img src="images/GoShimmer.png"></a>
<a href="https://wiki.iota.org/goshimmer/welcome"><img src="images/GoShimmer.png"></a>
</h1>

<h2 align="center">Prototype node software for an IOTA network without the Coordinator</h2>

<p align="center">
<a href="https://goshimmer.docs.iota.org" style="text-decoration:none;">
<a href="https://wiki.iota.org/goshimmer/welcome" style="text-decoration:none;">
<img src="https://img.shields.io/badge/Documentation%20portal-blue.svg?style=for-the-badge" alt="Developer documentation portal">
</p>
<p align="center">
Expand Down Expand Up @@ -34,28 +34,28 @@ This repository, called GoShimmer, is where the IOTA Foundation's Research Depar

GoShimmer is first and foremost a research prototype. As such, breaking changes can often happen. We invite researchers and developers to make use of this project as you see fit. Running experiments, test out new ideas, build PoC are all very welcome initiatives.

For a documentation, including tutorials and resources, we refer to the [Documentation](http://goshimmer.docs.iota.org/) (Github [link](https://github.com/iotaledger/goshimmer/blob/develop/documentation/README.md)).
For a documentation, including tutorials and resources, we refer to the [Documentation](https://wiki.iota.org/goshimmer/welcome) (Github [link](https://github.com/iotaledger/goshimmer/blob/develop/documentation/README.md)).

## Design
The code in GoShimmer is modular, where each module represents either one of the *IOTA 2.0 components*, or a basic node function such as the gossip, ledger state, and API - just to mention a few.

![Layers](docOps/static/img/protocol_specification/layers.png)

GoShimmer's modularity is based on a combination of [event-driven](https://goshimmer.docs.iota.org/docs/implementation_design/event_driven_model) and [layer-based](https://goshimmer.docs.iota.org/docs/protocol_specification/components) approaches.
GoShimmer's modularity is based on a combination of [event-driven](https://wiki.iota.org/goshimmer/implementation_design/event_driven_model) and [layer-based](https://wiki.iota.org/goshimmer/protocol_specification/components/overview) approaches.

## Client-Library and HTTP API reference

You can use the Go client-library to interact with GoShimmer (located under `github.com/iotaledger/goshimmer/client`).

You can find more info about this on our [client-lib](https://goshimmer.docs.iota.org/docs/apis/api) and [Web API](https://goshimmer.docs.iota.org/docs/apis/webAPI) documentation.
You can find more info about this on our [client-lib](https://wiki.iota.org/goshimmer/apis/client_lib) and [Web API](https://wiki.iota.org/goshimmer/apis/webAPI) documentation.

## Getting started

You can find tutorials on how to [setup a GoShimmer node](https://goshimmer.docs.iota.org/docs/tutorials/setup), [writing a dApp](https://goshimmer.docs.iota.org/docs/tutorials/dApp), [obtaining tokens from the faucet](https://goshimmer.docs.iota.org/docs/tutorials/request_funds) and more in the [GoShimmer documentation](https://goshimmer.docs.iota.org/).
You can find tutorials on how to [setup a GoShimmer node](https://wiki.iota.org/goshimmer/tutorials/setup), [writing a dApp](https://wiki.iota.org/goshimmer/tutorials/dApp), [obtaining tokens from the faucet](https://wiki.iota.org/goshimmer/tutorials/obtain_tokens) and more in the [GoShimmer documentation](https://wiki.iota.org/goshimmer/welcome).

### Compiling from source

We always recommend running your node via [Docker](https://goshimmer.docs.iota.org/docs/tutorials/setup). However, you can also compile the source and run the node from the compiled binary. GoShimmer uses [RocksDB](https://github.com/linxGnu/grocksdb) as its underlying db engine. That requires a few dependencies before building the project:
We always recommend running your node via [Docker](https://wiki.iota.org/goshimmer/tutorials/setup). However, you can also compile the source and run the node from the compiled binary. GoShimmer uses [RocksDB](https://github.com/linxGnu/grocksdb) as its underlying db engine. That requires a few dependencies before building the project:
- librocksdb
- libsnappy
- libz
Expand Down
4 changes: 4 additions & 0 deletions deploy/ansible/hosts/devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,7 @@ drands:
asset_registries:
hosts:
asset-registry-01.devnet.shimmer.iota.cafe:

lbs:
hosts:
lb.devnet.shimmer.iota.cafe:
4 changes: 4 additions & 0 deletions deploy/ansible/initial-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@
- hosts: asset_registries
roles:
- asset-registry

- hosts: lbs
roles:
- lb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ services:
--drng.pollen.threshold=3
--drng.pollen.committeeMembers=AheLpbhRs1XZsRF8t8VBwuyQh9mqPHXQvthV5rsHytDG,FZ28bSTidszUBn8TTCAT9X1nVMwFNnoYBmZ1xfafez2z,GT3UxryW4rA9RN9ojnMGmZgE2wP7psagQxgVdA4B9L1P,4pB5boPvvk2o5MbMySDhqsmC2CtUdXyotPPEpb7YQPD7,64wCsTZpmKjRVHtBKXiFojw7uw3GszumfvC4kHdWsHga
{% if xteamDRNG|default(false) %}
--drng.xteam.instanceId=1339
--drng.xteam.threshold=4
--drng.xteam.committeeMembers=GUdTwLDb6t6vZ7X5XzEnjFNDEVPteU7tVQ9nzKLfPjdo,68vNzBFE9HpmWLb2x4599AUUQNuimuhwn3XahTZZYUHt,Dc9n3JxYecaX3gpxVnWb4jS3KVz1K1SgSK1KpV1dzqT1,75g6r4tqGZhrgpDYZyZxVje1Qo54ezFYkCw94ELTLhPs,CN1XLXLHT9hv7fy3qNhpgNMD6uoHFkHtaNNKyNVCKybf,7SmttyqrKMkLo5NPYaiFoHs8LE6s7oCoWCQaZhui8m16,CypSmrHpTe3WQmCw54KP91F5gTmrQEL7EmTX38YStFXx
--drng.xTeam.instanceID=1339
--drng.xTeam.threshold=4
--drng.xTeam.committeeMembers=GUdTwLDb6t6vZ7X5XzEnjFNDEVPteU7tVQ9nzKLfPjdo,68vNzBFE9HpmWLb2x4599AUUQNuimuhwn3XahTZZYUHt,Dc9n3JxYecaX3gpxVnWb4jS3KVz1K1SgSK1KpV1dzqT1,75g6r4tqGZhrgpDYZyZxVje1Qo54ezFYkCw94ELTLhPs,CN1XLXLHT9hv7fy3qNhpgNMD6uoHFkHtaNNKyNVCKybf,7SmttyqrKMkLo5NPYaiFoHs8LE6s7oCoWCQaZhui8m16,CypSmrHpTe3WQmCw54KP91F5gTmrQEL7EmTX38YStFXx
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ services:
command: >
--skip-config=true
--node.overwriteStoredSeed=true
--autopeering.entryNodes=2PV5487xMw5rasGBXXWeqSi4hLz7r19YBt8Y1TGAsQbj@{{ entryNodeHost }}:15626{% if communityEntryNode|default(None) %},{{ communityEntryNode }}{% endif %}
{% if networkVersion|default(NOne) %}
--autoPeering.entryNodes=2PV5487xMw5rasGBXXWeqSi4hLz7r19YBt8Y1TGAsQbj@{{ entryNodeHost }}:15626{% if communityEntryNode|default(None) %},{{ communityEntryNode }}{% endif %}
{% if networkVersion|default(None) %}
--autopeering.networkVersion={{ networkVersion }}
{% endif %}
--node.disablePlugins=portcheck
Expand All @@ -57,11 +57,11 @@ services:
{% if bootstrap|default(false) %}
--messageLayer.startSynced=true
{% endif %}
--drng.pollen.instanceId=1
--drng.pollen.instanceID=1
--drng.pollen.threshold=3
--drng.pollen.committeeMembers=AheLpbhRs1XZsRF8t8VBwuyQh9mqPHXQvthV5rsHytDG,FZ28bSTidszUBn8TTCAT9X1nVMwFNnoYBmZ1xfafez2z,GT3UxryW4rA9RN9ojnMGmZgE2wP7psagQxgVdA4B9L1P,4pB5boPvvk2o5MbMySDhqsmC2CtUdXyotPPEpb7YQPD7,64wCsTZpmKjRVHtBKXiFojw7uw3GszumfvC4kHdWsHga
{% if xteamDRNG|default(false) %}
--drng.xteam.instanceId=1339
--drng.xteam.threshold=4
--drng.xteam.committeeMembers=GUdTwLDb6t6vZ7X5XzEnjFNDEVPteU7tVQ9nzKLfPjdo,68vNzBFE9HpmWLb2x4599AUUQNuimuhwn3XahTZZYUHt,Dc9n3JxYecaX3gpxVnWb4jS3KVz1K1SgSK1KpV1dzqT1,75g6r4tqGZhrgpDYZyZxVje1Qo54ezFYkCw94ELTLhPs,CN1XLXLHT9hv7fy3qNhpgNMD6uoHFkHtaNNKyNVCKybf,7SmttyqrKMkLo5NPYaiFoHs8LE6s7oCoWCQaZhui8m16,CypSmrHpTe3WQmCw54KP91F5gTmrQEL7EmTX38YStFXx
--drng.xTeam.instanceID=1339
--drng.xTeam.threshold=4
--drng.xTeam.committeeMembers=GUdTwLDb6t6vZ7X5XzEnjFNDEVPteU7tVQ9nzKLfPjdo,68vNzBFE9HpmWLb2x4599AUUQNuimuhwn3XahTZZYUHt,Dc9n3JxYecaX3gpxVnWb4jS3KVz1K1SgSK1KpV1dzqT1,75g6r4tqGZhrgpDYZyZxVje1Qo54ezFYkCw94ELTLhPs,CN1XLXLHT9hv7fy3qNhpgNMD6uoHFkHtaNNKyNVCKybf,7SmttyqrKMkLo5NPYaiFoHs8LE6s7oCoWCQaZhui8m16,CypSmrHpTe3WQmCw54KP91F5gTmrQEL7EmTX38YStFXx
{% endif %}
33 changes: 33 additions & 0 deletions deploy/ansible/roles/lb/files/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: '3'

networks:
default:
name: web

services:
reverse-proxy:
image: traefik:v2.4
restart: always
container_name: traefik
command:
- "--log.level=DEBUG"
- "--accesslog=false"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--providers.file.directory=/opt/config"
- "--providers.file.watch=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.devops.acme.tlschallenge=true"
- "[email protected]"
- "--certificatesresolvers.devops.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config:/opt/config
- ./letsencrypt/:/letsencrypt
labels:
- "traefik.enable=true"
40 changes: 40 additions & 0 deletions deploy/ansible/roles/lb/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
- name: Create traefik directory
file:
path: /opt/traefik
state: directory
mode: '0755'

- name: Create config directory
file:
path: /opt/traefik/config
state: directory
mode: '0755'

- name: Create letsencrypt directory
file:
path: /opt/traefik/letsencrypt
state: directory
mode: '0755'

- name: Template asset-registry configuration
template:
src: asset-registry.yml.j2
dest: /opt/traefik/config/asset-registry.yml
mode: '0644'

- name: Template nodes configuration
template:
src: nodes.yml.j2
dest: /opt/traefik/config/nodes.yml
mode: '0644'

- name: Template docker-compose.yml
copy:
src: docker-compose.yml
dest: /opt/traefik/docker-compose.yml
mode: '0644'

- name: Run traefik
community.general.docker_compose:
project_src: /opt/traefik
register: output
29 changes: 29 additions & 0 deletions deploy/ansible/roles/lb/templates/asset-registry.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#jinja2: trim_blocks:True, lstrip_blocks:True
http:
routers:
asset-registry-router:
rule: "Host(`asset-registry.tokenizedassetsdemo.iota.cafe`) || Host(`asset-registry.nectar.iota.cafe`)"
service: "asset-registry"
entryPoints:
- "web"
asset-registry-router-secure:
rule: "Host(`asset-registry.tokenizedassetsdemo.iota.cafe`) || Host(`asset-registry.nectar.iota.cafe`)"
service: "asset-registry"
entryPoints:
- "websecure"
tls:
certResolver: devops
services:
asset-registry:
loadBalancer:
servers:
{% for host in groups['asset_registries'] %}
- url: "http://{{ host }}:80"
{% endfor %}
passHostHeader: false
sticky:
cookie: {}
healthCheck:
path: /
interval: "10s"
timeout: "3s"
54 changes: 54 additions & 0 deletions deploy/ansible/roles/lb/templates/nodes.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#jinja2: trim_blocks:True, lstrip_blocks:True
http:
routers:
nodes-router:
rule: "Host(`nodes.tokenizedassetsdemo.iota.cafe`) || Host(`nodes.nectar.iota.cafe`)"
service: "nodes"
entryPoints:
- "web"
nodes-router-secure:
rule: "Host(`nodes.tokenizedassetsdemo.iota.cafe`) || Host(`nodes.nectar.iota.cafe`)"
service: "nodes"
entryPoints:
- "websecure"
tls:
certResolver: devops
dashboards-router:
rule: "Host(`dashboards.tokenizedassetsdemo.iota.cafe`) || Host(`dashboards.nectar.iota.cafe`)"
service: "dashboards"
entryPoints:
- "web"
dashboards-router-secure:
rule: "Host(`dashboards.tokenizedassetsdemo.iota.cafe`) || Host(`dashboards.nectar.iota.cafe`)"
service: "dashboards"
entryPoints:
- "websecure"
tls:
certResolver: devops
services:
nodes:
loadBalancer:
servers:
{% for host in groups['public_nodes'] %}
- url: "http://{{ host }}:8080"
{% endfor %}
passHostHeader: false
sticky:
cookie: {}
healthCheck:
path: /healthz
interval: "10s"
timeout: "3s"
dashboards:
loadBalancer:
servers:
{% for host in groups['public_nodes'] %}
- url: "http://{{ host }}:8081"
{% endfor %}
passHostHeader: false
sticky:
cookie: {}
healthCheck:
path: /
interval: "10s"
timeout: "3s"
2 changes: 2 additions & 0 deletions documentation/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

local-wiki
Loading

0 comments on commit d47c227

Please sign in to comment.