Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to Go 1.23.1 #3848

Merged
merged 15 commits into from
Oct 2, 2024
3 changes: 1 addition & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ jobs:
go.sum
- uses: golangci/[email protected]
with:
version: v1.59.1
version: v1.60.3
rootulp marked this conversation as resolved.
Show resolved Hide resolved
args: --timeout 10m
github-token: ${{ secrets.github_token }}
skip-pkg-cache: true
if: env.GIT_DIFF

# hadolint lints the Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ run:

linters:
enable:
- exportloopref
- copyloopvar
- gofumpt
- misspell
- nakedret
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ archives:
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Separating the builder and runtime image allows the runtime image to be
# considerably smaller because it doesn't need to have Golang installed.
ARG BUILDER_IMAGE=docker.io/golang:1.22.6-alpine3.19
ARG BUILDER_IMAGE=docker.io/golang:1.23.1-alpine3.19
rootulp marked this conversation as resolved.
Show resolved Hide resolved
ARG RUNTIME_IMAGE=docker.io/alpine:3.19
ARG TARGETOS
ARG TARGETARCH
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ DOCKER_PROTO_BUILDER := docker run -v $(shell pwd):/workspace --workdir /workspa
PROJECTNAME=$(shell basename "$(PWD)")
HTTPS_GIT := https://github.com/celestiaorg/celestia-app.git
PACKAGE_NAME := github.com/celestiaorg/celestia-app/v3
GOLANG_CROSS_VERSION ?= v1.22.6
# Before upgrading the GOLANG_CROSS_VERSION, please verify that a Docker image exists with the new tag.
# See https://github.com/goreleaser/goreleaser-cross/pkgs/container/goreleaser-cross
GOLANG_CROSS_VERSION ?= v1.23
rootulp marked this conversation as resolved.
Show resolved Hide resolved

# process linker flags
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=celestia-app \
Expand Down Expand Up @@ -246,4 +248,4 @@ enable-bbr:
else \
echo "BBR is already enabled."; \
fi
.PHONY: enable-bbr
.PHONY: enable-bbr
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ node | | | |

### Source

1. [Install Go](https://go.dev/doc/install) 1.22.6
1. [Install Go](https://go.dev/doc/install) 1.23.1
1. Clone this repo
1. Install the celestia-app CLI

Expand Down Expand Up @@ -134,7 +134,7 @@ This repo contains multiple go modules. When using it, rename `go.work.example`

### Tools

1. Install [golangci-lint](https://golangci-lint.run/welcome/install) 1.59.1
1. Install [golangci-lint](https://golangci-lint.run/welcome/install) 1.60.3
rootulp marked this conversation as resolved.
Show resolved Hide resolved
1. Install [markdownlint](https://github.com/DavidAnson/markdownlint) 0.39.0
1. Install [hadolint](https://github.com/hadolint/hadolint)
1. Install [yamllint](https://yamllint.readthedocs.io/en/stable/quickstart.html)
Expand Down
1 change: 0 additions & 1 deletion app/test/priority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ func (s *PriorityTestSuite) TestPriorityByGasPrice() {
wg := &sync.WaitGroup{}
for _, accName := range s.accountNames {
wg.Add(1)
accName := accName // new variable per iteration
go func() {
defer wg.Done()
// ensure that it is greater than the min gas price
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile_txsim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: generate celestia-appd binary
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22.6-alpine3.19 as builder
FROM --platform=$BUILDPLATFORM docker.io/golang:1.23.1-alpine3.19 as builder
rootulp marked this conversation as resolved.
Show resolved Hide resolved

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion docs/maintainers/release-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The target audience for this guide is maintainers of this repo. In general, the

## Official Release

Follow the [creating a release candidate](#creating-a-release-candidate) section with the following considerations:
Follow the [creating a release candidate](#creating-a-release-candidate) section with the following considerations:

- The version tag should not include the `-rc` suffix.
- The release notes should contain an **Upgrade Notice** section with notable changes for node operators or library consumers.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/celestiaorg/celestia-app/v3

go 1.22.6
go 1.23.1

require (
cosmossdk.io/errors v1.0.1
Expand Down
2 changes: 1 addition & 1 deletion go.work.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.22.6
go 1.23.1

use (
.
Expand Down
3 changes: 0 additions & 3 deletions pkg/da/data_availability_header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func TestExtendShares(t *testing.T) {
}

for _, tt := range tests {
tt := tt
_, err := ExtendShares(tt.shares)
if tt.expectedErr {
require.NotNil(t, err)
Expand Down Expand Up @@ -122,7 +121,6 @@ func TestDataAvailabilityHeaderProtoConversion(t *testing.T) {
}

for _, tt := range tests {
tt := tt
pdah, err := tt.dah.ToProto()
require.NoError(t, err)
resDah, err := DataAvailabilityHeaderFromProto(pdah)
Expand Down Expand Up @@ -203,7 +201,6 @@ func Test_DAHValidateBasic(t *testing.T) {
}

for _, tt := range tests {
tt := tt
err := tt.dah.ValidateBasic()
if tt.expectErr {
require.True(t, strings.Contains(err.Error(), tt.errStr), tt.name)
Expand Down
2 changes: 1 addition & 1 deletion test/interchain/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/celestiaorg/celestia-app/test/interchain

go 1.22.6
go 1.23.1

require (
cosmossdk.io/math v1.3.0
Expand Down
2 changes: 1 addition & 1 deletion tools/blocketa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ arrivalTime: 2024-08-28 17:24:23.483542677 +0000 UTC
```

> [!NOTE]
> The block time is currently hard-coded. If you're running this for a network with a different block time, you'll need to update the `blockTime` constant in the main.go file. You can use https://www.mintscan.io/celestia/block/ or the blocktime tool.
> The block time is currently hard-coded. If you're running this for a network with a different block time, you'll need to update the `blockTime` constant in the main.go file. You can use <https://www.mintscan.io/celestia/block/> or the blocktime tool.
1 change: 0 additions & 1 deletion x/blob/client/testutil/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ func (s *IntegrationTestSuite) TestSubmitPayForBlob() {
}

for _, tc := range testCases {
tc := tc
require.NoError(s.ctx.WaitForNextBlock())
s.Run(tc.name, func() {
cmd := paycli.CmdPayForBlob()
Expand Down
4 changes: 2 additions & 2 deletions x/blobstream/keeper/keeper_data_commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (k Keeper) GetLatestDataCommitment(ctx sdk.Context) (types.DataCommitment,
return types.DataCommitment{}, err
}
if !found {
return types.DataCommitment{}, errors.Wrapf(types.ErrAttestationNotFound, fmt.Sprintf("nonce %d", i))
return types.DataCommitment{}, errors.Wrapf(types.ErrAttestationNotFound, "nonce %d", i)
}
dcc, ok := att.(*types.DataCommitment)
if !ok {
Expand All @@ -136,7 +136,7 @@ func (k Keeper) HasDataCommitmentInStore(ctx sdk.Context) (bool, error) {
return false, err
}
if !found {
return false, errors.Wrapf(types.ErrAttestationNotFound, fmt.Sprintf("nonce %d", i))
return false, errors.Wrapf(types.ErrAttestationNotFound, "nonce %d", i)
}
_, ok := att.(*types.DataCommitment)
if !ok {
Expand Down
1 change: 0 additions & 1 deletion x/blobstream/keeper/keeper_valset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func TestCurrentValsetNormalization(t *testing.T) {
},
}
for msg, spec := range specs {
spec := spec
t.Run(msg, func(t *testing.T) {
input, ctx := testutil.SetupTestChain(t, spec.srcPowers)
r, err := input.BlobstreamKeeper.GetCurrentValset(ctx)
Expand Down
6 changes: 0 additions & 6 deletions x/mint/client/testutil/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ func (s *IntegrationTestSuite) TestGetCmdQueryInflationRate() {
}

for _, tc := range testCases {
tc := tc

s.Run(tc.name, func() {
cmd := cli.GetCmdQueryInflationRate()

Expand Down Expand Up @@ -103,8 +101,6 @@ func (s *IntegrationTestSuite) TestGetCmdQueryAnnualProvisions() {

expectedAnnualProvision := mint.InitialInflationRateAsDec().MulInt(sdk.NewInt(testnode.DefaultInitialBalance))
for _, tc := range testCases {
tc := tc

s.Run(tc.name, func() {
cmd := cli.GetCmdQueryAnnualProvisions()
out, err := clitestutil.ExecTestCLICmd(s.cctx.Context, cmd, tc.args)
Expand Down Expand Up @@ -134,8 +130,6 @@ func (s *IntegrationTestSuite) TestGetCmdQueryGenesisTime() {
}

for _, tc := range testCases {
tc := tc

s.Run(tc.name, func() {
cmd := cli.GetCmdQueryGenesisTime()
out, err := clitestutil.ExecTestCLICmd(s.cctx.Context, cmd, tc.args)
Expand Down
1 change: 0 additions & 1 deletion x/mint/simulation/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func TestDecodeStore(t *testing.T) {
}

for i, tt := range tests {
i, tt := i, tt
t.Run(tt.name, func(t *testing.T) {
if tt.expectPanic {
require.Panics(t, func() { decoder(kvPairs.Pairs[i], kvPairs.Pairs[i]) }, tt.name)
Expand Down
Loading