The version field on this struct is optional:
|
/// Deserialize is only implemented for types that implement ForkVersionDeserialize. |
|
/// |
|
/// The metadata of type M should be set to `EmptyMetadata` if you don't care about adding fields other than |
|
/// version. If you *do* care about adding other fields you can mix in any type that implements |
|
/// `Deserialize`. |
|
#[derive(Debug, PartialEq, Clone, Serialize)] |
|
pub struct ForkVersionedResponse<T, M = EmptyMetadata> { |
|
#[serde(skip_serializing_if = "Option::is_none")] |
|
pub version: Option<ForkName>, |
|
#[serde(flatten)] |
|
pub metadata: M, |
|
pub data: T, |
|
} |
however as per the beacon spec, this field is required (at least for the eth/v1/beacon/light_client/updates endpoint): https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/Beacon/getLightClientUpdatesByRange
schema: https://github.com/ethereum/beacon-APIs/blob/0ac7be6530e8c457343c4a02026cfd15ed93dbc4/apis/beacon/light_client/updates.yaml#L32
lighthouse response, missing version field: https://ethereum-beacon-api.publicnode.com/eth/v1/beacon/light_client/updates?start_period=1424&count=1
lodestar response, includes version field: https://lodestar-mainnet.chainsafe.io/eth/v1/beacon/light_client/updates?start_period=1424&count=1
The version field on this struct is optional:
lighthouse/consensus/types/src/fork_versioned_response.rs
Lines 19 to 31 in e42406d
however as per the beacon spec, this field is required (at least for the
eth/v1/beacon/light_client/updatesendpoint): https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/Beacon/getLightClientUpdatesByRangeschema: https://github.com/ethereum/beacon-APIs/blob/0ac7be6530e8c457343c4a02026cfd15ed93dbc4/apis/beacon/light_client/updates.yaml#L32
lighthouse response, missing version field: https://ethereum-beacon-api.publicnode.com/eth/v1/beacon/light_client/updates?start_period=1424&count=1
lodestar response, includes version field: https://lodestar-mainnet.chainsafe.io/eth/v1/beacon/light_client/updates?start_period=1424&count=1