diff --git a/node/pkg/watchers/evm/connectors/batch_poller.go b/node/pkg/watchers/evm/connectors/batch_poller.go index fcc2fc47e..8602b1248 100644 --- a/node/pkg/watchers/evm/connectors/batch_poller.go +++ b/node/pkg/watchers/evm/connectors/batch_poller.go @@ -101,6 +101,7 @@ func (b *BatchPollConnector) SubscribeForBlocks(ctx context.Context, errC chan e sub.unsubDone <- struct{}{} return nil case v := <-innerErrSink: + b.logger.Info("batch_poller innerErrSink received an error, forwarding it on", zap.String("v", v)) sub.err <- fmt.Errorf(v) case ev := <-headSink: if ev == nil { @@ -150,10 +151,12 @@ func (b *BatchPollConnector) run(ctx context.Context, logger *zap.Logger) error errCount++ logger.Error("batch polling encountered an error", zap.Int("errCount", errCount), zap.Error(err)) if errCount > 3 { + logger.Error("batch poller is posting the error to errFeed", zap.Error(err)) b.errFeed.Send(fmt.Sprint("polling encountered an error: ", err)) errCount = 0 } - } else { + } else if errCount != 0 { + logger.Info("batch polling has resumed processing blocks") errCount = 0 } diff --git a/node/pkg/watchers/evm/watcher.go b/node/pkg/watchers/evm/watcher.go index 42fffd771..804bd6ac1 100644 --- a/node/pkg/watchers/evm/watcher.go +++ b/node/pkg/watchers/evm/watcher.go @@ -469,6 +469,7 @@ func (w *Watcher) Run(parentCtx context.Context) error { p2p.DefaultRegistry.AddErrorCount(w.chainID, 1) return fmt.Errorf("failed to subscribe to header events: %w", err) } + defer headerSubscription.Unsubscribe() common.RunWithScissors(ctx, errC, "evm_fetch_headers", func(ctx context.Context) error { stats := gossipv1.Heartbeat_Network{ContractAddress: w.contract.Hex()} @@ -477,6 +478,7 @@ func (w *Watcher) Run(parentCtx context.Context) error { case <-ctx.Done(): return nil case err := <-headerSubscription.Err(): + logger.Error("error while processing header subscription", zap.Error(err)) ethConnectionErrors.WithLabelValues(w.networkName, "header_subscription_error").Inc() errC <- fmt.Errorf("error while processing header subscription: %w", err) p2p.DefaultRegistry.AddErrorCount(w.chainID, 1) @@ -731,6 +733,7 @@ func (w *Watcher) getFinality(ctx context.Context) (bool, bool, error) { if w.unsafeDevMode { // Devnet supports finalized and safe (although they returns the same value as latest). finalized = true + safe = true } else if w.chainID == vaa.ChainIDAcala || w.chainID == vaa.ChainIDArbitrum || w.chainID == vaa.ChainIDBase ||