Use max request payloads

This commit is contained in:
Eitan Seri- Levi
2026-03-02 23:39:24 -08:00
parent ff0c05ecf8
commit 0212e84fa8
3 changed files with 15 additions and 2 deletions

View File

@@ -530,7 +530,7 @@ impl PayloadEnvelopesByRootRequest {
) -> Result<Self, String> {
let max_requests_envelopes = fork_context
.spec
.max_request_blocks(fork_context.current_fork_name());
.max_request_payloads(fork_context.current_fork_name());
let beacon_block_roots =
RuntimeVariableList::new(beacon_block_roots, max_requests_envelopes).map_err(|e| {

View File

@@ -423,6 +423,12 @@ impl SupportedProtocol {
ProtocolId::new(SupportedProtocol::DataColumnsByRangeV1, Encoding::SSZSnappy),
]);
}
if fork_context.fork_exists(ForkName::Gloas) {
supported.extend_from_slice(&[
ProtocolId::new(SupportedProtocol::PayloadEnvelopesByRangeV1, Encoding::SSZSnappy),
ProtocolId::new(SupportedProtocol::PayloadEnvelopesByRootV1, Encoding::SSZSnappy),
]);
}
supported
}
}

View File

@@ -295,6 +295,7 @@ pub struct ChainSpec {
/*
* Networking Gloas
*/
pub max_request_payloads: u64,
/*
* Networking Derived
@@ -700,6 +701,10 @@ impl ChainSpec {
}
}
pub fn max_request_payloads(&self) -> usize {
self.max_request_payloads as usize
}
pub fn max_request_blob_sidecars(&self, fork_name: ForkName) -> usize {
if fork_name.electra_enabled() {
self.max_request_blob_sidecars_electra as usize
@@ -1228,6 +1233,7 @@ impl ChainSpec {
builder_payment_threshold_numerator: 6,
builder_payment_threshold_denominator: 10,
min_builder_withdrawability_delay: Epoch::new(4096),
max_request_payloads: 128,
/*
* Network specific
@@ -1622,7 +1628,8 @@ impl ChainSpec {
builder_payment_threshold_numerator: 6,
builder_payment_threshold_denominator: 10,
min_builder_withdrawability_delay: Epoch::new(4096),
max_request_payloads: 128,
/*
* Network specific
*/