-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat/fix(llmq): Ensure connections between IS quorums #4917
Conversation
Can you explain the why a little bit more? |
Basically the issue is that two quorums of the same llmq type might not be able to "talk" to each other reliably. We only ensure connections inside the quorum I think. But my fix is too broad atm, should limit such connections per llmqtype or maybe do this for IS llmq types only (cause that's where it can be actually helpful I guess). Making it a draft for now, going to play with it a bit more. |
Should add tests for something like this, also this is more of a feature not a fix |
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.
…match the actual behaviour (and avoid confusion with `CLLMQUtils::EnsureQuorumConnections`)
…umConnections` avoid calling slow `ScanQuorums` (no caching atm) inside the loop
Seems fine, but I'd like to see functional tests happy on CI |
@PastaPastaPasta I restarted tests a couple of times, few of them are green now (I believe test failures were unrelated). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge
|
* 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): 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): 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): 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`
TLDR: 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 which is critical for creation of IS-locks for example.
To lock a tx you lock inputs first (each can be locked by a completely different quorum potentially) and then the tx itself is locked by another quorum when it receives qrecsigs for each input. No qrecsigs for any input, no is lock.
With tiny quorums on tiny networks e.g. 5 nodes total, 3 nodes to form a quorum there is always an overlap (same mns participate in multiple quorums) so tests pass. But for 15 nodes total and 4-5 nodes in a quorum there might be no overlap (so no qrecsigs are relayed to the tx-signing quorum) and tests fail. This should also be helpful for small devnets with tiny quorums.