Skip to content

ForkVersionedResponse version field missing on responses where it's required by the spec #7434

@benluelo

Description

@benluelo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions