fix: emit payload_attributes for local proposals by default#9258
fix: emit payload_attributes for local proposals by default#9258nflaig merged 4 commits intoChainSafe:unstablefrom
payload_attributes for local proposals by default#9258Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the PrepareNextSlotScheduler to improve the emission of payloadAttributes SSE events. The logic now triggers an event if the node is the next proposer or if the emitPayloadAttributes flag is set. Additionally, it ensures the parentBlockRoot uses the updatedHeadRoot and corrects the feeRecipient default to a 20-byte zero address. I have no feedback to provide as the review comments were explanatory in nature.
| prepareState: updatedPrepareState, | ||
| prepareSlot, | ||
| parentBlockRoot: fromHex(headRoot), | ||
| parentBlockRoot: fromHex(updatedHeadRoot), |
There was a problem hiding this comment.
looks right to me too
- if we're the next proposal,
updatedHeadRootis the one we'll go with - if not,
updatedHeadRootis same toheadRoot
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
I'm playing around with the idea of Vero talking to relays directly, like Vouch does. For that I needed an EL The |
|
@eth2353 I think I broke your PR 😓 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #9258 +/- ##
============================================
- Coverage 52.53% 52.52% -0.01%
============================================
Files 848 848
Lines 61309 61304 -5
Branches 4510 4510
============================================
- Hits 32206 32201 -5
Misses 29038 29038
Partials 65 65 🚀 New features to boost your workflow:
|
Motivation
I was looking at the
payload_attributesSSE event and noticed Lodestar behaves slightly differently from other clients. Lodestar emits the event for every slot when the--emitPayloadAttributesflag is provided, and doesn't emit it under any other condition.Whereas other clients (Teku, Prysm, Lighthouse, Grandine) emit the event if a local proposal is expected in the next slot, and have a CLI flag that allows them to emit the event for every slot.
Description
This PR aligns Lodestar's default behavior with other clients. It adds default
payload_attributesSSE emission for local block proposals, while preserving the existing--emitPayloadAttributesflag as an override to emit the event for every slot.The emitted event now uses the proposal’s actual fee recipient and the prepared parent root.
AI Assistance Disclosure
I consulted Codex (GPT-5.4) to help draft the implementation.