Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
ProtocolUpdate
era =
ProtocolUpdate
{
- protocolUpdateProposal :: UpdateProposal era
- protocolUpdateState :: UpdateState ( EraCrypto era)
- data ShelleyLedgerUpdate era = ShelleyUpdatedProtocolUpdates [ ProtocolUpdate era]
-
data
UpdateProposal
era =
UpdateProposal
{
- proposalParams :: PParamsDelta era
- proposalVersion :: Maybe ProtVer
- proposalEpoch :: EpochNo
-
data
UpdateState
c =
UpdateState
{
- proposalVotes :: [ KeyHash ' Genesis c]
- proposalReachedQuorum :: Bool
- protocolUpdates :: forall era proto. ShelleyBasedEra era => ShelleyGenesis era -> LedgerState ( ShelleyBlock proto era) -> [ ProtocolUpdate era]
Documentation
data ProtocolUpdate era Source #
ProtocolUpdate | |
|
Instances
Eq ( PParamsDelta era) => Eq ( ProtocolUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect (==) :: ProtocolUpdate era -> ProtocolUpdate era -> Bool Source # (/=) :: ProtocolUpdate era -> ProtocolUpdate era -> Bool Source # |
|
Show ( PParamsDelta era) => Show ( ProtocolUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect |
data ShelleyLedgerUpdate era Source #
Instances
Eq ( PParamsDelta era) => Eq ( ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect (==) :: ShelleyLedgerUpdate era -> ShelleyLedgerUpdate era -> Bool Source # (/=) :: ShelleyLedgerUpdate era -> ShelleyLedgerUpdate era -> Bool Source # |
|
Show ( PParamsDelta era) => Show ( ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect |
|
Show ( PParamsDelta era) => Condense ( ShelleyLedgerUpdate era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect condense :: ShelleyLedgerUpdate era -> String Source # |
data UpdateProposal era Source #
Update proposal
As in Byron, a proposal is a partial map from parameters to their values.
UpdateProposal | |
|
Instances
Eq ( PParamsDelta era) => Eq ( UpdateProposal era) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect (==) :: UpdateProposal era -> UpdateProposal era -> Bool Source # (/=) :: UpdateProposal era -> UpdateProposal era -> Bool Source # |
|
Show ( PParamsDelta era) => Show ( UpdateProposal era) Source # | |
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:
- 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).
UpdateState | |
|
Instances
Eq ( UpdateState c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect (==) :: UpdateState c -> UpdateState c -> Bool Source # (/=) :: UpdateState c -> UpdateState c -> Bool Source # |
|
Show ( UpdateState c) Source # | |
Defined in Ouroboros.Consensus.Shelley.Ledger.Inspect |
protocolUpdates :: forall era proto. ShelleyBasedEra era => ShelleyGenesis era -> LedgerState ( ShelleyBlock proto era) -> [ ProtocolUpdate era] Source #
Orphan instances
ShelleyBasedEra era => InspectLedger ( ShelleyBlock proto era) Source # | |
type LedgerWarning ( ShelleyBlock proto era) Source # type LedgerUpdate ( ShelleyBlock proto era) Source # inspectLedger :: TopLevelConfig ( ShelleyBlock proto era) -> LedgerState ( ShelleyBlock proto era) -> LedgerState ( ShelleyBlock proto era) -> [ LedgerEvent ( ShelleyBlock proto era)] Source # |