| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Shelley.Ledger.Inspect
Contents
Synopsis
- data ProtocolUpdate era = ProtocolUpdate {
- protocolUpdateProposal :: UpdateProposal era
- protocolUpdateState :: UpdateState (EraCrypto era)
- data UpdateProposal era = UpdateProposal {}
- data UpdateState c = UpdateState {
- proposalVotes :: [KeyHash 'Genesis c]
- proposalReachedQuorum :: Bool
- protocolUpdates :: forall era. ShelleyGenesis era -> LedgerState (ShelleyBlock era) -> [ProtocolUpdate era]
- data ShelleyLedgerUpdate era = ShelleyUpdatedProtocolUpdates [ProtocolUpdate era]
Documentation
data ProtocolUpdate era Source #
Constructors
| ProtocolUpdate | |
Fields
| |
Instances
| Eq (ProtocolUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: ProtocolUpdate era -> ProtocolUpdate era -> Bool # (/=) :: ProtocolUpdate era -> ProtocolUpdate era -> Bool # | |
| Show (ProtocolUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods showsPrec :: Int -> ProtocolUpdate era -> ShowS # show :: ProtocolUpdate era -> String # showList :: [ProtocolUpdate era] -> ShowS # | |
data UpdateProposal era Source #
Update proposal
As in Byron, a proposal is a partial map from parameters to their values.
Constructors
| UpdateProposal | |
Fields
| |
Instances
| Eq (UpdateProposal era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: UpdateProposal era -> UpdateProposal era -> Bool # (/=) :: UpdateProposal era -> UpdateProposal era -> Bool # | |
| Show (UpdateProposal era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods showsPrec :: Int -> UpdateProposal era -> ShowS # show :: UpdateProposal era -> String # showList :: [UpdateProposal era] -> ShowS # | |
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 * stabilityWindowslots (i.e.6k/f) before the end of the epoch. In other words, proposals for the upcoming epoch must be submitted within the first4k/fslots of this one. - At the end of an epoch, if the majority of nodes (as determined by the
Quorumspecification 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
| Eq (UpdateState c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: UpdateState c -> UpdateState c -> Bool # (/=) :: UpdateState c -> UpdateState c -> Bool # | |
| Show (UpdateState c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods showsPrec :: Int -> UpdateState c -> ShowS # show :: UpdateState c -> String # showList :: [UpdateState c] -> ShowS # | |
protocolUpdates :: forall era. ShelleyGenesis era -> LedgerState (ShelleyBlock era) -> [ProtocolUpdate era] Source #
data ShelleyLedgerUpdate era Source #
Constructors
| ShelleyUpdatedProtocolUpdates [ProtocolUpdate era] |
Instances
| Eq (ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods (==) :: ShelleyLedgerUpdate era -> ShelleyLedgerUpdate era -> Bool # (/=) :: ShelleyLedgerUpdate era -> ShelleyLedgerUpdate era -> Bool # | |
| Show (ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods showsPrec :: Int -> ShelleyLedgerUpdate era -> ShowS # show :: ShelleyLedgerUpdate era -> String # showList :: [ShelleyLedgerUpdate era] -> ShowS # | |
| Condense (ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect Methods condense :: ShelleyLedgerUpdate era -> String Source # | |
Orphan instances
| InspectLedger (ShelleyBlock era) Source # | |
Associated Types type LedgerWarning (ShelleyBlock era) Source # type LedgerUpdate (ShelleyBlock era) Source # Methods inspectLedger :: TopLevelConfig (ShelleyBlock era) -> LedgerState (ShelleyBlock era) -> LedgerState (ShelleyBlock era) -> [LedgerEvent (ShelleyBlock era)] Source # | |