Skip to content

Commit 9b0fe61

Browse files
authored
Merge pull request #6537 from onetechnical/relbeta4.5.0
2 parents b7863ee + 7ce535b commit 9b0fe61

File tree

1,399 files changed

+11379
-12416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,399 files changed

+11379
-12416
lines changed

.custom-gcl.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ plugins:
88
- module: fillmore-labs.com/errortype
99
import: fillmore-labs.com/errortype/gclplugin
1010
version: v0.0.7
11+
- module: github.com/cce/docnametypo
12+
import: github.com/cce/docnametypo/gclplugin
13+
version: v0.2.0

.github/actions/setup-test/action.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,3 @@ runs:
2828
sudo dpkg-reconfigure -f noninteractive man-db
2929
sudo apt-get install -y --no-upgrade expect
3030
shell: bash
31-
- name: Cache gotestsum
32-
id: cache-gotestsum
33-
uses: actions/cache@v4
34-
with:
35-
path: ~/go/bin/gotestsum
36-
key: gotestsum-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/buildtools/versions') }}
37-
- name: Install gotestsum
38-
if: steps.cache-gotestsum.outputs.cache-hit != 'true'
39-
run: ./scripts/buildtools/install_buildtools.sh -o "gotest.tools/gotestsum"
40-
shell: bash

.github/workflows/ci-nightly.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,10 @@ jobs:
102102
- name: Run tests
103103
run: |
104104
./scripts/configure_dev.sh
105-
./scripts/buildtools/install_buildtools.sh -o "gotest.tools/gotestsum"
106105
PACKAGES="$(go list ./... | grep -v /go-algorand/test/)"
107106
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n')
108107
mkdir -p test_results/${{ matrix.platform }}_test_nightly/${PARTITION_ID}
109-
gotestsum --format standard-quiet \
108+
go tool -modfile=tool.mod gotestsum --format standard-quiet \
110109
--junitfile ~/test_results/${{ matrix.platform }}_test_nightly/${PARTITION_ID}/results.xml \
111110
--jsonfile ~/test_results/${{ matrix.platform }}_test_nightly/${PARTITION_ID}/testresults.json \
112111
-- --tags "sqlite_unlock_notify sqlite_omit_load_extension" \
@@ -184,7 +183,6 @@ jobs:
184183
- name: Run integration tests
185184
run: |
186185
./scripts/configure_dev.sh
187-
./scripts/buildtools/install_buildtools.sh -o "gotest.tools/gotestsum"
188186
mkdir -p ~/test_results/${{ matrix.platform }}_integration_nightly/${PARTITION_ID}
189187
TEST_RESULTS=~/test_results/${{ matrix.platform }}_integration_nightly/${PARTITION_ID} \
190188
test/scripts/run_integration_tests.sh
@@ -241,7 +239,6 @@ jobs:
241239
- name: Run E2E expect tests
242240
run: |
243241
scripts/configure_dev.sh
244-
scripts/buildtools/install_buildtools.sh -o "gotest.tools/gotestsum"
245242
mkdir -p ~/test_results/${{ matrix.platform }}_e2e_expect_nightly/${PARTITION_ID}
246243
TEST_RESULTS=~/test_results/${{ matrix.platform }}_e2e_expect_nightly/${PARTITION_ID} \
247244
test/scripts/run_integration_tests.sh
@@ -308,7 +305,6 @@ jobs:
308305
- name: Run E2E subs tests
309306
run: |
310307
scripts/configure_dev.sh
311-
scripts/buildtools/install_buildtools.sh -o "gotest.tools/gotestsum"
312308
mkdir -p ~/test_results/${{ matrix.platform }}_e2e_subs_nightly
313309
TEST_RESULTS=~/test_results/${{ matrix.platform }}_e2e_subs_nightly \
314310
test/scripts/run_integration_tests.sh

.github/workflows/ci-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
PACKAGES="$(go list ./... | grep -v /go-algorand/test/)"
5252
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n')
5353
mkdir -p test_results/${{ matrix.platform }}_test/${PARTITION_ID}
54-
gotestsum --format standard-quiet \
54+
go tool -modfile=tool.mod gotestsum --format standard-quiet \
5555
--junitfile ~/test_results/${{ matrix.platform }}_test/${PARTITION_ID}/results.xml \
5656
--jsonfile ~/test_results/${{ matrix.platform }}_test/${PARTITION_ID}/testresults.json \
5757
-- --tags "sqlite_unlock_notify sqlite_omit_load_extension" $SHORTTEST \

.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "ReviewDog workflow"
22
env:
3-
GOLANGCI_LINT_VERSION: "v2.6.0"
3+
GOLANGCI_LINT_VERSION: "v2.7.1"
44
on:
55
push:
66
branches:

.golangci-warnings.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,23 @@ run:
44
linters:
55
default: none
66
enable:
7+
- docnametypo
8+
- errortype
79
- gosec
810
- partitiontest
9-
- errortype
1011
settings:
1112
gosec:
1213
excludes: [G101, G103, G104, G107, G112, G114, G115, G202, G204, G301, G302, G303, G304, G306, G307, G404]
1314
custom:
14-
partitiontest:
15-
type: "module"
16-
description: This custom linter ensures test functions call 'partitiontest.PartitionTest(t)'
15+
docnametypo:
16+
type: module
17+
description: "docnametypo catches doc comments with mismatched function names"
18+
original-url: "https://github.com/cce/docnametypo"
19+
settings:
20+
include-exported: true
21+
include-types: true
22+
include-generated: false
23+
allowed-prefixes: asm,op
1724
errortype:
1825
type: module
1926
description: "errortype helps prevent subtle bugs in error handling."
@@ -24,6 +31,9 @@ linters:
2431
check-is: true
2532
unchecked-assert: false
2633
check-unused: true
34+
partitiontest:
35+
type: "module"
36+
description: This custom linter ensures test functions call 'partitiontest.PartitionTest(t)'
2737
exclusions:
2838
generated: lax
2939
rules:

.golangci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ linters:
126126
path: _test\.go
127127
text: 'dot-imports: should not use dot imports' # dot imports OK for tests
128128
- linters: revive
129-
path: util/
130129
text: 'var-naming: avoid meaningless package names' # util package is OK
130+
- linters: revive
131+
text: 'var-naming: avoid package names that conflict with Go standard library package names' # e.g. crypto package
131132
- linters: unused
132133
text: 'field _struct is unused' # we use _struct field tags for msgp/json encoding settings
133134
- linters: revive

AGENTS.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ To verify that this wasn't missed, we run verification steps, which can be found
5050
### Development Setup
5151
```bash
5252
./scripts/configure_dev.sh # Initial environment setup
53-
./scripts/buildtools/install_buildtools.sh # Install build tools
54-
make deps # Check/install dependencies
5553
```
5654

5755
### Single Test Execution

Makefile

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,7 @@ GOTAGSLIST := sqlite_unlock_notify sqlite_omit_load_extension
4343
# e.g. make GOTAGSCUSTOM=msgtrace
4444
GOTAGSLIST += ${GOTAGSCUSTOM}
4545

46-
# If available, use gotestsum instead of 'go test'.
47-
ifeq (, $(shell which gotestsum))
48-
export GOTESTCOMMAND=go test
49-
else
50-
export GOTESTCOMMAND=gotestsum --format pkgname --jsonfile testresults.json --
51-
endif
46+
GOTESTCOMMAND := go tool -modfile=tool.mod gotestsum --format pkgname --jsonfile testresults.json --
5247

5348
ifeq ($(OS_TYPE), darwin)
5449
# M1 Mac--homebrew install location in /opt/homebrew
@@ -107,10 +102,13 @@ fix: build
107102
$(GOBIN)/algofix */
108103

109104
modernize:
110-
GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./...
105+
GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@v0.39.0 -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./...
106+
107+
lint:
108+
go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.1 run -c .golangci.yml
111109

112-
lint: deps
113-
$(GOBIN)/golangci-lint run -c .golangci.yml
110+
warninglint: custom-golangci-lint
111+
./custom-golangci-lint run -c .golangci-warnings.yml
114112

115113
expectlint:
116114
cd test/e2e-go/cli/goal/expect && python3 expect_linter.py *.exp
@@ -140,7 +138,7 @@ cover:
140138
prof:
141139
cd node && go test $(GOTAGS) -cpuprofile=cpu.out -memprofile=mem.out -mutexprofile=mutex.out
142140

143-
generate: deps
141+
generate:
144142
PATH=$(GOBIN):$$PATH go generate ./...
145143

146144
msgp: $(patsubst %,%/msgp_gen.go,$(MSGP_GENERATE))
@@ -151,13 +149,13 @@ api:
151149
logic:
152150
make -C data/transactions/logic
153151

154-
155-
%/msgp_gen.go: deps ALWAYS
152+
MSGP := go run github.com/algorand/msgp@v1.1.62
153+
%/msgp_gen.go: ALWAYS
156154
@set +e; \
157-
printf "msgp: $(@D)..."; \
158-
$(GOBIN)/msgp -file ./$(@D) -o $@ -warnmask github.com/algorand/go-algorand > ./$@.out 2>&1; \
155+
printf "$(MSGP) $(@D)..."; \
156+
$(MSGP) -file ./$(@D) -o $@ -warnmask github.com/algorand/go-algorand > ./$@.out 2>&1; \
159157
if [ "$$?" != "0" ]; then \
160-
printf "failed:\n$(GOBIN)/msgp -file ./$(@D) -o $@ -warnmask github.com/algorand/go-algorand\n"; \
158+
printf "failed:\n$(MSGP) -file ./$(@D) -o $@ -warnmask github.com/algorand/go-algorand\n"; \
161159
cat ./$@.out; \
162160
rm ./$@.out; \
163161
exit 1; \
@@ -231,9 +229,6 @@ else
231229
echo "OS_TYPE must be darwin for universal builds, skipping"
232230
endif
233231

234-
deps:
235-
./scripts/check_deps.sh
236-
237232
# artifacts
238233

239234
# Regenerate kmd swagger spec files
@@ -260,15 +255,15 @@ $(KMD_API_SWAGGER_SPEC): $(KMD_API_FILES) crypto/libs/$(OS_TYPE)/$(ARCH)/lib/lib
260255
touch $@; \
261256
fi
262257

263-
$(KMD_API_SWAGGER_INJECT): deps $(KMD_API_SWAGGER_SPEC) $(KMD_API_SWAGGER_SPEC).validated
258+
$(KMD_API_SWAGGER_INJECT): $(KMD_API_SWAGGER_SPEC) $(KMD_API_SWAGGER_SPEC).validated
264259
./daemon/kmd/lib/kmdapi/bundle_swagger_json.sh
265260

266261
# generated files we should make sure we clean
267262
GENERATED_FILES := \
268263
$(KMD_API_SWAGGER_INJECT) \
269264
$(KMD_API_SWAGGER_SPEC) $(KMD_API_SWAGGER_SPEC).validated
270265

271-
rebuild_kmd_swagger: deps
266+
rebuild_kmd_swagger:
272267
rm -f $(GENERATED_FILES)
273268
# we need to invoke the make here since we want to ensure that the deletion and re-creating are sequential
274269
make $(KMD_API_SWAGGER_INJECT)
@@ -306,7 +301,7 @@ build-e2e: check-go-version crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a
306301
wait
307302
cp $(GOBIN)/kmd $(GOBIN)-race
308303

309-
NONGO_BIN_FILES=$(GOBIN)/find-nodes.sh $(GOBIN)/update.sh $(GOBIN)/COPYING $(GOBIN)/ddconfig.sh
304+
NONGO_BIN_FILES=$(GOBIN)/find-nodes.sh $(GOBIN)/update.sh $(GOBIN)/COPYING
310305

311306
NONGO_BIN: $(NONGO_BIN_FILES)
312307

@@ -316,8 +311,6 @@ $(GOBIN)/update.sh: cmd/updater/update.sh
316311

317312
$(GOBIN)/COPYING: COPYING
318313

319-
$(GOBIN)/ddconfig.sh: scripts/ddconfig.sh
320-
321314
$(GOBIN)/%:
322315
cp -f $< $@
323316

@@ -415,14 +408,13 @@ dump: $(addprefix gen/,$(addsuffix /genesis.dump, $(NETWORKS)))
415408
install: build
416409
scripts/dev_install.sh -p $(GOBIN)
417410

418-
.PHONY: default fmt lint check_shell sanity cover prof deps build build-race build-e2e test fulltest shorttest clean cleango deploy node_exporter install %gen gen NONGO_BIN check-go-version rebuild_kmd_swagger universal libsodium modernize
411+
.PHONY: default fmt lint check_shell sanity cover prof build build-race build-e2e test fulltest shorttest clean cleango deploy node_exporter install %gen gen NONGO_BIN check-go-version rebuild_kmd_swagger universal libsodium modernize
419412

420413
###### TARGETS FOR CICD PROCESS ######
421414
include ./scripts/release/mule/Makefile.mule
422415

423416
archive:
424417
aws s3 cp tmp/node_pkgs s3://algorand-internal/channel/$(CHANNEL)/$(FULLBUILDNUMBER) --recursive --exclude "*" --include "*$(FULLBUILDNUMBER)*"
425418

426-
build_custom_linters:
419+
custom-golangci-lint: .custom-gcl.yml
427420
golangci-lint custom -v
428-
./custom-golangci-lint --version

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ We currently strive to support Debian-based distributions, with Ubuntu 24.04 as
3131
git clone https://github.com/algorand/go-algorand
3232
cd go-algorand
3333
./scripts/configure_dev.sh
34-
./scripts/buildtools/install_buildtools.sh
3534
```
3635

3736
At this point, you are ready to build go-algorand. We use `make` and have several targets to automate common tasks.
@@ -136,7 +135,6 @@ Contains the two daemons that provide Algorand clients with services:
136135
Enables developers to interface with the Algorand system:
137136

138137
- **cmd**: Contains the primary commands defining entry points into the system.
139-
- **cmd/catchupsrv** ([README](cmd/catchupsrv/README.md)): A tool to assist with processing historic blocks on a new node.
140138
- **libgoal**: Exports a Go interface useful for developers of Algorand clients.
141139
- **tools** ([README](tools/README.md)): Various tools and utilities that don’t have a better place to go.
142140
- **tools/debug**: Holds secondary commands that assist developers during debugging.
@@ -148,8 +146,6 @@ Helps Algorand developers deploy networks of their own:
148146

149147
- **nodecontrol**
150148
- **docker**
151-
- **commandandcontrol** ([README](test/commandandcontrol/README.md)): A tool to automate a network of `algod` instances.
152-
- **components**
153149
- **netdeploy**
154150

155151
### Utilities
@@ -169,5 +165,5 @@ Provides utilities for the various components:
169165

170166
Please see the [COPYING_FAQ](COPYING_FAQ) for details on how to apply our license.
171167

172-
Copyright (C) 2019-2025, Algorand Inc.
168+
Copyright (C) 2019-2026, Algorand Inc.
173169

0 commit comments

Comments
 (0)