Make it possible to override maximum payload of RPC (#9019)

* Make it possible to override maximum payload of RPC

* Finish it.

* remove todo.

* Update client/cli/src/commands/run_cmd.rs

* Apply suggestions from code review

Co-authored-by: David <dvdplm@gmail.com>

* Apply suggestions from code review

Co-authored-by: David <dvdplm@gmail.com>

* Incorporate suggestions

* Thread rpc_max_payload from configuration to trace_block

* Try obey line gitlab/check_line_width.sh

* update state rpc tests

* Improve readbility

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Zeke Mostov <32168567+emostov@users.noreply.github.com>
Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
Kian Paimani
2021-06-17 16:37:43 +02:00
committed by GitHub
parent 1278b9a6d4
commit 4d6802c530
14 changed files with 87 additions and 26 deletions
+6
View File
@@ -372,6 +372,11 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
Ok(Some(Vec::new()))
}
/// Get maximum RPC payload.
fn rpc_max_payload(&self) -> Result<Option<usize>> {
Ok(None)
}
/// Get the prometheus configuration (`None` if disabled)
///
/// By default this is `None`.
@@ -535,6 +540,7 @@ pub trait CliConfiguration<DCV: DefaultConfigurationValues = ()>: Sized {
rpc_ws_max_connections: self.rpc_ws_max_connections()?,
rpc_http_threads: self.rpc_http_threads()?,
rpc_cors: self.rpc_cors(is_dev)?,
rpc_max_payload: self.rpc_max_payload()?,
prometheus_config: self.prometheus_config(DCV::prometheus_listen_port())?,
telemetry_endpoints,
telemetry_external_transport: self.telemetry_external_transport()?,