cardano-api:internal
Safe HaskellNone
LanguageHaskell2010

Cardano.Api.Modes

Description

Consensus modes. The node supports several different modes with different combinations of consensus protocols and ledger eras.

Synopsis

The protocols supported in each era

Connection parameters for each mode

data ConsensusModeParams where Source #

The consensus-mode-specific parameters needed to connect to a local node that is using each consensus mode.

It is in fact only the Byron era that requires extra parameters, but this is of course inherited by the CardanoMode that uses the Byron era. The reason this parameter is needed stems from unfortunate design decisions from the legacy Byron era. The slots per epoch are needed to be able to decode epoch boundary blocks from the Byron era.

It is possible in future that we may be able to eliminate this parameter by discovering it from the node during the initial handshake.

newtype EpochSlots Source #

The number of slots per epoch.

Constructors

EpochSlots 

Fields

Instances

Instances details
Data EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EpochSlots -> c EpochSlots Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EpochSlots Source #

toConstr :: EpochSlots -> Constr Source #

dataTypeOf :: EpochSlots -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EpochSlots) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EpochSlots) Source #

gmapT :: (forall b. Data b => b -> b) -> EpochSlots -> EpochSlots Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EpochSlots -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EpochSlots -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> EpochSlots -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> EpochSlots -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> EpochSlots -> m EpochSlots Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EpochSlots -> m EpochSlots Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EpochSlots -> m EpochSlots Source #

Generic EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Associated Types

type Rep EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

type Rep EpochSlots = D1 ('MetaData "EpochSlots" "Cardano.Chain.Slotting.EpochSlots" "cardano-ledger-byron-1.0.1.0-170c1b876d38a1aa320a348e79d8a664ced269973d2dc19ad89cab94de534546" 'True) (C1 ('MetaCons "EpochSlots" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))
Read EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Show EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

FromCBOR EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

ToCBOR EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

DecCBOR EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

EncCBOR EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Buildable EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Methods

build :: EpochSlots -> Builder

Eq EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Ord EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

NoThunks EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

Methods

noThunks :: Context -> EpochSlots -> IO (Maybe ThunkInfo) #

wNoThunks :: Context -> EpochSlots -> IO (Maybe ThunkInfo) #

showTypeOf :: Proxy EpochSlots -> String #

type Rep EpochSlots 
Instance details

Defined in Cardano.Chain.Slotting.EpochSlots

type Rep EpochSlots = D1 ('MetaData "EpochSlots" "Cardano.Chain.Slotting.EpochSlots" "cardano-ledger-byron-1.0.1.0-170c1b876d38a1aa320a348e79d8a664ced269973d2dc19ad89cab94de534546" 'True) (C1 ('MetaCons "EpochSlots" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSlots") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

Conversions to and from types in the consensus library