hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Node.State

Synopsis

Documentation

type PendingDeposits tx = Map (TxIdType tx) (Deposit tx) Source #

data ChainPointTime Source #

Constructors

ChainPointTime 

Fields

Instances

Instances details
FromJSON ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

Methods

parseJSON :: Value -> Parser ChainPointTime

parseJSONList :: Value -> Parser [ChainPointTime]

omittedField :: Maybe ChainPointTime

ToJSON ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

Generic ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

Associated Types

type Rep ChainPointTime :: Type -> Type Source #

Show ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

FromCBOR ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

Methods

fromCBOR :: Decoder s ChainPointTime

label :: Proxy ChainPointTime -> Text

ToCBOR ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

Methods

toCBOR :: ChainPointTime -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ChainPointTime -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ChainPointTime] -> Size

Eq ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

type Rep ChainPointTime Source # 
Instance details

Defined in Hydra.Node.State

type Rep ChainPointTime = D1 ('MetaData "ChainPointTime" "Hydra.Node.State" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "ChainPointTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "currentSlot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChainSlot) :*: (S1 ('MetaSel ('Just "currentChainTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "drift") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 NominalDiffTime))))

data NodeState tx Source #

Constructors

NodeInSync

Normal operation of the node where it is connected and has a recent view of the chain.

Fields

NodeCatchingUp

Node is catching up on its view of the chain and should behave differently.

Fields

Instances

Instances details
(IsTx tx, FromJSON (ChainStateType tx)) => FromJSON (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

parseJSON :: Value -> Parser (NodeState tx)

parseJSONList :: Value -> Parser [NodeState tx]

omittedField :: Maybe (NodeState tx)

(IsTx tx, ToJSON (ChainStateType tx)) => ToJSON (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

toJSON :: NodeState tx -> Value

toEncoding :: NodeState tx -> Encoding

toJSONList :: [NodeState tx] -> Value

toEncodingList :: [NodeState tx] -> Encoding

omitField :: NodeState tx -> Bool

Generic (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

Associated Types

type Rep (NodeState tx) :: Type -> Type Source #

Methods

from :: NodeState tx -> Rep (NodeState tx) x Source #

to :: Rep (NodeState tx) x -> NodeState tx Source #

(IsTx tx, Show (ChainStateType tx)) => Show (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

IsChainState tx => FromCBOR (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

fromCBOR :: Decoder s (NodeState tx)

label :: Proxy (NodeState tx) -> Text

IsChainState tx => ToCBOR (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

toCBOR :: NodeState tx -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (NodeState tx) -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [NodeState tx] -> Size

(IsTx tx, Eq (ChainStateType tx)) => Eq (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

(==) :: NodeState tx -> NodeState tx -> Bool Source #

(/=) :: NodeState tx -> NodeState tx -> Bool Source #

type Rep (NodeState tx) Source # 
Instance details

Defined in Hydra.Node.State

type Rep (NodeState tx) = D1 ('MetaData "NodeState" "Hydra.Node.State" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "NodeInSync" 'PrefixI 'True) (S1 ('MetaSel ('Just "headState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HeadState tx)) :*: (S1 ('MetaSel ('Just "pendingDeposits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PendingDeposits tx)) :*: S1 ('MetaSel ('Just "chainPointTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChainPointTime))) :+: C1 ('MetaCons "NodeCatchingUp" 'PrefixI 'True) (S1 ('MetaSel ('Just "headState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HeadState tx)) :*: (S1 ('MetaSel ('Just "pendingDeposits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PendingDeposits tx)) :*: S1 ('MetaSel ('Just "chainPointTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChainPointTime))))

initNodeState :: IsChainState tx => ChainStateType tx -> NodeState tx Source #

initialChainPointTime :: IsChainState tx => ChainStateType tx -> ChainPointTime Source #

data SyncedStatus Source #

Constructors

InSync 
CatchingUp 

Instances

Instances details
FromJSON SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

Methods

parseJSON :: Value -> Parser SyncedStatus

parseJSONList :: Value -> Parser [SyncedStatus]

omittedField :: Maybe SyncedStatus

ToJSON SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

Methods

toJSON :: SyncedStatus -> Value

toEncoding :: SyncedStatus -> Encoding

toJSONList :: [SyncedStatus] -> Value

toEncodingList :: [SyncedStatus] -> Encoding

omitField :: SyncedStatus -> Bool

Generic SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

Associated Types

type Rep SyncedStatus :: Type -> Type Source #

Show SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

FromCBOR SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

Methods

fromCBOR :: Decoder s SyncedStatus

label :: Proxy SyncedStatus -> Text

ToCBOR SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

Methods

toCBOR :: SyncedStatus -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy SyncedStatus -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [SyncedStatus] -> Size

Eq SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

type Rep SyncedStatus Source # 
Instance details

Defined in Hydra.Node.State

type Rep SyncedStatus = D1 ('MetaData "SyncedStatus" "Hydra.Node.State" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "InSync" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CatchingUp" 'PrefixI 'False) (U1 :: Type -> Type))

data Deposit tx Source #

A deposit tracked by the protocol. The DepositStatus determines whether it may be used for an incremental commit or not.

Constructors

Deposit 

Fields

Instances

Instances details
IsTx tx => FromJSON (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

parseJSON :: Value -> Parser (Deposit tx)

parseJSONList :: Value -> Parser [Deposit tx]

omittedField :: Maybe (Deposit tx)

IsTx tx => ToJSON (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

toJSON :: Deposit tx -> Value

toEncoding :: Deposit tx -> Encoding

toJSONList :: [Deposit tx] -> Value

toEncodingList :: [Deposit tx] -> Encoding

omitField :: Deposit tx -> Bool

Generic (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

Associated Types

type Rep (Deposit tx) :: Type -> Type Source #

Methods

from :: Deposit tx -> Rep (Deposit tx) x Source #

to :: Rep (Deposit tx) x -> Deposit tx Source #

IsTx tx => Show (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

IsTx tx => FromCBOR (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

fromCBOR :: Decoder s (Deposit tx)

label :: Proxy (Deposit tx) -> Text

IsTx tx => ToCBOR (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

toCBOR :: Deposit tx -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (Deposit tx) -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Deposit tx] -> Size

IsTx tx => Eq (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

Methods

(==) :: Deposit tx -> Deposit tx -> Bool Source #

(/=) :: Deposit tx -> Deposit tx -> Bool Source #

type Rep (Deposit tx) Source # 
Instance details

Defined in Hydra.Node.State

type Rep (Deposit tx) = D1 ('MetaData "Deposit" "Hydra.Node.State" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "Deposit" 'PrefixI 'True) ((S1 ('MetaSel ('Just "headId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 HeadId) :*: S1 ('MetaSel ('Just "deposited") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (UTxOType tx))) :*: (S1 ('MetaSel ('Just "created") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime) :*: (S1 ('MetaSel ('Just "deadline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "status") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 DepositStatus)))))

data DepositStatus Source #

Constructors

Inactive 
Active 
Expired 

Instances

Instances details
FromJSON DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

Methods

parseJSON :: Value -> Parser DepositStatus

parseJSONList :: Value -> Parser [DepositStatus]

omittedField :: Maybe DepositStatus

ToJSON DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

Generic DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

Associated Types

type Rep DepositStatus :: Type -> Type Source #

Show DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

FromCBOR DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

Methods

fromCBOR :: Decoder s DepositStatus

label :: Proxy DepositStatus -> Text

ToCBOR DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

Methods

toCBOR :: DepositStatus -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy DepositStatus -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [DepositStatus] -> Size

Eq DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

type Rep DepositStatus Source # 
Instance details

Defined in Hydra.Node.State

type Rep DepositStatus = D1 ('MetaData "DepositStatus" "Hydra.Node.State" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "Inactive" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Active" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Expired" 'PrefixI 'False) (U1 :: Type -> Type)))