Block chain is a distributed system composed of encryption mechanism, storage mechanism, consensus mechanism, which can realize the peer-to-peer trading function of mutual trust without central server. The biggest feature of blockchain is decentralization and distribution, and the consensus mechanism of blockchain enables participating nodes to jointly provide services for the system and realizes similar functions of financial intermediaries in the central system. As shown in Figure 1, blockchain system can achieve fast synchronization of data without central server and consistency of consensus mechanism through P2P network. P2P realizes the sharing of data resources and cooperation of services among terminal devices by means of direct exchange. However the dynamic and changeable of blockchain P2P network, the requirement of the availability of block chain network becomes more and more important.
From the development trend of p2p network, the demand of modeling and verification evaluation on the availability of p2p network is more and more common and urgent. The establishment of high availability network is the basis of accurate and timely information exchange, so as to meet the demand of network system to provide high reliable services for various users.
The traditional concept of availability is a typical measure of reliability in reliability theory. It is an important parameter in reliability engineering that combines maintainability to represent the effectiveness of the system. “Reliability” can only reflect the probability of failure of the network system or components, while “availability” can reflect the quality of the network by considering the repairability of the network. Therefore, analyzing the availability of tact network system is an important index to evaluate the design of system networking, system stability and maintenance ability.
At present, availability studies mainly focus on the reliability and maintainability of the engineering capability of complex systems, and also on the availability of mission capability. Lianhong Zhou established the availability model of optical fiber communication system by using the state transfer equation[1]. Hailin Feng used Markov theory to study the steady-state availability of repairable network system, and analyzed the fuzzy availability of repairable network system and continuous kn(F) network. Fenghua Xie studied the availability of “N+X” UPS system and pointed out that the availability of parallel system was positively correlated with the number of redundant modules[2]. Jingle Zhang proposed a workflow availability modeling method based on random Petri net and studied and established the SPN model of e-commerce system[3]. Jikun Yang fused sample data with prior information, used fuzzy variables to deal with the uncertainty of sample data, and proposed a usability analysis method of navigation weapon system based on fuzzy Bayes[4].
Above all of these, we can find that the research on the availability of p2p network is relatively few and not very mature now. Therefore, research available technology based on P2P distributed collaborative network under different environmental conditions, analyze the unified modeling and expression of information, build a new generation of block chain network usability evaluation model, improve the information interaction and collaboration ability of block chain platform, and ensure the performance of system service and the formation of stable and reliable operation ability through availability technology.
Block chain technology is the first kind that can be globally distributed deployment of consensus agreement. Block chain system achieves efficient consensus through simple unauthenticated broadcast channel and block chain length competition mechanism. The typical blockchain system consists of network layer, consensus layer, data layer, intelligent contract layer and application layer[5]. The network layer is usually based on P2P protocol for communication between nodes; the consensus layer implements the consensus protocol, which can be freely selected according to the actual scenario, such as PoW based on workload proof, and PoS based on equity proof; the data layer is the data structure of the block chain, whose structural design is usually closely coupled with the application scenario according to the actual needs, each computing node is responsible for maintaining its own storage system; the intelligent contract layer can perform different operations for different data input, this process is automatically executed based on the code, and consensus is reached across the network; the application layer is the basic business of the block chain system, such as financial services and data traceability, etc.
There is no central node in the block chain network based p2p, and any two nodes can be directly traded, each node is free to join and exit at any time. Therefore, the block chain platform usually chooses the P2P protocol which is completely distributed and can tolerate single point of failure as the network transmission protocol. Block chain network nodes have the characteristics of equality, autonomy and distribution, presenting a flat topology without any centralized authority nodes or hierarchical structure (as shown in Figure 2). Each node has such functions as route discovery, broadcast transaction, and broadcast block and find new nodes[6]. In the blockchain network, the P2P protocol of the blockchain network is mainly used for the transfer of transaction data and block data between nodes. The node listens to the data broadcast in the network all the time. It can only be processed after by verifying the validity of these transactions and blocks when receives new transactions and new blocks sent by the neighbor node.
Reliability is defined as the ability of a product to perform specified functions under specified conditions and within specified time periods. The higher the reliability, the lower the failure rate of the product. The simplest expression for reliability can be expressed as an exponential distribution, which expresses random failure.
Where,
Availability is defined as the ability to be in a state of executable function under specified conditions and at specified times or time intervals, provided that the required external resources are guaranteed. It is the comprehensive reflection of product reliability, maintainability and maintenance guarantee. The formula is as follows:
MTBF(Mean Time Between Failure)refers to the average working time between two adjacent failures and is a reliability indicator of a product.
MTTR(Mean Time To Repair)describes the average repair time when a product changes from a failure state to a working state. In engineering, MTTR is a measure of the maintainability of a product, which is common in maintenance contracts and is used as a measure of service charges.
According to the above analysis, “reliability” only reflects the probability of failure of the network system or components, while “availability” considers the repairability of the network and better reflects the quality of the network. Steady-state availability and instantaneous availability are two characteristic quantities that reflect availability. Therefore, analyzing the steady state availability and instantaneous availability of blockchain P2P network system is an important index to evaluate the design of system networking, system stability and maintenance ability.
P2P network system is a complex system, its nodes states are changing at anytime, while the factors causing the change of the state of nodes mainly include hardware and software errors, human errors, natural disasters, malicious attacked, causing serious consequences to the network system, and even causing the entire network paralysis. The probability of occurrence of the first several factors is relatively small, while as an artificial means, the probability of occurrence of malicious attack is very high in the real war environment.
In this paper, the P2P network system targeted is a multi-state Markov repairable system, assuming that its failures are caused by malicious attacks. The system is composed of several network nodes and several repair equipment. The life distribution of each node is 1 —
In the process of system design, it is usually necessary to chose availability model to describe the availability of the system. The availability model adopted in this paper is the voting system model of take k in n. There are two types of voting system models of take k in n: one is a system of take k good nodes in n, which requires k or more of the n nodes of the system to be normal in order for the system to work normally, which is denoted as k/n[G]. The other kind is the system of take k bad nodes in n, which means that the system cannot work properly if k or more of the n nodes of the system fail, which is denoted as k/n[F][7].This paper chose the second system model. When the fault nodes are less than k, the system works normally and repairs the fault nodes. When there are k node failures, the system will fail. At this time, the remaining normal working nodes will also stop working and will not fail. The system will work again until one node under repair is repaired and there are less than k nodes under repair.
The system studied in this paper simplifies the actual situation, the n nodes of the system are considered to be one type of node. For example, because the importance of each node is different in practice, the life distribution and repair time of the node may be different, so the node types are not all the same. Another example is that when a node fails, its workload must be borne by other nodes, thus accelerating the loss of other nodes. Therefore, these idealized conditions are temporarily listed as assumptions, called the basic type for analysis.
The number of fault nodes in the system is defined as the state of the system, i.e.
X(t)=j indicates that there are j node faults in the system at time t that need to be repaired, i.e. it is in the state of j, where
The state transition probability matrix is represented by
Steady-state availability is one of the reliability characteristics of markov repairable system, which means the proportion of the whole running time of the network without dismemberment when the network reaches the steady-state, it is the probability of the network being connected. This index is essentially the probability of connectivity at any time in the steady state. According to the properties of homogeneous Markov process:
According to formula (5), we get
Where
The value can be obtained by solving the linear equations, and the steady-state availability of the system is
Instantaneous availability is also one of the reliability characteristics of markov repairable system. For some high-reliability systems like P2P networks, it takes a long time to reach their stable state, and the steady-state availability may also be disturbed during the system operation. Therefore, it is not enough to calculate the steady-state availability, but to consider the instantaneous index of the system.
From the C-K equation, we can obtain that the instantaneous probability is:
The intuitive meaning of the C-K equation is start from state i and arrive at state j after s+ttime, and must first arrive at any state r after s time, and then transfer from state r to state j after t time.
P(
This is a system of first order linear differential equations, the general form of its solution is:
Since
The Laplace transform of Formula (10) simplifies to
Where
However, it is difficult to obtain analytic expressions by *( ) inverse transformation. Results can be obtained by means of calculation tools, such as Matlab, Maple and other scientific calculation software.
Take Figure %2 as an example, the number of network nodes is 6, and the minimum number of network nodes that can work normally is 4, that is4/6[F] voting system. According to Equation (7), steady-state availability
STEADY-STATE AVAILABILITY CALCULATION RESULTS 1
steady-state availability | |
---|---|
0.9985013113 | |
0.001497752142 | |
0.0000009362705703 | |
0.0000000002535257376 | |
A | 0.9999999997 |
STEADY-STATE AVAILABILITY CALCULATION RESULTS2
steady-state availability | |
---|---|
0.9880833998 | |
0.01185708958 | |
0.00005937422712 | |
0.0000001284512973 | |
A | 0.9999998637 |
STEADY-STATEAVAILABILITY CALCULATION RESULTS 3
steady-state availability | |
---|---|
0.9420286502 | |
0.05653222481 | |
0.001423815141 | |
0.00001530938621 | |
A | 0.9999846902 |
As can be seen from Table 1, 2 and 3, As can be seen from Table 1, 2 and 3, the probability of
Table 4 is the steady-state availability of a different μ and lambda system. Figure %1 is the curve trend diagram of Table 4, a more intuitive reflection of how steady-state availability varies with μ and λ
STEADY-STATEAVAILABILITY CALCULATION RESULTSOFTHE SYSTEM
2000 | 500 | 100 | |
2.5 | 0.9999999609 | 0.999996172 | 0.9988771093 |
1.5 | 0.9999999928 | 0.9999994802 | 0.9999020658 |
1 | 0.9999999979 | 0.9999998637 | 0.9999846902 |
0.5 | 0.9999999997 | 0.9999999837 | 0.9999979543 |
In Table 4, the upper parameter is the node average failure parameter λ, the left parameter is μ. The x-coordinate of Figure %4 is the average node failure parameter λ, the y-coordinate is steady-state availability, and the four different curves are the average node repair time μ. As can be seen from Table 4 and Figure %4, under the Markov model, the steady-state availability of the system is very high, close to 1. The larger the λ, the smaller the μ, the more stable the system can be, which is consistent with the changing rules of P2P networks.
According to the analysis of 5.3, P2P network availability cannot be fully reflected by calculating steady-state availability. Therefore, we also need to calculate the instantaneous availability of the system, and calculate the instantaneous availability of the system according to Equations (12) and (13) with the parameters used in Table 1. The results are shown in the following Figure %5.
In Figure %5, the horizontal axis is time and the vertical axis is instantaneous availability. Since k=4, there are four curves in the instantaneous curves of multiple states, corresponding to
For P2P networks, the discrete time Markov chain method is used to establish a model of state transition in P2P networks in this paper, and the repairability of network nodes is considered. The calculation formulas of steady-state availability and instantaneous availability are given by using the model, and the results of the above calculation are obtained. The results are compared with the changing rules of the network system, which conforms to the availability requirements of the P2P network. It shows that this model has certain reference value in the availability test of tactical P2P network.