Xi'an Technological University
Subject: Computer Science, Software Engineering
eISSN: 2470-8038
SEARCH WITHIN CONTENT
Zan Wang ^{*} / Yanfang Fu ^{*} / Lianjiong Zhong ^{*} / Fei Dai ^{*}
Keywords : lockchain, P2p, Markov, Availability
Citation Information : International Journal of Advanced Network, Monitoring and Controls. Volume 5, Issue 1, Pages 36-43, DOI: https://doi.org/10.21307/ijanmc-2020-006
License : (CC-BY-NC-ND 4.0)
Published Online: 02-April-2020
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 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, t is mission time, λ is failure rate.
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 — e^{-λt}, t ≥ 0, λ > 0, and the repair time after node failure is 1 — e^{-μt}, t ≥ 0, μ>0. All of these random variables are independent of each other, and after the fault node is repaired, its life will be the same as the new node. Multi-state means that the nodes of the network system are damaged by attack, which may break one, two or more nodes; the number of fault nodes is different means the system state is different.
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. E = { 0, 1, … …, n — k + 1 }, where the working states of the system are W = {0, 1,… …, n —k}, obviously, the working quality (quality of service) of the different working nodes included in these working states is different, but it is not differentiated in the basic type analysis, and all of them are considered as normal working.
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 = { 0,1, … …, n — k + 1}. Node life and maintenance time obey the exponential distribution, according to the above, can prove to be time continuous multi-state time homogeneous Markov chain, state transition probability in Δt time is shown in the following Formula (3).
P_{j} represents the probability that the system is in state j at time t. This is the Markov model of P2P network multi-state repairable system. The state transition probability diagram of the system is shown in Figure 3: (the state of transition to itself is not shown in the figure)
The state transition probability matrix is represented by A, as follow:
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 π is the probability distribution vector of state in steady state, π = (π_{0}, π_{ί},… …, π_{n-k+1}), Matrix A is substituted into Equation (6), and we get
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_{0}(0) = 1, P_{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 (9) is expressed as a matrix differential equation in the following form:
P(t) = P_{0}(t),P_{1}(t),… …, P_{n-k+1}(t) represents the distributed probability of the system in various states at time t, is the row vector, and is also a one-dimensional matrix. P′(t) represents the derivative matrix of instantaneous probability of the system at time t
This is a system of first order linear differential equations, the general form of its solution is:
Since P and A are matrices, it is difficult to find the analytic expression of the above equation, we can use the Laplace transform to find A simpler expression, and let
The Laplace transform of Formula (10) simplifies to
Where I is the identity matrix, P(t) can be obtained by inverting transform P* (s), then the instantaneous availability of the system is
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 π_{i} of each state is obtained, and then according to Equation (8), steady-state availability A of the network system is obtained. Table 1 is for steady-state availability of each states and the system when μ=0.5 hours and λ =2000 hours, Table 2 is for steady-state availability of each states and the system when μ=0.5 hours and λ =500 hours, and Table 3 is for steady-state availability of each states and the system when μ=1 hours and λ =100 hours.
As can be seen from Table 1, 2 and 3, As can be seen from Table 1, 2 and 3, the probability of π_{0} is the largest, and the probability of π_{2} and π_{3} are very small, even negligible.
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 λ
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π_{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.