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] Change lightSync to use Read.ChainPoint #4530

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

HeinrichApfelmus
Copy link
Contributor

@HeinrichApfelmus HeinrichApfelmus commented Apr 11, 2024

This pull request changes the lightSync function to use the data type ChainPoint from the Cardano.Wallet.Read hierarchy.

Comments

  • lightSync still uses the legacy BlockHeader type from primitive for now.
  • The goal is to eventually remove the legacy primitive types.

Issue Number

ADP-3350

@HeinrichApfelmus HeinrichApfelmus self-assigned this Apr 11, 2024
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch 14 times, most recently from bc730fd to e805055 Compare April 15, 2024 15:55
@HeinrichApfelmus HeinrichApfelmus changed the base branch from master to HeinrichApfelmus/ADP-3350/chainpoint April 16, 2024 10:13
Base automatically changed from HeinrichApfelmus/ADP-3350/chainpoint to master April 16, 2024 11:50
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch 7 times, most recently from bbe8777 to 33dc2be Compare April 18, 2024 11:38
@HeinrichApfelmus HeinrichApfelmus changed the base branch from master to HeinrichApfelmus/ADP-3350/read-chaintip April 18, 2024 11:39
Base automatically changed from HeinrichApfelmus/ADP-3350/read-chaintip to master April 18, 2024 13:03
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from 33dc2be to 2504a29 Compare April 19, 2024 11:59
@HeinrichApfelmus HeinrichApfelmus changed the base branch from master to HeinrichApfelmus/ADP-3350/read-chainsync-tip April 19, 2024 12:22
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainsync-tip branch from 0e48ea8 to 96921ea Compare April 19, 2024 13:54
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from 2504a29 to fce4c55 Compare April 19, 2024 14:20
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from fce4c55 to a9e5bc7 Compare April 19, 2024 17:31
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainsync-tip branch from 96921ea to a4bca66 Compare April 19, 2024 17:31
Base automatically changed from HeinrichApfelmus/ADP-3350/read-chainsync-tip to master April 19, 2024 19:04
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from a9e5bc7 to d4b5c51 Compare April 19, 2024 20:15
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from d4b5c51 to 7474300 Compare June 12, 2024 12:05
@HeinrichApfelmus HeinrichApfelmus changed the title [ADP-3350] Add Read.ChainPoint and use it in network layer [ADP-3350] Change lightSync to use Read.ChainPoint Jun 27, 2024
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from 7474300 to b0d58e7 Compare June 27, 2024 13:43
@HeinrichApfelmus HeinrichApfelmus marked this pull request as ready for review June 27, 2024 13:45
Copy link
Collaborator

@paolino paolino left a comment

Choose a reason for hiding this comment

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

LGTM

@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from b0d58e7 to 2ef05e5 Compare July 15, 2024 14:02
compareSlot pt1 pt2 = compare (toOrdered pt1) (toOrdered pt2)
where
toOrdered :: Read.ChainPoint -> Integer
toOrdered Read.GenesisPoint = -1
Copy link
Contributor

Choose a reason for hiding this comment

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

with 0 it would not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. The points GenesisPoint and Read.BlockPoint (Read.SlotNo 0) are different.

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.

👍

@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue Jul 15, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jul 15, 2024
This pull request changes the `lightSync` function to use the data type
`ChainPoint` from the `Cardano.Wallet.Read` hierarchy.

### Comments

* `lightSync` still uses the legacy `BlockHeader` type from `primitive`
for now.
* The goal is to eventually remove the legacy `primitive` types.

### Issue Number

ADP-3350
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 15, 2024
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3350/read-chainpoint branch from 2ef05e5 to f9faccc Compare July 16, 2024 10:29
@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue Jul 16, 2024
Merged via the queue into master with commit b6e9fb0 Jul 16, 2024
3 checks passed
@HeinrichApfelmus HeinrichApfelmus deleted the HeinrichApfelmus/ADP-3350/read-chainpoint branch July 16, 2024 12:52
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