Skip to content

Commit

Permalink
Merge pull request #750 from iotaledger/chore/update-go-version
Browse files Browse the repository at this point in the history
Update go version to 1.22
  • Loading branch information
muXxer committed Feb 16, 2024
2 parents 3ace6e7 + 157cec8 commit c789dd6
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 135 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,31 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Checkout custom linter
uses: actions/checkout@v4
with:
repository: iotaledger/typegroupingcheck
path: typegroupingcheck
#- name: Checkout custom linter
# uses: actions/checkout@v4
# with:
# repository: iotaledger/typegroupingcheck
# path: typegroupingcheck

#- name: Setup go
# uses: actions/setup-go@v5
# with:
# go-version-file: './typegroupingcheck/go.mod'

#- name: Build custom linter
# working-directory: ./typegroupingcheck
# run: |
# go build -buildmode=plugin -o typegroupingcheck.so

- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: './typegroupingcheck/go.mod'

- name: Build custom linter
working-directory: ./typegroupingcheck
run: |
go build -buildmode=plugin -o typegroupingcheck.so
go-version-file: 'go.mod'

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
skip-cache: true
version: latest
install-mode: goinstall
args: --timeout=10m --enable typegroupingcheck
args: --timeout=10m # --enable typegroupingcheck
8 changes: 4 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ linters-settings:
desc: Should be replaced with "github.com/iotaledger/hive.go/ierrors" package
- pkg: "github.com/pkg/errors"
desc: Should be replaced with "github.com/iotaledger/hive.go/ierrors" package
custom:
typegroupingcheck:
path: ./typegroupingcheck/typegroupingcheck.so
description: Check for grouped types in functions' parameters
#custom:
# typegroupingcheck:
# path: ./typegroupingcheck/typegroupingcheck.so
# description: Check for grouped types in functions' parameters

linters:
# Disable all linters.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://hub.docker.com/_/golang
FROM golang:1.21-bookworm AS build
FROM golang:1.22-bookworm AS build

ARG BUILD_TAGS=rocksdb
ARG BUILD_VERSION=v1.0.0-develop
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG WITH_GO_WORK=0
# https://hub.docker.com/_/golang
FROM golang:1.21-bookworm AS base
FROM golang:1.22-bookworm AS base

ARG BUILD_TAGS=rocksdb

Expand Down
38 changes: 19 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/iotaledger/iota-core

go 1.21
go 1.22

replace github.com/goccy/go-graphviz => github.com/alexsporn/go-graphviz v0.0.0-20231011102718-04f10f0a9b59

Expand All @@ -10,23 +10,23 @@ require (
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.1
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/iotaledger/hive.go/ads v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/app v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/constraints v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/crypto v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/ds v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/ierrors v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/kvstore v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/lo v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/log v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/runtime v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240214175801-9ca9f93790f5
github.com/iotaledger/hive.go/stringify v0.0.0-20240214175801-9ca9f93790f5
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240214181534-9a393ea95057
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240214181217-a6dd0abaab8d
github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00
github.com/iotaledger/iota.go/v4 v4.0.0-20240215154216-92b1c8ba1c57
github.com/iotaledger/hive.go/ads v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/app v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/constraints v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/crypto v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/ds v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/ierrors v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/kvstore v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/lo v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/log v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/runtime v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240216135101-261e99d9d84a
github.com/iotaledger/hive.go/stringify v0.0.0-20240216135101-261e99d9d84a
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240216141618-d7dfe94bdc1e
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240216141023-6d5f4ef12ac5
github.com/iotaledger/iota-crypto-demo v0.0.0-20240216103559-27ca8dffd1e7
github.com/iotaledger/iota.go/v4 v4.0.0-20240216140514-c867d6524642
github.com/labstack/echo/v4 v4.11.4
github.com/labstack/gommon v0.4.2
github.com/libp2p/go-libp2p v0.32.2
Expand Down Expand Up @@ -145,7 +145,7 @@ require (
github.com/pokt-network/smt v0.9.2 // indirect
github.com/polydawn/refmt v0.89.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/quic-go v0.41.0 // indirect
Expand Down
72 changes: 36 additions & 36 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -277,40 +277,40 @@ github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJ
github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7 h1:dTrD7X2PTNgli6EbS4tV9qu3QAm/kBU3XaYZV2xdzys=
github.com/iotaledger/grocksdb v1.7.5-0.20230220105546-5162e18885c7/go.mod h1:ZRdPu684P0fQ1z8sXz4dj9H5LWHhz4a9oCtvjunkSrw=
github.com/iotaledger/hive.go/ads v0.0.0-20240214175801-9ca9f93790f5 h1:3HG3ON8Imcd6UNC48cKEWs5RaUbyVlW/A5xopq1DYHk=
github.com/iotaledger/hive.go/ads v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:jjVkGGP4dDQIkQI57N+amojRzbMl1skSmdkg/2bhGgQ=
github.com/iotaledger/hive.go/app v0.0.0-20240214175801-9ca9f93790f5 h1:/ZbVYgtYR3d7UQi11cBz4/uLxuZCZaWtOlsf19oo8yw=
github.com/iotaledger/hive.go/app v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:ohkNhGs3N6FKoWKM2eTdfGx4oNC7NR61eRvjTUpVzyk=
github.com/iotaledger/hive.go/constraints v0.0.0-20240214175801-9ca9f93790f5 h1:PC1CUm0M8/JiXQdmVKWtIYDJIAffwAh7AQZ9hSlMwl0=
github.com/iotaledger/hive.go/constraints v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:dOBOM2s4se3HcWefPe8sQLUalGXJ8yVXw58oK8jke3s=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240214175801-9ca9f93790f5 h1:1DX9RGuwYqOf6kzVb+LIPYJM3Jw6ykf63hJcYfLO8Qs=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240214175801-9ca9f93790f5/go.mod h1:S25had16ycO2LflaIqJq7EuQs45cWrtmy/zr84VqF9A=
github.com/iotaledger/hive.go/crypto v0.0.0-20240214175801-9ca9f93790f5 h1:Ogf77ffMx/oxb0s2Dsn2wjNDtECSQAtAQpXUdNDFSQE=
github.com/iotaledger/hive.go/crypto v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:ECGlcMlvm7hO5L9etoXCILu9et9PeZOyY1WQiXP6ohs=
github.com/iotaledger/hive.go/ds v0.0.0-20240214175801-9ca9f93790f5 h1:vAf85G2ir//BA96yI7wWWbK3yUuXbcEBC15XzFbEQXQ=
github.com/iotaledger/hive.go/ds v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:UxnYEJlWz87/hQxmSngDwAxPjFqbTgnDpDczL8mqXVk=
github.com/iotaledger/hive.go/ierrors v0.0.0-20240214175801-9ca9f93790f5 h1:KGyJMMNe6rEtQzuu1m/fccRPFkMQXb0xHaAlAN0gFxA=
github.com/iotaledger/hive.go/ierrors v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:HcE8B5lP96enc/OALTb2/rIIi+yOLouRoHOKRclKmC8=
github.com/iotaledger/hive.go/kvstore v0.0.0-20240214175801-9ca9f93790f5 h1:KUE4ZsC4L/lChzk/Tyt1ryQii5ecqL0K+kg+qCPvtU8=
github.com/iotaledger/hive.go/kvstore v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:Cr2o8GY4imGgHmuRD+/JZKaF3mtMeyIqXG5j1YA2zVo=
github.com/iotaledger/hive.go/lo v0.0.0-20240214175801-9ca9f93790f5 h1:MM41w6kwBZeGpp8ks/b+T19MsKXPZWN06kAu++dMNn0=
github.com/iotaledger/hive.go/lo v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:emwj7JQEo+BOIxtkcQwfr9x4MgmdHcDMjxFZohJ+sIk=
github.com/iotaledger/hive.go/log v0.0.0-20240214175801-9ca9f93790f5 h1:hn4wslFGS11fePJS6OTbal0f3y9hH5pSSoANkLRNqQk=
github.com/iotaledger/hive.go/log v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:wDmhnVYX4ETSxFjuJNKe1LtNRmWs1GvOIZNkWY9yFHc=
github.com/iotaledger/hive.go/runtime v0.0.0-20240214175801-9ca9f93790f5 h1:JRQusGWXgL94LajsVxioEHJFwc5ObpcMJOpPHciBKXI=
github.com/iotaledger/hive.go/runtime v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:DAl3k9cClMCxIWbGQX44mdV3ZExly2kJW979G0bZ3cU=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240214175801-9ca9f93790f5 h1:Y4Rb0YK8bOhfQPJmyLDV71VWti8GXrzmPc6Hy8QNOfU=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240214175801-9ca9f93790f5/go.mod h1:Wz93StLE7p0UjPIPy/DDw0xZtuxPIUwBUa2fSmCWL9A=
github.com/iotaledger/hive.go/stringify v0.0.0-20240214175801-9ca9f93790f5 h1:KkZln2uZARc3UqQOyCQDLxNQnr2DK7bITXSg3ZCY+GM=
github.com/iotaledger/hive.go/stringify v0.0.0-20240214175801-9ca9f93790f5/go.mod h1:FTo/UWzNYgnQ082GI9QVM9HFDERqf9rw9RivNpqrnTs=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240214181534-9a393ea95057 h1:a/jsShkb8Sn19q9Th3dHG2n5UPQPToLd0VjuNm8gf4M=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240214181534-9a393ea95057/go.mod h1:2HpA49Jxx1dPQ1VrgCW8cvNrH2T2kouYDXaBalWFyuo=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240214181217-a6dd0abaab8d h1:S9VWiJA/mHDlrObYMDH2wF3eiKeXo7U5Cn0l6Y8A2lM=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240214181217-a6dd0abaab8d/go.mod h1:F69nogeefy6epbuj1Bk132mL9ZZMP0bp2V0eHNnehNM=
github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00 h1:j5udgLtSN6wQgFI9vnhkdJsqsVdJmwtoc0yOmT/Ila4=
github.com/iotaledger/iota-crypto-demo v0.0.0-20231208171603-786bb32fdb00/go.mod h1:gt+URx7DZu414nZME7jtGgxR4DVTSnNa1jF2trTUTZ0=
github.com/iotaledger/iota.go/v4 v4.0.0-20240215154216-92b1c8ba1c57 h1:REuK/w32eA00KKyttJoLBcoifMN+FGbLOL9bbjGXASM=
github.com/iotaledger/iota.go/v4 v4.0.0-20240215154216-92b1c8ba1c57/go.mod h1:C0sa6gQvtBQdAcSa7AME4Tu7E9MhkrKAxjUAHUBK9u0=
github.com/iotaledger/hive.go/ads v0.0.0-20240216135101-261e99d9d84a h1:lfHr3XqlJbScsEgj62LX1SRypjTuSPOJfMcUUInypno=
github.com/iotaledger/hive.go/ads v0.0.0-20240216135101-261e99d9d84a/go.mod h1:4bUdqpUden+8RL2WZGzDJqYjOO6JrYZ2L1isp/2lVss=
github.com/iotaledger/hive.go/app v0.0.0-20240216135101-261e99d9d84a h1:o5viyYlzi6kgClLNgUW5Pay0tXMylc0FPivYgSlAc4g=
github.com/iotaledger/hive.go/app v0.0.0-20240216135101-261e99d9d84a/go.mod h1:O9agBfrnt1ykrDOzF6GXZf4ivcw+SxM9c9C86YtbxLU=
github.com/iotaledger/hive.go/constraints v0.0.0-20240216135101-261e99d9d84a h1:9xeffzciYdw9L/ebAOPg/39Bqn3p5iyOROQhQHaAEUs=
github.com/iotaledger/hive.go/constraints v0.0.0-20240216135101-261e99d9d84a/go.mod h1:JF7jjkL6tSUOXm23SWadBzBrl7eJk1DQRLc/fNoVZ+o=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240216135101-261e99d9d84a h1:+l3NjL4v700Iv+ZF7KjPALkygFOxzkByoRIoSK9bOzc=
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20240216135101-261e99d9d84a/go.mod h1:9HM/YmzOfdlWXYHVEWVjYhKQHOlgxBVMsr5Vf5yn5IE=
github.com/iotaledger/hive.go/crypto v0.0.0-20240216135101-261e99d9d84a h1:ux81+J6mcxYw6usZpEPLZjE6J+TNs3RaRcTHa9+5ERM=
github.com/iotaledger/hive.go/crypto v0.0.0-20240216135101-261e99d9d84a/go.mod h1:7kZh98nwJInQsIybiPXSABc/on/IsDdXyeiPLfaH+2I=
github.com/iotaledger/hive.go/ds v0.0.0-20240216135101-261e99d9d84a h1:7M1+k0H53jahg2ZDN10SociepCB+jymIZoiYaSenpbQ=
github.com/iotaledger/hive.go/ds v0.0.0-20240216135101-261e99d9d84a/go.mod h1:sE/HabIH9FWTvgaHioLN6o4rrxFMf4BuqRQwloxcamo=
github.com/iotaledger/hive.go/ierrors v0.0.0-20240216135101-261e99d9d84a h1:ugcQ43xbMZo5XYTfanIHOxQGKNpxhcatcz9ZXcX6W1o=
github.com/iotaledger/hive.go/ierrors v0.0.0-20240216135101-261e99d9d84a/go.mod h1:GQY0/35sjgT9Poi1Vrs9kFVvAkuKzGXfVh4j6CBXsAA=
github.com/iotaledger/hive.go/kvstore v0.0.0-20240216135101-261e99d9d84a h1:Lszz1ySzHxYKb/QB3+/Ug4WklVgVKCA84u4PB0XK6TM=
github.com/iotaledger/hive.go/kvstore v0.0.0-20240216135101-261e99d9d84a/go.mod h1:vgJh/0OelY+SHdWsdo0kXOYciHu8UA9OAi2FbJgVQsc=
github.com/iotaledger/hive.go/lo v0.0.0-20240216135101-261e99d9d84a h1:eUAtyEIYRlAPeZ2qhlEA+7T8DVoYK2h9eotlst/84SU=
github.com/iotaledger/hive.go/lo v0.0.0-20240216135101-261e99d9d84a/go.mod h1:0ycE1W59kkNjQ87odL6H4x5Ik9bXhbNk88wmo+mIYt0=
github.com/iotaledger/hive.go/log v0.0.0-20240216135101-261e99d9d84a h1:XzIuUsWPtDP7h9UbQPFW5/bjeqVjodcSCMRuF7zP5jk=
github.com/iotaledger/hive.go/log v0.0.0-20240216135101-261e99d9d84a/go.mod h1:JCv/LVVTAMoCPLzou534RoIif7CAezcWZlGYabrHsck=
github.com/iotaledger/hive.go/runtime v0.0.0-20240216135101-261e99d9d84a h1:qmfoYLK2XyPOXfldG21qHyCrbIf0sl7iJoFirvTrnO0=
github.com/iotaledger/hive.go/runtime v0.0.0-20240216135101-261e99d9d84a/go.mod h1:lAR3vbqE9g65M9VwWHiaXab2q+d89dBOFjhKgnDfK7c=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240216135101-261e99d9d84a h1:ahUFo0X9Th+8/aE6KSWiy7Eap5p0YFL6CDapP1o8dLo=
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20240216135101-261e99d9d84a/go.mod h1:yXQNGZUz++dB1T9RAHhWSresuTLzTC856ntdins9ivo=
github.com/iotaledger/hive.go/stringify v0.0.0-20240216135101-261e99d9d84a h1:xLreq/rXeSPdb86RnZNEPH3PUIWt56BQxK1+11+hM4I=
github.com/iotaledger/hive.go/stringify v0.0.0-20240216135101-261e99d9d84a/go.mod h1:O4p7UmsfoeLqtAUwrKbq0lXMxjY/MLQSpZSavvvvGig=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240216141618-d7dfe94bdc1e h1:I6KnVRg96X7mL1k/h3xovdJL3I31q8C6wPiUJanvOdY=
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20240216141618-d7dfe94bdc1e/go.mod h1:rCLE9iv2S0qiL4s7TPj/2ieTLhV2m0Nor3g2JJHhu6M=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240216141023-6d5f4ef12ac5 h1:ebh2IKHPVG/qMjTk56hIBG9DcZ0XN02pP8UJ+vB2IpM=
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20240216141023-6d5f4ef12ac5/go.mod h1:Go1Gp6s+RCwNyaTjSw/TCk1Li5xd3+926aCu61kL+ks=
github.com/iotaledger/iota-crypto-demo v0.0.0-20240216103559-27ca8dffd1e7 h1:t6k4MqiUov0FrBb2o2JhKlOVSdlPbIQWM8ivYHL0G0g=
github.com/iotaledger/iota-crypto-demo v0.0.0-20240216103559-27ca8dffd1e7/go.mod h1:do+N3LpeDEi9qselEC4XcjqGoRc7cWGiqBtIeBOKEMs=
github.com/iotaledger/iota.go/v4 v4.0.0-20240216140514-c867d6524642 h1:s3nISWsyLwNA4+fh19yp1CQip3pHpIgsbYIRITpl8aA=
github.com/iotaledger/iota.go/v4 v4.0.0-20240216140514-c867d6524642/go.mod h1:IZNS0qmVdoRjIbFe4VTPG7k3bzSJQBvAHL2eC/2kFT0=
github.com/ipfs/boxo v0.17.0 h1:fVXAb12dNbraCX1Cdid5BB6Kl62gVLNVA+e0EYMqAU0=
github.com/ipfs/boxo v0.17.0/go.mod h1:pIZgTWdm3k3pLF9Uq6MB8JEcW07UDwNJjlXW1HELW80=
github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s=
Expand Down Expand Up @@ -553,8 +553,8 @@ github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7q
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y=
github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ=
github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k=
github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
Expand Down
8 changes: 4 additions & 4 deletions pkg/tests/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
iotago "github.com/iotaledger/iota.go/v4"
)

// IOTA Mainnet Max Supply.
const MAX_SUPPLY = iotago.BaseToken(4_600_000_000_000_000)
// Supply for the test with faster slot duration and slots per epoch.
const SUPPLY = iotago.BaseToken(1_813_620_509_061_365)

func setupValidatorTestsuite(t *testing.T, walletOpts ...options.Option[testsuite.WalletOptions]) *testsuite.TestSuite {
var slotDuration uint8 = 5
Expand All @@ -27,7 +27,7 @@ func setupValidatorTestsuite(t *testing.T, walletOpts ...options.Option[testsuit

ts := testsuite.NewTestSuite(t,
testsuite.WithProtocolParametersOptions(
iotago.WithSupplyOptions(MAX_SUPPLY, 63, 1, 17, 32, 21, 70),
iotago.WithSupplyOptions(SUPPLY, 63, 1, 17, 32, 21, 70),
iotago.WithStakingOptions(1, validationBlocksPerSlot, 1),
// Pick larger values for ManaShareCoefficient and DecayBalancingConstant for more precision in the calculations.
// Pick a small retention period so we can test rewards expiry.
Expand Down Expand Up @@ -138,7 +138,7 @@ func Test_Validator_PerfectIssuanceWithNonZeroFixedCost(t *testing.T) {
func Test_Validator_PerfectIssuanceWithHugeStake(t *testing.T) {
// This gives both validators the max supply as stake, which is unrealistic,
// but is supposed to test if one validator with a huge stake causes an overflow in the rewards calculation.
ts := setupValidatorTestsuite(t, testsuite.WithWalletAmount(MAX_SUPPLY))
ts := setupValidatorTestsuite(t, testsuite.WithWalletAmount(SUPPLY))
defer ts.Shutdown()

validationBlocksPerSlot := ts.API.ProtocolParameters().ValidationBlocksPerSlot()
Expand Down
2 changes: 1 addition & 1 deletion tools/docker-network/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ docker run --rm \
-e GOCACHE="/go-cache" \
-e GOMODCACHE="/go-mod-cache" \
-w "/workspace/tools/genesis-snapshot" \
golang:1.21-bookworm go run -tags=rocksdb . --config docker --seed 7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih
golang:1.22-bookworm go run -tags=rocksdb . --config docker --seed 7R1itJx5hVuo9w9hjg5cwKFmek4HMSoBDgJZN8hKGxih

# Move and set permissions for the .snapshot file
if ! mv -f ../genesis-snapshot/*.snapshot .; then
Expand Down
Loading

0 comments on commit c789dd6

Please sign in to comment.