Skip to content

Comments

feat(rpc-types-engine): add into_payload_and_sidecar to V4 and V5 envelopes#3624

Merged
mattsse merged 2 commits intomainfrom
mattsse/envelope-to-payload-and-sidecar
Jan 31, 2026
Merged

feat(rpc-types-engine): add into_payload_and_sidecar to V4 and V5 envelopes#3624
mattsse merged 2 commits intomainfrom
mattsse/envelope-to-payload-and-sidecar

Conversation

@gakonst
Copy link
Member

@gakonst gakonst commented Jan 30, 2026

Summary

Adds a new into_payload_and_sidecar method to both ExecutionPayloadEnvelopeV4 and ExecutionPayloadEnvelopeV5 that converts the envelope into an (ExecutionPayload, ExecutionPayloadSidecar) tuple.

Motivation

This is useful when using testing_buildBlockV1 or similar APIs that return payload envelopes but need to be converted for use with newPayload. Ported from: paradigmxyz/reth#21607

Changes

  • Added into_payload_and_sidecar(parent_beacon_block_root: B256) to ExecutionPayloadEnvelopeV4
  • Added into_payload_and_sidecar(parent_beacon_block_root: B256) to ExecutionPayloadEnvelopeV5

The parent_beacon_block_root must be provided as it is not part of the envelope but is required for the sidecar's CancunPayloadFields. The versioned hashes are computed from the blobs bundle commitments.

…elopes

Adds a new method to both ExecutionPayloadEnvelopeV4 and
ExecutionPayloadEnvelopeV5 that converts the envelope into an
(ExecutionPayload, ExecutionPayloadSidecar) tuple.

This is useful when using testing_buildBlockV1 or similar APIs that
return payload envelopes but need to be converted for use with
newPayload.

The parent_beacon_block_root must be provided as it is not part of
the envelope but is required for the sidecar's CancunPayloadFields.
@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Jan 30, 2026
@mattsse mattsse marked this pull request as ready for review January 31, 2026 18:07
@mattsse mattsse merged commit ecb420c into main Jan 31, 2026
30 checks passed
@mattsse mattsse deleted the mattsse/envelope-to-payload-and-sidecar branch January 31, 2026 18:07
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants