You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Querying the attestation_data with a future slot causes a CanonicalHeadLockTimeout in fork choice. The further in the future the slot, the longer the lock lasts.
I'm not sure exactly what the validation should be, so would appreciate some input. I would think it's just the queried for slot has to be less than or equal to the canonical head's slot.
The text was updated successfully, but these errors were encountered:
Oh nice find! Let's restrict this endpoint to never accept a slot that is higher than current_slot + 1. The + 1 is to allow a little tolerance for clock skew.
Description
Querying the
attestation_data
with a future slot causes aCanonicalHeadLockTimeout
in fork choice. The further in the future the slot, the longer the lock lasts.Version
v0.3.0
Present Behaviour
This query created the lock for 20 mins for me:
curl 'localhost:5052/eth/v1/validator/attestation_data?slot=10000000&committee_index=1'
Expected Behaviour
Return slot out of bounds
Steps to resolve
There's no validation about future slots, and this code is being hit:
https://github.com/sigp/lighthouse/blob/master/beacon_node/beacon_chain/src/beacon_chain.rs#L907-L917
I'm not sure exactly what the validation should be, so would appreciate some input. I would think it's just the queried for slot has to be less than or equal to the canonical head's slot.
The text was updated successfully, but these errors were encountered: