0chain / blobber

A storage provider (blobber) interface to the blockchain and consumers of storage.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failed to verify the read marker: read_marker_validation_failed: Timestamp is for future in the read marker

Jayashsatolia403 opened this issue · comments

When downloading the file sometimes read_markers are failing with this error Timestamp is for future in the read marker.

0box-sdk [ERROR] 2023/07/01 12:44:25.901996 downloadworker.go:555: Error while attempting to submit readmarker response_error: redeem_readmarker: invalid read marker, failed to verify the read marker: read_marker_validation_failed: Timestamp is for future in the read marker

Here are the complete logs : https://0chain.slack.com/archives/D04SNFRPAQ7/p1688198817480389

In a discussion with @lpoli, he told that somehow blobber's clock is slower than of client.

if rm.LatestRM.Timestamp > currentTS {
		zLogger.Logger.Error("Timestamp is for future in the read marker", zap.Any("rm", rm), zap.Any("now", currentTS))
		return common.NewError("read_marker_validation_failed", "Timestamp is for future in the read marker")
	}

In this block(in verifyReadmarker function) previously it used to be if rm.LatestRM.Timestamp > (currentTS + 2).

@Hitenjain14 Lets revert it back because somehow client's clock shall be in future for blobber's clock.

I am adding this change here only : #1146