-
Notifications
You must be signed in to change notification settings - Fork 305
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
limit deneb block requests (by range and by root) #6892
Conversation
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.
Hmm think this is not correct. MAX_BLOCK_BY_RANGE_REQUEST_SIZE is used for rate limiting. Think can leave this value as it is for Deneb. We should see the usage of MAX_REQUEST_BLOCKS instead and change it accordingly for the Deneb fork.
...h/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BeaconBlocksByRootMessageHandler.java
Outdated
Show resolved
Hide resolved
...eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/BeaconChainMethods.java
Show resolved
Hide resolved
...eth2/src/main/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/BeaconChainMethods.java
Show resolved
Hide resolved
@StefanBratanov is |
Actually |
Actually |
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.
LGTM
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.
Hmm, not sure why MAX_BLOCK_BY_RANGE_REQUEST_SIZE was introduced. But there are usages of MAX_REQUEST_BLOCKS still which are definied in phase0 specs https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/p2p-interface.md. In my mind this constant is getting overriden for Deneb https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/p2p-interface.md so all usages of MAX_REQUEST_BLOCKS should be replaced by MAX_REQUEST_BLOCKS_DENEB once Deneb is active. Maybe @tbenr can jump in and have a look as well if he agrees with me.
MAX_BLOCK_BY_RANGE_REQUEST_SIZE has been introduced way back here #1061 I agree with @StefanBratanov that we should change at runtime the limit from |
Done in: #6938 |
PR Description
No more than
MAX_REQUEST_BLOCKS_DENEB
may be requested at a time (BeaconBlocksByRange
andBeaconBlocksByRoot
)Fixed Issue(s)
#6870
Documentation
doc-change-required
label to this PR if updates are required.Changelog