Skip to content

Commit 8e4a1ce

Browse files
Merge pull request #77 from iExecBlockchainComputing/release/8.0.0
Release/8.0.0
2 parents 886cbb4 + 852274d commit 8e4a1ce

36 files changed

+1307
-306
lines changed

CHANGELOG.md

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

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

5+
## [[8.0.0]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v8.0.0) 2023-03-03
6+
7+
### New Features
8+
* Expose a `BrokerClient` in library.
9+
* Add iExec banner at startup.
10+
* Show application version on banner.
11+
### Quality
12+
* Improve code quality.
13+
* Use new TEE classes in tests.
14+
### Dependency Upgrades
15+
* Replace the deprecated `openjdk` Docker base image with `eclipse-temurin` and upgrade to Java 11.0.18 patch.
16+
* Upgrade to Spring Boot 2.6.14.
17+
* Upgrade to Gradle 7.6.
18+
* Upgrade OkHttp to 4.9.0.
19+
* Upgrade to `iexec-common` 7.0.0.
20+
* Upgrade to `jenkins-library` 2.4.0.
21+
522
## [[7.3.0]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v7.3.0) 2023-01-18
623

724
* Add endpoint to allow health checks.

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: ['BROKER_PRIVATE_KEY'],

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ To run properly, the iExec Blockchain Adapter API requires:
2020

2121
| Environment variable | Description | Type | Default value |
2222
| --- | --- | --- | --- |
23-
| IEXEC_BLOCKCHAIN_ADAPTER_API_PORT | Server HTTP port of the Blockchain Adapter API. | Positive integer | `13010` |
24-
| IEXEC_BLOCKCHAIN_ADAPTER_API_USERNAME | Login username of the server. | String | `admin` |
25-
| IEXEC_BLOCKCHAIN_ADAPTER_API_PASSWORD | Login password of the server. | String | `whatever` |
26-
| IEXEC_BLOCKCHAIN_ADAPTER_API_MONGO_HOST | Mongo server host. Cannot be set with URI. | String | `localhost` |
27-
| IEXEC_BLOCKCHAIN_ADAPTER_API_MONGO_PORT | Mongo server port. Cannot be set with URI. | Positive integer | `13012` |
28-
| IEXEC_BLOCKCHAIN_ADAPTER_API_CHAIN_ID | Chain ID of the blockchain network to connect. | Positive integer | `65535` |
29-
| IEXEC_BLOCKCHAIN_ADAPTER_API_NODE_ADDRESS | URL to connect to the blockchain network. | URL | `http://localhost:8545` |
30-
| IEXEC_BLOCKCHAIN_ADAPTER_API_BLOCK_TIME | In seconds, parameter of the targeted blockchain. | Positive integer | `1` |
31-
| IEXEC_BLOCKCHAIN_ADAPTER_API_HUB_ADDRESS | Proxy contract address to interact with the iExec on-chain protocol. | Ethereum Address | `0xBF6B2B07e47326B7c8bfCb4A5460bef9f0Fd2002` |
32-
| IEXEC_BLOCKCHAIN_ADAPTER_API_IS_SIDECHAIN | Define if iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `false` |
33-
| IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_MULTIPLIER | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` |
34-
| IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_CAP | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap`. | Positive integer | `22000000000` |
35-
| IEXEC_BLOCKCHAIN_ADAPTER_API_BROKER_URL | URL of the broker to interact with when matching iExec orders. | URL | `http://localhost:3000` |
36-
| IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PATH | Path to the wallet of the server. | String | `src/main/resources/wallet.json` |
37-
| IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PASSWORD | Password to unlock the wallet of the server. | String | `whatever` |
23+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_PORT` | Server HTTP port of the Blockchain Adapter API. | Positive integer | `13010` |
24+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_USERNAME` | Login username of the server. | String | `admin` |
25+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_PASSWORD` | Login password of the server. | String | `whatever` |
26+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_MONGO_HOST` | Mongo server host. Cannot be set with URI. | String | `localhost` |
27+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_MONGO_PORT` | Mongo server port. Cannot be set with URI. | Positive integer | `13012` |
28+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_CHAIN_ID` | Chain ID of the blockchain network to connect. | Positive integer | `65535` |
29+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_NODE_ADDRESS` | URL to connect to the blockchain network. | URL | `http://localhost:8545` |
30+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_BLOCK_TIME` | In seconds, parameter of the targeted blockchain. | Positive integer | `1` |
31+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | Ethereum Address | `0xBF6B2B07e47326B7c8bfCb4A5460bef9f0Fd2002` |
32+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_IS_SIDECHAIN` | Define if iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `false` |
33+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` |
34+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap`. | Positive integer | `22000000000` |
35+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_BROKER_URL` | URL of the broker to interact with when matching iExec orders. | URL | `http://localhost:3000` |
36+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PATH` | Path to the wallet of the server. | String | `src/main/resources/wallet.json` |
37+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PASSWORD` | Password to unlock the wallet of the server. | String | `whatever` |
3838

3939
## Health checks
4040

build.gradle

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
plugins {
22
id 'java'
3-
id 'org.springframework.boot' version '2.6.2'
4-
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
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'
56
id 'jacoco'
67
id 'org.sonarqube' version '3.3'
78
id 'maven-publish'
89
}
910

1011
ext {
11-
openFeignVersion = '11.6'
12+
openFeignVersion = '11.7'
1213
}
1314

1415
if (!project.hasProperty('gitBranch')) {
@@ -17,8 +18,6 @@ if (!project.hasProperty('gitBranch')) {
1718

1819
allprojects {
1920
group = 'com.iexec.blockchain'
20-
sourceCompatibility = 11
21-
targetCompatibility = 11
2221
if (gitBranch != 'main' && gitBranch != 'master' && !(gitBranch ==~ '(release|hotfix|support)/.*')) {
2322
version += '-NEXT-SNAPSHOT'
2423
}
@@ -40,6 +39,11 @@ allprojects {
4039
url "https://jitpack.io"
4140
}
4241
}
42+
java {
43+
toolchain {
44+
languageVersion.set(JavaLanguageVersion.of(11))
45+
}
46+
}
4347
}
4448

4549
configurations {
@@ -49,9 +53,6 @@ configurations {
4953
}
5054

5155
dependencies {
52-
compileOnly 'org.projectlombok:lombok'
53-
annotationProcessor 'org.projectlombok:lombok'
54-
5556
// Spring Doc
5657
implementation 'org.springdoc:springdoc-openapi-ui:1.6.3'
5758

@@ -66,9 +67,9 @@ dependencies {
6667

6768
// web3j bug required
6869
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
69-
implementation 'com.squareup.okhttp3:okhttp:4.3.1' // Web3j issue: https://github.com/web3j/web3j/issues/1180
70-
// NoSuchMethodError: 'byte[] kotlin.collections.ArraysKt.copyInto(byte[], byte[], int, int, int)'
71-
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.50' // https://stackoverflow.com/a/57907899
70+
// Spring Boot dependencies BOM enforces okhttp3 3.14.9 in 2.6.X
71+
// It is required to define the dependency version required by web3j until migration to at least Spring Boot 2.7.X
72+
implementation 'com.squareup.okhttp3:okhttp:4.9.0' // Web3j issue: https://github.com/web3j/web3j/issues/1180
7273

7374
// feign
7475
implementation "io.github.openfeign:feign-core:$openFeignVersion"
@@ -86,6 +87,13 @@ springBoot {
8687
buildInfo()
8788
}
8889

90+
tasks.named("bootJar") {
91+
manifest {
92+
attributes("Implementation-Title": "iExec Blockchain Adapter API",
93+
"Implementation-Version": project.version)
94+
}
95+
}
96+
8997
sourceSets {
9098
integrationTest {
9199
java {
@@ -125,7 +133,7 @@ jar {
125133
publishing {
126134
publications {
127135
maven(MavenPublication) {
128-
artifact bootJar
136+
artifact tasks.named("bootJar")
129137
from components.java
130138
}
131139
}
@@ -150,7 +158,7 @@ jacoco {
150158
// sonarqube code coverage requires jacoco XML report
151159
jacocoTestReport {
152160
reports {
153-
xml.enabled true
161+
xml.required = true
154162
}
155163
}
156164
tasks.test.finalizedBy tasks.jacocoTestReport

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build app container
2-
FROM openjdk:11.0.15-jre-slim
2+
FROM eclipse-temurin:11.0.18_10-jre
33

44
ARG jar
55

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
version=7.3.0
2-
iexecCommonVersion=6.0.0
1+
version=8.0.0
2+
iexecCommonVersion=7.0.0
33

44
nexusUser
55
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)