This should help with v18 migration for nodes that failed to update in time. Still have to invalidate/reconsider the pre-fork quorum cycle start block to recalculate quorum members but it's better than having to reindex the whole chain.
# Conflicts:
# src/llmq/utils.cpp
# src/llmq/utils.h
* feat: switch nTimeFirstMessageReceived from microseconds to seconds
Was acting more like a bool until now, so nothing should change really. Align it with nTimeConnected.
* fix(dkg/net): Drop outdated connections to nodes that became masternodes recently
Such nodes won't be seen as masternodes by RelayInvToParticipants otherwise so no contributions will be sent to them when they are picked as relay members which in its turn may result in other nodes PoSe-punishing us.
We add them via EnsureQuorumConnections+ThreadOpenMasternodeConnections so they are clearly masternode connections and they are dropped regularly which is annoying. But also, we don't want every masternode connection to be a qwatch one, we want only the ones we added via that algo.
We must scan/cache keepOldConnections quorums or we won't be able to process sig shares signed in the 8 blocks window (signig offset) once new quorum(s) are mined.
* fix(llmq): Ensure connections between quorums
Every masternode will now "watch" a single node from _every other_ quorum in addition to intra-quorum connections. This should make propagation of recsigs produced by one quorum to other quorums much more reliable.
* fix: Do this only for masternodes which participate in IS quorums
* refactor: rename `CQuorumManager::EnsureQuorumConnections` to better match the actual behaviour
(and avoid confusion with `CLLMQUtils::EnsureQuorumConnections`)
* refactor: move IS quorums watch logic into `CQuorumManager::CheckQuorumConnections`
avoid calling slow `ScanQuorums` (no caching atm) inside the loop
* tests: check that inter-quorum connections are added
* use `ranges::any_of`
* fix(llmq): mark mns "bad" based on the failed connect attempts count
Avoid using "last success time" as a proxy
* fix(tests): tweak feature_llmq_simplepose.py
* fix(dkg): let masternodes miss few connection attempts before considering them "bad"
Should help with dashd updates/restarts for nodes that were successfully probed recently.
* fix
We only call AddQuorumProbeConnections when a new quorum is intialized. It's possible to miss the 10 minute probe window if Contribute phase takes too long (when 2 blocks were mined in 10+ minutes). 50 minutes should be enough and probing once in 10 minutes should be safe.
* feat(llmq): Introduce useRotation in LLMQParams
* fix(llmq): Fix IsQuorumRotationEnabled to recognize all dip0024 quorums
* fix(llmq): Do not allow rotation llmqs for `-llmqinstantsend` and non-rotation ones for `-llmqinstantsenddip0024`
* fix(llmq): Unify and fix IsMiningPhase
NOTE: no need for 1 extra block in mining phase for rotation quorums
* chore(llmq): Reduce the number of IsQuorumRotationEnabled calls
* chore(llmq): Improve logging
* feat(llmq): Make `llmq-` threads for rotation quorums distinguishable by quorum index
* fix(llmq): Fix another endless loop in GetQuorumRelayMembers
* throw an error when a llmq type with an incompatible rotation flag is picked for `-llmq...` params
* Add a note about loop conditions
* llmq: Make TransactionRemovedFromMempool the last action for invalid txes, just like we do for orphans with rejected parents
Write to log, send reject msg and (maybe) punish first and only then notify IS about the tx removal. Makes it easier to reason about it when reading logs.
* Qt: fix layout of components on "Wallet Repair" window
* Qt: refactor ui xml config
It orders components accordingly their positions on windows and fixes space indentation