wip: early envelope reprocessing and is_heze_fork plumbing

This commit is contained in:
Devnet Bot
2026-05-06 07:48:29 +00:00
parent 6a9b013a26
commit 0aa7e43e85
6 changed files with 103 additions and 4 deletions

View File

@@ -54,6 +54,10 @@ pub struct NewPayloadRequest<'block, E: EthSpec> {
pub execution_requests: &'block ExecutionRequests<E>,
#[superstruct(only(Heze, Gloas))]
pub il_transactions: Transactions<E>,
/// When true, this Gloas-shaped request must use engine_newPayloadV6 (Heze fork).
/// Gloas and Heze have identical payload wire formats; only the method version differs.
#[superstruct(only(Gloas))]
pub is_heze_fork: bool,
}
impl<'block, E: EthSpec> NewPayloadRequest<'block, E> {

View File

@@ -129,11 +129,17 @@ pub async fn handle_rpc<E: EthSpec>(
})
.map_err(|s| (s, BAD_PARAMS_ERROR_CODE))?,
ENGINE_NEW_PAYLOAD_V5 => {
// V5 is for Gloas; fall back to Heze for backward compat
get_param::<JsonExecutionPayloadGloas<E>>(params, 0)
.map(|jep| JsonExecutionPayload::Gloas(jep))
.or_else(|_| {
get_param::<JsonExecutionPayloadHeze<E>>(params, 0)
.map(|jep| JsonExecutionPayload::Heze(jep))
})
.map_err(|s| (s, BAD_PARAMS_ERROR_CODE))?
}
ENGINE_NEW_PAYLOAD_V6 => {
// V6 is for Heze (Bogota EL fork)
get_param::<JsonExecutionPayloadHeze<E>>(params, 0)
.map(|jep| JsonExecutionPayload::Heze(jep))
.map_err(|s| (s, BAD_PARAMS_ERROR_CODE))?