Description
While implementing Altair's p2p spec into code, we realized that Prysm does not advance beacon state up to the particular slot when the object is referencing that slot.
For example, when an Altair block's parent state on phase 0, the node would use that parent state (phase0) to verify the signature, and the signature verification would failed due to fork version miss match. Correct behavior would have been advancing parent state (phase0) up to block's slot then use processed state (altair) to verify block signature.
Just wanted to share this lesson learned after seeing 3 missed blocks post fork boundary in the devnet this morning. Whether we should explicitly define state advancement in the p2p spec is up for debate and I wonder if anyone has an opinion on this