A system of smart contracts that orchestrate the data and software acquisition, enforce the execution of the software over the given data into a blockchain-unrelated component and make the computation output available to the recipient.
The project was implemented as part of my Master’s Thesis in Informatics at the Technical University of Munich (TUM).
More information here.
truffle dev
compile && migrate
- First run
npm install
- Then run
ng serve --open
- Navigate to
src/app/oracles
and runnode ValidationOracle.jsx
to start the oracle service
- api_url: https://test.bigchaindb.com/api/v1/
- app_id:
c2c9c771
- app_key:
28b8fde912535489c425c2e266030b0e
- Custom RPC: http://localhost:9545
- Copy the mnemonic phrase from Truffle to metamask
-
Start a container
-
Attach to the running container and run the
generateKeys.sh
script -
Exit from the container and copy the generated public key in the host machine locally
-
Add the container's filesystem on IPFS
-
Using the BlackboxChain dapp store the necessary information on the blockchain/BigchainDB
Required:
-
Docker container ID
-
IPFS address of container's filesystem
-
Container's public key
-
Container's specification
-
Usage cost (in Ether)
-
Add software on IPFS
-
Using the BlackboxChain dapp store the necessary information on the blockchain/BigchainDB
Required:
-
Software filename
-
IPFS address of software
-
Input parameter specification
-
Software specification
-
Usage cost (in Ether)
-
Run
randomKeyGen.sh
(helper_scripts) to generate a one-time password -
Run
generateKeys.sh
(helper_scripts) to generate a private/public key pair -
Run
encryptLargeFile.sh
(helper_scripts) to encrypt the dataset with the one-time password -
Download a container's public key using the BlackboxChain dapp and run
encryptRandomKey.sh
(helper_scripts) to encrypt the one-time password with the container's public key -
Add the two encrypted files on IPFS
-
Using the BlackboxChain dapp store the necessary information on the blockchain/BigchainDB
Required:
-
Name of the dataset
-
IPFS address of the enrcypted dataset
-
IPFS address of the encrypted one-time password
-
Dataset specification
-
Usage cost (in Ether)
From the menu on top, click Computation
and then:
-
Upload your public key
-
Select a software
-
Select a dataset
-
Select a container that will perform the computation
Click Run
in order to start the computation
The result is encrypted with a one-time password, and the password is encrypted with the user's public key.
To get the computation output, from the top menu, click Results
and then:
-
Run
getResult.sh
(helper_scripts) and give the displayed IPFS addresses -
The result is available in the
result.bin
file