Skip to content

ChainSync: MsgRollForward tip slot can be behind header slot #5297

@paolino

Description

@paolino

Summary

While implementing a ChainSync client, I observed that the tip parameter in MsgRollForward can have a slot number lower than the header being delivered. Is this expected protocol behavior?

Observed Behavior

Debug tracing shows:

headerSlot=SlotNo 103120911 tipSlot=SlotNo 103120911
headerSlot=SlotNo 103120959 tipSlot=SlotNo 103120911
headerSlot=SlotNo 103120971 tipSlot=SlotNo 103120959
headerSlot=SlotNo 103120985 tipSlot=SlotNo 103120971
headerSlot=SlotNo 103121010 tipSlot=SlotNo 103120985

The pattern shows that tipSlot consistently equals the previous header's slot, not the current chain tip. This means header.slot > tip.slot by approximately one block.

Expected Behavior (my assumption)

I expected tip.slot >= header.slot to always hold, since:

  • The tip represents the server's current chain tip
  • The header is a block from that chain
  • A block cannot be ahead of the chain tip

Questions

  1. Is header.slot > tip.slot expected/valid behavior in MsgRollForward?
  2. If so, is this documented somewhere in the protocol specification?

Environment

  • cardano-node 10.3.1 (linux-x86_64, ghc-9.6, git rev b3f237b75e64f4d8142af95b053e2828221d707f)
  • Preview network
  • Node-to-node ChainSync protocol

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions