Closed Sriep closed 3 years ago
Update FindChallenge in worker.go. The filtering can be added to the code following the API call.
Write a unit test to confirm the filtering is working ok.
@Sriep How to determine if a challenge is expired or not? Looks like there is no timestamp or status field to be based on.
The information is sent to the blobber, the blobber does not decode it.
ochian handler OpenChallengehandler returns blobberChalaengeObj
which is a BlobberChallenge object which significantly has an array of StorageChallenge objects with a Created common.Timestamp
field.
This array of StorageChallenge objects in 0chain is decoded into an array of ChallengeEntity objects. Adding a Created
field to the ChallengeEntity object should give you the information you need.
@Sriep Created a pull request, but not sure the update fully meets the requirements: https://github.com/0chain/blobber/pull/125
There are a couple of questions:
The expiration is in 0cahin_blobber.yaml.challenge_completion_time. If Created
plus challenge_completion_time
has passed then the challenge can be filtered out.
@Sriep updated. please, review the pr: https://github.com/0chain/blobber/pull/125
The blobber should not waste time trying to resolve expired challenges. Filter out the expired challenges from the challenges sent by the 0chain
/openchallenges
call.