-
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
Fix an edge case in PrepareDenominate #2138
Fix an edge case in PrepareDenominate #2138
Conversation
I don't see the problem, nor the fix here. Can you extrapolate on this
How does your fix actually fix it? When you say "This check |
Sorry for possible bad phrasing.
means it will evaluate to
Ok... Because of bug
Very common situation if you'll search in the log after Spork 6 activation.
Say, if you have only 3 inputs of 0.0100001 then (because of bug) you can join only mixes with |
Thanks for reporting! 👍 I agree that there is an edge case but IMO the condition itself is not quite logical and should be changed, pls see #2139. However I agree that fixing this part (ordering of Having said this, I don't want to fix one thing in 2 PRs, so if you would agree and cherry-pick cf9ec46 here, I'm fine closing #2139 in fav of this one. Or otherwise I'm going to close this and cherry-pick your commit there :) |
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.
Perfect, thanks! 👍
utACK
EDIT: mixing seems to be working just fine in general (haven't tested the edge case).
Okay, so basically if you have And this changes it to allow Is my understanding correct? |
When |
@UdjinM6 So in effect, currently you can not mix all of your inputs in one round? I need to think on it more, but I am getting the vibe that changing this could result in data leakage, and possible de-anon of a round. |
I think this is more broad - it will always fail if If wallet have only 1, 2, 3 or 4 inputs, according to this (it will always try to select all inputs, as random will produce values from 5 to 9), participant who starts mixing session will always fail to proceed in
Just to be clear on how amount of inputs is selected for the one round (not in regard of the bug discussion):
|
@InhumanPerfection Is that the case in 12.2.3, or is this due to a change for 12.3? Because that doesn't seem consistent with my testing |
Only in 12.3 (#2075) |
Looking at testnet, I've only seen mixes with exactly 24 in/outs. Meaning 8/participant. But based on what I've read shouldn't 5, 6 and 7 also be happening? |
@paulied they are happening, few examples
|
* PrepareDenominate fix * Fix conditions
* PrepareDenominate fix * Fix conditions
dash/src/privatesend-client.cpp
Lines 1181 to 1192 in 8e63646
This check
(nSessionInputCount != 0 && nStep != nStepsMax)
will fail if amount of selected inputs (fromSelectCoinsByDenominations
) for this round equal tonSessionInputCount
Mixing attempt will be failed:
nSessionInputCount
equal to 9 (PRIVATESEND_ENTRY_MAX_SIZE
)nSessionInputCount
Here is the fix.