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

feat/fix(llmq): Ensure connections between IS quorums #4917

Merged
merged 6 commits into from
Jul 18, 2022

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jul 13, 2022

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.

@UdjinM6 UdjinM6 added this to the 18 milestone Jul 13, 2022
@PastaPastaPasta
Copy link
Member

Can you explain the why a little bit more?

@UdjinM6 UdjinM6 changed the title fix(llmq/dkg): fix 2 connectivity issues fix(llmq): Ensure connections between quorums Jul 13, 2022
@UdjinM6 UdjinM6 marked this pull request as draft July 13, 2022 22:52
@UdjinM6
Copy link
Author

UdjinM6 commented Jul 13, 2022

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.

@UdjinM6 UdjinM6 marked this pull request as ready for review July 15, 2022 21:12
@UdjinM6 UdjinM6 requested a review from PastaPastaPasta July 15, 2022 21:12
@PastaPastaPasta
Copy link
Member

Should add tests for something like this, also this is more of a feature not a fix

UdjinM6 added 5 commits July 16, 2022 20:00
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
@UdjinM6 UdjinM6 changed the title fix(llmq): Ensure connections between quorums feat(llmq): Ensure connections between IS quorums Jul 17, 2022
@PastaPastaPasta
Copy link
Member

Seems fine, but I'd like to see functional tests happy on CI

@UdjinM6
Copy link
Author

UdjinM6 commented Jul 18, 2022

@PastaPastaPasta I restarted tests a couple of times, few of them are green now (I believe test failures were unrelated).

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a 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

@PastaPastaPasta
Copy link
Member

PastaPastaPasta commented Jul 18, 2022

But I don't think it makes sense to backport this. At least not right now. It should wait until 18.1 no?

@PastaPastaPasta PastaPastaPasta changed the title feat(llmq): Ensure connections between IS quorums feat/fix(llmq): Ensure connections between IS quorums Jul 18, 2022
@UdjinM6 UdjinM6 merged commit 666859b into dashpay:develop Jul 18, 2022
@UdjinM6 UdjinM6 deleted the fix_llmq_dkg branch July 18, 2022 19:27
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 18, 2022
* 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`
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 18, 2022
* 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`
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Nov 16, 2023
* 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`
gades pushed a commit to piratecash/pirate that referenced this pull request Dec 9, 2023
* 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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants