Research Article Blockchain-Based Internet of Things and Industrial IoT: A Comprehensive Survey Sanjeev Kumar Dwivedi ,PriyadarshiniRoy,ChinkyKarda,ShaliniAgrawal, andRuhulAmin Computer Science & Engineering, DR SPM International Institute of Information Technology, Chhattisgarh, India Correspondence should be addressed to Ruhul Amin; amin_ruhul@live.com Received 30 April 2021; Accepted 7 August 2021; Published 27 August 2021 Academic Editor: omar cheikhrouhou Copyright © 2021 Sanjeev Kumar Dwivedi et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Industry 4.0 connects the latest technologies such as cloud computing, Internet of things (IoT), machine learning and artificial intelligence (ML/AI), and blockchain to provide more automation in the industrial process and also bridges the gap between the physical and digital worlds through the cyber-physical system. e inherent feature of IoT devices creates the industry to smart industry (referred to as industrial IoT, i.e., IIoT) through its data-driven decision policies. However, several challenges such as decentralization, security and privacy vulnerability, single point of failure (SPOF), and trust issues exist in the IoT system. Blockchain is one of the promising technologies that can bring about opportunities for addressing the challenges of IoT systems. In this article, we have investigated the integration of IoT with blockchain technology and provided an in-depth study of the blockchain-enabled IoT and IIoT systems. e state-of-the-art research is categorized into data storage and management technique, big data and cloud computing technique (finance and data auditing), and industrial sectors (supply chain, energy, and healthcare sector). e insightful discussion based on the different categories is also presented in the paper. In particular, first, we introduce the IoT and IIoT and then discuss the need for smart contracts in IoT and IIoT systems. Next, we concentrate on the convergence of blockchain and IoT with state-of-the-art research. In addition, this article also provides the open and future research directions towards this era with the highlighted observations. 1.Introduction Internet of things (IoT) consists of devices and machines equipped with networking capability which can collect data from their environment via various sensors, share them with other devices over the Internet, and carry out analysis (or act) on received data automatically without requiring hu- man intervention [1, 2]. For example, an IoT-based smart home system can use sensors to detect when the electrical appliances need to be turned on (or off) and do so auto- matically, thereby conserving energy and making life easier for people. IoT has a huge range from sensors and smart consumer devices like smart television, wearable electronics to human and animal implants (e.g., medical implants or identification), and tracking chips for animals [3]. IoT has a very wide range of applications starting from home consumer products, health, agriculture, energy, and trans- port to any sector that can benefit from integrating IoT. e number of IoT devices is increasing at an explosive rate, but many challenges [4] exist with the same. IoT devices usually have limited processing capabilities and are vulnerable to security attacks [5]. Hence, security is an important aspect while designing the IoT-based system. e attacks in the IoT-based system are broadly classified into four major categories [6]. e first category is known as the physical attack in which the attacker is physically very close to the network and tries to launch the malicious functionality in the system. Tampering to the IoT device, jamming the radio frequency signals, side-channel attack, and malicious code injection are the common forms of physical attacks. To counter the physical attack, researchers use the physical unclonable function (PUF) [7] for the Hindawi Security and Communication Networks Volume 2021, Article ID 7142048, 21 pages https://doi.org/10.1155/2021/7142048