Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ You can configure the _iExec Core Scheduler_ with the following properties:
| `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_BLOCKCHAIN_NODE_ADDRESS` | Private URL to connect to the blockchain node. | URL | `http://localhost:8545` |
| `POOL_ADDRESS` | On-chain address of the workerpool managed by the current _iExec Core Scheduler_. | String | `0x365E7BABAa85eC61Dffe5b520763062e6C29dA27` |
| `IEXEC_BLOCKCHAIN_NODE_ADDRESS` | URL to connect to the blockchain node. | URL | `https://sepolia-rollup.arbitrum.io/rpc` |
| `POOL_ADDRESS` | On-chain address of the workerpool managed by the current _iExec Core Scheduler_. | String | `0xB2157BF2fAb286b2A4170E3491Ac39770111Da3E` |
| `CHAIN_OUTOFSERVICETHRESHOLD` | Threshold in seconds, the scheduler is OUT-OF-SERVICE when the last known block timestamp is older. | String | `PT5S` |
| `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` |
| `IEXEC_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.1` |
| `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap` | Integer | `22000000000` |
| `IEXEC_CORE_CHAIN_ADAPTER_URL` | _iExec Blockchain Adapter_ communication url. | String | `http://localhost:13010`|
| `IEXEC_CORE_CHAIN_ADAPTER_USERNAME` | Username to connect to the _iExec Blockchain Adapter_ server. | String | `admin` |
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring:
auto-index-creation: true # Auto-index creation is disabled by default starting with Spring Data MongoDB 3.x.
config.import: "optional:configserver:${IEXEC_PLATFORM_REGISTRY:http://localhost:8888}" # configserver:http://platform-registry:8888
cloud.config:
profile: ${IEXEC_PLATFORM_REGISTRY_STACK:} # mainnet, bellecour3, 1234, ..
profile: ${IEXEC_PLATFORM_REGISTRY_STACK:} # blockchain network chain id
label: ${IEXEC_PLATFORM_REGISTRY_LABEL:} # main, develop, v10, 07998be
mongock:
runner-type: InitializingBean
Expand Down Expand Up @@ -52,11 +52,11 @@ wallet:

chain:
max-logs-batch-size: 1000
node-address: ${IEXEC_BLOCKCHAIN_NODE_ADDRESS:http://localhost:8545}
node-address: ${IEXEC_BLOCKCHAIN_NODE_ADDRESS:https://sepolia-rollup.arbitrum.io/rpc}
out-of-service-threshold: PT15S
pool-address: ${POOL_ADDRESS:0x365E7BABAa85eC61Dffe5b520763062e6C29dA27}
pool-address: ${POOL_ADDRESS}
start-block-number: ${IEXEC_START_BLOCK_NUMBER:0}
gas-price-multiplier: ${IEXEC_GAS_PRICE_MULTIPLIER:1.0} # txs will be sent with networkGasPrice*gasPriceMultiplier, 4.0 means super fast
gas-price-multiplier: ${IEXEC_GAS_PRICE_MULTIPLIER:1.1} # txs will be sent with networkGasPrice*gasPriceMultiplier, 4.0 means super fast
gas-price-cap: ${IEXEC_GAS_PRICE_CAP:22000000000} #in Wei, will be used for txs if networkGasPrice*gasPriceMultiplier > gasPriceCap

blockchain-adapter:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 IEXEC BLOCKCHAIN TECH
* Copyright 2025-2026 IEXEC BLOCKCHAIN TECH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -60,6 +60,7 @@ static void registerProperties(DynamicPropertyRegistry registry) {
environment.getServiceHost(CHAIN_SVC_NAME, CHAIN_SVC_PORT),
environment.getServicePort(CHAIN_SVC_NAME, CHAIN_SVC_PORT))
);
registry.add("chain.pool-address", () -> "0x01519568F2e0d235E511d36709975606D35d2E8d");
registry.add("config-server.url", () -> getServiceUrl(
environment.getServiceHost(CONFIG_SVC_NAME, CONFIG_SVC_PORT),
environment.getServicePort(CONFIG_SVC_NAME, CONFIG_SVC_PORT))
Expand Down
21 changes: 11 additions & 10 deletions src/test/java/com/iexec/core/chain/ChainConfigTests.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2025 IEXEC BLOCKCHAIN TECH
* Copyright 2025-2026 IEXEC BLOCKCHAIN TECH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,8 +29,9 @@
import static org.assertj.core.api.Assertions.assertThat;

class ChainConfigTests {
private static final String IEXEC_NODE_ADDRESS = "https://bellecour.iex.ec";
private static final String IEXEC_HUB_ADDRESS = "0x1a69b2eb604db8eba185df03ea4f5288dcbbd248";
private static final int CHAIN_ID = 421614;
private static final String IEXEC_NODE_ADDRESS = "https://sepolia-rollup.arbitrum.io/rpc";
private static final String IEXEC_HUB_ADDRESS = "0xB2157BF2fAb286b2A4170E3491Ac39770111Da3E";
private static final String POOL_ADDRESS = "poolAddress";

private Validator validator;
Expand Down Expand Up @@ -65,7 +66,7 @@ void chainIdMustBePositive() {
@Test
void nodeAddressMustBeValidURL() {
final ChainConfig config = new ChainConfig(
1,
CHAIN_ID,
false,
IEXEC_HUB_ADDRESS,
Duration.ofMillis(100),
Expand All @@ -85,7 +86,7 @@ void nodeAddressMustBeValidURL() {
@Test
void nodeAddressMustNotBeEmpty() {
final ChainConfig config = new ChainConfig(
1,
CHAIN_ID,
false,
IEXEC_HUB_ADDRESS,
Duration.ofMillis(100),
Expand All @@ -105,7 +106,7 @@ void nodeAddressMustNotBeEmpty() {
@Test
void blockTimeMustBeAtLeast100ms() {
final ChainConfig config = new ChainConfig(
1,
CHAIN_ID,
false,
IEXEC_HUB_ADDRESS,
Duration.ofMillis(99), // less than 100ms
Expand All @@ -125,7 +126,7 @@ void blockTimeMustBeAtLeast100ms() {
@Test
void blockTimeMustBeAtMost20Seconds() {
final ChainConfig config = new ChainConfig(
1,
CHAIN_ID,
false,
IEXEC_HUB_ADDRESS,
Duration.ofSeconds(21), // more than 20 seconds
Expand All @@ -145,7 +146,7 @@ void blockTimeMustBeAtMost20Seconds() {
@Test
void gasPriceMultiplierMustBePositive() {
final ChainConfig config = new ChainConfig(
1,
CHAIN_ID,
false,
IEXEC_HUB_ADDRESS,
Duration.ofMillis(100),
Expand All @@ -165,7 +166,7 @@ void gasPriceMultiplierMustBePositive() {
@Test
void gasPriceCapMustBePositiveOrZero() {
final ChainConfig config = new ChainConfig(
1,
CHAIN_ID,
false,
IEXEC_HUB_ADDRESS,
Duration.ofMillis(100),
Expand All @@ -185,7 +186,7 @@ void gasPriceCapMustBePositiveOrZero() {
@Test
void hubAddressMustBeValidEthereumAddress() {
final ChainConfig config = new ChainConfig(
1,
CHAIN_ID,
false,
"0x0", // invalid address
Duration.ofMillis(100),
Expand Down