Blockchain establishes reliable trust among parties that do not know each other and achieves credible data sharing and point-to-point value transmission in an epoch-making way. The requirement of the availability of block chain network becomes more and more important due to the dynamic and changeable characteristics of block chain P2P network. Therefore, for the characteristics of block chain P2P network system, this paper constructs a availability model based on Markov stochastic process theory, analyzes the steady-state availability and instantaneous availability of the model, and finally carries out experimental verification through simulation, hoping to provide beneficial inspiration and guidance for future research on block chain network.

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

The architecture of p2p networks in the blockchain

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[

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[

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

P2P network topology

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 — ^{-λt}, t^{-μt}, t ≥

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][

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

_{j}

The state transition probability matrix is represented by

State transition diagram

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 (

Where _{0}, _{ί},… …_{n-k+1}), Matrix

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.

_{0}(0) = 1, _{1}(0) = 0,… …, P_{k}(0) = 0, means that _{0} has a probability of 1 and the other states have a probability of 0 at the initial moment. Equation (

P(_{0}(_{1}(_{n-k+1}

This is a system of first order linear differential equations, the general form of its solution is:

Since

The Laplace transform of Formula (

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 _{i} of each state is obtained, and then according to Equation (

STEADY-STATE AVAILABILITY CALCULATION RESULTS 1

steady-state availability | |
---|---|

_{0} |
0.9985013113 |

_{1} |
0.001497752142 |

_{2} |
0.0000009362705703 |

_{3} |
0.0000000002535257376 |

A | 0.9999999997 |

STEADY-STATE AVAILABILITY CALCULATION RESULTS2

steady-state availability | |
---|---|

_{0} |
0.9880833998 |

_{1} |
0.01185708958 |

_{2} |
0.00005937422712 |

_{3} |
0.0000001284512973 |

A | 0.9999998637 |

STEADY-STATEAVAILABILITY CALCULATION RESULTS 3

steady-state availability | |
---|---|

_{0} |
0.9420286502 |

_{1} |
0.05653222481 |

_{2} |
0.001423815141 |

_{3} |
0.00001530938621 |

A | 0.9999846902 |

As can be seen from Table _{0} is the largest, and the probability of _{2} and _{3} are very small, even negligible.

Table

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

Steady-state availability trend diagram

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 (

Instantaneous availability graphs of multiple states

In Figure _{0}, _{1},_{2} and _{3} respectively. In order to make the graph more intuitive to reflect the change of the curve, the graph is divided into two parts, the left one are _{1}, _{2} and _{3}, with the vertical coordinate of 0 to 0.004, and the right one is _{0}, with the vertical coordinate of 0.996 to 1. When four nodes fail, the entire network system is down and the network is unavailable. From the figure, we can see that _{0} i.e. the zero nodes that are damaged gradually decrease from probability 1, and become stable after reaching a certain time point. The instantaneous availability of is very high, which is close to 1 indefinitely. While the instantaneous availability of other states is relatively small, _{1} gradually increases with time until it becomes stable, while the instantaneous availability of _{2} and _{3} are very small, approaching 0 infinitely. It can be seen that the probability of system failure is very small.

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.