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

cmd/blsync, beacon/light: standalone beacon light sync tool (WIP, reworked request framework) #28708

Closed
wants to merge 10 commits into from

Conversation

zsfelfoldi
Copy link
Contributor

@zsfelfoldi zsfelfoldi commented Dec 19, 2023

This is a WIP new version of blsync that might still be ugly in some places, lacks a lot of comments and unit tests but is working already. It is based on the new, simplified request framework: #28656
Update syncing mechanism has also been improved since the last version, now it can make parallel update requests, hopefully speeding up the initial sync process.

For a quick test run, you can use this endpoint and checkpoint:

./blsync --beacon.api "https://www.lightclientdata.org" --beacon.checkpoint 0xbfe7385d59b566b66b30e2e4b834ae374d06330141d0edeff2796187e621ecbb

@fjl
Copy link
Contributor

fjl commented Dec 19, 2023

Please rebase on master where we already have the CommitteeChain merged.

@zsfelfoldi zsfelfoldi force-pushed the blsync101 branch 2 times, most recently from 4b60205 to a4830e3 Compare December 19, 2023 16:57
}

func (s *Scheduler) handleEvent(server Server, event Event) {
s.Trigger()
Copy link
Member

Choose a reason for hiding this comment

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

Not 100% sure, but if we trigger the loop here, wouldn't we run into a race where the modules would be triggered with old serverEvents?
Afaiu we should handle the events, add the serverEvents and then trigger the modules.
Might be completely wrong though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's correct, this happens under mutex lock and the next process round can only look at the event lists after this function is finished. Maybe it would look more intuitive though if I deferred the trigger after executing the function.

@zsfelfoldi zsfelfoldi force-pushed the blsync101 branch 2 times, most recently from a3be388 to 2b951ad Compare December 22, 2023 03:49
@zsfelfoldi
Copy link
Contributor Author

Closed in favor of #28822

@zsfelfoldi zsfelfoldi closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants