ChainSafe / ChainSafe/lodestar
Finalized header not updated during sync committee change
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 483
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 150
Description
Based on the logs from https://github.com/ChainSafe/lodestar/issues/6861#issuecomment-2205800172, it seems like the light client server is not updating the finality header if sync committee changes, i.e. during transition in new sync committee period.
Looking at logs from [beacon-2024-07-01.log.gz](https://github.com/user-attachments/files/16083699/beacon-2024-07-01.log.gz)
New sync committee period started
```
Jul-01 22:40:29.001[] info: New sync committee period 1150
```
It seems like we are storing new partial updates but all are not finalized
```
Jul-01 22:40:37.174[chain] debug: Stored new PartialLightClientUpdate syncPeriod=1150, isFinalized=false, participation=0.900390625
Jul-01 22:40:50.201[chain] debug: Stored new PartialLightClientUpdate syncPeriod=1150, isFinalized=false, participation=0.98828125
Jul-01 22:41:12.950[chain] debug: Stored new PartialLightClientUpdate syncPeriod=1150, isFinalized=false, participation=0.990234375
Jul-01 22:41:49.108[chain] debug: Stored new PartialLightClientUpdate syncPeriod=1150, isFinalized=false, participation=0.9921875
Jul-01 22:42:13.916[chain] debug: Stored new PartialLightClientUpdate syncPeriod=1150, isFinalized=false, participation=0.99609375
Jul-01 22:42:24.880[chain] debug: Stored new PartialLightClientUpdate syncPeriod=1150, isFinalized=false, participation=0.998046875
```
and next sync committee period
```
Jul-01 22:40:26.647[chain] debug: Stored nextSyncCommittee period=1150, slot=9420800, dependentRoot=0x1b67d2012d73c2ff7cc81ed2500114c0d37378c586d075eb8db3ff66da24f82e
```
My best guess right now is that this is due to the check here
https://github.com/ChainSafe/lodestar/blob/dbaa46e24a3d8f8dc889f9aac6fc73f31290d73e/packages/beacon-node/src/chain/lightClient/index.ts#L431
as sync period of finalized checkpoint would be `1149` while current period is `1150` which means we are storing it as `isFinalized=false`
Contributor guide
Assessment
This issue has not been assessed yet.