Implement GET v2/node/version endpoint#9171
Conversation
| #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
| pub struct JsonClientVersion { | ||
| pub code: String, | ||
| #[serde(default)] | ||
| pub name: String, | ||
| pub version: String, | ||
| pub commit: String, | ||
| } |
There was a problem hiding this comment.
This is copied from:
lighthouse/beacon_node/execution_layer/src/engine_api/json_structures.rs
Lines 1064 to 1074 in 176cce5
I wanted to do: use execution_layer::json_structures::JsonClientVersionV1, but adding execution_layer in Cargo.toml under eth2 will create a cyclic dependency issue when compiling. So I ended up just created another one. Probably not ideal, so happy to revise according to the feedback about this
| .to_string(); | ||
|
|
||
| JsonClientVersion { | ||
| code: "LH".to_string(), |
There was a problem hiding this comment.
Not sure if it is ok to hardcode "LH" here? I wanted to do this:
lighthouse/beacon_node/execution_layer/src/engine_api/http.rs
Lines 96 to 102 in 176cce5
but it involves using ClientCode which is also from the execution_layer, which will also cause cyclic dependency issue
Issue Addressed
Partly #9045
Additional Info
Response with only beacon node (EC not shown at all):
Response with both BN and EC: