mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-25 16:58:28 +00:00
add sync committee contribution timeout (#3291)
## Issue Addressed Resolves #3276. ## Proposed Changes Add a timeout for the sync committee contributions at 1/4 the slot length such that we may be able to try backup beacon nodes in the case of contribution post failure. ## Additional Info 1/4 slot length seemed standard for the timeouts, but may want to decrease this to 1/2. I did not find any timeout related / sync committee related tests, so there are no tests. Happy to write some with a bit of guidance.
This commit is contained in:
@@ -110,6 +110,7 @@ pub struct Timeouts {
|
||||
pub liveness: Duration,
|
||||
pub proposal: Duration,
|
||||
pub proposer_duties: Duration,
|
||||
pub sync_committee_contribution: Duration,
|
||||
pub sync_duties: Duration,
|
||||
}
|
||||
|
||||
@@ -121,6 +122,7 @@ impl Timeouts {
|
||||
liveness: timeout,
|
||||
proposal: timeout,
|
||||
proposer_duties: timeout,
|
||||
sync_committee_contribution: timeout,
|
||||
sync_duties: timeout,
|
||||
}
|
||||
}
|
||||
@@ -907,7 +909,12 @@ impl BeaconNodeHttpClient {
|
||||
.push("validator")
|
||||
.push("contribution_and_proofs");
|
||||
|
||||
self.post(path, &signed_contributions).await?;
|
||||
self.post_with_timeout(
|
||||
path,
|
||||
&signed_contributions,
|
||||
self.timeouts.sync_committee_contribution,
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user