-
Notifications
You must be signed in to change notification settings - Fork 156
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
DRepDistr: Iterate over the DRep delegations in UMap #4273
Conversation
91660d1
to
a87f7ff
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.
Self-aware TODOs
eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs
Outdated
Show resolved
Hide resolved
a87f7ff
to
8e755cf
Compare
eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs
Outdated
Show resolved
Hide resolved
8e755cf
to
f6fdfbc
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.
Unfortunately your solution will not work.
We need to figure out a different one.
eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs
Outdated
Show resolved
Hide resolved
912afa2
to
813612c
Compare
813612c
to
710a603
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! Tests could use a little improvement, but nothing that would prevent this PR from being merged
libs/cardano-ledger-test/src/Test/Cardano/Ledger/Constrained/Conway/Instances.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/testlib/Test/Cardano/Ledger/Conway/Imp/RatifySpec.hs
Outdated
Show resolved
Hide resolved
eras/conway/impl/src/Cardano/Ledger/Conway/Governance/DRepPulser.hs
Outdated
Show resolved
Hide resolved
710a603
to
8e64943
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.
Some conflicts resolved and one minor change is still needed, but otherwise it is good to go
eras/shelley/impl/testlib/Test/Cardano/Ledger/Shelley/ImpTest.hs
Outdated
Show resolved
Hide resolved
8e64943
to
b8835dc
Compare
4f70b7d
to
68b4def
Compare
The DRepDistr was being calculated by iterating over the StakeDistr, which meant that delegations that have only rewards and no UTxOs would be left out. This commit changes the calculation to iterate over the UMap in chunks instead, adding the corresponding rewards and StakeDistr in the calculation and producing a DRepDistr for all DReps that are either registered or one of the eternal ones, irrespective of whether they have an associated StakeDistr. Also add `UMap.umElemDRepDelegatedReward` to get only those rewards that have an active DRep delegation.
Make rewards a result of proposal expiry and pool retirement as it should be, without directly modified the NewEpochState
68b4def
to
c580fc0
Compare
Description
Resolves #4233
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
)