Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
69538bf
Bump mainnet pregen to 1.0. (#569)
derbear Dec 6, 2019
a47ce94
add lease to asset cmds (#575)
justicz Dec 6, 2019
b08388f
fix Disassemble when multiple bnz have the same target label (#612)
algobolson Dec 6, 2019
7154d83
Replacing apt by apt-get (#610)
tsachiherman Dec 6, 2019
fe3e404
Add PeerConnections to network telemetry (#607)
tsachiherman Dec 9, 2019
0794c74
Fix license errors, enable check_license in travis.
winder Dec 9, 2019
0d7e0e3
Remove trailing whitespace.
winder Dec 9, 2019
1c5668b
Merge pull request #617 from winder/will/license
winder Dec 10, 2019
adf0e16
add ?raw=1 to local block api to return msgpack bytes with full data …
algobolson Dec 10, 2019
44d05ed
Let dsign sign arbitrary bytes, not just txids (#577)
justicz Dec 10, 2019
8105bc1
Add markdown docs for `limit-order-a`, Fix `hltc` -> `htlc` (#619)
justicz Dec 10, 2019
30e0ac2
Created `test_release.sh` to test centos|fedora|ubuntu images (#613)
Dec 12, 2019
75fb4f6
Simplified the release scripts that build images to push to docker hu…
Dec 12, 2019
505c1be
Add `export SHELLOPTS` to teal tests. (#627)
tsachiherman Dec 13, 2019
3e3def5
Add `goal ledger block` (#622)
justicz Dec 13, 2019
c6690c2
Bring `shellcheck` into the build process (#626)
Dec 13, 2019
d0d5756
Fix issue on macOS to make script portable (#632)
Dec 13, 2019
5660d44
Remove "Created new rootkey/partkey" spam message. (#629)
tsachiherman Dec 13, 2019
26a670b
fix asset unit name display in goal account list (#633)
justicz Dec 13, 2019
884d381
Ensure that the proper channel is passed to `test_release.sh` (#634)
Dec 15, 2019
c0ec149
Minor improvements to `test_release.sh` script (#636)
Dec 15, 2019
06a488d
Cleanup evalAux (#628)
algobolson Dec 16, 2019
85de479
Add --no-sig flag to goal clerk multisig sign (#647)
justicz Dec 18, 2019
682d010
Scan for ledger wallets more often (#638)
justicz Dec 18, 2019
6a87f05
Exit early if `test_release.sh` script fails (#643)
Dec 18, 2019
9381ae5
Improve missing msig preimage error message (#648)
justicz Dec 19, 2019
e5dc535
Add support for https for telemetry servers (#649)
tsachiherman Dec 19, 2019
11df44e
goal listpartkeys display error (#641)
EvanJRichard Dec 19, 2019
4190952
Fixing arm64 environment issues (#653)
algonautshant Dec 19, 2019
c798dda
Test pre-packaged executable on variety of linux platforms (#651)
tsachiherman Dec 19, 2019
4748b3a
Reduce e2e_go_tests execution time twice (#645)
algorandskiy Dec 20, 2019
eb4feed
Promote test_release.sh so that it won't conflict with release testin…
tsachiherman Dec 20, 2019
1a3cd5b
Fix concurrent access to wallet handles cache in goal (#654)
algorandskiy Dec 20, 2019
7a415e4
Allow upgrades to specify the delay before their execution. (#650)
derbear Dec 20, 2019
c8c1c65
Set explicit 30 sec timeout for AlgorandGoal::RawSend in expect test …
algorandskiy Dec 20, 2019
b567a39
Support variable-delay protocol upgrades in ConsensusFuture. (#659)
derbear Dec 21, 2019
cba838a
Shant/catchup stop on unapproved (#660)
algonautshant Dec 24, 2019
b24197a
Compile linux/amd64 binaries with static linking (#625)
tsachiherman Dec 24, 2019
d1967db
Add logging for the telemetry server connections (#661)
tsachiherman Dec 26, 2019
ed42d95
add bool support to algocfg (#667)
algobolson Dec 27, 2019
20aa23d
Reduce execution time of expect tests (#665)
algorandskiy Dec 28, 2019
8ce4a5a
Avoid upgrading boost on travis Mac builds (#669)
tsachiherman Dec 30, 2019
5e5ac76
Abort algod startup if logging.config file has bad permissions (#662)
algorandskiy Dec 30, 2019
ddd8f75
Add error logging for getting a cached wallet handle (#663)
algorandskiy Dec 30, 2019
634be19
Update license date 2019 -> 2020 (#674)
tsachiherman Jan 2, 2020
87aecab
Update copyright to use date range. (#676)
tsachiherman Jan 2, 2020
e8bdd1b
Tee existing tests so we can review output before piping it forward. …
tsachiherman Jan 2, 2020
aae9e23
Make gracefull exit of a node that is waiting for WaitForBlock call (…
tsachiherman Jan 3, 2020
fdf8c9c
Remove tput where not supported by terminal (#682)
tsachiherman Jan 3, 2020
9e46478
Avoid waiting for block that won't be reached due to unsupported prot…
tsachiherman Jan 4, 2020
a9e76b8
Fix - Indexer now shows received transactions (#684)
algorotem Jan 4, 2020
373bf50
Undo teeing to dev/tty as it doesn't work well in terminal free envir…
tsachiherman Jan 6, 2020
60ebba7
Improve lockFile error handling (#687)
tsachiherman Jan 6, 2020
677eac3
Catchup service stop on unsupported and e2e test (#685)
algonautshant Jan 6, 2020
56f32c3
Make ARM64 build mandatory. (#694)
tsachiherman Jan 7, 2020
95b412d
Updates to the goal node status (#686)
algonautshant Jan 8, 2020
0d56cc1
telemetry recorded locally as info log (#666)
algobolson Jan 8, 2020
e2ec09c
Relax StartNetwork regex (#696)
tsachiherman Jan 8, 2020
4ffad8c
Two fixes to basicCatchup_test: cloned node not stopped and env var …
algonautshant Jan 8, 2020
b9b1c7a
Make scripts executable. (#702)
winder Jan 9, 2020
2889875
More reliable fetcher unit tests. (#708)
tsachiherman Jan 9, 2020
3077900
Avoid starting the Telemetry service when logging is disabled (#703)
algobolson Jan 9, 2020
3e867cf
Shutdown kmd when test fixture is going down. (#709)
tsachiherman Jan 10, 2020
c1386bc
Fix unit test. (#711)
tsachiherman Jan 10, 2020
996d77b
Execute e2e tests one at a time on arm64 (#701)
tsachiherman Jan 13, 2020
3938750
Disable pprof endpoints by default (#693)
justicz Jan 13, 2020
45edbfe
Update the makefile to skip the static linking when compiling on cent…
tsachiherman Jan 15, 2020
74fdee9
Fail e2e-go tests when node panics (#699)
tsachiherman Jan 15, 2020
6ce5b7b
Build release job (#698)
Jan 15, 2020
ba9db7e
Use service-wide logger instead of logging.Base() in agreement (#714)
algorandskiy Jan 15, 2020
865cb28
Mark some of the slow e2e tests as such (#719)
tsachiherman Jan 16, 2020
98314a4
Wait test less restrictive. (#718)
tsachiherman Jan 16, 2020
bc293db
Move slow test to get executed on nightly builds (#721)
tsachiherman Jan 17, 2020
4c57590
Faster upgrade tests. (#722)
tsachiherman Jan 18, 2020
983456f
Disable failing test. (#724)
tsachiherman Jan 20, 2020
7828b4c
Generate docs for algokey.
winder Jan 21, 2020
e2e93e5
s/goal/algokey
winder Jan 21, 2020
a3edaa6
Merge pull request #727 from winder/will/algokey
winder Jan 21, 2020
4f4a372
Improve algons error logging (#733)
tsachiherman Jan 22, 2020
c78ada0
ledger/eval refactor (#700)
algobolson Jan 22, 2020
ec4d9b5
Fix a bug in Credential.lowestOutput caused by improper domain separa…
algoradam Jan 22, 2020
1c3ffa9
Goal docs tweaks (#731)
EvanJRichard Jan 22, 2020
9d26c45
test all `goal ... -h` (#730)
algobolson Jan 22, 2020
7c9b02e
Move EnsureDigest logic into the catchup service (#726)
tsachiherman Jan 23, 2020
1a204c3
Faster stringer implementation for Address (#736)
tsachiherman Jan 23, 2020
b695571
Interconnect relays on a locally deployed network (#742)
tsachiherman Jan 24, 2020
add8ea7
static codegen for msgpack encode/decode (#578)
zeldovich Jan 27, 2020
915e3d7
Use cobra for the kmd command to allow for documentation automation.
winder Jan 27, 2020
2a803e7
Limit client side connection rate, part 1
algonautshant Jan 28, 2020
518ff9b
Fix checkdep message. (#745)
tsachiherman Jan 28, 2020
cf542f3
Fix equal stake distribution in generated networks (#749)
algorandskiy Jan 28, 2020
a03f050
Update with PR feedback.
winder Jan 28, 2020
7b36773
Merge pull request #747 from winder/will/kmd-docs
winder Jan 28, 2020
427f044
Change a player test to use either old buggy behavior or new correct …
algoradam Jan 28, 2020
94c2289
Bugfix: Fix last relevant proposal period in agreement protocol. (#746)
derbear Jan 28, 2020
7d8cbc6
Format numbers using number specifier (#735)
tsachiherman Jan 29, 2020
7bae0d4
Implement local net template generation with netgoal (#762)
algorandskiy Jan 30, 2020
9cae5ce
Improve net templates support (#766)
algorandskiy Jan 31, 2020
92c3808
Release build pipeline step 1: Build, package, sign, deploy to stagin…
Jan 31, 2020
dc3cca7
Implement automation for release notes generator (#761)
bricerisingalgorand Jan 31, 2020
db79a7e
back out locking added in c78ada09f230a3c66cd934860700f93ff31a93eb (#…
algobolson Jan 31, 2020
f81ad46
Implement dummy telemetry hook to safely perform operations on it whe…
algorandskiy Jan 31, 2020
48ec0e3
Remove instances of tagging in our build process (#770)
bricerisingalgorand Feb 1, 2020
0366cda
Configurable consensus protocol (#750)
tsachiherman Feb 1, 2020
08c958b
Release build pipeline step 2: Test (#773)
Feb 2, 2020
98c50c3
When locally installing, take the binaries from the first-gopath-bin …
tsachiherman Feb 3, 2020
a728635
Remove temporary build test location (#777)
Feb 3, 2020
07c33b6
Make sure to default to Consensus if consensus.json is missing. (#779)
tsachiherman Feb 3, 2020
e33c707
Make util.ExecAndCaptureOutput able to process large output (#771)
algorandskiy Feb 4, 2020
39563e4
Make goal node state change commands systemd aware (#769)
bricerisingalgorand Feb 4, 2020
fd3502f
Restructure release/ dir (#782)
Feb 5, 2020
eb090a0
Allow asset creation transactions to be created while catching up. (#…
winder Feb 6, 2020
e523a9a
Tunnel outgoing connection via a rate limiting dialer (#780)
algonautshant Feb 7, 2020
a4b7b13
Release build pipeline step 3: Added "prod" pipeline to `release/` (#…
Feb 7, 2020
1fe3ede
better algons error messages. (#794)
tsachiherman Feb 8, 2020
669e201
Create a rate limiting transport (#795)
tsachiherman Feb 8, 2020
3b131c0
Some release abstraction (#796)
Feb 8, 2020
43a7bf3
Change agreement message encoder to msgp. (#786)
derbear Feb 10, 2020
06541c1
Move fetcher client into catchup (#774)
tsachiherman Feb 10, 2020
e6e10b6
Fix gpg keygrip code and remove old code (#797)
Feb 10, 2020
2d10f42
bugfix : compile correctly teal program that includes a base64 string…
tsachiherman Feb 10, 2020
f8c96f8
Add support for multiple network protocol versions (#799)
tsachiherman Feb 11, 2020
a88dc6c
Include comment about something that looks like a vulnerability, but …
winder Feb 12, 2020
b202739
Skip logging and telemetry when not needed. (#737)
tsachiherman Feb 12, 2020
7200f85
Added utils for testing release packages (#819)
Feb 12, 2020
b327326
Update docker build script to be more flexible with its naming (#822)
Feb 12, 2020
96848ab
Deleting out-of-date wallet folder in go-algorand. (#821)
algonautshant Feb 13, 2020
1d89a5f
Some build fixes (#818)
Feb 13, 2020
ff62b1c
Move `dsign` functionality to goal (#800)
justicz Feb 13, 2020
b0f840d
Deferred persistent crash data validation (#823)
tsachiherman Feb 13, 2020
93bc36e
Update Dockerfile for our official docker image (#826)
Feb 14, 2020
a9e8921
fix incorrect comments (#825)
stechu Feb 14, 2020
38bc057
Reduce the log verbosity on scenario 3 deployed network (#828)
tsachiherman Feb 15, 2020
67eac24
Trigger test build (#831)
Feb 15, 2020
3ce4f96
More release build fixes (#836)
Feb 18, 2020
4bb8833
Split consensus from config (#832)
tsachiherman Feb 18, 2020
68c29d2
netgoal: create accounts in parallel (#827)
tsachiherman Feb 18, 2020
2315c86
Updated job name to match on the Jenkins server (#837)
Feb 18, 2020
807464a
Brice/refactor make (#835)
bricerisingalgorand Feb 20, 2020
6900018
Run build and test jobs in a docker container (#840)
Feb 20, 2020
dec7b46
Brice/fix deploy linux (#767)
bricerisingalgorand Feb 20, 2020
2a5af54
Limit msgp tool warning message scope (#834)
tsachiherman Feb 21, 2020
c98e0f6
Refactoring peer unicast implementation (#841)
algonautshant Feb 24, 2020
1d0774c
Actively scan for ledgers, normalize names cross platform (#842)
justicz Feb 24, 2020
4245798
require Encode() and Decode() to take msgp'ed types (#798)
zeldovich Feb 24, 2020
de9b0d4
Change EnsureDigest to be asynchronous. (#754)
derbear Feb 24, 2020
42a76ec
Strip any defined remote repo from branch name when building (#850)
Feb 25, 2020
1a9b7be
Implement DNSSEC resolving library (#830)
algorandskiy Feb 26, 2020
7bdb4dd
disable the concurrent wallet generation. (#848)
tsachiherman Feb 26, 2020
0c7de70
Force docker to use `root` as the user when running the instance (#849)
Feb 26, 2020
b3af4db
Improve some error checking and logging for build process (#851)
Feb 26, 2020
58f2a77
Fix comment in agreement. (#856)
derbear Feb 26, 2020
6cbb465
Add MoI to network (#853)
tsachiherman Feb 26, 2020
face49d
Better error case handling in database utils (#857)
tsachiherman Feb 27, 2020
a87b54d
Explicitly curl go.1.12.9 and archive `get_latest_go.py` (#855)
Feb 27, 2020
2a2d83e
Trap errors and remove ec2 instance (#854)
Feb 27, 2020
9c1cd53
Update the update script. (#670)
tsachiherman Feb 28, 2020
591db9a
Faster external_build_printlog by using curl instead of aws cli (#847)
tsachiherman Feb 28, 2020
d5ec1ac
Fix concurrent SQLite initialization (#872)
algorandskiy Feb 28, 2020
e5697c3
change _tx_lock -> _txlock (#871)
justicz Feb 28, 2020
4748cd2
Redirect stdout of build log file to build release upload directory (…
Feb 28, 2020
7f5d074
Install boto3 as a build dependency for docker (#875)
Feb 29, 2020
823169b
Enable some skipped test on MacOS (#876)
algorandskiy Feb 29, 2020
7816d22
Set root as explicit docker user for test phase (#874)
Mar 1, 2020
25cea0e
Refactor are combine the phonebook implementations (#870)
algonautshant Mar 2, 2020
36afe15
Adding a verifying signatures step to the build release pipeline (#878)
Mar 3, 2020
02e7105
fix typo in check_deps.sh message (#884)
Mar 3, 2020
94c0117
Update list of DNSSEC-aware resolvers (#883)
algorandskiy Mar 4, 2020
e83ead7
Fixing error reporting to read from the stream. (#887)
algonautshant Mar 4, 2020
fc6b4ce
Shoehorn `test_package.sh` into the test phase (#877)
tsachiherman Mar 4, 2020
e623fea
Brice/refactor cicd stages to use persistent fields (#879)
tsachiherman Mar 5, 2020
3e0123f
Strip remote repo name from branch variable name in build release pip…
Mar 6, 2020
3bb38cb
Support of older kernels for locking files (#895)
fabrice102 Mar 6, 2020
9cdb92e
Remove the phonebook from the node (#893)
algonautshant Mar 6, 2020
7ec0edb
Rename cicd.yaml to mule.yaml (#894)
bricerisingalgorand Mar 6, 2020
aa75252
Add sqlite3 as a dependency (#891)
fabrice102 Mar 6, 2020
cd54fdb
Catchupsrv tars (#881)
algobolson Mar 10, 2020
813b26d
Extend timeouts for simulate_test and service_test to support (#905)
egieseke Mar 12, 2020
25d0d6e
shellchecked `build_deb.sh` (#882)
Mar 17, 2020
7b17012
Update network disconnection logic (#668)
tsachiherman Mar 17, 2020
9ac9413
Fix silent failure in test phase (#899)
Mar 17, 2020
5651048
telemetryhook gets stuck during shutdown (#888)
algonautshant Mar 19, 2020
1de930d
Add the originating error message on a failed Block retrieval (#920)
tsachiherman Mar 20, 2020
4b6882a
Add retry for creating a DB connection (#918)
tsachiherman Mar 20, 2020
cea8009
Catchup service through gossip connections using the topics (#913)
algonautshant Mar 20, 2020
f83485a
Merge branch 'master' into johnlee/beta2.0.12
onetechnical Mar 20, 2020
f925c31
Remove duplicate PeerConnectionsUpdateInterval in local_defaults.go
onetechnical Mar 20, 2020
c044089
Remove runtime import breaking asset_test.go and restClient_test.go
onetechnical Mar 23, 2020
e0fd6d0
Fix for TestCatchupOverGossip failed in nightly (#926)
algonautshant Mar 23, 2020
fb6bae6
Roll back temporary debug printing. (#927)
tsachiherman Mar 23, 2020
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
44 changes: 44 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
*.log
*.log.archive
*.out
*.prof
coverage.html

# cadaver
*.cdv
*.cdv.archive

# swagger
swagger.json
swagger.json.validated
kmdSwaggerWrappers.go
bundledSpecInject.go

# Exclude GoLand files
.idea/

# Exclude VSCode files
.vscode/

# Exclude go binaries built in-place
cmd/algod/algod
cmd/goal/goal
cmd/updater/updater

# Exclude our local temp directory
tmp/dev_pkg
tmp/out
tmp/node_pkgs

# Ignore vim backup and swap files
*~
*.swp
*.swo

# Mac
.DS_Store

# doc intermediates
data/transactions/logic/*.md

*.pem
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ crypto/libsodium-fork/**/Makefile.in
crypto/libsodium-fork/aclocal.m4
crypto/libsodium-fork/build-aux/

# Ignore libsodium files generated during ci process
crypto/copies
crypto/libs

# Ignore vim backup and swap files
*~
*.swp
Expand All @@ -54,3 +58,6 @@ data/transactions/logic/*.md

*.pem

# Folder for collecting release assets
assets

40 changes: 31 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export GO111MODULE
UNAME := $(shell uname)
SRCPATH := $(shell pwd)
ARCH := $(shell ./scripts/archtype.sh)
OS_TYPE := $(shell ./scripts/ostype.sh)

# If build number already set, use it - to ensure same build number across multiple platforms being built
BUILDNUMBER ?= $(shell ./scripts/compute_build_number.sh)
Expand All @@ -27,6 +28,13 @@ endif
GOTAGSLIST += osusergo netgo static_build
GOBUILDMODE := -buildmode pie
endif
ifeq ($(ARCH), arm)
ifneq ("$(wildcard /etc/alpine-release)","")
EXTLDFLAGS += -static
GOTAGSLIST += osusergo netgo static_build
GOBUILDMODE := -buildmode pie
endif
endif
endif

GOTAGS := --tags "$(GOTAGSLIST)"
Expand All @@ -44,7 +52,7 @@ GOLDFLAGS := $(GOLDFLAGS_BASE) \
UNIT_TEST_SOURCES := $(sort $(shell GO111MODULE=off go list ./... | grep -v /go-algorand/test/ ))
ALGOD_API_PACKAGES := $(sort $(shell GO111MODULE=off cd daemon/algod/api; go list ./... ))

MSGP_GENERATE := ./protocol ./crypto ./data/basics ./data/transactions ./data/committee ./data/bookkeeping ./data/hashable ./auction ./agreement
MSGP_GENERATE := ./protocol ./crypto ./data/basics ./data/transactions ./data/committee ./data/bookkeeping ./data/hashable ./auction ./agreement ./rpcs ./node

default: build

Expand Down Expand Up @@ -85,14 +93,16 @@ generate: deps
msgp: $(patsubst %,%/msgp_gen.go,$(MSGP_GENERATE))

%/msgp_gen.go: deps ALWAYS
$(GOPATH1)/bin/msgp -file ./$(@D) -o $@ 1>/dev/null
$(GOPATH1)/bin/msgp -file ./$(@D) -o $@ -warnmask github.com/algorand/go-algorand
ALWAYS:

# build our fork of libsodium, placing artifacts into crypto/lib/ and crypto/include/
crypto/lib/libsodium.a:
cd crypto/libsodium-fork && \
./autogen.sh && \
./configure --disable-shared --prefix="$(SRCPATH)/crypto/" && \
crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a:
mkdir -p crypto/copies/$(OS_TYPE)/$(ARCH)
cp -R crypto/libsodium-fork crypto/copies/$(OS_TYPE)/$(ARCH)/libsodium-fork
cd crypto/copies/$(OS_TYPE)/$(ARCH)/libsodium-fork && \
./autogen.sh --prefix $(SRCPATH)/crypto/libs/$(OS_TYPE)/$(ARCH) && \
./configure --disable-shared --prefix="$(SRCPATH)/crypto/libs/$(OS_TYPE)/$(ARCH)" && \
$(MAKE) && \
$(MAKE) install

Expand All @@ -108,7 +118,7 @@ ALGOD_API_FILES := $(shell find daemon/algod/api/server/common daemon/algod/api/
ALGOD_API_SWAGGER_INJECT := daemon/algod/api/server/lib/bundledSpecInject.go

# Note that swagger.json requires the go-swagger dep.
$(ALGOD_API_SWAGGER_SPEC): $(ALGOD_API_FILES) crypto/lib/libsodium.a
$(ALGOD_API_SWAGGER_SPEC): $(ALGOD_API_FILES) crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a
cd daemon/algod/api && \
PATH=$(GOPATH1)/bin:$$PATH \
go generate ./...
Expand All @@ -122,7 +132,7 @@ KMD_API_FILES := $(shell find daemon/kmd/api/ -type f | grep -v $(KMD_API_SWAGGE
KMD_API_SWAGGER_WRAPPER := kmdSwaggerWrappers.go
KMD_API_SWAGGER_INJECT := daemon/kmd/lib/kmdapi/bundledSpecInject.go

$(KMD_API_SWAGGER_SPEC): $(KMD_API_FILES) crypto/lib/libsodium.a
$(KMD_API_SWAGGER_SPEC): $(KMD_API_FILES) crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a
cd daemon/kmd/lib/kmdapi && \
python genSwaggerWrappers.py $(KMD_API_SWAGGER_WRAPPER)
cd daemon/kmd && \
Expand All @@ -147,7 +157,7 @@ $(KMD_API_SWAGGER_INJECT): $(KMD_API_SWAGGER_SPEC) $(KMD_API_SWAGGER_SPEC).valid

build: buildsrc gen

buildsrc: crypto/lib/libsodium.a node_exporter NONGO_BIN deps $(ALGOD_API_SWAGGER_INJECT) $(KMD_API_SWAGGER_INJECT)
buildsrc: crypto/libs/$(OS_TYPE)/$(ARCH)/lib/libsodium.a node_exporter NONGO_BIN deps $(ALGOD_API_SWAGGER_INJECT) $(KMD_API_SWAGGER_INJECT)
go install $(GOTRIMPATH) $(GOTAGS) $(GOBUILDMODE) -ldflags="$(GOLDFLAGS)" ./...

SOURCES_RACE := github.com/algorand/go-algorand/cmd/kmd
Expand Down Expand Up @@ -209,6 +219,8 @@ clean:
cd crypto/libsodium-fork && \
test ! -e Makefile || make clean
rm -rf crypto/lib
rm -rf crypto/libs
rm -rf crypto/copies

# clean without crypto
cleango:
Expand Down Expand Up @@ -265,3 +277,13 @@ install: build
scripts/dev_install.sh -p $(GOPATH1)/bin

.PHONY: default fmt vet lint check_license check_shell sanity cover prof deps build test fulltest shorttest clean cleango deploy node_exporter install %gen gen NONGO_BIN

### TARGETS FOR CICD PROCESS

ci-deps:
scripts/configure_dev-deps.sh && \
scripts/check_deps.sh

ci-build: buildsrc gen
mkdir -p $(SRCPATH)/tmp/node_pkgs/$(OS_TYPE)/$(ARCH) && \
PKG_ROOT=$(SRCPATH)/tmp/node_pkgs/$(OS_TYPE)/$(ARCH) NO_BUILD=True VARIATIONS=$(OS_TYPE)/$(ARCH) scripts/build_packages.sh $(OS_TYPE)/$(ARCH)
8 changes: 4 additions & 4 deletions agreement/abstractions.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,9 @@ type LedgerWriter interface {
// as above.
EnsureValidatedBlock(ValidatedBlock, Certificate)

// EnsureDigest waits until some Block that corresponds to a given
// Certificate appears in the ledger. EnsureDigest does not wait for
// the block to be written to disk; use Wait() if needed.
// EnsureDigest signals the Ledger to attempt to fetch a Block matching
// the given Certificate. EnsureDigest does not wait for the block to
// be written to disk; use Wait() if needed.
//
// The Ledger must guarantee that after this method returns, any Seed,
// Record, or Circulation call reflects the contents of the Block
Expand All @@ -215,7 +215,7 @@ type LedgerWriter interface {
// this is the case, the behavior of Ledger is undefined.
// (Implementations are encouraged to panic or otherwise fail loudly in
// this case, because it means that a fork has occurred.)
EnsureDigest(Certificate, chan struct{}, *AsyncVoteVerifier)
EnsureDigest(Certificate, *AsyncVoteVerifier)
}

// A KeyManager stores and deletes participation keys.
Expand Down
79 changes: 51 additions & 28 deletions agreement/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const (

// ledger
ensure
stageDigest

// time
rezero
Expand Down Expand Up @@ -123,7 +124,7 @@ func (a networkAction) do(ctx context.Context, s *Service) {
if a.T == broadcastVotes {
tag := protocol.AgreementVoteTag
for i, uv := range a.UnauthenticatedVotes {
data := protocol.Encode(uv)
data := protocol.Encode(&uv)
sendErr := s.Network.Broadcast(tag, data)
if sendErr != nil {
s.log.Warnf("Network was unable to queue votes for broadcast(%v). %d / %d votes for round %d period %d step %d were dropped.",
Expand All @@ -144,16 +145,16 @@ func (a networkAction) do(ctx context.Context, s *Service) {
var data []byte
switch a.Tag {
case protocol.AgreementVoteTag:
data = protocol.Encode(a.UnauthenticatedVote)
data = protocol.Encode(&a.UnauthenticatedVote)
case protocol.VoteBundleTag:
data = protocol.Encode(a.UnauthenticatedBundle)
data = protocol.Encode(&a.UnauthenticatedBundle)
case protocol.ProposalPayloadTag:
msg := a.CompoundMessage
payload := transmittedPayload{
unauthenticatedProposal: msg.Proposal,
PriorVote: msg.Vote,
}
data = protocol.Encode(payload)
data = protocol.Encode(&payload)
}

switch a.T {
Expand All @@ -178,6 +179,7 @@ type cryptoAction struct {
Proposal proposalValue // TODO deprecate
Round round
Period period
Step step
Pinned bool
TaskIndex int
}
Expand All @@ -197,15 +199,16 @@ func (a cryptoAction) do(ctx context.Context, s *Service) {
case verifyPayload:
s.demux.verifyPayload(ctx, a.M, a.Round, a.Period, a.Pinned)
case verifyBundle:
s.demux.verifyBundle(ctx, a.M, a.Round, a.Period)
s.demux.verifyBundle(ctx, a.M, a.Round, a.Period, a.Step)
}
}

type ensureAction struct {
nonpersistent

Payload proposal
PayloadOk bool
// the payload that we will give to the ledger
Payload proposal
// the certificate proving commitment
Certificate Certificate
}

Expand All @@ -214,7 +217,7 @@ func (a ensureAction) t() actionType {
}

func (a ensureAction) String() string {
return fmt.Sprintf("%v: %.5v", a.t().String(), a.Payload.Digest().String())
return fmt.Sprintf("%s: %.5s: %v, %v, %.5s", a.t().String(), a.Payload.Digest().String(), a.Certificate.Round, a.Certificate.Period, a.Certificate.Proposal.BlockDigest.String())
}

func (a ensureAction) do(ctx context.Context, s *Service) {
Expand All @@ -227,7 +230,7 @@ func (a ensureAction) do(ctx context.Context, s *Service) {

if a.Payload.ve != nil {
logEvent.Type = logspec.RoundConcluded
s.log.with(logEvent).Infof("committed round %v with pre-validated block %v", a.Certificate.Round, a.Certificate.Proposal)
s.log.with(logEvent).Infof("committed round %d with pre-validated block %v", a.Certificate.Round, a.Certificate.Proposal)
s.log.EventWithDetails(telemetryspec.Agreement, telemetryspec.BlockAcceptedEvent, telemetryspec.BlockAcceptedEventDetails{
Address: a.Certificate.Proposal.OriginalProposer.String(),
Hash: a.Certificate.Proposal.BlockDigest.String(),
Expand All @@ -236,28 +239,48 @@ func (a ensureAction) do(ctx context.Context, s *Service) {
s.Ledger.EnsureValidatedBlock(a.Payload.ve, a.Certificate)
} else {
block := a.Payload.Block
if !a.PayloadOk {
logEvent.Type = logspec.RoundWaiting
s.log.with(logEvent).Infof("round %v concluded without block for %v; waiting on ledger", a.Certificate.Round, a.Certificate.Proposal)
s.Ledger.EnsureDigest(a.Certificate, s.quit, s.voteVerifier)
} else {
logEvent.Type = logspec.RoundConcluded
s.log.with(logEvent).Infof("committed round %v with block %v", a.Certificate.Round, a.Certificate.Proposal)
s.log.EventWithDetails(telemetryspec.Agreement, telemetryspec.BlockAcceptedEvent, telemetryspec.BlockAcceptedEventDetails{
Address: a.Certificate.Proposal.OriginalProposer.String(),
Hash: a.Certificate.Proposal.BlockDigest.String(),
Round: uint64(a.Certificate.Round),
})
s.Ledger.EnsureBlock(block, a.Certificate)
}
logEvent.Type = logspec.RoundConcluded
s.log.with(logEvent).Infof("committed round %d with block %v", a.Certificate.Round, a.Certificate.Proposal)
s.log.EventWithDetails(telemetryspec.Agreement, telemetryspec.BlockAcceptedEvent, telemetryspec.BlockAcceptedEventDetails{
Address: a.Certificate.Proposal.OriginalProposer.String(),
Hash: a.Certificate.Proposal.BlockDigest.String(),
Round: uint64(a.Certificate.Round),
})
s.Ledger.EnsureBlock(block, a.Certificate)
}
logEventStart := logEvent
logEventStart.Type = logspec.RoundStart
s.log.with(logEventStart).Infof("finished round %v", a.Certificate.Round)
s.log.with(logEventStart).Infof("finished round %d", a.Certificate.Round)
s.tracer.timeR().StartRound(a.Certificate.Round + 1)
s.tracer.timeR().RecStep(0, propose, bottom)
}

type stageDigestAction struct {
nonpersistent
// Certificate identifies a block and is a proof commitment
Certificate Certificate // a block digest is probably sufficient; keep certificate for now to match ledger interface
}

func (a stageDigestAction) t() actionType {
return stageDigest
}

func (a stageDigestAction) String() string {
return fmt.Sprintf("%s: %.5s. %v. %v", a.t().String(), a.Certificate.Proposal.BlockDigest.String(), a.Certificate.Round, a.Certificate.Period)
}

func (a stageDigestAction) do(ctx context.Context, service *Service) {
logEvent := logspec.AgreementEvent{
Hash: a.Certificate.Proposal.BlockDigest.String(),
Round: uint64(a.Certificate.Round),
Period: uint64(a.Certificate.Period),
Sender: a.Certificate.Proposal.OriginalProposer.String(),
Type: logspec.RoundWaiting,
}
service.log.with(logEvent).Infof("round %v concluded without block for %v; (async) waiting on ledger", a.Certificate.Round, a.Certificate.Proposal)
service.Ledger.EnsureDigest(a.Certificate, service.voteVerifier)
}

type rezeroAction struct {
nonpersistent

Expand Down Expand Up @@ -408,10 +431,6 @@ func relayAction(e messageEvent, tag protocol.Tag, o interface{}) action {
return a
}

func verifyBundleAction(e messageEvent, r round, p period) action {
return cryptoAction{T: verifyBundle, M: e.Input, Round: r, Period: p}
}

func verifyVoteAction(e messageEvent, r round, p period, taskIndex int) action {
return cryptoAction{T: verifyVote, M: e.Input, Round: r, Period: p, TaskIndex: taskIndex}
}
Expand All @@ -420,6 +439,10 @@ func verifyPayloadAction(e messageEvent, r round, p period, pinned bool) action
return cryptoAction{T: verifyPayload, M: e.Input, Round: r, Period: p, Pinned: pinned}
}

func verifyBundleAction(e messageEvent, r round, p period, s step) action {
return cryptoAction{T: verifyBundle, M: e.Input, Round: r, Period: p, Step: s}
}

func zeroAction(t actionType) action {
switch t {
case noop:
Expand Down
15 changes: 8 additions & 7 deletions agreement/actiontype_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading