diff --git a/block/manager.go b/block/manager.go index be7009111..323f48690 100644 --- a/block/manager.go +++ b/block/manager.go @@ -38,6 +38,7 @@ const ( defaultDABlockTime = 30 * time.Second DABatchRetryDelay = 20 * time.Second SLBatchRetryDelay = 10 * time.Second + maxDelay = 1 * time.Minute ) const ( @@ -748,7 +749,7 @@ func (m *Manager) submitBatchToSL(batch *types.Batch, resultSubmitToDA *da.Resul return err } return nil - }, retry.Context(m.batchRetryCtx), retry.LastErrorOnly(true), retry.Delay(SLBatchRetryDelay)) + }, retry.Context(m.batchRetryCtx), retry.LastErrorOnly(true), retry.Delay(SLBatchRetryDelay), retry.MaxDelay(maxDelay)) // Panic if we failed not due to context cancellation m.batchRetryMu.Lock() if err != nil && m.batchRetryCtx.Err() == nil { @@ -767,7 +768,7 @@ func (m *Manager) submitBatchToDA(ctx context.Context, batch *types.Batch) (*da. return fmt.Errorf("failed to submit batch to DA layer: %s", res.Message) } return nil - }, retry.Context(ctx), retry.LastErrorOnly(true), retry.Delay(DABatchRetryDelay)) + }, retry.Context(ctx), retry.LastErrorOnly(true), retry.Delay(DABatchRetryDelay), retry.MaxDelay(maxDelay)) if err != nil { return nil, err } diff --git a/da/celestia/celestia.go b/da/celestia/celestia.go index 50ef4f3d9..693f9394a 100644 --- a/da/celestia/celestia.go +++ b/da/celestia/celestia.go @@ -51,6 +51,7 @@ func (c *DataAvailabilityLayerClient) Init(config []byte, kvStore store.KVStore, func (c *DataAvailabilityLayerClient) Start() error { c.logger.Info("starting Celestia Data Availability Layer Client", "baseURL", c.config.BaseURL) var err error + //TODO: add * time.Second for the timeout c.client, err = cnc.NewClient(c.config.BaseURL, cnc.WithTimeout(c.config.Timeout)) return err }