## 3 Methodology  
It is assumed that a ground station is in charge of controlling \(n\) UASs. Raising the quantity of UASs within a designated airspace increases the probability of encountering conflicts and collisions [49]. Better airspace management is needed to allow UASs to fly safely. A smart contract was developed for this airspace management, implemented by incorporating sharding, with the flight zone composed of \(m\) districts, as depicted in Figure 5.  
Figure 5 depicts a P2P communication structure among UASs. The flight area is partitioned into \(m\) districts, with each district forming a sub-flight zone hosting \(l_{m}\) number of UASs (where \(l\) number of UASs are flying in a district \(m\)). Relying on the sharding concept [50], which involves scaling the blockchain network, a smart contract can categorize aircraft flights into various sub-flight zones (districts) based on their respective locations. The districts are considered to be the same size. A flight zone sharding can reduce the computational complexity raised by the smart contract. Moreover, the ground station does not need to communicate directly with aircraft; instead, it relies on the smart contract obtained from each individual district for its required data. A smart contract on the blockchain is a self-executing digital agreement where the conditions and terms are embedded within lines of code. These contracts automatically enforce and trigger actions when predefined criteria are satisfied, eliminating the need for intermediaries and ensuring a transparent, tamper-proof process. In the realm of space allocation, smart contracts can be harnessed to manage and allocate spaces based on specific rules [51]. In the context of a sharding flight zone, the utilization of a smart contract is pivotal for establishing a consensus framework. Consequently, a voting platform was devised utilizing the Ethereum blockchain [52] to ensure the secure allocation of airspace to Unmanned Aerial Systems (UASs) and to prevent conflicts. Figure 6 illustrates the process validating the secure allocation of airspaces to UASs. Figure 5: A sharded flight zone set up for the Unmanned Traffic Management (UTM) system. Figure 6 shows a decentralized process for airspace allocation and validation. Within this process, the voting platform gathers votes from UASs, which include feasible airspaces for projected flight paths. Subsequently, these collected votes [53] are transmitted to the decentralized JavaScript voting code, which relies on the smart contract. The allocated airspace is then sent to the local full node associated with the chosen district. The confirmed votes for airspace allocation are distributed to the peer full node linked to the corresponding district. The peer full node performs an identical validation process, followed by the submission of votes to PoW or PoS validators, contingent upon the chosen PoW/PoS strategy. The PoW/PoS protocol node generates a new block and transmits it to the peer full node. The local full node accepts the verified block from the peer full node and forwards it back to the decentralized voting code. Ultimately, the consensus framework ensures the safety of the allocated airspaces to all UASs. A UAV flight may encounter various uncertainties [54] that require resolution advice and lead to trajectory modifications, which, directly and indirectly, may affect other UAVs' trajectories. The consensus mechanism should, therefore, update agreements and allocate safe airspaces accordingly. The most notable feature of the blockchain methodology is its priority level consideration, which allows blockchain-based consensus protocols to perform agents' agreements while considering their corresponding priority levels. Figure 7 illustrates the confirmation process for airspace allocation for trajectory execution. Figure 6: Airspace allocation using the voting approach validated through the PoW or PoS [44]. Figure 7: Airspace arrangement and resolution.