Skip to content

Sidecar crashes when using Lighthouse with checkpoint sync enabled #5

@nilsfs7

Description

@nilsfs7

Issue

According to the beacon api consensus clients that are not fully synced should return

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

when calling endpoint "/eth/v1/node/syncing".
This is not the case for Lighthouse when it's running with checkpoint sync enabled. Then the result is

{
   "data":{
      "BackFillSyncing":{
         "completed":353024,
         "remaining":3803456
      }
   }
}

which leads to the sidecar crashing.

syncDistance, _ := strconv.Atoi(data.Data.SyncDistance)

In "eth2.go" the client tries to receive the value from "data.sync_distance" which is not part of the object.

Solution

Even though the error is caused by lighthouse returning an object that is not defined in the official api an error handling and logging would be highly appreciated.

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