mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 03:08:28 +00:00
chore: remove builder_index from produce_block_v4 (#9267)
Part of #8828 for the stateful path and helps align gloas `produceBlockV4` with beacon-APIs [PR](https://github.com/ethereum/beacon-APIs/pull/580) - Plumb `include_payload` query through the handler. Ignored for now since stateless mode isn't wired up yet - Add `execution_payload_included` metadata field + `Eth-Execution-Payload-Included` header per spec. Both `false` until stateless lands - Drop the `{builder_index}` segment from the envelope GET URL since no longer included in spec Co-Authored-By: shane-moore <skm1790@gmail.com> Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
@@ -5,7 +5,8 @@ use eth2::beacon_response::{
|
||||
};
|
||||
use eth2::{
|
||||
CONSENSUS_BLOCK_VALUE_HEADER, CONSENSUS_VERSION_HEADER, CONTENT_TYPE_HEADER,
|
||||
EXECUTION_PAYLOAD_BLINDED_HEADER, EXECUTION_PAYLOAD_VALUE_HEADER, SSZ_CONTENT_TYPE_HEADER,
|
||||
EXECUTION_PAYLOAD_BLINDED_HEADER, EXECUTION_PAYLOAD_INCLUDED_HEADER,
|
||||
EXECUTION_PAYLOAD_VALUE_HEADER, SSZ_CONTENT_TYPE_HEADER,
|
||||
};
|
||||
use serde::Serialize;
|
||||
use types::{ForkName, InconsistentFork, Uint256};
|
||||
@@ -88,6 +89,19 @@ pub fn add_execution_payload_blinded_header<T: Reply>(
|
||||
.into_response()
|
||||
}
|
||||
|
||||
/// Add the `Eth-Execution-Payload-Included` header to a response.
|
||||
pub fn add_execution_payload_included_header<T: Reply>(
|
||||
reply: T,
|
||||
execution_payload_included: bool,
|
||||
) -> Response {
|
||||
reply::with_header(
|
||||
reply,
|
||||
EXECUTION_PAYLOAD_INCLUDED_HEADER,
|
||||
execution_payload_included.to_string(),
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
|
||||
/// Add the `Eth-Execution-Payload-Value` header to a response.
|
||||
pub fn add_execution_payload_value_header<T: Reply>(
|
||||
reply: T,
|
||||
|
||||
Reference in New Issue
Block a user