-
Notifications
You must be signed in to change notification settings - Fork 113
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
Warpsync: epoch syncing #2367
Warpsync: epoch syncing #2367
Conversation
Co-authored-by: Jonas Theis <[email protected]>
…himmer into refactor/p2p-gossip-split
0381a85
to
a1ea58f
Compare
dc5b11b
to
1eee490
Compare
packages/node/warpsync/syncing.go
Outdated
if err != nil { | ||
return errors.Errorf("sync failed for range %d-%d", start, end) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of assigning the error in the callback I'd suggest the following: hand over a ctx that you can cancel to the goroutines and make them write into a result channel that contains an error and the completed EI (or maybe we don't even need that and counting is enough). Then you can cancel all goroutines on demand if there's an error and you wait on the result channel instead of the epochProcessingChan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be addressed now with the resultChan, cancellable errCtx and errorChan.
1500811
to
c56f92e
Compare
plugins/warpsync/parameters.go
Outdated
// BlockBatchSize defines the amount of blocks to send in a single epoch blocks response"` | ||
BlockBatchSize int `default:"100" usage:"the amount of blocks to send in a single epoch blocks response"` | ||
// SyncRangeTimeOut defines the time after which a sync range is considered as failed. | ||
SyncRangeTimeOut time.Duration `default:"30s" usage:"the time after which a sync range is considered as failed"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that a little bit low as a default value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Increased it to 5m
Description of change
Issue #2380
Implementation of the
Warpsync
plugin that will allow to retrieve entire epoch's content for a specific epoch commitment chain: for faster syncing and for switching to a heavier EC chain.Type of change