plutus-chain-index-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.ChainIndex.SyncStats

Synopsis

Documentation

data SyncStats Source #

Constructors

SyncStats 

Fields

Instances

Instances details
Eq SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Show SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Generic SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Associated Types

type Rep SyncStats :: Type -> Type Source #

Semigroup SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Monoid SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

FromJSON SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

parseJSON :: Value -> Parser SyncStats

parseJSONList :: Value -> Parser [SyncStats]

ToJSON SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toJSON :: SyncStats -> Value

toEncoding :: SyncStats -> Encoding

toJSONList :: [SyncStats] -> Value

toEncodingList :: [SyncStats] -> Encoding

ToObject SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toObject :: TracingVerbosity -> SyncStats -> Object

textTransformer :: SyncStats -> Object -> Text

type Rep SyncStats Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

type Rep SyncStats = D1 ('MetaData "SyncStats" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-1.2.0.0-45ZSeuYJXy24BPKsWnWcAF" 'False) (C1 ('MetaCons "SyncStats" 'PrefixI 'True) ((S1 ('MetaSel ('Just "syncStatsAppliedBlocks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "syncStatsAppliedRollbacks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "syncStatsChainSyncPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point) :*: S1 ('MetaSel ('Just "syncStatsNodePoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point))))

data SyncLog Source #

Constructors

SyncLog 

Fields

Instances

Instances details
Eq SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Show SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Generic SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Associated Types

type Rep SyncLog :: Type -> Type Source #

FromJSON SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

parseJSON :: Value -> Parser SyncLog

parseJSONList :: Value -> Parser [SyncLog]

ToJSON SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toJSON :: SyncLog -> Value

toEncoding :: SyncLog -> Encoding

toJSONList :: [SyncLog] -> Value

toEncodingList :: [SyncLog] -> Encoding

Pretty SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

pretty :: SyncLog -> Doc ann

prettyList :: [SyncLog] -> Doc ann

ToObject SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toObject :: TracingVerbosity -> SyncLog -> Object

textTransformer :: SyncLog -> Object -> Text

type Rep SyncLog Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

type Rep SyncLog = D1 ('MetaData "SyncLog" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-1.2.0.0-45ZSeuYJXy24BPKsWnWcAF" 'False) (C1 ('MetaCons "SyncLog" 'PrefixI 'True) (S1 ('MetaSel ('Just "syncStateSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyncState) :*: (S1 ('MetaSel ('Just "syncStatsSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyncStats) :*: S1 ('MetaSel ('Just "syncPeriodSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Second))))

data SyncState Source #

Instances

Instances details
Eq SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Show SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Generic SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Associated Types

type Rep SyncState :: Type -> Type Source #

FromJSON SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

parseJSON :: Value -> Parser SyncState

parseJSONList :: Value -> Parser [SyncState]

ToJSON SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toJSON :: SyncState -> Value

toEncoding :: SyncState -> Encoding

toJSONList :: [SyncState] -> Value

toEncodingList :: [SyncState] -> Encoding

Pretty SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

pretty :: SyncState -> Doc ann

prettyList :: [SyncState] -> Doc ann

ToObject SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

Methods

toObject :: TracingVerbosity -> SyncState -> Object

textTransformer :: SyncState -> Object -> Text

type Rep SyncState Source # 
Instance details

Defined in Plutus.ChainIndex.SyncStats

type Rep SyncState = D1 ('MetaData "SyncState" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-1.2.0.0-45ZSeuYJXy24BPKsWnWcAF" 'False) (C1 ('MetaCons "Synced" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Syncing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :+: C1 ('MetaCons "NotSyncing" 'PrefixI 'False) (U1 :: Type -> Type)))

logProgress :: forall effs. Member (LogMsg SyncLog) effs => [ChainSyncEvent] -> TimeSpec -> Eff effs () Source #

Log syncing summary.

getSyncStateFromStats :: SyncStats -> SyncState Source #

Get the SyncState for a SyncState.

TODO: The syncing percentage is valid when the node is already fully synced. But when the node and chain-index are started at the same time, the syncing percentage is not a valid number considering the actual tip of the node. Find a better way to calculate this percentage.

getSyncState :: Point -> Point -> SyncState Source #