Skip to content

Commit babf50b

Browse files
authored
Merge pull request #90 from iExecBlockchainComputing/release/8.1.0
Release/8.1.0
2 parents e003b14 + 04fcc2a commit babf50b

File tree

15 files changed

+210
-45
lines changed

15 files changed

+210
-45
lines changed

CHANGELOG.md

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

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

5+
## [[8.1.0]](https://github.com/iExecBlockchainComputing/iexec-result-proxy/releases/tag/v8.1.0) 2023-06-07
6+
7+
### New Features
8+
- Enable Prometheus actuator. (#84)
9+
### Bug Fixes
10+
- Fix link in changelog. (#83)
11+
- `ChainConfig` instances are immutable. (#89)
12+
### Dependency Upgrades
13+
- Upgrade to `expiringmap` 0.5.10. (#84)
14+
- Upgrade to `iexec-common` 8.2.0. (#85 #87 #88)
15+
- Upgrade to `iexec-commons-poco` 3.0.2. (#85 #87 #88)
16+
517
## [[8.0.0]](https://github.com/iExecBlockchainComputing/iexec-result-proxy/releases/tag/v8.0.0) 2023-03-03
618

719
### New Features

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ You can configure the iExec Result Proxy with the following properties:
2020
| `IEXEC_RESULT_PROXY_PORT` | Server HTTP port of the result proxy. | Positive integer | `13200` |
2121
| `MONGO_HOST` | Mongo server host. Cannot be set with URI. | String | `localhost` |
2222
| `MONGO_PORT` | Mongo server port. Cannot be set with URI. | Positive integer | `13202` |
23-
| `IEXEC_CHAIN_ID` | Chain ID of the blockchain network to connect. | `Integer | `17` |
24-
| `IEXEC_IS_SIDECHAIN` | Define if iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `false` |
25-
| `IEXEC_PRIVATE_CHAIN_ADDRESS` | Private URL to connect to the blockchain node. | URL | `http://localhost:8545` |
26-
| `IEXEC_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | Ethereum address | `0xBF6B2B07e47326B7c8bfCb4A5460bef9f0Fd2002` |
23+
| `IEXEC_CHAIN_ID` | Chain ID of the blockchain network to connect. | `Integer | `134` |
24+
| `IEXEC_IS_SIDECHAIN` | Define whether iExec on-chain protocol is built on top of token (`false`) or native currency (`true`). | Boolean | `true` |
25+
| `IEXEC_PRIVATE_CHAIN_ADDRESS` | Private URL to connect to the blockchain node. | URL | `https://bellecour.iex.ec` |
26+
| `IEXEC_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | Ethereum address | `0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f` |
27+
| `IEXEC_BLOCK_TIME` | Duration between consecutive blocks on the blockchain network. | String | `PT5S` |
2728
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER`. | Float | `1.0` |
2829
| `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER > gasPriceCap`. | Integer | `22000000000` |
2930
| `IEXEC_IPFS_HOST` | Host to connect to the IPFS node. | String | `127.0.0.1` |
@@ -34,3 +35,7 @@ You can configure the iExec Result Proxy with the following properties:
3435
A health endpoint (`/actuator/health`) is enabled by default and can be accessed on the **IEXEC_RESULT_PROXY_PORT**.
3536
This endpoint allows to define health checks in an orchestrator or a [compose file](https://github.com/compose-spec/compose-spec/blob/master/spec.md#healthcheck).
3637
No default strategy has been implemented in the [Dockerfile](Dockerfile) at the moment.
38+
39+
## License
40+
41+
This repository code is released under the [Apache License 2.0](LICENSE).

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ allprojects {
4848

4949
dependencies {
5050
// iexec
51-
implementation "com.iexec.common:iexec-common:${iexecCommonVersion}"
51+
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
52+
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
5253

5354
// Web3j issues, see core build.gradle
5455
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
@@ -63,6 +64,9 @@ dependencies {
6364
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
6465
implementation "org.springframework.retry:spring-retry"
6566

67+
// observability
68+
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
69+
6670
// test
6771
testImplementation('org.springframework.boot:spring-boot-starter-test') {
6872
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
@@ -82,7 +86,7 @@ dependencies {
8286
runtimeOnly "io.jsonwebtoken:jjwt-jackson:$jjwtVersion"
8387

8488
// expiring map
85-
implementation 'net.jodah:expiringmap:0.5.8'
89+
implementation 'net.jodah:expiringmap:0.5.10'
8690
}
8791

8892
dependencyManagement {

gradle.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
version=8.0.0
2-
iexecCommonVersion=7.0.0
1+
version=8.1.0
2+
iexecCommonVersion=8.2.0
3+
iexecCommonsPocoVersion=3.0.2
34

45
nexusUser
56
nexusPassword

iexec-result-proxy-library/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ plugins {
66
}
77

88
dependencies {
9+
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
910
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
1011
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
1112
}

iexec-result-proxy-library/src/main/java/com/iexec/resultproxy/api/ResultProxyClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
package com.iexec.resultproxy.api;
1818

19-
import com.iexec.common.chain.eip712.entity.EIP712Challenge;
2019
import com.iexec.common.result.ResultModel;
20+
import com.iexec.commons.poco.eip712.entity.EIP712Challenge;
2121
import feign.Headers;
2222
import feign.Param;
2323
import feign.RequestLine;
Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,37 @@
1+
/*
2+
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.iexec.resultproxy.chain;
218

3-
import lombok.Data;
19+
import lombok.Value;
420
import org.springframework.boot.context.properties.ConfigurationProperties;
521
import org.springframework.boot.context.properties.ConstructorBinding;
622

7-
@Data
23+
import java.time.Duration;
24+
25+
@Value
826
@ConstructorBinding
927
@ConfigurationProperties(prefix = "chain")
1028
//TODO: validate configuration property names and use the same set of names everywhere (blockchain-adapter-api, sms)
1129
public class ChainConfig {
12-
private final int id;
13-
private final boolean sidechain;
14-
private final String privateAddress;
15-
private final String hubAddress;
16-
private final float gasPriceMultiplier;
17-
private final long gasPriceCap;
30+
int id;
31+
boolean sidechain;
32+
String privateAddress;
33+
String hubAddress;
34+
Duration blockTime;
35+
float gasPriceMultiplier;
36+
long gasPriceCap;
1837
}

src/main/java/com/iexec/resultproxy/chain/IexecHubService.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1+
/*
2+
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.iexec.resultproxy.chain;
218

3-
import com.iexec.common.chain.IexecHubAbstractService;
19+
import com.iexec.commons.poco.chain.IexecHubAbstractService;
420

521
import org.springframework.stereotype.Service;
622

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,36 @@
1-
package com.iexec.resultproxy.chain;
1+
/*
2+
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
216

3-
import com.iexec.common.chain.Web3jAbstractService;
17+
package com.iexec.resultproxy.chain;
418

19+
import com.iexec.commons.poco.chain.Web3jAbstractService;
520
import org.springframework.stereotype.Service;
621

722
@Service
823
public class Web3jService extends Web3jAbstractService {
924

1025
public Web3jService(ChainConfig chainConfig) {
11-
super(chainConfig.getPrivateAddress(), chainConfig.getGasPriceMultiplier(), chainConfig.getGasPriceCap(),
12-
chainConfig.isSidechain());
26+
super(
27+
chainConfig.getId(),
28+
chainConfig.getPrivateAddress(),
29+
chainConfig.getBlockTime(),
30+
chainConfig.getGasPriceMultiplier(),
31+
chainConfig.getGasPriceCap(),
32+
chainConfig.isSidechain()
33+
);
1334
}
1435

15-
}
36+
}

src/main/java/com/iexec/resultproxy/challenge/ChallengeService.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
1+
/*
2+
* Copyright 2020-2023 IEXEC BLOCKCHAIN TECH
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package com.iexec.resultproxy.challenge;
218

3-
import com.iexec.common.chain.eip712.entity.EIP712Challenge;
419
import com.iexec.common.security.SignedChallenge;
5-
import com.iexec.common.utils.BytesUtils;
6-
import com.iexec.common.utils.SignatureUtils;
7-
20+
import com.iexec.commons.poco.eip712.entity.EIP712Challenge;
21+
import com.iexec.commons.poco.utils.BytesUtils;
22+
import com.iexec.commons.poco.utils.SignatureUtils;
23+
import lombok.extern.slf4j.Slf4j;
824
import org.apache.commons.lang3.StringUtils;
925
import org.springframework.stereotype.Service;
1026
import org.web3j.utils.Numeric;
1127

12-
import lombok.extern.slf4j.Slf4j;
13-
14-
15-
@Service
1628
@Slf4j
29+
@Service
1730
public class ChallengeService {
1831

1932
private final EIP712ChallengeService eip712ChallengeService;

0 commit comments

Comments
 (0)