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

node: increase batch limits for auth rpc API #27924

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

jsvisa
Copy link
Contributor

@jsvisa jsvisa commented Aug 14, 2023

Fixes #27923

This raises the JSON-RPC batch request limits significantly for the engine API endpoint.
The limits are now also hard-coded, so users won't get them wrong. I have chosen these limits:

  • maximum batch items: 2000
  • maximum batch response size: 250MB

While it would also be possible to disable batch limits completely for the engine API, I think having
the limits is a good safety net against misbehaving CLs.

@jsvisa jsvisa requested a review from fjl as a code owner August 14, 2023 14:14
@jsvisa
Copy link
Contributor Author

jsvisa commented Aug 14, 2023

@fjl please take a look

@fjl fjl changed the title node: nolimt the auth rpc node: increase batch limits for auth rpc API Aug 14, 2023
@fjl
Copy link
Contributor

fjl commented Aug 14, 2023

I don't agree with removing the limits entirely. Limits exist to prevent geth crashing. So I have changed it here to be a high limit that is independent from the regular API.

@jsvisa
Copy link
Contributor Author

jsvisa commented Aug 14, 2023

BTW, are there any resources, EIPs, or benchmark metrics about the default RPC's 25MB and engine's 100MB? thanks.

@fjl
Copy link
Contributor

fjl commented Aug 14, 2023

Not really. We just set it by gut feel.

jsvisa and others added 2 commits August 16, 2023 09:22
Signed-off-by: jsvisa <delweng@gmail.com>
Signed-off-by: jsvisa <delweng@gmail.com>
Since this isn't configurable, we really want to ensure this limit will never
become an issue in the CL/EL communication.
@fjl fjl merged commit 386cba1 into ethereum:master Aug 16, 2023
1 of 2 checks passed
@fjl fjl added this to the 1.13.0 milestone Aug 16, 2023
@jsvisa jsvisa deleted the node-nolimit-auth branch August 17, 2023 02:22
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
This raises the JSON-RPC batch request limits significantly for the engine API endpoint.
The limits are now also hard-coded, so users won't get them wrong. I have chosen these limits:

    maximum batch items: 2000
    maximum batch response size: 250MB

While it would also be possible to disable batch limits completely for the engine API, 
I think having some limits is a good safety net against misbehaving CLs. Since this
 isn't configurable, we really want to ensure this limit will never become an issue in the
 CL/EL communication, so I set them quite high.

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase the Default of Batch Response Max Size
2 participants