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.18.0-stable Release PR #5722

Merged
merged 71 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
da58c8a
ledger: generic kv trackers backend implementation (#5488)
icorderi Jul 25, 2023
68243b2
ledger: rename catchpointWriter to catchpointFileWriter for clarity (…
algorandskiy Jul 25, 2023
670010a
ledger: fixes to store interface after kv merge (#5607)
icorderi Jul 25, 2023
d82691d
goal: `--all-trace-options` keeps track of everything in exec trace (…
ahangsu Jul 26, 2023
0903cbf
tools: option to run block generator test multiple times (#5617)
winder Jul 28, 2023
021f0c3
netdeploy: allow simple local net topologies (#5612)
algorandskiy Jul 28, 2023
0da044b
CICD: Macos dependencies (#5618)
algobarb Jul 28, 2023
3f32d61
p2p: adding peerstore (#5576)
shiqizng Jul 28, 2023
0dbbc91
p2p: Add peerID and feature flag (#5591)
Eric-Warehime Jul 28, 2023
93d4f58
node: use correct allocbound on netprioResponse Nonce field (#5613)
iansuvak Jul 28, 2023
12e537c
ledger: increase locks granularity in lookupWithoutRewards (#5527)
algorandskiy Jul 28, 2023
fd15f4e
agreement: add omitempty to MessageHandle in agreement message (#5593)
iansuvak Jul 28, 2023
cfaeeea
AVM: Enable pooling of logicsig execution across a group (#5528)
jannotti Jul 31, 2023
1bf7a21
Revert "ledger: increase locks granularity in lookupWithoutRewards" (…
algorandskiy Jul 31, 2023
d82200a
p2p: multiaddr dns bootstrapping utils (#5575)
Eric-Warehime Aug 1, 2023
8c87fa5
ledger: remove redundant block header cache (#5540)
algonautshant Aug 2, 2023
ebd655a
tools: test on CI regardless of modded file (#5621)
tzaffi Aug 2, 2023
ba17c2c
tools: additional generator lifecycle logging. (#5627)
winder Aug 2, 2023
0b7958a
tools: write block generator ledger output to a file (#5630)
winder Aug 2, 2023
5d5ca32
api: describe WaitForBlock timeout behavior (#5587)
winder Aug 2, 2023
ea9efcd
metrics: add counters to broadcastSignedTxGroup (#5588)
cce Aug 2, 2023
8b19c62
libgoal: set FirstValid to LastRound to prevent early tnxs (#5622)
algorandskiy Aug 3, 2023
5acab71
tests: fix e2e TestAssetValidRounds after libgoal adjustment (#5632)
algorandskiy Aug 4, 2023
72765c1
network: make GossipNode more independent from wsNetwork implementati…
cce Aug 4, 2023
259eb32
tools: add mutex profile to heapWatch (#5638)
algorandskiy Aug 7, 2023
5008a8c
metrics: add counters for ledger locks trackerMu and accountsMu (#5635)
cce Aug 7, 2023
95e3504
tools: use CommandContext to cancel conduit process. (#5636)
winder Aug 7, 2023
865e0d5
phonebook: Persist initial phonebook peers; remove unused ExtendPeerL…
Eric-Warehime Aug 8, 2023
39ad943
rest api: Allow fast track transaction broadcasting via txHandler (#5…
algorandskiy Aug 8, 2023
0e651fd
ledger: move accountUpdatesLedgerEvaluator to tracker.go (#5644)
algorandskiy Aug 8, 2023
4dc3f92
build: slightly more readable "make" output (#5646)
zeldovich Aug 8, 2023
867aa17
algod: Add API Endpoint to fetch TxIDs from block (#5611)
algochoi Aug 9, 2023
208335f
tools: precompile block-generator teal code (#5642)
winder Aug 9, 2023
1088a2a
Simulate: Allow unnamed foreign resource access (#5366)
jasonpaulos Aug 9, 2023
a36464a
ledger: add pebbledb support (#5606)
icorderi Aug 9, 2023
fb8adcf
tests: fix close - commit data race in tracker tests (#5619)
algorandskiy Aug 9, 2023
d92a3bf
CICD: go-algorand relstable3.17.0-remerge mergeback (#5648)
Algo-devops-service Aug 10, 2023
435532d
build: upgrade to go1.20.6 (#5577)
algorandskiy Aug 10, 2023
4ff2bf3
ledger: clear Merkle Trie on sqlite IO error (#5568)
AlgoAxel Aug 11, 2023
24cc4d7
Build: Remove n-algorand from wsnetwork partial overlap test. (#5660)
gmalouf Aug 14, 2023
eae7610
build(deps): bump github.com/libp2p/go-libp2p from 0.29.0 to 0.29.1 (…
dependabot[bot] Aug 15, 2023
1d1f8cc
API: Disable API authentication (#5625)
shiqizng Aug 15, 2023
2aac402
tools: block-generator locked table retry and additional metrics (#5653)
winder Aug 15, 2023
3425e85
p2p: in-memory peerstore (#5664)
shiqizng Aug 15, 2023
8f840c7
Ledger: Close the ledger at node shutdown (#5668)
algonautshant Aug 16, 2023
0c4f253
tools: metrics files visualizer (#5661)
algorandskiy Aug 16, 2023
0f2ab92
p2p: Add delete/create to algons dnsaddr command (#5631)
Eric-Warehime Aug 16, 2023
78460a9
catchup: cleanup pipelinedFetch (#5662)
zeldovich Aug 16, 2023
bf60d55
build: update go-sqlite3 dependency (#5645)
zeldovich Aug 16, 2023
7a55030
chore: Remove faulty assertion (#5675)
Eric-Warehime Aug 17, 2023
53fc1ba
catchup: make unsupported block handling more deterministic (#5673)
zeldovich Aug 17, 2023
3200ad7
ledger: dual db testing test harness (#5652)
icorderi Aug 17, 2023
c5e779e
ledger: fix error condition leaked from KV-related refactoring (#5678)
algorandskiy Aug 17, 2023
e5ae100
Merge branch 'master' into relbeta3.18.0
Algo-devops-service Aug 17, 2023
1f577ca
Merge pull request #5679 from Algo-devops-service/relbeta3.18.0
algojohnlee Aug 17, 2023
f8bc8c6
Simulate: Hash of Program Bytecodes in Simulation (#5658)
ahangsu Aug 17, 2023
2b323c3
Simulate: Add State Change to Exec Trace (#5659)
ahangsu Aug 18, 2023
93161f4
ledger: fix rare race in TestCommitRoundIOError (#5674)
zeldovich Aug 18, 2023
9f74a55
clocks: tagged deadlines (#5649)
yossigi Aug 18, 2023
8c8fe6a
tests: log algod-err and algod-out on e2e failure (#5681)
algorandskiy Aug 18, 2023
cdbd0f1
build: disable pebbledb on arm32 (#5682)
algorandskiy Aug 18, 2023
620e9bd
AVM: Expose `global` fields to TEAL that return MBR for asset create/…
jannotti Aug 18, 2023
dfdb293
txHandler: Enable ERL by default in configuration. (#5683)
gmalouf Aug 18, 2023
8281f8a
tools: add block-generator initial round to report. (#5689)
winder Aug 21, 2023
60c3f27
tests: fix restAPI test fixture (#5692)
algorandskiy Aug 22, 2023
bce4009
tools: block-generator option to delay before running scenario. (#5694)
winder Aug 22, 2023
f155add
build: resume/fix ci expect tests (#5696)
algorandskiy Aug 22, 2023
c30ca17
Merge branch 'master' into relbeta3.18.0
Algo-devops-service Aug 22, 2023
f4b452d
Revert "Ledger: Close the ledger at node shutdown" (#5705)
onetechnical Aug 24, 2023
c6a320f
Merge pull request #5697 from Algo-devops-service/relbeta3.18.0
algojohnlee Aug 25, 2023
fa33874
Merge branch 'rel/beta' into relstable3.18.0
Algo-devops-service Sep 1, 2023
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
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ commands:
shell: bash.exe
command: |
choco install -y msys2 pacman make wget --force
choco install -y golang --version=1.20.5 --force
choco install -y golang --version=$(./scripts/get_golang_version.sh) --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 @@ -602,7 +602,6 @@ commands:
export PACKAGE_NAMES=$(echo $PACKAGES | tr -d '\n')
export PARTITION_TOTAL=${CIRCLE_NODE_TOTAL}
export PARTITION_ID=${CIRCLE_NODE_INDEX}
export GOEXPERIMENT="none"
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
- store_artifacts:
path: << parameters.result_path >>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
uses: actions/[email protected]
with:
path: cicdtmp/golangci-lint/golangci-lint-cgo
key: cicd-golangci-lint-cgo-v0.0.2
key: cicd-golangci-lint-cgo-v0.0.2-${{ env.GO_VERSION }}

- name: Build custom golangci-lint with CGO_ENABLED
if: steps.cache-golangci-lint.outputs.cache-hit != 'true'
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
- 'tools/block-generator/**'
- 'tools/x-repo-types/**'
pull_request:
paths:
- 'tools/block-generator/**'
- 'tools/x-repo-types/**'

jobs:
tools_test:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04 as builder

ARG GO_VERSION="1.20.5"
ARG GO_VERSION="1.20.7"

ARG CHANNEL
ARG URL
Expand Down
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,6 @@ ifeq ($(SHORT_PART_PERIOD), 1)
export SHORT_PART_PERIOD_FLAG := -s
endif

# Disable go experiments during build as of go 1.20.5 due to
# https://github.com/golang/go/issues/60825
# Likely fix: https://go-review.googlesource.com/c/go/+/503937/6/src/runtime/race_arm64.s
export GOEXPERIMENT=none

GOTAGS := --tags "$(GOTAGSLIST)"
GOTRIMPATH := $(shell GOPATH=$(GOPATH) && go help build | grep -q .-trimpath && echo -trimpath)

Expand All @@ -91,7 +86,7 @@ ALGOD_API_PACKAGES := $(sort $(shell GOPATH=$(GOPATH) && GO111MODULE=off && cd d

GOMOD_DIRS := ./tools/block-generator ./tools/x-repo-types

MSGP_GENERATE := ./protocol ./protocol/test ./crypto ./crypto/merklearray ./crypto/merklesignature ./crypto/stateproof ./data/basics ./data/transactions ./data/stateproofmsg ./data/committee ./data/bookkeeping ./data/hashable ./agreement ./rpcs ./network ./node ./ledger ./ledger/ledgercore ./ledger/store/trackerdb ./ledger/encoded ./stateproof ./data/account ./daemon/algod/api/spec/v2
MSGP_GENERATE := ./protocol ./protocol/test ./crypto ./crypto/merklearray ./crypto/merklesignature ./crypto/stateproof ./data/basics ./data/transactions ./data/stateproofmsg ./data/committee ./data/bookkeeping ./data/hashable ./agreement ./rpcs ./network ./node ./ledger ./ledger/ledgercore ./ledger/store/trackerdb ./ledger/store/trackerdb/generickv ./ledger/encoded ./stateproof ./data/account ./daemon/algod/api/spec/v2

default: build

Expand Down Expand Up @@ -212,9 +207,11 @@ build: buildsrc buildsrc-special
# get around a bug in go build where it will fail
# to cache binaries from time to time on empty NFS
# dirs
buildsrc: check-go-version crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a node_exporter NONGO_BIN
mkdir -p "${GOCACHE}" && \
touch "${GOCACHE}"/file.txt && \
${GOCACHE}/file.txt:
mkdir -p "${GOCACHE}"
touch "${GOCACHE}"/file.txt

buildsrc: check-go-version crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a node_exporter NONGO_BIN ${GOCACHE}/file.txt
go install $(GOTRIMPATH) $(GOTAGS) $(GOBUILDMODE) -ldflags="$(GOLDFLAGS)" ./...

buildsrc-special:
Expand Down
9 changes: 4 additions & 5 deletions agreement/agreementtest/simulate.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"github.com/algorand/go-algorand/crypto"
"github.com/algorand/go-algorand/data/basics"
"github.com/algorand/go-algorand/logging"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/util/db"
"github.com/algorand/go-algorand/util/timers"
)
Expand All @@ -52,15 +51,15 @@ func makeInstant() *instant {
return i
}

func (i *instant) Decode([]byte) (timers.Clock, error) {
func (i *instant) Decode([]byte) (timers.Clock[agreement.TimeoutType], error) {
return i, nil
}

func (i *instant) Encode() []byte {
return nil
}

func (i *instant) TimeoutAt(d time.Duration) <-chan time.Time {
func (i *instant) TimeoutAt(d time.Duration, timeoutType agreement.TimeoutType) <-chan time.Time {
ta := make(chan time.Time)
select {
case <-i.timeoutAtCalled:
Expand All @@ -69,13 +68,13 @@ func (i *instant) TimeoutAt(d time.Duration) <-chan time.Time {
return ta
}

if d == agreement.FilterTimeout(0, protocol.ConsensusCurrentVersion) && !i.HasPending("pseudonode") {
if timeoutType == agreement.TimeoutFilter && !i.HasPending("pseudonode") {
close(ta)
}
return ta
}

func (i *instant) Zero() timers.Clock {
func (i *instant) Zero() timers.Clock[agreement.TimeoutType] {
i.Z0 <- struct{}{}
// pause here until runRound is called
i.Z1 <- struct{}{}
Expand Down
7 changes: 3 additions & 4 deletions agreement/demux.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package agreement
import (
"context"
"fmt"
"time"

"github.com/algorand/go-algorand/config"
"github.com/algorand/go-algorand/logging"
Expand Down Expand Up @@ -190,7 +189,7 @@ func (d *demux) verifyBundle(ctx context.Context, m message, r round, p period,
// next blocks until it observes an external input event of interest for the state machine.
//
// If ok is false, there are no more events so the agreement service should quit.
func (d *demux) next(s *Service, deadline time.Duration, fastDeadline time.Duration, currentRound round) (e externalEvent, ok bool) {
func (d *demux) next(s *Service, deadline Deadline, fastDeadline Deadline, currentRound round) (e externalEvent, ok bool) {
defer func() {
if !ok {
return
Expand Down Expand Up @@ -250,8 +249,8 @@ func (d *demux) next(s *Service, deadline time.Duration, fastDeadline time.Durat
}

ledgerNextRoundCh := s.Ledger.Wait(nextRound)
deadlineCh := s.Clock.TimeoutAt(deadline)
fastDeadlineCh := s.Clock.TimeoutAt(fastDeadline)
deadlineCh := s.Clock.TimeoutAt(deadline.Duration, deadline.Type)
fastDeadlineCh := s.Clock.TimeoutAt(fastDeadline.Duration, fastDeadline.Type)

d.UpdateEventsQueue(eventQueueDemux, 0)
d.monitor.dec(demuxCoserviceType)
Expand Down
10 changes: 5 additions & 5 deletions agreement/demux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,14 @@ func TestDemuxNext(t *testing.T) {
}

// implement timers.Clock
func (t *demuxTester) Zero() timers.Clock {
func (t *demuxTester) Zero() timers.Clock[TimeoutType] {
// we don't care about this function in this test.
return t
}

// implement timers.Clock
func (t *demuxTester) TimeoutAt(delta time.Duration) <-chan time.Time {
if delta == fastTimeoutChTime {
func (t *demuxTester) TimeoutAt(delta time.Duration, timeoutType TimeoutType) <-chan time.Time {
if timeoutType == TimeoutFastRecovery {
return nil
}

Expand All @@ -450,7 +450,7 @@ func (t *demuxTester) Encode() []byte {
}

// implement timers.Clock
func (t *demuxTester) Decode([]byte) (timers.Clock, error) {
func (t *demuxTester) Decode([]byte) (timers.Clock[TimeoutType], error) {
// we don't care about this function in this test.
return t, nil
}
Expand Down Expand Up @@ -675,7 +675,7 @@ func (t *demuxTester) TestUsecase(testcase demuxTestUsecase) bool {
close(s.quit)
}

e, ok := dmx.next(s, time.Second, fastTimeoutChTime, 300)
e, ok := dmx.next(s, Deadline{Duration: time.Second, Type: TimeoutDeadline}, Deadline{Duration: fastTimeoutChTime, Type: TimeoutFastRecovery}, 300)

if !assert.Equal(t, testcase.ok, ok) {
return false
Expand Down
4 changes: 2 additions & 2 deletions agreement/fuzzer/fuzzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type Fuzzer struct {
wallClock int32
agreements []*agreement.Service
facades []*NetworkFacade
clocks []timers.Clock
clocks []timers.Clock[agreement.TimeoutType]
disconnected [][]bool
crashAccessors []db.Accessor
router *Router
Expand Down Expand Up @@ -80,7 +80,7 @@ func MakeFuzzer(config FuzzerConfig) *Fuzzer {
networkName: config.FuzzerName,
agreements: make([]*agreement.Service, config.NodesCount),
facades: make([]*NetworkFacade, config.NodesCount),
clocks: make([]timers.Clock, config.NodesCount),
clocks: make([]timers.Clock[agreement.TimeoutType], config.NodesCount),
disconnected: make([][]bool, config.NodesCount),
crashAccessors: make([]db.Accessor, config.NodesCount),
accounts: make([]account.Participation, config.NodesCount),
Expand Down
11 changes: 6 additions & 5 deletions agreement/fuzzer/networkFacade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

"github.com/algorand/go-deadlock"

"github.com/algorand/go-algorand/agreement"
"github.com/algorand/go-algorand/network"
"github.com/algorand/go-algorand/protocol"
"github.com/algorand/go-algorand/util/timers"
Expand All @@ -48,7 +49,7 @@ type NetworkFacadeMessage struct {
type NetworkFacade struct {
network.GossipNode
NetworkFilter
timers.Clock
timers.Clock[agreement.TimeoutType]
nodeID int
mux *network.Multiplexer
fuzzer *Fuzzer
Expand Down Expand Up @@ -77,7 +78,7 @@ func MakeNetworkFacade(fuzzer *Fuzzer, nodeID int) *NetworkFacade {
n := &NetworkFacade{
fuzzer: fuzzer,
nodeID: nodeID,
mux: network.MakeMultiplexer(fuzzer.log),
mux: network.MakeMultiplexer(),
clocks: make(map[int]chan time.Time),
eventsQueues: make(map[string]int),
eventsQueuesCh: make(chan int, 1000),
Expand Down Expand Up @@ -345,7 +346,7 @@ func (n *NetworkFacade) Disconnect(sender network.Peer) {
n.fuzzer.Disconnect(n.nodeID, sourceNode)
}

func (n *NetworkFacade) Zero() timers.Clock {
func (n *NetworkFacade) Zero() timers.Clock[agreement.TimeoutType] {
n.clockSync.Lock()
defer n.clockSync.Unlock()

Expand Down Expand Up @@ -375,7 +376,7 @@ func (n *NetworkFacade) Rezero() {
// Since implements the Clock interface.
func (n *NetworkFacade) Since() time.Duration { return 0 }

func (n *NetworkFacade) TimeoutAt(d time.Duration) <-chan time.Time {
func (n *NetworkFacade) TimeoutAt(d time.Duration, timeoutType agreement.TimeoutType) <-chan time.Time {
defer n.timeoutAtInitOnce.Do(func() {
n.timeoutAtInitWait.Done()
})
Expand Down Expand Up @@ -414,7 +415,7 @@ func (n *NetworkFacade) Encode() []byte {
return buf.Bytes()
}

func (n *NetworkFacade) Decode(in []byte) (timers.Clock, error) {
func (n *NetworkFacade) Decode(in []byte) (timers.Clock[agreement.TimeoutType], error) {
n.clockSync.Lock()
defer n.clockSync.Unlock()

Expand Down
2 changes: 1 addition & 1 deletion agreement/gossip/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func makewhiteholeNetwork(domain *whiteholeDomain) *whiteholeNetwork {
w := &whiteholeNetwork{
peer: atomic.AddUint32(&domain.peerIdx, 1),
lastMsgRead: uint32(len(domain.messages)),
mux: network.MakeMultiplexer(domain.log),
mux: network.MakeMultiplexer(),
domain: domain,
disconnected: make(map[uint32]bool),
}
Expand Down
2 changes: 1 addition & 1 deletion agreement/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type message struct {

// this field is for backwards compatibility with crash state serialized using go-codec prior to explicit unexport.
// should be removed after the next consensus update.
MessageHandle msgp.Raw
MessageHandle msgp.Raw `codec:"MessageHandle,omitempty"`
// explicitly unexport this field since we can't define serializers for interface{} type
// the only implementation of this is gossip.messageMetadata which doesn't have exported fields to serialize.
messageHandle MessageHandle
Expand Down
2 changes: 2 additions & 0 deletions agreement/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ func TestMessageBackwardCompatibility(t *testing.T) {
Tag: protocol.ProposalPayloadTag,
}

require.Containsf(t, string(encoded), "MessageHandle", "encoded message does not contain MessageHandle field")
var m1, m2, m3, m4 message
// Both msgp and reflection should decode the message containing old MessageHandle successfully
err = protocol.Decode(encoded, &m1)
Expand All @@ -123,6 +124,7 @@ func TestMessageBackwardCompatibility(t *testing.T) {
e1 := protocol.Encode(&m1)
e2 := protocol.EncodeReflect(&m2)
require.Equal(t, e1, e2)
require.NotContainsf(t, string(e1), "MessageHandle", "encoded message still contains MessageHandle field")
err = protocol.DecodeReflect(e1, &m3)
require.NoError(t, err)
err = protocol.Decode(e2, &m4)
Expand Down
Loading
Loading