Gossip cache timeout adjustments (#2997)
## Proposed Changes - Do not retry to publish sync committee messages. - Give a more lenient timeout to slashings and exits
This commit is contained in:
parent
675c7b7e26
commit
36fc887a40
@ -96,19 +96,19 @@ impl GossipCacheBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Timeout for attester slashings.
|
/// Timeout for attester slashings.
|
||||||
pub fn attester_slashing(mut self, timeout: Duration) -> Self {
|
pub fn attester_slashing_timeout(mut self, timeout: Duration) -> Self {
|
||||||
self.attester_slashing = Some(timeout);
|
self.attester_slashing = Some(timeout);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Timeout for aggregated sync commitee signatures.
|
/// Timeout for aggregated sync commitee signatures.
|
||||||
pub fn signed_contribution_and_proof(mut self, timeout: Duration) -> Self {
|
pub fn signed_contribution_and_proof_timeout(mut self, timeout: Duration) -> Self {
|
||||||
self.signed_contribution_and_proof = Some(timeout);
|
self.signed_contribution_and_proof = Some(timeout);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Timeout for sync commitee messages.
|
/// Timeout for sync commitee messages.
|
||||||
pub fn sync_committee_message(mut self, timeout: Duration) -> Self {
|
pub fn sync_committee_message_timeout(mut self, timeout: Duration) -> Self {
|
||||||
self.sync_committee_message = Some(timeout);
|
self.sync_committee_message = Some(timeout);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
@ -288,13 +288,18 @@ impl<TSpec: EthSpec> Behaviour<TSpec> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let slot_duration = std::time::Duration::from_secs(ctx.chain_spec.seconds_per_slot);
|
let slot_duration = std::time::Duration::from_secs(ctx.chain_spec.seconds_per_slot);
|
||||||
// Half an epoch
|
let half_epoch = std::time::Duration::from_secs(
|
||||||
let gossip_max_retry_delay = std::time::Duration::from_secs(
|
|
||||||
ctx.chain_spec.seconds_per_slot * TSpec::slots_per_epoch() / 2,
|
ctx.chain_spec.seconds_per_slot * TSpec::slots_per_epoch() / 2,
|
||||||
);
|
);
|
||||||
let gossip_cache = GossipCache::builder()
|
let gossip_cache = GossipCache::builder()
|
||||||
.default_timeout(gossip_max_retry_delay)
|
|
||||||
.beacon_block_timeout(slot_duration)
|
.beacon_block_timeout(slot_duration)
|
||||||
|
.aggregates_timeout(half_epoch)
|
||||||
|
.attestation_timeout(half_epoch)
|
||||||
|
.voluntary_exit_timeout(half_epoch * 2)
|
||||||
|
.proposer_slashing_timeout(half_epoch * 2)
|
||||||
|
.attester_slashing_timeout(half_epoch * 2)
|
||||||
|
// .signed_contribution_and_proof_timeout(timeout) // Do not retry
|
||||||
|
// .sync_committee_message_timeout(timeout) // Do not retry
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
Ok(Behaviour {
|
Ok(Behaviour {
|
||||||
|
Loading…
Reference in New Issue
Block a user