Merge pull request #5276 from IntersectMBO/geo2a/10.7-integration
Allow using `QuickCheck < 2.16`
Allow using `QuickCheck < 2.16`
For not, '-Wno-redundant-constraints' is needed in testing libraries to prevent false-positives that lead to build errors with `-Werror`. See https://gitlab.haskell.org/ghc/ghc/-/issues/24173 for details.
Two generator functions were generating absurdly long lists of trace events. These very long lists would then cause heap exhaustion then they were checked. The solution was to add a maximum length partameter to these functions and then add a max list length of 10000 to all the calling sites.
- Move timeLimitsChainSync to Cardano.Network.Protocol.ChainSync.Codec.TimeLimits - Add PeerTrustable parameter to timeLimitsChainSync and adjust timeout behavior for trusted peers - Bump minChainSyncTimeout to 601 and maxChainSyncTimeout to 911 - Add extraFlag type variable to various contexts and handles for extensibility - Add extraFlags parameter to peer selection and connection management functions - Add property tests for timeLimitsChainSync timeout validation
More robust diffusion
Exclude shutdown peers in active peers calculations. It can take a while for peers to exit because blockfetch has to sync with chainsync as it exits. But we shouldn't count those peers as active or preferred anymore.
Enforce a maximum limit on the number of times we will attempt to promote a peer to warm. Localroot peers, bootstrap relays and manually configured public root peers are exempt from this limit. The clearing of the reconnection counter is delayd until a connection has managed to be active for a specific time (currently 120s).
With p2p peerselection and the keepalive protocol we are not that dependant on chainsync timeout for detecting bad upstream peers. By bumping the timeout from between 135s and 269s to between 601s and 911s we change the false positive rate from something that happens a few times per epoch to something that happens less than once in a decade.
Incase of an error use a shorter timeout when waiting for chainsync to exit.