sigp / lighthouse

Ethereum consensus client in Rust
https://lighthouse.sigmaprime.io/
Apache License 2.0
2.92k stars 743 forks source link

Downgrade HeadMissingFromSnapshotCache warning #2466

Open michaelsproul opened 3 years ago

michaelsproul commented 3 years ago

Description

The HeadMissingFromSnapshotCache warning can seem quite intimidating, but it occurs for rather innocuous reasons:

  1. A block published with an invalid signature, which flushes the cache (see: https://www.reddit.com/r/ethstaker/comments/n31tkq/lighthouse_did_not_advance_head_state_reason/)
  2. A block published late, which can interrupt the state advance for the next slot.

We could add more descriptive logs for these two cases, and downgrade the cache miss itself to debug. Alternatively, in case (2) we may be able to detect that the state advance is not useful, i.e. if we're at slot n and the head is advanced on slot n with no block applied, then we can't advance it to n + 1 anyway.

ethDreamer commented 3 years ago

I can take a look at this