8000 feat: add a configurable maximum batch size for RPC requests (backport #2939) by mergify[bot] · Pull Request #2980 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add a configurable maximum batch size for RPC requests (backport #2939) #2980

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

Merged
merged 6 commits into from
May 3, 2024

Conversation

mergify[bot]
Copy link
Contributor
@mergify mergify bot commented May 2, 2024

close: #2867

Adds middleware for the JSONRPC server to enforce a configurable maximum batch size for RPC requests.


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments
  • Title follows the Conventional Commits spec

This is an automatic backport of pull request #2939 done by [Mergify](https://mergify.com).

close: #2867

Adds middleware for the JSONRPC server to enforce a configurable maximum
batch size for RPC requests.

---

#### PR checklist

- [ ] Tests written/updated
- [X] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [X] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

(cherry picked from commit aa1caba)

# Conflicts:
#	docs/references/config/config.toml.md
@mergify mergify bot requested a review from a team as a code owner May 2, 2024 12:49
@mergify mergify bot added the conflicts label May 2, 2024
Copy link
Contributor Author
mergify bot commented May 2, 2024

Cherry-pick of aa1caba has failed:

On branch mergify/bp/v0.38.x/pr-2939
Your branch is up to date with 'origin/v0.38.x'.

You are currently cherry-picking commit aa1cabadb.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   .changelog/unreleased/improvements/2867-rpc-batch-size-config.md
	new file:   cmd/cometbft/cometbft
	modified:   config/config.go
	modified:   config/config_test.go
	modified:   config/toml.go
	modified:   node/node.go
	modified:   rpc/client/examples_test.go
	modified:   rpc/jsonrpc/client/decode.go
	modified:   rpc/jsonrpc/server/http_json_handler.go
	modified:   rpc/jsonrpc/server/http_server.go
	modified:   rpc/test/helpers.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   docs/references/config/config.toml.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@andynog andynog self-assigned this May 2, 2024
@andynog andynog requested a review from melekes May 2, 2024 19:20
@andynog
Copy link
Contributor
andynog commented May 2, 2024

Hi @melekes, could you please also review this backport to v0.38.x ? I fixed the conflicts and adapted the code to work with this release. I've also tested locally for the max RPC request batch size and max body bytes and seems to be working fine. The unit test is also working. Just want a second set of eyes here if possible. Thanks !

andynog and others added 2 commits May 3, 2024 10:24
good catch, I'll submit a PR to fix this in the branches already merged

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
@andynog andynog removed their assignment May 3, 2024
Copy link
Contributor
@andynog andynog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@andynog andynog merged commit bce83b3 into v0.38.x May 3, 2024
21 checks passed
@andynog andynog deleted the mergify/bp/v0.38.x/pr-2939 branch May 3, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0