-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
metrics: HTTP status codes and inconsistent responses #126
Conversation
What do you mean by that? Every response to an HTTPS outcall goes through consensus, so there is no way to "bypass consensus". |
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.