Gloas ensure we emit payload attributes SSE event#9348
Conversation
|
Some required checks have failed. Could you please take a look @eserilev? 🙏 |
| // This fallback is strictly for the fork boundary case when self.snapshot.execution_envelope is `None`. | ||
| // Note: If there is a missed/orphaned envelope at the fork boundary we wont be able to get the block number using this fallback. | ||
| // We could try handling that edge case but it doesn't seem worth it. Returning `None` here just means that we don't | ||
| // emit a payload attributes SSE event further upstream. | ||
| self.head_block_number().ok() |
There was a problem hiding this comment.
This assumption is wrong currently: the snapshot.execution_envelope is also None for empty blocks. Currently we only load the head execution envelope for full blocks, here:
lighthouse/beacon_node/beacon_chain/src/canonical_head.rs
Lines 736 to 748 in 309719d
We could change this invariant so that we always have a payload post-Gloas, by loading/storing the most recent envelope (i.e. the parent's envelope in the case of an empty block).
There was a problem hiding this comment.
thanks for catching that, i've changed the invariant so that we always have a payload post-gloas and added some tests
…oas-head-block-number
…/lighthouse into gloas-head-block-number
|
Some required checks have failed. Could you please take a look @eserilev? 🙏 |
Issue Addressed
#8817
we were not emitting payload attribute SSE events for gloas. Since the head snapshot stores the canonical latest execution payload envelope we have all the info we need to emit the event.