Skip to content

/eth/v1/node/syncing endpoint does not return correct output as per beacon spec #171

@nidhi-singh02

Description

@nidhi-singh02

The beacon API spec returns the output below

{
  "data": {
    "head_slot": "1",
    "sync_distance": "1",
    "is_syncing": true,
    "is_optimistic": true,
    "el_offline": true
  }
}

However the node syncing endpoint in here returns *api.Response[*apiv1.SyncState] and this is how SyncState looks like- it is missing field el_offline.

// SyncState is the data regarding the node's synchronization state to the chain.
type SyncState struct {
	// HeadSlot is the head slot of the chain as understood by the node.
	HeadSlot phase0.Slot
	// SyncDistance is the distance between the node's highest synced slot and the head slot.
	SyncDistance phase0.Slot
	// IsOptimistic is true if the node is optimistic.
	IsOptimistic bool
	// IsSyncing is true if the node is syncing.
	IsSyncing bool
}

I am happy to raise a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions