ouroboros-consensus-cardano-0.12.1.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Shelley.Ledger.Inspect

Synopsis

Documentation

data ProtocolUpdate era Source #

Instances

Instances details
Show (PParamsUpdate era) => Show (ProtocolUpdate era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect

Eq (PParamsUpdate era) => Eq (ProtocolUpdate era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect

data ShelleyLedgerUpdate era Source #

Instances

Instances details
Show (PParamsUpdate era) => Show (ShelleyLedgerUpdate era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect

Eq (PParamsUpdate era) => Eq (ShelleyLedgerUpdate era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect

Show (PParamsUpdate era) => Condense (ShelleyLedgerUpdate era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect

data UpdateProposal era Source #

Update proposal

As in Byron, a proposal is a partial map from parameters to their values.

Constructors

UpdateProposal 

Fields

  • proposalParams :: PParamsUpdate era

    The protocol parameters changed by this update proposal

    An update is identified by how it updates the protocol parameters.

  • proposalVersion :: Maybe ProtVer

    New version (if changed by this proposal)

    The protocol version itself is also considered to be just another parameter, and parameters can change without changing the protocol version, although a convention could be established that the protocol version must change if any of the parameters do; but the specification itself does not mandate this.

    We record the version separately for the convenience of the HFC.

  • proposalEpoch :: EpochNo

    The EpochNo the proposal becomes active in, if it is adopted

Instances

Instances details
Show (PParamsUpdate era) => Show (UpdateProposal era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect

Eq (PParamsUpdate era) => Eq (UpdateProposal era) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect

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:

  1. During each epoch, a genesis key can submit (via its delegates) zero, one, or many proposals; each submission overrides the previous one.
  2. "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 first 4k/f slots of this one.
  3. 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.
  4. 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

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 # 
Instance details

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)]