| Literature DB >> 31212715 |
Matevž Pustišek1, Anton Umek2, Andrej Kos3.
Abstract
Those working on Blockchain technologies have described several new innovative directions and novel services in the Internet of things (IoT), including decentralized trust, trusted and verifiable execution of smart contracts, and machine-to-machine communications and automation that reach beyond the mere exchange of data. However, applying blockchain principles in the IoT is a challenge due to the constraints of the end devices. Because of fierce cost pressure, the hardware resources in these devices are usually reduced to the minimum necessary for operation. To achieve the high coverage needed, low bitrate mobile or wireless technologies are frequently applied, so the communication is often constrained, too. These constraints make the implementation of blockchain nodes for IoT as standalone end-devices impractical or even impossible. We therefore investigated possible design approaches to decentralized applications based on the Ethereum blockchain for the IoT. We proposed and evaluated three application architectures differing in communication, computation, storage, and security requirements. In a pilot setup we measured and analyzed the data traffic needed to run the blockchain clients and their applications. We found out that with the appropriate designs and the remote server architecture we can strongly reduce the storage and communication requirements imposed on devices, with predictable security implications. Periodic device traffic is reduced to 2400 B/s (HTTP) and 170 B/s (Websocket) from about 18 kB/s in the standalone-device full client architecture. A notification about a captured blockchain event and the corresponding verification resulted in about 2000 B of data. A transaction sent from the application to the client resulted in an about 500 B (HTTP) and 300 B message (Websocket). The key store location, which affects the serialization of a transaction, only had a small influence on the transaction-related data. Raw transaction messages were 45 B larger than when passing the JSON transaction objects. These findings provide directions for fog/cloud IoT application designers to avoid unrealistic expectations imposed upon their IoT devices and blockchain technologies, and enable them to select the appropriate system design according to the intended use case and system constraints. However, for very low bit-rate communication networks, new communication protocols for device to blockchain-client need to be considered.Entities:
Keywords: Ethereum; Internet of things; architecture; blockchain; communication constraints; decentralized application
Year: 2019 PMID: 31212715 PMCID: PMC6603510 DOI: 10.3390/s19112647
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Expectation put on blockchain technologies in the Internet of things (IoT).
| Expectations | Facts | Remedies |
|---|---|---|
| Build trust | Yes, trusted transaction ledgers based on decentralized trustless infrastructure. | - |
| Scalability | Very limited in major public BC networks. | New consensus algorithms; state channels; non-blockchain based distributed ledger technologies; private or permissioned networks, cross-chain solutions |
| Accelerated transactions | Very poor in major public BC networks, sometimes long transaction confirmation delays and low throughput. | Protocol improvements (state channels, sharding); private or permissioned networks; new BC principles (tangle) |
| Data monetization, micro payments (cost reduction) | Far from being true in major public BC networks. Transaction costs in the Ethereum are about 0.1 USD and in Bitcoin about 2 USD. | New consensus algorithms; private or permissioned networks |
| Device autonomy and M2M transactions | Yes, considering the previously mentioned limitations. | - |
Figure 1Ethereum’s decentralized application architecture for the IoT.
Figure 2Stand-alone blockchain IoT device architecture [36].
Possible constraints in an Ethereum transaction management.
| Lifecycle Point | Possible Constraints |
|---|---|
| Creation of a transaction object | No additional constraints |
| Keeping the key store | Hardware security |
| Signing a transaction | Computational constraints – might be an issue for very simple devices |
| Serialization | No constraints |
| Submitting to the BC network | Communication constraints – if low rate communications are applied |
| Adding transaction to a chain block | Not relevant for end devices |
| Syncing the full node, including full and fast mode | Communication and storage constraints - to demanding for an end device |
| Syncing the light node | Communication constraints – permanent communication channel is required; Application constraints – unreliable smart contract event filtering |
| Informing about the status of the chain from a remote full client | Communication constraints - if low rate communications are applied |
Comparison of deployment options.
| Requirement/Feature | Standalone Full Node | Remote Client | Remote Client | Remote Client |
|---|---|---|---|---|
| Computation | High | Low | Moderate | Low–Moderate 1 |
| Communication | High | Moderate | Moderate | Low |
| Storage | High | Low | Low | Low |
| Decentralization | Highest | Moderate | High | Moderate–High 1 |
| Device security risk | High | Low | High | Low or High 1 |
1 A range of options is possible.
Figure 3Remote geth client with remote key store [36].
Figure 4Remote geth client with local key store.
Figure 5Proprietary wrapper for communication between the device and the remote server.
Figure 6Pilot setup for traffic measurements [nist.sp.1108R3].
Periodic communication traffic between the device and the geth client.
| Architecture | Label | Periodic Traffic |
|---|---|---|
| Stand-alone device – full/fast | C2N | 18 kB/s |
| Stand-alone device – light | C2N | 1-2 kB/s |
| Remote geth client with HTTP | A2C-Sync with HTTP | 2.4 kB/s |
| Remote geth client with Websocket | A2C-Sync with Websocket | 0.17 kB/s |
Sizes of transactions to a smart contract address passed from the device to the client.
| Communication -> | HTTP | Websocket | ||
|---|---|---|---|---|
| Tx Serialization -> | Raw Tx 1 | Tx Object 2 | Raw Tx 1 | Tx Object 2 |
| SC data [B] | 278 | 268 | 278 | 268 |
| Tx –no SC data [B] | 2083 | 178 | 2083 | 178 |
| Tx -with SC data [B] | 486 | 446 | 486 | 446 |
| Request payload [B] | 556 | 511 | 556 | 511 |
| Request frame [B] | 805 | 760 | 618 | 573 |
| Response payload [B] | 103 | 103 | 103 | 103 |
| Response frame [B] | 280 | 280 | 159 | 159 |
| web3.js function | sendRawTransaction() | sendTransaction() | sendRawTransaction() | sendTransaction() |
1 Signed transaction passed from the device to the client in RLP serialized form. 2 Transaction object passed from the device to the client in JSON format. 3 Raw transaction encoded as a hexadecimal string.