stricter check for context bytes when recv LC data (#4480)
Bellatrix and Altair light client data share same body, but have other fork digests. Validate that the peer's sent fork digest matches the one that we expect (derived from `attested_header.slot`).
This commit is contained in:
parent
2fc0fa4288
commit
ca01356d8e
|
@ -135,6 +135,8 @@ proc readChunkPayload*(
|
|||
return neterr InvalidContextBytes
|
||||
if res.isErr:
|
||||
return err(res.error)
|
||||
if stateFork != peer.network.cfg.stateForkAtEpoch(res.get.contextEpoch):
|
||||
return neterr InvalidContextBytes
|
||||
return ok res.get
|
||||
|
||||
func shortLog*(s: StatusMsg): auto =
|
||||
|
|
Loading…
Reference in New Issue