Skip to content

Commit bd7a012

Browse files
authored
chore: bumps go1.25 (#141)
* bumps go * bumps go tools * lint fix * ✍️ changelog
1 parent 6cf0cab commit bd7a012

File tree

25 files changed

+105
-97
lines changed

25 files changed

+105
-97
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77

88
jobs:
99
lint_test:
10-
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.11.2
10+
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.13.3
1111
with:
12-
go-version: '1.23'
13-
go-lint-version: 'v1.64.8'
12+
go-version: '1.25'
13+
go-lint-version: 'v2.4.0'
1414
run-unit-tests: true
1515
run-integration-tests: true
1616
run-lint: true
@@ -19,7 +19,7 @@ jobs:
1919
gosec-args: "-exclude-generated -exclude-dir=itest -exclude-dir=testutil -exclude-dir=covenant-signer ./..."
2020

2121
docker_pipeline:
22-
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.11.2
22+
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.13.3
2323
secrets: inherit
2424
with:
2525
publish: false
@@ -37,7 +37,7 @@ jobs:
3737
- name: Install Go
3838
uses: actions/setup-go@v4
3939
with:
40-
go-version: '^1.23.x'
40+
go-version: '^1.25.x'
4141
check-latest: true
4242
cache: false
4343
- name: Install Gosec
@@ -47,7 +47,7 @@ jobs:
4747
run: gosec ./...
4848

4949
docker_pipeline_covenant_signer:
50-
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.11.2
50+
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.13.3
5151
secrets: inherit
5252
with:
5353
publish: false

.github/workflows/publish.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ on:
1010

1111
jobs:
1212
lint_test:
13-
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.11.2
13+
uses: babylonlabs-io/.github/.github/workflows/reusable_go_lint_test.yml@v0.13.3
1414
with:
15-
go-version: '1.23'
16-
go-lint-version: 'v1.64.8'
15+
go-version: '1.25'
16+
go-lint-version: 'v2.4.0'
1717
run-unit-tests: true
1818
run-integration-tests: true
1919
run-lint: true
@@ -23,7 +23,7 @@ jobs:
2323

2424
docker_pipeline:
2525
needs: ["lint_test"]
26-
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.11.2
26+
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.13.3
2727
secrets: inherit
2828
with:
2929
publish: true
@@ -46,7 +46,7 @@ jobs:
4646
- name: Install Go
4747
uses: actions/setup-go@v4
4848
with:
49-
go-version: '^1.23.x'
49+
go-version: '^1.25.x'
5050
check-latest: true
5151
cache: false
5252
- name: Install Gosec
@@ -57,7 +57,7 @@ jobs:
5757

5858
docker_pipeline_covenant_signer:
5959
needs: ["go_sec_covenant_signer"]
60-
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.11.2
60+
uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.13.3
6161
secrets: inherit
6262
with:
6363
publish: true

.golangci.yml

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
run:
2-
timeout: 5m
3-
1+
version: "2"
42
linters:
5-
disable-all: true
3+
default: none
64
enable:
75
- asasalint
86
- asciicheck
@@ -26,7 +24,6 @@ linters:
2624
- goheader
2725
- gomodguard
2826
- goprintffuncname
29-
- gosimple
3027
- govet
3128
- grouper
3229
- importas
@@ -41,38 +38,48 @@ linters:
4138
- noctx
4239
- nonamedreturns
4340
- nosprintfhostport
44-
# - paralleltest
4541
- reassign
4642
- revive
4743
- rowserrcheck
4844
- sqlclosecheck
4945
- staticcheck
50-
- stylecheck
51-
- usetesting
5246
- testableexamples
5347
- tparallel
54-
- typecheck
5548
- unconvert
5649
- unparam
57-
- usestdlibvars
5850
- unused
51+
- usestdlibvars
52+
- usetesting
5953
- wastedassign
6054
- whitespace
61-
# - wrapcheck # we really should be using this, lax for now todo(lazar): unlax at somepoint, good practice
62-
55+
exclusions:
56+
generated: lax
57+
presets:
58+
- comments
59+
- common-false-positives
60+
- legacy
61+
- std-error-handling
62+
rules:
63+
- linters:
64+
- dupl
65+
- errcheck
66+
- gocyclo
67+
- gosec
68+
path: _test\.go
69+
- linters:
70+
- forbidigo
71+
path-except: _test\.go
72+
paths:
73+
- e2etest
74+
- third_party$
75+
- builtin$
76+
- examples$
6377
issues:
6478
max-same-issues: 0
65-
# Default: https://golangci-lint.run/usage/false-positives/#default-exclusions
66-
exclude-dirs:
67-
- e2etest
68-
exclude-rules:
69-
# Exclude some linters from running on tests files.
70-
- path: _test\.go
71-
linters:
72-
- gocyclo
73-
- errcheck
74-
- dupl
75-
- gosec
76-
- path-except: _test\.go
77-
linters:
78-
- forbidigo
79+
formatters:
80+
exclusions:
81+
generated: lax
82+
paths:
83+
- third_party$
84+
- builtin$
85+
- examples$

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
4040
### Improvements
4141

4242
* [#134](https://github.com/babylonlabs-io/covenant-emulator/pull/134) chore: add golangci lint rules
43+
* [#141](https://github.com/babylonlabs-io/covenant-emulator/pull/141) chore: bumps go1.25
4344

4445
## v0.16.0-rc.1
4546

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23.10 AS builder
1+
FROM golang:1.25 AS builder
22

33
# hadolint ignore=DL3008
44
RUN apt-get update && apt-get install --no-install-recommends -y ca-certificates make git bash gcc curl jq && rm -rf /var/lib/apt/lists/*

clientcontroller/babylon.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ func (bc *BabylonController) GetKeyAddress() sdk.AccAddress {
9696

9797
func (bc *BabylonController) QueryStakingParamsByVersion(version uint32) (*types.StakingParams, error) {
9898
// query btc checkpoint params
99-
ckptParamRes, err := bc.bbnClient.QueryClient.BTCCheckpointParams()
99+
ckptParamRes, err := bc.bbnClient.BTCCheckpointParams()
100100
if err != nil {
101101
return nil, fmt.Errorf("failed to query params of the btccheckpoint module: %w", err)
102102
}
103103

104104
// query btc staking params
105-
stakingParamRes, err := bc.bbnClient.QueryClient.BTCStakingParamsByVersion(version)
105+
stakingParamRes, err := bc.bbnClient.BTCStakingParamsByVersion(version)
106106
if err != nil {
107107
return nil, fmt.Errorf("failed to query staking params with version %d: %w", version, err)
108108
}
@@ -208,7 +208,7 @@ func (bc *BabylonController) QueryVerifiedDelegations(limit uint64) ([]*types.De
208208

209209
// QueryBTCDelegation queries the BTC delegation by the tx hash
210210
func (bc *BabylonController) QueryBTCDelegation(stakingTxHashHex string) (*types.Delegation, error) {
211-
resp, err := bc.bbnClient.QueryClient.BTCDelegation(stakingTxHashHex)
211+
resp, err := bc.bbnClient.BTCDelegation(stakingTxHashHex)
212212
if err != nil {
213213
return nil, fmt.Errorf("failed to query BTC delegation %s: %w", stakingTxHashHex, err)
214214
}
@@ -229,7 +229,7 @@ func (bc *BabylonController) queryDelegationsWithStatus(status btcstakingtypes.B
229229
indexDels := uint64(0)
230230

231231
for indexDels < delsLimit {
232-
res, err := bc.bbnClient.QueryClient.BTCDelegations(status, pagination)
232+
res, err := bc.bbnClient.BTCDelegations(status, pagination)
233233
if err != nil {
234234
return nil, fmt.Errorf("failed to query BTC delegations: %w", err)
235235
}

covenant-signer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23.10-alpine AS builder
1+
FROM golang:1.25-alpine AS builder
22

33
# Use muslc for static libs
44
ARG BUILD_TAGS="muslc"

covenant-signer/signerservice/types/error.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//nolint:revive
12
package types
23

34
import (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
//nolint:revive
12
package types
23

34
type GetPublicKeyResponse struct {
45
// hex encoded 33 byte public key
56
PublicKey string `json:"public_key_hex"`
67
}
7-

covenant-signer/signerservice/types/signtransactions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//nolint:revive
12
package types
23

34
import (

0 commit comments

Comments
 (0)