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

instantsend: deterministic lock using the same msg hash as islock #4381

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

gabriel-bjg
Copy link

@gabriel-bjg gabriel-bjg commented Aug 31, 2021

When receiving an islock, propagate it as islock.
When creating/receiving an isdlock, propagate it as isdlock to peers which support it and as islock to peers which don't.
Functional tests to cover both islock and isdlock scenarios.

@gabriel-bjg gabriel-bjg changed the title Instant send deterministic lock uses the same msg hash as islock. Instant send deterministic lock using the same msg hash as islock. Aug 31, 2021
@gabriel-bjg gabriel-bjg marked this pull request as ready for review September 2, 2021 15:19
Comment on lines 810 to 813
const auto blockIndex = LookupBlockIndex(islock.cycleHash);
if (blockIndex == nullptr || blockIndex->nHeight % dkgInterval != 0) {
return false;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be problematic.. We likely don't want to p2p ban a peer just because we don't have this block yet...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to slightly penalize a peer in order to avoid the case when some peer spams an invalid cycleHash.

src/llmq/quorums_instantsend.h Outdated Show resolved Hide resolved
src/llmq/quorums_instantsend.h Outdated Show resolved Hide resolved
test/functional/test_framework/messages.py Show resolved Hide resolved
@gabriel-bjg gabriel-bjg force-pushed the deterministic-instantsend branch 2 times, most recently from 51124c9 to d096097 Compare September 9, 2021 18:11
src/llmq/quorums_instantsend.cpp Outdated Show resolved Hide resolved
@gabriel-bjg gabriel-bjg force-pushed the deterministic-instantsend branch 3 times, most recently from 3414356 to a049b9e Compare September 16, 2021 21:25
When receiving an islock, propagate it as islock.
When creating/receiving and isdlock, propagate it as isdlock to peers which support it and as islock to peers which don't.
Functional tests to cover both islock and isdlock scenarios.
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.

LGTM utACK for squash merge

@PastaPastaPasta PastaPastaPasta added the P2P Some notable changes on p2p level label Oct 5, 2021
@UdjinM6 UdjinM6 added this to the 18 milestone Oct 5, 2021
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@UdjinM6 UdjinM6 changed the title Instant send deterministic lock using the same msg hash as islock. instantsend: deterministic lock using the same msg hash as islock. Oct 5, 2021
@UdjinM6 UdjinM6 changed the title instantsend: deterministic lock using the same msg hash as islock. instantsend: deterministic lock using the same msg hash as islock Oct 5, 2021
@UdjinM6 UdjinM6 merged commit b4d001a into dashpay:develop Oct 5, 2021
kwvg pushed a commit to kwvg/dash that referenced this pull request Oct 12, 2021
…shpay#4381)

When receiving an islock, propagate it as islock.
When creating/receiving and isdlock, propagate it as isdlock to peers which support it and as islock to peers which don't.
Functional tests to cover both islock and isdlock scenarios.
pravblockc pushed a commit to pravblockc/dash that referenced this pull request Nov 18, 2021
…shpay#4381)

When receiving an islock, propagate it as islock.
When creating/receiving and isdlock, propagate it as isdlock to peers which support it and as islock to peers which don't.
Functional tests to cover both islock and isdlock scenarios.
gades pushed a commit to cosanta/cosanta-core that referenced this pull request May 11, 2022
…shpay#4381)

When receiving an islock, propagate it as islock.
When creating/receiving and isdlock, propagate it as isdlock to peers which support it and as islock to peers which don't.
Functional tests to cover both islock and isdlock scenarios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2P Some notable changes on p2p level
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants