Skip to content

Commit

Permalink
Release v1.2.2 (#1805)
Browse files Browse the repository at this point in the history
* Use iotaledger repository

* Update go version to 1.19

* Upgrade libp2p to monorepo version

* Fix libp2p connection issue (#1533)

* Use fixed private keys in peering tests

* Fix libp2p connection issue

* Send correct error message if a block is submitted without parents and no PoW is enabled

* Add new `/api/routes` endpoint

* Block static peers in autopeering module (#1608)

* Block static peers in autopeering module

* Disable TTL in selection blocklist

* Use hive.go chrysalis backports

* Avoid locking of the p2p Manager while connection attempts are performed (#1614)

* Avoid locking of the p2p Manager while connection attempts are performed

* Fix missing handling of peers already known to the manager

* Add per-request Rest metrics to prometheus (#1651)

* - Add per-request Rest metrics to prometheus

* - Made echo dep optional

* Extend dockerignore (#1660)

* Add new config param to disable snapshot file creation. Defaults to false. (#1711)

* Add config parameter to control whether the ledger state is checked on startup. Defaults to false. (#1712)

* Add config parameter to control whether the ledger state is checked on startup

* Measure and log ledger check time

* Added a ledger token supply check to the db-hash tool

* Drop unhealthy peers (#1736)

* Drop peers that are below our pruning index (#1739)

* Fix stuck peer (#1752)

* Removed OpenedStream/ClosedStream since they were removed from network.Notifee

* Drop connection to peer if the stream is closed

* Solidify messages synchronously while they are processed (#1761)

* Solidify messages synchronously while they are processed

* Only trigger the future cone solidifier if the message is solid

* Fix edge case in warpsync which deadlocks syncing (#1763)

* Github workflow updates

* Update CodeQL action to v2

* Run security-and-quality query suite

* Update actions/checkout to v3

* Update docker actions

* Add /metadata, /raw, /children endpoints to /included-message

* Release v1.2.2

* Read info from SyncManager atomically

* Add timestamp funcs to MilestoneStorage

* Update workflows

* Fix linter errors

* Add context to connect and reconnect peer

* Fix syncing issue by preventing requests race condition

* Address review comments

* Update modules

* Ignore linter warning

Co-authored-by: Alexander Sporn <[email protected]>
  • Loading branch information
muXxer and alexsporn authored Jan 9, 2023
1 parent 859cf31 commit bf54a62
Show file tree
Hide file tree
Showing 317 changed files with 3,121 additions and 3,055 deletions.
21 changes: 18 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
.github/
.git/

# OSX related files
.DS_Store

# Docker related files
docker/
.dockerignore
Expand All @@ -26,9 +29,8 @@ docker-compose.yml
# dist packages
dist/

# OSX related files
.DS_Store
/hornet
# Integration test related files
integration-tests/

# Database directory
privatedb*/
Expand All @@ -39,6 +41,9 @@ p2pstore*/
# snapshot dir
snapshots/

# private tangle
private_tangle/

# log files
hornet.log
integration-tests/logs/*.log
Expand All @@ -48,3 +53,13 @@ integration-tests/logs/*.profile
# coordinator files
coordinator.state
migrator.state

# Documentation
documentation/

# Scripts + Tools
scripts/
tools/

# Executable
/hornet
10 changes: 7 additions & 3 deletions .github/workflows/build_HORNET.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ on:
pull_request:
paths-ignore:
- 'documentation/**'
- 'nfpm/**'
- 'private_tangle/**'
- 'scripts/**'
- 'tools/**'

jobs:
build:
name: Build HORNET
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
id: go

- name: Print Go version
run: go version

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

- name: Build HORNET
run: go build -v .
2 changes: 1 addition & 1 deletion .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build HORNET Docker image
run: docker build . --file docker/Dockerfile --tag hornet:latest
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/codeql_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,21 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: develop

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: security-and-quality

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
12 changes: 10 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,26 @@ on:
pull_request:
paths-ignore:
- 'documentation/**'
- 'docker/**'
- 'nfpm/**'
- 'private_tangle/**'
- 'scripts/**'
- 'tools/**'

jobs:
golangci-lint:
name: GolangCI-Lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
version: v1.50.1
github_token: ${{ secrets.GITHUB_TOKEN }}
golangci_lint_flags: "--timeout=10m"
reporter: "github-pr-review"
reporter: github-pr-check
filter_mode: nofilter
fail_on_error: true
58 changes: 15 additions & 43 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
paths-ignore:
- 'documentation/**'
- 'docker/**'
- 'nfpm/**'
- 'private_tangle/**'
- 'scripts/**'
- 'tools/**'

jobs:

Expand All @@ -14,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build HORNET image
run: docker build -f docker/Dockerfile -t hornet:dev .
Expand All @@ -25,7 +30,7 @@ jobs:
docker pull gaiadocker/iproute2:latest
- name: Run integration tests
run: docker-compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build
run: docker compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build

- name: Create logs from tester
if: always()
Expand All @@ -47,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build HORNET image
run: docker build -f docker/Dockerfile -t hornet:dev .
Expand All @@ -58,7 +63,7 @@ jobs:
docker pull gaiadocker/iproute2:latest
- name: Run integration tests
run: docker-compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build
run: docker compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build

- name: Create logs from tester
if: always()
Expand All @@ -80,7 +85,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build HORNET image
run: docker build -f docker/Dockerfile -t hornet:dev .
Expand All @@ -92,7 +97,7 @@ jobs:
docker build github.com/iotaledger/chrysalis-tools#:wfmock -t wfmock:latest
- name: Run integration tests
run: docker-compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build
run: docker compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build

- name: Create logs from tester
if: always()
Expand All @@ -114,7 +119,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build HORNET image
run: docker build -f docker/Dockerfile -t hornet:dev .
Expand All @@ -125,7 +130,7 @@ jobs:
docker pull gaiadocker/iproute2:latest
- name: Run integration tests
run: docker-compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build
run: docker compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build

- name: Create logs from tester
if: always()
Expand All @@ -147,7 +152,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build HORNET image
run: docker build -f docker/Dockerfile -t hornet:dev .
Expand All @@ -158,7 +163,7 @@ jobs:
docker pull gaiadocker/iproute2:latest
- name: Run integration tests
run: docker-compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build
run: docker compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build

- name: Create logs from tester
if: always()
Expand All @@ -172,36 +177,3 @@ jobs:
with:
name: ${{ env.TEST_NAME }}
path: integration-tests/logs

# benchmark:
# name: benchmark
# env:
# TEST_NAME: benchmark
# runs-on: ubuntu-latest
# steps:
# - name: Check out code into the Go module directory
# uses: actions/checkout@v2

# - name: Build HORNET image
# run: docker build -f docker/Dockerfile -t hornet:dev .

# - name: Pull additional Docker images
# run: |
# docker pull gaiaadm/pumba:0.7.4
# docker pull gaiadocker/iproute2:latest

# - name: Run integration tests
# run: docker-compose -f integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build

# - name: Create logs from tester
# if: always()
# run: |
# sudo chmod 777 integration-tests/logs
# docker logs tester &> integration-tests/logs/tester.log

# - name: Save logs as artifacts
# if: always()
# uses: actions/upload-artifact@v2
# with:
# name: ${{ env.TEST_NAME }}
# path: integration-tests/logs
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
name: Release Binaries
runs-on: ubuntu-latest
container:
image: gohornet/goreleaser-cgo-cross-compiler:1.18
image: iotaledger/goreleaser-cgo-cross-compiler:1.19.4
volumes: [/repo]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Release HORNET
run: goreleaser --rm-dist
Expand All @@ -24,37 +24,40 @@ jobs:
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

docker:
release-docker:
name: Release Docker
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: gohornet/hornet
images: iotaledger/hornet
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=match,pattern=v(\d+.\d+),suffix=-alpha,group=1,enable=${{ contains(github.ref, '-alpha') }}
type=match,pattern=v(\d+.\d+),suffix=-beta,group=1,enable=${{ contains(github.ref, '-beta') }}
type=match,pattern=v(\d+.\d+),suffix=-rc,group=1,enable=${{ contains(github.ref, '-rc') }}
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }}
password: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }}

- name: Build and push to Dockerhub
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk-test-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: develop

Expand All @@ -19,4 +19,4 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --org=gohornet
args: --org=iotaledger
10 changes: 7 additions & 3 deletions .github/workflows/test_HORNET.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ on:
pull_request:
paths-ignore:
- 'documentation/**'
- 'nfpm/**'
- 'private_tangle/**'
- 'scripts/**'
- 'tools/**'

jobs:
test:
name: Test HORNET
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
id: go

- name: Print Go version
Expand All @@ -23,7 +27,7 @@ jobs:
run: sudo apt update && sudo apt install build-essential -y

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

- name: Test HORNET
uses: nick-invision/retry@v2
Expand Down
Loading

0 comments on commit bf54a62

Please sign in to comment.