Skip to content

Commit 7c38c2e

Browse files
committed
keep previous behavior
1 parent d8a3192 commit 7c38c2e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

block/internal/da/client.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ func (c *client) Submit(ctx context.Context, data [][]byte, _ float64, namespace
183183
}
184184

185185
// getBlockTimestamp fetches the block timestamp from the DA layer header.
186-
// If the header fetch fails, it falls back to time.Now() and logs a warning.
187186
func (c *client) getBlockTimestamp(ctx context.Context, height uint64) (time.Time, error) {
188187
headerCtx, cancel := context.WithTimeout(ctx, c.defaultTimeout)
189188
defer cancel()
@@ -225,7 +224,8 @@ func (c *client) Retrieve(ctx context.Context, height uint64, namespace []byte)
225224
blockTime, err := c.getBlockTimestamp(ctx, height)
226225
if err != nil {
227226
c.logger.Error().Uint64("height", height).Err(err).Msg("failed to get block timestamp")
228-
// TODO: we should retry fetching the timestamp.
227+
blockTime = time.Now()
228+
// TODO: we should retry fetching the timestamp. Current time may mess block time consistency for based sequencers.
229229
}
230230

231231
return datypes.ResultRetrieve{
@@ -262,7 +262,8 @@ func (c *client) Retrieve(ctx context.Context, height uint64, namespace []byte)
262262
blockTime, err := c.getBlockTimestamp(ctx, height)
263263
if err != nil {
264264
c.logger.Error().Uint64("height", height).Err(err).Msg("failed to get block timestamp")
265-
// TODO: we should retry fetching the timestamp.
265+
blockTime = time.Now()
266+
// TODO: we should retry fetching the timestamp. Current time may mess block time consistency for based sequencers.
266267
}
267268

268269
if len(blobs) == 0 {

0 commit comments

Comments
 (0)