Skip to content

Commit 9601c94

Browse files
author
Jérémy James Toussaint
committed
Callback digest is sha3 of callback
1 parent be2702a commit 9601c94

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/main/java/com/iexec/worker/docker/CustomDockerClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public CustomDockerClient() throws DockerCertificateException {
5757

5858
public boolean pullImage(String chainTaskId, String image) {
5959
log.info("Image pull started [chainTaskId:{}, image:{}]", chainTaskId, image);
60-
60+
return true;
61+
/*generateTeeSession,
6162
try {
6263
docker.pull(image);
6364
} catch (DockerException | InterruptedException e) {
@@ -68,6 +69,7 @@ public boolean pullImage(String chainTaskId, String image) {
6869
6970
log.info("Image pull completed [chainTaskId:{}, image:{}]", chainTaskId, image);
7071
return true;
72+
*/
7173
}
7274

7375
public boolean isImagePulled(String image) {

src/main/java/com/iexec/worker/result/ResultService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ private String getNonTeeDeterminismHash(String chainTaskId) {
200200
Path determinismFilePath = Paths.get(filePath);
201201

202202
try {
203+
String callbackFilePathName = workerConfigService.getTaskIexecOutDir(chainTaskId)
204+
+ File.separator + CALLBACK_FILE_NAME;
205+
206+
String callbackData = getCallbackDataFromPath(callbackFilePathName);
207+
if (!callbackData.isEmpty()){
208+
return Hash.sha3(callbackData);
209+
}
210+
203211
if (determinismFilePath.toFile().exists()) {
204212
hash = getHashFromDeterminismIexecFile(determinismFilePath);
205213
log.info("Determinism file found and its hash has been computed "

0 commit comments

Comments
 (0)