mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 06:18:31 +00:00
Enable optimistic sync and change rate limitis
This commit is contained in:
@@ -294,16 +294,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user