Skip to content

Commit 55546d1

Browse files
authored
chore: update bsc and go version (#32)
1 parent aae650d commit 55546d1

11 files changed

Lines changed: 2036 additions & 118 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
unit-test:
1616
strategy:
1717
matrix:
18-
go-version: [1.24.x]
18+
go-version: [1.25.x]
1919
os: [ubuntu-latest]
2020
runs-on: ${{ matrix.os }}
2121
steps:

.github/workflows/lint.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
golang-lint:
1616
strategy:
1717
matrix:
18-
go-version: [1.24.x]
18+
go-version: [1.25.x]
1919
os: [ubuntu-latest]
2020
runs-on: ${{ matrix.os }}
2121
steps:
@@ -47,12 +47,8 @@ jobs:
4747
go mod download
4848
4949
- name: golangci-lint
50-
uses: golangci/golangci-lint-action@v3
50+
uses: golangci/golangci-lint-action@v7
5151
with:
52-
# Optional: version of golangci-lint to use in form of v1.2.4 or `latest` to use the latest version
53-
version: v1.64.4
52+
version: v2.4.0
5453
working-directory: ./
55-
skip-pkg-cache: true
56-
skip-cache: true
57-
skip-build-cache: true
5854
args: --timeout=99m --config ./.golangci.yml

.github/workflows/unit-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
unit-test:
1616
strategy:
1717
matrix:
18-
go-version: [1.24.x]
18+
go-version: [1.25.x]
1919
os: [ubuntu-latest]
2020
runs-on: ${{ matrix.os }}
2121
steps:

.golangci.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,54 @@
11
# This file configures github.com/golangci/golangci-lint.
22

3+
version: "2"
4+
35
run:
46
timeout: 20m
57
tests: true
6-
# default is true. Enables skipping of directories:
7-
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
8-
skip-dirs-use-default: true
9-
skip-files:
10-
- core/genesis_alloc.go
118

129
output:
13-
format: colored-line-number
10+
formats:
11+
text:
12+
colors: true
1413

1514
linters:
16-
disable-all: true
15+
default: none
1716
enable:
18-
- goimports
19-
- gosimple
2017
- govet
2118
- ineffassign
2219
- misspell
2320
- unconvert
24-
- typecheck
2521
- unused
2622
- staticcheck
2723
- bidichk
2824
- durationcheck
2925
- whitespace
3026

31-
# - structcheck # lots of false positives
32-
# - errcheck #lot of false positives
27+
# - errcheck # lot of false positives
3328
# - contextcheck
3429
# - errchkjson # lots of false positives
3530
# - errorlint # this check crashes
3631
# - exhaustive # silly check
3732
# - makezero # false positives
3833
# - nilerr # several intentional
3934

40-
linters-settings:
41-
gofmt:
42-
simplify: true
35+
exclusions:
36+
rules:
37+
- text: 'SA1019: event.TypeMux is deprecated: use Feed'
38+
linters: [staticcheck]
39+
- text: 'SA1019: strings.Title is deprecated'
40+
linters: [staticcheck]
41+
- text: 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
42+
linters: [staticcheck]
43+
- text: 'SA1029: should not use built-in type string as key for value'
44+
linters: [staticcheck]
45+
paths:
46+
- core/genesis_alloc.go
4347

44-
issues:
45-
exclude:
46-
- 'SA1019: event.TypeMux is deprecated: use Feed'
47-
- 'SA1019: strings.Title is deprecated'
48-
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
49-
- 'SA1029: should not use built-in type string as key for value'
48+
formatters:
49+
enable:
50+
- goimports
51+
settings:
52+
goimports:
53+
local-prefixes:
54+
- github.com/ethereum/go-ethereum

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/docker/library/golang:1.24-alpine AS builder
1+
FROM public.ecr.aws/docker/library/golang:1.25-alpine AS builder
22

33
ENV GO111MODULE=on \
44
CGO_ENABLED=1 \

cmd/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import (
66
_ "net/http/pprof"
77

88
"github.com/cockroachdb/errors"
9-
"github.com/ethereum/go-ethereum/common"
10-
"github.com/ethereum/go-ethereum/rpc"
119
"github.com/gin-gonic/contrib/gzip"
1210
"github.com/gin-gonic/gin"
1311
"github.com/prometheus/client_golang/prometheus/promhttp"
1412

13+
"github.com/ethereum/go-ethereum/common"
14+
"github.com/ethereum/go-ethereum/rpc"
15+
1516
"github.com/bnb-chain/bsc-mev-sentry/config"
1617
ginutils "github.com/bnb-chain/bsc-mev-sentry/gin"
1718
"github.com/bnb-chain/bsc-mev-sentry/log"

gin/panic_recovery.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@ func function(pc uintptr) []byte {
125125
if period := bytes.Index(name, dot); period >= 0 {
126126
name = name[period+1:]
127127
}
128-
name = bytes.Replace(name, centerDot, dot, -1)
128+
name = bytes.ReplaceAll(name, centerDot, dot)
129129
return name
130130
}

go.mod

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/bnb-chain/bsc-mev-sentry
22

3-
go 1.24.0
3+
go 1.25.0
44

55
require (
66
github.com/cockroachdb/errors v1.11.3
@@ -10,15 +10,16 @@ require (
1010
github.com/go-co-op/gocron v1.37.0
1111
github.com/json-iterator/go v1.1.12
1212
github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416
13-
github.com/prometheus/client_golang v1.20.5
14-
github.com/stretchr/testify v1.10.0
13+
github.com/prometheus/client_golang v1.21.1
14+
github.com/stretchr/testify v1.11.1
1515
github.com/tredeske/u v0.0.0-20240301202545-cc23fee03f7c
1616
go.uber.org/multierr v1.11.0
1717
go.uber.org/zap v1.27.0
1818
)
1919

2020
require (
2121
github.com/Microsoft/go-winio v0.6.2 // indirect
22+
github.com/ProjectZKM/Ziren/crates/go-runtime/zkvm_runtime v0.0.0-20251001021608-1fe7b43fc4d6 // indirect
2223
github.com/bazelbuild/rules_go v0.49.0 // indirect
2324
github.com/beorn7/perks v1.0.1 // indirect
2425
github.com/bits-and-blooms/bitset v1.20.0 // indirect
@@ -27,13 +28,13 @@ require (
2728
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
2829
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
2930
github.com/cockroachdb/redact v1.1.5 // indirect
30-
github.com/consensys/gnark-crypto v0.18.0 // indirect
31-
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
31+
github.com/consensys/gnark-crypto v0.18.1 // indirect
32+
github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect
3233
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
33-
github.com/davecgh/go-spew v1.1.1 // indirect
34+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3435
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
3536
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
36-
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
37+
github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect
3738
github.com/ethereum/go-verkle v0.2.2 // indirect
3839
github.com/fsnotify/fsnotify v1.6.0 // indirect
3940
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
@@ -49,7 +50,7 @@ require (
4950
github.com/gorilla/websocket v1.5.3 // indirect
5051
github.com/herumi/bls-eth-go-binary v1.31.0 // indirect
5152
github.com/holiman/uint256 v1.3.2 // indirect
52-
github.com/klauspost/compress v1.17.11 // indirect
53+
github.com/klauspost/compress v1.18.0 // indirect
5354
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
5455
github.com/kr/pretty v0.3.1 // indirect
5556
github.com/kr/text v0.2.0 // indirect
@@ -65,44 +66,46 @@ require (
6566
github.com/panjf2000/ants/v2 v2.4.5 // indirect
6667
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
6768
github.com/pkg/errors v0.9.1 // indirect
68-
github.com/pmezard/go-difflib v1.0.0 // indirect
69-
github.com/prometheus/client_model v0.6.1 // indirect
70-
github.com/prometheus/common v0.61.0 // indirect
71-
github.com/prometheus/procfs v0.15.1 // indirect
69+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
70+
github.com/prometheus/client_model v0.6.2 // indirect
71+
github.com/prometheus/common v0.63.0 // indirect
72+
github.com/prometheus/procfs v0.16.0 // indirect
7273
github.com/prysmaticlabs/fastssz v0.0.0-20241008181541-518c4ce73516 // indirect
7374
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e // indirect
7475
github.com/prysmaticlabs/gohashtree v0.0.4-beta.0.20240624100937-73632381301b // indirect
7576
github.com/prysmaticlabs/prysm v0.0.0-20220124113610-e26cde5e091b // indirect
7677
github.com/prysmaticlabs/prysm/v5 v5.3.2 // indirect
7778
github.com/robfig/cron/v3 v3.0.1 // indirect
78-
github.com/rogpeppe/go-internal v1.13.1 // indirect
79+
github.com/rogpeppe/go-internal v1.14.1 // indirect
7980
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
8081
github.com/sirupsen/logrus v1.9.3 // indirect
81-
github.com/supranational/blst v0.3.14 // indirect
82+
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect
8283
github.com/syndtr/goleveldb v1.0.1 // indirect
8384
github.com/thomaso-mirodin/intmath v0.0.0-20160323211736-5dc6d854e46e // indirect
85+
github.com/tidwall/gjson v1.14.2 // indirect
8486
github.com/tklauser/go-sysconf v0.3.13 // indirect
8587
github.com/tklauser/numcpus v0.7.0 // indirect
8688
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
8789
github.com/ugorji/go/codec v1.2.11 // indirect
88-
github.com/willf/bitset v1.1.11 // indirect
8990
github.com/yusufpapurcu/wmi v1.2.3 // indirect
91+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
9092
go.uber.org/atomic v1.11.0 // indirect
9193
golang.org/x/arch v0.3.0 // indirect
92-
golang.org/x/crypto v0.37.0 // indirect
93-
golang.org/x/net v0.39.0 // indirect
94-
golang.org/x/sync v0.13.0 // indirect
95-
golang.org/x/sys v0.32.0 // indirect
96-
golang.org/x/text v0.24.0 // indirect
97-
google.golang.org/protobuf v1.36.3 // indirect
94+
golang.org/x/crypto v0.49.0 // indirect
95+
golang.org/x/net v0.52.0 // indirect
96+
golang.org/x/sync v0.20.0 // indirect
97+
golang.org/x/sys v0.42.0 // indirect
98+
golang.org/x/text v0.35.0 // indirect
99+
golang.org/x/time v0.11.0 // indirect
100+
google.golang.org/protobuf v1.36.11 // indirect
98101
gopkg.in/yaml.v2 v2.4.0 // indirect
99102
gopkg.in/yaml.v3 v3.0.1 // indirect
100103
)
101104

102105
replace (
103106
github.com/btcsuite/btcd => github.com/btcsuite/btcd v0.23.0
104107
github.com/cometbft/cometbft => github.com/bnb-chain/greenfield-tendermint v0.0.0-20230417032003-4cda1f296fb2
105-
github.com/ethereum/go-ethereum => github.com/bnb-chain/bsc v1.6.2
108+
github.com/ethereum/go-ethereum => github.com/bnb-chain/bsc v1.7.3
106109
github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/prysmaticlabs/grpc-gateway/v2 v2.3.1-0.20210702154020-550e1cd83ec1
107110
github.com/syndtr/goleveldb v1.0.1 => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
108111
github.com/tendermint/tendermint => github.com/bnb-chain/tendermint v0.31.16

0 commit comments

Comments
 (0)