diff --git a/src/main/java/com/iexec/commons/poco/task/TaskDescription.java b/src/main/java/com/iexec/commons/poco/task/TaskDescription.java index 1924e53..4bdb33e 100644 --- a/src/main/java/com/iexec/commons/poco/task/TaskDescription.java +++ b/src/main/java/com/iexec/commons/poco/task/TaskDescription.java @@ -46,8 +46,7 @@ public class TaskDescription { String datasetUri; String datasetChecksum; - // deal - String chainDealId; + // Deal in IexecLibCore_v5.sol String appAddress; String appOwner; BigInteger appPrice; @@ -59,20 +58,24 @@ public class TaskDescription { BigInteger workerpoolPrice; BigInteger trust; BigInteger category; - boolean isTeeTask; - TeeFramework teeFramework; + String tag; String requester; String beneficiary; String callback; @Builder.Default DealParams dealParams = DealParams.builder().build(); long startTime; - int botSize; int botFirstIndex; + int botSize; - // task - int botIndex; - long maxExecutionTime; // timeref ? + // TEE from tag + boolean isTeeTask; + TeeFramework teeFramework; + + // Task in IexecLibCore_v5.sol + String chainDealId; + int botIndex; // idx + long maxExecutionTime; // timeref in PoCo long contributionDeadline; long finalDeadline; @@ -178,7 +181,6 @@ public static TaskDescription toTaskDescription(final ChainDeal chainDeal, final .datasetUri(datasetUri) .datasetChecksum(datasetChecksum) // deal - .chainDealId(chainDeal.getChainDealId()) .appAddress(chainDeal.getDappPointer()) .appOwner(chainDeal.getDappOwner()) .appPrice(chainDeal.getDappPrice()) @@ -190,16 +192,19 @@ public static TaskDescription toTaskDescription(final ChainDeal chainDeal, final .workerpoolPrice(chainDeal.getPoolPrice()) .trust(chainDeal.getTrust()) .category(chainDeal.getCategory()) - .isTeeTask(TeeUtils.isTeeTag(tag)) - .teeFramework(TeeUtils.getTeeFramework(tag)) + .tag(tag) .requester(chainDeal.getRequester()) .beneficiary(chainDeal.getBeneficiary()) .callback(chainDeal.getCallback()) .dealParams(chainDeal.getParams()) .startTime(chainDeal.getStartTime().longValue()) - .botSize(chainDeal.getBotSize().intValue()) .botFirstIndex(chainDeal.getBotFirst().intValue()) + .botSize(chainDeal.getBotSize().intValue()) + // tee + .isTeeTask(TeeUtils.isTeeTag(tag)) + .teeFramework(TeeUtils.getTeeFramework(tag)) // task + .chainDealId(chainDeal.getChainDealId()) .botIndex(chainTask.getIdx()) .maxExecutionTime(chainDeal.getChainCategory().getMaxExecutionTime()) // https://github.com/iExecBlockchainComputing/PoCo/blob/v5/contracts/modules/delegates/IexecPoco2Delegate.sol#L111 .contributionDeadline(chainTask.getContributionDeadline()) diff --git a/src/test/java/com/iexec/commons/poco/task/TaskDescriptionTests.java b/src/test/java/com/iexec/commons/poco/task/TaskDescriptionTests.java index ca8c2ee..efd7d28 100644 --- a/src/test/java/com/iexec/commons/poco/task/TaskDescriptionTests.java +++ b/src/test/java/com/iexec/commons/poco/task/TaskDescriptionTests.java @@ -156,6 +156,7 @@ void toTaskDescription() { .workerpoolPrice(WORKERPOOL_PRICE) .trust(TRUST) .category(CATEGORY) + .tag(TeeUtils.TEE_SCONE_ONLY_TAG) .isTeeTask(IS_TEE_TASK) .teeFramework(TEE_FRAMEWORK) .requester(REQUESTER)