Skip to content

Commit b89ed60

Browse files
authored
Merge pull request #752 from iExecBlockchainComputing/release/9.0.0
2 parents 878dba8 + 63e1513 commit b89ed60

File tree

105 files changed

+1758
-1897
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1758
-1897
lines changed

CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,54 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [[9.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v9.0.0) 2025-04-01
6+
7+
### New Features
8+
9+
- Add WebSocketBlockchainListener to fetch latest block without polling the blockchain network. (#747)
10+
- Update last seen block in configuration collection when no deal has been detected in the last hour. (#750)
11+
- Update configuration collection depending on chain.start-block-number at startup. (#750)
12+
13+
### Bug Fixes
14+
15+
- Remove TaskResultUploadTimeout detector, covered by FinalDeadlineTaskDetector. (#732)
16+
17+
### Quality
18+
19+
- Configuration server is now optional by default. (#728)
20+
- Improve switch statements after Java 17 migration. (#729)
21+
- Remove redundant blockchain calls to diminish pressure on Ethereum JSON-RPC API. (#734)
22+
- Compute alive workers metrics in `WorkerService#updateMetrics` scheduled job. (#739 #745)
23+
- Fix Spring Security deprecations after Spring Boot 3.3.8 upgrade. (#740)
24+
- Remove code related to reopen PoCo feature in `IexecHubService` and `TaskUpdateManager`. (#743)
25+
- Fix several issues raised by SonarQube Cloud. (#749)
26+
27+
### Breaking API changes
28+
29+
- Remove deprecated blockhainAdapterUrl field from PublicConfiguration. (#730)
30+
- Remove deprecated REST endpoints in TaskController. (#731)
31+
- Move `WorkerModel` from `iexec-common` to `iexec-core-library`. (#735)
32+
- Move `TaskAbortCause` from `iexec-commons-poco` to `iexec-core-library`. (#736)
33+
- Remove deprecated methods in `iexec-core-library`. (#737)
34+
- Remove unused `ContributionUtils` class. (#738)
35+
- Rework metrics to expose count of computing CPUs or GPUs instead of available ones. (#739)
36+
- Harmonize YML internal variables to proper case. (#744)
37+
- Merge split URL configuration properties (protocol, host, port) to a single URL field to offer URL validation at startup. (#748)
38+
39+
### Dependency Upgrades
40+
41+
- Upgrade to `eclipse-temurin:17.0.13_11-jre-focal`. (#728)
42+
- Upgrade to Spring Cloud 2022.0.5. (#728)
43+
- Upgrade to Mongock 5.4.0. (#728)
44+
- Upgrade to Spring Doc OpenAPI 2.6.0. (#728)
45+
- Upgrade to Spring Boot 3.3.8. (#733)
46+
- Upgrade to `java-ipfs-http-client` 1.4.4. (#741)
47+
- Upgrade to `iexec-commons-poco` 5.0.0. (#751)
48+
- Upgrade to `iexec-common` 9.0.0. (#751)
49+
- Upgrade to `iexec-blockchain-adapter-api-library` 9.0.0. (#751)
50+
- Upgrade to `iexec-result-proxy-library` 9.0.0. (#751)
51+
- Upgrade to `iexec-sms-library` 9.0.0. (#751)
52+
553
## [[8.6.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v8.6.0) 2024-12-23
654

755
### New Features

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eclipse-temurin:11.0.24_8-jre-focal
1+
FROM eclipse-temurin:17.0.13_11-jre-focal
22

33
ARG jar
44

README.md

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,26 @@ You can configure the _iExec Core Scheduler_ with the following properties:
3434
| `IEXEC_WORKERS_WHITELIST` | List of worker addresses allowed to connect to the _iExec Core Scheduler_. | String | |
3535
| `IEXEC_CORE_WALLET_PATH` | Path to the wallet of the server. | String | `./src/main/resources/wallet/encrypted-wallet_scheduler.json` |
3636
| `IEXEC_CORE_WALLET_PASSWORD` | Password to unlock the wallet of the server. | String | `whatever` |
37-
| `IEXEC_PRIVATE_CHAIN_ADDRESS` | Private URL to connect to the blockchain node. | URL | `http://localhost:8545` |
37+
| `IEXEC_BLOCKCHAIN_NODE_ADDRESS` | Private URL to connect to the blockchain node. | URL | `http://localhost:8545` |
3838
| `POOL_ADDRESS` | On-chain address of the workerpool managed by the current _iExec Core Scheduler_. | String | `0x365E7BABAa85eC61Dffe5b520763062e6C29dA27` |
3939
| `IEXEC_START_BLOCK_NUMBER` | Subscribe to new deal events from a specific block number. | Positive integer | `0` |
4040
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` |
4141
| `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap` | Integer | `22000000000` |
42-
| `IEXEC_CORE_CHAIN_ADAPTER_PROTOCOL` | _iExec Blockchain Adapter_ communication protocol. | String | `http` |
43-
| `IEXEC_CORE_CHAIN_ADAPTER_HOST` | _iExec Blockchain Adapter_ server host. | String | `localhost` |
44-
| `IEXEC_CORE_CHAIN_ADAPTER_PORT` | _iExec Blockchain Adapter_ server port. | Positive integer | `13010` |
42+
| `IEXEC_CORE_CHAIN_ADAPTER_URL` | _iExec Blockchain Adapter_ communication url. | String | `http://localhost:13010`|
4543
| `IEXEC_CORE_CHAIN_ADAPTER_USERNAME` | Username to connect to the _iExec Blockchain Adapter_ server. | String | `admin` |
4644
| `IEXEC_CORE_CHAIN_ADAPTER_PASSWORD` | Password to connect to the _iExec Blockchain Adapter_ server. | String | `whatever` |
47-
| `IEXEC_CONFIG_SERVER_PROTOCOL` | _iExec Config Server_ communication protocol. | String | `http` |
48-
| `IEXEC_CONFIG_SERVER_HOST` | _iExec Config Server_ host. | String | `localhost` |
49-
| `IEXEC_CONFIG_SERVER_PORT` | _iExec Config Server_ port. | Positive integer | `8888` |
50-
| `IEXEC_RESULT_REPOSITORY_PROTOCOL` | _iExec Result Proxy_ server communication protocol. | String | `http` |
51-
| `IEXEC_RESULT_REPOSITORY_HOST` | _iExec Result Proxy_ server host. | String | `localhost` |
52-
| `IEXEC_RESULT_REPOSITORY_PORT` | _iExec Result Proxy_ server port. | Positive integer | `13200` |
45+
| `IEXEC_CONFIG_SERVER_URL` | _iExec Config Server_ communication url. | String | `http://localhost:8888`|
46+
| `IEXEC_RESULT_REPOSITORY_URL` | _iExec Result Proxy_ server communication url. | String | `http://localhost:13200`|
5347
| `IEXEC_CORE_MANAGEMENT_ACTUATORS` | Endpoint IDs that should be included or `*` for all. | String | `health, info` |
5448
| `IEXEC_LOGS_PURGE_RATE_IN_DAYS` | Interval in days between 2 executions of the purge mechanism. | Positive integer | `1` |
5549
| `IEXEC_LOGS_AVAILABILITY_PERIOD_IN_DAYS` | Number of days to keep logs of past tasks. | Positive integer | `3` |
5650

5751
If it is not the first startup of the _iExec Core Scheduler_ and if it received deals previously,
58-
the _MongoDB_ instance will contain a __configuration Collection__ in the __iexec Database__.
59-
The value stored in this document takes the precedence over the `IEXEC_START_BLOCK_NUMBER` configuration parameter.
60-
To enforce deal observation starting from the `IEXEC_START_BLOCK_NUMBER` value, the aforementioned document has to be deleted in the _MongoDB_.
61-
All deals prior to the `IEXEC_START_BLOCK_NUMBER` will then be ignored.
52+
the _MongoDB_ instance will contain both __configuration__ and __replayConfiguration__ collections in the __iexec Database__.
53+
The highest value between the value stored in this document and the `IEXEC_START_BLOCK_NUMBER` configuration parameter takes precedence.
54+
If the stored value takes precedence, the `IEXEC_START_BLOCK_NUMBER` is ignored.
55+
Otherwise, the __configuration__ and __replayConfiguration__ collections will be updated with `IEXEC_START_BLOCK_NUMBER` during startup.
56+
All deals between the previous configured value and the `IEXEC_START_BLOCK_NUMBER` will then be ignored.
6257

6358
A more exhaustive documentation is available on [the official documentation of iExec](https://docs.iex.ec/).
6459

build.gradle

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
plugins {
22
id 'java'
33
id 'io.freefair.lombok' version '8.10.2'
4-
id 'org.springframework.boot' version '2.7.18'
4+
id 'org.springframework.boot' version '3.3.8'
55
id 'io.spring.dependency-management' version '1.1.6'
66
id 'jacoco'
77
id 'org.sonarqube' version '5.1.0.4882'
88
id 'maven-publish'
99
}
1010

1111
ext {
12-
springCloudVersion = '2021.0.8'
12+
springCloudVersion = '2023.0.5'
1313
jjwtVersion = '0.11.5'
14-
mongockVersion = '4.2.7.BETA'
14+
mongockVersion = '5.4.0'
1515
testContainersVersion = '1.20.4'
1616
}
1717

@@ -40,8 +40,12 @@ allprojects {
4040
toolchain {
4141
languageVersion.set(JavaLanguageVersion.of(17))
4242
}
43-
sourceCompatibility = "11"
44-
targetCompatibility = "11"
43+
sourceCompatibility = JavaVersion.VERSION_17
44+
targetCompatibility = JavaVersion.VERSION_17
45+
}
46+
47+
tasks.withType(JavaCompile).configureEach {
48+
options.compilerArgs.add('-parameters')
4549
}
4650
}
4751

@@ -75,7 +79,7 @@ dependencies {
7579
implementation "org.springframework.retry:spring-retry"
7680

7781
// Spring Doc
78-
implementation 'org.springdoc:springdoc-openapi-ui:1.7.0'
82+
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0'
7983

8084
// apache commons.lang3
8185
implementation 'org.apache.commons:commons-lang3'
@@ -89,14 +93,14 @@ dependencies {
8993
implementation "net.jodah:expiringmap:0.5.10"
9094

9195
// ipfs
92-
implementation "com.github.ipfs:java-ipfs-http-client:1.2.3"
96+
implementation "com.github.ipfs:java-ipfs-http-client:1.4.4"
9397

9498
// observability
9599
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
96100

97101
// mongock
98-
implementation "com.github.cloudyrock.mongock:mongock-spring-v5:${mongockVersion}"
99-
implementation "com.github.cloudyrock.mongock:mongodb-springdata-v2-driver:${mongockVersion}"
102+
implementation "io.mongock:mongock-springboot-v3:${mongockVersion}"
103+
implementation "io.mongock:mongodb-springdata-v4-driver:${mongockVersion}"
100104

101105
// vavr
102106
implementation 'io.vavr:vavr:0.10.4'
@@ -118,11 +122,11 @@ testing {
118122
test {
119123
useJUnitJupiter()
120124
dependencies {
121-
implementation 'org.springframework.boot:spring-boot-starter-test'
122-
123125
// awaitility
124126
implementation 'org.awaitility:awaitility'
125127

128+
implementation 'org.springframework.boot:spring-boot-starter-test'
129+
126130
// mongo
127131
implementation "org.testcontainers:junit-jupiter:$testContainersVersion"
128132
implementation "org.testcontainers:mongodb:$testContainersVersion"

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
services:
2+
3+
chain:
4+
image: docker-regis.iex.ec/poco-chain:1.0.0-poco-v5.5.0-voucher-v1.0.0-nethermind
5+
expose:
6+
- "8545"
7+
8+
config-server:
9+
image: wiremock/wiremock:3.3.1
10+
expose:
11+
- "8080"
12+
volumes:
13+
- "./src/test/resources/wiremock/mappings:/home/wiremock/mappings"
14+
15+
mongo:
16+
image: library/mongo:7.0.15-jammy
17+
expose:
18+
- "27017"

gradle.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version=8.6.0
2-
iexecCommonsPocoVersion=4.2.0
3-
iexecCommonVersion=8.6.0
4-
iexecBlockchainAdapterVersion=8.6.0
5-
iexecResultVersion=8.6.0
6-
iexecSmsVersion=8.7.0
1+
version=9.0.0
2+
iexecCommonsPocoVersion=5.0.0
3+
iexecCommonVersion=9.0.0
4+
iexecBlockchainAdapterVersion=9.0.0
5+
iexecResultVersion=9.0.0
6+
iexecSmsVersion=9.0.0
77
nexusUser
88
nexusPassword

iexec-core-library/build.gradle

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,29 @@ plugins {
66
}
77

88
dependencies {
9+
implementation platform("org.springframework.boot:spring-boot-dependencies:3.3.8")
10+
911
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
1012
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
11-
// TODO remove this later when migration has been done
12-
implementation project(':iexec-task-api')
1313
}
1414

1515
java {
16-
sourceCompatibility = "11"
17-
targetCompatibility = "11"
16+
sourceCompatibility = JavaVersion.VERSION_17
17+
targetCompatibility = JavaVersion.VERSION_17
1818
withJavadocJar()
1919
withSourcesJar()
2020
}
2121

22+
tasks.withType(JavaCompile).configureEach {
23+
options.compilerArgs.add('-parameters')
24+
}
25+
2226
testing {
2327
suites {
2428
test {
2529
useJUnitJupiter()
2630
dependencies {
27-
implementation 'org.junit.jupiter:junit-jupiter:5.8.2'
28-
implementation 'org.assertj:assertj-core:3.22.0'
31+
implementation 'org.assertj:assertj-core'
2932
}
3033
}
3134
}
Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2024 IEXEC BLOCKCHAIN TECH
2+
* Copyright 2023-2025 IEXEC BLOCKCHAIN TECH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,32 +16,20 @@
1616

1717
package com.iexec.core.api;
1818

19-
import com.iexec.common.config.WorkerModel;
20-
import com.iexec.common.replicate.ComputeLogs;
2119
import com.iexec.common.replicate.ReplicateStatusUpdate;
22-
import com.iexec.commons.poco.eip712.entity.EIP712Challenge;
2320
import com.iexec.commons.poco.security.Signature;
2421
import com.iexec.core.config.PublicConfiguration;
25-
import com.iexec.core.logs.TaskLogsModel;
26-
import com.iexec.core.metric.PlatformMetric;
22+
import com.iexec.core.config.WorkerModel;
2723
import com.iexec.core.notification.TaskNotification;
2824
import com.iexec.core.notification.TaskNotificationType;
2925
import com.iexec.core.replicate.ReplicateTaskSummary;
30-
import com.iexec.core.task.TaskModel;
3126
import feign.Headers;
3227
import feign.Param;
3328
import feign.RequestLine;
3429

3530
import java.util.List;
3631

3732
public interface SchedulerClient {
38-
/**
39-
* @deprecated Use iexec-task-feedback-api
40-
*/
41-
@Deprecated(forRemoval = true)
42-
@RequestLine("GET /metrics")
43-
PlatformMetric getMetrics();
44-
4533
@RequestLine("GET /version")
4634
String getCoreVersion();
4735

@@ -87,42 +75,4 @@ TaskNotificationType updateReplicateStatus(
8775
ReplicateStatusUpdate replicateStatusUpdate
8876
);
8977
// endregion
90-
91-
// region /tasks
92-
93-
/**
94-
* @deprecated Use iexec-task-feedback-api
95-
*/
96-
@Deprecated(forRemoval = true)
97-
@RequestLine("GET /tasks/{chainTaskId}")
98-
TaskModel getTask(@Param("chainTaskId") String chainTaskId);
99-
100-
/**
101-
* @deprecated Use iexec-task-feedback-api
102-
*/
103-
@Deprecated(forRemoval = true)
104-
@RequestLine("GET /tasks/logs/challenge?address={address}")
105-
EIP712Challenge getTaskLogsChallenge(@Param("address") String address);
106-
107-
/**
108-
* @deprecated Use iexec-task-feedback-api
109-
*/
110-
@Deprecated(forRemoval = true)
111-
@Headers("Authorization: {authorization}")
112-
@RequestLine("GET /tasks/{chainTaskId}/logs")
113-
TaskLogsModel getTaskLogs(
114-
@Param("chainTaskId") String chainTaskId,
115-
@Param("authorization") String authorization);
116-
117-
/**
118-
* @deprecated Use iexec-task-feedback-api
119-
*/
120-
@Deprecated(forRemoval = true)
121-
@Headers("Authorization: {authorization}")
122-
@RequestLine("GET /tasks/{chainTaskId}/replicates/{walletAddress}/logs")
123-
ComputeLogs getComputeLogs(
124-
@Param("chainTaskId") String chainTaskId,
125-
@Param("walletAddress") String walletAddress,
126-
@Param("authorization") String authorization);
127-
// endregion
12878
}

iexec-core-library/src/main/java/com/iexec/core/config/PublicConfiguration.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2024 IEXEC BLOCKCHAIN TECH
2+
* Copyright 2020-2025 IEXEC BLOCKCHAIN TECH
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,22 +22,14 @@
2222
import lombok.Value;
2323

2424
/**
25-
* The {@link #blockchainAdapterUrl} and {@link #configServerUrl} fields are repetitive,
26-
* so if both are populated, they must contain the same value.
27-
* Duplicating these fields ensures worker/scheduler compatibility on different v8 versions.
28-
* In v9, the {@link #blockchainAdapterUrl} field will be removed.
25+
* Configuration exposed by the scheduler and available publicly to all workers.
2926
*/
3027
@Value
3128
@Builder
3229
@JsonDeserialize(builder = PublicConfiguration.PublicConfigurationBuilder.class)
3330
public class PublicConfiguration {
3431
String workerPoolAddress;
3532
String schedulerPublicAddress;
36-
/**
37-
* @deprecated Use {@link #configServerUrl} instead.
38-
*/
39-
@Deprecated(forRemoval = true)
40-
String blockchainAdapterUrl;
4133
String configServerUrl;
4234
String resultRepositoryURL;
4335
long askForReplicatePeriod;

0 commit comments

Comments
 (0)