# A Robust Sharding-Enabled Blockchain with Efficient Hashgraph Mechanism for MANETs
## 4 Behavior-Based Sharding Hashgraph Framework
### System Model  
The shards are associated with geographical regions. Disjoint mobile nodes within each shard maintain a graph via hashgraph consensus in Figure 3. The regions of shards partially overlap to increase the communication channels among shards. During the consensus process, dishonest behaviors of nodes are updated to the graph and become a decentralized blacklist. In the consensus layer of hashgraph, three dishonest behaviors are defined as a _False Event ( FE)_, _False Free-riding Event (FFE)_ and _Double-spent Event (DE)_. The False Event has invalid transactions in its \(txList\). The False Free-riding Event is the event referring to False Events, meaning that the event generator performs false verification. The Double-spent Events are defined by (2). If only one of the Double-spent Events becomes famous, a fork occurs. Proved by [20], at least one honest node can see Double-spent Events. These events can be found by honest nodes and added into an accusation transaction in (3), where \(pk\) is the public key of the accused node, which is assumed to be its ID. \(bType\) is the type of dishonest behavior, and \(beH\) is the hash value of the False Event or False Free-riding Event, or hash values of Double-spent Events. Thus, honest nodes validate the events with \(tx^{a}\) in the following rounds of consensus. \(tx^{a}\)s form the decentralized blacklist of nodes, recording their dishonest behaviors in consensus. \[<event_{i},event_{j}> \tag{2}\] \[s.t.\exists x\in event_{i}.txList,\exists y\in event_{j}.txList\] \[x\text{ and }y\text{ are conflicting}\] \[event_{i}\text{ and }event_{j}\text{ are generated by the same node}\] \[tx^{a}=\{pk,beH,bType,timestamp\}\] (3) \[s.t.bType=FE|FFE|DE\]  
In the transmission layer of hashgraph, nodes are required to propagate received gossip information. Two propagation behaviors of nodes are defined as a _Empty Event_ and _Non-empty Event_. An Empty Event is the event where \(txList=null\). A Non-empty Event is the event where \(txList\
eq null\), meaning the involved transactions are also generated in the  
Figure 3: The system model of sharding hashgraph. event. First, according to a given time scale, e.g., a week, the Empty Events and Non-empty Events are divided into recent events and past events in the graph. Second, the network connectivity is formally described as a vector \(\{eNum,gNum\}\), where \(eNum\) is the number of generated events and \(gNum\) is the number of event generators. According to a given standard network connectivity, \(\{\delta,\Delta\}\), if \(eNum<\delta\) & \(gNum<\Delta\), the network connectivity is poor. If \(eNum>\delta\) & \(gNum>\Delta\), the network connectivity is good. Otherwise, if \(eNum\leq\delta\mid\mid gNum\geq\Delta\), or \(eNum\geq\delta\mid\mid gNum\leq\Delta\), the network connectivity is normal. Third, denote the nodes without transactions in the blacklist as \(hNodes\). \(hNodes\) have not engaged in dishonest behaviors. According to the graph, the Empty Events generated by \(hNodes\) are counted as \(eN_{1}\), \(eN_{2}\), \(eN_{3}\), \(eN_{4}\), \(eN_{5}\) and \(eN_{6}\), and the Non-empty Events generated by \(hNodes\) are counted as \(nN_{1}\), \(nN_{2}\), \(nN_{3}\), \(nN_{4}\), \(nN_{5}\) and \(nN_{6}\) in Table 1. For example, in the past network with good connectivity, the node generated 5 Empty Events and 11 Non-empty Events. In the recent network with poor connectivity, the node also generated 1 Empty Events and 11 Non-empty Events. So, for this node, \(eN_{5}=5\), \(nN_{5}=15\), \(eN_{1}=1\), \(nN_{1}=11\), and other parameters are 0. Thus, Table 1 counts the honest propagation behaviors of \(hNodes\). According to Table 1, the propagation behaviors of a candidate receiver and a candidate sender are evaluated. On one hand, provided that a node intends to send an event to one of its neighbors, in order to select a reliable neighbor to forward the event in time, the reputation value of each neighbor (candidate receiver) is calculated in a weighted Formula (4).