Skip to content

Conversation

@SupernaviX
Copy link
Collaborator

@SupernaviX SupernaviX commented Dec 4, 2025

Description

Add a tip_slot field to BlockInfo, indicating which slot "the tip" is currently at. This field is None by default and while e.g. syncing from mithril, but we populate it while transmitting blocks from the ChainSync mini-protocol. This field currently refers to the tip of the chain of whichever peer we've decided to follow.

Also adds a test for a regression from an older implementation of PeerNetworkInterface.

Related Issue(s)

Completes #422

How was this tested?

I synced the node with preview after booting from a mithril snapshot, confirming that

  • it did not report a tip while restoring from the snapshot
  • it reported a tip in the future while catching up
  • it reported a tip in the present (or past) once caught up

Checklist

  • My code builds and passes local tests
  • I added/updated tests for my changes, where applicable
  • I updated documentation (if applicable)
  • CI is green for this PR

Impact / Side effects

An extra optional u64 in BlockInfo which gets passed everywhere

Reviewer notes / Areas to focus

The only non-mechanical changes are updates to BlockInfo and PeerNetworkInterface

@SupernaviX SupernaviX changed the title Sg/track tip Report tip status in BlockInfo Dec 4, 2025
@SupernaviX SupernaviX marked this pull request as ready for review December 4, 2025 21:36
@SupernaviX SupernaviX requested review from golddydev, lowhung and whankinsiv and removed request for lowhung and whankinsiv December 4, 2025 21:36
Copy link
Collaborator

@whankinsiv whankinsiv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@SupernaviX SupernaviX merged commit 9e3a565 into main Dec 6, 2025
2 checks passed
@SupernaviX SupernaviX deleted the sg/track-tip branch December 6, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants