From baf092c24e954696f722a99739f683a480afffe2 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 10:54:16 -0400 Subject: [PATCH 01/17] gsed -i 's|go 1.23.0|go 1.25.0|' cmd/partitiontest_linter/go.mod go.mod tools/block-generator/go.mod tools/x-repo-types/go.mod gsed -i 's|go1.23.9|go1.25.3|' cmd/partitiontest_linter/go.mod go.mod tools/block-generator/go.mod tools/x-repo-types/go.mod gsed -i 's|1.23.9|1.25.3|' Dockerfile scripts/get_golang_version.sh --- Dockerfile | 2 +- cmd/partitiontest_linter/go.mod | 2 +- go.mod | 4 ++-- scripts/get_golang_version.sh | 2 +- tools/block-generator/go.mod | 4 ++-- tools/x-repo-types/go.mod | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) 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/cmd/partitiontest_linter/go.mod b/cmd/partitiontest_linter/go.mod index 93336aa3e0..f82a33bfb0 100644 --- a/cmd/partitiontest_linter/go.mod +++ b/cmd/partitiontest_linter/go.mod @@ -2,7 +2,7 @@ module github.com/algorand/go-algorand/cmd/partitiontest_linter go 1.23 -toolchain go1.23.9 +toolchain go1.25.3 require ( golang.org/x/mod v0.22.0 // indirect diff --git a/go.mod b/go.mod index f50967dc09..621e596904 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ 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 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..ee8baf7d02 100644 --- a/tools/block-generator/go.mod +++ b/tools/block-generator/go.mod @@ -2,9 +2,9 @@ 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 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 => ../.. From b3e3faeca0a826a90a9e196f1987e9eed08f99e3 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 11:54:27 -0400 Subject: [PATCH 02/17] use our own modified swagger gen tool --- scripts/buildtools/install_buildtools.sh | 2 +- scripts/buildtools/versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..38962926c8 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 +github.com/algorand/go-swagger 033ed738b5ab95d6aefe737cdeb4bf148b09428a gotest.tools/gotestsum v1.12.0 github.com/golangci/golangci-lint/cmd/golangci-lint v1.62.0 From e1fc68b6293c348c7d2d02e9d925bcbf11a7495a Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:07:16 -0400 Subject: [PATCH 03/17] update tools for go1.25, including switching to algorand fork of go-swagger --- scripts/buildtools/versions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/buildtools/versions b/scripts/buildtools/versions index 38962926c8..fc52b5a459 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/algorand/go-swagger 033ed738b5ab95d6aefe737cdeb4bf148b09428a -gotest.tools/gotestsum v1.12.0 +github.com/algorand/go-swagger 60deb7a1e0d7fff30334471d6739abb0485915ba +gotest.tools/gotestsum v1.13.0 github.com/golangci/golangci-lint/cmd/golangci-lint v1.62.0 From 8c601e0e155ce65eb26b8822285465ce0fb831a7 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:08:54 -0400 Subject: [PATCH 04/17] fix go vet errors "non-constant format string in call to" --- cmd/algoh/main.go | 2 +- cmd/algorelay/relayCmd.go | 14 +++++++------- cmd/catchpointdump/file.go | 2 +- cmd/tealdbg/cdtSession.go | 4 ++-- tools/debug/logfilter/main.go | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) 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/relayCmd.go b/cmd/algorelay/relayCmd.go index b6ee24ed04..e43a145df4 100644 --- a/cmd/algorelay/relayCmd.go +++ b/cmd/algorelay/relayCmd.go @@ -95,7 +95,7 @@ func loadRelays(file string) []eb.Relay { err := codecs.LoadObjectFromFile(file, &relays) if err != nil { err = fmt.Errorf("Unable to load relays file - %v", err) - panic(makeExitError(1, err.Error())) + panic(makeExitError(1, "%s", err.Error())) } return relays } @@ -126,27 +126,27 @@ func makeDNSContext() *dnsContext { nameZoneID, err := cloudflareCred.GetZoneID(context.Background(), nameDomainArg) if err != nil { - panic(makeExitError(1, err.Error())) + panic(makeExitError(1, "%s", err.Error())) } nameEntries, err := getReverseMappedEntries(nameZoneID, nameRecordTypes) if err != nil { - panic(makeExitError(1, err.Error())) + panic(makeExitError(1, "%s", err.Error())) } srvZoneID, err := cloudflareCred.GetZoneID(context.Background(), srvDomainArg) if err != nil { - panic(makeExitError(1, err.Error())) + panic(makeExitError(1, "%s", err.Error())) } bootstrap, err := getSrvRecords("_algobootstrap", dnsBootstrapArg+"."+srvDomainArg, srvZoneID) if err != nil { - panic(makeExitError(1, err.Error())) + panic(makeExitError(1, "%s", err.Error())) } metrics, err := getSrvRecords("_metrics", srvDomainArg, srvZoneID) if err != nil { - panic(makeExitError(1, err.Error())) + panic(makeExitError(1, "%s", err.Error())) } return &dnsContext{ @@ -585,7 +585,7 @@ func getSrvRecords(serviceName string, networkName, zoneID string) (service srvS var port64 uint64 port64, err = strconv.ParseUint(portString, 10, 16) if err != nil { - panic(makeExitError(1, fmt.Sprintf("Invalid SRV Port for %s: %s", target, portString))) + panic(makeExitError(1, "Invalid SRV Port for %s: %s", target, portString)) } port := uint16(port64) 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/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/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 From 4620d9a45f16bd17c0d0ab1cd987b7c10369ecff Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:17:43 -0400 Subject: [PATCH 05/17] use transparent aliases flag --- daemon/kmd/api/api.go | 2 +- scripts/buildtools/versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/scripts/buildtools/versions b/scripts/buildtools/versions index fc52b5a459..e6efc312d2 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/algorand/go-swagger 60deb7a1e0d7fff30334471d6739abb0485915ba +github.com/algorand/go-swagger v0.0.0-20251017160634-60deb7a1e0d7 gotest.tools/gotestsum v1.13.0 github.com/golangci/golangci-lint/cmd/golangci-lint v1.62.0 From d405a5570a5b834ea531ecf967c5dca27e43d326 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 20:39:47 -0400 Subject: [PATCH 06/17] use installable version of algorand/go-swagger --- scripts/buildtools/versions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/buildtools/versions b/scripts/buildtools/versions index e6efc312d2..9ae1a584a1 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/algorand/go-swagger v0.0.0-20251017160634-60deb7a1e0d7 +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.62.0 From 990c7f374cf8959386eb8492a8d422801bc253e3 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 20:42:09 -0400 Subject: [PATCH 07/17] use algorand/msgp#34 to fix go vet errors --- agreement/msgp_gen.go | 39 -------------------- cmd/catchupsrv/tarblocks.go | 2 - crypto/msgp_gen.go | 20 ---------- data/basics/msgp_gen.go | 2 - data/bookkeeping/msgp_gen.go | 15 -------- data/hashable/msgp_gen.go | 1 - ledger/encoded/msgp_gen.go | 12 ------ ledger/msgp_gen.go | 3 -- ledger/store/trackerdb/generickv/msgp_gen.go | 1 - ledger/store/trackerdb/msgp_gen.go | 18 --------- network/msgp_gen.go | 8 ---- protocol/msgp_gen.go | 4 -- scripts/buildtools/versions | 2 +- 13 files changed, 1 insertion(+), 126 deletions(-) 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/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/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/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/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/versions b/scripts/buildtools/versions index 9ae1a584a1..18a2a9361f 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/algorand/msgp v1.1.61-0.20251017163737-aacd6d86ae75 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.62.0 From 36b84fd6b31e0329c96a080effc0e35ae24f3b56 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 20:58:14 -0400 Subject: [PATCH 08/17] upgrade algorand/go-deadlock for go1.25 --- go.mod | 4 ++-- go.sum | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 621e596904..49c72b79ff 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( 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-0.20251018005725-1c3851e077df github.com/algorand/go-sumhash v0.1.0 github.com/algorand/graphtrace v0.1.0 github.com/algorand/msgp v1.1.60 @@ -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..b30e87087e 100644 --- a/go.sum +++ b/go.sum @@ -28,6 +28,8 @@ github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbn 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-0.20251018005725-1c3851e077df h1:krhXNOWSAEK5r/OZOMS7WqdoHIFbx6rz3AsolDVEUSU= +github.com/algorand/go-deadlock v0.2.5-0.20251018005725-1c3851e077df/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= @@ -508,6 +510,8 @@ github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX 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= From 59663c92904aab10bce1bdfaf7dfc63ad6cc93e1 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 21:03:10 -0400 Subject: [PATCH 09/17] tidy --- go.sum | 4 ---- tools/block-generator/go.mod | 4 ++-- tools/block-generator/go.sum | 8 ++++---- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/go.sum b/go.sum index b30e87087e..06e1b89f99 100644 --- a/go.sum +++ b/go.sum @@ -26,8 +26,6 @@ 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-0.20251018005725-1c3851e077df h1:krhXNOWSAEK5r/OZOMS7WqdoHIFbx6rz3AsolDVEUSU= github.com/algorand/go-deadlock v0.2.5-0.20251018005725-1c3851e077df/go.mod h1:z0g1kdYBhezsHoEKqYf5dVnP9dGMwOOqqxUSTCk2Oks= github.com/algorand/go-sumhash v0.1.0 h1:b/QRhyLuF//vOcicBIxBXYW8bERNoeLxieht/dUYpVg= @@ -508,8 +506,6 @@ 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= diff --git a/tools/block-generator/go.mod b/tools/block-generator/go.mod index ee8baf7d02..22d1ac8948 100644 --- a/tools/block-generator/go.mod +++ b/tools/block-generator/go.mod @@ -10,7 +10,7 @@ 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-0.20251018005725-1c3851e077df github.com/lib/pq v1.10.9 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.10.0 @@ -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..cd3f2ee820 100644 --- a/tools/block-generator/go.sum +++ b/tools/block-generator/go.sum @@ -25,8 +25,8 @@ 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-0.20251018005725-1c3851e077df h1:krhXNOWSAEK5r/OZOMS7WqdoHIFbx6rz3AsolDVEUSU= +github.com/algorand/go-deadlock v0.2.5-0.20251018005725-1c3851e077df/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= @@ -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= From 265d439307945f65c7ffe38543983400418a91f6 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 21:06:17 -0400 Subject: [PATCH 10/17] try using max golangci-lint v1 version --- .github/workflows/reviewdog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index 81f5564487..e4fcd2a87c 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: @@ -24,7 +24,7 @@ jobs: - 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 + uses: reviewdog/action-golangci-lint@v2.7.2 with: go_version_file: go.mod golangci_lint_version: ${{ env.GOLANGCI_LINT_VERSION }} From 408237bab06ff362469b92266ff7b3a416120395 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 21:24:09 -0400 Subject: [PATCH 11/17] update partitiontest_linter packages --- cmd/partitiontest_linter/go.mod | 8 ++++---- cmd/partitiontest_linter/go.sum | 12 ++++++------ scripts/buildtools/versions | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cmd/partitiontest_linter/go.mod b/cmd/partitiontest_linter/go.mod index f82a33bfb0..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.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/scripts/buildtools/versions b/scripts/buildtools/versions index 18a2a9361f..936129e428 100644 --- a/scripts/buildtools/versions +++ b/scripts/buildtools/versions @@ -3,4 +3,4 @@ golang.org/x/tools v0.27.0 github.com/algorand/msgp v1.1.61-0.20251017163737-aacd6d86ae75 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.62.0 +github.com/golangci/golangci-lint/cmd/golangci-lint v1.64.8 From 0f530bf44f36c45e973271abdf94b373bc906f7d Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Fri, 17 Oct 2025 22:26:44 -0400 Subject: [PATCH 12/17] build golangci-lint from source --- .github/workflows/reviewdog.yml | 57 ++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/.github/workflows/reviewdog.yml b/.github/workflows/reviewdog.yml index e4fcd2a87c..5294531394 100644 --- a/.github/workflows/reviewdog.yml +++ b/.github/workflows/reviewdog.yml @@ -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.2 + - 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 From 399cefb0085be6b6ce838a190ec55850c6fd9a70 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Mon, 20 Oct 2025 12:23:28 -0400 Subject: [PATCH 13/17] bump deadlock and msgp to merged version releases --- go.mod | 7 +++++-- go.sum | 10 ++++++++++ scripts/buildtools/versions | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 49c72b79ff..1613c1f60d 100644 --- a/go.mod +++ b/go.mod @@ -9,10 +9,10 @@ require ( 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.5-0.20251018005725-1c3851e077df + 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 @@ -79,6 +79,7 @@ require ( github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/daixiang0/gci v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -101,6 +102,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/ipfs/boxo v0.24.3 // indirect @@ -187,6 +189,7 @@ require ( github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect + github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 // indirect github.com/ugorji/go/codec v1.2.14 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect diff --git a/go.sum b/go.sum index 06e1b89f99..dd88ff828b 100644 --- a/go.sum +++ b/go.sum @@ -28,12 +28,16 @@ github.com/algorand/go-codec/codec v1.1.10 h1:zmWYU1cp64jQVTOG8Tw8wa+k0VfwgXIPbn github.com/algorand/go-codec/codec v1.1.10/go.mod h1:YkEx5nmr/zuCeaDYOIhlDg92Lxju8tj2d2NrYqP7g7k= github.com/algorand/go-deadlock v0.2.5-0.20251018005725-1c3851e077df h1:krhXNOWSAEK5r/OZOMS7WqdoHIFbx6rz3AsolDVEUSU= github.com/algorand/go-deadlock v0.2.5-0.20251018005725-1c3851e077df/go.mod h1:z0g1kdYBhezsHoEKqYf5dVnP9dGMwOOqqxUSTCk2Oks= +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= @@ -104,6 +108,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/daixiang0/gci v0.3.2 h1:MDBsgEJGSJ++/N6Je/b2yK5x5WqmKYlzmILLVP41nl8= +github.com/daixiang0/gci v0.3.2/go.mod h1:jaASoJmv/ykO9dAAPy31iJnreV19248qKDdVWf3QgC4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -263,6 +269,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyf github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= @@ -660,6 +668,8 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8 github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 h1:OXcKh35JaYsGMRzpvFkLv/MEyPuL49CThT1pZ8aSml4= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.14 h1:yOQvXCBc3Ij46LRkRoh4Yd5qK6LVOgi0bYOXfb7ifjw= diff --git a/scripts/buildtools/versions b/scripts/buildtools/versions index 936129e428..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.61-0.20251017163737-aacd6d86ae75 +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 From 460d2a8f51291849d5233c9658bd161057f21359 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Mon, 20 Oct 2025 13:22:50 -0400 Subject: [PATCH 14/17] run make tidy --- go.mod | 3 --- go.sum | 10 ---------- tools/block-generator/go.mod | 4 ++-- tools/block-generator/go.sum | 8 ++++---- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index 1613c1f60d..20cb7d57ff 100644 --- a/go.mod +++ b/go.mod @@ -79,7 +79,6 @@ require ( github.com/containerd/cgroups v1.1.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect - github.com/daixiang0/gci v0.3.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/docker/go-units v0.5.0 // indirect @@ -102,7 +101,6 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - github.com/hexops/gotextdiff v1.0.3 // indirect github.com/huin/goupnp v1.3.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/ipfs/boxo v0.24.3 // indirect @@ -189,7 +187,6 @@ require ( github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect - github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 // indirect github.com/ugorji/go/codec v1.2.14 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect diff --git a/go.sum b/go.sum index dd88ff828b..243179e86c 100644 --- a/go.sum +++ b/go.sum @@ -26,16 +26,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.5-0.20251018005725-1c3851e077df h1:krhXNOWSAEK5r/OZOMS7WqdoHIFbx6rz3AsolDVEUSU= -github.com/algorand/go-deadlock v0.2.5-0.20251018005725-1c3851e077df/go.mod h1:z0g1kdYBhezsHoEKqYf5dVnP9dGMwOOqqxUSTCk2Oks= 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= @@ -108,8 +104,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/daixiang0/gci v0.3.2 h1:MDBsgEJGSJ++/N6Je/b2yK5x5WqmKYlzmILLVP41nl8= -github.com/daixiang0/gci v0.3.2/go.mod h1:jaASoJmv/ykO9dAAPy31iJnreV19248qKDdVWf3QgC4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -269,8 +263,6 @@ github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyf github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= -github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= -github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= @@ -668,8 +660,6 @@ github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8 github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 h1:OXcKh35JaYsGMRzpvFkLv/MEyPuL49CThT1pZ8aSml4= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.14 h1:yOQvXCBc3Ij46LRkRoh4Yd5qK6LVOgi0bYOXfb7ifjw= diff --git a/tools/block-generator/go.mod b/tools/block-generator/go.mod index 22d1ac8948..8b95c0bc5f 100644 --- a/tools/block-generator/go.mod +++ b/tools/block-generator/go.mod @@ -10,7 +10,7 @@ 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.5-0.20251018005725-1c3851e077df + 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 diff --git a/tools/block-generator/go.sum b/tools/block-generator/go.sum index cd3f2ee820..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.5-0.20251018005725-1c3851e077df h1:krhXNOWSAEK5r/OZOMS7WqdoHIFbx6rz3AsolDVEUSU= -github.com/algorand/go-deadlock v0.2.5-0.20251018005725-1c3851e077df/go.mod h1:z0g1kdYBhezsHoEKqYf5dVnP9dGMwOOqqxUSTCk2Oks= +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= From 9f9a5ebef6b83d49d4eebc12806bbb37f67e3d74 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Mon, 20 Oct 2025 13:56:05 -0400 Subject: [PATCH 15/17] use upstream go-swagger after merge --- scripts/buildtools/install_buildtools.sh | 2 +- scripts/buildtools/versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/buildtools/install_buildtools.sh b/scripts/buildtools/install_buildtools.sh index a06f5b6bbb..75e74fd8f8 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/algorand/go-swagger github.com/algorand/go-swagger/cmd/swagger +install_go_module github.com/go-swagger/go-swagger github.com/go-swagger/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 4185f1953c..cb311f7a6d 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.61 -github.com/algorand/go-swagger v0.0.0-20251018003531-2ea7c750dcac +github.com/go-swagger/go-swagger v0.33.2-0.20251020174612-044e4c32cd7f gotest.tools/gotestsum v1.13.0 github.com/golangci/golangci-lint/cmd/golangci-lint v1.64.8 From bcb5fedbcb1268a9705f426386088a54eac360f9 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Mon, 20 Oct 2025 15:14:13 -0400 Subject: [PATCH 16/17] change makeExitError --- cmd/algorelay/commands.go | 4 ++-- cmd/algorelay/relayCmd.go | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) 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/algorelay/relayCmd.go b/cmd/algorelay/relayCmd.go index e43a145df4..b6ee24ed04 100644 --- a/cmd/algorelay/relayCmd.go +++ b/cmd/algorelay/relayCmd.go @@ -95,7 +95,7 @@ func loadRelays(file string) []eb.Relay { err := codecs.LoadObjectFromFile(file, &relays) if err != nil { err = fmt.Errorf("Unable to load relays file - %v", err) - panic(makeExitError(1, "%s", err.Error())) + panic(makeExitError(1, err.Error())) } return relays } @@ -126,27 +126,27 @@ func makeDNSContext() *dnsContext { nameZoneID, err := cloudflareCred.GetZoneID(context.Background(), nameDomainArg) if err != nil { - panic(makeExitError(1, "%s", err.Error())) + panic(makeExitError(1, err.Error())) } nameEntries, err := getReverseMappedEntries(nameZoneID, nameRecordTypes) if err != nil { - panic(makeExitError(1, "%s", err.Error())) + panic(makeExitError(1, err.Error())) } srvZoneID, err := cloudflareCred.GetZoneID(context.Background(), srvDomainArg) if err != nil { - panic(makeExitError(1, "%s", err.Error())) + panic(makeExitError(1, err.Error())) } bootstrap, err := getSrvRecords("_algobootstrap", dnsBootstrapArg+"."+srvDomainArg, srvZoneID) if err != nil { - panic(makeExitError(1, "%s", err.Error())) + panic(makeExitError(1, err.Error())) } metrics, err := getSrvRecords("_metrics", srvDomainArg, srvZoneID) if err != nil { - panic(makeExitError(1, "%s", err.Error())) + panic(makeExitError(1, err.Error())) } return &dnsContext{ @@ -585,7 +585,7 @@ func getSrvRecords(serviceName string, networkName, zoneID string) (service srvS var port64 uint64 port64, err = strconv.ParseUint(portString, 10, 16) if err != nil { - panic(makeExitError(1, "Invalid SRV Port for %s: %s", target, portString)) + panic(makeExitError(1, fmt.Sprintf("Invalid SRV Port for %s: %s", target, portString))) } port := uint16(port64) From f604571ebb4b3b84123741596579aba630a4c0a8 Mon Sep 17 00:00:00 2001 From: cce <51567+cce@users.noreply.github.com> Date: Tue, 21 Oct 2025 14:30:53 -0400 Subject: [PATCH 17/17] Revert "use upstream go-swagger after merge" This reverts commit 9f9a5ebef6b83d49d4eebc12806bbb37f67e3d74. --- scripts/buildtools/install_buildtools.sh | 2 +- scripts/buildtools/versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 cb311f7a6d..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.61 -github.com/go-swagger/go-swagger v0.33.2-0.20251020174612-044e4c32cd7f +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