From 4e8415f3dc47f35a9160a1310ee6fe4f1e59fd93 Mon Sep 17 00:00:00 2001 From: Eitan Seri- Levi Date: Mon, 6 Apr 2026 00:50:04 -0700 Subject: [PATCH] Enable optimistic sync and change rate limitis --- .../src/payload_envelope_verification/import.rs | 10 ---------- beacon_node/lighthouse_network/src/rpc/config.rs | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs index c09f5f9b4d..0922331e65 100644 --- a/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs +++ b/beacon_node/beacon_chain/src/payload_envelope_verification/import.rs @@ -294,16 +294,6 @@ impl BeaconChain { .map_err(BeaconChainError::TokioJoin)? .ok_or(BeaconChainError::RuntimeShutdown)??; - // TODO(gloas): optimistic sync is not supported for Gloas, maybe we could re-add it - if payload_verification_outcome - .payload_verification_status - .is_optimistic() - { - return Err(EnvelopeError::OptimisticSyncNotSupported { - block_root: import_data.block_root, - }); - } - Ok(ExecutedEnvelope::new( signed_envelope, import_data, diff --git a/beacon_node/lighthouse_network/src/rpc/config.rs b/beacon_node/lighthouse_network/src/rpc/config.rs index 9e1c6541ec..f2b55d01c7 100644 --- a/beacon_node/lighthouse_network/src/rpc/config.rs +++ b/beacon_node/lighthouse_network/src/rpc/config.rs @@ -110,13 +110,13 @@ impl RateLimiterConfig { // blocks and a decent syncing rate for honest nodes. Malicious nodes would need to // spread out their requests over the time window to max out bandwidth on the server. pub const DEFAULT_BLOCKS_BY_RANGE_QUOTA: Quota = - Quota::n_every(NonZeroU64::new(128).unwrap(), 10); + Quota::n_every(NonZeroU64::new(32).unwrap(), 10); pub const DEFAULT_BLOCKS_BY_ROOT_QUOTA: Quota = - Quota::n_every(NonZeroU64::new(128).unwrap(), 10); + Quota::n_every(NonZeroU64::new(32).unwrap(), 10); pub const DEFAULT_PAYLOAD_ENVELOPES_BY_RANGE_QUOTA: Quota = - Quota::n_every(NonZeroU64::new(128).unwrap(), 10); + Quota::n_every(NonZeroU64::new(32).unwrap(), 10); pub const DEFAULT_PAYLOAD_ENVELOPES_BY_ROOT_QUOTA: Quota = - Quota::n_every(NonZeroU64::new(128).unwrap(), 10); + Quota::n_every(NonZeroU64::new(32).unwrap(), 10); // `DEFAULT_BLOCKS_BY_RANGE_QUOTA` * (target + 1) to account for high usage pub const DEFAULT_BLOBS_BY_RANGE_QUOTA: Quota = Quota::n_every(NonZeroU64::new(896).unwrap(), 10);