Skip to content

Commit a91071d

Browse files
authored
Merge pull request #89 from iExecBlockchainComputing/bugfix/immutable-chain-config
Bugfix/immutable chain config
2 parents bde9c9f + 0120142 commit a91071d

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ All notable changes to this project will be documented in this file.
88
- Enable Prometheus actuator. (#84)
99
### Bug Fixes
1010
- Fix link in changelog. (#83)
11-
### Quality
11+
- `ChainConfig` instances are immutable. (#89)
1212
### Dependency Upgrades
1313
- Upgrade to `expiringmap` 0.5.10. (#84)
14-
- Upgrade to `iexec-common` 8.1.0-NEXT-SNAPSHOT. (#85 #87)
15-
- Upgrade to `iexec-commons-poco` 2.0.0. (#85 #87)
14+
- Upgrade to `iexec-common` 8.2.0. (#85 #87 #88)
15+
- Upgrade to `iexec-commons-poco` 3.0.2. (#85 #87 #88)
1616

1717
## [[8.0.0]](https://github.com/iExecBlockchainComputing/iexec-result-proxy/releases/tag/v8.0.0) 2023-03-03
1818

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ 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` |
2727
| `IEXEC_BLOCK_TIME` | Duration between consecutive blocks on the blockchain network. | String | `PT5S` |
2828
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER`. | Float | `1.0` |
2929
| `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * IEXEC_GAS_PRICE_MULTIPLIER > gasPriceCap`. | Integer | `22000000000` |
@@ -35,3 +35,7 @@ You can configure the iExec Result Proxy with the following properties:
3535
A health endpoint (`/actuator/health`) is enabled by default and can be accessed on the **IEXEC_RESULT_PROXY_PORT**.
3636
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).
3737
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).

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@
1616

1717
package com.iexec.resultproxy.chain;
1818

19-
import lombok.Data;
19+
import lombok.Value;
2020
import org.springframework.boot.context.properties.ConfigurationProperties;
2121
import org.springframework.boot.context.properties.ConstructorBinding;
2222

2323
import java.time.Duration;
2424

25-
@Data
25+
@Value
2626
@ConstructorBinding
2727
@ConfigurationProperties(prefix = "chain")
2828
//TODO: validate configuration property names and use the same set of names everywhere (blockchain-adapter-api, sms)
2929
public class ChainConfig {
30-
private final int id;
31-
private final boolean sidechain;
32-
private final String privateAddress;
33-
private final String hubAddress;
34-
private final Duration blockTime;
35-
private final float gasPriceMultiplier;
36-
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;
3737
}

0 commit comments

Comments
 (0)