aerOS IOTA

Introduction

IOTA is a distributed ledger technology designed to facilitate secure sales and trading transactions, particularly for the Internet of Things (IoT) ecosystem. Unlike traditional blockchains, IOTA uses a unique structure called the Tangle, which is a Directed Acyclic Graph (DAG). This design aims to address scalability issues and high transaction fees commonly associated with conventional blockchain systems.

Features

  • Scalability: IOTA’s Tangle architecture allows for parallel transaction validation, improving the system’s scalability. As more transactions occur, the network becomes more efficient.

  • Zero Transaction Fees: IOTA transactions are free of charge, making it ideal for microtransactions, which are essential for IoT devices.

  • Decentralization: Each participant in the network that issues a transaction also validates two previous transactions, contributing to a decentralized network without the need for dedicated miners.

  • Security: The Tangle’s structure enhances security through its requirement for transactions to validate two previous ones, thereby preventing double-spending and other fraudulent activities.

Place in architecture

IOTA is a core component used to share critical continuum-wide relevant information.

User guide

The required files to execute the necessary IOTA components for a private Tangle in a K8s environment can be found in the aeros gitlab. All the necessary configuration is present in the multiple files. Additional details on the configuration will be provided in the testing section. See the official documentation for details on the default deployment in a docker environment.

This deployment is made with the idea that you’ll launch the contents of the hornet1 in one K8s cluster that will act as the ‘main’ cluster, and the contents of the hornet2 folder in a secondary cluster. Please note that you may have to edit the IP adresses found in the multiple YAML files to fit your network requirements.

Prerequisities

The bootstrap needs to be executed first in the main cluster only in order for the additional configuration files to be generated, execute the run.sh command prior to installation with admin rigths.

sudo ./run.sh

Installation

Main Cluster

With the bootstrap from the previous section executed, make sure you have access to your desired K8s cluster for the deployment. Once you have access, use the command kubectl to execute the files in the initial-conf folder.

kubectl apply -f ./hornet/private_tangle/initial-conf/

With this installed you can proceed to install the various hornet nodes. There should be a node for every worker in your k8s cluster.

kubectl apply -f ./private_tangle/kubernetes/domain-1/

Secondary Clusters

In this cluster the bootstrap and the initial-configuration does not need to be run, install the contents of the hornet2 folder.

kubectl apply -f ./private_tangle/kubernetes/domain-1/

Uploading into the Tangle

In order to send messages into the Tangle network a simple script has been made. It can be retrieved from the common-deployments of aeros with the following command:

wget --header "PRIVATE-TOKEN: TOKEN" "https://gitlab.aeros-project.eu/api/v4/projects/65/packages/generic/iota_custom_api/1.0.0/deployment.yaml"

And then deployed with the command:

kubectl apply -f ./deployment.yaml

Configuration options

Developer guide

First, verify the correct installation with the following command:

kubectl get all

If all the services and deployment are running you can test the deployment by connecting to the 8081 port. Everything should now be up and running, with the coordinator sending out milestones every few seconds. The default credentials of the dashboard are admin/admin.

Below is a list of the installed components and a brief description:

inx-coordinator.yaml - low-scale version of the real IOTA coordinator made to work in this private Tangle.
inx-dashboard.yaml - provides a web dashboard to the hornet node.
inx-mqtt.yaml - extends the node endpoints to provide an Event API to listen to live changes happening in the Tangle.
inx-poi.yaml - generate and verify Proof-of-Inclusion of blocks in the Tangle. Given a piece of data or transaction and the proof, you can verify whether it was included in the Tangle at any given time
hornet-1.yaml - IOTA node software.
hornet-2.yaml - IOTA node software.

With the Custom API installed you can upload a block into the Tangle with the following command:

curl --location 'http://API-IP:30635/upload?node=hornet-1' \
--header 'Content-Type: application/json' \
--data '{
   "tag": "whatever.tag.you.want",
   "message": {
      "Anything": "You want"
   }
}'

You can send the message to any hornet node, just replace the “…hornet-1” in the URL with either any other hornet node (e.g. hornet-4) or just input the IP of the hornet node in question.

The contents need to be in JSON format with the two fields “tag” and “message”. The contents of “message” can be whatever you want them to be.

Authors

Universitat Poliècnica de València

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org/>

Notice (dependencies)

There are no known dependencies.