Use Fork variants instead of version for JsonPayload types#7909
Use Fork variants instead of version for JsonPayload types#7909mergify[bot] merged 1 commit intosigp:unstablefrom
Conversation
michaelsproul
left a comment
There was a problem hiding this comment.
LGTM, this is a good clarification.
I think this helps us out in the short-term while we get Gloas merged in, and then we can come back for removing the payload type duplication.
|
Yeah let's just merge this and merge #7728 . The next thing i will probably do is rename everything in this file from |
|
This pull request has been removed from the queue for the following reason: The merge conditions cannot be satisfied due to failing checks: You can check the last failing draft PR here: #7920. You may have to fix your CI before adding the pull request to the queue again. |
|
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
Issue Addressed
With Fulu, we increment the engine API version for
get_payloadbut we do not also incrementnew_payload.In Lighthouse, we have a tight coupling between these version numbers and the Fork variants.
For example, both
get_payload_v3andnew_payload_v3correspond to Deneb,v4to Electra, etc.However this coupling breaks with Fulu where only
get_payload_v5is related to Fulu andnew_payload_v4now also corresponds to Fulu (new_payload_v5 does not exist). While we can work around this, it creates a confusing situation where the versions and Fork variants are out of sync.See the following code snippet where we are using the v4 endpoint, and yet passing a
V5payload variant:lighthouse/beacon_node/execution_layer/src/engine_api/http.rs
Lines 849 to 870 in 522bd9e
Proposed Changes
new_payload_v5as it is unused in Fulu.JsonExecutionPayloadandJsonGetExecutionPayloadResponsetypes to use Fork variants instead of version variants. This clarifies the relationship between them.Other Considerations
The engine API spec does refer to these types by version, however
ExecutionPayloadV4and above do not actually exist sinceExecutionPayloadhasn't changed since Deneb. If we value close adherence to spec naming, we could consider reverting back to the old versioned JsonPayload types by implementing: #7841. By doing this, theJsonExecutionPayloadtype would stop atV3(Deneb). This is actually what is used in the spec