-
Notifications
You must be signed in to change notification settings - Fork 157
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
More TPraos separation #2518
More TPraos separation #2518
Conversation
29a6af2
to
7fd7993
Compare
7fd7993
to
c0eb3fb
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.
Minor comments, otherwise looks good!
boundedRationalFromCBOR, | ||
boundedRationalToCBOR, | ||
) | ||
import Cardano.Ledger.BaseTypes (ActiveSlotCoeff, NonNegativeInterval, ProtVer (..), ShelleyBase, UnitInterval, boundedRationalFromCBOR, boundedRationalToCBOR) |
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.
[minor] long line
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 catch! I would not do that on purpose, I must have done something to trigger omolu.
activeSlotVal, | ||
invalidKey, | ||
) | ||
import Cardano.Ledger.BaseTypes (ActiveSlotCoeff, BoundedRational (..), NonNegativeInterval, ProtVer, UnitInterval, activeSlotVal, invalidKey) |
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.
[minor] long line
randomnessStabilisationWindow, | ||
securityParameter, | ||
) | ||
import Cardano.Ledger.BaseTypes (BlocksMade, NonNegativeInterval, ProtVer, ShelleyBase, StrictMaybe (..), UnitInterval, activeSlotCoeff, epochInfo, maxLovelaceSupply, randomnessStabilisationWindow, securityParameter) |
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.
[minor] long line
{-# LANGUAGE UndecidableInstances #-} | ||
{-# OPTIONS_GHC -Wno-redundant-constraints #-} | ||
|
||
module Cardano.Ledger.PoolDistr where |
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.
Can we document this module a bit? Just to provide a general idea of what a PoolDistr
is and why it's a fundamental concept.
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.
absolutely! Thank you for reminding me recently about things that could be documented better, I need to do this more by reflex!
c0eb3fb
to
434cf77
Compare
This PR completes a few of the tasks remaining for separating TPraos from the ledger code (see #2462)
PoolDistr
,IndividualPoolStake
andProtVer
have been moved to thecardano-ledger-core
package.getLeaderSchedule
was moved to the Protocol API module, so that it does not need any TPraos imports. I'm not sure what to do with the Protocol API module, it may need to move to consensus.Cardano.Ledger.Pretty
namespace, so I was not able to deprecate the old module. I think this is okay, I don't think any downstream libraries are using the pretty printers.COMPLETE
pragma to some existing patterns.I removed the TPraos rules (OCERT
,OVERLAY
andTICKN
) from the era mappings.