This pull request adds a data type ChainTip to the Cardano.Wallet.Read hierarchy.
This type ChainTip is used in the ChainSync protocol to advertise the tip of the server's chain. It combines the information of a ChainPoint with a BlockNo.
This pull requests also adds
Conversions to/from types in ouroboros-consensus for the networking layer
Comments
The NetworkLayer currently uses the BlockHeader type for advertising the tip of the chain. However, this is strictly speaking incorrect, as the BlockHeader also includes a reference to the previous block header, which ChainTip does not. In the legacy code, we currently invent a value out of thin air — the new type ChainTip is more correct.
Subsequent pull requests will change the NetworkLayer interface to use Read.ChainPoint and Read.ChainTip.
This pull request adds a data type
ChainTip
to theCardano.Wallet.Read
hierarchy.This type
ChainTip
is used in the ChainSync protocol to advertise the tip of the server's chain. It combines the information of aChainPoint
with aBlockNo
.This pull requests also adds
ouroboros-consensus
for the networking layerComments
NetworkLayer
currently uses theBlockHeader
type for advertising the tip of the chain. However, this is strictly speaking incorrect, as theBlockHeader
also includes a reference to the previous block header, whichChainTip
does not. In the legacy code, we currently invent a value out of thin air — the new typeChainTip
is more correct.NetworkLayer
interface to useRead.ChainPoint
andRead.ChainTip
.Issue Number
ADP-3350