Skip to content

Commit 573a34c

Browse files
authored
Merge pull request #1858 from onetechnical/onetechnical/relstable2.4.1
2 parents 07bc97b + 7e8a395 commit 573a34c

File tree

862 files changed

+9423
-5915
lines changed

Some content is hidden

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

862 files changed

+9423
-5915
lines changed

.travis.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ jobs:
2929
- stage: build_commit
3030
os: linux
3131
script:
32-
- scripts/travis/build_test.sh
32+
- travis_retry scripts/travis/build_test.sh
3333

3434
- stage: build_pr
3535
os: linux
3636
name: Ubuntu AMD64 Build
3737
script:
38-
- scripts/travis/build_test.sh
38+
- travis_retry scripts/travis/build_test.sh
3939
- # same stage, parallel job
4040
os: linux
4141
name: Ubuntu AMD64 Integration Test
4242
script:
43-
- ./scripts/travis/integration_test.sh
43+
- travis_retry ./scripts/travis/integration_test.sh
4444
- # same stage, parallel job
4545
name: External ARM64 Build
4646
os: linux
@@ -52,7 +52,7 @@ jobs:
5252
packages:
5353
- awscli
5454
script:
55-
- scripts/travis/external_build.sh ./scripts/travis/build_test.sh
55+
- travis_retry scripts/travis/external_build.sh ./scripts/travis/build_test.sh
5656
- # same stage, parallel job
5757
name: External ARM64 Integration Test
5858
os: linux
@@ -70,13 +70,13 @@ jobs:
7070
osx_image: xcode11
7171
name: MacOS AMD64 Build
7272
script:
73-
- scripts/travis/build_test.sh
73+
- travis_retry scripts/travis/build_test.sh
7474
- # same stage, parallel job
7575
os: osx
7676
osx_image: xcode11
7777
name: MacOS AMD64 Integration Test
7878
script:
79-
- ./scripts/travis/integration_test.sh
79+
- travis_retry ./scripts/travis/integration_test.sh
8080
- # same stage, parallel job
8181
os: windows
8282
name: Windows x64 Build
@@ -85,24 +85,24 @@ jobs:
8585
- $HOME/AppData/Local/Temp/chocolatey
8686
- /C/tools/msys64
8787
script:
88-
- $mingw64 scripts/travis/build_test.sh
88+
- travis_retry $mingw64 scripts/travis/build_test.sh
8989

9090
- stage: build_release
9191
os: linux
9292
name: Ubuntu AMD64 Build
9393
script:
94-
- ./scripts/travis/build_test.sh
94+
- travis_retry ./scripts/travis/build_test.sh
9595
- # same stage, parallel job
9696
os: linux
9797
name: Ubuntu AMD64 Integration Test
9898
script:
99-
- ./scripts/travis/integration_test.sh
99+
- travis_retry ./scripts/travis/integration_test.sh
100100
- # same stage, parallel job
101101
os: osx
102102
osx_image: xcode11
103103
name: MacOS AMD64 Build
104104
script:
105-
- scripts/travis/build_test.sh
105+
- travis_retry scripts/travis/build_test.sh
106106
- # same stage, parallel job
107107
name: External ARM64 Integration Test
108108
os: linux
@@ -123,7 +123,7 @@ jobs:
123123
- $HOME/AppData/Local/Temp/chocolatey
124124
- /C/tools/msys64
125125
script:
126-
- $mingw64 scripts/travis/build_test.sh
126+
- travis_retry $mingw64 scripts/travis/build_test.sh
127127

128128
- stage: deploy
129129
name: Ubuntu Deploy

Makefile

+5-3
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,14 @@ build: buildsrc gen
175175
# get around a bug in go build where it will fail
176176
# to cache binaries from time to time on empty NFS
177177
# dirs
178-
buildsrc: crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a node_exporter NONGO_BIN deps $(ALGOD_API_SWAGGER_INJECT) $(KMD_API_SWAGGER_INJECT)
178+
buildsrc: check-go-version crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a node_exporter NONGO_BIN deps $(ALGOD_API_SWAGGER_INJECT) $(KMD_API_SWAGGER_INJECT)
179179
mkdir -p tmp/go-cache && \
180180
touch tmp/go-cache/file.txt && \
181181
GOCACHE=$(SRCPATH)/tmp/go-cache go install $(GOTRIMPATH) $(GOTAGS) $(GOBUILDMODE) -ldflags="$(GOLDFLAGS)" ./...
182182

183+
check-go-version:
184+
./scripts/check_golang_version.sh build
185+
183186
SOURCES_RACE := github.com/algorand/go-algorand/cmd/kmd
184187

185188
## Build binaries with the race detector enabled in them.
@@ -190,7 +193,6 @@ build-race: build
190193
@mkdir -p $(GOPATH1)/bin-race
191194
GOBIN=$(GOPATH1)/bin-race go install $(GOTRIMPATH) $(GOTAGS) -race -ldflags="$(GOLDFLAGS)" ./...
192195
GOBIN=$(GOPATH1)/bin-race go install $(GOTRIMPATH) $(GOTAGS) -ldflags="$(GOLDFLAGS)" $(SOURCES_RACE)
193-
go vet ./...
194196

195197
NONGO_BIN_FILES=$(GOPATH1)/bin/find-nodes.sh $(GOPATH1)/bin/update.sh $(GOPATH1)/bin/COPYING $(GOPATH1)/bin/ddconfig.sh
196198

@@ -299,7 +301,7 @@ dump: $(addprefix gen/,$(addsuffix /genesis.dump, $(NETWORKS)))
299301
install: build
300302
scripts/dev_install.sh -p $(GOPATH1)/bin
301303

302-
.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
304+
.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
303305

304306
###### TARGETS FOR CICD PROCESS ######
305307
include ./scripts/release/mule/Makefile.mule

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,6 @@ A number of packages provide utilities for the various components:
189189

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

192-
Copyright (C) 2019-2020, Algorand Inc.
192+
Copyright (C) 2019-2021, Algorand Inc.
193193

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

agreement/abstractions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/actions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/actor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/agreeInstall.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/agreementtest/keyManager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/agreementtest/simulate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/agreementtest/simulate_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/asyncVoteVerifier.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/autopsy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/bundle.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/bundle_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify
@@ -258,7 +258,7 @@ func TestBundleCreationWithEquivocationVotes(t *testing.T) {
258258
require.Error(t, err)
259259

260260
evBadEVBundle := unauthenticatedBundles[4]
261-
evBadEVBundle.EquivocationVotes[0].Sigs = [2]crypto.OneTimeSignature{crypto.OneTimeSignature{}, crypto.OneTimeSignature{}}
261+
evBadEVBundle.EquivocationVotes[0].Sigs = [2]crypto.OneTimeSignature{{}, {}}
262262
_, err = evBadEVBundle.verify(context.Background(), ledger, avv)
263263
require.Error(t, err)
264264

agreement/cadaver.go

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify
@@ -68,11 +68,16 @@ func (c *cadaver) filename() string {
6868
}
6969

7070
func (c *cadaver) init() (err error) {
71-
f, err := os.OpenFile(c.filename(), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0666)
71+
f, err := os.OpenFile(c.filename(), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0600)
7272
if err != nil {
7373
return fmt.Errorf("cadaver: failed to create file %v: %v", c.filename(), err)
7474
}
7575

76+
err = f.Chmod(0666)
77+
if err != nil {
78+
return err
79+
}
80+
7681
c.out, err = makeCadaverHandle(f)
7782
if err != nil {
7883
return err
@@ -116,8 +121,11 @@ func (c *cadaver) trySetup() bool {
116121
}
117122

118123
if c.out.bytesWritten >= c.fileSizeTarget {
119-
c.out.Close()
120-
err := os.Rename(c.filename(), c.filename()+".archive")
124+
err := c.out.Close()
125+
if err != nil {
126+
logging.Base().Warn("unable to close cadaver file : %v", err)
127+
}
128+
err = os.Rename(c.filename(), c.filename()+".archive")
121129
if err != nil {
122130
if os.IsNotExist(err) {
123131
// we can't rename the cadaver file since it doesn't exists.

agreement/certificate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/certificate_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/common_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/coservice.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/cryptoRequestContext.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/cryptoRequestContext_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/cryptoVerifier.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/cryptoVerifier_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

agreement/demux.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2019-2020 Algorand, Inc.
1+
// Copyright (C) 2019-2021 Algorand, Inc.
22
// This file is part of go-algorand
33
//
44
// go-algorand is free software: you can redistribute it and/or modify

0 commit comments

Comments
 (0)