Open cameel opened 6 years ago
@cameel in 2. RESULT TRANSFER
it is written that submission of ForceReportComputedTask
by the provider ends on TaskToCompute.deadline
. But on the picture it looks more like it should be TaskToCompute.deadline + 2CMT + MDT
.
Right now in our code it's TaskToCompute.deadline + FAT
.
Which one is correct?
You're mixing 1 and 2 here.
in
2. RESULT TRANSFER
it is written that submission ofForceReportComputedTask
by the provider ends onTaskToCompute.deadline
.
Yes, ForceReportComputedTask
must be submitted no later than at TaskToCompute.deadline
.
But it's not in 2. RESULT TRANSFER
. It's in 1. REPORT
.
But on the picture it looks more like it should be
TaskToCompute.deadline + 2CMT + MDT
.
This is the time for ForceGetTaskResult
in 2. RESULT TRANSFER
. Not for ReportComputedTask
in 1. REPORT
.
Right now in our code it's
TaskToCompute.deadline + FAT
. Which one is correct?
The code is wrong. The current code is a mix of my old blueprint for "force get task result" use case (@12) and information gleaned from Łukasz's docs. Refer to the current blueprint only - it's now consistent with Łukasz's docs as far as I can tell.
Ups, I copied it wrong. I meant ForceGetTaskResult
instead ForceReportComputedTask
Oh, I see it now. You're right. There was an error.
I have changed the end time in 2. RESULT TRANSFER
from
TaskToCompute.deadline
to
TaskToCompute.deadline
+ 2 CMT + MDT
Another error fixed:
Changed the start time in 5. PAYMENT
from
SubtaskResultsAccepted.timestamp
to
SubtaskResultsAccepted.timestamp
+ PDT
@rwrzesien Could You look at last part of this task 5.PAYMENT
, and check if it really should change form SubtaskResultsAccepted.payment_ts
to SubtaskResultsAccepted.timestamp
? I'm referring to Your blueprint #116
@Jakub89 It looks for me like this is the missing part of the use case, not a bug. As far as I remember we didn't wanted to implement time window check when we were implementing the use case. However, I don't remember what was the reason for it.
You can see that in @cameel comment here https://github.com/golemfactory/concent/issues/116#issuecomment-365939321 he mentions 2C, but quoting a part from 2B, which at the quote time was 2C. I think that this check was in 2B, and got removed, that is why 2C became 2B.
I suggest asking @lukasz-glen if maybe he remembers why this check was dropped at that point.
Description and diagram updated according to discussion with @lukasz-glen on Rocket. Use SubtaskResultsAccepted.payment_ts
and ignore the timestamp.
Update: I have clarified that the diagram shows only a single subtask in the PAYMENT
use case.
Update: diagram updated with changes from #431:
@cameel, please update FORCE PAYMENT
:
start:
SubtaskResultsAccepted.timestamp
+PDT
(maximum of all values included insideForcePayment
)
to indicate that payment_ts
is now used instead of timestamp
Time limits in communication with requestor and provider
Settings/constants
CONCENT_MESSAGING_TIME
MAXIMUM_DOWNLOAD_TIME
SUBTASK_VERIFICATION_TIME
FORCE_ACCEPTANCE_TIME
ADDITIONAL_VERIFICATION_CALL_TIME
PAYMENT_DUE_TIME
These values are meant to be adjustable in Concent settings.
Relations between time window lengths
SVT > 4 CMT + 3 MDT
Relations between message timestamps
Any message that does not satisfy any of these conditions must be rejected as invalid:
TaskToCompute.timestamp
<=ReportComputedTask.timestamp
<=TaskToCompute.deadline
AckReportComputedTask.timestamp
<=TaskToCompute.deadline
+ CMTRejectReportComputedTask.timestamp
<=TaskToCompute.deadline
+ CMTCommunication windows
Note: the diagram above shows the biggest possible set of use cases one subtask could go through. It's not the only possible one though since all use cases are optional. Also keep in mind that the diagram only shows one subtask but the
PAYMENT
use case can receive more than one in a single message. In that case the time window starts when acceptances of all those subtasks are older than PDT.REPORT
ForceReportComputedTask
by the provider:ReportComputedTask.timestamp
TaskToCompute.deadline
AckReportComputedTask
orRejectReportComputedTask
by the requestor:ForceReportComputedTask.timestamp
TaskToCompute.deadline
+ CMTRESULT TRANSFER
ForceGetTaskResult
by the requestor:ReportComputedTask.timestamp
TaskToCompute.deadline
+ 2 CMT + MDTForceGetTaskResult.timestamp
TaskToCompute.deadline
+ 3 CMT + 2 MDTFileTransferToken.deadline
returned inForceGetTaskResultUpload
)FileTransferToken.timestamp
TaskToCompute.deadline
+ SVTFileTransferToken.deadline
returned inForceGetTaskResultDownload
)ACCEPTANCE
ForceSubtaskResults
by the provider:TaskToCompute.deadline
+ SVTTaskToCompute.deadline
+ SVT + FATForceSubtaskResultsResponse
the requestor:ForceSubtaskResults.timestamp
TaskToCompute.deadline
+ SVT + FAT + CMTADDITIONAL VERIFICATION
SubtaskResultsVerify
by the provider:SubtaskResultsRejected.timestamp
SubtaskResultsRejected.timestamp
+ AVCTSubtaskResultsVerify.timestamp
SubtaskResultsRejected.timestamp
+ AVCTPAYMENT
ForcePayment
by the provider:SubtaskResultsAccepted.timestamp
+ PDT (maximum of all values included insideForcePayment
)