Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Shelley.Ledger.Inspect
Contents
Synopsis
- data ProtocolUpdate era = ProtocolUpdate {
- protocolUpdateProposal :: UpdateProposal era
- protocolUpdateState :: UpdateState (EraCrypto era)
- data ShelleyLedgerUpdate era = ShelleyUpdatedProtocolUpdates [ProtocolUpdate era]
- data UpdateProposal era = UpdateProposal {
- proposalParams :: PParamsUpdate era
- proposalVersion :: Maybe ProtVer
- proposalEpoch :: EpochNo
- data UpdateState c = UpdateState {
- proposalVotes :: [KeyHash 'Genesis c]
- proposalReachedQuorum :: Bool
- protocolUpdates :: forall era proto. ShelleyBasedEra era => ShelleyGenesis (EraCrypto era) -> LedgerState (ShelleyBlock proto era) -> [ProtocolUpdate era]
Documentation
data ProtocolUpdate era Source #
Constructors
ProtocolUpdate | |
Fields
|
Instances
Show (PParamsUpdate era) => Show (ProtocolUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect | |
Eq (PParamsUpdate era) => Eq (ProtocolUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: ProtocolUpdate era -> ProtocolUpdate era -> Bool Source # (/=) :: ProtocolUpdate era -> ProtocolUpdate era -> Bool Source # |
data ShelleyLedgerUpdate era Source #
Constructors
ShelleyUpdatedProtocolUpdates [ProtocolUpdate era] |
Instances
Show (PParamsUpdate era) => Show (ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect | |
Eq (PParamsUpdate era) => Eq (ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: ShelleyLedgerUpdate era -> ShelleyLedgerUpdate era -> Bool Source # (/=) :: ShelleyLedgerUpdate era -> ShelleyLedgerUpdate era -> Bool Source # | |
Show (PParamsUpdate era) => Condense (ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods condense :: ShelleyLedgerUpdate era -> String |
data UpdateProposal era Source #
Update proposal
As in Byron, a proposal is a partial map from parameters to their values.
Constructors
UpdateProposal | |
Fields
|
Instances
Show (PParamsUpdate era) => Show (UpdateProposal era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect | |
Eq (PParamsUpdate era) => Eq (UpdateProposal era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: UpdateProposal era -> UpdateProposal era -> Bool Source # (/=) :: UpdateProposal era -> UpdateProposal era -> Bool Source # |
data UpdateState c Source #
Proposal state
The update mechanism in Shelley is simpler than it is in Byron. There is no distinction between votes and proposals: to "vote" for a proposal one merely submits the exact same proposal. There is also no separate endorsement step. The procedure is as follows:
- During each epoch, a genesis key can submit (via its delegates) zero, one, or many proposals; each submission overrides the previous one.
- "Voting" (submitting of proposals) ends
2 * stabilityWindow
slots (i.e.6k/f
) before the end of the epoch. In other words, proposals for the upcoming epoch must be submitted within the first4k/f
slots of this one. - At the end of an epoch, if the majority of nodes (as determined by the
Quorum
specification constant, which must be greater than half the nodes) have most recently submitted the same exact proposal, then it is adopted. - The next epoch is always started with a clean slate, proposals from the previous epoch that didn't make it are discarded (except for "future proposals" that are explicitly marked for future epochs).
Constructors
UpdateState | |
Fields
|
Instances
Show (UpdateState c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect | |
Eq (UpdateState c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: UpdateState c -> UpdateState c -> Bool Source # (/=) :: UpdateState c -> UpdateState c -> Bool Source # |
protocolUpdates :: forall era proto. ShelleyBasedEra era => ShelleyGenesis (EraCrypto era) -> LedgerState (ShelleyBlock proto era) -> [ProtocolUpdate era] Source #
Orphan instances
ShelleyBasedEra era => InspectLedger (ShelleyBlock proto era) Source # | |
Associated Types type LedgerWarning (ShelleyBlock proto era) type LedgerUpdate (ShelleyBlock proto era) Methods inspectLedger :: TopLevelConfig (ShelleyBlock proto era) -> LedgerState (ShelleyBlock proto era) -> LedgerState (ShelleyBlock proto era) -> [LedgerEvent (ShelleyBlock proto era)] |