## 1 Introduction
In WSN applications that require security, messages sent for data capture or deception by infiltrating the system will be blocked by the ability to transfer information over the blockchain. Blockchain and smart contracts-based solutions can successfully perform authentication and access control over networks [6]. In addition, security models made from a single center are attractive to all attackers. As a result, different attacks can be made to capture the relevant center. However, this threat can be eliminated since blockchain applications have no single center. As data increase in blockchain networks, the number of blocks increases, so the need for memory increases [7]. At the same time, as the data increase, the number of transactions and the energy requirement will increase in verifying blocks and adding new blocks to the chain [8]. Since the sensor nodes in the WSN are also thought to have limited capacity, it is necessary to integrate the WSN and blockchain together without increasing excessive transaction and energy consumption in order to use the important features of blockchain to meet the security needs of the WSN. In this study, a new blockchain-based authentication protocol has been developed for WSNs. In summary, the contributions of the study are as follows:  
* A blockchain-based authentication protocol is developed for high-security applications. While non-blockchain authentication protocols are vulnerable to certain attacks, the blockchain structure, proven to be high security, is applied in this study. Compared to the existing limited work involving blockchain-based WSNs, very good results are achieved in terms of security and efficacy. * Blockchain-based WSN authentication models in the literature are examined. * A private blockchain structure is created considering security, transaction speed, ownership criteria, and suitability for WSNs. * Proof of Authentication (PoAh) is used as the consensus mechanism. * A WSN System model is created as Sensor Node (SN), Cluster Node (CN), Base Station (BS), Blockchain Network (BCN), and User (U). * The developed protocol consists of the Initialization section, where the initial values are generated, the registration section, where the nodes in the network are registered, the authentication section, where the nodes in the network are verified, and the unregistration section, which is the removal of the nodes leaving the network for any reason. * The Elliptic Curve Digital Signature Algorithm (ECDSA), ECC, and Smart Contract are used in the developed protocol. * A detailed security analysis of the study is made. * The proposed protocol is implemented to real sensor nodes and efficiency analysis is carried out in this way. * In addition to being used in applications requiring high security, the proposed authentication protocol is also efficient considering the latency-energy-memory usage criteria. The remaining sections of the study are as follows: While the related studies are mentioned in Section 2, blockchain is explained in Section 3. Then, in Section 4, the system model, in Section 5, the introduction of the proposed protocol, and in Section 6, the security and efficiency analysis of the study are given. Finally, the last section includes the results of the study and the topics for future work.