Prototypical implementation of the smart contracts and oracle node for a voting-based blockchain interoperability oracle. The oracle allows clients to verify that a transaction is included in another blockchain but is currently limited to Ethereum-based blockchains.
You need to have the following software installed:
- Golang (version 1.15)
- Node.js (version >= 15.4.0)
- Truffle (version 5.3.7)
- Ganache (version >= 2.5.4)
- Solidity (^0.8.0)
- Change into the contract directory:
cd ioporaclecontracts/
- Install all dependencies:
npm install
- Deploy contracts:
truffle migrate --reset
- Change into the node directory:
cd ioporaclenode/
- Build the node:
go build -o ioporaclenode ./cmd/ioporaclenode/
The oracle node uses a configuration file which should be specified through the respective command-line flag. To see what the config file should look like, one can take a look at the example configuration file which resides in the configs
directory.
The project includes two alternative implementations of oracle contracts. One implements an on-chain aggregation mechanism whereas each oracle node calls the oracle contract to submit a result. The second oracle contract makes use of ECDSA signatures to verify the result. To repeat the experiments one can use the provided evaluation scripts. The results are then saved in a CSV file in ./ioporaclecontracts/data
.
-
Run a local Ethereum blockchain (Ganache).
-
Deploy the smart contracts on the local blockchain with
truffle migrate --reset
. -
Run your own IOTA node (or use a public node with MQTT enabled).
-
Create the configuration files for three oracle nodes.
-
Start the oracle nodes which are able to answer to the requests.
- Run
./ioporacle -c ./configs/config_n1.json
- Run
./ioporacle -c ./configs/config_n2.json
- Run
./ioporacle -c ./configs/config_n3.json
- Run
-
Run
truffle execute ./scripts/eval/eval-bls-cost.js
- Run a local Ethereum blockchain (Ganache).
- Change into the contract directory:
cd ioporaclecontracts/
- Run
truffle execute ./scripts/eval/eval-ecdsa-cost.js
- Run a local Ethereum blockchain (Ganache).
- Change into the contract directory:
cd ioporaclecontracts/
- Run
truffle execute ./scripts/eval/eval-on-chain-cost.js
This is a research prototype. We welcome anyone to contribute. File a bug report or submit feature requests through the issue tracker. If you want to contribute feel free to submit a pull request.
The financial support by the Austrian Federal Ministry for Digital and Economic Affairs, the National Foundation for Research, Technology and Development as well as the Christian Doppler Research Association is gratefully acknowledged.
This project is licensed under the MIT License.