Skip to content

Commit 54c3c39

Browse files
authored
Merge pull request #3700 from Algo-devops-service/relstable3.4.2
go-algorand 3.4.2-stable
2 parents d2289a5 + b56953f commit 54c3c39

File tree

1,072 files changed

+90422
-63078
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,072 files changed

+90422
-63078
lines changed

.circleci/config.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ workflows:
166166
context:
167167
- slack-secrets
168168
- aws-secrets
169-
170169
#- windows_x64_build
171170

172171
commands:
@@ -322,8 +321,7 @@ commands:
322321
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n')
323322
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
324323
export PARTITION_ID=${CIRCLE_NODE_INDEX}
325-
export PARALLEL_FLAG="-p 1"
326-
gotestsum --format testname --junitfile << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/results.xml --jsonfile << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/testresults.json -- --tags "sqlite_unlock_notify sqlite_omit_load_extension" << parameters.short_test_flag >> -race -timeout 1h -coverprofile=coverage.txt -covermode=atomic -p 1 $PACKAGE_NAMES
324+
gotestsum --format standard-verbose --junitfile << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/results.xml --jsonfile << parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}/testresults.json -- --tags "sqlite_unlock_notify sqlite_omit_load_extension" << parameters.short_test_flag >> -race -timeout 1h -coverprofile=coverage.txt -covermode=atomic -p 1 $PACKAGE_NAMES
327325
- store_artifacts:
328326
path: << parameters.result_path >>
329327
destination: test-results
@@ -432,6 +430,7 @@ commands:
432430
export TEST_RESULTS=<< parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}
433431
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
434432
export PARTITION_ID=${CIRCLE_NODE_INDEX}
433+
export PARALLEL_FLAG="-p 1"
435434
test/scripts/run_integration_tests.sh
436435
- store_artifacts:
437436
path: << parameters.result_path >>
@@ -478,11 +477,14 @@ commands:
478477
- attach_workspace:
479478
at: << parameters.build_dir >>
480479
- run:
481-
name: Upload binaries << parameters.platform >>
480+
name: Upload Binaries << parameters.platform >>
482481
command: |
482+
if [ "${CIRCLE_BRANCH}" = "rel/nightly" ]
483+
then
484+
export NO_BUILD="true"
485+
fi
483486
export PATH=$(echo "$PATH" | sed -e "s|:${HOME}/\.go_workspace/bin||g" | sed -e 's|:/usr/local/go/bin||g')
484487
export GOPATH="<< parameters.build_dir >>/go"
485-
export NO_BUILD=true
486488
export TRAVIS_BRANCH=${CIRCLE_BRANCH}
487489
scripts/travis/deploy_packages.sh
488490
- when:

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ cmd/updater/updater
2929
tmp/dev_pkg
3030
tmp/out
3131
tmp/node_pkgs
32+
tmp/go-cache
3233

3334
# Ignore vim backup and swap files
3435
*~

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Build workflow"
2+
on:
3+
pull_request:
4+
jobs:
5+
build-test-windows:
6+
runs-on: windows-2022
7+
defaults:
8+
run:
9+
shell: msys2 {0}
10+
steps:
11+
- name: Install msys2
12+
uses: msys2/setup-msys2@v2
13+
with:
14+
update: true
15+
path-type: inherit
16+
- name: Check out code
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- name: Install golang
21+
uses: actions/setup-go@v2
22+
with:
23+
go-version: '1.14.7'
24+
- name: Build Test
25+
run: |
26+
export ALGORAND_DEADLOCK=enable
27+
export SKIP_GO_INSTALLATION=True
28+
scripts/travis/build_test.sh
29+
# - name: Upload artifact to Github
30+
# uses: actions/upload-artifact@v2
31+
# with:
32+
# if-no-files-found: error
33+
# path: $(git ls-files -o | grep -v crypto/libs | grep -v crypto/copies | grep -v crypto/libsodium-fork | grep -v crypto/lib/ | grep -v ^gen/ | grep -v swagger.json.validated | tr "\n" ":")
34+
- name: Slack Notification
35+
env:
36+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
37+
run: |
38+
curl -X POST --data-urlencode "payload={\"text\": \"Nightly windows build test on Github failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
39+
if: ${{ failure() && (contains(github.base_ref, 'rel/nightly') || contains(github.base_ref, 'rel/beta') || contains(github.base_ref, 'rel/stable')) }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check PR category and type
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
types: [opened, synchronize, reopened, labeled, unlabeled, edited]
7+
jobs:
8+
check_label:
9+
runs-on: ubuntu-latest
10+
name: Check PR Category and Type
11+
steps:
12+
- name: "Failed to find proper PR Type label. Please add one of the following: 'New Feature', 'Enhancement', or 'Bug-Fix'"
13+
run: exit 1
14+
if: |
15+
!contains(github.event.pull_request.labels.*.name, 'New Feature') &&
16+
!contains(github.event.pull_request.labels.*.name, 'Enhancement') &&
17+
!contains(github.event.pull_request.labels.*.name, 'Bug-Fix')
18+
- name: "Found more than one PR Type label. Please add only one of the following: 'New Feature', 'Enhancement', or 'Bug-Fix'"
19+
run: exit 1
20+
if: |
21+
(
22+
contains(github.event.pull_request.labels.*.name, 'New Feature') &&
23+
contains(github.event.pull_request.labels.*.name, 'Enhancement')
24+
) || (
25+
contains(github.event.pull_request.labels.*.name, 'New Feature') &&
26+
contains(github.event.pull_request.labels.*.name, 'Bug-Fix')
27+
) || (
28+
contains(github.event.pull_request.labels.*.name, 'Enhancement') &&
29+
contains(github.event.pull_request.labels.*.name, 'Bug-Fix')
30+
)
31+
- name: "PR Category is missing from PR title. Please add it like '<category>: <pr title>'"
32+
run: |
33+
if [[ ! "${{ github.event.pull_request.title }}" =~ ^.{2,}\:.{2,} ]]; then
34+
exit 1
35+
fi
36+
- name: "Found at least one PR Type label and Category in the title. Good job!"
37+
run: exit 0

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ assets
6565

6666
index.html
6767

68+
# test summary
69+
testresults.json

.travis.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ EXTLDFLAGS := -static -static-libstdc++ -static-libgcc
6161
export GOBUILDMODE := -buildmode=exe
6262
endif
6363

64+
ifeq ($(SHORT_PART_PERIOD), 1)
65+
export SHORT_PART_PERIOD_FLAG := -s
66+
endif
67+
6468
GOTAGS := --tags "$(GOTAGSLIST)"
6569
GOTRIMPATH := $(shell GOPATH=$(GOPATH) && go help build | grep -q .-trimpath && echo -trimpath)
6670

@@ -76,7 +80,7 @@ GOLDFLAGS := $(GOLDFLAGS_BASE) \
7680
UNIT_TEST_SOURCES := $(sort $(shell GOPATH=$(GOPATH) && GO111MODULE=off && go list ./... | grep -v /go-algorand/test/ ))
7781
ALGOD_API_PACKAGES := $(sort $(shell GOPATH=$(GOPATH) && GO111MODULE=off && cd daemon/algod/api; go list ./... ))
7882

79-
MSGP_GENERATE := ./protocol ./protocol/test ./crypto ./crypto/compactcert ./data/basics ./data/transactions ./data/committee ./data/bookkeeping ./data/hashable ./agreement ./rpcs ./node ./ledger ./ledger/ledgercore ./compactcert ./data/account
83+
MSGP_GENERATE := ./protocol ./protocol/test ./crypto ./crypto/merklearray ./crypto/merklesignature ./crypto/compactcert ./data/basics ./data/transactions ./data/committee ./data/bookkeeping ./data/hashable ./agreement ./rpcs ./node ./ledger ./ledger/ledgercore ./compactcert ./data/account
8084

8185
default: build
8286

@@ -290,7 +294,7 @@ gen/%/genesis.dump: gen/%/genesis.json
290294
./scripts/dump_genesis.sh $< > $@
291295

292296
gen/%/genesis.json: gen/%.json gen/generate.go buildsrc
293-
$(GOPATH1)/bin/genesis -q -n $(shell basename $(shell dirname $@)) -c $< -d $(subst .json,,$<)
297+
$(GOPATH1)/bin/genesis -q $(SHORT_PART_PERIOD_FLAG) -n $(shell basename $(shell dirname $@)) -c $< -d $(subst .json,,$<)
294298

295299
gen: $(addsuffix gen, $(NETWORKS)) mainnetgen
296300

@@ -303,6 +307,9 @@ gen/mainnet/genesis.dump: gen/mainnet/genesis.json
303307

304308
mainnetgen: gen/mainnet/genesis.dump
305309

310+
# The mainnet genesis.json file generated by this target does not have timestamp value so the hash is different from the deployed mainnet,
311+
# use a real genesis.json file from installer/genesis/mainnet/genesis.json if needed.
312+
# This target is preserved as part of the history on how mainnet genesis.json was generated from the CSV file.
306313
gen/mainnet/genesis.json: gen/pregen/mainnet/genesis.csv buildsrc
307314
mkdir -p gen/mainnet
308315
cat gen/pregen/mainnet/genesis.csv | $(GOPATH1)/bin/incorporate -m gen/pregen/mainnet/metadata.json > gen/mainnet/genesis.json

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![Build Status](https://travis-ci.com/algorand/go-algorand.svg?branch=master)](https://travis-ci.com/algorand/go-algorand)
1+
| rel/stable <br> [![CircleCI](https://circleci.com/gh/algorand/go-algorand/tree/rel%2Fstable.svg?style=svg)](https://circleci.com/gh/algorand/go-algorand/tree/rel%2Fstable) | rel/beta <br> [![CircleCI](https://circleci.com/gh/algorand/go-algorand/tree/rel%2Fbeta.svg?style=svg)](https://circleci.com/gh/algorand/go-algorand/tree/rel%2Fbeta) | rel/nightly <br> [![CircleCI](https://circleci.com/gh/algorand/go-algorand/tree/rel%2Fnightly.svg?style=svg)](https://circleci.com/gh/algorand/go-algorand/tree/rel%2Fnightly) |
2+
| --- | --- | --- |
23

34
go-algorand
45
====================
@@ -163,13 +164,14 @@ The following packages allow developers to interface with the Algorand system:
163164
- `cmd/catchupsrv` ([README](cmd/catchupsrv/README.md)) is a tool to
164165
assist with processing historic blocks on a new node.
165166
- `libgoal` exports a Go interface useful for developers of Algorand clients.
166-
- `debug` holds secondary commands which assist developers during debugging.
167+
- `tools` ([README](tools/README.md)) various tools and utilities without a better place to go.
168+
- `tools/debug` holds secondary commands which assist developers during debugging.
169+
- `tools/misc` ([README](tools/misc/README.md)) small tools that are sometimes handy in a pinch.
167170

168171
The following packages contain tools to help Algorand developers deploy networks
169172
of their own:
170173

171174
- `nodecontrol`
172-
- `tools`
173175
- `docker`
174176
- `commandandcontrol` ([README](test/commandandcontrol/README.md)) is a tool to
175177
automate a network of algod instances.
@@ -190,6 +192,6 @@ A number of packages provide utilities for the various components:
190192

191193
Please see the [COPYING_FAQ](COPYING_FAQ) for details about how to apply our license.
192194

193-
Copyright (C) 2019-2021, Algorand Inc.
195+
Copyright (C) 2019-2022, Algorand Inc.
194196

195197
[developer site url]: https://developer.algorand.org/

THANKS.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
A big thank you to everyone who has contributed to the `go-algorand` codebase.
55

66
### External Contributors
7-
In no particular order:
8-
- zacharyestep
7+
- aybehrouz
8+
- fionnachan
9+
- jeapostrophe
910
- jecassis
10-
- mxmauro
11-
- scnale
1211
- jsign
12+
- mxmauro
13+
- Olshansk
14+
- qkniep
1315
- RomitKumar
14-
- jeapostrophe
15-
- aybehrouz
16+
- scnale
17+
- zacharyestep
1618

1719
### Bug Reports
1820
- Nanyan

agreement/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ will also recover safely after crashes.
4343
# Specification
4444

4545
The specification for the protocol implemented by this package is
46-
located [here](https://github.com/algorand/spec).
46+
located [here](https://github.com/algorandfoundation/specs).
4747

4848
Optimizations from and other deviations from the spec will be noted
4949
throughout this file.

0 commit comments

Comments
 (0)