Skip to content

Commit c2d1456

Browse files
adshmhOlshansk
andauthored
[QoS][Solana] Disqualify endpoints with recent non-JSONRPC response (#406)
## Summary Add JSON-RPC response validation error tracking for Solana endpoints ### Primary Changes: - Created new JsonRpcResponseValidationError protobuf message to capture validation errors with error types and timestamps - Enhanced SolanaUnrecognizedResponse to include optional validation error information - Modified Solana endpoint validation to reject endpoints with recent validation errors (within 30-minute window) ### Secondary Changes: - Updated responseGeneric to track and include validation errors in observations - Added error handling for non-JSON-RPC responses with appropriate error codes and timestamps - Enhanced endpoint observation processing to update latest validation errors from unrecognized responses ## Issue Endpoints with non-JSONRPC response should be disqualified. - Issue or PR: #{ISSUE_OR_PR_NUMBER} ## Type of change Select one or more from the following: - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Documentation - [ ] Other (specify) ## QoS Checklist ### E2E Validation & Tests - [ ] `make path_up` - [ ] `make test_e2e_evm_shannon` ### Observability - [ ] 1. `make path_up` - [ ] 2. Run the following E2E test: `make test_request__shannon_relay_util_100` - [ ] 3. View results in LocalNet's [PATH Relay Grafana Dashboard](http://localhost:3003/d/relays/path-service-requests) ## Sanity Checklist - [x] I have updated the GitHub Issue `assignees`, `reviewers`, `labels`, `project`, `iteration` and `milestone` - [ ] For docs, I have run `make docusaurus_start` - [ ] For code, I have run `make test_all` - [ ] For configurations, I have updated the documentation - [ ] I added `TODO`s where applicable --------- Co-authored-by: Daniel Olshansky <[email protected]>
1 parent 9977d67 commit c2d1456

File tree

13 files changed

+420
-78
lines changed

13 files changed

+420
-78
lines changed

observation/qos/jsonrpc.pb.go

Lines changed: 14 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

observation/qos/jsonrpc_validation_error.pb.go

Lines changed: 201 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

observation/qos/solana.pb.go

Lines changed: 32 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/path/qos/jsonrpc.proto

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ message JsonRpcResponse {
2222
// Must match the id value from the corresponding request
2323
string id = 1;
2424

25-
// JSON-serializable response data
26-
string result = 2;
25+
// A preview of the JSONRPC response's `result` field.
26+
// It may have been truncated to reduce message size.
27+
string result_preview = 2;
2728

2829
// Error details, if the request failed
29-
optional JsonRpcResponseError err = 3;
30+
optional JsonRpcResponseError error = 3;
3031

3132
// Note: This message captures only essential JSON-RPC fields.
3233
// Add fields as needed.
@@ -42,4 +43,4 @@ message JsonRpcResponseError {
4243

4344
// Human-readable error description
4445
string message = 2;
45-
}
46+
}

0 commit comments

Comments
 (0)