| Wireless Mesh Network(WMN)has the performance advantages of self-organization and multi hop.However,due to the need for communication to be relayed through intermediate nodes,it is highly likely that information may be tampered with due to an attack on a certain intermediate node.Blockchain,on the other hand,has a similar distributed topology structure and powerful information preservation and maintenance capabilities.It can package network information into blocks and securely store them in the form of hash chains,achieving immutability and traceability of information.Based on this application scenario,a credit consensus mechanism is designed to provide both malicious node fault tolerance and efficient consensus agreement among Mesh nodes.Firstly,a trust model was designed for node reliability evaluation,which assigns corresponding trust values to nodes based on their different tasks.One method is to propagate task trust values based on the interaction between nodes and other nodes in executing tasks.This value is to evaluate the reliability of nodes as blockchain functional nodes in performing consensus,packaging,proposal submission,and other functional tasks.The second method is to assign a relay trust value to nodes based on their ability to forward data packets,which evaluates their honesty and ability to perform message forwarding tasks as wireless mesh network nodes.Finally,the two parameters are combined to obtain the comprehensive trust value of the node,and tasks of different importance are assigned to the nodes based on the trust value,making the division of labor more reasonable and improving the reliability of the system.Secondly,design a two-stage trust consensus algorithm TSTC(Two stage trust consensus algorithm)based on node trust values and multi device application scenarios.Firstly,divide network devices into several organizations based on the minimum routing cost.When reaching a consensus on a proposal,it is only necessary to perform Byzantine fault-tolerant authentication on the proposal within the organization of the initiating client,and then send the proposal to high trust nodes of other organizations for endorsement.Compared to traditional Byzantine consensus algorithms where all nodes participate in multicast communication consensus,this consensus solution can greatly reduce the resource consumption of consensus nodes.Moreover,TSTC replaces the traditional number of nodes with the proportion of trust values among nodes to achieve consensus.Nodes with higher trust values have higher consensus weights,thereby minimizing the impact of malicious nodes on consensus results.Finally,the TSTC algorithm is tested for transaction and security performance based on Docker container simulation nodes.A performance comparison was conducted with the Hyperledger Fabric blockchain system based on PBFT algorithm,Raft algorithm,and PoS+PBFT hybrid algorithm.The final conclusion is that in terms of the fault tolerance ability of malicious nodes(mainly targeting malicious behavior of nodes not performing blockchain tasks or interfering with message sending),the TSTC algorithm can accommodate more malicious nodes than PBFT and PoS+PBFT hybrid algorithms by reducing the consensus weight of malicious nodes,thereby improving the robustness of the network.In terms of transaction performance,the TSTC algorithm can have larger TPS and less resource consumption compared to the PBFT algorithm due to its reduced consensus size,and has stronger large-scale processing power and security compared to the Raft algorithm. |