Skip to content

Commit

Permalink
Merge pull request #3423 from Algo-devops-service/relbeta3.3.0
Browse files Browse the repository at this point in the history
go-algorand 3.3.0-beta
  • Loading branch information
algojohnlee authored Jan 19, 2022
2 parents 7dcf9d8 + 2356974 commit 130d25e
Show file tree
Hide file tree
Showing 940 changed files with 5,664 additions and 1,959 deletions.
12 changes: 7 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ workflows:
context:
- slack-secrets
- aws-secrets

#- windows_x64_build

commands:
Expand Down Expand Up @@ -197,7 +196,7 @@ commands:
shell: bash.exe
command: |
choco install -y msys2 pacman make wget --force
choco install -y golang --version=1.14.7 --force
choco install -y golang --version=1.16.11 --force
choco install -y python3 --version=3.7.3 --force
export msys2='cmd //C RefreshEnv.cmd '
export msys2+='& set MSYS=winsymlinks:nativestrict '
Expand Down Expand Up @@ -322,7 +321,6 @@ commands:
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n')
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
export PARTITION_ID=${CIRCLE_NODE_INDEX}
export PARALLEL_FLAG="-p 1"
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
- store_artifacts:
path: << parameters.result_path >>
Expand Down Expand Up @@ -432,6 +430,7 @@ commands:
export TEST_RESULTS=<< parameters.result_path >>/<< parameters.result_subdir >>/${CIRCLE_NODE_INDEX}
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
export PARTITION_ID=${CIRCLE_NODE_INDEX}
export PARALLEL_FLAG="-p 1"
test/scripts/run_integration_tests.sh
- store_artifacts:
path: << parameters.result_path >>
Expand Down Expand Up @@ -478,11 +477,14 @@ commands:
- attach_workspace:
at: << parameters.build_dir >>
- run:
name: Upload binaries << parameters.platform >>
name: Upload Binaries << parameters.platform >>
command: |
if [ "${CIRCLE_BRANCH}" = "rel/nightly" ]
then
export NO_BUILD="true"
fi
export PATH=$(echo "$PATH" | sed -e "s|:${HOME}/\.go_workspace/bin||g" | sed -e 's|:/usr/local/go/bin||g')
export GOPATH="<< parameters.build_dir >>/go"
export NO_BUILD=true
export TRAVIS_BRANCH=${CIRCLE_BRANCH}
scripts/travis/deploy_packages.sh
- when:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Install specific golang
uses: actions/setup-go@v2
with:
go-version: '1.16.6'
go-version: '1.16.11'
- name: Create folders for golangci-lint
run: mkdir -p cicdtmp/golangci-lint
- name: Check if custom golangci-lint is already built
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ assets

index.html

# test summary
testresults.json
1 change: 0 additions & 1 deletion 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 GO111MODULE := on
export GOPROXY := direct
SRCPATH := $(shell pwd)
ARCH := $(shell ./scripts/archtype.sh)
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build Status](https://travis-ci.com/algorand/go-algorand.svg?branch=master)](https://travis-ci.com/algorand/go-algorand)
| 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) |
| --- | --- | --- |

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

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

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

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

Copyright (C) 2019-2021, Algorand Inc.
Copyright (C) 2019-2022, Algorand Inc.

[developer site url]: https://developer.algorand.org/
12 changes: 6 additions & 6 deletions THANKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
A big thank you to everyone who has contributed to the `go-algorand` codebase.

### External Contributors
In no particular order:
- zacharyestep
- aybehrouz
- jeapostrophe
- jecassis
- mxmauro
- scnale
- jsign
- mxmauro
- qkniep
- RomitKumar
- jeapostrophe
- aybehrouz
- scnale
- zacharyestep

### Bug Reports
- Nanyan
Expand Down
2 changes: 1 addition & 1 deletion agreement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ will also recover safely after crashes.
# Specification

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

Optimizations from and other deviations from the spec will be noted
throughout this file.
Expand Down
2 changes: 1 addition & 1 deletion agreement/abstractions.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/actions.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/actor.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/agreeInstall.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/agreementtest/keyManager.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/agreementtest/simulate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/agreementtest/simulate_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/asyncVoteVerifier.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/asyncVoteVerifier_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/autopsy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/bundle.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/bundle_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/cadaver.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/certificate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/certificate_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/common_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/coservice.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/cryptoRequestContext.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/cryptoRequestContext_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/cryptoVerifier.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions agreement/cryptoVerifier_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -72,7 +72,7 @@ func makeUnauthenticatedVote(l Ledger, sender basics.Address, selection *crypto.

m, _ := membership(l, rv.Sender, rv.Round, rv.Period, rv.Step)
cred := committee.MakeCredential(&selection.SK, m.Selector)
ephID := basics.OneTimeIDForRound(rv.Round, voting.KeyDilution(config.Consensus[protocol.ConsensusCurrentVersion]))
ephID := basics.OneTimeIDForRound(rv.Round, voting.KeyDilution(config.Consensus[protocol.ConsensusCurrentVersion].DefaultKeyDilution))
sig := voting.Sign(ephID, rv)

return unauthenticatedVote{
Expand Down
22 changes: 3 additions & 19 deletions agreement/demux.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand All @@ -21,7 +21,6 @@ import (
"fmt"
"time"

"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/logging/logspec"
"github.com/algorand/go-algorand/protocol"
Expand Down Expand Up @@ -123,7 +122,7 @@ func (d *demux) tokenizeMessages(ctx context.Context, net Network, tag protocol.

o, err := tokenize(raw.Data)
if err != nil {
logging.Base().Warnf("disconnecting from peer: error decoding message tagged %v: %v", tag, err)
d.log.Warnf("disconnecting from peer: error decoding message tagged %v: %v", tag, err)
net.Disconnect(raw.MessageHandle)
d.UpdateEventsQueue(eventQueueTokenizing[tag], 0)
continue
Expand Down Expand Up @@ -236,22 +235,7 @@ func (d *demux) next(s *Service, deadline time.Duration, fastDeadline time.Durat

ledgerNextRoundCh := s.Ledger.Wait(nextRound)
deadlineCh := s.Clock.TimeoutAt(deadline)
var fastDeadlineCh <-chan time.Time

fastPartitionRecoveryEnabled := false
if proto, err := d.ledger.ConsensusVersion(ParamsRound(currentRound)); err != nil {
logging.Base().Warnf("demux: could not get consensus parameters for round %d: %v", ParamsRound(currentRound), err)
// this might happen during catchup, since the Ledger.Wait fires as soon as a new block is received by the ledger, which could be
// far before it's being committed. In these cases, it should be safe to default to the current consensus version. On subsequent
// iterations, it will get "corrected" since the ledger would finish flushing the blocks to disk.
fastPartitionRecoveryEnabled = config.Consensus[protocol.ConsensusCurrentVersion].FastPartitionRecovery
} else {
fastPartitionRecoveryEnabled = config.Consensus[proto].FastPartitionRecovery
}

if fastPartitionRecoveryEnabled {
fastDeadlineCh = s.Clock.TimeoutAt(fastDeadline)
}
fastDeadlineCh := s.Clock.TimeoutAt(fastDeadline)

d.UpdateEventsQueue(eventQueueDemux, 0)
d.monitor.dec(demuxCoserviceType)
Expand Down
2 changes: 1 addition & 1 deletion agreement/demux_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/encoding_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/events.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/bandwidthFilter_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/catchupFilter_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/clockedFilter_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/dropMessageFilter_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/duplicateMessageFilter_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/filter_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/fuzzer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion agreement/fuzzer/fuzzer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2021 Algorand, Inc.
// Copyright (C) 2019-2022 Algorand, Inc.
// This file is part of go-algorand
//
// go-algorand is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit 130d25e

Please sign in to comment.