CN114500046A - Consensus algorithm based on field area network and IOTA - Google Patents
Consensus algorithm based on field area network and IOTA Download PDFInfo
- Publication number
- CN114500046A CN114500046A CN202210092079.XA CN202210092079A CN114500046A CN 114500046 A CN114500046 A CN 114500046A CN 202210092079 A CN202210092079 A CN 202210092079A CN 114500046 A CN114500046 A CN 114500046A
- Authority
- CN
- China
- Prior art keywords
- time
- transaction
- node
- iota
- tips
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000003071 parasitic effect Effects 0.000 claims abstract description 58
- 238000004364 calculation method Methods 0.000 claims abstract description 47
- 230000005540 biological transmission Effects 0.000 claims description 90
- 230000001186 cumulative effect Effects 0.000 claims description 48
- 238000012795 verification Methods 0.000 claims description 28
- 238000000034 method Methods 0.000 claims description 21
- 239000004576 sand Substances 0.000 claims description 6
- 239000002904 solvent Substances 0.000 claims description 6
- 239000000126 substance Substances 0.000 claims description 6
- 238000010586 diagram Methods 0.000 claims description 5
- 238000012544 monitoring process Methods 0.000 claims description 5
- 230000000739 chaotic effect Effects 0.000 claims description 4
- 238000009825 accumulation Methods 0.000 claims description 3
- 238000013480 data collection Methods 0.000 claims description 3
- 230000003247 decreasing effect Effects 0.000 claims description 3
- 239000000463 material Substances 0.000 claims description 3
- 229920006395 saturated elastomer Polymers 0.000 claims description 3
- 235000008694 Humulus lupulus Nutrition 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000010248 power generation Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- RWSOTUBLDIXVET-UHFFFAOYSA-N Dihydrogen sulfide Chemical compound S RWSOTUBLDIXVET-UHFFFAOYSA-N 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 238000007710 freezing Methods 0.000 description 1
- 230000008014 freezing Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/08—Access security
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W74/00—Wireless channel access
- H04W74/08—Non-scheduled access, e.g. ALOHA
- H04W74/0808—Non-scheduled access, e.g. ALOHA using carrier sensing, e.g. carrier sense multiple access [CSMA]
- H04W74/0816—Non-scheduled access, e.g. ALOHA using carrier sensing, e.g. carrier sense multiple access [CSMA] with collision avoidance
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a consensus algorithm based on a field area network and an IOTA (internet of things), which comprises the steps of firstly establishing an IOTA consensus time analysis model in the field area network; the IOTA consensus time calculation in the field area network comprises the time for writing the transaction into the tan gle, the time for transmitting the transaction in the network and the consensus time; then establishing a parasitic chain attack success probability analysis model, and analyzing and calculating the ratio of the calculation power required by the malicious node to the total calculation power of the honest nodes in the network if the malicious node wants to attack successfully on the basis of the known honest node event arrival rate; finally, on the basis of the analysis model, a new blockchain consensus algorithm for reducing consensus time by reducing the tan gle writing time is provided, and the IOTA nodes and the adjacent terminals form a cluster; all members of the cluster cooperate to complete the task, the calculation result is returned to the IOTA node, and then the IOTA node writes the data into the angle, so that the consensus time of the network is reduced.
Description
Technical Field
The invention relates to the technical field of wireless communication, in particular to a consensus algorithm based on a field area network and an IOTA.
Background
With the large-scale development of renewable energy distributed power generation, the next generation of power grid, i.e., smart grid, has been developed by integrating the current information network and information system with the conventional energy network into a new power grid system. However, the current smart grid still faces some challenges, such as lack of effective transaction trust between consumers and renewable energy power generation, difficulty in achieving dynamic balance of energy supply and demand, emergence of network physical security threats, and security of large-scale data sharing. To address these challenges, many researchers are investigating the applicability of blockchain techniques in SGs. For example, the block chain has some important application fields in SG, and can effectively solve the following problems: 1) enabling trusted distributed energy transactions, 2) overcoming privacy and security related challenges, 3) remotely controlling energy flow for a particular area by monitoring usage statistics for the particular area, and 4) assisting in diagnosis and maintenance of SG devices.
However, in SGs with millions of distributed wireless terminals, the selection of block chains is an important issue. It is well known that the consistency algorithm plays a key role in the security and consistency of blockchains. Current popular consensus algorithms include proof of workload (PoW), proof of rights and interests (PoS), and Practical Byzantine Fault Tolerance (PBFT). The core idea of PoW is competition for computing power. Miners continue to hash for the right to generate additional blocks, and this is not the case for poorly computing SGs. PoS determines the probability of the participant gaining accounting rights by evaluating the number and duration of tokens held. In PoS, the higher the probability that a participant with a higher coin age will obtain the right to create a new tile, which may lead to monopoly. In PBFT, there is a primary node in the PBFT consensus mechanism, and the rest of the nodes are generally called replicas. The client sends a request to the master node, and then all honest replica nodes execute the sequence of all transaction requests in the blockchain network by running a protocol consisting of three phases of pre-preparation, preparation and commit. The PBFT consensus algorithm has a high consensus speed, but needs to know the number of all participants in advance, is difficult to expand and is not suitable for SG.
Therefore, due to the inherent characteristics of large SG network size, fast access, limited computing resources, frequent transactions, etc., the conventional consensus algorithm cannot be effectively applied to the network. Therefore, there is a need to develop a consensus algorithm that is resource efficient, low cost, high transaction throughput, and supports concurrency. The IOTA is developed specifically for the internet of things, has a Directed Acyclic Graph (DAG) consensus mechanism, breaks the single chain structure of the consensus mechanism, and allows all nodes to insert new transactions into the distributed ledger immediately after processing and verifying previous transactions. Tangle is a third generation blockchain based on the DAG architecture. The advantage of Tangle is: 1) no transaction fee; 2) reducing resources; 3) reducing the verification delay of the transaction; 4) greater network throughput. The IOTA system is therefore well suited for SG networks.
However, the current research on the problem is mainly focused on a specific consensus algorithm, and a consensus time analysis model aiming at different network scales and different transmission protocols is lacked.
Disclosure of Invention
The purpose of the invention is as follows: aiming at the problems in the prior art, the invention provides a consensus algorithm based on a field area network and an IOTA, comprehensively considers the number of data wireless transmission hops, a communication protocol and the number of selected tips, establishes a success probability analysis model of field area network consensus time and parasitic chain attack, solves the problem of SG network data and transaction security sharing, and provides a new block chain consensus algorithm on the basis, thereby reducing transaction delay and improving system throughput.
The technical scheme is as follows: in order to achieve the purpose, the invention adopts the technical scheme that:
a consensus algorithm based on a field area network and an IOTA comprises the following steps:
step S1, establishing an IOTA consensus time analysis model in the field network; the IOTA consensus time calculation in the field area network comprises the time for writing the transaction into the tan gle, the time for transmitting the transaction in the network and the consensus time; in particular, the amount of the solvent to be used,
step S1.1, trading the time for writing into the angle;
the time that the transaction writes into tandles correlates with the amount of work done to demonstrate the PoW difficulty and the computing power of the device; when a transaction is written into the tangle, firstly selecting unverified transaction tips in the tangle for verification, then performing PoW calculation, finally writing data into the local tangle, and broadcasting the calculation result and the selected tips to the IOTA network; ignoring the verification time of tips, and taking the calculation time of the PoW as the time for writing the transaction into the tan gle;
step S1.2, trading the time of transmission in the network;
selecting a Gossip protocol for transaction transmission, and periodically forwarding the transaction owned by the node but not owned by the adjacent node to the adjacent node; the neighbor node receiving the forwarding message repeats the forwarding step; finally, the transaction information is transmitted to the whole network through forwarding of a plurality of rounds; the transmission time of the transaction, namely the transmission hop number of the transaction in the network is multiplied by the transmission time delay of each hop; neglecting the transmission delay of the wired network, wherein the transmission delay of each hop of the network in the field domain network FAN is the transmission delay in the wireless mesh network mesh; s1.3, consensus achievement time;
the time to reach consensus is the time from when the transaction first exists in all IOTA nodes until each tips can see it, i.e., the time required for the tips to be selected for verification; after the IOTA node writes the transaction into the angle, when the tips number of the transaction is verified to be equal to the prompt number in the network, the consensus is achieved, and the transaction cannot be changed;
step S2, establishing a parasitic chain attack success probability analysis model;
the parasitic chain attack success probability analysis model refers to a closed expression of the probability of the parasitic chain attack success, the honest node event arrival rate and the malicious node event arrival rate; in particular, the amount of the solvent to be used,
as shown in fig. 5, the node first sends a transaction a, and after the transaction is completed consistently, the node receives the material corresponding to the transaction; at the moment, the node sends a double-flower transaction b, when the final accumulated weight of the transaction b is greater than a, the transaction a is abandoned, and the attack is successful at the moment; if the parasitic chain selects transaction d initiated after the consensus completion time for verification, transaction b verifies transaction a; each transaction that verifies transaction b indirectly verifies transaction a, at which point the parasitic chain attack cannot succeed; the transaction selected by the parasitic chain should therefore be a transaction initiated before the agreed upon completion time; after the transaction is selected, attack can be successful only by constructing that the cumulative weight of the parasitic chain is larger than that of the transaction a; calculating the proportion of the calculated amount required by the malicious node when the attack is successful to the calculated amount of the whole network, so as to obtain the probability of successful attack;
step S3, establishing a block chain consensus algorithm based on a field area network and an IOTA;
the IOTA node and the adjacent terminal are combined into a cluster; the terminal sends the transaction to the IOTA node; when the IOTA node receives enough transactions, the IOTA node packs all the transactions and distributes PoW tasks to terminals in the cluster; all members in the cluster collaboratively complete respective tasks, the calculation result is returned to the IOTA node, and the IOTA node writes data into the tandle.
Further, the specific calculation method of the transaction writing time of the tan gle in the step S1.1 is as follows:
setting the number of nodes in the IOTA network as N, when a node i has a transaction written into a tan gle, firstly selecting k tips for verification, then performing PoW calculation, finally writing data into a local tan gle, broadcasting the calculation result and the selected tips to the IOTA network, and writing the transaction of the node i into the time tiComprises the following steps:
wherein d isPiFor the number of calculation cycles of PoW, fiIs the computing power of node i; the average time interval h for a transaction to write a local angle is:
the specific calculation method of the time of the transaction transmitted in the network in step S1.2 is as follows:
for an IOTA network with N nodes, setting that each node has m +1 neighbors, transmitting to m neighbors each time, setting the average time of transmission of each hop as T, and the probability of successful reception of an event as p, and then the network transmission is equivalent to pm cross tree, and the total transmission hop number is:
L=logpm(pmN-N+1)-1
the total transmission time is LT;
based on an 802.11MAC broadcast protocol and a Gaussian channel, when data is saturated, calculating the average transmission time T of each hop;
when a node has a data packet to send, the node starts to monitor the channel state, when the idle time of the channel is detected to exceed a distributed frame interval (DIFS), the node enters a backoff stage, otherwise, the node is in the channel monitoring state all the time; after the node enters a backoff stage, randomly selecting a backoff time slot value and starting a backoff counter; when the channel is in an idle state, the backoff counter is decreased by taking a time slot as a unit along with the idle time of the channel, and a data packet is sent until the backoff counter is zero; when the channel is busy in the backoff counter decrementing process, the backoff counting process is frozen, the node monitors the channel again until the channel idle time exceeds DIFS, and returns to the backoff stage again and continues the frozen backoff decrementing process;
setting a back-off time setting range to {1-w0The probability tau of the node transmitting data is 2/(w)0+1), probability p of successful transmission of data in one virtual slots=nτ(1-τ)n-1The probability of channel being idle is pi=(1-τ)nProbability of busy channel is pbsy=1-pi=1-(1-τ)nWherein n is the number of nodes which are likely to generate collision; within a virtual time slot, the probability of collision is pc=1-ps-piWhen the channel successfully transmits data or a collision occurs, the transmission delay of the data comprises: data transmission delay LenThe method comprises the following steps of/r, waiting time delay DIFS before distributed frame transmission and propagation time delay delta; wherein L isenThe total length of the frame comprises an MAC data packet header and a physical data packet header, and r is a sending rate; delay T for busy channel due to successful transmissionsAnd a time delay T of channel busy caused by collisioncComprises the following steps:
the latency required for each technique of the backoff counter includes: when the channel is idle, the back-off counter is reduced by 1 every time, the time interval is one physical time slot sigma, when the channel successfully transmits data, the back-off counter is frozen, and the waiting time is TsAnd when the channel is collided, the back-off counter is frozen, and the waiting time is Tc(ii) a The backoff counter therefore waits for an interval of time on average:
t0=(1-pbsy)σ+psTs+pcTc
t0namely a virtual time slot; the initial value D of the back-off timer is set to {1-w0Are evenly distributed, then E [ D ]]=(w0+ 1)/2; for n nodes which are likely to generate collision, the timer performs 1-down counting after setting the initial value, and the back-off time E [ D ] of each node is averagedn]=(w0+1)/2n, the average time delay for transmitting a data frame is:
setting packet size of IOTA to LpOne data frame of size LenThen, the average time to transmit an IOTA packet is:
calculating the probability of successful reception of the IOTA data packet by adopting M-system QAM codes; the bit error rate is expressed as follows:
by the probability of data transmission errors beingThe data transmission failure includes data transmission error or collision, and therefore, the probability of the data transmission failure is: p is a radical ofr=pc+pe-pc*peThe probability of successfully transmitting an IOTA packet is:
the method for calculating the consensus reaching time in the step S1.3 is as follows:
in tangle, the total number of tips R0Maintaining a stable state, and satisfying:
at the time t-h, the number of tips is R0At time t, the number of tips is still R0And during the h period, the number of event arrivals is λ h, whereThus, for a tips at time t-h, the probability of a transaction having been verified at time t is
Setting the time t-h, and verifying that the tips number of the sitesi is psi (t-h); wherein the verified transaction is called sitesi and the unverified transaction is noted as tipsi; tips at time t-h, and the set that has been verified at time t is: i a i p ψ (t-h) (k-1) ψ (t-h)/k; tips at time t-h and the set of still tips at time t are: i | (1-p) ψ (t-h) ═ ψ (t-h)/k; the tips set without verification of sitesi at time t-h is | C |; at the time of t-h, when a transaction arrives, k tips are required to be selected from all tips for verification, and if the selected tips are in psi (t-h), the newly arrived transaction indirectly verifies sitei; if k tips are all selected from the set B, verifying that the number of tips of sitesi is reduced by k-1; k tips are selected from the set B to be k-1, one of A or C is selected, the number of tips for verifying the sitesi is reduced by k-2, and by analogy, k tips are not selected from B, and at least one selected A is added with 1 when the number of tips for verifying the sitesi at the time t is selected; the following probabilities can be obtained:
……
when psi (t) ═ R0Then, sitei agrees, and the agreement agrees in time:
when network transmission delay is ignored, the consensus time is as follows:
when the network transmission is added, delaying, writing a transaction into the angle by a node i in the network at a certain moment, wherein the tipsi is only visible in the local angle of the node i before the tipsi is transmitted to other nodes, and when other new transactions arrive, only the transactions arriving in the node i can select the tipsi as a father node; when data is put in a local angle but is not transmitted to a neighbor node, namely T < T, the number of tips for verifying the tipsi is psi (T) ═ 1/N exp (at/h), when T <2T, the tipsi is transmitted to pm neighbor nodes, at the moment, the number of tips for verifying the tipsi is psi (T) ═ 1/N exp (at/h) + (pm/N) exp (a (T-T)/h), and the same can be obtained, and in the period from the time when the transaction is written into the angle for the first time to the time when the broadcast in the network is completed, the number of tips for verifying the tipsi is:
wherein, t0For the time from the data writing into the angle to the completion of the consensus, when ψ (t) ═ R0Then, sitei agrees, so agreement is reached for time tcComprises the following steps:
under the condition that the network transmission delay is not negligible, the consensus time is as follows:
further, the specific method for establishing the parasitic chain attack success probability analysis model in the step S2 is as follows:
setting the event arrival rate of honest nodes as lambda and the event arrival rate of malicious nodes as mu, the cumulative weight when transaction a reaches consensus is phi (t)0) Wherein t is0The time it takes for the transaction to write a match to a consensus;
for honest nodes, after consensus is achieved, as things issued by each honest node verify tips which are already known, the growth rate of the cumulative weight is lambda and the growth rate of the cumulative weight of transaction b is mu after consensus is achieved for transaction a; setting the time of transaction a release as T1Parasitic chain start time is T2(ii) a If T2After the consensus completion time t of the transaction a, the transaction b verifies the transaction a, namely, each transaction of the verification transaction b indirectly verifies the transaction a, the parasitic chain attack cannot be successful, and therefore, the parasitic chain starting time is smaller than the consensus completion time t0(ii) a When the transaction a consensus is reached, the cumulative weight of the parasitic chain is μ (t)0-T2) The cumulative weight of honest nodes is phi (t)0-T1) (ii) a Thus, if the attack is successful, after consensus is achieved, the parasitic chain cumulative weight should be greater than the honest node cumulative weight, i.e., (t)0-T1)-μ(t0-T2)<0; setting T1=T20, i.e. the parasitic chain starts to prepare when transaction a writes a, then (t)0)-μ(t0)<0; next, the cumulative weight phi (t) at the time of completion of consensus is calculated separately0) And the probability that the parasitic chain transaction a starts to prepare and attack successfully at the moment of writing into the tan gle;
cumulative weight at transaction consensus completion: when a new transaction arrives, at least one of the k tips verifies sitei, the new transaction can indirectly verify the sitei, and the cumulative weight of the sitei is added with 1; the probability of at least one tips verification site i is 1- (1-psi (t-h)/R0)k
Where φ (t) is the cumulative weight;
the following can be obtained:
thus, the cumulative weight φ (t) can be calculated as:
since the weight accumulation time is mainly in the data transmission stage and the consensus achievement stage, t in the above formula is the sum of the data transmission time and the accumulated weight time0The cumulative weight is expressed as follows:
probability of success of parasitic chain attack: as the honest nodes conform to Poisson distribution with the event arrival rate of lambda, the time intervals of the adjacent things of the honest nodes are independent and equally distributed exponential variables, and the 1/lambda exponential distribution is obeyed; in the same way, the time interval of the adjacent things of the malicious node is 1/mu of independent and identically distributed index variable; the following can be obtained:
when mu is>When the value is more than or equal to lambda, the cumulative weight of transaction b is more than that of transaction a, and the attack success is possible, namely phi (t)0)-μ(t0)>0; when the attack is successful, the malicious node should catch up the difference phi (t) of the parasitic chain and the cumulative weight of the verification transaction a0)-μ(t0) Thus, the probability of success of a parasitic chain attack is:
further, the establishing of the blockchain consensus algorithm based on the field area network and the IOTA in the step S3 specifically includes: an IOTA node and adjacent terminals form a cluster. The terminal sends a transaction to the IOTA node. When the IOTA node receives enough transactions, it will bundle all transactions and distribute the PoW tasks to the terminals in the cluster. All members of the cluster cooperate with each other to complete respective tasks, a calculation result is returned to the IOTA node, and then the IOTA node writes data into a chaotic node. Thus, the workload of the IOTA node, and the time required to write data to the chaotic data, can be significantly reduced.
After clustering, data can be written into the tandle only after the transaction reaches the maximum value of the IOTA data packet, and then the data collection time is as follows:
wherein n istIs the average number of transactions in a data packet, NgIs the number of nodes in a cluster, λiEvent arrival rate for node i; the time for writing data into the tandle is mainly PoW calculation time, and the PoW after clustering is completed cooperatively by members in the cluster, so the time for writing data into the tandle is as follows:
wherein d isPiNumber of calculation cycles for PoW calculation, FiTotal computing power for cluster iThe average time interval for the event to write to the local tangle is:
because data only needs to be transmitted to the IOTANode node in the network, the time for transmitting the data in the network is less than or equal to the transmission time when the data are not clustered, and the maximum transmission time LT is taken;
the consensus time is:
Consensus time is expressed as follows:
has the advantages that:
the consensus algorithm based on the field area network and the IOTA provided by the invention is aimed at a large-scale distributed wireless network of SG, an IOTA analysis model is established under the condition of considering network transmission delay, a basis is provided for block chain application analysis of the distributed wireless network, a closed expression of consensus time of parasitic chain attack success probability is further deduced, a basis is provided for calculation of the block chain consensus time of the distributed wireless network and probability analysis of parasitic chain attack, a novel consensus algorithm for node clustering and coordinated completion of PoW among nodes is finally provided, the IOTA consensus time is reduced, and the transaction efficiency is improved.
Drawings
FIG. 1 is a schematic view of the Tangle structure;
FIG. 2 is a system model diagram of the consensus algorithm provided by the present invention;
FIG. 3 is a schematic diagram of a tips selection algorithm in an embodiment of the present invention;
FIG. 4 is a schematic diagram of tips locations selected for a parasitic chain attack in an embodiment of the present invention;
fig. 5 is a schematic diagram of a parasitic chain attack time point in an embodiment of the invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention comprehensively considers the number of data wireless transmission hops, the communication protocol and the number of selected tips, establishes a field area network consensus time and a success probability analysis model of parasitic chain attack, and provides a new block chain consensus algorithm on the basis, as shown in figure 2. The method specifically comprises the following steps:
and step S1, establishing an IOTA consensus time analysis model in the field area network. The IOTA consensus time calculation in the LAN includes the time when the transaction is written into the tan gle, the time when the transaction is transmitted in the network and the consensus time. In particular, the amount of the solvent to be used,
step S1.1, transact the time for writing the tan gle.
The time a transaction writes a tan gle is related to the amount of work done to justify the difficulty of the PoW and the computing power of the device. When a node has a transaction written into the angle, tips are selected to be verified, then PoW calculation is carried out, finally data are written into the local angle, and the calculation result and the selected tips are broadcasted to the IOTA network. Since the tips verification time is negligible compared with the PoW calculation time, the time required from the selection of tips by the node i to the successful writing of the event into the local angle is mainly the PoW calculation time, and the PoW calculation time is used as the time for writing the transaction into the angle.
Setting the number of nodes in the IOTA network as N, when a node i has a transaction written in the tandle, firstly selecting k tips for verification, then performing PoW calculation, finally writing data in the local tandle, broadcasting the calculation result and the selected tips to the IOTA network, and writing the transaction of the node i into the time tiComprises the following steps:
wherein d isPiNumber of cycles for calculation of PoW, fiIs the computational power of node i. The average time interval h for a transaction to write a local angle is:
step S1.2, time of transmission in the network is traded.
And selecting a Gossip protocol for transaction transmission, and periodically forwarding the transaction owned by the node but not owned by the adjacent node to the adjacent node. The neighbor node that receives the forwarding message repeats the forwarding step. The transaction information is ultimately communicated throughout the network by forwarding through multiple rounds. The transmission time of the transaction, i.e. the number of transmission hops of the transaction in the network, is multiplied by the transmission delay per hop. Neglecting the transmission delay of the wired network, the transmission delay of each hop of the network in the FAN is the transmission delay in the mesh.
For an IOTA network with N nodes, setting that each node has m +1 neighbors, transmitting to m neighbors each time, setting the average time of transmission of each hop as T, and the probability of successful reception of an event as p, and then the network transmission is equivalent to pm cross tree, and the total transmission hop number is:
L=logpm(pmN-N+1)-1
the total transmission time is LT.
Based on the 802.11MAC broadcast protocol, gaussian channel, when the data is saturated, the average transmission time per hop T is calculated.
When a node has a data packet to send, the node starts to monitor the channel state, when the idle time of the channel is detected to exceed a distributed frame interval DIFS, the node enters a backoff stage, otherwise, the node is in the channel monitoring state all the time. And after the node enters a backoff stage, randomly selecting a backoff time slot value and starting a backoff counter. When the channel is in an idle state, the backoff counter is decreased by taking a time slot as a unit along with the idle time of the channel, and the data packet is transmitted until the backoff counter is zero. And when the channel is busy in the backoff counter decrementing process, freezing the backoff counting process, and monitoring the channel again by the node until the channel idle time exceeds DIFS, returning to the backoff stage again and continuing the frozen backoff decrementing process.
Setting a back-off time setting range to {1-w0The probability tau of the node transmitting data is 2/(w)0+1), probability p of successful transmission of data in one virtual slots=nτ(1-τ)n-1The probability of channel being idle is pi=(1-τ)nProbability of busy channel is pbsy=1-pi=1-(1-τ)nAnd n is the number of nodes which can generate collision. Within a virtual time slot, the probability of collision is pc=1-ps-piWhen the channel successfully transmits data or a collision occurs, the transmission delay of the data comprises: data transmission delay Len/r, latency DIFS before transmission of the distributed frame and propagation delay δ. Wherein L isenThe total length of the frame includes a MAC data packet header and a physical data packet header, and r is the transmission rate. Delay T for busy channel due to successful transmissionsAnd a time delay T of channel busy caused by collisioncComprises the following steps:
the latency required by the backoff counter per technique includes: when the channel is idle, the back-off counter is reduced by 1 every time, the time interval is one physical time slot sigma, when the channel successfully transmits data, the back-off counter is frozen, and the waiting time is TsAnd when the channel is collided, the back-off counter is frozen, and the waiting time is Tc. The backoff counter therefore waits for an interval of time on average:
t0=(1-pbsy)σ+psTs+pcTc
t0i.e. a virtual time slot. The initial value D of the back-off timer is set to {1-w0Are evenly distributed, then E [ D ]]=(w0+1)/2. For n nodes which are likely to generate collision, the timer performs 1-down counting after setting the initial value, and the back-off time E [ D ] of each node is averagedn]=(w0+1)/2n, the average time delay for transmitting a data frame is:
setting packet size of IOTA to LpOne data frame of size LenThen, the average time to transmit an IOTA packet is:
and calculating the probability of successful reception of the IOTA data packet by adopting M-ary QAM codes. The bit error rate is expressed as follows:
by the probability of data transmission errors beingThe data transmission failure includes data transmission error or collision, and therefore, the probability of the data transmission failure is: p is a radical of formular=pc+pe-pc*peThe probability of successfully transmitting an IOTA packet is:
and S1.3, consensus achievement time.
The agreed-upon time is the time it takes for each tips to see it from the first time the transaction exists in all IOTA nodes, i.e., the time it takes for the tips to be selected for verification. After the IOTA node writes the transaction into the angle, when the tips number of the transaction is verified to be equal to the prompt number in the network, the consensus is achieved, and the transaction cannot be changed.
In tangle, the total number of tips R0Is maintained in a stable state and satisfies the following conditions:
at the time t-h, the number of tips is R0At time t, the number of tips remains R0And in hWithin the time period, the number of event arrivals is λ h, whereThus, for a tips at time t-h, the probability of a transaction having been verified at time t is
As shown in FIG. 3, the number of tips of the verified sitesi is set to ψ (t-h) at time t-h. Where the transaction that has been validated is called sitesi and the unverified transaction is noted as tipsi. Tips at time t-h, and the set that has been verified at time t is: i a | ═ p ψ (t-h) ═ k-1 ψ (t-h)/k. Tips at time t-h and the set of still tips at time t are: i B | (1-p) ψ (t-h) | ψ (t-h)/k. At the time of t-h, the tips set of sitesi is not verified to be | C |; at time t-h, when a transaction arrives, k tips from all tips need to be selected for verification, and if the selected tips are in ψ (t-h), the newly arrived transaction will indirectly verify sitei. If all k tips are selected from set B, the number of tips verifying sitesi is reduced by k-1. And selecting k-1 tips from the set B by k tips, selecting one from A or C, reducing the number of the tips for verifying sitesi by k-2, and repeating the steps until k tips are not selected from B, and if at least one tip is selected from A, adding 1 to the number of the tips for verifying the sitesi at the time t. The following probabilities can be obtained:
……
when psi (t) ═ R0Then, sitei achieves consensus, the consensus time is:
when network transmission delay is ignored, the consensus time is as follows:
when the network transmission is added, delay is delayed, at a certain moment, a node i in the network writes a transaction into the angle, at the moment, before the tipsi is transmitted to other nodes, the tipsi is only visible in the local angle of the node i, and when other new transactions arrive, only the transactions arriving in the node i can select the tipsi as a father node. When data is put in a local angle but is not transmitted to a neighbor node, namely T < T, the number of tips for verifying the tipsi is psi (T) ═ 1/N exp (at/h), when T <2T, the tipsi is transmitted to pm neighbor nodes, at the moment, the number of tips for verifying the tipsi is psi (T) ═ 1/N exp (at/h) + (pm/N) exp (a (T-T)/h), and the same can be obtained, and in the period from the time when the transaction is written into the angle for the first time to the time when the broadcast in the network is completed, the number of tips for verifying the tipsi is:
wherein, t0For the time from the data writing into the angle to the completion of the consensus, when ψ (t) ═ R0Then, sitei agrees, so agreement is reached for time tcComprises the following steps:
under the condition that the network transmission delay is not negligible, the consensus time is as follows:
and step S2, establishing a parasitic chain attack success probability analysis model.
The parasitic chain attack success probability analysis model refers to a closed expression of the probability of the parasitic chain attack success, the honest node event arrival rate and the malicious node event arrival rate. In particular, the amount of the solvent to be used,
as shown in fig. 5, the node first sends a transaction a, and after the transaction is completed, the node receives the material corresponding to the transaction. At the moment, the node sends a double-flower transaction b, when the final accumulated weight of the transaction b is greater than a, the transaction a is abandoned, and the attack is successful. Transaction b validates transaction a if the parasitic chain chooses to validate transaction d initiated after the consensus completion time. Each transaction that verifies transaction b indirectly verifies transaction a, when a parasitic chain attack is unlikely to succeed. The transaction selected by the parasitic chain should be a transaction initiated before the agreed upon completion time is negotiated. After the transaction is selected, the attack can be successful only by constructing that the cumulative weight of the parasitic chain is larger than that of the transaction a. And calculating the proportion of the calculated amount required by the malicious node when the attack is successful to the calculated amount of the whole network, so as to obtain the probability of successful attack.
Setting the event arrival rate of honest nodes as lambda and the event arrival rate of malicious nodes as mu, the cumulative weight when transaction a reaches consensus is phi (t)0) Wherein t is0The time it takes for the transaction to write a match to reach consensus.
For honest nodes, after consensus is achieved, since things issued by each honest node will verify tips that are already in consensus, the cumulative weight growth rate for transaction a after consensus is achieved is λ, and the cumulative weight growth rate for transaction b is μ. As shown in FIG. 4, the time for transaction a to be issued is set to T1Parasitic chain start time is T2. If T2After the consensus completion time t of the transaction a, the transaction b verifies the transaction a, namely, each transaction of the verification transaction b indirectly verifies the transaction a, the parasitic chain attack cannot be successful, and therefore, the parasitic chain starting time is smaller than the consensus completion time t0. When the transaction a consensus is reached, the cumulative weight of the parasitic chain is μ (t)0-T2) The cumulative weight of honest nodes is phi (t)0-T1). Thus, if the attack is successful, after consensus is achieved, the parasitic chain cumulative weight should be greater than the honest node cumulative weight, i.e., (t)0-T1)-μ(t0-T2)<0. Setting T1=T 20, i.e. the parasitic chain starts to prepare when transaction a writes a, then (t)0)-μ(t0)<0. Next, the cumulative weight phi (t) at the time of completion of consensus is calculated separately0) And the probability of success of the attack when the parasitic chain transaction a is written into the tangle.
Cumulative weight at transaction consensus completion: when a new transaction arrives, at least one of the k tips selected verifies sitei, the new transaction will indirectly verify sitei, and the cumulative weight of sitei is increased by 1. The probability of at least one tips validating sitei is 1- (1-psi (t-h)/R0)k
Where phi (t) is the cumulative weight.
The following can be obtained:
thus, the cumulative weight φ (t) can be calculated as:
since the weight accumulation time is mainly in the data transmission stage and the consensus achievement stage, t in the above formula is the sum of the data transmission time and the accumulated weight time0The cumulative weight is expressed as follows:
probability of success of parasitic chain attack: since honest nodes conform to a Poisson distribution with an event arrival rate of lambda, the 1/lambda exponential distribution is obeyed to exponential variables with time intervals of honest node neighbors being independent and the same distribution. Similarly, the time interval of the malicious node neighbors is 1/mu of independent and equally distributed exponential variable. The following can be obtained:
when mu is>When the value is more than or equal to lambda, the cumulative weight of transaction b is more than that of transaction a, and the attack success is possible, namely phi (t)0)-μ(t0)>0. When the attack is successful, the malicious node should catch up the difference phi (t) of the parasitic chain and the cumulative weight of the verification transaction a0)-μ(t0) Thus, the probability of success of a parasitic chain attack is:
and step S3, establishing a block chain consensus algorithm based on the field area network and the IOTA.
The IOTA nodes and adjacent terminals are grouped into clusters. The terminal sends the transaction to the IOTA node. When the IOTA node receives enough transactions, it packages all transactions and distributes PoW tasks to the terminals in the cluster. All members in the cluster collaboratively complete respective tasks, the calculation result is returned to the IOTA node, and the IOTA node writes data into the tandle.
The algorithm mainly reduces the consensus time by reducing the tan gle writing time, and specifically comprises the following steps: the consensus time is reduced by reducing the tandle write time. The method comprises the steps of clustering nodes in a network, wherein each cluster comprises an IOTA node and a plurality of terminals, the terminals in the cluster send data to the IOTA node, when the IOTA node receives enough data, all the data are packaged, PoW tasks are distributed to the terminals in the cluster, all members in the cluster cooperatively complete the PoW tasks, the calculation result is returned to the IOTA node, and the IOTA node completes the work of writing the data into the symbol. Therefore, the workload of the IOTA node can be greatly reduced, and the time for writing data into the tan gle is reduced.
After clustering, data can be written into the tandle only after the transaction reaches the maximum value of the IOTA data packet, and then the data collection time is as follows:
wherein n istIs the average number of transactions in a data packet, NgIs the number of nodes in a cluster, lambdaiIs the event arrival rate of node i. The time for writing data into the tandle is mainly PoW calculation time, and the PoW after clustering is completed cooperatively by members in the cluster, so the time for writing data into the tandle is as follows:
wherein d isPiNumber of calculation cycles for PoW calculation, FiTotal computing power for cluster iThe average time interval for the event to write to the local tangle is:
since data only needs to be transmitted to the IOTA node in the network, the time for data transmission in the network is less than or equal to the transmission time when the data is not clustered, and here, the maximum transmission time LT is taken.
The consensus time is:
Consensus time is expressed as follows:
the above description is only of the preferred embodiments of the present invention, and it should be noted that: it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the invention and these are intended to be within the scope of the invention.
Claims (4)
1. A consensus algorithm based on a field area network and an IOTA, characterized by comprising the following steps:
step S1, establishing an IOTA consensus time analysis model in the field network; the IOTA consensus time calculation in the field area network comprises the time of writing a transaction into an IOTA database (the schematic structure diagram of the tan is shown in FIG. 1), the time of transmitting the transaction in the network and the consensus achievement time; in particular, the amount of the solvent to be used,
step S1.1, trading the time for writing into the angle;
the time that the transaction writes into tandles correlates with the amount of work done to demonstrate the PoW difficulty and the computing power of the device; when a transaction is written into the tangle, firstly selecting unverified transaction tips in the tangle for verification, then performing PoW calculation, finally writing data into the local tangle, and broadcasting the calculation result and the selected tips to the IOTA network; ignoring the verification time of tips, and taking the calculation time of the PoW as the time for writing the transaction into the tan gle;
step S1.2, trading the time of transmission in the network;
selecting a Gossip protocol for transaction transmission, and periodically forwarding the transaction owned by the node but not owned by the adjacent node to the adjacent node; the neighbor node receiving the forwarding message repeats the forwarding step; finally, the transaction information is transmitted to the whole network through forwarding of a plurality of rounds; the transmission time of the transaction, namely the transmission hop number of the transaction in the network is multiplied by the transmission time delay of each hop; neglecting the transmission delay of the wired network, wherein the transmission delay of each hop of the network in the field domain network FAN is the transmission delay in the wireless mesh network mesh;
s1.3, consensus achievement time;
the time to reach consensus is the time from when the transaction first exists in all IOTA nodes until each tips can see it, i.e., the time required for the tips to be selected for verification; after the IOTA node writes the transaction into the angle, when the tips number of the transaction is verified to be equal to the prompt number in the network, the consensus is achieved, and the transaction cannot be changed;
step S2, establishing a parasitic chain attack success probability analysis model;
the parasitic chain attack success probability analysis model refers to a closed expression of the probability of the parasitic chain attack success, the honest node event arrival rate and the malicious node event arrival rate; in particular, the amount of the solvent to be used,
as shown in fig. 5, the node first sends a transaction a, and after the transaction is completed consistently, the node receives the material corresponding to the transaction; at the moment, the node sends a double-flower transaction b, when the final accumulated weight of the transaction b is greater than a, the transaction a is abandoned, and the attack is successful at the moment; if the parasitic chain selects transaction d initiated after the consensus completion time for verification, transaction b verifies transaction a; each transaction that verifies transaction b indirectly verifies transaction a, at which point the parasitic chain attack cannot succeed; the transaction selected by the parasitic chain should therefore be a transaction initiated before the agreed upon completion time; after the transaction is selected, attack can be successful only by constructing that the cumulative weight of the parasitic chain is larger than that of the transaction a; calculating the proportion of the calculated amount required by the malicious node when the attack is successful to the calculated amount of the whole network, so as to obtain the probability of successful attack;
step S3, establishing a block chain consensus algorithm based on a field area network and an IOTA;
the IOTA node and the adjacent terminal are combined into a cluster; the terminal sends the transaction to the IOTA node; when the IOTA node receives enough transactions, the IOTA node packs all the transactions and distributes PoW tasks to terminals in the cluster; all members in the cluster collaboratively complete respective tasks, the calculation result is returned to the IOTA node, and the IOTA node writes data into the tandle.
2. The consensus algorithm based on FIELD and IOTA as claimed in claim 1, wherein the specific calculation method of the transaction writing time of the tan gle in step S1.1 is as follows:
setting the number of nodes in the IOTA network as N, when a node i has a transaction written into a tan gle, firstly selecting k tips for verification, then performing PoW calculation, finally writing data into a local tan gle, broadcasting the calculation result and the selected tips to the IOTA network, and writing the transaction of the node i into the time tiComprises the following steps:
wherein d isPiFor the number of calculation cycles of PoW, fiIs the computational power of node i; the average time interval h for a transaction to write a local angle is:
the specific calculation method of the time of the transaction transmitted in the network in step S1.2 is as follows:
for an IOTA network with N nodes, setting that each node has m +1 neighbors, transmitting to m neighbors each time, setting the average time of transmission of each hop as T, and the probability of successful reception of an event as p, and then the network transmission is equivalent to pm cross tree, and the total transmission hop number is:
L=logpm(pmN-N+1)-1
the total transmission time is LT;
based on an 802.11MAC broadcast protocol and a Gaussian channel, when data is saturated, calculating the average transmission time T of each hop;
when a node has a data packet to send, the node starts to monitor the channel state, when the idle time of the channel is detected to exceed a distributed frame interval (DIFS), the node enters a backoff stage, otherwise, the node is in the channel monitoring state all the time; after the node enters a backoff stage, randomly selecting a backoff time slot value and starting a backoff counter; when the channel is in an idle state, the backoff counter is decreased by taking a time slot as a unit along with the idle time of the channel, and a data packet is sent until the backoff counter is zero; when the channel is busy in the backoff counter decrementing process, the backoff counting process is frozen, the node monitors the channel again until the channel idle time exceeds DIFS, and returns to the backoff stage again and continues the frozen backoff decrementing process;
setting a back-off time setting range to {1-w0The probability tau of the node transmitting data is 2/(w)0+1), probability p of successful transmission of data in one virtual slots=nτ(1-τ)n-1The probability of channel being idle is pi=(1-τ)nProbability of busy channel is pbsy=1-pi=1-(1-τ)nWherein n is the number of nodes which are likely to generate collision; within a virtual time slot, the probability of collision is pc=1-ps-piWhen the channel successfully transmits data or a collision occurs, the transmission delay of the data comprises: data transmission delay LenThe method comprises the following steps of/r, waiting time delay DIFS before distributed frame transmission and propagation time delay delta; wherein L isenThe total length of the frame comprises an MAC data packet header and a physical data packet header, and r is a sending rate; delay T for busy channel due to successful transmissionsAnd a time delay T of channel busy caused by collisioncComprises the following steps:
the latency required by the backoff counter per technique includes: when the channel is idle, the time interval is one physical time slot every time the back-off counter is reduced by 1σ, when the channel successfully transmits data, the backoff counter is frozen, with a waiting time TsAnd when the channel is collided, the back-off counter is frozen, and the waiting time is Tc(ii) a The backoff counter therefore waits for an interval of time on average:
t0=(1-pbsy)σ+psTs+pcTc
t0namely a virtual time slot; the initial value D of the back-off timer is set to {1-w0Are evenly distributed, then E [ D ]]=(w0+ 1)/2; for n nodes which are likely to generate collision, the timer performs 1-down counting after setting the initial value, and the back-off time E [ D ] of each node is averagedn]=(w0+1)/2n, the average time delay for transmitting a data frame is:
setting packet size of IOTA to LpOne data frame of size LenThen, the average time to transmit an IOTA packet is:
calculating the probability of successful reception of the IOTA data packet by adopting M-system QAM codes; the bit error rate is expressed as follows:
by the probability of data transmission errors beingThe data transmission failure includes data transmission error or collision, and therefore, the probability of the data transmission failure is: p is a radical of formular=pc+pe-pc*peThe probability of successfully transmitting an IOTA packet is:
the method for calculating the consensus reaching time in the step S1.3 is as follows:
in tangle, the total number of tips R0Is maintained in a stable state and satisfies the following conditions:
at the time t-h, the number of tips is R0At time t, the number of tips is still R0And during the h period, the number of event arrivals is λ h, whereThus, for a tips at time t-h, the probability of a transaction having been verified at time t is
As shown in FIG. 3, the number of tips of sites i is verified to be ψ (t-h) at time t-h; the verified transaction is called sites i, and the unverified transaction is marked as tips i; tips at time t-h, and the set that has been verified at time t is: i a i p ψ (t-h) (k-1) ψ (t-h)/k; tips at time t-h, and the set of still tips at time t is: i | (1-p) ψ (t-h) ═ ψ (t-h)/k; tips of sites i were not verified to be | C |; at the time of t-h, when a transaction arrives, k tips are required to be selected from all tips for verification, and if the selected tips are in psi (t-h), the newly arrived transaction indirectly verifies site i; if all the k tips are selected from the set B, the number of tips of the verification sites i is reduced by k-1; k tips are selected from the set B to be k-1, one of A or C is selected, the number of tips for verifying the sites i is reduced by k-2, and by analogy, k tips are not selected from B, and at least one selected A is added with 1 when the number of tips for verifying the sites i at the time t is selected; the following probabilities can be obtained:
……
when psi (t) is equal to R0Then, site i agrees, and the agreement achieving time is as follows:
when network transmission delay is ignored, the consensus time is as follows:
when the node I is added into the network for transmission, delaying, writing one transaction into the angle by the node I in the network at a certain moment, wherein the tips i is only visible in the local angle of the node I before the tips i is transmitted to other nodes, and when other new transactions arrive, only the transactions coming in the node I can select the tips i as a father node; when data is put in a local angle but is not transmitted to a neighbor node, namely T is less than T, the number of tips of the verified tips i is psi (T) ═ 1/N exp (at/h), when T is less than 2T, the tips i is transmitted to pm neighbor nodes, at the moment, the number of tips of the verified tips i is psi (T) ═ 1/N exp (at/h) + (pm/N) exp (a (T-T)/h), and the same can be obtained in the same way, during the period from the initial writing of angle in a transaction to the completion of the broadcast in the network, the number of tips of the verified tips i is:
wherein, t0For the time from the data writing into the angle to the completion of the consensus, when ψ (t) ═ R0At time, site i agrees, and thus agreement is achieved for time tcComprises the following steps:
under the condition that the network transmission delay is not negligible, the consensus time is as follows:
3. the consensus algorithm based on a field area network and an IOTA according to claim 1, wherein the specific method for establishing the parasitic chain attack success probability analysis model in the step S2 is as follows:
setting the event arrival rate of honest nodes as lambda and the event arrival rate of malicious nodes as mu, the cumulative weight when transaction a reaches consensus is phi (t)0) Wherein t is0The time it takes for the transaction to write a match to a consensus;
for honest nodes, after consensus is achieved, as things issued by each honest node verify tips which are already known, the growth rate of the cumulative weight is lambda and the growth rate of the cumulative weight of transaction b is mu after consensus is achieved for transaction a; setting the time of transaction a release as T1Parasitic chain start time is T2(ii) a If T2After the consensus completion time t of the transaction a, the transaction b verifies the transaction a, namely, each transaction of the verification transaction b indirectly verifies the transaction a, the parasitic chain attack cannot be successful, and therefore, the parasitic chain starting time is smaller than the consensus completion time t0(ii) a When the transaction a consensus is reached, the cumulative weight of the parasitic chain is μ (t)0-T2) The cumulative weight of honest nodes is phi (t)0-T1) (ii) a Thus, if the attack is successful, after consensus is achieved, the parasitic chain cumulative weight should be greater than the honest node cumulative weight, i.e., (t)0-T1)-μ(t0-T2) Less than 0; setting T1=T20, i.e. the parasitic chain starts to prepare when transaction a writes a, then (t)0)-μ(t0) Less than 0; next, the cumulative weight phi (t) at the time of completion of consensus is calculated separately0) Andpreparing the parasitic chain transaction a at the moment of writing the tan gle, and determining the probability of successful attack;
cumulative weight at transaction consensus completion: when a new transaction arrives, at least one verification site i is selected from the k tips, the new transaction can indirectly verify the site i, and the cumulative weight of the site i is added with 1; the probability of at least one tips verification site i is 1- (1-psi (t-h)/R0)k
Where φ (t) is the cumulative weight;
the following can be obtained:
thus, the cumulative weight φ (t) can be calculated as:
since the weight accumulation time is mainly in the data transmission stage and the consensus achievement stage, t in the above formula is the sum of the data transmission time and the accumulated weight time0The cumulative weight is expressed as follows:
probability of success of parasitic chain attack: as the honest nodes conform to Poisson distribution with the event arrival rate of lambda, the time intervals of the adjacent things of the honest nodes are independent and equally distributed exponential variables, and the 1/lambda exponential distribution is obeyed; in the same way, the time interval of the adjacent things of the malicious node is 1/mu of independent and identically distributed index variable; the following can be obtained:
when mu is more than lambda, the parasitic chain attack will always succeed, when mu is less than lambda, the attack will be possible to succeed only if the cumulative weight of transaction b is greater than that of transaction a when transaction a agrees, i.e., (t)0)-μ(t0) Is greater than 0; when the attack is successful, the malicious node should catch up the difference phi (t) of the parasitic chain and the cumulative weight of the verification transaction a0)-μ(t0) Thus, the probability of success of a parasitic chain attack is:
4. the consensus algorithm based on a field area network and an IOTA of claim 1, wherein the establishing of the block chain consensus algorithm based on a field area network and an IOTA in step S3 specifically comprises: an IOTA node and adjacent terminals form a cluster. The terminal sends a transaction to the IOTA node. When the IOTA node receives enough transactions, it will bundle all transactions and distribute the PoW tasks to the terminals in the cluster. All members of the cluster cooperate with each other to complete respective tasks, a calculation result is returned to the IOTA node, and then the IOTA node writes data into a chaotic node. Thus, the workload of the IOTA node, and the time required to write data to the chaotic data, can be significantly reduced.
After clustering, the data can be written into the tandle only after the transaction reaches the maximum value of the IOTA data packet, and then the data collection time is as follows:
wherein n istIs the average number of transactions in a data packet, NgIs the number of nodes in a cluster, lambdaiEvent arrival rate for node i; the time for writing data into the tandle is mainly PoW calculation time, and the PoW after clustering is completed cooperatively by members in the cluster, so the time for writing data into the tandle is as follows:
wherein d isPiNumber of calculation cycles for PoW calculation, FiTotal computing power for cluster iThe average time interval for the event to write to the local tangle is:
because data only needs to be transmitted to the IOTA node in the network, the time for transmitting the data in the network is less than or equal to the transmission time when the data are not clustered, and the maximum transmission time LT is taken;
the consensus time is:
Consensus time is expressed as follows:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210092079.XA CN114500046B (en) | 2022-01-26 | 2022-01-26 | Consensus method based on field network and IOTA |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210092079.XA CN114500046B (en) | 2022-01-26 | 2022-01-26 | Consensus method based on field network and IOTA |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114500046A true CN114500046A (en) | 2022-05-13 |
CN114500046B CN114500046B (en) | 2024-03-15 |
Family
ID=81475670
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210092079.XA Active CN114500046B (en) | 2022-01-26 | 2022-01-26 | Consensus method based on field network and IOTA |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114500046B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115001816A (en) * | 2022-05-31 | 2022-09-02 | 杭州万林数链科技服务有限公司 | Block chain link point service system of multi-block chain platform |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842606A (en) * | 2018-02-24 | 2019-06-04 | 中国科学院计算技术研究所 | Block chain common recognition algorithm and system based on consistency hash algorithm |
CN109964242A (en) * | 2018-05-25 | 2019-07-02 | 北京大学深圳研究生院 | A kind of block chain common recognition method based on trusting relationship |
US20200286049A1 (en) * | 2019-03-06 | 2020-09-10 | 0Chain Llc | Systems and methods of self-administered protocols on a blockchain platform |
CN112350852A (en) * | 2020-10-21 | 2021-02-09 | 重庆邮电大学 | Performance calculation method of block chain network based on Internet of vehicles architecture |
CN112769936A (en) * | 2021-01-11 | 2021-05-07 | 电子科技大学 | POVT consensus algorithm based on voting and credit mechanism |
-
2022
- 2022-01-26 CN CN202210092079.XA patent/CN114500046B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109842606A (en) * | 2018-02-24 | 2019-06-04 | 中国科学院计算技术研究所 | Block chain common recognition algorithm and system based on consistency hash algorithm |
CN109964242A (en) * | 2018-05-25 | 2019-07-02 | 北京大学深圳研究生院 | A kind of block chain common recognition method based on trusting relationship |
US20200286049A1 (en) * | 2019-03-06 | 2020-09-10 | 0Chain Llc | Systems and methods of self-administered protocols on a blockchain platform |
CN112350852A (en) * | 2020-10-21 | 2021-02-09 | 重庆邮电大学 | Performance calculation method of block chain network based on Internet of vehicles architecture |
CN112769936A (en) * | 2021-01-11 | 2021-05-07 | 电子科技大学 | POVT consensus algorithm based on voting and credit mechanism |
Non-Patent Citations (1)
Title |
---|
秦金磊;孙文强;李整;朱有产;: "适用于微电网区块链的信用共识机制", 电力系统自动化, no. 15 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115001816A (en) * | 2022-05-31 | 2022-09-02 | 杭州万林数链科技服务有限公司 | Block chain link point service system of multi-block chain platform |
Also Published As
Publication number | Publication date |
---|---|
CN114500046B (en) | 2024-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Mišić et al. | Adapting PBFT for use with blockchain-enabled IoT systems | |
Khanna et al. | Adaptive selective verification: An efficient adaptive countermeasure to thwart dos attacks | |
Xu et al. | BLOWN: A blockchain protocol for single-hop wireless networks under adversarial SINR | |
CN111182510A (en) | Industrial Internet of things node consensus method based on block chain | |
Pal et al. | DC-PoET: proof-of-elapsed-time consensus with distributed coordination for blockchain networks | |
Li et al. | Block access control in wireless blockchain network: Design, modeling and analysis | |
CN114500046B (en) | Consensus method based on field network and IOTA | |
Gilbert et al. | Making evildoers pay: resource-competitive broadcast in sensor networks | |
Xu et al. | An efficient blockchain pbft consensus protocol in energy constrained iot applications | |
Le et al. | A lightweight block validation method for resource-constrained iot devices in blockchain-based applications | |
CN114567554B (en) | Block chain construction method based on node reputation and partition consensus | |
Mišić et al. | PBFT-based ordering service for IoT domains | |
Qushtom et al. | A scalable two-tier pbft consensus for blockchain-based iot data recording | |
CN112751915B (en) | Block chain safety calculation method based on distributed coordination communication mechanism | |
CN103595552B (en) | Analysis method and analysis system for cluster storage network parallel load | |
Zhou et al. | Performance analysis of wireless practical Byzantine fault tolerance networks using IEEE 802.11 | |
Kini et al. | Smartgossip: an improved randomized broadcast protocol for sensor networks | |
Bakos et al. | Peer-to-peer protocol evaluation in topologies resembling wireless networks. An experiment with Gnutella query engine. | |
CN114297680B (en) | Block chain cross-chain consensus method and system for Internet of things environment | |
Li et al. | Reducing delay and enhancing DoS resistance in multicast authentication through multigrade security | |
CN115604765A (en) | Computing offload optimization method and device, electronic equipment and storage medium | |
CN114726879B (en) | Method for verifying transaction information based on blockchain distribution | |
Qushtom et al. | Efficient blockchain scheme for iot data storage and manipulation in smart city environment | |
Qushtom et al. | Efficient multi-tier, multiple entry PBFT consensus algorithm for IoT | |
An et al. | Research on Byzantine Fault Tolerant algorithm based on Node Weights |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |