CN115766745B - Method and device for collecting and broadcasting transaction data of block chain link point memory pool - Google Patents

Method and device for collecting and broadcasting transaction data of block chain link point memory pool Download PDF

Info

Publication number
CN115766745B
CN115766745B CN202310028641.7A CN202310028641A CN115766745B CN 115766745 B CN115766745 B CN 115766745B CN 202310028641 A CN202310028641 A CN 202310028641A CN 115766745 B CN115766745 B CN 115766745B
Authority
CN
China
Prior art keywords
nodes
block chain
network
area
transaction data
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.)
Active
Application number
CN202310028641.7A
Other languages
Chinese (zh)
Other versions
CN115766745A (en
Inventor
余胜
朱建锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Anjie Information Security Technology Co ltd
Original Assignee
Hangzhou Anjie Information Security Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Anjie Information Security Technology Co ltd filed Critical Hangzhou Anjie Information Security Technology Co ltd
Priority to CN202310028641.7A priority Critical patent/CN115766745B/en
Publication of CN115766745A publication Critical patent/CN115766745A/en
Application granted granted Critical
Publication of CN115766745B publication Critical patent/CN115766745B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The patent discloses a method and a device for collecting and broadcasting transaction data of a block chain link point memory pool. The method comprises the steps of traversing a blockchain network, recording the found peer-to-peer blockchain point connection character strings, analyzing the ip geographic area distribution condition of the blockchain nodes of the whole network according to the found peer-to-peer blockchain point connection character strings, carrying out area division on the blockchain nodes, deploying probes in each area to serve as bridges for communicating the blockchain nodes in the area with the target blockchain nodes, forming a tree network topology graph, collecting and broadcasting transaction data and the like.

Description

Method and device for collecting and broadcasting transaction data of block chain link point memory pool
Technical Field
The patent relates to the technical field of blockchain networks, in particular to a method and a device for collecting and broadcasting transaction data of a blockchain link point memory pool.
Background
Transaction data in the blockchain point memory pool is collected and broadcast via blockchain p2p network propagation. Generally, since a transaction data is generated from a user blockchain node, the transaction data is broadcast to adjacent nodes in a blockchain p2p network, the adjacent nodes receive the transaction, verify the transaction and then continue broadcasting, and the broadcasting and verifying processes are repeated for a plurality of times to finally reach a target blockchain node memory pool.
In the method and the device for blocking the transaction of the intelligent contract vulnerability attack according to the chinese patent application 202211113706X, step 1 receives an attack transaction in a memory pool provided by a blockchain node and step 8 broadcasts the constructed new transaction to the blockchain node, so that the transaction data collected in the memory pool by the node needs to be as fast (low delay) as possible, so as to provide enough processing time for blocking the transaction of the intelligent contract vulnerability attack, so that the attack transaction is not completed. The following problems exist with respect to collecting and broadcasting transaction data over a conventional blockchain p2p network.
1) Node idle work or cheating problem
Because of randomness and specificity of the block chain decentralization service, the network behavior of the block chain nodes is complex and changeable, and is difficult to evaluate and check, so that the behavior of idle work and even cheating of a plurality of nodes occurs, convenience conditions are provided for some network attacks (such as solar corrosion attacks), and the propagation of transaction data in the block chain is not facilitated.
2) Network delay problem
It is counted that in the ethernet p2p network, a transaction data needs to go through an average of 4.5 and at most 7 blockchain nodes to reach the memory pool of the outbound block nodes. Then the average delay of 90ms for each transaction is collected through the ethernet p2p network according to the estimation of 20ms for one broadcast and verification, and the global deployment of a plurality of node tests shows that the time difference between the first arrival node and the last arrival node of the same transaction often exceeds 1s, and the average delay is about 120ms. The reason for this is mainly three: firstly, p2p broadcasting is a network propagation mode with low efficiency, and can generate a phenomenon of repeated propagation of a large amount of data, so that network resources are wasted and affected new transactions are quickly transmitted; secondly, the p2p network lacks of routing table information, a propagation path of transaction data broadcast from London to los Angeles and then broadcast back to Frankfurt appears, and network delay is greatly increased; thirdly, in order to reduce the broadcasting redundant data, the block link point can encode and decode the transaction data and verify the signature, and the like, and broadcast after finishing the verification operation, and the operations also need time, so that the network delay of the transaction propagation is further improved. Such network delays are detrimental to the transaction blocking process of smart contract vulnerability attacks.
3) Deployment running cost problem
The current block link point deployment configuration requirements are higher, for example, the recommended configuration requirements of the ethernet are: 4-core CPU, 16GB memory and 1TB fast SSD, and further require a monthly network cost. The project requires deployment of multiple nodes in a major region of the world, and excessive cost is detrimental to project sustainable development.
Disclosure of Invention
The invention improves the shortcomings of the prior art, mainly divides the block chain link point areas according to the geographic position, deploys network probes in each area, and then gathers the network probes to the target block chain nodes, thereby constructing a tree network topology graph to form a collection and broadcast network of transaction data, in addition, the probes record the network behavior data of the block chain nodes, score the network connection effect of the nodes, formulate network connection strategies according to the data results and execute the network connection strategies to keep the network operation efficient.
The invention is realized by the following technical scheme:
the invention discloses a method for collecting and broadcasting transaction data of a block chain link point memory pool, which comprises the following steps:
traversing a block chain network, and recording the found peer block chain link point connection character strings;
analyzing the ip geographic area distribution condition of the block chain nodes of the whole network according to the found peer block chain link point connection character strings, and carrying out area division on the block chain link points;
a probe is deployed in each area and used as a bridge for communicating the blockchain node and the target blockchain node in the area to form a tree network topology graph, and transaction data are collected and broadcast;
recording network behaviors of block chain nodes connected with the probes while collecting and broadcasting transaction data, and carrying out statistical analysis and scoring on the recorded results to form statistical analysis and scoring results;
and according to the recorded, statistical analysis and scoring results, adopting a corresponding network connection strategy to keep the instant transaction uplink rate of the network higher than 80% and the instant transaction passing rate higher than 95%.
As a further improvement, according to the found peer-to-peer block chain link point connection character strings, the ip geographic area distribution condition of the full-network block chain nodes is analyzed, the block chain nodes are divided into areas, when the ip geographic area information of part of the nodes is inaccurate in inquiry, the network delay of the nodes is measured, and the nodes with the network delay of more than 50ms are excluded from the area.
As a further improvement, the probes are deployed in each area and used as bridges for communicating the blockchain nodes in the area with the target blockchain nodes to form a tree network topological graph for collecting and broadcasting transaction data, and the probes only cache the RequestOneHeader, requestHeaderByNumber and RequestBodies requests of the blockchain nodes in the area with the heights of 11052984, 14811135, 15466495 and 1920000 and the nearest 1024 pieces of block information, but are not disconnected, so that the collection and broadcasting of the transaction data are continuously carried out.
As a further improvement, the method adopts corresponding network connection strategies according to the recorded, statistical analysis and scoring results, wherein the strategies comprise: firstly, identifying block chain nodes which are idle and cheat according to a statistical analysis result, adding the nodes into a blacklist, shielding node connection and saving network resources; secondly, adding the blockchain nodes with the scores of 10% higher in the scoring result into a white list, and periodically and continuously attempting to reestablish connection after restarting the probe or disconnecting the nodes; thirdly, judging the regional information of important nodes (block-out nodes and main transaction generating nodes) in the blockchain network according to the arrival time difference of transaction (block) data recorded by different probes in the statistical analysis result, improving the probe quantity or system configuration of the regions, and broadcasting the transaction to the region preferentially; fourthly, recording the current connection state when the node is disconnected, and attempting to connect the node in the state after restarting; fifthly, recording a node disconnection message prompt, and continuing to attempt to connect the node of the prompt Too Many Peer; and sixthly, estimating the degree of the blockchain node, and trying to continuously connect nodes with the degree of the blockchain node being greater than 100.
The invention also discloses a device for collecting and broadcasting transaction data of the block chain link point memory pool, which comprises:
and the p2p network discovery unit is used for traversing the block chain network and recording the discovered peer block chain link point connection character strings. The unit can find a new node in the blockchain network and provide network connection character string information of the new node;
and the IP geographic position query analysis unit is used for analyzing the regional distribution condition of the block chain nodes of the whole network and carrying out regional division on the block chain nodes. The unit can inquire the IP geographic area information of the node and statistically analyze the area distribution condition of the node;
the network connection management unit is used for deploying probes in each area to serve as bridges for communicating the blockchain nodes in the area with the target blockchain nodes to form a tree network topological graph, and collecting and broadcasting transaction data. The unit is a component that communicates the blockchain node and the destination blockchain node within the region. The unit communicates upwards with a memory pool of a target blockchain node, comprises transaction data submission and transmission, establishes connection with the blockchain node in the area downwards according to the network connection character string and the configuration requirement of the node area, and is responsible for subsequent management of the connection.
The node network behavior monitoring unit is used for recording network behaviors of the blockchain nodes connected with the probes while collecting and broadcasting transaction data, and carrying out statistical analysis and scoring on the recorded results to form statistical analysis and scoring results;
and the network policy management unit is used for adopting a corresponding network connection policy according to the recording, statistical analysis and scoring results to keep the instant transaction uplink rate of the network higher than 80% and the instant transaction passing rate higher than 95%.
The beneficial effects of the invention are as follows:
(1) A node behavior portrait is established, and important node information is identified
According to the invention, the network behavior data of the blockchain node is recorded through the probe, and the part of idle work and cheating nodes are found and added into the connection blacklist, so that the resource cost of the probe is reduced; in addition, by comparing the historical data recorded by different probes, information of some important blockchain nodes is judged according to time-efficiency statistical analysis of the data, for example, 15 of 26 verification nodes of the coin-operated intelligent chain are in Europe, and the information is preferentially sent to the probes in European areas when new transactions are sent;
(2) Effectively reducing network delay of transaction data propagation in a blockchain network
14 Ethernet network probes are deployed worldwide to push and collect transaction data to a target blockchain node, and the instant transaction passing rate reaches 95% after statistics, and the instant transaction uplink rate is improved from the previous 40% to 80%. Therefore, the invention effectively reduces the network delay of transaction data propagation in the blockchain network;
(3) Effectively reduce the operation cost
The main program of the invention is the probe, which is mainly used for forwarding transaction data network and does not have the functions of verifying and storing blocks, etc. Therefore, the configuration 2 core CPU, the 4GB memory and the 40GB common mechanical hard disk of the deployment server are enough to support the network connection of the 2000+ block chain node, and in addition, the network cost is reduced by disconnecting the idle work and cheating nodes in operation, so that the invention effectively reduces the operation cost.
Drawings
FIG. 1 is a flow chart of a transaction data collection and broadcasting method according to the present invention;
FIG. 2 is a schematic diagram of a transaction data collection and broadcasting device;
FIG. 3 is a diagram of the primary country distribution of Ethernet nodes;
fig. 4 is a transaction initiation area scenario diagram for an ethernet.
Detailed Description
The invention discloses a block chain link point memory pool transaction data collection method, which is characterized in that block chain link point areas are divided according to geographic positions, network probes are deployed in each area, and the network probes are summarized to target block chain nodes, so that a tree network topology graph is built, a transaction data collection and broadcasting network is formed, and the purpose of rapidly collecting and broadcasting the transaction data by the target block chain nodes is achieved. Because the sending time of the transaction data in the blockchain network is not determined, the network delay of the transaction data transmission cannot be directly measured, in addition, the transaction is randomly sent out worldwide, and the difference of different transaction transmission delays is large, two indexes are defined to measure the network effect constructed by the method, namely the instant transaction uplink rate and the instant transaction passing rate. The real-time transaction uplink rate refers to the ratio of the transaction number in the block existing in the memory pool to the total transaction number in the block when the block is generated; the instant transaction passing rate refers to the proportion of transaction data collected by the memory pool from the newly built network. As shown in fig. 1, the method comprises the steps of:
step 1: traversing the block chain network, and recording the found peer block link point connection character strings.
Using a p2p network discovery unit, introducing a PostgreSQL database, and recording the discovered network connection character strings of the peer-to-peer blockchain nodes, wherein the structure of the connection character strings is as follows:
“enode://a8feebacd58c723941cf8d8adf04839eebb03180ff90a5da279b3d297ef3a57faeb4a2e80add18569193a8e5f0873442904ec547c23c14b6b8e346fb6c2c8b0c@79.173.187.198:30303”
the Id and IP information of the node are analyzed from the character string, and the database storage structure is as follows:
fields Use of the same
id Node Id for recording judgment weight
enode Network connection character string
ip Node IP, subsequently used for analyzing node area distribution
reason Attempting connection results
lat Longitude and latitude
lng Dimension(s)
country The country in which the node is located
continent The continent where the node is located
region Node-located provincial administrative district
facilitator Node network service provider
The p2p network discovery unit may attempt to connect to the node, update the connection result after the connection attempt is completed, and filter most other nodes of the blockchain network according to the connection result. The following three cases were excluded from subsequent analysis as a record of the connection results:
reason scene(s)
network ID mismatch Different chain IDs indicate nodes in different blockchain networks
genesis mismatch Different creation blocks indicate nodes in different blockchain networks
fork ID rejected The nodes being in different hard branches
Step 2: and analyzing the ip geographic area distribution condition of the full-network block chain nodes according to the found peer-to-peer block chain link point connection character strings, and carrying out area division on the block chain link points.
After the p2p network discovery unit in the step 1 operates for 1 week, the network connection character strings of about 90% of the block chain nodes of the whole network are recorded, the geographic position information of the network connection character strings is queried according to the IP analyzed by the character strings, and the regional distribution condition of the nodes is updated in a database. Statistical analysis is performed on the result data, for example, the main country distribution of the ethernet nodes is shown in fig. 3.
According to the main national distribution situation of the Taifang nodes, the Ethernet block nodes are divided into 14 areas, and centers of the areas are respectively Quebec Canada, virginia, california, oregon, ohio, tokyo, hangzhou, hong Kong, singapore, australian Sydney, indian Monte, balin, faraday, and London.
In addition, because of inaccuracy of partial ip geographic area information inquiry, SRTT is used as block chain node network delay, and the area size is combined, the nodes with the network delay more than 50ms are set to be excluded from the area, and the network connection character strings of the nodes are sent to other areas for connection test.
Step 3: and (3) deploying probes in each area to serve as bridges for communicating the blockchain nodes in the area with the target blockchain nodes to form a tree network topology graph, and collecting and broadcasting transaction data.
And (3) deploying probes on cloud servers at the centers of the 14 areas divided in the step (2), wherein the probes are kept connected with the target blockchain nodes and the blockchain nodes in the areas through a network connection management unit. Thus, the target blockchain node forms a tree-structured network with the whole-network blockchain link points through 14 probes, and transaction data in the blockchain nodes of each area are directly forwarded to a memory pool of the target blockchain node through the probes. Accordingly, new transactions generated in the destination blockchain node may also be quickly broadcast to blockchain nodes of each region by probes.
On the Ethernet, the probes only cache the blocks of 11052984, 14811135, 15466495 and 1920000 and the nearest 1024 blocks of information, namely RequestOneHeader, requestHeaderByNumber and RequestBodies requests of the blockchain nodes in the area can be responded, and the network connection is not disconnected by the blockchain nodes in the area, so that the stability of the network connection is maintained, the storage requirement of the probe operation environment is reduced, and the operation cost can be saved.
Step 4: and recording the network behaviors of the blockchain nodes connected with the probes while collecting and broadcasting transaction data, and carrying out statistical analysis and scoring on the recorded results to form statistical analysis and scoring results.
The probe is used for collecting and broadcasting transaction data, and the node network behavior monitoring unit records the network behavior of the blockchain node connected with the probe, and comprises the following steps:
network behavior name Interpretation of the drawings Parameter definition
Node connectivity The number of nodes currently connected by a blockchain node N 1
Connection retention time Duration of node connection establishment to present N 2
IP hosting factors How many nodes are owned on the same IP N 3
Network delay
Transaction priority arrival quantity Number of transactions to probe first broadcast by block link point E 1
Block priority arrival number Block link point first broadcast block number to probe E 2
Node transaction broadcast records Block link point broadcast transaction arrival and time, record of last 2 hours
Node block broadcast recording Block arrival and time of broadcast block by block chain node, record of last 1 day
Transaction awareness rate Average value of proportion of transactions in new block existing in transactions broadcast by new block arrival time zone block chain node to total transaction number in new block E 3
Transaction request reply failure rate The ratio of the number of requests of which the transaction hash request is not replied or overtime or the reply result is not verified to the total number of requests E 4
Block request recovery failure rate Ratio of number of requests for which block hash requests are not replied or timeout or reply result is not verified to total number of requests E 5
Number of invalid transactions Number of broadcast transactions that are not validated E 6
Number of invalid blocks Number of broadcast blocks that are not verified E 7
The node network behavior monitoring unit calculates the network behavior score of the connected node every 3 hours, and the calculation formula is as follows:
Score =a *(w 1 *N 1 +w 2 *N 2 +w 3 *N 3 )+w 5 *E 1 +w 6 *E 2 +w 7 *E 3 +w 8 *E 4 +w 9 *E 5 +w 10 *E 6 +w 11 *E 7 ;
wherein a is< 1, w 1 、w 2 、w 5 、w 6 、w 7 > 0,w 3 、w 8 、w 9 、w 10 、w 11 < 0。
And after the calculation is finished, sorting according to the scores from high to low.
On the other hand, the network behavior monitoring unit counts the same transaction arrival time of different probes within the last 24 hours in the ethernet, and according to the transaction quantity of the first arriving probes, the situation of the initiation area of the ethernet transaction is obtained after analysis, as shown in fig. 4, the initiation area of the ethernet transaction can be known, and the transaction in the ethernet is mainly generated in three areas of bergia, frankfurt and tokyo in japan.
Similarly, the network behavior monitoring unit counts the arrival time of the block broadcast within the last 24 hours in the coin-in-ampere intelligent chain, and according to the number of blocks signed by the verification node which reaches the probe first, a conclusion is obtained after statistical analysis: 15 of the 26 authentication nodes of the coin-ampere intelligent chain are in europe, 8 in the united states, and 3 in japan. The specific cases are as follows:
address of Name of the name The area where is located
0x72b61c6014342d914470eC7aC2975bE345796c2b Validator: BNB48 Club Frankfurt
0x3f349bBaFEc1551819B8be1EfEA2fC46cA749aA1 Validator: Legend II Virginia
0xCc8E6d00C17eB431350C6c50d8b8F05176b90b11 Frankfurt
0xa6f79B60359f141df90A0C745125B131cAAfFD12 Validator: Avengers Frankfurt
0xD1d6bF74282782B0b3eb1413c901D6eCF02e8e28 Frankfurt
0x7AE2F5B9e386cd1B50A4550696D957cB4900f03a Validator: Fuji Frankfurt
0xea0A6E3c511bbD10f4519EcE37Dc24887e11b55d Validator: Defibit Frankfurt
0x2D4C407BBe49438ED859fe965b140dcF1aaB71a9 Validator: NodeReal London (London)
0xb218C5D6aF1F979aC42BC68d98A5A0D796C6aB01 Validator: Alan Turing London (London)
0xBe807Dddb074639cD9fA61b47676c064fc50D62C Validator: Certik London (London)
0x295e26495CEF6F69dFA69911d9D8e4F3bBadB89B Validator: Legend Virginia
0xE9AE3261a475a27Bb1028f140bc2a7c843318afD Validator: HashQuark Tokyo-king
0xee226379dB83CfFC681495730c11fDDE79BA4c0C Validator: InfStones Virginia
0x685B1ded8013785d6623CC18D214320b6Bb64759 Validator: Namelix London (London)
0xAAcF6a8119F7e11623b5A43DA638e91F669A130f Validator: Neptune Frankfurt
0x70F657164e5b75689b64B7fd1fA275F334f28e18 Validator: BscScan Virginia
0xEF0274E31810C9Df02F98FAFDe0f841F4E66a1Cd Validator: Tranchess Virginia
0x61Dd481A114A2E761c554B641742C973867899D3 Virginia
0x8b6C8fd93d6F4CeA42Bbb345DBc6F0DFdb5bEc73 Validator: Legend III Virginia
0xac0E15a038eedfc68ba3C35c73feD5bE4A07afB5 Validator: Bison Trails Virginia
0x2465176C461AfB316ebc773C61fAEe85A6515DAA Validator: TW Staking London (London)
0xe2d3A739EFFCd3A99387d015E260eEFAc72EBea1 Validator: MathWallet London (London)
0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88 Validator: Ankr Frankfurt
0x0BAC492386862aD3dF4B666Bc096b0505BB694Da Validator: Claude Shannon London (London)
0xFE6E72b223f6d6Cf4edc6bFf92f30e84b8258249 Tokyo-king
0x73564052D8e469ED0721c4e53379DC3C91228930 Tokyo-king
Step 5: and according to the recorded, statistical analysis and scoring results, adopting a corresponding network connection strategy to keep the instant transaction uplink rate of the network higher than 80% and the instant transaction passing rate higher than 95%.
Advanced network connection policies include.
According to the transaction awareness rate recorded in the step 4, the blockchain node with the transaction awareness rate less than 10% is set as the idle node, and the probe disconnects the network connection of the node and adds the node to the blacklist so as to save network resources.
And (3) according to the invalid transaction number and the invalid block number recorded in the step (4), setting the block chain node with the invalid transaction number of more than 1000 or the invalid block number of more than 20 as a cheating node, disconnecting the network connection of the nodes by the probe, and adding the network connection to a blacklist so as to save network resources.
And (3) according to the grading result sequence of the step (4), adding the blockchain nodes with the grading of 10% at the top into a white list, continuously attempting to reestablish connection after restarting the probe or disconnecting the nodes, and in addition, when the node connection number reaches the set maximum connection number, disconnecting the blockchain nodes with the grading of 10% at the top by the probe so as to establish new connection for other blockchain nodes.
According to the statistical analysis result of the step 4, the regional scope of the Ethernet network in the United states of America, germany, frankfurt, japan and the like is thinned, and a plurality of probes are deployed more. When a new transaction is generated in the memory pool of the target blockchain node in the coin-operated intelligent chain, the transaction is preferentially broadcast to the probes in the European area so that the new transaction reaches the memory pool of the verification node as soon as possible.
In addition, the following network connection strategy is realized, firstly, the current connection state is recorded when the node is disconnected, and the node in the state is tried to be connected after restarting; secondly, recording node disconnection message prompts, and continuously trying to connect the nodes prompting Too Many Peer; thirdly, according to the node connectivity recorded in the step 3, after the node is disconnected, the node with the value greater than 100 is tried to be connected.
The invention also comprises a device for collecting and broadcasting transaction data of the block link point memory pool. As shown in fig. 2, the main units are as follows:
and the p2p network discovery unit is used for traversing the block chain network and recording the discovered peer block chain link point connection character strings. The unit may discover a new node in the blockchain network and provide network connection string information for the new node.
The p2p network discovery unit uses RLPx protocol that implements node discovery based on a widely used Distributed Hash Table (DHT) Kademlia routing algorithm. The p2p network discovery unit can gradually discover all nodes of the whole network by continuously running the RLPx protocol and send network connection character strings of the nodes to the IP geographic position query analysis unit.
And the IP geographic position query analysis unit is used for analyzing the regional distribution condition of the block chain nodes of the whole network and carrying out regional division on the block chain nodes. The unit can inquire the IP geographic area information of the node and statistically analyze the area distribution condition of the node.
The IP geographic position inquiry analysis unit adopts high-precision global IP geographic region information, wherein the geographic region information comprises continents, countries, provincial administrative units, service providers and dimensionality, and can support the fine division of regions. The IP geographic region information base contains 42.9 hundred million pieces of global IP information, uses a pure IP base file format algorithm, has a storage space of only 30MB, and supports low-delay frequent query by using a distributed deployment mode.
And the IP geographic position query analysis unit performs statistical analysis according to the queried IP geographic region information result to generate the region distribution condition of the blockchain nodes.
The network connection management unit is used for deploying probes in each area and used as a bridge for communicating the blockchain nodes in the area with the target blockchain nodes to form a tree network topological graph for collecting and broadcasting transaction data. The unit is a component that communicates the blockchain node and the destination blockchain node within the region. The unit communicates upwards with a memory pool of a target blockchain node, comprises transaction data submission and transmission, establishes connection with the blockchain node in the area downwards according to the network connection character string and the configuration requirement of the node area, and is responsible for subsequent management of the connection.
The network connection management unit manages the DEVp2p and ethernet application level protocol ETH (current versions are mainly 66 and 67) for the p2p application session establishment. The network connection management unit selects nodes to establish a safe TCP connection according to the regional distribution condition of the blockchain nodes and the connection configuration requirement, and the DEVp2p negotiates an application program session between the two connected peer nodes and periodically sends PING/PONG message pairs to keep the session active. The ETH protocol is in application communication with blockchain nodes in the network over the session, responsible for encoding and decoding protocol data. The network connection management unit also receives the network connection instruction issued by the network policy management unit to manage the session.
In addition, the communication between the network connection management unit and the target blockchain node adopts websocket supporting disconnection and reconnection. The websocket asynchronous communication protocol can support frequent transaction data submission, and the network transmission stability of the probe and the target block link point are often in different continents, so that the reconnection disconnecting function is necessary. The network connection management unit also supports communication with the common blockchain link point via the HTTP protocol, and transaction submission and basic state acquisition are performed using the RPC interface provided by the common blockchain node.
And the node network behavior monitoring unit is used for recording the network behavior of the blockchain node connected with the probe, and carrying out statistical analysis and scoring on the recorded result to form a statistical analysis and scoring result.
The node network behavior monitoring unit is responsible for recording block link point network behavior data, carrying out statistical analysis and scoring on the results, and providing data support for the network policy formulation and execution of the network policy management unit. Currently used network behavior data indexes include node connectivity, connection retention time, IP hosting factor, transaction priority arrival number, block priority arrival number, node transaction broadcast record, node block broadcast record, transaction awareness rate, transaction request reply failure rate, block request reply failure rate, invalid transaction number, and invalid block number.
And the network policy management unit is used for adopting a corresponding network connection policy according to the recorded, statistical analysis and scoring results. The instant transaction uplink rate of the network is kept to be higher than 80%, and the instant transaction passing rate is kept to be higher than 95%.
According to the record, statistical analysis and scoring results of the node network behavior monitoring unit, the network policy management unit can flexibly formulate a plurality of network connection policies and control the effective conditions and execution periods of the network policies. When the network connection strategy takes effect, the network strategy management unit sends a network connection instruction to the network connection management unit, and tracks and records the execution result of the network connection instruction.
It will be appreciated by persons skilled in the art that the foregoing description is only a single example of the invention and is not intended to limit the invention, and that although the invention has been described in detail with reference to the foregoing examples, it will be apparent to those skilled in the art that modifications may be made to the technical solutions described in the foregoing examples, or that equivalents may be substituted for part of the technical features thereof. Modifications, equivalents, and alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (5)

1. A method for collecting and broadcasting transaction data in a block link point memory pool, comprising:
traversing a block chain network, and recording the found peer block chain link point network connection character strings;
analyzing the ip geographic area distribution condition of the block chain nodes of the whole network according to the discovered network connection character strings of the link points of the peer blocks, and carrying out area division on the link points of the blocks;
a probe is deployed in each area and used as a bridge for communicating the block chain nodes in the area with the target block chain nodes to form a tree network topological graph for collecting and broadcasting transaction data, the probe does not have the verification and storage functions of the blocks, the probe is connected with the target block chain nodes and the block chain nodes in the area through a network connection management unit, the transaction data in the block chain nodes of each area are directly forwarded to a memory pool of the target block chain nodes through the probe, new transactions generated in the target block chain nodes are rapidly broadcast to the block chain nodes of each area through the probe, and the network connection management unit and the target block chain nodes are communicated by adopting websockets supporting disconnection;
recording network behaviors of block chain nodes connected with the probes while collecting and broadcasting transaction data, and carrying out statistical analysis and scoring on the recorded results to form statistical analysis and scoring results;
and adopting a corresponding network connection strategy according to the recorded, statistical analysis and scoring results, wherein the network connection strategy comprises identifying block chain nodes which are idle and cheat according to the statistical analysis results, adding the nodes into a blacklist, and shielding node connection.
2. The method for collecting and broadcasting transaction data in a block chain link point memory pool according to claim 1, wherein the analyzing of the ip geographic area distribution condition of the full-network block chain nodes divides the block chain nodes into areas, and when the information inquiry of the ip geographic area of part of the nodes is inaccurate, the network delay of the nodes is measured, and the nodes with the network delay greater than 50ms are excluded from the areas.
3. The method for collecting and broadcasting transaction data in a blockchain point memory pool according to claim 1, wherein a probe is deployed in each area as a bridge for communicating blockchain nodes in the area with destination blockchain nodes to form a tree network topology map, and the probe caches up to 11052984, 14811135, 15466495, 1920000 and 1024 pieces of the latest blockinformation, i.e. can respond to RequestOneHeader, requestHeaderByNumber and requestbolts requests of blockchain nodes in the area without being disconnected, so as to continuously collect and broadcast the transaction data.
4. The method for collecting and broadcasting transaction data in a block link point memory pool according to claim 1, wherein said adopting a corresponding network connection policy according to the recording, statistical analysis and scoring results, said policy further comprises: adding the blockchain nodes with the scores of 10% higher in the scoring result into a white list, and periodically and continuously attempting to reestablish connection after restarting the probe or disconnecting the nodes; determining the regional information of important nodes in the blockchain network according to the arrival time difference of transaction data recorded by different probes in the statistical analysis result, improving the probe quantity or system configuration of the regions, and broadcasting the transaction to the region with priority; recording the current connection state when the node is disconnected, and attempting to connect the node in the state after restarting; recording a node disconnection message prompt, and continuing to attempt to connect the node prompting 'TooManyPeer'; estimating node connectivity of the blockchain nodes, and trying to continuously connect nodes with the node connectivity greater than 100; the important nodes are block-out nodes and transaction main generation nodes.
5. A block link point memory pool transaction data collection and broadcasting device is characterized in that,
the p2p network discovery unit is used for traversing the block chain network and recording the discovered peer block chain link point network connection character strings;
the IP geographic position inquiry analysis unit is used for analyzing the IP geographic region distribution condition of the block chain nodes of the whole network according to the discovered network connection character strings of the link points of the peer blocks and carrying out region division on the link points of the blocks;
the network connection management unit is used for deploying probes in each area to serve as bridges for communicating the block chain nodes in the area with the target block chain nodes to form a tree network topological graph for collecting and broadcasting transaction data, the probes do not have the verification and storage functions of the blocks, the probes are kept connected with the target block chain nodes and the block chain nodes in the area through the network connection management unit, the transaction data in the block chain nodes of each area are directly forwarded to a memory pool of the target block chain nodes through the probes, new transactions generated in the target block chain nodes are rapidly broadcast to the block chain nodes of each area through the probes, and the network connection management unit and the target block chain nodes are communicated by websockets supporting disconnection;
the node network behavior monitoring unit is used for recording network behaviors of the blockchain nodes connected with the probes while collecting and broadcasting transaction data, and carrying out statistical analysis and scoring on the recorded results to form statistical analysis and scoring results;
and the network policy management unit is used for adopting a corresponding network connection policy according to the recorded, statistical analysis and scoring results, wherein the network connection policy comprises identifying the block chain nodes which are idle and cheat according to the statistical analysis results, adding the nodes into a blacklist and shielding node connection.
CN202310028641.7A 2023-01-09 2023-01-09 Method and device for collecting and broadcasting transaction data of block chain link point memory pool Active CN115766745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310028641.7A CN115766745B (en) 2023-01-09 2023-01-09 Method and device for collecting and broadcasting transaction data of block chain link point memory pool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310028641.7A CN115766745B (en) 2023-01-09 2023-01-09 Method and device for collecting and broadcasting transaction data of block chain link point memory pool

Publications (2)

Publication Number Publication Date
CN115766745A CN115766745A (en) 2023-03-07
CN115766745B true CN115766745B (en) 2023-05-23

Family

ID=85348741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310028641.7A Active CN115766745B (en) 2023-01-09 2023-01-09 Method and device for collecting and broadcasting transaction data of block chain link point memory pool

Country Status (1)

Country Link
CN (1) CN115766745B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116708464B (en) * 2023-08-09 2023-10-31 杭州安碣信息安全科技有限公司 De-centralized blockchain node connection management protocol method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108616596A (en) * 2018-05-09 2018-10-02 南京邮电大学 It is adaptively known together method based on the block chain that dynamic authorization and network environment perceive
CN109617994A (en) * 2018-12-30 2019-04-12 于涛 A kind of method and system positioning block chain interior joint position
EP3635608A1 (en) * 2017-06-07 2020-04-15 Nchain Holdings Limited Computer-implemented system and method for managing large blocks over a blockchain network
CN112819433A (en) * 2021-02-01 2021-05-18 北京工业大学 Consensus method for collaborative government affair block chain
CN113689222A (en) * 2021-08-25 2021-11-23 福建坛讯信息科技有限公司 Block chain-based digital currency transaction network topology data analysis and optimization method and system
CN113973021A (en) * 2021-07-13 2022-01-25 华中科技大学 Network transmission optimization device and method for image block chain

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10812270B2 (en) * 2017-04-07 2020-10-20 Citizen Hex Inc. Techniques for increasing the probability that a transaction will be included in a target block of a blockchain
GB201709848D0 (en) * 2017-06-20 2017-08-02 Nchain Holdings Ltd Computer-implemented system and method
CA3088610A1 (en) * 2018-01-17 2019-07-25 Geeq Corporation Blockchain methods, nodes, systems and products
CN110474818B (en) * 2019-07-11 2023-02-28 福州博泉网络科技有限公司 Block chain network sniffer, network sniffing method and optimization method
CN112633882A (en) * 2020-12-28 2021-04-09 青岛海链数字科技有限公司 Block chain network, data storage method and device, electronic equipment and storage medium
CN113489681B (en) * 2021-06-08 2022-06-21 湖南大学 Block link point data consistency consensus method, device, equipment and storage medium
CN113362181B (en) * 2021-07-20 2023-11-24 佳乔(深圳)投资有限公司 Transaction method and system based on blockchain
CN114915404A (en) * 2022-05-13 2022-08-16 北京邮电大学 Block chain data storage extension model construction method for Internet of things

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3635608A1 (en) * 2017-06-07 2020-04-15 Nchain Holdings Limited Computer-implemented system and method for managing large blocks over a blockchain network
CN108616596A (en) * 2018-05-09 2018-10-02 南京邮电大学 It is adaptively known together method based on the block chain that dynamic authorization and network environment perceive
CN109617994A (en) * 2018-12-30 2019-04-12 于涛 A kind of method and system positioning block chain interior joint position
CN112819433A (en) * 2021-02-01 2021-05-18 北京工业大学 Consensus method for collaborative government affair block chain
CN113973021A (en) * 2021-07-13 2022-01-25 华中科技大学 Network transmission optimization device and method for image block chain
CN113689222A (en) * 2021-08-25 2021-11-23 福建坛讯信息科技有限公司 Block chain-based digital currency transaction network topology data analysis and optimization method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Geography-Based P2P Overlay Network for Fast and Robust Blockchain Systems;Haoran Qiu;《IEEE Transactions on Services Computing ( Early Access )》;全文 *
一种支持区块链交易溯源的混合索引机制;尤瑶;孔兰菊;肖宗水;郑永清;李庆忠;;计算机集成制造系统(第04期);全文 *

Also Published As

Publication number Publication date
CN115766745A (en) 2023-03-07

Similar Documents

Publication Publication Date Title
Rohrer et al. Discharged payment channels: Quantifying the lightning network's resilience to topology-based attacks
Antoniades et al. One-click hosting services: a file-sharing hideout
Chen et al. End-user mapping: Next generation request routing for content delivery
CN109246211B (en) Resource uploading and resource requesting method in block chain
Dhamdhere et al. Measuring the deployment of IPv6: topology, routing and performance
Imtiaz et al. Churn in the bitcoin network: Characterization and impact
Liu et al. Location-aware topology matching in P2P systems
Torres et al. Dissecting video server selection strategies in the YouTube CDN
Liu et al. A distributed approach to solving overlay mismatching problem
Isdal et al. Privacy-preserving p2p data sharing with oneswarm
Falkner et al. Profiling a million user DHT
Liu et al. Location awareness in unstructured peer-to-peer systems
Mao et al. Perigee: Efficient peer-to-peer network design for blockchains
Monnerat et al. D1HT: A distributed one hop hash table
US9143422B2 (en) Determining network node performance data based on location and proximity of nodes
CN101378409A (en) Optimal operation of hierarchical peer-to-peer networks
CN102724063A (en) Log collection server, data packet delivering and log clustering methods and network
CN115766745B (en) Method and device for collecting and broadcasting transaction data of block chain link point memory pool
Daniel et al. Map-z: Exposing the zcash network in times of transition
CN111181900B (en) Data message sending and receiving method, storage medium and processor
Shen et al. A geographically aware poll-based distributed file consistency maintenance method for P2P systems
Zhang et al. Anyopt: Predicting and optimizing ip anycast performance
Christin et al. A cost-based analysis of overlay routing geometries
Abbar et al. Robustness and resilience of cities around the world
Cisco Configuring Network Proximity

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