-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add option for user to set max size limit for RPC requests #9010
Conversation
It looks like @mttmartin hasn't signed our Contributor License Agreement, yet.
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 Many thanks, Parity Technologies CLA Bot |
[clabot:check] |
It looks like @mttmartin signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
parity/cli/mod.rs
Outdated
@@ -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]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- should be
MB
instead ofNUM
- I'd also call it
--jsonrpc-max-payload
There was a problem hiding this comment.
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.
Could not compile |
There was a problem hiding this 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.
rpc/src/tests/rpc.rs
Outdated
@@ -40,6 +40,7 @@ fn serve(handler: Option<MetaIoHandler<Metadata>>) -> Server<HttpServer> { | |||
} | |||
}), | |||
1, | |||
5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect indentation.
There was a problem hiding this comment.
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.
…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)
Add option for user to set max size limit for RPC requests. This was requested in #8961.