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

make SyncQueue / SyncManager generic #3401

Closed
wants to merge 1 commit into from

Conversation

etan-status
Copy link
Contributor

The libp2p light client sync protocol defines an endpoint for syncing
historic data that is structured similarly to beaconBlocksByRange,
i.e., it uses a start/count/step tuple to sync from finalized to head.
See ethereum/consensus-specs#2802
As preparation, this patch extends the SyncQueue and SyncManager
implementations to work with such new ByRange endpoints as well.

@etan-status
Copy link
Contributor Author

  • T: Peer type
  • E: Endpoint
  • K: Key
  • V: Value
  • R: Result (network)

difference = (wallSlot - headSlot),
max_head_age = man.maxHeadAge, direction = man.direction,
topics = "syncman"
when E.K is Slot:
Copy link
Contributor

@tersec tersec Feb 16, 2022

Choose a reason for hiding this comment

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

This kind of logic conflates what's kind of an implementation detail (the unit of measure of synchronization) with the type of synchronization (forward sync, not light client sync). It happens to work now -- is there reason to be concerned that this bijectivity might not always hold?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The unit is mentioned in the log message ("wall_head_slot" / "local_head_slot"), the when here is just to support other units in this wrapped log statement as well.

@github-actions
Copy link

github-actions bot commented Feb 16, 2022

Unit Test Results

     12 files  ±0     821 suites  ±0   31m 46s ⏱️ - 2m 58s
1 671 tests ±0  1 625 ✔️ ±0    46 💤 ±0  0 ±0 
9 755 runs  ±0  9 655 ✔️ ±0  100 💤 ±0  0 ±0 

Results for commit 1c9e73b. ± Comparison against base commit 8df4290.

♻️ This comment has been updated with latest results.

The libp2p light client sync protocol defines an endpoint for syncing
historic data that is structured similarly to `beaconBlocksByRange`,
i.e., it uses a start/count/step tuple to sync from finalized to head.
See ethereum/consensus-specs#2802
As preparation, this patch extends the `SyncQueue` and `SyncManager`
implementations to work with such new `ByRange` endpoints as well.
@cheatfate
Copy link
Contributor

cheatfate commented Feb 21, 2022

Personally i do not like all this renames, i think this PR should me much less intrusive.

Lets not mix renames and functionality changes in one PR, because with a lot of renames its very hard to see what was actually changed in terms of functionality.

@etan-status
Copy link
Contributor Author

This PR is no longer needed, because all needed light client data can be obtained in just 1-2 requests.

@etan-status etan-status deleted the sm-te branch June 24, 2022 16:05
@etan-status etan-status restored the sm-te branch November 11, 2022 07:49
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