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

Add jsonrpc batch request limit #4529

Merged

Conversation

chenyukang
Copy link
Collaborator

What problem does this PR solve?

Partially address #4520

Problem Summary:

User may send large batch jsonrpc request, if the request costs much memory it may makes the ckb server hang up.

We should provide a way to support user to config the batch request limit.

jsonrpsee support this option, we can also support it with jsonrpc-utils.

What's Changed:

Related changes

  • PR to update owner/repo:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code ci-runs-only: [ quick_checks,linters ]

Side effects

  • Performance regression
  • Breaking backward compatibility

Release note

Title Only: Include only the PR title in the release note.

@chenyukang chenyukang requested a review from a team as a code owner July 17, 2024 15:27
@chenyukang chenyukang requested review from quake and removed request for a team July 17, 2024 15:27
rpc/src/server.rs Outdated Show resolved Hide resolved
eval-exec
eval-exec previously approved these changes Jul 18, 2024
rpc/Cargo.toml Outdated Show resolved Hide resolved
@chenyukang chenyukang force-pushed the yukang-add-rpc-batch-limit branch 2 times, most recently from fe6eb9e to 3fdccf9 Compare July 25, 2024 08:34
@chenyukang chenyukang added this pull request to the merge queue Jul 29, 2024
Merged via the queue into nervosnetwork:develop with commit 1fc01ee Jul 29, 2024
32 checks passed
@doitian doitian mentioned this pull request Aug 19, 2024
3 tasks
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.

4 participants