Closed rvanasa closed 9 months ago
an RPC service could bypass consensus
What do you mean by that? Every response to an HTTPS outcall goes through consensus, so there is no way to "bypass consensus".
What do you mean by that?
Oh right, sorry for the ambiguity; I was using "consensus" to refer to the agreement logic between RPC providers.
In ckETH, if two responses are successful while one returns an error, this is considered a "consistent error" (rather than three "inconsistent results"). We need to change this for EVM RPC because a compromised third-party RPC service could bypass the agreement logic by responding with an error for an otherwise successful request.
Adds the following metrics:
responses
now records the HTTP status codes for JSON-RPC responses.inconsistent_responses
counts the number ofMultiRpcResult::Inconsistent(..)
results for each combination of RPC method and hostname.Another notable change (not represented in the diff of this PR) is that I adjusted the implementation of
MultiCallResult::all_ok()
in the forked ckETH codebase to return all results in the case of an error. Otherwise, an RPC service could bypass the agreement / consistency logic by returning an error for an otherwise successful RPC request.