paritytech/polkadot-sdk

consider refactor CliConfiguration in such way to reduce its footgun factor

Opened this issue · 1 comments

xlc commented

Right now it have many default implementations, well, too many. This means client can miss some implementations and still everything appears to be working, until I am trying to set the config and it doesn't work.

In my particular case, I did not implement those methods for the RelayChainCli for Acala

/// Get maximum RPC request payload size.
fn rpc_max_request_size(&self) -> Result<u32> {
Ok(RPC_DEFAULT_MAX_REQUEST_SIZE_MB)
}
/// Get maximum RPC response payload size.
fn rpc_max_response_size(&self) -> Result<u32> {
Ok(RPC_DEFAULT_MAX_RESPONSE_SIZE_MB)
}

and --rpc-max-request-size and many more parameters doesn't work for the embed relaychain node in Acala.

Maybe there's should be an non-production-defaults feature that the defaults are created under. That way when you're ready for productionisation you take the feature off and have to make some explicit implementations.