For Developers
The key element of every chain system is the node. And we are no different here. Our node handles data synchronization with the blockchain, syncs with user’s devices and proxies user commands to the devices. The blockchain has a smart contracts, that are used to store data and logic of each node and device. Our user app allows users to update device data on the blockchain, send commands to the device, and receive command results. Here is a simple schema showing this concept:
The next important point is how smart contracts are related to each other. Again, let’s start with the nodes. Every node is chosen by the Elector for every cycle, and the Elector address is written at Node SmartContract (SC). Every device is connecting to node, so node’s address is written in device’s SC. Furthermore, the device is part of a Device Group, which also has its own SC. The device API is linked to a Vendor SC, allowing the execution of vendor-specific business logic.
Let’s sum up the node’s roles. A node is a storage and proxy component of our solution. It connects the blockchain, user application, and IoT devices.
In this diagram, red arrows represent app communications, while blue arrows indicate blockchain connections. Another important part is the full interaction flow of a device. A device connects to the node during registration, updates its own SC through the blockchain, and can also interact with other devices via their smart contracts.