Skip to content

Commit cb45b21

Browse files
Merge pull request #561 from iExecBlockchainComputing/release/8.0.0
Release/8.0.0
2 parents 557c7bf + 223ba3e commit cb45b21

File tree

69 files changed

+1513
-794
lines changed

Some content is hidden

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

69 files changed

+1513
-794
lines changed

CHANGELOG.md

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

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

5+
## [[8.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v8.0.0) 2023-03-08
6+
7+
### New Features
8+
* Support Gramine framework for TEE tasks.
9+
* Retrieve location of SMS services through an _iExec Platform Registry_.
10+
* Improve authentication on scheduler.
11+
* burn challenge after login.
12+
* handle JWT expiration through the expiration claim.
13+
* cache JWT until expiration.
14+
* better claims usage.
15+
* Show application version on banner.
16+
### Bug Fixes
17+
* Always return a `TaskNotificationType` on replicate status update when it has been authorized.
18+
* Handle task added twice.
19+
### Quality
20+
* Improve code quality and tests.
21+
* Removed unused variables in configuration.
22+
* Use existing `toString()` method to serialize and hash scheduler public configuration.
23+
* Use recommended annotation in `MetricController`.
24+
* Remove `spring-cloud-starter-openfeign` dependency.
25+
### Dependency Upgrades
26+
* Replace the deprecated `openjdk` Docker base image with `eclipse-temurin` and upgrade to Java 11.0.18 patch.
27+
* Upgrade to Spring Boot 2.6.14.
28+
* Upgrade to Gradle 7.6.
29+
* Upgrade OkHttp to 4.9.0.
30+
* Upgrade `jjwt` to `jjwt-api` 0.11.5.
31+
* Upgrade to `iexec-common` 7.0.0.
32+
* Upgrade to `jenkins-library` 2.4.0.
33+
534
## [[7.3.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v7.3.1) 2023-02-17
635

736
* Subscribe only to deal events targeting a specific workerpool.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM openjdk:11.0.15-jre-slim
1+
FROM eclipse-temurin:11.0.18_10-jre
22

33
ARG jar
44

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@Library('global-jenkins-library@2.2.3') _
1+
@Library('global-jenkins-library@2.4.0') _
22
buildJavaProject(
33
buildInfo: getBuildInfo(),
44
integrationTestsEnvVars: [],

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ To run properly, the _iExec Core Scheduler_ requires:
1414
* A _MongoDB_ instance to persist its data.
1515
* An _iExec Blockchain Adapter_ for several blockchain network interactions.
1616
* An _iExec Result Proxy_ to check if tasks results have been published.
17-
* An _iExec Secret Management Service_ (_iExec SMS_) for secret and enclave sessions management of TEE tasks.
17+
* An _iExec Platform Registry_ to retrieve locations of _iExec SMS_ services.
18+
* One or many _iExec Secret Management Service_ instances (referenced by the _iExec Platform Registry_) to handle secrets and enclave sessions of TEE tasks.
1819

1920
You can configure the _iExec Core Scheduler_ with the following properties:
2021

@@ -23,17 +24,16 @@ You can configure the _iExec Core Scheduler_ with the following properties:
2324
| `IEXEC_CORE_PORT` | Server port of the _iExec Core Scheduler_. | Positive integer | `13000` |
2425
| `MONGO_HOST` | _MongoDB_ server host. Cannot be set with URI. | String | `localhost` |
2526
| `MONGO_PORT` | _MongoDB_ server port. Cannot be set with URI. | Positive integer | `13002` |
27+
| `IEXEC_PLATFORM_REGISTRY` | _iExec Platform Registry_ server URL. | URL | |
28+
| `IEXEC_PLATFORM_REGISTRY_STACK` | [optional] Use a specific stack configuration exposed by the _iExec Platform Registry_. | String | |
29+
| `IEXEC_PLATFORM_REGISTRY_LABEL` | [optional] Use a labeled version of configuration files exposed by the _iExec Platform Registry_. It might be a Git label such as `main`, `v10` or `07998be`. | String | |
2630
| `REVEAL_TIMEOUT_PERIOD` | Detector period to track reveal timeouts for tasks. | Positive integer | `120000` |
2731
| `IEXEC_ASK_REPLICATE_PERIOD` | Worker configuration, interval in milliseconds between 2 replicate requests. | Positive integer | `5000` |
2832
| `IEXEC_CORE_REQUIRED_WORKER_VERSION` | Empty value will allow any worker version. | String | |
2933
| `IEXEC_WORKERS_WHITELIST` | List of worker addresses allowed to connect to the _iExec Core Scheduler_. | String | |
3034
| `IEXEC_CORE_WALLET_PATH` | Path to the wallet of the server. | String | `./src/main/resources/wallet/encrypted-wallet_scheduler.json` |
3135
| `IEXEC_CORE_WALLET_PASSWORD` | Password to unlock the wallet of the server. | String | `whatever` |
32-
| `IEXEC_CHAIN_ID` | Chain ID of the blockchain network to connect. | Positive integer | `17` |
33-
| `IEXEC_IS_SIDECHAIN` | Define if iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `false` |
3436
| `IEXEC_PRIVATE_CHAIN_ADDRESS` | Private URL to connect to the blockchain node. | URL | `http://localhost:8545` |
35-
| `IEXEC_PUBLIC_CHAIN_ADDRESS` | [unused] Public URL to connect to the blockchain node. | URL | `http://localhost:8545` |
36-
| `IEXEC_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | String | `0xBF6B2B07e47326B7c8bfCb4A5460bef9f0Fd2002` |
3737
| `POOL_ADDRESS` | On-chain address of the workerpool managed by the current _iExec Core Scheduler_. | String | `0x365E7BABAa85eC61Dffe5b520763062e6C29dA27` |
3838
| `IEXEC_START_BLOCK_NUMBER` | Subscribe to new deal events from a specific block number. | Positive integer | `0` |
3939
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` |
@@ -46,11 +46,6 @@ You can configure the _iExec Core Scheduler_ with the following properties:
4646
| `IEXEC_RESULT_REPOSITORY_PROTOCOL` | _iExec Result Proxy_ server communication protocol. | String | `http` |
4747
| `IEXEC_RESULT_REPOSITORY_HOST` | _iExec Result Proxy_ server host. | String | `localhost` |
4848
| `IEXEC_RESULT_REPOSITORY_PORT` | _iExec Result Proxy_ server port. | Positive integer | `13200` |
49-
| `IEXEC_IPFS_HOST` | [unused] _IPFS_ node host. | String | `127.0.0.1` |
50-
| `IEXEC_IPFS_PORT` | [unused] _IPFS_ node port. | Positive integer | `5001` |
51-
| `IEXEC_SMS_PROTOCOL` | _iExec SMS_ server communication protocol. | String | `http` |
52-
| `IEXEC_SMS_HOST` | _iExec SMS_ server host. | String | `localhost` |
53-
| `IEXEC_SMS_PORT` | _iExec SMS_ server port. | Positive integer | `13300` |
5449
| `IEXEC_CORE_MANAGEMENT_ACTUATORS` | Endpoint IDs that should be included or `*` for all. | String | `health, info` |
5550
| `IEXEC_CORE_GRAYLOG_HOST` | _Graylog_ server host. | String | `localhost` |
5651
| `IEXEC_CORE_GRAYLOG_PORT` | _Graylog_ server port. | Positive integer | `12201` |

build.gradle

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
plugins {
22
id 'java'
3-
id 'eclipse'
3+
id 'io.freefair.lombok' version '6.6.1'
4+
id 'org.springframework.boot' version '2.6.14'
5+
id 'io.spring.dependency-management' version '1.1.0'
46
id 'jacoco'
57
id 'org.sonarqube' version '3.3'
68
id 'maven-publish'
7-
id "org.springframework.boot" version "2.6.2"
8-
id "io.spring.dependency-management" version "1.0.11.RELEASE"
99
}
1010

1111
group = 'com.iexec.core'
12-
sourceCompatibility = 11
13-
targetCompatibility = 11
1412

1513
ext {
16-
springCloudVersion = '2021.0.0'
14+
springCloudVersion = '2021.0.5'
15+
jjwtVersion = '0.11.5'
1716
mongockVersion = '4.2.7.BETA'
1817
}
1918

@@ -38,7 +37,6 @@ repositories {
3837
maven {
3938
url "https://nexus.intra.iex.ec/repository/maven-public/"
4039
}
41-
4240
maven { url "https://jitpack.io" }
4341
}
4442

@@ -64,23 +62,27 @@ dependencies {
6462
implementation "org.springframework.boot:spring-boot-starter-data-mongodb"
6563
implementation "org.springframework.boot:spring-boot-starter-hateoas"
6664
implementation "org.springframework.boot:spring-boot-starter-security"
65+
implementation 'org.springframework.boot:spring-boot-starter-validation'
6766
implementation "org.springframework.boot:spring-boot-starter-web"
6867
implementation "org.springframework.boot:spring-boot-starter-websocket"
69-
implementation "org.springframework.cloud:spring-cloud-starter-openfeign"
68+
implementation 'org.springframework.cloud:spring-cloud-starter-config'
7069
implementation "org.springframework.retry:spring-retry"
7170

71+
// apache commons.lang3
72+
implementation 'org.apache.commons:commons-lang3'
73+
7274
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
7375
// Spring Boot dependencies BOM enforces okhttp3 3.14.9 in 2.6.X
7476
// It is required to define the dependency version required by web3j until migration to at least Spring Boot 2.7.X
7577
implementation 'com.squareup.okhttp3:okhttp:4.9.0' // Web3j issue: https://github.com/web3j/web3j/issues/1180
7678

77-
testImplementation "org.springframework.boot:spring-boot-starter-test"
78-
7979
// Spring Doc
8080
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
8181

8282
// jason web token
83-
implementation "io.jsonwebtoken:jjwt:0.7.0"
83+
implementation "io.jsonwebtoken:jjwt-api:$jjwtVersion"
84+
runtimeOnly "io.jsonwebtoken:jjwt-impl:$jjwtVersion"
85+
runtimeOnly "io.jsonwebtoken:jjwt-jackson:$jjwtVersion"
8486

8587
// expiring map
8688
implementation "net.jodah:expiringmap:0.5.10"
@@ -93,25 +95,27 @@ dependencies {
9395

9496
implementation 'io.micrometer:micrometer-registry-prometheus:1.8.1'
9597

96-
// lombok
97-
compileOnly "org.projectlombok:lombok:1.18.2"
98-
annotationProcessor "org.projectlombok:lombok:1.18.2"
99-
testCompileOnly "org.projectlombok:lombok:1.18.2"
100-
testAnnotationProcessor "org.projectlombok:lombok:1.18.2"
101-
10298
// mongock
10399
implementation "com.github.cloudyrock.mongock:mongock-spring-v5:${mongockVersion}"
104100
implementation "com.github.cloudyrock.mongock:mongodb-springdata-v2-driver:${mongockVersion}"
105101

102+
testImplementation 'org.springframework.boot:spring-boot-starter-test'
103+
106104
// awaitility
107-
testImplementation 'org.awaitility:awaitility:4.0.1'
105+
testImplementation 'org.awaitility:awaitility'
108106

109107
// mongo
110108
testImplementation 'org.testcontainers:testcontainers:1.16.2'
111109
testImplementation 'org.testcontainers:junit-jupiter:1.16.2'
112110
testImplementation 'org.testcontainers:mongodb:1.16.2'
113111
}
114112

113+
java {
114+
toolchain {
115+
languageVersion.set(JavaLanguageVersion.of(11))
116+
}
117+
}
118+
115119
jar {
116120
enabled = true
117121
archiveClassifier.set('library')
@@ -121,6 +125,13 @@ springBoot {
121125
buildInfo()
122126
}
123127

128+
tasks.named("bootJar") {
129+
manifest {
130+
attributes("Implementation-Title": "iExec Core Scheduler",
131+
"Implementation-Version": project.version)
132+
}
133+
}
134+
124135
test {
125136
useJUnitPlatform()
126137
}
@@ -136,7 +147,7 @@ jacoco {
136147
// sonarqube code coverage requires jacoco XML report
137148
jacocoTestReport {
138149
reports {
139-
xml.enabled true
150+
xml.required = true
140151
}
141152
}
142153
tasks.test.finalizedBy tasks.jacocoTestReport
@@ -145,7 +156,7 @@ tasks.sonarqube.dependsOn tasks.jacocoTestReport
145156
publishing {
146157
publications {
147158
maven(MavenPublication) {
148-
artifact bootJar
159+
artifact tasks.named("bootJar")
149160
from components.java
150161
}
151162
}

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version=7.3.1
2-
iexecCommonVersion=6.2.0
3-
iexecBlockchainAdapterVersion=7.3.0
4-
iexecResultVersion=7.3.0
5-
iexecSmsVersion=7.3.0
1+
version=8.0.0
2+
iexecCommonVersion=7.0.0
3+
iexecBlockchainAdapterVersion=8.0.0
4+
iexecResultVersion=8.0.0
5+
iexecSmsVersion=8.0.0
66

77
nexusUser
88
nexusPassword

gradle/wrapper/gradle-wrapper.jar

2.32 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)