-
Notifications
You must be signed in to change notification settings - Fork 42
Challenge
Yury edited this page Mar 21, 2023
·
6 revisions
Blobber fetches open challenges in worker periodically, saving new challenges into the DB. (?add db scheme?)
loadTodoChallenges
fetches challenges from db into the toProcessChallenge
channel
challengeProcessor
processes challenges, runs in num_workers
workers. Depending on challenge state it is processed differently,
accepted
processed in validateOnValidators first, then accepted
and processed
both processed in commitOnChain
In validate on validators several entities are loaded from db first, then challenge data is created and sent to the validators
loads tickets
locks allocation for data loading
loads tickets
loads reference
send challenge data to all validators
get ValidationTicket in response
type ValidationTicket struct {
ChallengeID string `json:"challenge_id"`
BlobberID string `json:"blobber_id"`
ValidatorID string `json:"validator_id"`
ValidatorKey string `json:"validator_key"`
Result bool `json:"success"`
Message string `json:"message"`
MessageCode string `json:"message_code"`
Timestamp common.Timestamp `json:"timestamp"`
Signature string `json:"signature"`
}
Blobber submits transactions challenge_response
to blockchain with following data
type ChallengeResponse struct {
ChallengeID string `json:"challenge_id"`
ValidationTickets []*ValidationTicket `json:"validation_tickets"`
}
- Home
- Introduction
- Architecture
- 0Chain Smart Contracts
- Help