diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 81f5564487..5294531394 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -1,6 +1,6 @@ name: "ReviewDog workflow" env: - GOLANGCI_LINT_VERSION: "v1.62.0" + GOLANGCI_LINT_VERSION: "v1.64.8" on: push: branches: @@ -20,20 +20,55 @@ jobs: with: path: crypto/libs key: libsodium-ubuntu-latest-${{ hashFiles('crypto/libsodium-fork/**') }} - # move go out of the way temporarily to avoid "go list ./..." from installing modules + # move go out of the way temporarily to avoid "go list ./..." from installing modules - name: Make libsodium.a run: sudo mv /usr/bin/go /usr/bin/go.bak && make libsodium && sudo mv /usr/bin/go.bak /usr/bin/go - - name: reviewdog-golangci-lint - uses: reviewdog/action-golangci-lint@v2.7.0 + - name: Add bin to PATH + run: | + echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH + echo "$RUNNER_WORKSPACE/$(basename $GITHUB_REPOSITORY)/bin" >> $GITHUB_PATH + - name: Set up Go + uses: ./.github/actions/setup-go + - name: Create folders for golangci-lint + run: mkdir -p cicdtmp/golangci-lint + - name: Check if custom golangci-lint is already built + id: cache-golangci-lint + uses: actions/cache@v4 with: - go_version_file: go.mod - golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }} - golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners" - reporter: "github-pr-check" - tool_name: "Lint Errors" - level: "error" - fail_level: any - filter_mode: "nofilter" + path: cicdtmp/golangci-lint/golangci-lint-cgo + key: cicd-golangci-lint-cgo-v0.0.3-${{ env.GO_VERSION }}-${{ env.GOLANGCI_LINT_VERSION }} + + - name: Build custom golangci-lint with CGO_ENABLED + if: steps.cache-golangci-lint.outputs.cache-hit != 'true' + run: | + cd cicdtmp/golangci-lint + git clone https://github.com/golangci/golangci-lint.git . + git checkout tags/${GOLANGCI_LINT_VERSION} + CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint + ./golangci-lint-cgo --version + cd ../../ + - name: Install reviewdog + run: | + curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/v0.20.3/install.sh | sh -s -- v0.20.3 + reviewdog --version + - name: Run golangci-lint with reviewdog + env: + REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -e + + ./cicdtmp/golangci-lint/golangci-lint-cgo run \ + --out-format line-number \ + -c .golangci.yml \ + --allow-parallel-runners > temp_golangci-lint-errors.txt + + cat temp_golangci-lint-errors.txt | reviewdog \ + -f=golangci-lint \ + -name="Lint Errors" \ + -reporter=github-pr-check \ + -filter-mode=nofilter \ + -fail-level=any \ + -level=error # Non-Blocking Warnings Section reviewdog-warnings: runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index 04750adc5e..e63cce2972 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:24.04 AS builder -ARG GO_VERSION="1.23.9" +ARG GO_VERSION="1.25.3" ARG CHANNEL ARG URL diff --git a/agreement/msgp_gen.go b/agreement/msgp_gen.go index bb74edb62c..f6921ceb92 100644 --- a/agreement/msgp_gen.go +++ b/agreement/msgp_gen.go @@ -1051,8 +1051,6 @@ func (z *ConsensusVersionView) MsgIsZero() bool { func ConsensusVersionViewMaxSize() (s int) { s = 1 + 4 panic("Unable to determine max size: String type string(*z.Err) is unbounded") - s += 8 + protocol.ConsensusVersionMaxSize() - return } // MarshalMsg implements msgp.Marshaler @@ -1585,7 +1583,6 @@ func BlockAssemblerMaxSize() (s int) { s = 1 + 9 + UnauthenticatedProposalMaxSize() + 7 + msgp.BoolSize + 8 + ProposalMaxSize() + 10 + msgp.BoolSize + 15 // Calculating size of slice: z.Authenticators panic("Slice z.Authenticators is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -2252,17 +2249,6 @@ func (z *diskState) MsgIsZero() bool { func DiskStateMaxSize() (s int) { s = 1 + 7 panic("Unable to determine max size: Byteslice type z.Router is unbounded") - s += 7 - panic("Unable to determine max size: Byteslice type z.Player is unbounded") - s += 6 - panic("Unable to determine max size: Byteslice type z.Clock is unbounded") - s += 12 - // Calculating size of slice: z.ActionTypes - panic("Slice z.ActionTypes is unbounded") - s += 8 - // Calculating size of slice: z.Actions - panic("Slice z.Actions is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -3727,10 +3713,6 @@ func (z *messageEvent) MsgIsZero() bool { func MessageEventMaxSize() (s int) { s = 1 + 2 + msgp.Uint8Size + 6 + MessageMaxSize() + 4 panic("Unable to determine max size: String type string(*z.Err) is unbounded") - s += 10 + msgp.Uint64Size + 5 - s += MessageEventMaxSize() - s += 10 + msgp.BoolSize + 6 + ConsensusVersionViewMaxSize() - return } // MarshalMsg implements msgp.Marshaler @@ -4175,7 +4157,6 @@ func PeriodRouterMaxSize() (s int) { s = 1 + 16 + ProposalTrackerMaxSize() + 18 + VoteTrackerPeriodMaxSize() + 24 + ProposalTrackerContractMaxSize() + 9 s += msgp.MapHeaderSize panic("Map z.Children is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -6123,10 +6104,6 @@ func ProposalStoreMaxSize() (s int) { s = 1 + 9 s += msgp.MapHeaderSize panic("Map z.Relevant is unbounded") - s += 7 + ProposalValueMaxSize() + 11 - s += msgp.MapHeaderSize - panic("Map z.Assemblers is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -6371,8 +6348,6 @@ func ProposalTableMaxSize() (s int) { s = 1 + 8 s += msgp.MapHeaderSize panic("Map z.Pending is unbounded") - s += 12 + msgp.Uint64Size - return } // MarshalMsg implements msgp.Marshaler @@ -6585,8 +6560,6 @@ func ProposalTrackerMaxSize() (s int) { s = 1 + 10 s += msgp.MapHeaderSize panic("Map z.Duplicate is unbounded") - s += 8 + ProposalSeekerMaxSize() + 8 + ProposalValueMaxSize() - return } // MarshalMsg implements msgp.Marshaler @@ -7137,7 +7110,6 @@ func ProposalVoteCounterMaxSize() (s int) { s = 1 + 6 + msgp.Uint64Size + 6 s += msgp.MapHeaderSize panic("Map z.Votes is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -7879,7 +7851,6 @@ func RootRouterMaxSize() (s int) { s = 1 + 16 + 1 + 15 + 1 + 9 s += msgp.MapHeaderSize panic("Map z.Children is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -8256,7 +8227,6 @@ func RoundRouterMaxSize() (s int) { s = 1 + 14 + ProposalStoreMaxSize() + 17 + 1 + 9 + ThresholdEventMaxSize() + 3 + msgp.BoolSize + 9 s += msgp.MapHeaderSize panic("Map z.Children is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -8616,7 +8586,6 @@ func (z serializableError) MsgIsZero() bool { // MaxSize returns a maximum valid message size for this message type func SerializableErrorMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -13011,14 +12980,6 @@ func VoteTrackerMaxSize() (s int) { s = 1 + 7 s += msgp.MapHeaderSize panic("Map z.Voters is unbounded") - s += 7 - s += msgp.MapHeaderSize - panic("Map z.Counts is unbounded") - s += 13 - s += msgp.MapHeaderSize - panic("Map z.Equivocators is unbounded") - s += 18 + msgp.Uint64Size - return } // MarshalMsg implements msgp.Marshaler diff --git a/cmd/algoh/main.go b/cmd/algoh/main.go index 84570ab11f..8c11658a09 100644 --- a/cmd/algoh/main.go +++ b/cmd/algoh/main.go @@ -391,7 +391,7 @@ func captureErrorLogs(algohConfig algoh.HostConfig, errorOutput stdCollector, ou if errorOutput.output != "" { fmt.Fprintf(os.Stdout, "errorOutput.output: `%s`\n", errorOutput.output) errorCondition = true - fmt.Fprintf(os.Stderr, errorOutput.output) + fmt.Fprint(os.Stderr, errorOutput.output) details := telemetryspec.ErrorOutputEventDetails{ Error: errorOutput.output, Output: output.output, diff --git a/cmd/algorelay/commands.go b/cmd/algorelay/commands.go index 0f8b0f84fb..95799b89cb 100644 --- a/cmd/algorelay/commands.go +++ b/cmd/algorelay/commands.go @@ -42,10 +42,10 @@ type exitError struct { errorMessage string } -func makeExitError(exitCode int, errMsg string, errArgs ...interface{}) exitError { +func makeExitError(exitCode int, errMsg string) exitError { ee := exitError{ exitCode: exitCode, - errorMessage: fmt.Sprintf(errMsg, errArgs...), + errorMessage: errMsg, } return ee } diff --git a/cmd/catchpointdump/file.go b/cmd/catchpointdump/file.go index cbb6dd6963..3a1075b4ab 100644 --- a/cmd/catchpointdump/file.go +++ b/cmd/catchpointdump/file.go @@ -463,7 +463,7 @@ func printDumpingCatchpointProgressLine(progress int, barLength int, dld int64) if dld > 0 { outString = fmt.Sprintf(outString+" %d", dld) } - fmt.Printf(escapeCursorUp + escapeDeleteLine + outString + "\n") + fmt.Print(escapeCursorUp + escapeDeleteLine + outString + "\n") } func printAccountsDatabase(databaseName string, stagingTables bool, fileHeader ledger.CatchpointFileHeader, outFile *os.File, excludeFields []string) error { diff --git a/cmd/catchupsrv/tarblocks.go b/cmd/catchupsrv/tarblocks.go index 93a4293ad6..8c921eaa07 100644 --- a/cmd/catchupsrv/tarblocks.go +++ b/cmd/catchupsrv/tarblocks.go @@ -19,7 +19,6 @@ package main import ( "archive/tar" "compress/bzip2" - "errors" "fmt" "io" "os" @@ -224,5 +223,4 @@ func (tbf *tarBlockFile) getBlock(round uint64) (data []byte, err error) { return } } - return nil, errors.New("this should be unreachable") } diff --git a/cmd/partitiontest_linter/go.mod b/cmd/partitiontest_linter/go.mod index 93336aa3e0..ca958e24bf 100644 --- a/cmd/partitiontest_linter/go.mod +++ b/cmd/partitiontest_linter/go.mod @@ -1,12 +1,12 @@ module github.com/algorand/go-algorand/cmd/partitiontest_linter -go 1.23 +go 1.25 -toolchain go1.23.9 +toolchain go1.25.3 require ( - golang.org/x/mod v0.22.0 // indirect - golang.org/x/sync v0.9.0 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/sync v0.12.0 // indirect ) -require golang.org/x/tools v0.27.0 +require golang.org/x/tools v0.31.0 diff --git a/cmd/partitiontest_linter/go.sum b/cmd/partitiontest_linter/go.sum index 394d668cc6..09ebfb8a2a 100644 --- a/cmd/partitiontest_linter/go.sum +++ b/cmd/partitiontest_linter/go.sum @@ -1,8 +1,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= -golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= +golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= diff --git a/cmd/tealdbg/cdtSession.go b/cmd/tealdbg/cdtSession.go index 0b15ce11a9..71d25c7348 100644 --- a/cmd/tealdbg/cdtSession.go +++ b/cmd/tealdbg/cdtSession.go @@ -378,7 +378,7 @@ func (s *cdtSession) handleCdtRequest(req *cdt.ChromeRequest, state *cdtState) ( var desc []cdt.RuntimePropertyDescriptor desc, err = state.getObjectDescriptor(objID, preview) if err != nil { - err = fmt.Errorf("getObjectDescriptor error: " + err.Error()) + err = fmt.Errorf("getObjectDescriptor error: %w", err) return } @@ -386,7 +386,7 @@ func (s *cdtSession) handleCdtRequest(req *cdt.ChromeRequest, state *cdtState) ( var data []byte data, err = json.Marshal(desc) if err != nil { - err = fmt.Errorf("getObjectDescriptor json error: " + err.Error()) + err = fmt.Errorf("getObjectDescriptor json error: %w", err) return } log.Printf("Desc object: %s", string(data)) diff --git a/crypto/msgp_gen.go b/crypto/msgp_gen.go index ca58b84370..0b7142457f 100644 --- a/crypto/msgp_gen.go +++ b/crypto/msgp_gen.go @@ -2393,16 +2393,6 @@ func OneTimeSignatureSecretsMaxSize() (s int) { s += 6 + msgp.Uint64Size + 4 // Calculating size of slice: z.OneTimeSignatureSecretsPersistent.Batches panic("Slice z.OneTimeSignatureSecretsPersistent.Batches is unbounded") - s += 9 + msgp.Uint64Size + 8 - // Calculating size of slice: z.OneTimeSignatureSecretsPersistent.Offsets - panic("Slice z.OneTimeSignatureSecretsPersistent.Offsets is unbounded") - s += 7 - // Calculating size of array: z.OneTimeSignatureSecretsPersistent.OffsetsPK2 - s += msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) - s += 10 - // Calculating size of array: z.OneTimeSignatureSecretsPersistent.OffsetsPK2Sig - s += msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) - return } // MarshalMsg implements msgp.Marshaler @@ -2751,16 +2741,6 @@ func OneTimeSignatureSecretsPersistentMaxSize() (s int) { s += 6 + msgp.Uint64Size + 4 // Calculating size of slice: z.Batches panic("Slice z.Batches is unbounded") - s += 9 + msgp.Uint64Size + 8 - // Calculating size of slice: z.Offsets - panic("Slice z.Offsets is unbounded") - s += 7 - // Calculating size of array: z.OffsetsPK2 - s += msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) - s += 10 - // Calculating size of array: z.OffsetsPK2Sig - s += msgp.ArrayHeaderSize + ((64) * (msgp.ByteSize)) - return } // MarshalMsg implements msgp.Marshaler diff --git a/daemon/kmd/api/api.go b/daemon/kmd/api/api.go index 4b34f92135..1f5df79c9c 100644 --- a/daemon/kmd/api/api.go +++ b/daemon/kmd/api/api.go @@ -59,7 +59,7 @@ // Base path must be a fully specified package name (else, it seems that swagger feeds a relative path to // loader.Config.Import(), and that breaks the vendor directory if the source is symlinked from elsewhere) // -//go:generate swagger generate spec -m -o="./swagger.json" +//go:generate swagger generate spec -m --transparent-aliases -o="./swagger.json" //go:generate swagger validate ./swagger.json --stop-on-error //go:generate sh ../lib/kmdapi/bundle_swagger_json.sh package api diff --git a/data/basics/msgp_gen.go b/data/basics/msgp_gen.go index 71c0c87ec0..aa35233b2a 100644 --- a/data/basics/msgp_gen.go +++ b/data/basics/msgp_gen.go @@ -6153,8 +6153,6 @@ func (z *TealValue) MsgIsZero() bool { func TealValueMaxSize() (s int) { s = 1 + 3 + msgp.Uint64Size + 3 panic("Unable to determine max size: String type z.Bytes is unbounded") - s += 3 + msgp.Uint64Size - return } // MarshalMsg implements msgp.Marshaler diff --git a/data/bookkeeping/msgp_gen.go b/data/bookkeeping/msgp_gen.go index 09c66bf58d..32fe332eae 100644 --- a/data/bookkeeping/msgp_gen.go +++ b/data/bookkeeping/msgp_gen.go @@ -2653,17 +2653,6 @@ func (z *Genesis) MsgIsZero() bool { func GenesisMaxSize() (s int) { s = 1 + 3 panic("Unable to determine max size: String type z.SchemaID is unbounded") - s += 8 + protocol.NetworkIDMaxSize() + 6 + protocol.ConsensusVersionMaxSize() + 6 - // Calculating size of slice: z.Allocation - s += msgp.ArrayHeaderSize + ((MaxInitialGenesisAllocationSize) * (GenesisAllocationMaxSize())) - s += 4 - panic("Unable to determine max size: String type z.RewardsPool is unbounded") - s += 5 - panic("Unable to determine max size: String type z.FeeSink is unbounded") - s += 10 + msgp.Int64Size + 8 - panic("Unable to determine max size: String type z.Comment is unbounded") - s += 8 + msgp.BoolSize - return } // MarshalMsg implements msgp.Marshaler @@ -3087,10 +3076,6 @@ func (z *GenesisAllocation) MsgIsZero() bool { func GenesisAllocationMaxSize() (s int) { s = 1 + 5 panic("Unable to determine max size: String type z.Address is unbounded") - s += 8 - panic("Unable to determine max size: String type z.Comment is unbounded") - s += 6 + GenesisAccountDataMaxSize() - return } // MarshalMsg implements msgp.Marshaler diff --git a/data/hashable/msgp_gen.go b/data/hashable/msgp_gen.go index 6906f7528f..fc20f28a28 100644 --- a/data/hashable/msgp_gen.go +++ b/data/hashable/msgp_gen.go @@ -136,5 +136,4 @@ func (z *Message) MsgIsZero() bool { func MessageMaxSize() (s int) { s = 1 + 4 panic("Unable to determine max size: String type z.Message is unbounded") - return } diff --git a/go.mod b/go.mod index f50967dc09..20cb7d57ff 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,18 @@ module github.com/algorand/go-algorand -go 1.23.0 +go 1.25.0 -toolchain go1.23.9 +toolchain go1.25.3 require ( github.com/DataDog/zstd v1.5.2 github.com/algorand/avm-abi v0.2.0 github.com/algorand/falcon v0.1.0 github.com/algorand/go-codec/codec v1.1.10 - github.com/algorand/go-deadlock v0.2.4 + github.com/algorand/go-deadlock v0.2.5 github.com/algorand/go-sumhash v0.1.0 github.com/algorand/graphtrace v0.1.0 - github.com/algorand/msgp v1.1.60 + github.com/algorand/msgp v1.1.61 github.com/algorand/sortition v1.0.0 github.com/algorand/websocket v1.4.6 github.com/aws/aws-sdk-go v1.34.0 @@ -156,7 +156,7 @@ require ( github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect - github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274 // indirect + github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe // indirect github.com/pion/datachannel v1.5.9 // indirect github.com/pion/dtls/v2 v2.2.12 // indirect github.com/pion/ice/v2 v2.3.36 // indirect diff --git a/go.sum b/go.sum index 26ef319213..243179e86c 100644 --- a/go.sum +++ b/go.sum @@ -26,14 +26,14 @@ github.com/algorand/falcon v0.1.0 h1:xl832kfZ7hHG6B4p90DQynjfKFGbIUgUOnsRiMZXfAo github.com/algorand/falcon v0.1.0/go.mod h1:OkQyHlGvS0kLNcIWbC21/uQcnbfwSOQm+wiqWwBG9pQ= github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbnDfiVa+5QA= github.com/algorand/go-codec/codec v1.1.10/go.mod h1:YkEx5nmr/zuCeaDYOIhlDg92Lxju8tj2d2NrYqP7g7k= -github.com/algorand/go-deadlock v0.2.4 h1:UMs6GwE2wHC6BUZo5z32/+SrBey1LQjbkZQ3V7DoGVA= -github.com/algorand/go-deadlock v0.2.4/go.mod h1:tewhAviZpVq2cnGHmfT50l6RwWLnuygnfNntCN2fz0M= +github.com/algorand/go-deadlock v0.2.5 h1:Kn3WJMn9+wK1pqJrr2+1/y3Z8p1dcftpr2Mbbl1CShw= +github.com/algorand/go-deadlock v0.2.5/go.mod h1:z0g1kdYBhezsHoEKqYf5dVnP9dGMwOOqqxUSTCk2Oks= github.com/algorand/go-sumhash v0.1.0 h1:b/QRhyLuF//vOcicBIxBXYW8bERNoeLxieht/dUYpVg= github.com/algorand/go-sumhash v0.1.0/go.mod h1:OOe7jdDWUhLkuP1XytkK5gnLu9entAviN5DfDZh6XAc= github.com/algorand/graphtrace v0.1.0 h1:QemP1iT0W56SExD0NfiU6rsG34/v0Je6bg5UZnptEUM= github.com/algorand/graphtrace v0.1.0/go.mod h1:HscLQrzBdH1BH+5oehs3ICd8SYcXvnSL9BjfTu8WHCc= -github.com/algorand/msgp v1.1.60 h1:+IVUC34+tSj1P2M1mkYtl4GLyfzdzXfBLSw6TDT19M8= -github.com/algorand/msgp v1.1.60/go.mod h1:RqZQBzAFDWpwh5TlabzZkWy+6kwL9cvXfLbU0gD99EA= +github.com/algorand/msgp v1.1.61 h1:IDSCGKLIi60n6j0lHDu37GTsCo9anw49Rq4PTwsDQsQ= +github.com/algorand/msgp v1.1.61/go.mod h1:j9sEjNKkS12H0Yhwov/3MfzhM60n3iyr81Ymzv49pu8= github.com/algorand/sortition v1.0.0 h1:PJiZtdSTBm4nArQrZXBnhlljHXhuyAXRJBqVWowQu3E= github.com/algorand/sortition v1.0.0/go.mod h1:23CZwAbTWPv0bBsq+Php/2J6Y/iXDyzlfcZyepeY5Fo= github.com/algorand/websocket v1.4.6 h1:I0kV4EYwatuUrKtNiwzYYgojgwh6pksDmlqntKG2Woc= @@ -506,8 +506,8 @@ github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhM github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= -github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274 h1:qli3BGQK0tYDkSEvZ/FzZTi9ZrOX86Q6CIhKLGc489A= -github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe h1:vHpqOnPlnkba8iSxU4j/CvDSS9J4+F4473esQsYLGoE= +github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pion/datachannel v1.5.9 h1:LpIWAOYPyDrXtU+BW7X0Yt/vGtYxtXQ8ql7dFfYUVZA= diff --git a/ledger/encoded/msgp_gen.go b/ledger/encoded/msgp_gen.go index 58de0bc8a1..129a37aa7a 100644 --- a/ledger/encoded/msgp_gen.go +++ b/ledger/encoded/msgp_gen.go @@ -203,7 +203,6 @@ func (z *BalanceRecordV5) MsgIsZero() bool { func BalanceRecordV5MaxSize() (s int) { s = 1 + 3 + basics.AddressMaxSize() + 3 panic("Unable to determine max size: MaxSize() not implemented for Raw type") - return } // MarshalMsg implements msgp.Marshaler @@ -472,15 +471,6 @@ func (z *BalanceRecordV6) MsgIsZero() bool { func BalanceRecordV6MaxSize() (s int) { s = 1 + 2 + basics.AddressMaxSize() + 2 panic("Unable to determine max size: MaxSize() not implemented for Raw type") - s += 2 - s += msgp.MapHeaderSize - // Adding size of map keys for z.Resources - s += resourcesPerCatchpointFileChunkBackwardCompatible * (msgp.Uint64Size) - // Adding size of map values for z.Resources - s += resourcesPerCatchpointFileChunkBackwardCompatible - panic("Unable to determine max size: MaxSize() not implemented for Raw type") - s += 2 + msgp.BoolSize - return } // MarshalMsg implements msgp.Marshaler @@ -876,7 +866,6 @@ func (z *OnlineAccountRecordV6) MsgIsZero() bool { func OnlineAccountRecordV6MaxSize() (s int) { s = 1 + 5 + basics.AddressMaxSize() + 4 + basics.RoundMaxSize() + 4 + msgp.Uint64Size + 4 + basics.RoundMaxSize() + 5 panic("Unable to determine max size: MaxSize() not implemented for Raw type") - return } // MarshalMsg implements msgp.Marshaler @@ -1020,5 +1009,4 @@ func (z *OnlineRoundParamsRecordV6) MsgIsZero() bool { func OnlineRoundParamsRecordV6MaxSize() (s int) { s = 1 + 4 + basics.RoundMaxSize() + 5 panic("Unable to determine max size: MaxSize() not implemented for Raw type") - return } diff --git a/ledger/msgp_gen.go b/ledger/msgp_gen.go index 3de57948f0..415c2bb6ae 100644 --- a/ledger/msgp_gen.go +++ b/ledger/msgp_gen.go @@ -5,7 +5,6 @@ package ledger import ( "github.com/algorand/msgp/msgp" - "github.com/algorand/go-algorand/crypto" "github.com/algorand/go-algorand/data/basics" "github.com/algorand/go-algorand/ledger/encoded" "github.com/algorand/go-algorand/ledger/ledgercore" @@ -471,8 +470,6 @@ func (z *CatchpointFileHeader) MsgIsZero() bool { func CatchpointFileHeaderMaxSize() (s int) { s = 1 + 8 + msgp.Uint64Size + 14 + basics.RoundMaxSize() + 12 + basics.RoundMaxSize() + 14 + ledgercore.AccountTotalsMaxSize() + 14 + msgp.Uint64Size + 12 + msgp.Uint64Size + 9 + msgp.Uint64Size + 20 + msgp.Uint64Size + 23 + msgp.Uint64Size + 11 panic("Unable to determine max size: String type z.Catchpoint is unbounded") - s += 18 + crypto.DigestMaxSize() - return } // MarshalMsg implements msgp.Marshaler diff --git a/ledger/store/trackerdb/generickv/msgp_gen.go b/ledger/store/trackerdb/generickv/msgp_gen.go index 026677c1bc..c15ead158c 100644 --- a/ledger/store/trackerdb/generickv/msgp_gen.go +++ b/ledger/store/trackerdb/generickv/msgp_gen.go @@ -161,5 +161,4 @@ func (z *creatableEntry) MsgIsZero() bool { func CreatableEntryMaxSize() (s int) { s = 1 + 6 + basics.CreatableTypeMaxSize() + 12 panic("Unable to determine max size: Byteslice type z.CreatorAddr is unbounded") - return } diff --git a/ledger/store/trackerdb/msgp_gen.go b/ledger/store/trackerdb/msgp_gen.go index 9e522d305d..a2387a7e56 100644 --- a/ledger/store/trackerdb/msgp_gen.go +++ b/ledger/store/trackerdb/msgp_gen.go @@ -9,7 +9,6 @@ import ( "github.com/algorand/go-algorand/crypto" "github.com/algorand/go-algorand/crypto/merklesignature" "github.com/algorand/go-algorand/data/basics" - "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/go-algorand/data/transactions" "github.com/algorand/go-algorand/ledger/ledgercore" ) @@ -2504,15 +2503,6 @@ func (z *ResourcesData) MsgIsZero() bool { func ResourcesDataMaxSize() (s int) { s = 3 + 2 + msgp.Uint64Size + 2 + msgp.Uint32Size + 2 + msgp.BoolSize + 2 panic("Unable to determine max size: String type z.UnitName is unbounded") - s += 2 - panic("Unable to determine max size: String type z.AssetName is unbounded") - s += 2 - panic("Unable to determine max size: String type z.URL is unbounded") - s += 2 - // Calculating size of array: z.MetadataHash - s += msgp.ArrayHeaderSize + ((32) * (msgp.ByteSize)) - s += 2 + basics.AddressMaxSize() + 2 + basics.AddressMaxSize() + 2 + basics.AddressMaxSize() + 2 + basics.AddressMaxSize() + 2 + msgp.Uint64Size + 2 + msgp.BoolSize + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + basics.TealKeyValueMaxSize() + 2 + msgp.BytesPrefixSize + bounds.MaxAvailableAppProgramLen + 2 + msgp.BytesPrefixSize + bounds.MaxAvailableAppProgramLen + 2 + basics.TealKeyValueMaxSize() + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size + 2 + msgp.Uint32Size + 2 + msgp.Uint8Size + 2 + msgp.Uint64Size + 2 + msgp.Uint64Size - return } // MarshalMsg implements msgp.Marshaler @@ -2832,14 +2822,6 @@ func TxTailRoundMaxSize() (s int) { s = 1 + 2 // Calculating size of slice: z.TxnIDs panic("Slice z.TxnIDs is unbounded") - s += 2 - // Calculating size of slice: z.LastValid - panic("Slice z.LastValid is unbounded") - s += 2 - // Calculating size of slice: z.Leases - panic("Slice z.Leases is unbounded") - s += 2 + bookkeeping.BlockHeaderMaxSize() - return } // MarshalMsg implements msgp.Marshaler diff --git a/network/msgp_gen.go b/network/msgp_gen.go index 5451e5e53a..3d94f7f478 100644 --- a/network/msgp_gen.go +++ b/network/msgp_gen.go @@ -169,7 +169,6 @@ func (z disconnectReason) MsgIsZero() bool { // MaxSize returns a maximum valid message size for this message type func DisconnectReasonMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -1390,12 +1389,6 @@ func PeerMetaHeadersMaxSize() (s int) { // Adding size of map keys for z s += maxHeaderKeys panic("Unable to determine max size: String type za0006 is unbounded") - // Adding size of map values for z - s += maxHeaderKeys - // Calculating size of slice: za0007 - s += msgp.ArrayHeaderSize - panic("Unable to determine max size: String type is unbounded for za0007[za0008]") - return } // MarshalMsg implements msgp.Marshaler @@ -1484,5 +1477,4 @@ func PeerMetaValuesMaxSize() (s int) { // Calculating size of slice: z s += msgp.ArrayHeaderSize panic("Unable to determine max size: String type is unbounded for z[za0001]") - return } diff --git a/protocol/msgp_gen.go b/protocol/msgp_gen.go index 76c2639896..a6288eac0b 100644 --- a/protocol/msgp_gen.go +++ b/protocol/msgp_gen.go @@ -207,7 +207,6 @@ func (z Error) MsgIsZero() bool { // MaxSize returns a maximum valid message size for this message type func ErrorMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -267,7 +266,6 @@ func (z HashID) MsgIsZero() bool { // MaxSize returns a maximum valid message size for this message type func HashIDMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -327,7 +325,6 @@ func (z NetworkID) MsgIsZero() bool { // MaxSize returns a maximum valid message size for this message type func NetworkIDMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") - return } // MarshalMsg implements msgp.Marshaler @@ -447,7 +444,6 @@ func (z Tag) MsgIsZero() bool { // MaxSize returns a maximum valid message size for this message type func TagMaxSize() (s int) { panic("Unable to determine max size: String type string(z) is unbounded") - return } // MarshalMsg implements msgp.Marshaler diff --git a/scripts/buildtools/install_buildtools.sh b/scripts/buildtools/install_buildtools.sh index 75e74fd8f8..a06f5b6bbb 100755 --- a/scripts/buildtools/install_buildtools.sh +++ b/scripts/buildtools/install_buildtools.sh @@ -88,7 +88,7 @@ if [[ "${BUILDTOOLS_INSTALL}" != "ALL" ]]; then fi install_go_module golang.org/x/tools golang.org/x/tools/cmd/stringer -install_go_module github.com/go-swagger/go-swagger github.com/go-swagger/go-swagger/cmd/swagger +install_go_module github.com/algorand/go-swagger github.com/algorand/go-swagger/cmd/swagger install_go_module github.com/algorand/msgp install_go_module gotest.tools/gotestsum install_go_module github.com/golangci/golangci-lint/cmd/golangci-lint diff --git a/scripts/buildtools/versions b/scripts/buildtools/versions index 330cd8bf90..4185f1953c 100644 --- a/scripts/buildtools/versions +++ b/scripts/buildtools/versions @@ -1,6 +1,6 @@ golang.org/x/lint v0.0.0-20241112194109-818c5a804067 golang.org/x/tools v0.27.0 -github.com/algorand/msgp v1.1.60 -github.com/go-swagger/go-swagger v0.31.0 -gotest.tools/gotestsum v1.12.0 -github.com/golangci/golangci-lint/cmd/golangci-lint v1.62.0 +github.com/algorand/msgp v1.1.61 +github.com/algorand/go-swagger v0.0.0-20251018003531-2ea7c750dcac +gotest.tools/gotestsum v1.13.0 +github.com/golangci/golangci-lint/cmd/golangci-lint v1.64.8 diff --git a/scripts/get_golang_version.sh b/scripts/get_golang_version.sh index 9b2692454d..a0fa989018 100755 --- a/scripts/get_golang_version.sh +++ b/scripts/get_golang_version.sh @@ -11,7 +11,7 @@ # Our build task-runner `mule` will refer to this script and will automatically # build a new image whenever the version number has been changed. -BUILD=1.23.9 +BUILD=1.25.3 MIN=$(echo $BUILD | cut -d. -f1-2).0 if [ "$1" = all ] diff --git a/tools/block-generator/go.mod b/tools/block-generator/go.mod index 567085d74f..8b95c0bc5f 100644 --- a/tools/block-generator/go.mod +++ b/tools/block-generator/go.mod @@ -2,15 +2,15 @@ module github.com/algorand/go-algorand/tools/block-generator replace github.com/algorand/go-algorand => ../.. -go 1.23.0 +go 1.25.0 -toolchain go1.23.9 +toolchain go1.25.3 require ( github.com/algorand/avm-abi v0.2.0 github.com/algorand/go-algorand v0.0.0 github.com/algorand/go-codec/codec v1.1.10 - github.com/algorand/go-deadlock v0.2.4 + github.com/algorand/go-deadlock v0.2.5 github.com/lib/pq v1.10.9 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.10.0 @@ -22,7 +22,7 @@ require ( github.com/DataDog/zstd v1.5.2 // indirect github.com/algorand/falcon v0.1.0 // indirect github.com/algorand/go-sumhash v0.1.0 // indirect - github.com/algorand/msgp v1.1.60 // indirect + github.com/algorand/msgp v1.1.61 // indirect github.com/algorand/sortition v1.0.0 // indirect github.com/algorand/websocket v1.4.6 // indirect github.com/aws/aws-sdk-go v1.34.0 // indirect @@ -128,7 +128,7 @@ require ( github.com/onsi/ginkgo/v2 v2.20.2 // indirect github.com/opencontainers/runtime-spec v1.2.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274 // indirect + github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe // indirect github.com/pion/datachannel v1.5.9 // indirect github.com/pion/dtls/v2 v2.2.12 // indirect github.com/pion/ice/v2 v2.3.36 // indirect diff --git a/tools/block-generator/go.sum b/tools/block-generator/go.sum index c24cb3a494..76d8c691f8 100644 --- a/tools/block-generator/go.sum +++ b/tools/block-generator/go.sum @@ -25,12 +25,12 @@ github.com/algorand/falcon v0.1.0 h1:xl832kfZ7hHG6B4p90DQynjfKFGbIUgUOnsRiMZXfAo github.com/algorand/falcon v0.1.0/go.mod h1:OkQyHlGvS0kLNcIWbC21/uQcnbfwSOQm+wiqWwBG9pQ= github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbnDfiVa+5QA= github.com/algorand/go-codec/codec v1.1.10/go.mod h1:YkEx5nmr/zuCeaDYOIhlDg92Lxju8tj2d2NrYqP7g7k= -github.com/algorand/go-deadlock v0.2.4 h1:UMs6GwE2wHC6BUZo5z32/+SrBey1LQjbkZQ3V7DoGVA= -github.com/algorand/go-deadlock v0.2.4/go.mod h1:tewhAviZpVq2cnGHmfT50l6RwWLnuygnfNntCN2fz0M= +github.com/algorand/go-deadlock v0.2.5 h1:Kn3WJMn9+wK1pqJrr2+1/y3Z8p1dcftpr2Mbbl1CShw= +github.com/algorand/go-deadlock v0.2.5/go.mod h1:z0g1kdYBhezsHoEKqYf5dVnP9dGMwOOqqxUSTCk2Oks= github.com/algorand/go-sumhash v0.1.0 h1:b/QRhyLuF//vOcicBIxBXYW8bERNoeLxieht/dUYpVg= github.com/algorand/go-sumhash v0.1.0/go.mod h1:OOe7jdDWUhLkuP1XytkK5gnLu9entAviN5DfDZh6XAc= -github.com/algorand/msgp v1.1.60 h1:+IVUC34+tSj1P2M1mkYtl4GLyfzdzXfBLSw6TDT19M8= -github.com/algorand/msgp v1.1.60/go.mod h1:RqZQBzAFDWpwh5TlabzZkWy+6kwL9cvXfLbU0gD99EA= +github.com/algorand/msgp v1.1.61 h1:IDSCGKLIi60n6j0lHDu37GTsCo9anw49Rq4PTwsDQsQ= +github.com/algorand/msgp v1.1.61/go.mod h1:j9sEjNKkS12H0Yhwov/3MfzhM60n3iyr81Ymzv49pu8= github.com/algorand/sortition v1.0.0 h1:PJiZtdSTBm4nArQrZXBnhlljHXhuyAXRJBqVWowQu3E= github.com/algorand/sortition v1.0.0/go.mod h1:23CZwAbTWPv0bBsq+Php/2J6Y/iXDyzlfcZyepeY5Fo= github.com/algorand/websocket v1.4.6 h1:I0kV4EYwatuUrKtNiwzYYgojgwh6pksDmlqntKG2Woc= @@ -460,8 +460,8 @@ github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274 h1:qli3BGQK0tYDkSEvZ/FzZTi9ZrOX86Q6CIhKLGc489A= -github.com/petermattis/goid v0.0.0-20241025130422-66cb2e6d7274/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe h1:vHpqOnPlnkba8iSxU4j/CvDSS9J4+F4473esQsYLGoE= +github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pion/datachannel v1.5.9 h1:LpIWAOYPyDrXtU+BW7X0Yt/vGtYxtXQ8ql7dFfYUVZA= diff --git a/tools/debug/logfilter/main.go b/tools/debug/logfilter/main.go index 08830e2533..12db2dd785 100644 --- a/tools/debug/logfilter/main.go +++ b/tools/debug/logfilter/main.go @@ -78,7 +78,7 @@ func logFilter(inFile io.Reader, outFile io.Writer) int { fmt.Fprintf(outFile, "%s\r\n%s\r\n", line, packageOutputBuffer) packageOutputBuffer = "" } else { - fmt.Fprintf(outFile, line+"\r\n") + fmt.Fprint(outFile, line+"\r\n") delete(tests, testName) currentTestName = "" } @@ -93,8 +93,8 @@ func logFilter(inFile io.Reader, outFile io.Writer) int { fmt.Fprintf(outFile, "%s\r\n%s\r\n", line, packageOutputBuffer) packageOutputBuffer = "" } else { - fmt.Fprintf(outFile, test.outputBuffer+"\r\n") - fmt.Fprintf(outFile, line+"\r\n") + fmt.Fprint(outFile, test.outputBuffer+"\r\n") + fmt.Fprint(outFile, line+"\r\n") test.outputBuffer = "" tests[testName] = test currentTestName = "" @@ -113,7 +113,7 @@ func logFilter(inFile io.Reader, outFile io.Writer) int { continue } if strings.HasPrefix(line, "ok ") { - fmt.Fprintf(outFile, line+"\r\n") + fmt.Fprint(outFile, line+"\r\n") packageOutputBuffer = "" continue } @@ -123,7 +123,7 @@ func logFilter(inFile io.Reader, outFile io.Writer) int { fmt.Fprintf(outFile, line+"...\r\n%s\r\n", packageOutputBuffer) } packageOutputBuffer = "" - fmt.Fprintf(outFile, line+"\r\n") + fmt.Fprint(outFile, line+"\r\n") continue } // this is package-oriented output diff --git a/tools/x-repo-types/go.mod b/tools/x-repo-types/go.mod index bd3a1ab9ed..0c849ba814 100644 --- a/tools/x-repo-types/go.mod +++ b/tools/x-repo-types/go.mod @@ -1,8 +1,8 @@ module github.com/algorand/go-algorand/tools/x-repo-types -go 1.23.0 +go 1.25.0 -toolchain go1.23.9 +toolchain go1.25.3 replace github.com/algorand/go-algorand => ../..