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

Syncer V2 #591

Merged
merged 65 commits into from
Jul 13, 2022
Merged

Syncer V2 #591

merged 65 commits into from
Jul 13, 2022

Conversation

Kourin1996
Copy link
Contributor

@Kourin1996 Kourin1996 commented Jun 15, 2022

Description

Implementation of the new syncing protocol (Lightning Sync)

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Yes this is a braking change

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

We have done a regression test for this module
Some of the test cases:

  1. Syncing new node and continuing in watchSync state
  2. Syncing multiple nodes at the same time with 1 validator
  3. Stopping the network while in bulkSync and restarting to see will it continue
  4. From watchSync to validator to watchSync

Documentation update

Will link when i open a PR

Additional comments

Fixes EDGE-592, EDGE-593, EDGE-594, EDGE-595

@Kourin1996 Kourin1996 added don't merge Please don't merge this functionality temporarily feature New update to Polygon Edge breaking change Functionality that contains breaking changes labels Jun 15, 2022
syncer/syncer.go Outdated Show resolved Hide resolved
syncer/syncer.go Outdated Show resolved Hide resolved
syncer/syncer.go Outdated Show resolved Hide resolved
syncer/peers/heap.go Outdated Show resolved Hide resolved
Copy link
Contributor

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

I really don't like that you've ignored parts of the spec that we've agreed upon. We dropped some functionality and flows for a reason, but you chose to ignore that and reintroduced them back (pubsub is completely missing, Notify and Broadcast are back, no agreed upon error handling...).

Why are you supporting forking? It complicates the code exponentially, and makes it harder to read and work with, especially implement WatchSync that @Aleksao998 is working on. I especially don't like the complexity of the nofork package - I strongly believe we should drop it completely.

I don't see us introducing a consensus mechanism that supports forking in the near future, or even at all at this point - we can always add that functionality when we need it in a year or more, or ever.

There are also 0 tests in this PR, which is a shame since the whole point of us basing Lighting Sync on gRPC streams and RPC method calls, and simplifying the flow, was that it made it much easier to test and verify.

syncer/syncer.go Outdated Show resolved Hide resolved
syncer/syncer.go Outdated Show resolved Hide resolved
syncer/syncer.go Outdated Show resolved Hide resolved
@0xAleksaOpacic 0xAleksaOpacic added the don't merge Please don't merge this functionality temporarily label Jul 12, 2022
@0xAleksaOpacic 0xAleksaOpacic merged commit 65f4fb3 into develop Jul 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 13, 2022
@Kourin1996 Kourin1996 deleted the feature/sync-v2 branch September 29, 2022 09:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking change Functionality that contains breaking changes don't merge Please don't merge this functionality temporarily feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants