Skip to content

Commit 45db8d3

Browse files
authored
Merge pull request #3613 from Algo-devops-service/relbeta3.4.0
go-algorand 3.4.0-beta
2 parents 6f4a2c0 + 9024a09 commit 45db8d3

File tree

323 files changed

+81385
-61718
lines changed

Some content is hidden

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

323 files changed

+81385
-61718
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ commands:
196196
shell: bash.exe
197197
command: |
198198
choco install -y msys2 pacman make wget --force
199-
choco install -y golang --version=1.16.11 --force
199+
choco install -y golang --version=1.14.7 --force
200200
choco install -y python3 --version=3.7.3 --force
201201
export msys2='cmd //C RefreshEnv.cmd '
202202
export msys2+='& set MSYS=winsymlinks:nativestrict '

.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')) }}

.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Install specific golang
4545
uses: actions/setup-go@v2
4646
with:
47-
go-version: '1.16.11'
47+
go-version: '1.16.6'
4848
- name: Create folders for golangci-lint
4949
run: mkdir -p cicdtmp/golangci-lint
5050
- name: Check if custom golangci-lint is already built

.travis.yml

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

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ else
88
export GOPATH := $(shell go env GOPATH)
99
GOPATH1 := $(firstword $(subst :, ,$(GOPATH)))
1010
endif
11+
export GO111MODULE := on
1112
export GOPROXY := direct
1213
SRCPATH := $(shell pwd)
1314
ARCH := $(shell ./scripts/archtype.sh)
@@ -60,6 +61,10 @@ EXTLDFLAGS := -static -static-libstdc++ -static-libgcc
6061
export GOBUILDMODE := -buildmode=exe
6162
endif
6263

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

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

78-
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
7984

8085
default: build
8186

@@ -289,7 +294,7 @@ gen/%/genesis.dump: gen/%/genesis.json
289294
./scripts/dump_genesis.sh $< > $@
290295

291296
gen/%/genesis.json: gen/%.json gen/generate.go buildsrc
292-
$(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,,$<)
293298

294299
gen: $(addsuffix gen, $(NETWORKS)) mainnetgen
295300

THANKS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ A big thank you to everyone who has contributed to the `go-algorand` codebase.
55

66
### External Contributors
77
- aybehrouz
8+
- fionnachan
89
- jeapostrophe
910
- jecassis
1011
- jsign
1112
- mxmauro
13+
- Olshansk
1214
- qkniep
1315
- RomitKumar
1416
- scnale

agreement/abstractions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ type KeyManager interface {
224224
// VotingKeys returns an immutable array of voting keys that are
225225
// valid for the provided votingRound, and were available at
226226
// keysRound.
227-
VotingKeys(votingRound, keysRound basics.Round) []account.Participation
227+
VotingKeys(votingRound, keysRound basics.Round) []account.ParticipationRecordForRound
228228

229229
// Record indicates that the given participation action has been taken.
230230
// The operation needs to be asynchronous to avoid impacting agreement.

agreement/agreementtest/keyManager.go

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,25 @@ import (
2525
type SimpleKeyManager []account.Participation
2626

2727
// VotingKeys implements KeyManager.VotingKeys.
28-
func (m SimpleKeyManager) VotingKeys(votingRound, _ basics.Round) []account.Participation {
29-
var km []account.Participation
28+
func (m SimpleKeyManager) VotingKeys(votingRound, _ basics.Round) []account.ParticipationRecordForRound {
29+
var km []account.ParticipationRecordForRound
3030
for _, acc := range m {
3131
if acc.OverlapsInterval(votingRound, votingRound) {
32-
km = append(km, acc)
32+
record := account.ParticipationRecord{
33+
ParticipationID: acc.ID(),
34+
Account: acc.Parent,
35+
FirstValid: acc.FirstValid,
36+
LastValid: acc.LastValid,
37+
KeyDilution: acc.KeyDilution,
38+
LastVote: 0,
39+
LastBlockProposal: 0,
40+
LastStateProof: 0,
41+
EffectiveFirst: acc.FirstValid,
42+
EffectiveLast: acc.LastValid,
43+
VRF: acc.VRF,
44+
Voting: acc.Voting,
45+
}
46+
km = append(km, account.ParticipationRecordForRound{ParticipationRecord: record})
3347
}
3448
}
3549
return km

agreement/keyManager_test.go

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ package agreement
1919
import (
2020
"testing"
2121

22-
"github.com/algorand/go-deadlock"
2322
"github.com/stretchr/testify/require"
2423

24+
"github.com/algorand/go-deadlock"
25+
2526
"github.com/algorand/go-algorand/data/account"
2627
"github.com/algorand/go-algorand/data/basics"
2728
)
@@ -41,11 +42,27 @@ type recordingKeyManager struct {
4142
}
4243

4344
// VotingKeys implements KeyManager.VotingKeys.
44-
func (m *recordingKeyManager) VotingKeys(votingRound, _ basics.Round) []account.Participation {
45-
var km []account.Participation
45+
func (m *recordingKeyManager) VotingKeys(votingRound, _ basics.Round) []account.ParticipationRecordForRound {
46+
var km []account.ParticipationRecordForRound
4647
for _, acc := range m.keys {
4748
if acc.OverlapsInterval(votingRound, votingRound) {
48-
km = append(km, acc)
49+
partRecordForRound := account.ParticipationRecordForRound{
50+
ParticipationRecord: account.ParticipationRecord{
51+
ParticipationID: acc.ID(),
52+
Account: acc.Parent,
53+
FirstValid: acc.FirstValid,
54+
LastValid: acc.LastValid,
55+
KeyDilution: acc.KeyDilution,
56+
LastVote: 0,
57+
LastBlockProposal: 0,
58+
LastStateProof: 0,
59+
EffectiveFirst: 0,
60+
EffectiveLast: acc.LastValid,
61+
VRF: acc.VRF,
62+
Voting: acc.Voting,
63+
},
64+
}
65+
km = append(km, partRecordForRound)
4966
}
5067
}
5168
return km

0 commit comments

Comments
 (0)