-
Notifications
You must be signed in to change notification settings - Fork 471
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
Enhancement: minor change in agreement/type.go
comment, numbers are not matching
#5186
Conversation
afceb71
to
f2ec0fd
Compare
f2ec0fd
to
50e6fe0
Compare
Codecov Report
@@ Coverage Diff @@
## master #5186 +/- ##
==========================================
+ Coverage 53.51% 53.52% +0.01%
==========================================
Files 439 439
Lines 54985 54985
==========================================
+ Hits 29423 29430 +7
+ Misses 23271 23267 -4
+ Partials 2291 2288 -3
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
||
for i := next; i < s; i++ { | ||
extra *= 2 | ||
lower = upper | ||
upper = lower + extra | ||
} | ||
|
||
// e.g. if s == 14 | ||
// extra = 2 ^ 8 * 2500ms = 256 * 2.5 = 512 + 128 = 640s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where 2500ms or 2000ms come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small lambda = 2000ms, while the comment said it is 2500ms, so it is wrong.
extra
started from 2000 ms, so I need to fix the computation in comments too...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's here:
go-algorand/config/consensus.go
Lines 1298 to 1303 in c73ef66
// Protocol holds the global configuration settings for the agreement protocol, | |
// initialized with our current defaults. This is used across all nodes we create. | |
var Protocol = Global{ | |
SmallLambda: 2000 * time.Millisecond, | |
BigLambda: 15000 * time.Millisecond, | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
go-algorand/agreement/types.go
Lines 28 to 30 in 7954f8e
var deadlineTimeout = config.Protocol.BigLambda + config.Protocol.SmallLambda | |
var partitionStep = next + 3 | |
var recoveryExtraTimeout = config.Protocol.SmallLambda |
Summary
Minor fix in
agreement/type.go
comment, the number seems to be not matching with the configuration.