-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Use Max Request Limit in Initial Sync #13641
Conversation
} | ||
castedMaxLimit, err := math.Int(maxLimit) | ||
if err != nil { | ||
// Should be impossible to hit this case. |
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.
Maybe add an error log if such a case happens?
func maxBatchLimit() int { | ||
currLimit := flags.Get().BlockBatchLimit | ||
maxLimit := params.BeaconConfig().MaxRequestBlocks | ||
if params.DenebEnabled() { |
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.
The limit is a function of which p2p topic we are subscribed to. I think we need to base this on current slot.
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.
Take a look at
prysm/config/params/network_config.go
Line 47 in 5a66807
func MaxRequestBlock(e primitives.Epoch) uint64 { |
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.
Resolved in side discussion - this is kind of a hack but the effect is only lowering the batch size. Larger batch sizes probably are not that helpful anyway given how we parallelize requests.
* use max limit * manu's review (cherry picked from commit e6a6365)
What type of PR is this?
Deneb Improvement
What does this PR do? Why is it needed?
In the event a user provides a larger than expected batch limit, we will lower it to be inline with network limits. This is to prevent users from being silently banned by all peers for requesting too large of a batch.
Which issues(s) does this PR fix?
N.A
Other notes for review
#13499 #13502