instantsend: deterministic lock using the same msg hash as islock#4381
Merged
UdjinM6 merged 1 commit intodashpay:developfrom Oct 5, 2021
Merged
instantsend: deterministic lock using the same msg hash as islock#4381UdjinM6 merged 1 commit intodashpay:developfrom
UdjinM6 merged 1 commit intodashpay:developfrom
Conversation
5433630 to
65dd0d2
Compare
65dd0d2 to
20a0485
Compare
src/llmq/quorums_instantsend.cpp
Outdated
Comment on lines
810
to
813
Member
There was a problem hiding this comment.
This might be problematic.. We likely don't want to p2p ban a peer just because we don't have this block yet...
Author
There was a problem hiding this comment.
I changed it to slightly penalize a peer in order to avoid the case when some peer spams an invalid cycleHash.
UdjinM6
requested changes
Sep 6, 2021
51124c9 to
d096097
Compare
UdjinM6
requested changes
Sep 9, 2021
3414356 to
a049b9e
Compare
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.
a049b9e to
0fd8235
Compare
PastaPastaPasta
approved these changes
Oct 5, 2021
Member
PastaPastaPasta
left a comment
There was a problem hiding this comment.
LGTM utACK for squash merge
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.
This was referenced Aug 13, 2025
PastaPastaPasta
added a commit
that referenced
this pull request
Sep 5, 2025
…er functions a02e843 refactor: privatise `RequestObject` and `EraseObjectRequest` (Kittywhiskers Van Gogh) f95b50a refactor: privatise `RelayInvFiltered` and `AskPeersForTransaction` (Kittywhiskers Van Gogh) c93ade5 refactor: reduce `PeerManager` usage in InstantSend worker functions (Kittywhiskers Van Gogh) 9b2c916 refactor: drop `is_masternode` from `PeerManager` interface functions (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Depends on #6815 * Depends on #6820 * While this pull request doesn't _entirely_ decouple `PeerManager` from `CInstantSendManager` as the worker thread isn't _reactive_ (i.e. triggered by `ProcessMessage()`), we can reduce its usage by folding all expected network activity into a `MessageProcessingResult` batch that can be consumed by `PostProcessMessage`. To achieve this, `MessageProcessingResult` has been extended to allow * Requesting peers for a transaction (by setting `m_request_tx`) * Relaying inventories to interested peer based on filter match (by setting `m_inv_filter`) This has the additional effect of removing external uses of `RelayInvFiltered()` and `AskPeersForTransaction()`, which can now be safely removed from the `PeerManager` interface as it is now brokered through `MessageProcessingResult`. * Note that while the old `RelayInvFiltered()` allowed specifying _any_ minimum protocol version, `PostProcessMessage()` will assume that `minProtoVersion` is `ISDLOCK_PROTO_VERSION`. This is acceptable as `RelayInvFiltered()` isn't used anywhere else and deterministic InstantSend locks were introduced in v0.18 (see [dash#4381](#4381)). If there is any foreseeable use needing to relay messages to even older versions of Dash Core, `m_inv_filter` can be modified to accommodate that. ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests **(note: N/A)** - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: knst: utACK a02e843 UdjinM6: utACK a02e843 Tree-SHA512: 6a83277781faf996cbb5187d352971c3508191dbf84cd801e062e2cde2db09cf64696bf27b9790f2b278f53adb46c042e04ac5c4dbdebdbc1faba2b262e39930
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.