Skip to content

Conversation

@UdjinM6
Copy link
Contributor

@UdjinM6 UdjinM6 commented Mar 16, 2021

Alternative to #85

@DarrenTa
Copy link
Contributor

I think this option provides a much cleaner approach to the documentation.

I'm still reviewing this and comparing it to 0008. It'll take me having a day without distractions which I have later this week.

Copy link
Contributor

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

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

I like the separation 👍 Im not sure about the calculation section though.. I think we shouldn't just partially copy it over to here since you anyway need to open DIP8 because of the missing context if you want to understand it and then you can just look there (i.e. the N and m of the table are not even mentioned in here). Would probably make more sense to just write few words and link to https://github.com/dashpay/dips/blob/master/dip-0008.md#calculations there or so, thoughts?

Also see some typos and two potential generalizations in comments below.

UdjinM6 and others added 5 commits March 17, 2021 18:36
Co-authored-by: thephez <[email protected]>
* chore: linting

* chore: typo fixes

* docs: minor reword suggestion

* chore: minor formatting

* chore: minor wording / punct.

* Update dip-0022.md
@UdjinM6
Copy link
Contributor Author

UdjinM6 commented Mar 17, 2021

Rebased to fix merge conflicts after #87

@UdjinM6 UdjinM6 force-pushed the dip22 branch 2 times, most recently from 5491722 to 6cb4214 Compare March 18, 2021 12:32
@DarrenTa
Copy link
Contributor

DarrenTa commented Mar 18, 2021

OK explicit answer to @UdjinM6's question on the other thread

Should be accurate for a single LLMQ mode but yeah, for a multi-quorum mode you'd need to disrupt 2 quorums (or control 3 quorums to produce invalid clsig) at the same time, so I guess you should take all these probabilities roughly to the power of 2 (or 3 respectively) or so? Let's ping @DarrenTa :)

Quick answer: cubing is correct, squaring is not so simple.

p and q are probabilities, and are numbers between 0 and 1

So if the chance of an event happening is p then the chances of it happening three times in a row is p^3 assuming the chance of the event happening does not change.

However if the chance of an event happening is p then the chance of it not happening is 1-p=q. If the experiment happens three times then there is a p*p*q chance that the event happens the first two times but does not happen the third time. The chance that the event happens the first and last time but not the second is p*q*p. The chance the event does not happen the last two times but not the first is q*p*p.

The result is the chance the event happens exactly two times is 3p^2*q
The chance that the event happens three times is p^3 (the events on these two lines are mutually exclusive)
Thus the chance the event happens at least two times is 3p^2*q + q^3

@DarrenTa
Copy link
Contributor

A major assumption in the above comment is that the chance of the event p does not change.

Depending on how the quorums are picked this may or may not be the case. If each quorum is a simple random selection then the assumption holds.

Alternate selection If the three quorums are picked by listing all MN in an order and picking the first few for the first quorum the next few for the second quorum and a third few for the third quorum then this is not a simple random sample.

If the attacker has less than 40% of the MNs and using the alternate selection the attacker gets over 40% in the first quorum then the attacker will be less likely to have nodes in the second or third quorum compared to a simple random selection.

Co-authored-by: thephez <[email protected]>
@UdjinM6 UdjinM6 closed this Sep 6, 2022
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.

4 participants