Skip to content

Commit

Permalink
Merge pull request #561 from iExecBlockchainComputing/release/8.0.0
Browse files Browse the repository at this point in the history
Release/8.0.0
  • Loading branch information
jeremyjams authored Mar 8, 2023
2 parents 557c7bf + 223ba3e commit cb45b21
Show file tree
Hide file tree
Showing 69 changed files with 1,513 additions and 794 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

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

## [[8.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v8.0.0) 2023-03-08

### New Features
* Support Gramine framework for TEE tasks.
* Retrieve location of SMS services through an _iExec Platform Registry_.
* Improve authentication on scheduler.
* burn challenge after login.
* handle JWT expiration through the expiration claim.
* cache JWT until expiration.
* better claims usage.
* Show application version on banner.
### Bug Fixes
* Always return a `TaskNotificationType` on replicate status update when it has been authorized.
* Handle task added twice.
### Quality
* Improve code quality and tests.
* Removed unused variables in configuration.
* Use existing `toString()` method to serialize and hash scheduler public configuration.
* Use recommended annotation in `MetricController`.
* Remove `spring-cloud-starter-openfeign` dependency.
### Dependency Upgrades
* Replace the deprecated `openjdk` Docker base image with `eclipse-temurin` and upgrade to Java 11.0.18 patch.
* Upgrade to Spring Boot 2.6.14.
* Upgrade to Gradle 7.6.
* Upgrade OkHttp to 4.9.0.
* Upgrade `jjwt` to `jjwt-api` 0.11.5.
* Upgrade to `iexec-common` 7.0.0.
* Upgrade to `jenkins-library` 2.4.0.

## [[7.3.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v7.3.1) 2023-02-17

* Subscribe only to deal events targeting a specific workerpool.
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11.0.15-jre-slim
FROM eclipse-temurin:11.0.18_10-jre

ARG jar

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@Library('global-jenkins-library@2.2.3') _
@Library('global-jenkins-library@2.4.0') _
buildJavaProject(
buildInfo: getBuildInfo(),
integrationTestsEnvVars: [],
Expand Down
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ To run properly, the _iExec Core Scheduler_ requires:
* A _MongoDB_ instance to persist its data.
* An _iExec Blockchain Adapter_ for several blockchain network interactions.
* An _iExec Result Proxy_ to check if tasks results have been published.
* An _iExec Secret Management Service_ (_iExec SMS_) for secret and enclave sessions management of TEE tasks.
* An _iExec Platform Registry_ to retrieve locations of _iExec SMS_ services.
* One or many _iExec Secret Management Service_ instances (referenced by the _iExec Platform Registry_) to handle secrets and enclave sessions of TEE tasks.

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

Expand All @@ -23,17 +24,16 @@ You can configure the _iExec Core Scheduler_ with the following properties:
| `IEXEC_CORE_PORT` | Server port of the _iExec Core Scheduler_. | Positive integer | `13000` |
| `MONGO_HOST` | _MongoDB_ server host. Cannot be set with URI. | String | `localhost` |
| `MONGO_PORT` | _MongoDB_ server port. Cannot be set with URI. | Positive integer | `13002` |
| `IEXEC_PLATFORM_REGISTRY` | _iExec Platform Registry_ server URL. | URL | |
| `IEXEC_PLATFORM_REGISTRY_STACK` | [optional] Use a specific stack configuration exposed by the _iExec Platform Registry_. | String | |
| `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 | |
| `REVEAL_TIMEOUT_PERIOD` | Detector period to track reveal timeouts for tasks. | Positive integer | `120000` |
| `IEXEC_ASK_REPLICATE_PERIOD` | Worker configuration, interval in milliseconds between 2 replicate requests. | Positive integer | `5000` |
| `IEXEC_CORE_REQUIRED_WORKER_VERSION` | Empty value will allow any worker version. | String | |
| `IEXEC_WORKERS_WHITELIST` | List of worker addresses allowed to connect to the _iExec Core Scheduler_. | String | |
| `IEXEC_CORE_WALLET_PATH` | Path to the wallet of the server. | String | `./src/main/resources/wallet/encrypted-wallet_scheduler.json` |
| `IEXEC_CORE_WALLET_PASSWORD` | Password to unlock the wallet of the server. | String | `whatever` |
| `IEXEC_CHAIN_ID` | Chain ID of the blockchain network to connect. | Positive integer | `17` |
| `IEXEC_IS_SIDECHAIN` | Define if iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `false` |
| `IEXEC_PRIVATE_CHAIN_ADDRESS` | Private URL to connect to the blockchain node. | URL | `http://localhost:8545` |
| `IEXEC_PUBLIC_CHAIN_ADDRESS` | [unused] Public URL to connect to the blockchain node. | URL | `http://localhost:8545` |
| `IEXEC_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | String | `0xBF6B2B07e47326B7c8bfCb4A5460bef9f0Fd2002` |
| `POOL_ADDRESS` | On-chain address of the workerpool managed by the current _iExec Core Scheduler_. | String | `0x365E7BABAa85eC61Dffe5b520763062e6C29dA27` |
| `IEXEC_START_BLOCK_NUMBER` | Subscribe to new deal events from a specific block number. | Positive integer | `0` |
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` |
Expand All @@ -46,11 +46,6 @@ You can configure the _iExec Core Scheduler_ with the following properties:
| `IEXEC_RESULT_REPOSITORY_PROTOCOL` | _iExec Result Proxy_ server communication protocol. | String | `http` |
| `IEXEC_RESULT_REPOSITORY_HOST` | _iExec Result Proxy_ server host. | String | `localhost` |
| `IEXEC_RESULT_REPOSITORY_PORT` | _iExec Result Proxy_ server port. | Positive integer | `13200` |
| `IEXEC_IPFS_HOST` | [unused] _IPFS_ node host. | String | `127.0.0.1` |
| `IEXEC_IPFS_PORT` | [unused] _IPFS_ node port. | Positive integer | `5001` |
| `IEXEC_SMS_PROTOCOL` | _iExec SMS_ server communication protocol. | String | `http` |
| `IEXEC_SMS_HOST` | _iExec SMS_ server host. | String | `localhost` |
| `IEXEC_SMS_PORT` | _iExec SMS_ server port. | Positive integer | `13300` |
| `IEXEC_CORE_MANAGEMENT_ACTUATORS` | Endpoint IDs that should be included or `*` for all. | String | `health, info` |
| `IEXEC_CORE_GRAYLOG_HOST` | _Graylog_ server host. | String | `localhost` |
| `IEXEC_CORE_GRAYLOG_PORT` | _Graylog_ server port. | Positive integer | `12201` |
Expand Down
51 changes: 31 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
plugins {
id 'java'
id 'eclipse'
id 'io.freefair.lombok' version '6.6.1'
id 'org.springframework.boot' version '2.6.14'
id 'io.spring.dependency-management' version '1.1.0'
id 'jacoco'
id 'org.sonarqube' version '3.3'
id 'maven-publish'
id "org.springframework.boot" version "2.6.2"
id "io.spring.dependency-management" version "1.0.11.RELEASE"
}

group = 'com.iexec.core'
sourceCompatibility = 11
targetCompatibility = 11

ext {
springCloudVersion = '2021.0.0'
springCloudVersion = '2021.0.5'
jjwtVersion = '0.11.5'
mongockVersion = '4.2.7.BETA'
}

Expand All @@ -38,7 +37,6 @@ repositories {
maven {
url "https://nexus.intra.iex.ec/repository/maven-public/"
}

maven { url "https://jitpack.io" }
}

Expand All @@ -64,23 +62,27 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-data-mongodb"
implementation "org.springframework.boot:spring-boot-starter-hateoas"
implementation "org.springframework.boot:spring-boot-starter-security"
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation "org.springframework.boot:spring-boot-starter-web"
implementation "org.springframework.boot:spring-boot-starter-websocket"
implementation "org.springframework.cloud:spring-cloud-starter-openfeign"
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation "org.springframework.retry:spring-retry"

// apache commons.lang3
implementation 'org.apache.commons:commons-lang3'

// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
// Spring Boot dependencies BOM enforces okhttp3 3.14.9 in 2.6.X
// It is required to define the dependency version required by web3j until migration to at least Spring Boot 2.7.X
implementation 'com.squareup.okhttp3:okhttp:4.9.0' // Web3j issue: https://github.com/web3j/web3j/issues/1180

testImplementation "org.springframework.boot:spring-boot-starter-test"

// Spring Doc
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'

// jason web token
implementation "io.jsonwebtoken:jjwt:0.7.0"
implementation "io.jsonwebtoken:jjwt-api:$jjwtVersion"
runtimeOnly "io.jsonwebtoken:jjwt-impl:$jjwtVersion"
runtimeOnly "io.jsonwebtoken:jjwt-jackson:$jjwtVersion"

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

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

// lombok
compileOnly "org.projectlombok:lombok:1.18.2"
annotationProcessor "org.projectlombok:lombok:1.18.2"
testCompileOnly "org.projectlombok:lombok:1.18.2"
testAnnotationProcessor "org.projectlombok:lombok:1.18.2"

// mongock
implementation "com.github.cloudyrock.mongock:mongock-spring-v5:${mongockVersion}"
implementation "com.github.cloudyrock.mongock:mongodb-springdata-v2-driver:${mongockVersion}"

testImplementation 'org.springframework.boot:spring-boot-starter-test'

// awaitility
testImplementation 'org.awaitility:awaitility:4.0.1'
testImplementation 'org.awaitility:awaitility'

// mongo
testImplementation 'org.testcontainers:testcontainers:1.16.2'
testImplementation 'org.testcontainers:junit-jupiter:1.16.2'
testImplementation 'org.testcontainers:mongodb:1.16.2'
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}

jar {
enabled = true
archiveClassifier.set('library')
Expand All @@ -121,6 +125,13 @@ springBoot {
buildInfo()
}

tasks.named("bootJar") {
manifest {
attributes("Implementation-Title": "iExec Core Scheduler",
"Implementation-Version": project.version)
}
}

test {
useJUnitPlatform()
}
Expand All @@ -136,7 +147,7 @@ jacoco {
// sonarqube code coverage requires jacoco XML report
jacocoTestReport {
reports {
xml.enabled true
xml.required = true
}
}
tasks.test.finalizedBy tasks.jacocoTestReport
Expand All @@ -145,7 +156,7 @@ tasks.sonarqube.dependsOn tasks.jacocoTestReport
publishing {
publications {
maven(MavenPublication) {
artifact bootJar
artifact tasks.named("bootJar")
from components.java
}
}
Expand Down
10 changes: 5 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version=7.3.1
iexecCommonVersion=6.2.0
iexecBlockchainAdapterVersion=7.3.0
iexecResultVersion=7.3.0
iexecSmsVersion=7.3.0
version=8.0.0
iexecCommonVersion=7.0.0
iexecBlockchainAdapterVersion=8.0.0
iexecResultVersion=8.0.0
iexecSmsVersion=8.0.0

nexusUser
nexusPassword
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit cb45b21

Please sign in to comment.