## 1 Introduction  
The smart city is regarded as a technological structure utilized by the distinct city shareholders for achieving distinct objectives such as good governance, enhancing day-to-day living circumstances, maximizing resource usage, or building new commercial chances [1]. The supporters of the smart city, whether they are technology providers, researchers, or managers, have performed various designs, improvement studies, and standardization in response to the difficulties of smart city advancement referring to security, scalability, connectivity, or heterogeneity [2]. The Internet of Things (IoT) technology provides less cost and potential solutions for the advancement of smart cities owing to its greater suitability in an infinite number of cases. Specifically, the intelligent IoT gadgets could consistently combine multiple fields of a smart city phenomenon, interchanging a continual flow of data for granting quality services to the public as a supreme objective [3]. Thus, we refer to the IoT gadgets as brilliant, which means they are capable of communicating autonomously, demanding less or no human involvement. Invaders will fix their places in smart cities for many reasons. Malevolent people might consider smart cities as play areas wherein they make a trail of their hacking skills through playing with existing technologies for individual fulfillment [4]. For cyber-criminals, the interconnectivity of systems and devices in a smart city can be operated for any feasible unauthorized accessibility of monetary properties, personal properties, delicate data, and causing damages or loss to the common public [5]. State-sponsored actors might exploit the ubiquity of smart city technologies for launching their hacktivist or espionage camps. In a few very dire situations, smart applications might be exploited for performances of terror [6]. Thus, engineers and researchers must grant legal methods and solutions to aid local administrations and metropolitan or urban developers in creating highly secured smart cities [7]. Security is not just a necessity for the further usage of blockchain (BC); it could participate in data dispersal since it operates in a quicker mode. However, according to the author's knowledge, autonomous mathematical evidence for quicker solutions is now not available [8]. Once after the existence of the mathematical evidence, an ideal ambiance is possible where speedy and trusted nodes are linked in the network and could avail the advantage from 5G with the help of particular fog layers of clouds. As a result, a BC-oriented decentralized system is one of the resolutions [9]. One such benefit of utilizing BC technologies is that it has capability of storing data in an absolute way that does not need a centralized database. Furthermore, it could offer a means for tracking and executing transactions amid several members in a trusted ambiance [10]. With the use of strong encryption with public private key sets, BC further grants higher levels of security to its members. Figure 1 depicts the process of BC in IoT with smart cities environment. This study develops an Optimal Machine Learning-based Intrusion Detection System for Privacy Preserving BIoT with Smart Cities Environment, called OMLIDS-PBIoT technique. The proposed OMLIDS-PBIoT model can be applied to accomplish security in several areas of smart cities such as traffic management, emergency response, smart healthcare, air quality monitoring, disaster management, waste management, air quality monitoring, etc. The presented OMLIDS-PBIoT technique employs data pre-processing in the initial stage to transform the data into compatible format. Additionally, a golden eagle optimization (GEO)-based feature selection (FS) model is designed to derive useful feature subsets. In addition, heap-based optimizer (HBO) with random vector functional link network (RVFL) model was utilized for intrusion classification. In addition, BC technology is exploited for secure data transmission in the IoT-enabled smart city environment.