Implements trusted execution environment (TEE) for matching bids and offers, creating Merkle root of bids/offers and results, and store the root hash in the Integritee network
Read the API documentation here.
- 🔍 Create hashes for market orders
- 🤝 Match orders in the TEE
- 🌳 Create Merkle tree
- 💾 Store and retrieve Merkle root hash on the blockchain
These instructions will get you a copy of the project up and running inside a Docker container for development and testing purposes.
Before you start, make sure you have completed the following prerequisites:
- 📥 Download the
integritee-dev
Docker image from here. - 🔗 Clone the
integritee-node
repository from here. - 🔗 Clone the
BEST-Energy
repository from here.
📝 Note: Both of these repositories must be in the same directory.
Follow the steps below to have the development environment running:
- Mount the current directory containing the integritee-worker and integritee node into the Docker container and start a bash session inside:
$ docker run -it --mount "type=bind,src=$(pwd),dst=/opt/shared" --workdir /opt/shared -p 9944:9944 -p 2000:2000 -p 3443:3443 integritee/integritee-dev:0.1.12 /bin/bash
- Build the
integritee-node
Inside the shell in the Docker container:
$ cd integritee-node
$ cargo build release --features "skip-extrinsic-filtering skip-ias-check"
- Build the
worker
node
$ cd ../
$ cd BEST-Energy
$ SGX_MODE=SW WORKER_MODE=offchain-worker make
- Run the
integritee-node
Execute the following command inside the integritee-node
directory:
$ ./target/release/integritee-node --tmp --dev -lruntime=info --ws-port 9944 --port 30390 --rpc-port 9933 --ws-external --rpc-external
- Run the
worker
Execute the following command inside the BEST-Energy/bin
directory:
$ RUST_LOG=warn,ws=warn,sp_io=error,substrate_api_client=warn,json_rpsee_ws_client=warn,jsonrpsee_ws_server=warn,enclave_runtime=warn,ingegritee_service=warn,ita_stf=debug ./integritee-service --clean-reset run --skip-ra --dev
-
integritee-node – A substrate-based node that maintains a registry of remote attested integritee-service enclaves. The node also acts as a proxy for encrypted requests which are forwarded to the integritee-service.
-
worker – Integritee worker for Integritee node or parachain.
-
binary-merkle-tree – A crate for implementing binary Merkle Tree utilities necessary for Ethereum bridge & Solidity contract inter-operation.
Pull requests are welcome.
- Fork the repository.
- Create your new feature branch:
git checkout -b new-feature-branch
- Stage your changes:
git add .
- Commit the changes:
git commit -m "add commit message"
push
to the branch:git push origin new-feature-branch
- Submit a
pull request
.