ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.MiniProtocol.ChainSync.Server

Contents

Synopsis

Documentation

chainSyncHeadersServer :: forall m blk. (IOLike m, HasHeader (Header blk)) => Tracer m (TraceChainSyncServerEvent blk) -> ChainDB m blk -> NodeToNodeVersion -> ResourceRegistry m -> ChainSyncServer (SerialisedHeader blk) (Point blk) (Tip blk) m () Source #

Chain Sync Server for block headers for a given a ChainDB.

The node-to-node protocol uses the chain sync mini-protocol with chain headers (and fetches blocks separately with the block fetch mini-protocol).

chainSyncBlocksServer :: forall m blk. (IOLike m, HasHeader (Header blk)) => Tracer m (TraceChainSyncServerEvent blk) -> ChainDB m blk -> ResourceRegistry m -> ChainSyncServer (Serialised blk) (Point blk) (Tip blk) m () Source #

Chain Sync Server for blocks for a given a ChainDB.

The local node-to-client protocol uses the chain sync mini-protocol with chains of full blocks (rather than a header / body split).

data Tip b #

Instances

Instances details
StandardHash b => Eq (Tip b) 
Instance details

Defined in Ouroboros.Network.Block

Methods

(==) :: Tip b -> Tip b -> Bool #

(/=) :: Tip b -> Tip b -> Bool #

StandardHash b => Show (Tip b) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showsPrec :: Int -> Tip b -> ShowS #

show :: Tip b -> String #

showList :: [Tip b] -> ShowS #

Generic (Tip b) 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (Tip b) :: Type -> Type #

Methods

from :: Tip b -> Rep (Tip b) x #

to :: Rep (Tip b) x -> Tip b #

StandardHash b => NoThunks (Tip b) 
Instance details

Defined in Ouroboros.Network.Block

Condense (HeaderHash b) => Condense (Tip b) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condense :: Tip b -> String Source #

ShowProxy b => ShowProxy (Tip b :: Type) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showProxy :: Proxy (Tip b) -> String Source #

type Rep (Tip b) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (Tip b) = D1 ('MetaData "Tip" "Ouroboros.Network.Block" "ouroboros-network-0.1.0.0-DgIBwCUrGXaLitNwqCfIcM" 'False) (C1 ('MetaCons "TipGenesis" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Tip" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HeaderHash b)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 BlockNo))))

Trace events

data TraceChainSyncServerEvent blk Source #

Events traced by the Chain Sync Server.

The whole headers/blocks in the traced ChainUpdate are substituted with their corresponding Point.

Constructors

TraceChainSyncServerRead (Tip blk) (ChainUpdate blk (Point blk)) 
TraceChainSyncServerReadBlocked (Tip blk) (ChainUpdate blk (Point blk))