Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Tip (b ∷ k)
- chainSyncBlockServerFollower ∷ ChainDB m blk → ResourceRegistry m → m (Follower m blk (WithPoint blk (Serialised blk)))
- chainSyncBlocksServer ∷ ∀ m blk. (IOLike m, HasHeader (Header blk)) ⇒ Tracer m (TraceChainSyncServerEvent blk) → ChainDB m blk → Follower m blk (WithPoint blk (Serialised blk)) → ChainSyncServer (Serialised blk) (Point blk) (Tip blk) m ()
- chainSyncHeaderServerFollower ∷ ChainDB m blk → ChainType → ResourceRegistry m → m (Follower m blk (WithPoint blk (SerialisedHeader blk)))
- chainSyncHeadersServer ∷ ∀ m blk. (IOLike m, HasHeader (Header blk)) ⇒ Tracer m (TraceChainSyncServerEvent blk) → ChainDB m blk → Follower m blk (WithPoint blk (SerialisedHeader blk)) → ChainSyncServer (SerialisedHeader blk) (Point blk) (Tip blk) m ()
- data BlockingType
- data TraceChainSyncServerEvent blk = TraceChainSyncServerUpdate (Tip blk) (ChainUpdate blk (Point blk)) BlockingType Enclosing
- chainSyncServerForFollower ∷ ∀ m blk b. IOLike m ⇒ Tracer m (TraceChainSyncServerEvent blk) → STM m (Tip blk) → Follower m blk (WithPoint blk b) → ChainSyncServer b (Point blk) (Tip blk) m ()
Documentation
Used in chain-sync protocol to advertise the tip of the server's chain.
Instances
ShowProxy b ⇒ ShowProxy (Tip b ∷ Type) | |
Generic (Tip b) | |
StandardHash b ⇒ Show (Tip b) | |
StandardHash b ⇒ Eq (Tip b) | |
StandardHash b ⇒ NoThunks (Tip b) | |
Condense (HeaderHash b) ⇒ Condense (Tip b) Source # | |
type Rep (Tip b) | |
Defined in Ouroboros.Network.Block type Rep (Tip b) = D1 ('MetaData "Tip" "Ouroboros.Network.Block" "ouroboros-network-api-0.11.0.0-51203573fcfcfd3b2c06491320742b9da13f8f293bfcf4fc69f087b3c7b975f1" '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)))) |
chainSyncBlockServerFollower ∷ ChainDB m blk → ResourceRegistry m → m (Follower m blk (WithPoint blk (Serialised blk))) Source #
chainSyncBlocksServer ∷ ∀ m blk. (IOLike m, HasHeader (Header blk)) ⇒ Tracer m (TraceChainSyncServerEvent blk) → ChainDB m blk → Follower m blk (WithPoint blk (Serialised blk)) → 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).
chainSyncHeaderServerFollower ∷ ChainDB m blk → ChainType → ResourceRegistry m → m (Follower m blk (WithPoint blk (SerialisedHeader blk))) Source #
chainSyncHeadersServer ∷ ∀ m blk. (IOLike m, HasHeader (Header blk)) ⇒ Tracer m (TraceChainSyncServerEvent blk) → ChainDB m blk → Follower m blk (WithPoint blk (SerialisedHeader blk)) → 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).
Trace events
data BlockingType Source #
Whether reading a ChainSync server update instruction was blocking or non-blocking.
Instances
Show BlockingType Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Server showsPrec ∷ Int → BlockingType → ShowS # show ∷ BlockingType → String # showList ∷ [BlockingType] → ShowS # | |
Eq BlockingType Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Server (==) ∷ BlockingType → BlockingType → Bool # (/=) ∷ BlockingType → BlockingType → Bool # | |
Ord BlockingType Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Server compare ∷ BlockingType → BlockingType → Ordering # (<) ∷ BlockingType → BlockingType → Bool # (<=) ∷ BlockingType → BlockingType → Bool # (>) ∷ BlockingType → BlockingType → Bool # (>=) ∷ BlockingType → BlockingType → Bool # max ∷ BlockingType → BlockingType → BlockingType # min ∷ BlockingType → BlockingType → BlockingType # |
data TraceChainSyncServerEvent blk Source #
Events traced by the Chain Sync Server.
TraceChainSyncServerUpdate | Send a |
|
Instances
StandardHash blk ⇒ Show (TraceChainSyncServerEvent blk) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Server showsPrec ∷ Int → TraceChainSyncServerEvent blk → ShowS # show ∷ TraceChainSyncServerEvent blk → String # showList ∷ [TraceChainSyncServerEvent blk] → ShowS # | |
StandardHash blk ⇒ Eq (TraceChainSyncServerEvent blk) Source # | |
Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Server (==) ∷ TraceChainSyncServerEvent blk → TraceChainSyncServerEvent blk → Bool # (/=) ∷ TraceChainSyncServerEvent blk → TraceChainSyncServerEvent blk → Bool # |
Low-level API
chainSyncServerForFollower ∷ ∀ m blk b. IOLike m ⇒ Tracer m (TraceChainSyncServerEvent blk) → STM m (Tip blk) → Follower m blk (WithPoint blk b) → ChainSyncServer b (Point blk) (Tip blk) m () Source #
A chain sync server.
This is a version of
chainSyncServerExample
that
uses an action to get the current Tip
and a Follower
instead of
ChainProducerState
.
All the hard work is done by the Follower
s provided by the ChainDB
.