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

mix inputs with highest number of rounds first #1248

Merged
merged 1 commit into from
Apr 20, 2017
Merged

mix inputs with highest number of rounds first #1248

merged 1 commit into from
Apr 20, 2017

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Jan 4, 2017

Currently we are mixing like this (imagine columns are number of rounds and we mix simple input, for simplicity sake, and inputs are selected in some order (which is not the case, we randomize them and even drop some to break possible patterns)):

1st session: 100000000
2nd session: 110000000
3rd session: 111000000
...
nth sesssion: 111111111
nth+1 session: 211111111

and so on until finally we get to nPrivateSendRounds round (N, M=N-1):
NMMMMMMMM

This is the first time user will finally see smth in his Private balance (input with N rounds).

What I'm proposing is changing this scheme to:

1st session: 100000000
2nd session: 200000000
...
Nth session: N00000000
Nth+1 session: N10000000
Nth+2 session: N20000000

and so on.
This way user will see (and will be able to use) mixed funds much earlier.

One thing to note is that together with multi-session option this scheme actually morphs into a mixed one because we don't use non-confirmed inputs for mixing. Smth like this:

1st session: 100000000
2nd session: 110000000
_block accepted_
3nd session: 210000000
4th session: 220000000
5th session: 221000000
...

and so on. This way user will be able to get even more private funds faster.

I was thinking about it for a while and wasn't able to find any reasonable arguments why this could not work or why this would defeat/leak some privacy. Suggestions and possible attack vector ideas are highly welcome.

@SCDeveloper
Copy link

SCDeveloper commented Jan 5, 2017

Couldn't this mean that inputs with 0 rounds might never be mixed and that potentially inputs with a high number of rounds will get continuously mixed over and over?

@UdjinM6
Copy link
Author

UdjinM6 commented Jan 6, 2017

No, this doesn't change the way inputs are selected, this changes the order.

EDIT: not sure if I expressed it right so I'll try again - max number of rounds for PrepareDenominate call is still nPrivateSendRounds - 1 and min number of rounds is still 0 so mixing will happen for all compatible inputs like before, we just swap which one is selected first.

@SCDeveloper
Copy link

utACK. Makes complete sense, highest rounds first.

@schinzelh schinzelh added this to the 12.2 milestone Jan 13, 2017
@SCDeveloper
Copy link

Why is this being held back until version v0.12.2.x ?

@schinzelh
Copy link

Because we are 2 weeks before 12.1 release and 12.1 is feature freezed since 24th Dec.

@schinzelh schinzelh changed the base branch from v0.12.1.x to v0.12.2.x February 20, 2017 20:40
Copy link

@tgflynn tgflynn 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 merged commit 6067896 into dashpay:v0.12.2.x Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants