cardano-ledger-byron-0.1.0.0: The blockchain layer of Cardano during the Byron era
Safe Haskell None
Language Haskell2010

Cardano.Chain.Update.Validation.Voting

Description

Validation rules for registering votes and confirming proposals

This is an implementation of the rules defined in the Byron ledger specification

Synopsis

Documentation

data Environment Source #

Environment used to register votes and confirm proposals

Instances

Instances details
Eq Environment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

Show Environment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

Generic Environment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

NFData Environment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

type Rep Environment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

type Rep Environment = D1 (' MetaData "Environment" "Cardano.Chain.Update.Validation.Voting" "cardano-ledger-byron-0.1.0.0-1U5kXR8zMRrE7QjCz70XVD" ' False ) ( C1 (' MetaCons "Environment" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "veCurrentSlot") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 SlotNumber ) :*: ( S1 (' MetaSel (' Just "veConfirmationThreshold") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Int ) :*: S1 (' MetaSel (' Just "veVotingRegistrationEnvironment") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 RegistrationEnvironment ))))

data RegistrationEnvironment Source #

Environment required to validate and register a vote

Instances

Instances details
Eq RegistrationEnvironment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

Show RegistrationEnvironment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

Generic RegistrationEnvironment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

NFData RegistrationEnvironment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

type Rep RegistrationEnvironment Source #
Instance details

Defined in Cardano.Chain.Update.Validation.Voting

type Rep RegistrationEnvironment = D1 (' MetaData "RegistrationEnvironment" "Cardano.Chain.Update.Validation.Voting" "cardano-ledger-byron-0.1.0.0-1U5kXR8zMRrE7QjCz70XVD" ' False ) ( C1 (' MetaCons "RegistrationEnvironment" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "vreRegisteredUpdateProposal") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Set UpId )) :*: S1 (' MetaSel (' Just "vreDelegationMap") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Map )))

data State Source #

State keeps track of registered votes and confirmed proposals

Constructors

State

registerVoteWithConfirmation :: MonadError Error m => Annotated ProtocolMagicId ByteString -> Environment -> State -> AVote ByteString -> m State Source #

Register a vote and confirm the corresponding proposal if it passes the voting threshold. This corresponds to the UPVOTE rules in the spec.