Wireless Sensor Networks (WSNs) play a key role in the Internet of Sensor Things (IoST).IoST helps collect data from environments and is used in energy trading, monitoring, smart grids, and more. Connect to the Internet and automate your surveillance system without third-party involvement. An IoST network consists of Sensor nodes that perform environmental monitoring. Wireless Sensor Networks (WSN) and the Internet of Things (I.o.T) have gained popularity in recent years as the underlying infrastructure for connected devices and sensors in a variety of sectors. The data generated by these sensors are used in smart cities, agriculture, transportation systems, healthcare systems, toll collection systems, automatic identification of road data, automatic identification of vehicle license plates, and more. It has become a proposed blockchain mechanism. The main problems and challenges of WSN are effectively reduced by using the LEACH protocol with efficient cluster head selection.
In recent years, IoT has started to play an important role in our daily life, and it has transformed our perception and ability to change the environment around us. Expanding. IoT is defined as the connection of physical devices that enable the collection of data and the exchange of that information. The Global Internet of Things Standards Initiative has identified IoT as the infrastructure of the Information Society. IoT enables devices to be sensed and remotely controlled by established systems, creating opportunities to directly connect the universe to computerized systems for improved performance. Since IoT is combined with other technologies such as WSN and Blockchain, this technology can be seen in the more general class, which includes inventions such as smart grid, smart city, and smart home, as shown in Figure 1.
II. EXISTINGSYSTEMS REVIEW
In some clustering methods, resource-rich nodes are pre-determined as CHs. The problem with this method is that most WSNs are homogeneous and resource constrained. Therefore, in some cases, this procedure will not work. Also, even if a resource-rich node is found in a heterogeneous network and can be selected as CH, if it is CH for a long time, the power of the node will deplete rapidly, causing node death. Moreover, if the CH is fixed, the dynamics of the mobile nodes and the network can lead to unbalanced clusters in terms of the number of members or amount of data transmitted, resulting in unbalanced network load and resource consumption. collapses  Taheri et al.  The proposed clustering method has three stages. In the initial stage, the knowledge about the neighborhood is modified and the fuzzy output is measured. Each node sensor is placed at some point in the later phase until the delay time to listen for CH messages. If it fails, impersonate a temporary CH while simultaneously placing the message within the boundaries of the cluster. In the next iteration, it will be the last CH and send the message when it has the lowest cost among the temporary cluster heads near.
Researchers have proposed a ZigBee protocol for tracking agricultural environments. A wireless sensor node is used to collect live information on the farm and transmit that information to a base station (BS) via his ZigBee protocol .
As shown in Figure 3, a solution for secure IoT using energy efficient WSN and blockchain scheme is proposed.
To conduct the investigation, we selected an area of 1000×1000m2, divided this area into clusters, and randomly placed the IoT nodes in different clusters. Thenodes in a cluster are shared across clusters, so each cluster absorbs all nodes and does not communicate with each other within the same cluster, but most effectively communicates with its CHs to talk about sinks. Send information to the base station.
B. Mechanism of cluster formation
The clustering process starts after the IoT nodes are deployed in the cluster farm, each cluster has G. Each cluster has similar or different node shapes, depending on the actual requirements. A cluster head (CH) is elected per cluster and all nodes forward information to their respective CH.
For efficient routing, we first adopted a new IoT clustering protocol and then integrated IoT with blockchain to achieve better results. A three-stage data transmission technology is introduced. In the first step, member node collects information to share with each cluster his head, in the second step the CH forwards the information to the sink, and in the last step, the sink forwards the information to her BS. increase. Suppose the sink is outside the farm and the nodes deployed in the cluster farm know exactly where the sink is and cannot change it.CH is chosen based on its high energy and short Euclidean distance to the sink and GH. Take the Euclidean distance between any two nodes a and b in the two dimensions with the closest Euclidean distance:
(????,????) =√ ((????2−????1)+(????2 −????1)) (1)
D. Integration of blockchain and IoT
Blockchain smart contracts have the ability to make routing protocols more secure by removing redundancies from aggregated data collected from IoT nodes and blocking attacks on IoT networks, resulting in lower energy consumption and leading to longevity. This research approach focuses on the use of smart blockchain smart contracts that run autonomously. Thousands of collectively distributed mining nodes implement smart contract functionality and code and mutually agree on the final result. One thing that needs to be mentioned here is that the blockchain network is made up of mining nodes.
IoT is one of the newest technologies, and its combination with blockchain opens up new avenues. The IoT nodes have the ability to capture the environmental characteristics of the cluster and send the captured information to the base station via the sink, thus offloading the CH. Blockchain further eliminates redundant data, it prevents IoT nodes from consuming a lot of power during transmission. In this study, we used a blockchain model to proposeEnergy Efficient WSN for his IOT application scheme, simulation results show that the proposed scheme has a longer network life, lower power consumption, and superior performance than his LEACH in agriculture. We have shown that it has a high throughput. Future research will develop intelligent models based on IoT and blockchain for clustered environmental monitoring and information.
 H. Taheri, P. Neamatollahi, O. M. Younis, S. Naghibzadeh and M. H. Yaghmaee, “An energy-aware distributed clustering protocol in wireless sensor net works using fuzzy logic,” Ad HocNetworks,vol.10,no.7,pp.1469–1481,2012.
 Z.Zhang,et al.Energy-efficient multihop polling in clusters of two-layered heterogeneous sensor networks IEEE Trans. Comput., 57 (2) (2008),pp.231-245
 Augustin, Aloÿs, JiaziYi, Thomas Clausen, and William Mark Townsley.\"A study of LoRa: Longrange & low power networks for theinter net ofthings.\"Sensors16,no.9(2016): 1466
 Norah Saleh Alghamdi, Mohammad Ayoub Khan\" Energy-Efficient and Blockchain- Enabled Model for Internet of Things (IoT) in Smart Cities\" Tech Sciencepress
 Asif Nawaz \"BlockChain with IoT, an Emergent Routing Scheme for Smart Agriculture\" International Journal of Advanced Computer Science and Applications