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

rpc server: make possible to disable/enable batch requests #3364

Merged
merged 13 commits into from
Feb 20, 2024

Conversation

niklasad1
Copy link
Member

@niklasad1 niklasad1 commented Feb 16, 2024

The rationale behind this, is that it may be useful for some users actually disable RPC batch requests or limit them by length instead of the total size bytes of the batch.

This PR adds two new CLI options:

--rpc-disable-batch-requests - disable batch requests on the server
--rpc-max-batch-request-len <LEN> - limit batches to LEN on the server.

@niklasad1 niklasad1 added the T0-node This PR/Issue is related to the topic “node”. label Feb 16, 2024
@niklasad1 niklasad1 changed the title rpc: expose batch request config rpc server: expose batch request config Feb 16, 2024
@niklasad1 niklasad1 requested a review from a team as a code owner February 16, 2024 17:34
@paritytech-review-bot paritytech-review-bot bot requested a review from a team February 16, 2024 17:34
@niklasad1 niklasad1 removed request for a team February 16, 2024 17:52
@@ -399,6 +407,22 @@ impl CliConfiguration for RunCmd {
Ok(self.rpc_max_subscriptions_per_connection)
}

fn rpc_buffer_capacity_per_connection(&self) -> Result<u32> {
Copy link
Member Author

@niklasad1 niklasad1 Feb 17, 2024

Choose a reason for hiding this comment

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

Unrelated to this PR but I noticed that this was missing and only the default value will be used regardless whether someone is using --rpc-buffer-capacity-per-connection X

Copy link
Contributor

Choose a reason for hiding this comment

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

Ooh this is the line I missed when I was looking at the PR and only noticed the batch config bits :)

prdoc/pr_3364.prdoc Outdated Show resolved Hide resolved
prdoc/pr_3364.prdoc Outdated Show resolved Hide resolved
@niklasad1 niklasad1 changed the title rpc server: expose batch request config rpc server: make possible to disable/enable batch requests Feb 19, 2024
@@ -133,6 +133,7 @@ check-runtime-migration-westend:
WASM: "westend_runtime.compact.compressed.wasm"
URI: "wss://westend-try-runtime-node.parity-chains.parity.io:443"
SUBCOMMAND_EXTRA_ARGS: "--no-weight-warnings"
allow_failure: true
Copy link
Member Author

@niklasad1 niklasad1 Feb 20, 2024

Choose a reason for hiding this comment

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

"CI fix" to allow the job to fail

@niklasad1 niklasad1 added this pull request to the merge queue Feb 20, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 20, 2024
@niklasad1 niklasad1 added this pull request to the merge queue Feb 20, 2024
Merged via the queue into master with commit fee810a Feb 20, 2024
131 of 132 checks passed
@niklasad1 niklasad1 deleted the na-rpc-batch-request-config branch February 20, 2024 17:58
paritytech-ci pushed a commit that referenced this pull request Feb 20, 2024
The rationale behind this, is that it may be useful for some users
actually disable RPC batch requests or limit them by length instead of
the total size bytes of the batch.

This PR adds two new CLI options:

```
--rpc-disable-batch-requests - disable batch requests on the server
--rpc-max-batch-request-len <LEN> - limit batches to LEN on the server.
```
franciscoaguirre pushed a commit that referenced this pull request Feb 22, 2024
The rationale behind this, is that it may be useful for some users
actually disable RPC batch requests or limit them by length instead of
the total size bytes of the batch.

This PR adds two new CLI options:

```
--rpc-disable-batch-requests - disable batch requests on the server
--rpc-max-batch-request-len <LEN> - limit batches to LEN on the server.
```
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
…h#3364)

The rationale behind this, is that it may be useful for some users
actually disable RPC batch requests or limit them by length instead of
the total size bytes of the batch.

This PR adds two new CLI options:

```
--rpc-disable-batch-requests - disable batch requests on the server
--rpc-max-batch-request-len <LEN> - limit batches to LEN on the server.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants