Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Add option for user to set max size limit for RPC requests #9010

Merged
merged 5 commits into from
Jul 2, 2018

Conversation

mttmartin
Copy link
Contributor

Add option for user to set max size limit for RPC requests. This was requested in #8961.

@parity-cla-bot
Copy link

It looks like @mttmartin hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement at the following URL: https://cla.parity.io

Once you've signed, please reply to this thread with [clabot:check] to prove it.

Many thanks,

Parity Technologies CLA Bot

@mttmartin
Copy link
Contributor Author

[clabot:check]

@parity-cla-bot
Copy link

It looks like @mttmartin signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@5chdn 5chdn added this to the 1.12 milestone Jun 29, 2018
@5chdn 5chdn added A0-pleasereview 🤓 Pull request needs code review. M2-config 📂 Chain specifications and node configurations. labels Jun 29, 2018
@@ -482,6 +482,10 @@ usage! {
"--jsonrpc-server-threads=[NUM]",
"Enables multiple threads handling incoming connections for HTTP JSON-RPC server.",

ARG arg_jsonrpc_max_payload: (Option<usize>) = None, or |c: &Config| c.rpc.as_ref()?.max_payload,
"--jsonrpc-max-size=[NUM]",
Copy link
Collaborator

@tomusdrw tomusdrw Jun 29, 2018

Choose a reason for hiding this comment

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

  1. should be MB instead of NUM
  2. I'd also call it --jsonrpc-max-payload

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for looking over my PR. I've added both of your suggestions.

@5chdn
Copy link
Contributor

5chdn commented Jun 29, 2018

Could not compile parity-rpc.

https://gitlab.parity.io/parity/parity/builds/90842

Copy link
Collaborator

@tomusdrw tomusdrw 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, minor issue with indentation.

@@ -40,6 +40,7 @@ fn serve(handler: Option<MetaIoHandler<Metadata>>) -> Server<HttpServer> {
}
}),
1,
5,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Incorrect indentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review. I've corrected the indentation issue.

@tomusdrw tomusdrw added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jul 1, 2018
@tomusdrw tomusdrw merged commit 67721f3 into openethereum:master Jul 2, 2018
dvdplm added a commit that referenced this pull request Jul 2, 2018
* master:
  Attempt to graceful shutdown in case of panics (#8999)
  simplify kvdb error types (#8924)
  Add option for user to set max size limit for RPC requests (#9010)
  bump ntp to 0.5.0 (#9009)
  Removed duplicate dependency (#9021)
ordian added a commit to ordian/parity that referenced this pull request Jul 9, 2018
…rp_sync_on_light_client

* 'master' of https://github.com/paritytech/parity:
  Attempt to graceful shutdown in case of panics (openethereum#8999)
  simplify kvdb error types (openethereum#8924)
  Add option for user to set max size limit for RPC requests (openethereum#9010)
  bump ntp to 0.5.0 (openethereum#9009)
  Removed duplicate dependency (openethereum#9021)
  Minimal effective gas price in the queue (openethereum#8934)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M2-config 📂 Chain specifications and node configurations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants