Skip to content
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

Outbound Governor changes #3580

Merged
merged 10 commits into from Jan 20, 2022
Merged

Outbound Governor changes #3580

merged 10 commits into from Jan 20, 2022

Commits on Jan 19, 2022

  1. io-sim: export ppSimEvent

    coot committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    6e3e132 View commit details
    Browse the repository at this point in the history
  2. io-sim: organise io-sim export list

    Splitting the export list into various sections, to make nicer haddocks.
    coot committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    0af324d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3ceb2ad View commit details
    Browse the repository at this point in the history
  4. outbound-governor-test: improved counterexample information

    * Add `MonadSay` tracer, this allows to have outbound governor events
      in `IOSim` trace.
    * Added `IOSim` trace to `prop_governor_gossip_1hr`: note that the
      simulations written by the governor never terminate,  so
      we must limit the trace output.
    coot committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    5897a1e View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2022

  1. Configuration menu
    Copy the full SHA
    92202c0 View commit details
    Browse the repository at this point in the history
  2. outbound-governor: change the order of events

    The outbound governor should first update its state from potentially
    blocking decisions (monitoring connections, jobs, target and local roots
    peers) and then look into non-blocking internal decisions.
    
    This patch also fixes `prop_governor_gossip_1hr` which did not account
    local root peers when checking the target number of root peers.  This
    made the test depend on the order of events: with just two root peers
    Public and Local, and `targetNumberOfRootPeers` set to 1; if `Public` one
    was found first then the governor would still be looking to satisfy its
    local root peer target, and it would find the `Local` peer; the test
    would pass.  However, if the events where ordered differently, and
    `Local` peer is found first, then the governor was not looking for any
    more public root peers, and the `Public` peer was never discovered.
    
    Closes #3460, fixes #3550
    coot committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    0286672 View commit details
    Browse the repository at this point in the history
  3. outbound-governor: check the state when promoting a warm peer

    Check whether a peer is hasn't become cold when we try to update the
    state once. In rare cases it could become cold just after we promoted it
    to a hot peer, but before the completion continuation was scheduled.
    This is because there could be a race between an asynchronous demotion
    and the promotion.
    
    Fixes #3550
    coot committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    6871ce0 View commit details
    Browse the repository at this point in the history
  4. peer-state-actions: remove no-op unregisterOutboundConnection

    If a mini-protocol errored, or handshake errored, we don't need to
    `unregisterOutboundConnection`.  The connection handler thrown an
    exception (either mux does it, or in the other case the handler itself).
    When this happens, the finally handler will govern the evolution of
    state of the connection: it will set it to `TerminatingSt`, close the
    connection and wait for the `TIME_WAIT` timer, when eventually the
    connection will be forgotten.
    coot committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    b05fbaa View commit details
    Browse the repository at this point in the history
  5. outbound-governor-test: trace of prop_governor_nofail

    The `prop_governor_nofail` is a pure test which throws
    `AssertionFailed`.  Run it in `IO` using `evaluate` to catch the errors
    and print the trace log if it fails.  This relies on the property that
    the trace will also encounter the same assertion failure.
    coot committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    feddd87 View commit details
    Browse the repository at this point in the history
  6. outbound-governor: check the state when failing to promote a warm peer

    As in the `outbound-governor: check the state when promoting a warm
    peer` commit, but for the error handler.
    
    Fixes #3494, fixes #3515.
    coot committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    0a25a5f View commit details
    Browse the repository at this point in the history