Skip to content

Commit 897edb5

Browse files
authored
Merge pull request #3 from wealdtech/update_deps
Update dependencies.
2 parents cde8d33 + be9122e commit 897edb5

File tree

17 files changed

+115
-158
lines changed

17 files changed

+115
-158
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ permissions:
1212
jobs:
1313
golangci:
1414
name: lint
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- uses: actions/setup-go@v5
1818
with:
1919
cache: false
20-
go-version: '^1.22'
20+
go-version: '^1.25'
2121
- uses: actions/checkout@v4
2222
- name: golangci-lint
23-
uses: golangci/golangci-lint-action@v6
23+
uses: golangci/golangci-lint-action@v8
2424
with:
2525
version: 'latest'
2626
args: '--timeout=60m'

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
# Set variables that will be available to all builds.
1111
env_vars:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
outputs:
1414
release_version: ${{ steps.release_version.outputs.release_version }}
1515
binary: ${{ steps.binary.outputs.binary }}
@@ -25,7 +25,7 @@ jobs:
2525
2626
# Create a github release to hold the assets once built.
2727
create_release:
28-
runs-on: ubuntu-22.04
28+
runs-on: ubuntu-24.04
2929
needs: env_vars
3030
outputs:
3131
upload_url: ${{ steps.release_action.outputs.upload_url }}
@@ -40,7 +40,7 @@ jobs:
4040

4141
# Build and pack the binaries for linux.
4242
build_linux:
43-
runs-on: ubuntu-22.04
43+
runs-on: ubuntu-24.04
4444
needs: [create_release, env_vars]
4545
steps:
4646
- name: Set up Go

.golangci.yml

Lines changed: 98 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44
# This file is not a configuration example,
55
# it contains the exhaustive configuration with explanations of the options.
66

7-
issues:
8-
# Which files to exclude: they will be analyzed, but issues from them won't be reported.
9-
# There is no need to include all autogenerated files,
10-
# we confidently recognize autogenerated files.
11-
# If it's not, please let us know.
12-
# "/" will be replaced by current OS file path separator to properly work on Windows.
13-
# Default: []
14-
exclude-files:
15-
- ".*_ssz\\.go$"
7+
version: "2"
168

179
# Options for analysis running.
1810
run:
@@ -69,96 +61,21 @@ run:
6961
# Define the Go version limit.
7062
# Mainly related to generics support since go1.18.
7163
# Default: use Go version from the go.mod file, fallback on the env var `GOVERSION`, fallback on 1.18
72-
# go: '1.20'
64+
# go: '1.19'
7365

7466

7567
# output configuration options
76-
# output:
77-
# Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
78-
#
79-
# Multiple can be specified by separating them by comma, output can be provided
80-
# for each of them by separating format name and path by colon symbol.
81-
# Output path can be either `stdout`, `stderr` or path to the file to write to.
82-
# Example: "checkstyle:report.json,colored-line-number"
83-
#
84-
# Default: colored-line-number
85-
# format: json
86-
87-
# Print lines of code with issue.
88-
# Default: true
89-
# print-issued-lines: false
90-
91-
# Print linter name in the end of issue text.
92-
# Default: true
93-
# print-linter-name: false
94-
95-
# Make issues output unique by line.
96-
# Default: true
97-
# uniq-by-line: false
98-
99-
# Add a prefix to the output file references.
100-
# Default is no prefix.
101-
# path-prefix: ""
102-
103-
# Sort results by: filepath, line and column.
104-
# sort-results: true
105-
106-
107-
# All available settings of specific linters.
108-
linters-settings:
109-
gosec:
110-
excludes:
111-
# Flags for potentially-unsafe casting of ints, but generates a lot of false positives.
112-
- 'G115'
113-
114-
lll:
115-
line-length: 132
116-
117-
nlreturn:
118-
block-size: 3
119-
120-
revive:
121-
ignore-generated-header: false
122-
severity: error
123-
confidence: 0.8
124-
enable-all-rules: true
125-
rules:
126-
- name: add-constant
127-
disabled: true
128-
- name: cyclomatic
129-
disabled: true
130-
- name: cognitive-complexity
131-
disabled: true
132-
- name: confusing-results
133-
- name: function-length
134-
disabled: true
135-
- name: line-length-limit
136-
arguments: [132]
137-
- name: max-public-structs
138-
disabled: true
139-
- name: package-comments
140-
disabled: true
141-
- name: struct-tag
142-
arguments: ["json,allowempty"]
143-
- name: unhandled-error
144-
arguments:
145-
- "fmt.Fprint"
146-
- "fmt.Fprintf"
147-
148-
stylecheck:
149-
checks: [ "all", "-ST1000" ]
150-
151-
tagliatelle:
152-
case:
153-
# use-field-name: true
154-
rules:
155-
json: snake
156-
yaml: snake
68+
output:
69+
formats:
70+
text:
71+
path: stderr
72+
colors: true
73+
print-issued-lines: true
15774

15875
linters:
15976
# Enable all available linters.
16077
# Default: false
161-
enable-all: true
78+
default: all
16279
# Disable specific linter
16380
# https://golangci-lint.run/usage/linters/#disabled-by-default
16481
disable:
@@ -169,18 +86,103 @@ linters:
16986
- exhaustive
17087
- exhaustruct
17188
- forcetypeassert
89+
- funcorder
17290
- funlen
173-
- gci
17491
- gochecknoglobals
175-
- gochecknoinits
17692
- gocognit
17793
- goconst
94+
- godoclint
95+
- iface
17896
- ireturn
17997
- lll
180-
- maintidx
98+
- modernize
18199
- mnd
182-
- musttag
100+
- nestif
101+
- nilnil
102+
- nlreturn
103+
- noinlineerr
183104
- perfsprint
105+
- promlinter
184106
- varnamelen
185107
- wrapcheck
186108
- wsl
109+
exclusions:
110+
paths:
111+
- ".*_ssz\\.go$"
112+
settings:
113+
godot:
114+
scope: all
115+
period: true
116+
capital: false
117+
118+
gosec:
119+
excludes:
120+
- G115 # This generates a lot of false positives, recheck once https://github.com/securego/gosec/issues/1212 is closed
121+
122+
errcheck:
123+
exclude-functions:
124+
- fmt.Fprintf
125+
126+
lll:
127+
line-length: 132
128+
129+
nlreturn:
130+
# Allow two-line blocks without requiring a newline
131+
block-size: 3
132+
133+
tagliatelle:
134+
case:
135+
# use-field-name: true
136+
rules:
137+
json: snake
138+
yaml: snake
139+
140+
goheader:
141+
values:
142+
regexp:
143+
YEARS: '(20\d\d - 20\d\d|20\d\d, 20\d\d|20\d\d)'
144+
template: |-
145+
Copyright © {{ YEARS }} Weald Technology Trading.
146+
Licensed under the Apache License, Version 2.0 (the "License");
147+
you may not use this file except in compliance with the License.
148+
You may obtain a copy of the License at
149+
150+
http://www.apache.org/licenses/LICENSE-2.0
151+
152+
Unless required by applicable law or agreed to in writing, software
153+
distributed under the License is distributed on an "AS IS" BASIS,
154+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
155+
See the License for the specific language governing permissions and
156+
limitations under the License.
157+
158+
revive:
159+
rules:
160+
- name: package-comments
161+
severity: warning
162+
disabled: true
163+
exclude: [ "" ]
164+
165+
wsl_v5:
166+
disable:
167+
- assign
168+
- branch
169+
- decl
170+
- defer
171+
- expr
172+
- for
173+
- go
174+
- if
175+
- inc-dec
176+
- label
177+
- range
178+
- return
179+
- select
180+
- send
181+
- switch
182+
- type-switch
183+
- append
184+
- assign-exclusive
185+
- assign-expr
186+
- err
187+
- leading-whitespace
188+
- trailing-whitespace

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/wealdtech/comptrollerd
22

3-
go 1.23.0
3+
go 1.25.0
44

5-
toolchain go1.24.5
5+
toolchain go1.25.3
66

77
require (
88
github.com/attestantio/go-eth2-client v0.27.1
@@ -16,7 +16,7 @@ require (
1616
github.com/pkg/errors v0.9.1
1717
github.com/prometheus/client_golang v1.20.5
1818
github.com/rs/zerolog v1.33.0
19-
github.com/sasha-s/go-deadlock v0.3.5
19+
github.com/sasha-s/go-deadlock v0.3.6
2020
github.com/shopspring/decimal v1.4.0
2121
github.com/spf13/pflag v1.0.6
2222
github.com/spf13/viper v1.19.0
@@ -73,7 +73,7 @@ require (
7373
github.com/mitchellh/mapstructure v1.5.0 // indirect
7474
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
7575
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
76-
github.com/petermattis/goid v0.0.0-20250121172306-05bcfb9a85dc // indirect
76+
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe // indirect
7777
github.com/pk910/dynamic-ssz v0.0.5 // indirect
7878
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7979
github.com/prometheus/client_model v0.6.1 // indirect

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xl
327327
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
328328
github.com/petermattis/goid v0.0.0-20250121172306-05bcfb9a85dc h1:Xz/LkK9AJRY5QTkA1uE1faB8yeqRFjeKgwDtI13ogcY=
329329
github.com/petermattis/goid v0.0.0-20250121172306-05bcfb9a85dc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
330+
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe h1:vHpqOnPlnkba8iSxU4j/CvDSS9J4+F4473esQsYLGoE=
331+
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4=
330332
github.com/pk910/dynamic-ssz v0.0.5 h1:VP9heGYUwzlpyhk28P2nCAzhvGsePJOOOO5vQMDh2qQ=
331333
github.com/pk910/dynamic-ssz v0.0.5/go.mod h1:b6CrLaB2X7pYA+OSEEbkgXDEcRnjLOZIxZTsMuO/Y9c=
332334
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -364,6 +366,8 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g
364366
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
365367
github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU=
366368
github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U=
369+
github.com/sasha-s/go-deadlock v0.3.6 h1:TR7sfOnZ7x00tWPfD397Peodt57KzMDo+9Ae9rMiUmw=
370+
github.com/sasha-s/go-deadlock v0.3.6/go.mod h1:CUqNyyvMxTyjFqDT7MRg9mb4Dv/btmGTqSR+rky/UXo=
367371
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
368372
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
369373
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import (
5151
)
5252

5353
// ReleaseVersion is the release version for the code.
54-
var ReleaseVersion = "0.4.5"
54+
var ReleaseVersion = "0.5.0"
5555

5656
func main() {
5757
os.Exit(main2())
@@ -405,7 +405,6 @@ func startBids(
405405
func runCommands(_ context.Context) {
406406
if viper.GetBool("version") {
407407
fmt.Fprintf(os.Stdout, "%s\n", ReleaseVersion)
408-
//nolint:revive
409408
os.Exit(0)
410409
}
411410
}

metrics.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ func setRelease(_ context.Context, version string) {
8888
releaseMetric.WithLabelValues(version).Set(1)
8989
}
9090

91-
//nolint:revive
9291
func setReady(_ context.Context, ready bool) {
9392
if readyMetric == nil {
9493
return

services/blockpayments/standard/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ func (s *Service) checkUnderpaidBid(ctx context.Context,
255255
return nil
256256
}
257257

258-
//nolint:revive
259258
func (s *Service) calcBuilderRewards(ctx context.Context,
260259
block *execdb.Block,
261260
txs []*execdb.Transaction,
@@ -511,6 +510,7 @@ func (s *Service) deliveredBidOfSlot(ctx context.Context,
511510
deliveredBid := deliveredBids[0]
512511

513512
if e := log.Trace(); e.Enabled() {
513+
//nolint:musttag
514514
rawJSON, err := json.Marshal(deliveredBid)
515515
if err == nil {
516516
e.RawJSON("delivered_bid", rawJSON).Msg("Obtained delivered bid")

services/blockpayments/standard/service.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ func New(ctx context.Context, params ...Parameter) (*Service, error) {
7777
if err := s.onReplaySlot(ctx, phase0.Slot(parameters.replaySlot)); err != nil {
7878
return nil, err
7979
}
80-
//nolint:revive
8180
os.Exit(0)
8281
}
8382

services/comptrollerdb/filters.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ type BlockPaymentFilter struct {
8383
// ToSlot is the latest slot to which to fetch results.
8484
// If nil then there is no latest slot.
8585
ToSlot *uint32
86-
87-
// FeeRecipients are the fee recipients of the rewards.
88-
// If nil then there is no fee recipient filter.
89-
// FeeRecipients [][]byte
9086
}
9187

9288
// ValidatorRegistrationFilter defines a filter for fetching validator registrations.

0 commit comments

Comments
 (0)