# IoT-Chain and Monitoring-Chain Using Multilevel Blockchain for IoT Security
## 4 Architecture
### Multilevel Blockchain  
This section explains why it is composed of a multilevel blockchain. As depicted in Figure 3, we compare the structure (A) consisting of only the IoT chain and the structure (B) consisting of only the monitoring chain. Additionally, in (C), the problem of solving the limitations of the two structures (A, B) in the multilevel blockchain is explained. (A) is a case in which the blockchain is configured with only the monitoring chain in the IoT device's external network. (A-1) Each IoT device forwards a transaction to the blockchain. For delivery, there are two methods: sending a transaction to the API server and sending it to the blockchain, and sending it to the blockchain. (A-2) is the method of delivery to the server, and data tampering may occur during this process. (A-3) is the process of delivering a transaction directly from an IoT device to a blockchain, and TPS degradation may occur in this process. (B) is a case of maintaining the blockchain with only IoT devices. (B-1) All blockchains are recorded in IoT devices, and even if data are lighter, data size increases. Thus, if it goes above a certain size, IoT devices will not be able to sustain the blockchain due to insufficient storage capacity. In addition, the consensus process is essential for block creation in the blockchain. The consensus algorithm is divided into PoW consensus, which requires CPU operation, and PBFT, which proceeds only through network communication. However, as both consensus algorithms have to be operated on IoT devices as in (B-2), they require CPU computation or high network traffic. (C) is a multi-level blockchain structure to supplement the limitations of (A) and (B). In this structure, IoT devices maintain the IoT-Chain. The monitoring chain supports the IoT-Chain. (C-1) When the storage capacity becomes insufficient, the blockchain from the genesis block to the present is recorded externally (C-2) to the external distributed file system. After recording, the data are backed up in the monitoring chain, and in this process, the export process is performed for data verification. This process is not verified by a single node, but by (C-3) monitoring chain \begin{table}
\begin{tabular}{l l} \hline \hline
**Symbol** & **Description** \\ \hline \(IC\) & IoT-Chain \\ \(MC\) & Monitoring-Chain \\ \(HF\) & Hyperledger Fabric \\ \(Network_{ic}\) & Network composed of IoT-Chain nodes \\ \(Network_{mc}\) & Hyperledger Fabric-based Monitoring-Chain network \\ \(DFS\) & Distributed file system \\ \(Address_{ic}\) & Address returned after uploading IoT-Chain to \(DFS\) \\ \(Route\) & Consensus path maintained by export nodes \\ \(Key_{priv}\) & Private key for signing IoT-Chain nodes \\ \(Sig\) & Signature of IoT-Chain node \\ \(Key_{pub}\) & Public key to verify IoT-Chain node signature \\ \(Sig_{schmor}\) & Combined signatures for consensus upon export \\ \(Key_{schmor}\) & Combined public key to verify consensus during export \\ \(CA\) & Certificate authority for IoT-Chain node registration \\ \(Cert\) & Certificate for public key verification of IoT-Chain node \\ \(Val_{rand}\) & Verifiable random value returned after VRF function execution \\ \(Round\) & Restart cycle for IoT-Chain lightweight \\ \(SC\) & Smart contracts installed on the Monitoring-Chain \\ \(Block_{ic}\) & Blocks created in IoT-Chain \\ \(Block_{export}\) & Address, last block hash signature is stored in block \\ \(Block_{mc}\) & Blocks created in Monitoring-Chain \\ \(Block_{genesis}\) & Genesis Block when IoT-Chain is restarted \\ \(BH_{last}\) & Last block hash value of IoT-Chain \\ \(BH_{genesis}\) & Genesis Block hash \\ \(Node_{ic}\) & Nodes that create transactions and maintain the blockchain in IoT-Chain \\ \(Node_{mc}\) & Node that maintains the blockchain in Monitoring-Chain \\ \(Node_{leader}\) & Nodes that are randomly selected from IoT-Chain to generate blocks \\ \(Node_{export}\) & Node acting as a gateway in IoT-Chain \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Notation. nodes.