Skip to content

Commit

Permalink
Hotfix/7.1.2 - Readme & Changelog
Browse files Browse the repository at this point in the history
Hotfix/7.1.2 - Readme & Changelog
  • Loading branch information
jeremyjams authored Dec 7, 2022
2 parents b3454cd + 885f9dd commit 8af0134
Show file tree
Hide file tree
Showing 3 changed files with 295 additions and 33 deletions.
237 changes: 237 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
# Changelog

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

## [[7.1.2]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v7.1.2) 2022-11-29

* Update README and add CHANGELOG.

## [[7.1.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v7.1.1) 2022-11-28

* Fix build process.

## [[7.1.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v7.1.0) 2022-08-11

* Retrieve a task execution status. Logs can only be retrieved by the person who requested the execution.
* Use OpenFeign client libraries.
* Fix concurrency issues.
* Use Spring Boot 2.6.2.
* Use Java 11.0.15.

## [[7.0.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v7.0.1) 2022-01-05

* Reduce probability of giving tasks whose consensus is already reached to additional workers.
* Remove useless logs.
* Handle task supply and task update management based on their level of priority.
* Upgrade automated build system.

## [[7.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/7.0.0) 2021-12-17

Highly improved throughput of the iExec protocol.

What has changed since v6.0.0?
* Fix task status deadlock. Chances to reach RUNNING task status for given states of replicates are now increased.
* Fix race condition on replicate attribution.
* Upgrade Jacoco/Sonarqube reporting and plugins.
* Consume blockchain configuration on iexec-blockchain-adapter-api & expose its URL for iexec-worker
* Upgrade artifacts publishing
* Enable local import of iexec-common
* Upgrade to Gradle 6.8.3
* Upgrade to JUnit5
* Fix concurrent upload requests.
* Merge abort notifications into a single notification with custom abort cause.
* Send transactions over a dedicated blockchain adapter micro-service.
* Reply gracefully to the worker when a status is already reported.
* Abort a TEE task when all alive workers did fail to run it.
* Move task state machine to a dedicated service.
* Remove useless internal task statuses belonging to the result upload request stage.
* Fix Recovering for the Retryable updateReplicateStatus(..) method.
* Add checks before locally upgrading to the INITIALIZED status
* Remove 2-blocks waiting time before supplying a new replicate
* Fix OptimisticLockingFailureException happening when 2 detectors detect the same change at the same time, leading to race updates on a same task
* Reuse socket when sending multiple requests to a blockchain node.
* Replay fromBlockNumber now lives in a dedicated configuration:
A configuration document did store two different states. Updates on different states at the same time might lead to race conditions when saving to database. Now each state has its own document to avoid race conditions when saving.
* Fix TaskRepositoy.findByChainDealIdAndTaskIndex() to return unique result.

## [[6.4.2]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.4.2) 2021-12-14

* Fix task status deadlock. Chances to reach RUNNING task status for given states of replicates are now increased.

## [[6.4.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.4.1) 2021-11-30

* Fix race condition on replicate attribution.
* Upgrade Jacoco/Sonarqube reporting and plugins.

## [[6.4.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.4.0) 2021-11-25

* Consume blockchain configuration on iexec-blockchain-adapter-api & expose its URL for iexec-worker.
* Upgrade artifacts publishing.
* Enable local import of iexec-common.
* Upgrade to Gradle 6.8.3.
* Upgrade to JUnit5.

## [[6.3.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.3.0) 2021-11-16

* Fix concurrent upload requests.
* Merge abort notifications into a single notification with custom abort cause.

## [[6.2.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.2.0) 2021-11-05

* Send transactions over a dedicated blockchain adapter micro-service.
* Reply gracefully to the worker when a status is already reported.
* Abort a TEE task when all alive workers did fail to run it.
* Moved task state machine to a dedicated service.
* Removed useless internal task statuses belonging to the result upload request stage.

## [[6.1.6]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.1.6) 2021-10-21

* Fixed Recovering for the Retryable updateReplicateStatus(..) method.

## [[6.1.5]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.1.5) 2021-10-21

* Added checks before locally upgrading to the INITIALIZED status.
* Removed 2-blocks waiting time before supplying a new replicate.

## [[6.1.4]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.1.4) 2021-10-14

* Fixed OptimisticLockingFailureException happening when 2 detectors detect the same change at the same time, leading to race updates on a same task.

## [[6.1.3]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.1.3) 2021-10-05

* Bump iexec-common dependency (iexec-common@5.5.1) featuring socket reuse when sending multiple requests to a blockchain node.

## [[6.1.2]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.1.2) 2021-10-01

Bugfix - Replay fromBlockNumber now lives in a dedicated configuration:
* A configuration document did store two different states. Updates on different states at the same time might lead to race conditions when saving to database. Now each state has its own document to avoid race conditions when saving.

## [[6.0.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/6.0.1) 2021-09-28

* Fix : TaskRepositoy.findByChainDealIdAndTaskIndex() returns non-unique result

## [[6.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/v6.0.0) 2021-07-29

What's new?
* Added Prometheus actuators
* Moved TEE workflow configuration to dedicated service

## [[5.1.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/5.1.1) 2021-04-12

What is patched?
* Updated management port and actuator endpoints.

## [[5.1.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/5.1.0) 2021-03-26

What's new?

Fix WebSockets problem:
* Enhance different task stages detection. When detecting unnotified contribute/reveal,
we use the initialization block instead of the current block to lookup for the contribute/reveal metadata.
* Use a dedicated TaskScheduler for STOMP WebSocket heartbeats.
* Use a dedicated TaskScheduler for @Scheduled tasks.
* Use a dedicated TaskExecutor for @Async tasks.
* TaskService is now the entry point to update tasks.
* feature/task-replay.

Also:
* Use the deal block as a landmark for a task.
* Keep the computing task list consistent.
* Worker should be instructed to contribute whenever it is possible (e.g. app/data download failure).
* Enhance worker lost detection.
* Enhance final deadline detection for tasks.

## [[5.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/5.0.0) 2020-07-22

What's new?
* Dapp developers can browse worker computing logs over iexec-core API.
* Task result link is standardized and generic. It supports Ethereum, IPFS & Dropbox "storage" providers.
* Result storage feature is moved to new [iExec Result Proxy](https://github.com/iExecBlockchainComputing/iexec-result-proxy).
* Full compatibility with new [iExec Secret Management Service](https://github.com/iExecBlockchainComputing/iexec-sms).
* Compatibility with latest PoCo 5.1.0 smart contracts.

## [[4.0.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/4.0.1) 2020-02-25

What's fixed?
* More resistance to unsync Ethereum nodes.

## [[4.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/4.0.0) 2019-12-13

What's new?
* Native-token sidechain compatibility.
* GPU workers support.
* Log aggregation.

What's fixed?
* Database indexes.
* JWT/challenge validity duration.
* Worker freed after contribution timeout.

## [[3.2.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/3.2.0) 2019-09-17

What is new?
* Bag Of Tasks (BoT): Bag Of Tasks Deals can now be processed by the middleware.
* Use of iexec input files: Sometimes external resources are needed to run a computation without using a dataset, that is what input files are for.
* Whitelisting: Now the core can define a whitelist of workers that are allowed to connect to the pool.
* Https: Workers can connect to the core using https.

What is patched?
* The project has been updated to java 11 and web3j 4.3.0.
* Internal refactoring to handle replicates update better.
* Limit workers that ask for replicates too often.
* Update workers configuration when they disconnect/reconnect.

## [[3.1.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/3.1.0) 2019-07-11

What's new?
* Full end-to-end encryption inside a Trusted Execution Environment (TEE) powered by Intel(R) SGX.
* Implemented the Proof-of-Contribution (PoCo) Sarmenta's formula for a greater task dispatching.

What's patched?
* Reopen task worflow is back.
* A single FAILED replicate status when a completion is impossible.
* WORKER_LOST is not set for replicates which are already FAILED.
* Restart when ethereum node is not available at start-up.

## [[3.0.1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/3.0.1) 2019-05-22

This release is a patch to fix an issue following the release of version 3.0.0.

When asking for a replicate, a worker sends the latest available block number from the node it is is connected to.
If that node is a little bit behind the node the core is connected to, the worker will have a disadvantage compare to workers connected to more up-to-date nodes.
To avoid this disadvantage, now the core waits for a few blocks before sending replicates to workers.

## [[3.0.0]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/3.0.0) 2019-05-15

This release contains the core set of changes in the 3.0.0-alpha-X releases and some other features/fixes.
In summary this version introduces:
* A new architecture: the core has been completely re-architectured from the version 2.
* Latest PoCo use.
* Better management of transaction with the ethereum blockchain.
* Failover mechanisms: in case some workers are lost or restarted when working on a specific task, internal mechanisms will redistribute the task or use as much as possible the work performed by the lost / restarted workers.
* iExec End-To-End Encryption with Secret Management Service (SMS): from this version, inputs and outputs of the job can be fully encrypted using the Secret Management Service.
* Decentralized oracle: If the result is needed by a smart contract, it is available directly on the blockchain.
* IPFS: data can be retrieved from IPFS and public results can be published on IPFS.

For further information on this version, please read our documentation.

## [[3.0.0-alpha3]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/3.0.0-alpha3) 2019-04-15

* Possibility to choose between slow and fast transactions.
* Embedded IPFS node for default iexec-worker push of the results.
* Better engine for supporting iexec-worker disconnections and recovery actions.
* Brand new Continuous Integration and Delivery Pipeline.
* Enabled SockJS over HTTP WebSocket sub-protocol to bypass some proxies.

## [[3.0.0-alpha2]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/3.0.0-alpha2) 2019-02-08

* Some improvements have been made on the core:
* Some general refactoring on the detectors.
* Bug fix regarding the new PoCo version.
* The core now also checks the errors on the blockchain sent by the workers.
Enhancement regarding the result repo.
Updated PoCo chain version 3.0.21.

## [[3.0.0-alpha1]](https://github.com/iExecBlockchainComputing/iexec-core/releases/tag/3.0.0-alpha1) 2019-01-25

* This release is the first alpha release of the version 3.0.0.
89 changes: 57 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,67 @@
# iexec-core
# iExec Core Scheduler

## Overview

The goal of the core component is to monitor the chain to check if there is any work to perform. In case there is, the core will orchestrate the work among the different workers that will participate in the computation.
An iExec workerpool is orchestrated by an _iExec Core Scheduler_. The _iExec Core Scheduler_ watches on-chain deals and schedules off-chain computation among available workers.

## Run an iexec-core
## Configuration

Gradle is used to build the project. It can be built using the gradle wrapper included in the project (so no need to have gradle installed on your machine) with the following command:
```
./gradlew build
```
They are several ways to run the project: with gradle and with docker. In both ways, there needs to be a running mongo instance as mongo is used to store data. Another pre-requisite is to have a wallet, the core component should be allowed to access it.
The _iExec Core Scheduler_ is available as an OCI image on [Docker Hub](https://hub.docker.com/r/iexechub/iexec-core/tags).

### With gradle
```
./gradlew bootRun
```
In case you use gradle to run the project, please update the variables set in the application.yml.
To run properly, the _iExec Core Scheduler_ requires:
* A blockchain node. iExec smart contracts must be deployed on the blockchain network.
* An Ethereum wallet to interact with smart contracts on the blockchain network. To perform on-chain transactions, the wallet must be loaded with at least 0.1 ETH and some RLC.
* 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.

### With docker
```
docker run -e MONGO_HOST=mongo \
-e IEXEC_CORE_WALLET_PATH=path_to_encrypted_wallet \
-e IEXEC_CORE_WALLET_PASSWORD=password_of_the_encrypted_wallet \
-e IEXEC_PRIVATE_CHAIN_ADDRESS=http://chain_used_by_core \
-e IEXEC_PUBLIC_CHAIN_ADDRESS=http://chain_used_by_workers \
-e IEXEC_HUB_ADDRESS=0xaddress_of_hub_contract_onchain \
-e POOL_ADDRESS=0xaddress_of_pool_contract_onchain \
-e IEXEC_START_BLOCK_NUMBER=chain_start_block_number \
-v #path_to_wallet:/iexec-wallet \
-p 13000:13000 \
iexechub/iexec-core:3.0.0-alpha1
```
Some other variables are settable through docker. Please check the application.yml file.
You can configure the _iExec Core Scheduler_ with the following properties:

| Environment variable | Description | Type | Default value |
| --- | --- | --- | --- |
| `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` |
| `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` |
| `IEXEC_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap` | Integer | `22000000000` |
| `IEXEC_CORE_CHAIN_ADAPTER_PROTOCOL` | _iExec Blockchain Adapter_ communication protocol. | String | `http` |
| `IEXEC_CORE_CHAIN_ADAPTER_HOST` | _iExec Blockchain Adapter_ server host. | String | `blockchain-adapter` |
| `IEXEC_CORE_CHAIN_ADAPTER_PORT` | _iExec Blockchain Adapter_ server port. | Positive integer | `13010` |
| `IEXEC_CORE_CHAIN_ADAPTER_USERNAME` | Username to connect to the _iExec Blockchain Adapter_ server. | String | `admin` |
| `IEXEC_CORE_CHAIN_ADAPTER_PASSWORD` | Password to connect to the _iExec Blockchain Adapter_ server. | String | `whatever` |
| `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_PORT` | Management endpoint HTTP port (uses the same port as the application by default). Configure a different port to use management-specific SSL. | Positive integer | `13001` |
| `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` |
| `IEXEC_LOGS_PURGE_RATE_IN_DAYS` | Interval in days between 2 executions of the purge mechanism. | Positive integer | `1` |
| `IEXEC_LOGS_AVAILABILITY_PERIOD_IN_DAYS` | Number of days to keep logs of past tasks. | Positive integer | `3` |

**Please note that the wallet used by the core should contain at least 0.1 ETH and some RLC to start**.
Since the core will perform some transactions on the blockchain and handle some RLC, it needs both at start-up.
A more exhaustive documentation is available on [the official documentation of iExec](https://docs.iex.ec/).

## Documentation
## Build from sources

A more exhaustive documentation is available on [the official documentation of iExec](https://docs.iex.ec/)
```
./gradlew build
```
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ chain:
hubAddress: ${IEXEC_HUB_ADDRESS:0xBF6B2B07e47326B7c8bfCb4A5460bef9f0Fd2002}
poolAddress: ${POOL_ADDRESS:0x365E7BABAa85eC61Dffe5b520763062e6C29dA27}
startBlockNumber: ${IEXEC_START_BLOCK_NUMBER:0}
gasPriceMultiplier: ${IEXEC_GAS_PRICE_MULTIPLIER:1.0} # txs will be send with networkGasPrice*gasPriceMultiplier, 4.0 means super fast
gasPriceMultiplier: ${IEXEC_GAS_PRICE_MULTIPLIER:1.0} # txs will be sent with networkGasPrice*gasPriceMultiplier, 4.0 means super fast
gasPriceCap: ${IEXEC_GAS_PRICE_CAP:22000000000} #in Wei, will be used for txs if networkGasPrice*gasPriceMultiplier > gasPriceCap

blockchain-adapter:
Expand Down

0 comments on commit 8af0134

Please sign in to comment.