Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADP-3350] Add Read.ChainTip type #4541

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

HeinrichApfelmus
Copy link
Contributor

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.

Issue Number

ADP-3350

Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

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

looking good 👍

@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue Apr 17, 2024
Merged via the queue into master with commit 949d421 Apr 17, 2024
3 checks passed
@HeinrichApfelmus HeinrichApfelmus deleted the HeinrichApfelmus/ADP-3350/tip branch April 17, 2024 07:55
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.

2 participants