-
Notifications
You must be signed in to change notification settings - Fork 819
ACP-226: add initial delay excess #4300
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,10 @@ const ( | |
| // MaxDelayExcessDiff (Q) is the maximum change in excess per update | ||
| MaxDelayExcessDiff = 200 | ||
|
|
||
| // InitialDelayExcess represents the initial (≈2000ms) delay excess. | ||
| // Formula: ConversionRate (2^20) * ln(2000) + 1 | ||
| InitialDelayExcess = 7_970_124 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These feel like magic numbers even though we use a godoc to document them... could we define these through calculation in code? i.e
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These values are consensus critical, so I don't think it is reasonable to perform floating point operations to generate them. (The actual number is more important than the mechanism used to derive them)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (same reason as what Stephen posted above while I writing this)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we need to make this configurable by minimum delay setting in the future, an approach @StephenButtolph recommended to me for ACP-224 is to use some rational approximation for |
||
|
|
||
| maxDelayExcess = 46_516_320 // ConversionRate * ln(MaxUint64 / MinDelayMilliseconds) + 1 | ||
| ) | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.