-
Notifications
You must be signed in to change notification settings - Fork 155
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
Implement DRep ratification with an 'always passing' threshold #3636
Conversation
fb159ab
to
0191cff
Compare
2805243
to
5b47ee4
Compare
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.
Good work so far, could use some re-organizing before merge 👍
An example of the computation: For these Dreps:
and these votes:
We need to compute this ratio in case of an action different from NoConfidence: Because we don't have the ratios precomputed (as is the case for spo stake distribution), instead of folding to get the total and then subtracting the abstains, we fold the distribution and only add what's necessary, depending on the vote and on the action. |
5728f20
to
a32e1a1
Compare
9f90f89
to
807ac93
Compare
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.
Looks great! Thank you.
807ac93
to
85ca8c7
Compare
Good Haskell lessons from your review @lehins , thank you |
Description
Closes #3612
An example of the computation:
For these Dreps:
and these votes:
We need to compute this ratio in case of an action different from NoConfidence:
s1/(s1 + s2 + s3 + s4 + sA + sN - s3 -sA)
and this one for NoConfidence:
(s1 + sN)/(s1 + s2 + s3 + s4 + sA + sN - s3 -sA)
Because we don't have the ratios precomputed (as is the case for spo stake distribution), instead of folding to get the total and then subtracting the abstains, we fold the distribution and only add what's necessary, depending on the vote and on the action.
Checklist
.cabal
andCHANGELOG.md
files according to theversioning process.
.cabal
files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)CHANGELOG.md
for the affected packages. New section is never added with the code changes. (See RELEASING.md)fourmolu
(usescripts/fourmolize.sh
)scripts/cabal-format.sh
)hie.yaml
has been updated (usescripts/gen-hie.sh
)