node/pkg/processor: increase timeout for observed VAAs to 24 hours
In cases where we observed a VAA, there is no possibility of gossip DoS. Increase the timeout to 24 hours to facilitate manual interventions (like submission of governance VAAs or node restarts/catchup). Keep the existing five minute timeout for observation-less VAAs. Change-Id: Ic626108190bd60cf812daadbe191b31cc48c7296
This commit is contained in:
parent
20ce9e1e5c
commit
7998d04554
|
@ -82,7 +82,7 @@ func (p *Processor) handleCleanup(ctx context.Context) {
|
|||
p.logger.Info("expiring submitted VAA", zap.String("digest", hash), zap.Duration("delta", delta))
|
||||
delete(p.state.vaaSignatures, hash)
|
||||
aggregationStateExpiration.Inc()
|
||||
case !s.submitted && s.retryCount >= 10:
|
||||
case !s.submitted && ((s.ourMsg != nil && s.retryCount >= 2880 /* 24 hours */) || (s.ourMsg == nil && s.retryCount >= 10 /* 5 minutes */)):
|
||||
// Clearly, this horse is dead and continued beatings won't bring it closer to quorum.
|
||||
p.logger.Info("expiring unsubmitted VAA after exhausting retries", zap.String("digest", hash), zap.Duration("delta", delta))
|
||||
delete(p.state.vaaSignatures, hash)
|
||||
|
@ -97,7 +97,7 @@ func (p *Processor) handleCleanup(ctx context.Context) {
|
|||
p.logger.Info("resubmitting VAA observation",
|
||||
zap.String("digest", hash),
|
||||
zap.Duration("delta", delta),
|
||||
zap.Int("retry", 1))
|
||||
zap.Uint("retry", s.retryCount))
|
||||
p.sendC <- s.ourMsg
|
||||
s.retryCount += 1
|
||||
aggregationStateRetries.Inc()
|
||||
|
|
Loading…
Reference in New Issue