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.
Issue
According to the beacon api consensus clients that are not fully synced should return
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
which leads to the sidecar crashing.
ethnode-sidecar/clients/eth2.go
Line 103 in efa22eb
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.