Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #25577

Closed (moved)
(moved)
Open
Created Mar 21, 2018 by David Goulet@dgoulet🆘

cmux: CircuitPriorityHalflife value is never taken from the consensus

Commit 6b1dba214db introduced an issue that makes the cmux EWMA subsystem to never use the CircuitPriorityHalflife option from the consensus resulting in a warning at bootup:

Mar 21 22:31:24.001 [warn] CircuitPriorityHalflife is too small (-1.000000). Adjusting to the smallest value allowed: 30.000000.

The default config is:

  V(CircuitPriorityHalflife,     DOUBLE,  "-1.0"), /*negative:'Use default'*/

Which means that in get_circuit_priority_halflife() which is called at bootup when loading the config file and when a new consensus arrives, always skip the consensus param check due to this wrong condition (EPSILON=0.0001):

+  if (options && options->CircuitPriorityHalflife < EPSILON) {
+    halflife = options->CircuitPriorityHalflife;
+    *source_msg = "CircuitPriorityHalflife in configuration";
+    goto end;
+  }

Originally, the condition was this which resulted in false with -1.0 and thus trying the consensus param instead:

-  if (options && options->CircuitPriorityHalflife >= -EPSILON) {
-    halflife = options->CircuitPriorityHalflife;
-    source = "CircuitPriorityHalflife in configuration";

The good news is that we didn't release that commit yet! and the default value is what currently the consensus is using (30000) :). Nevertheless, this should be fixed asap.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking