Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

go-algorand 3.10.0-stable Release PR #4618

Merged
merged 106 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
701d431
test: wait until new block is committed to `BlockQueue` (#4381)
ahangsu Aug 10, 2022
e3ffb42
download StateProofVotersLookback more amount of blocks if needed (#…
id-ms Aug 11, 2022
22a4790
AVM: Add Semicolon Parsing (#4363)
iten-alg Aug 11, 2022
e790643
tests: add debug output to e2e_basic_start_stop (#4396)
algorandskiy Aug 11, 2022
8d9e868
tests: fix TestBasicCatchpointCatchup (#4390)
algorandskiy Aug 11, 2022
16e4165
Build: Remove mac_amd64 from our default triggered builds. (#4397)
gmalouf Aug 11, 2022
7c70e38
Four missing partiontest calls (#4394)
jannotti Aug 11, 2022
5a852ba
tests: add logging to libgoal fixture on failure (#4384)
Aug 12, 2022
3e048ee
changed state proof message to no longer be embedded (#4395)
almog-t Aug 12, 2022
bc957ab
tests: stabilize TestAssetCreateWaitRestartDelete (#4400)
algorandskiy Aug 12, 2022
07341cd
tests: make SP e2e tests easier for arm (#4402)
algonautshant Aug 12, 2022
ee302b0
tests: improve logging in expect tests (#4405)
algorandskiy Aug 12, 2022
6d858e6
Acquire locks when logging start and stop. (#4408)
jannotti Aug 15, 2022
d530f3e
tests: remove TestAsyncRecord as obsolete (#4407)
Aug 15, 2022
fd488f8
Fix variable application in verifyAssetParameters (#4410)
michaeldiamant Aug 15, 2022
f156f69
AVM: Use avm-abi repo (#4375)
jasonpaulos Aug 16, 2022
1959dae
CI: use GHA for codegen_verification (#4412)
cce Aug 16, 2022
c5aa929
Remove unused/empty algod API spec (#4420)
Eric-Warehime Aug 17, 2022
c1b6a03
CI: Ensure algod_expect_test.go tests run by avoiding double partiti…
michaeldiamant Aug 17, 2022
e53605d
CI: Expose configuration to ignore parent E2E expect test runner inv…
michaeldiamant Aug 17, 2022
a29e35a
Catchup: NetworkFetcher service to export fetchBlock (#4388)
algoganesh Aug 18, 2022
974108f
lint: fix linter errors and update CI to require passing (#4241)
cce Aug 18, 2022
bf7aaec
ledger: do not shadow db error in account lookup (#4425)
algorandskiy Aug 19, 2022
7d50e19
tests: stop network before reading logs (#4429)
algorandskiy Aug 19, 2022
2848e37
codec: new TxHandler byte decoder (#4266)
algorandskiy Aug 19, 2022
0b9580b
Quality: Switch from golint to golangci-lint. (#4418)
winder Aug 19, 2022
feab018
CI: Speed up CircleCI by folding build workflow downstream (#4426)
michaeldiamant Aug 19, 2022
9c6753e
lint: Update linter version (#4434)
cce Aug 19, 2022
7932403
ioutil is deprecated, I have the power of search and replace (#4440)
jannotti Aug 20, 2022
533115e
tests: add timestamps to some expect common operations (#4437)
algorandskiy Aug 22, 2022
e4d6d42
tests: improve voterTracker tests (#4441)
id-ms Aug 22, 2022
1196dd0
CICD: Macos11 support (#4399)
algojack Aug 23, 2022
924d2fb
tests: fix logged panics in reproducible labels test (#4446)
algorandskiy Aug 23, 2022
ac48881
Get rid of references and uses of `go lint` and `go vet` (#4444)
jannotti Aug 23, 2022
63255e9
tests: deterministic rand seed for stable unit test (#4447)
brianolson Aug 23, 2022
b38f054
tests: fix top online warning in TestAcctUpdatesCachesInitialization …
algorandskiy Aug 23, 2022
af88edc
loadgenerator: correctly handle AccountMnemonicList (#4454)
cce Aug 23, 2022
1733671
tests: fix typo in evalbench_test.go (#4450)
eltociear Aug 23, 2022
b89953a
catchpoints: Optimize catchpoint (#4254)
Aug 23, 2022
87867c9
tests: TestSlowPeerDisconnect less flakey (#4453)
brianolson Aug 23, 2022
e6bd9a3
CI: make windows build faster (#4443)
cce Aug 24, 2022
0c09407
Initialize the accountUpdatesLedgerEvaluator properly (#4456)
jannotti Aug 24, 2022
3a2bcf4
Re-introduce build_nightly workflow to persist artifacts needed by up…
michaeldiamant Aug 24, 2022
d831769
state proofs: update state proof totals calculation (#4445)
cce Aug 24, 2022
dba1310
ledger: fix txtail restoring from catchpoints (#4460)
algorandskiy Aug 25, 2022
7de989a
build: add valid_nightly_branch var to upload_binaries step (#4459)
algojack Aug 25, 2022
e931e07
CI: Increase parallelism without changing resource_class for faster …
michaeldiamant Aug 25, 2022
5a81d99
alphanet: merge build changes and consensus params (#4431)
cce Aug 25, 2022
00a6150
ledger: extend catchpoint blocks lookback (#4463)
algorandskiy Aug 25, 2022
4be5892
tests: ledger reload accessing txtail history (#4473)
algorandskiy Aug 26, 2022
edce4c1
Tests: Convert goal app info expect test to e2e (#4449)
jasonpaulos Aug 26, 2022
675604a
tests: fix catchpoint large accounts test (#4480)
Aug 29, 2022
9e4e84c
tests: tag e2e test data with commit hash (#4481)
shiqizng Aug 29, 2022
63ddd47
tests: Fix restClientFixture test flaking (#4484)
Aug 29, 2022
4d862ab
test: script improvements for recent testing (#4474)
brianolson Aug 29, 2022
8257910
stateproof: always set StateProofNextRound in metric (#4475)
algonautshant Aug 29, 2022
e83acec
CICD: Fixing golangci-lint and github action (#4483)
algojack Aug 30, 2022
7f6dbc7
AVM: Handle Teal programs with manual constant blocks better (#4442)
jannotti Sep 1, 2022
831738a
e2e tests: remove unused e2e artifact (#4487)
shiqizng Sep 2, 2022
c47d718
update block not found response code to 404 (#4479)
shiqizng Sep 2, 2022
eeeb7c3
CI: optimize caches used by CircleCI and GHA (#4461)
cce Sep 2, 2022
00b37f2
tests: fix TestAttestorsChange (#4510)
id-ms Sep 6, 2022
ffa1e1c
fix merged conflicts
algobarb Sep 7, 2022
d05d527
Bump Version, Remove buildnumber.dat and genesistimestamp.dat files.
algobarb Sep 7, 2022
de3afbe
match TestAttestorsChange to master's more recent change
algobarb Sep 7, 2022
1791577
remove empty daemon/algod/api/algod2.oas2.json
algobarb Sep 7, 2022
aa1af18
Merge pull request #4514 from algobarb/relstable3.9.2-remerge
algojohnlee Sep 8, 2022
d3ccb11
updater: cleanup key.pub (#4513)
algolucky Sep 8, 2022
3c64c26
TagCounter gains a tag set to filter on (#4503)
brianolson Sep 8, 2022
dc2df6b
StateProofs: Add timeout to stateproof api (#4515)
algonathan Sep 8, 2022
b243e18
update node_exporter to include algorand/node_exporter#6 (#4518)
onetechnical Sep 8, 2022
16c4c93
tools: pingpong improvements (#4294)
brianolson Sep 9, 2022
cb4219d
set filtered TagCounters from init() (#4524)
cce Sep 9, 2022
22b6101
metrics: network tag filtering test (#4526)
algorandskiy Sep 9, 2022
794a63d
tests: fix network metrics race condition in tests (#4529)
algorandskiy Sep 12, 2022
6270253
Merge remote-tracking branch 'origin/rel/stable' into relstable3.9.4-…
algolucky Sep 12, 2022
c03e3d3
Bump py-algorand-sdk to v1.17.0 (#4530)
michaeldiamant Sep 13, 2022
cbdc68a
catchpoint: fix peer ranking (#4535)
algorandskiy Sep 14, 2022
d807fbb
performance: Update two transaction verification benchmarks (#4552)
cce Sep 14, 2022
7e8ca90
bench: transaction pool's uses of recomputeBlockEvaluator (#3138)
cce Sep 14, 2022
9a604f2
AVM: Switch opcode (#4458)
algoidurovic Sep 16, 2022
5aef24b
pingping: asset holding nil fix (#4558)
brianolson Sep 16, 2022
6fe59eb
typo: fix GetUnverifiedTransactionGroups (#4248)
algoganesh Sep 17, 2022
f48eb28
tests: fix method name after typo correction (#4561)
algorandskiy Sep 17, 2022
e79e29c
Merge pull request #4534 from algolucky/relstable3.9.4-remerge
algojohnlee Sep 19, 2022
0b1c9f3
Algod: fix nil deref while fetching stateproof secrets (#4554)
algonathan Sep 19, 2022
175d5aa
performance: block validation benchmark (#4522)
algonautshant Sep 19, 2022
4e4ee2c
telemetry: add StartupEventDetails.Overrides (#4563)
cce Sep 20, 2022
a3c1efe
Update the Version, BuildNumber, genesistimestamp.data
Algo-devops-service Sep 20, 2022
3e02f51
Merge pull request #4565 from Algo-devops-service/relbeta3.10.0
algojohnlee Sep 20, 2022
8cb8ec6
increase fetcherMaxBlockBytes to 10MB (#4569)
cce Sep 22, 2022
42b9533
Tools: netgoal - add `-X, --non-participating-nodes int` (#4574)
brianolson Sep 23, 2022
54393ba
tests: skip db concurrent Read/Write tests if test.short is set (#4533)
id-ms Sep 23, 2022
1d95756
tests: fix TestCatchpointReadDatabaseOverflowSingleAccount (#4579)
Sep 23, 2022
96a1e1b
Tests: betanet-2 extended recipe (#4572)
egieseke Sep 23, 2022
099392a
telemetry: add BlockAcceptedEventDetails.ReceivedAt to complement Val…
cce Sep 24, 2022
d3c10f4
REST API: Add GetBlockHash API to algod v2 (#4580)
winder Sep 26, 2022
e65262c
Devops: reorder circleci config (#4564)
algojack Sep 28, 2022
5be155b
AVM: frame pointers (#4319)
jannotti Sep 28, 2022
abe1377
ledger: fix accounts cache ordering (#4611)
algorandskiy Sep 30, 2022
3cae97c
testing: tool to dump blocks to directory (#4595)
cce Sep 30, 2022
d389196
BatchVerifier: rename and unexport local functions in verify/txn (#4578)
algonautshant Sep 30, 2022
82bf931
Merge branch 'master' into relbeta3.10.0
Algo-devops-service Sep 30, 2022
b4fecd5
telemetry: Count and report the number of duplicate proposals and Msg…
cce Sep 30, 2022
396cf6c
Merge branch 'master' into relbeta3.10.0
onetechnical Sep 30, 2022
2145c29
Merge pull request #4612 from Algo-devops-service/relbeta3.10.0
algojohnlee Sep 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
619 changes: 311 additions & 308 deletions .circleci/config.yml

Large diffs are not rendered by default.

21 changes: 15 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: "Build workflow"
name: "Build Windows"
on:
push:
branches:
- master
pull_request:
jobs:
build-test-windows:
build-windows:
runs-on: windows-2022
defaults:
run:
Expand All @@ -14,14 +17,20 @@ jobs:
update: true
path-type: inherit
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install golang
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: '1.17.9'
- name: Build Test
go-version: "1.17.13"
- name: Restore libsodium from cache
id: cache-libsodium
uses: actions/cache@v3
with:
path: crypto/libs
key: libsodium-fork-v2-${{ runner.os }}-${{ hashFiles('crypto/libsodium-fork/**') }}
- name: Build
run: |
export ALGORAND_DEADLOCK=enable
export SKIP_GO_INSTALLATION=True
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/codegen_verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "codegen verification"
on:
push:
branches:
- master
pull_request:
jobs:
codegen_verification:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
path: go-algorand
- name: Uninstall existing go installation
run: sudo apt-get -y -q purge golang-go
- name: Run codegen_verification.sh
run: |
export GOPATH="${GITHUB_WORKSPACE}/go"
cd go-algorand
scripts/travis/codegen_verification.sh
12 changes: 8 additions & 4 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: "ReviewDog workflow"
on:
push:
branches:
- master
pull_request:
jobs:
# Blocking Errors Section
Expand All @@ -18,12 +21,13 @@ jobs:
- name: reviewdog-golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
golangci_lint_version: "v1.41.1"
golangci_lint_version: "v1.47.3"
golangci_lint_flags: "-c .golangci.yml --allow-parallel-runners"
reporter: "github-pr-review"
reporter: "github-pr-check"
tool_name: "Lint Errors"
level: "error"
fail_on_error: true
filter_mode: "nofilter"
# Non-Blocking Warnings Section
reviewdog-warnings:
runs-on: ubuntu-latest
Expand All @@ -44,7 +48,7 @@ jobs:
- name: Install specific golang
uses: actions/setup-go@v2
with:
go-version: '1.17.9'
go-version: '1.17.13'
- name: Create folders for golangci-lint
run: mkdir -p cicdtmp/golangci-lint
- name: Check if custom golangci-lint is already built
Expand All @@ -59,7 +63,7 @@ jobs:
run: |
cd cicdtmp/golangci-lint
git clone https://github.com/golangci/golangci-lint.git .
git checkout tags/v1.41.1
git checkout tags/v1.47.3
CGO_ENABLED=true go build -trimpath -o golangci-lint-cgo ./cmd/golangci-lint
./golangci-lint-cgo --version
cd ../../
Expand Down
8 changes: 2 additions & 6 deletions .golangci-warnings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ run:
linters:
disable-all: true
enable:
- staticcheck
- deadcode
- partitiontest
- structcheck
- typecheck
- varcheck
- deadcode
- gosimple
- unused
- partitiontest


linters-settings:
Expand Down Expand Up @@ -41,8 +39,6 @@ issues:
exclude:
# ignore govet false positive fixed in https://github.com/golang/go/issues/45043
- "sigchanyzer: misuse of unbuffered os.Signal channel as argument to signal.Notify"
# ignore golint false positive fixed in https://github.com/golang/lint/pull/487
- "exported method (.*).Unwrap` should have comment or be unexported"
# ignore issues about the way we use _struct fields to define encoding settings
- "`_struct` is unused"

Expand Down
45 changes: 40 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
run:
timeout: 5m
tests: false
tests: true

linters:
# default: deadcode, errcheck, gosimple, govet, ineffassign, staticcheck, typecheck, unused, varcheck
disable-all: true
enable:
- errcheck
- gofmt
- golint
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
- revive
- staticcheck
- typecheck

severity:
default-severity: error

linters-settings:
nolintlint:
# require naming a specific linter X using //nolint:X
require-specific: true
# require comments like "//nolint:errcheck // Explanation of why we are ignoring linter here..."
require-explanation: true
errcheck:
exclude-functions:
# data/transactions/logic/assembler.go uses ops.error, warn, to append log messages: OK to ignore for this case
- (*github.com/algorand/go-algorand/data/transactions/logic.OpStream).errorf
- (*github.com/algorand/go-algorand/data/transactions/logic.OpStream).error
- (*github.com/algorand/go-algorand/data/transactions/logic.OpStream).warnf
- (*github.com/algorand/go-algorand/data/transactions/logic.OpStream).warn

issues:
# use these new lint checks on code since #2574
new-from-rev: eb019291beed556ec6ac1ceb4a15114ce4df0c57
# Work our way back over time to be clean against all these
# checkers. If you'd like to contribute, raise the number after ~,
# run the linter and dig in.
new-from-rev: eb019291beed556ec6ac1ceb4a15114ce4df0c57~25

# Disable default exclude rules listed in `golangci-lint run --help` (selectively re-enable some below)
exclude-use-default: false
Expand All @@ -41,14 +62,28 @@ issues:
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print(f|ln)?|os\.(Un)?Setenv). is not checked
# "EXC0005 staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore"
- ineffective break statement. Did you mean to break out of the outer loop
# revive: irrelevant error about naming
- "var-naming: don't use leading k in Go names"

exclude-rules:
- path: _test\.go
linters:
- errcheck
- gofmt
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
# - revive
- staticcheck
- typecheck
# Add all linters here -- Comment this block out for testing linters
- path: test/linttest/lintissues\.go
linters:
- errcheck
- gofmt
- golint
- revive
- govet
- ineffassign
- misspell
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Again, if you have a patch for a critical security vulnerability, please use our

For Go code we use the [Golang guidelines defined here](https://golang.org/doc/effective_go.html).
* Code must adhere to the official Go formatting guidelines (i.e. uses gofmt).
* We use **gofmt** and **golint**. Also make sure to run `make sanity` and `make generate` before opening a pull request.
* We use **gofmt** and **golangci-lint**. Also make sure to run `make sanity` and `make generate` before opening a pull request.
* Code must be documented adhering to the official Go commentary guidelines.

For JavaScript code we use the [MDN formatting rules](https://developer.mozilla.org/en-US/docs/MDN/Contribute/Guidelines/Code_guidelines/JavaScript).
Expand Down
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ else
export GOPATH := $(shell go env GOPATH)
GOPATH1 := $(firstword $(subst :, ,$(GOPATH)))
endif
export GOPROXY := direct
SRCPATH := $(shell pwd)
ARCH := $(shell ./scripts/archtype.sh)
OS_TYPE := $(shell ./scripts/ostype.sh)
Expand Down Expand Up @@ -100,15 +99,12 @@ fix: build
$(GOPATH1)/bin/algofix */

lint: deps
$(GOPATH1)/bin/golint ./...

vet:
go vet ./...
$(GOPATH1)/bin/golangci-lint run -c .golangci.yml

check_shell:
find . -type f -name "*.sh" -exec shellcheck {} +

sanity: vet fix lint fmt
sanity: fix lint fmt

cover:
go test $(GOTAGS) -coverprofile=cover.out $(UNIT_TEST_SOURCES)
Expand Down Expand Up @@ -331,7 +327,7 @@ dump: $(addprefix gen/,$(addsuffix /genesis.dump, $(NETWORKS)))
install: build
scripts/dev_install.sh -p $(GOPATH1)/bin

.PHONY: default fmt vet lint check_shell sanity cover prof deps build test fulltest shorttest clean cleango deploy node_exporter install %gen gen NONGO_BIN check-go-version rebuild_swagger
.PHONY: default fmt lint check_shell sanity cover prof deps build test fulltest shorttest clean cleango deploy node_exporter install %gen gen NONGO_BIN check-go-version rebuild_swagger

###### TARGETS FOR CICD PROCESS ######
include ./scripts/release/mule/Makefile.mule
Expand Down
2 changes: 2 additions & 0 deletions agreement/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ func (a ensureAction) do(ctx context.Context, s *Service) {
Hash: a.Certificate.Proposal.BlockDigest.String(),
Round: uint64(a.Certificate.Round),
ValidatedAt: a.Payload.validatedAt,
ReceivedAt: a.Payload.receivedAt,
PreValidated: true,
PropBufLen: uint64(len(s.demux.rawProposals)),
VoteBufLen: uint64(len(s.demux.rawVotes)),
Expand All @@ -250,6 +251,7 @@ func (a ensureAction) do(ctx context.Context, s *Service) {
Hash: a.Certificate.Proposal.BlockDigest.String(),
Round: uint64(a.Certificate.Round),
ValidatedAt: a.Payload.validatedAt,
ReceivedAt: a.Payload.receivedAt,
PreValidated: false,
PropBufLen: uint64(len(s.demux.rawProposals)),
VoteBufLen: uint64(len(s.demux.rawVotes)),
Expand Down
5 changes: 4 additions & 1 deletion agreement/demux.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,11 @@ func (d *demux) next(s *Service, deadline time.Duration, fastDeadline time.Durat
proto, err := d.ledger.ConsensusVersion(ParamsRound(e.ConsensusRound()))
e = e.AttachConsensusVersion(ConsensusVersionView{Err: makeSerErr(err), Version: proto})

if e.t() == payloadVerified {
switch e.t() {
case payloadVerified:
e = e.(messageEvent).AttachValidatedAt(s.Clock.Since())
case payloadPresent:
e = e.(messageEvent).AttachReceivedAt(s.Clock.Since())
}
}()

Expand Down
5 changes: 5 additions & 0 deletions agreement/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,3 +938,8 @@ func (e messageEvent) AttachValidatedAt(d time.Duration) messageEvent {
e.Input.Proposal.validatedAt = d
return e
}

func (e messageEvent) AttachReceivedAt(d time.Duration) messageEvent {
e.Input.Proposal.receivedAt = d
return e
}
3 changes: 1 addition & 2 deletions agreement/fuzzer/tests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"math"
"math/rand"
Expand Down Expand Up @@ -440,7 +439,7 @@ func TestFuzzer(t *testing.T) {
t.Run(testName, func(t *testing.T) {
partitiontest.PartitionTest(t) // Check if this expect test should by run, may SKIP
jsonFilename := jsonFiles[testName]
jsonBytes, err := ioutil.ReadFile(jsonFilename)
jsonBytes, err := os.ReadFile(jsonFilename)
require.NoError(t, err)
var fuzzerTest FuzzerTestFile
err = json.Unmarshal(jsonBytes, &fuzzerTest)
Expand Down
Loading