Skip to content

Commit 7cd7aef

Browse files
authored
Merge pull request #2059 from onetechnical/onetechnical/relstable2.5.4
go-algorand 2.5.4-stable
2 parents 573a34c + 7f7082d commit 7cd7aef

File tree

352 files changed

+21489
-13407
lines changed

Some content is hidden

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

352 files changed

+21489
-13407
lines changed

.github/ISSUE_TEMPLATE/algorand-engineering-team-issue-template.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ assignees: ''
99
---
1010

1111
## Summary
12-
*Describe the problem identified or the general goal of this issue*
12+
<!-- *Describe the problem identified or the general goal of this issue* -->
1313

1414
## Scope/Requirements
15-
*What's involved in this issue? What's required to achieve the goal?*
15+
<!-- *What's involved in this issue? What's required to achieve the goal?* -->
1616

1717
## Urgency/Relative Priority
18-
*How urgent is this issue? What are the timing considerations to take into account?*
18+
<!-- *How urgent is this issue? What are the timing considerations to take into account?* -->

.github/ISSUE_TEMPLATE/bug_report.md

+8-11
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,24 @@ assignees: ''
77

88
---
99

10-
<!--
11-
NOTE: If this issue relates to security, please use the vulnerability disclosure form here:
12-
https://www.algorand.com/resources/blog/security
13-
14-
General, developer or support questions concerning Algorand should be directed to the Algorand Forums https://forum.algorand.org/.
15-
-->
16-
1710
### Subject of the issue
18-
Describe your issue here.
11+
12+
<!-- Describe your issue here. -->
1913

2014
### Your environment
15+
16+
<!--
2117
* Software version: `algod -v`
2218
* Node status if applicable: `goal node status`
2319
* Operating System details.
2420
* In many cases log files and cadaver files are also useful to include. Since these files may be large, an Algorand developer may request them later. These files may include public addresses that you're participating with. If that is a concern please be sure to scrub that data.
21+
-->
2522

2623
### Steps to reproduce
27-
Tell us how to reproduce this issue.
24+
25+
1.
26+
2.
2827

2928
### Expected behaviour
30-
Tell us what should happen
3129

3230
### Actual behaviour
33-
Tell us what happens instead

.github/ISSUE_TEMPLATE/config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
contact_links:
2+
- name: ❓ Question and Help
3+
url: https://forum.algorand.org/
4+
about: The issue tracker is not for support questions. Please join our community for help and discussion.

.github/ISSUE_TEMPLATE/feature_request.md

+6-19
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,14 @@ assignees: ''
77

88
---
99

10-
<!--
11-
NOTE: If this issue relates to security, please use the vulnerability disclosure form here:
12-
https://www.algorand.com/resources/blog/security
10+
## Is your feature request related to a problem? Please describe.
1311

14-
General, developer or support questions concerning Algorand should be directed to the Algorand Forums https://forum.algorand.org/.
15-
-->
12+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1613

17-
<!--
18-
This project is focused on low level platform concerns. A good feature request would be related
19-
to protocol and network usage, debugging and monitoring tools, and goal commands.
14+
## Describe the solution you'd like.
2015

21-
Higher level suggestions relating to layer 2 applications (like wallet apps) are not appropriate here.
22-
-->
23-
**Is your feature request related to a problem? Please describe.**
16+
<!-- A clear and concise description of what you want to happen. -->
2417

25-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
18+
## Additional context.
2619

27-
**Describe the solution you'd like**
28-
29-
A clear and concise description of what you want to happen.
30-
31-
**Additional context**
32-
33-
Add any other context or screenshots about the feature request here.
20+
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/question.md

-19
This file was deleted.

.github/PULL_REQUEST_TEMPLATE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ It is also a good idea to run tests:
1515

1616
## Summary
1717

18-
Explain the goal of this change and what problem it is solving. Format this cleanly so that it may be used for a commit message, as your changes will be squash-merged.
18+
<!-- Explain the goal of this change and what problem it is solving. Format this cleanly so that it may be used for a commit message, as your changes will be squash-merged. -->
1919

2020
## Test Plan
2121

22-
How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale.
22+
<!-- How did you test these changes? Please provide the exact scenarios you tested in as much detail as possible including commands, output and rationale. -->

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ GOLDFLAGS := $(GOLDFLAGS_BASE) \
6868
UNIT_TEST_SOURCES := $(sort $(shell GOPATH=$(GOPATH) && GO111MODULE=off && go list ./... | grep -v /go-algorand/test/ ))
6969
ALGOD_API_PACKAGES := $(sort $(shell GOPATH=$(GOPATH) && GO111MODULE=off && cd daemon/algod/api; go list ./... ))
7070

71-
MSGP_GENERATE := ./protocol ./crypto ./crypto/compactcert ./data/basics ./data/transactions ./data/committee ./data/bookkeeping ./data/hashable ./auction ./agreement ./rpcs ./node ./ledger
71+
MSGP_GENERATE := ./protocol ./crypto ./crypto/compactcert ./data/basics ./data/transactions ./data/committee ./data/bookkeeping ./data/hashable ./auction ./agreement ./rpcs ./node ./ledger ./ledger/ledgercore ./compactcert
7272

7373
default: build
7474

SECURITY.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Vulnerability Disclosures
2+
3+
Algorand takes the security of the platform and of its users very seriously. We recognize the important role of external security researchers and developers in helping keep our community safe. As with most security reward programs, we ask that you use common sense when looking for security bugs. Vulnerabilities must be disclosed to us privately with reasonable time to respond, and avoid compromise of other users and accounts, or loss of funds that are not your own. We do not reward denial of service, spam, or social engineering vulnerabilities.
4+
5+
If you believe that you have found a security vulnerability you may disclose it here:
6+
7+
https://www.algorand.com/resources/blog/security

THANKS.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ In no particular order:
1212
- jsign
1313
- RomitKumar
1414
- jeapostrophe
15+
- aybehrouz
1516

1617
### Bug Reports
1718
- Nanyan

agreement/gossip/network.go

+17-7
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,23 @@ import (
3232

3333
var (
3434
voteBufferSize = 10000
35-
proposalBufferSize = 14
35+
proposalBufferSize = 25
3636
bundleBufferSize = 7
3737
)
3838

3939
var messagesHandled = metrics.MakeCounter(metrics.AgreementMessagesHandled)
4040
var messagesDropped = metrics.MakeCounter(metrics.AgreementMessagesDropped)
4141

42+
var agreementVoteMessage = map[string]string{
43+
"message_type": "vote",
44+
}
45+
var agreementProposalMessage = map[string]string{
46+
"message_type": "proposal",
47+
}
48+
var agreementBundleMessage = map[string]string{
49+
"message_type": "bundle",
50+
}
51+
4252
type messageMetadata struct {
4353
raw network.IncomingMessage
4454
}
@@ -92,32 +102,32 @@ func messageMetadataFromHandle(h agreement.MessageHandle) *messageMetadata {
92102
}
93103

94104
func (i *networkImpl) processVoteMessage(raw network.IncomingMessage) network.OutgoingMessage {
95-
return i.processMessage(raw, i.voteCh)
105+
return i.processMessage(raw, i.voteCh, agreementVoteMessage)
96106
}
97107

98108
func (i *networkImpl) processProposalMessage(raw network.IncomingMessage) network.OutgoingMessage {
99109
if i.trace != nil {
100110
i.trace.HashTrace(messagetracer.Proposal, raw.Data)
101111
}
102-
return i.processMessage(raw, i.proposalCh)
112+
return i.processMessage(raw, i.proposalCh, agreementProposalMessage)
103113
}
104114

105115
func (i *networkImpl) processBundleMessage(raw network.IncomingMessage) network.OutgoingMessage {
106-
return i.processMessage(raw, i.bundleCh)
116+
return i.processMessage(raw, i.bundleCh, agreementBundleMessage)
107117
}
108118

109119
// i.e. process<Type>Message
110-
func (i *networkImpl) processMessage(raw network.IncomingMessage, submit chan<- agreement.Message) network.OutgoingMessage {
120+
func (i *networkImpl) processMessage(raw network.IncomingMessage, submit chan<- agreement.Message, msgType map[string]string) network.OutgoingMessage {
111121
metadata := &messageMetadata{raw: raw}
112122

113123
select {
114124
case submit <- agreement.Message{MessageHandle: agreement.MessageHandle(metadata), Data: raw.Data}:
115125
// It would be slightly better to measure at de-queue
116126
// time, but that happens in many places in code and
117127
// this is much easier.
118-
messagesHandled.Inc(nil)
128+
messagesHandled.Inc(msgType)
119129
default:
120-
messagesDropped.Inc(nil)
130+
messagesDropped.Inc(msgType)
121131
}
122132

123133
// Immediately ignore everything here, sometimes Relay/Broadcast/Disconnect later based on API handles saved from IncomingMessage

0 commit comments

Comments
 (0)