CN115766745A - Method and device for collecting and broadcasting transaction data of block chain node memory pool - Google Patents
Method and device for collecting and broadcasting transaction data of block chain node memory pool Download PDFInfo
- Publication number
- CN115766745A CN115766745A CN202310028641.7A CN202310028641A CN115766745A CN 115766745 A CN115766745 A CN 115766745A CN 202310028641 A CN202310028641 A CN 202310028641A CN 115766745 A CN115766745 A CN 115766745A
- Authority
- CN
- China
- Prior art keywords
- network
- block chain
- nodes
- node
- transaction
- 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
Images
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy 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 node memory pool. The method comprises the steps of traversing a block chain network, recording connection character strings of discovered peer block chain nodes, analyzing the distribution condition of ip geographic areas of the block chain nodes of the whole network according to the connection character strings of the discovered peer block chain nodes, carrying out area division on the block chain nodes, deploying a probe in each area, forming a tree network topological graph as a bridge for communicating the block chain nodes in the area with the target block chain nodes, and carrying out collection and broadcasting of transaction data.
Description
Technical Field
The patent relates to the technical field of block chain networks, in particular to a method and a device for collecting and broadcasting transaction data of a block chain link point memory pool.
Background
Transaction data in the blockchain dot memory pool is collected and broadcast by blockchain p2p network propagation. Generally, a transaction data is broadcast to neighboring nodes in a block chain p2p network in a broadcast manner since a user block chain link point is generated, the neighboring nodes receive the transaction, and continue to broadcast after verifying the transaction, so that the broadcast and verification processes are repeated for several times and finally reach a target block chain node memory pool.
Chinese patent application 202211113706X, which is directed to a transaction blocking method and apparatus for an intelligent contract vulnerability attack, is a method and apparatus for receiving an attack transaction in a memory pool provided by a block chain node in step 1 and broadcasting the constructed new transaction to the block chain node in step 8, wherein the transaction data collected by the node into the memory pool needs to be as fast as possible (low latency) to provide sufficient processing time for the transaction blocking of the intelligent contract vulnerability attack, so that the transaction is linked up without the completion of processing the attack transaction. There are the following problems with collecting and broadcasting transaction data over conventional blockchain p2p networks.
1) Problem of node idling or cheating
Due to the randomness and the particularity of the block chain decentralized service, the network behaviors of the block chain nodes are complex and changeable, and are difficult to evaluate and investigate, so that a plurality of nodes have behaviors of idling and even cheating, convenience conditions are provided for some network attacks (such as sunstroke attacks), and the transmission of transaction data in the block chain is not facilitated.
2) Network latency problem
According to statistics, in the ether house p2p network, one transaction data can reach the memory pool of the block node through 4.5 or at most 7 block chain link points on average. Then the average delay of each transaction is collected by an EtherFang p2p network for 90ms, estimated as 20ms consumed by one broadcast and verification, and tests of deploying a plurality of nodes around the world show that the time difference between the first arrival node and the last arrival node of the same transaction is more than 1s and is about 120ms on average. The reasons for this are three main points: firstly, p2p broadcasting is a network transmission mode with low efficiency, a large amount of data can be repeatedly transmitted, network resources are wasted, and the quick transmission of new transactions is influenced; secondly, due to the fact that the p2p network lacks routing table information, a propagation path that transaction data are broadcasted from London to los Angeles and then broadcasted to Frankfurt appears, and network delay is greatly increased; thirdly, in order to reduce broadcast redundant data, the block link points perform operations such as encoding and decoding, signature verification and the like on transaction data, and broadcast is performed after the verification operations are completed, so that time is required for the operations, and the network delay of transaction propagation is further increased. Such network delays do not facilitate the transaction blocking process of intelligent contract vulnerabilities.
3) Deployment and operation cost problem
At present, the block link point deployment configuration requirement is high, for example, the recommended configuration requirement of etherhouses is as follows: 4-core CPU, 16GB memory and 1TB fast SSD, and the network cost is also needed every month. The project needs to be provided with a plurality of nodes in the main global area, and the cost is too high to be beneficial to the continuous development of the project.
Disclosure of Invention
The invention improves the defects of the prior art, mainly divides block chain node areas according to geographical positions, deploys a network probe in each area, and the network probes gather to target block chain nodes so as to build a tree-shaped network topological graph and form a collection and broadcast network of transaction data.
The invention is realized by the following technical scheme:
the invention discloses a method for collecting and broadcasting transaction data of a block chain node memory pool, which comprises the following steps:
traversing a block chain network, and recording the connection character strings of the link points of the peer blocks;
according to the found connection character strings of the link points of the peer blocks, analyzing the distribution condition of ip geographic regions of the link points of the block chains of the whole network, and carrying out region division on the link points of the blocks;
deploying probes in each area to serve as bridges of the block chain nodes in the communication area and the target block chain nodes to form a tree network topological graph, and collecting and broadcasting transaction data;
recording the network behavior of the block chain nodes connected with the probe while collecting and broadcasting transaction data, and performing statistical analysis and scoring on the recorded results to form statistical analysis and scoring results;
and according to the record, the statistical analysis and the grading result, adopting a corresponding network connection strategy to keep the uplink rate of the instant transaction of the network higher than 80 percent and the pass rate of the instant transaction higher than 95 percent.
As a further improvement, the distribution situation of the ip geographic area of the whole network block chain nodes is analyzed according to the discovered peer block chain link point connection character strings, the block chain link points are divided into areas, when the inquiry of the ip geographic area information of part of the nodes is not accurate, the network delay of the nodes is measured, and the nodes with the network delay larger than 50ms are excluded from the areas.
As a further improvement, the probes are deployed in each area and used as bridges for communicating the block chain nodes in the area with the destination block chain nodes to form a tree network topological graph for collecting and broadcasting transaction data, and the probes only cache information with the height of 11052984, 14811135, 15466495, 1920000 and the nearest 1024 blocks, namely respond to RequestOneHeader, requestheadbynumber and requestkeys requests of the block chain nodes in the area without being disconnected, and continuously collect and broadcast the transaction data.
As a further improvement, said adopting a corresponding network connection strategy according to the recording, statistical analysis and scoring result, the strategy comprising: firstly, identifying idle and cheating block chain nodes according to a statistical analysis result, adding the nodes into a blacklist, shielding node connection and saving network resources; secondly, adding the block chain link points with the scores closer to the top 10% in the score result into a white list, and regularly and continuously trying to reestablish connection after the probe is restarted or the nodes are disconnected; thirdly, according to the difference of arrival time of the transaction (block) data recorded by different probes in the statistical analysis result, judging the area information of important nodes (block-out nodes and transaction main generation nodes) in the block chain network, improving the number of the probes or system configuration of the areas, and preferentially broadcasting the transaction to the areas; recording the current connection state when the node is disconnected, and trying to connect the node in the state after restarting; fifthly, recording node disconnection message prompt, and continuing trying to connect the node prompting the Too Man Peer; and sixthly, estimating the node degree of the block chain, and trying to continuously connect nodes with the degree of more than 100.
The invention also discloses a device for collecting and broadcasting the 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 discover a new node in the blockchain network and provide network connection 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 node. The unit can inquire the IP geographical area information of the nodes and count and analyze the area distribution condition of the nodes;
and the network connection management unit is used for deploying probes in each area, and the probes are used as bridges of the block chain nodes in the communication area and the target block chain nodes to form a tree network topological graph for collecting and broadcasting transaction data. The unit is a component that connects the intra-area blockchain node and the destination blockchain node. The unit communicates with a destination block link node memory pool upwards, including transaction data submission and transmission, establishes connection with block link points in a region downwards according to network connection character strings and configuration requirements of the node region, and is responsible for subsequent management of the connection.
The node network behavior monitoring unit is used for recording the network behavior of the block chain nodes connected with the probe while collecting and broadcasting the transaction data, and performing statistical analysis and scoring on the recorded result to form a statistical analysis and scoring result;
and the network strategy management unit is used for adopting a corresponding network connection strategy according to the recording, statistical analysis and grading results, and keeping the uplink rate of the instant transaction of the network higher than 80 percent and the passing rate of the instant transaction higher than 95 percent.
The invention has the following beneficial effects:
(1) Establishing node behavior portrayal and identifying important node information
According to the invention, partial idle and cheating nodes are found and added into the connection blacklist by the probe recording block chain node network behavior data, so that the resource overhead of the probe is reduced; in addition, by comparing historical data recorded by different probes, the information of some important block chain nodes is judged according to data timeliness statistical analysis, for example, 15 of 26 verification nodes of a currency An Zhi energy chain are in Europe, and the information is preferentially sent to the probe in the European area when a new transaction is sent;
(2) Network delay for effectively reducing transaction data propagation in blockchain networks
14 Ethernet network probes are deployed around the world to push and collect transaction data to a target block chain node, and statistics shows that the instant transaction passing rate reaches 95%, and the uplink rate of the instant transaction is improved to 80% from the previous 40%. Therefore, the invention effectively reduces the network delay of transaction data propagation in the block chain network;
(3) Effectively reduces the operation cost
The main program of the invention is the probe, and the probe mainly engages in the transaction data network forwarding work and does not have the functions of verification, storage and the like of the block. Therefore, the configuration of the 2-core CPU, the 4GB memory and the 40GB common mechanical hard disk of the deployment server can sufficiently support the network connection of 2000+ block chain nodes, and in addition, the idle and cheating nodes are disconnected in the operation process, so that the network cost is reduced, and the operation cost is effectively reduced.
Drawings
FIG. 1 is a flow chart of a transaction data collection and broadcasting method of the present invention;
FIG. 2 is a schematic diagram of a design of a transaction data collection and broadcasting device;
FIG. 3 is a diagram of the main country distribution of EtherFang nodes;
fig. 4 is a diagram of the transaction initiation area of the etherhouse.
Detailed Description
The invention records a method for collecting transaction data of a block chain link point memory pool, divides block chain node areas according to geographical positions, deploys a network probe in each area, and the network probes gather to target block chain nodes, thereby constructing a tree network topological graph, forming a collection and broadcast network of the transaction data, and achieving the purpose of quickly collecting and broadcasting the transaction data by the target block chain link points. Because the sending time of the transaction data in the blockchain network cannot be determined, the network delay of transaction data propagation cannot be directly measured, in addition, the transaction is randomly sent in various regions around the world, and the propagation delay difference of different transactions is large, two indexes are defined to measure the network effect constructed by the method, namely the uplink rate of the instant transaction and the passing rate of the instant transaction. 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 that transaction data collected by the memory pool is from a newly-built network. As shown in fig. 1, the method comprises the following steps:
step 1: and traversing the block chain network, and recording the found connection character strings of the link points of the peer blocks.
Using a p2p network discovery unit, introducing a PostgreSQL database, and recording network connection character strings of discovered peer block chain 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 is analyzed from the character string, and the storage structure of the database is as follows:
field(s) | Use of |
id | Node Id for recording the weight |
enode | Network connection character string |
ip | Node IP for subsequent analysis of node zone distribution |
reason | Attempted connection result |
lat | Longitude (G) |
lng | Dimension (d) of |
country | Country of node |
continent | Continent where nodes are located |
region | Provincial administrative district where node is located |
facilitator | Node network facilitator |
The p2p network discovery unit tries to connect the node, updates the connection result after the attempted connection is finished, and can filter out most nodes of other block chain networks according to the connection result. The recordings with ligation results in the following three cases were excluded from the subsequent analysis:
reason | scene |
network ID mismatch | Different chain IDs indicate that the nodes are in different block chain networks |
genesis mismatch | The creation of the world blocks are different, which shows that the nodes are in different blockchain networks |
fork ID rejected | The nodes are in different hard branches |
Step 2: and analyzing the ip geographic region distribution condition of the block chain nodes of the whole network according to the found connection character string of the link points of the peer blocks, and carrying out region division on the link points of the blocks.
After the p2p network discovery unit in the step 1 runs for 1 week, recording network connection character strings of about 90% of block chain nodes of the whole network, inquiring the geographic position information of the IP according to the IP analyzed by the character strings, and updating the regional distribution condition of the nodes in a database. Statistical analysis is performed on the result data, such as the distribution of the main countries of the etherhouse nodes as shown in fig. 3.
The Etherhouse block nodes are divided into 14 regions according to the main national distribution of the Taifanhouse nodes, and the centers of the regions are Quebeck, canada, virginia, california, oregon, ohio, tokyo, japan, hangzhou, hong, china, new Gangpo, sydney, indian Mony, balin, farkfu, germany, london.
In addition, due to inaccuracy of information query of a part of ip geographic regions, SRTT is used as network delay of block chain node points, and in combination with the size of the region, nodes with network delay larger than 50ms are set to be excluded from the region, and network connection character strings of the nodes are sent to other regions for connection test.
And step 3: and deploying probes in each area to serve as bridges of the block chain nodes in the communication area and the target block chain nodes to form a tree network topological graph, and collecting and broadcasting transaction data.
And (3) deploying probes on the cloud servers of the 14 region centers divided in the step (2), wherein the probes are kept connected with the target block chain nodes and the block chain link points in the regions through a network connection management unit. Therefore, the target block chain node and the whole network block chain link point form a network with a tree structure through 14 probes, and the transaction data in the block chain nodes of each area are directly transmitted to the memory pool of the target block chain node through the probes. Accordingly, new transactions generated in the destination blockchain node can also be quickly broadcast to the blockchain nodes of the areas through the probe.
On an Ethernet, the probe only caches information with the height of 11052984, 14811135, 15466495 and 1920000 and 1024 blocks closest to the probe, and can respond to requests of requestoneHeader, requestHeaderByNumber and requestBodies of block chain nodes in an area without being disconnected from network connection by the block chain nodes in the area, so that the stability of network connection is maintained, the storage requirement of a probe operation environment is reduced, and the operation cost can be saved.
And 4, step 4: and recording the network behavior of the block chain nodes connected with the probe while collecting and broadcasting the transaction data, and performing statistical analysis and scoring on the recorded result to form a statistical analysis and scoring result.
When the probe collects and broadcasts transaction data, the node network behavior monitoring unit records the network behavior of the link point of the block connected with the probe, and the method comprises the following steps:
network behavior name | Explanation of the invention | Parameter determination Yi (Chinese character) |
Degree of node connectivity | Number of nodes currently connected to a blockchain node | N 1 |
Connection hold time | The time length for the node connection to be established to the present | N 2 |
IP hosting factor | How many nodes there are on the same IP | N 3 |
Network latency | ||
Transaction priority arrival number | Number of transactions to probe broadcast first by blockchain node | E 1 |
Number of block priority arrivals | Number of blocks to probe broadcast first by blockchain node | E 2 |
Node transaction broadcast recording | Block chain node point broadcast transaction arrival and time, record of last 2 hours | |
Node block broadcast recording | Block chain node broadcasts block arrival and time, with a record of the last 1 day | |
Transaction awareness rate | New block occupation by transaction in existing new block in transaction broadcast by new block arrival time zone blockchain node Average value of the specific gravity of total transaction number | E 3 |
Transaction request reply failure rate | Request quantity and total request quantity of transaction hash request non-reply or overtime or reply result not passing verification Ratio of the amounts | E 4 |
Block request reply failure rate | The number of requests and the total number of requests of which the block hash request is not replied or overtime or the reply result is not verified Ratio of the amounts | E 5 |
Number of invalid transactions | Broadcast transaction amount not verified | E 6 |
Number of invalid blocks | Number of broadcast blocks that failed verification | E 7 |
The node network behavior monitoring unit calculates the network behavior score of the connection node every 3h, 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< 1, w 1 、w 2 、w 5 、w 6 、w 7 > 0,w 3 、w 8 、w 9 、w 10 、w 11 < 0。
After the calculation is finished, the scores are sorted from high to low.
On the other hand, the network behavior monitoring unit counts the same transaction arrival time of different probes in the latest 24h in the Etherhouse network, and according to the transaction quantity of the first-arriving probes, an initiation area situation graph 4 of the Etherhouse transaction is obtained after analysis, and the initiation area of the Etherhouse transaction can be known, and the transactions in the Etherhouse are mainly born in three areas of U.S. Virginia, germany Frankfurt and Japan.
Similarly, the network behavior monitoring unit counts the block broadcast arrival time in the latest 24h of the energy chain of the coin An Zhi, and obtains a conclusion after statistical analysis according to the number of blocks of the verification node signature which arrive at the probe first: the coin An Zhi can chain 15 of 26 authentication nodes in europe, 8 in the united states, and 3 in japan. The concrete conditions are as follows:
address | Name (R) | In the area |
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 |
0xb218C5D6aF1F979aC42BC68d98A5A0D796C6aB01 | Validator: Alan Turing | London |
0xBe807Dddb074639cD9fA61b47676c064fc50D62C | Validator: Certik | London |
0x295e26495CEF6F69dFA69911d9D8e4F3bBadB89B | Validator: Legend | Virginia |
0xE9AE3261a475a27Bb1028f140bc2a7c843318afD | Validator: HashQuark | Tokyo |
0xee226379dB83CfFC681495730c11fDDE79BA4c0C | Validator: InfStones | Virginia |
0x685B1ded8013785d6623CC18D214320b6Bb64759 | Validator: Namelix | 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 |
0xe2d3A739EFFCd3A99387d015E260eEFAc72EBea1 | Validator: MathWallet | London |
0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88 | Validator: Ankr | Frankfurt |
0x0BAC492386862aD3dF4B666Bc096b0505BB694Da | Validator: Claude Shannon | London |
0xFE6E72b223f6d6Cf4edc6bFf92f30e84b8258249 | Tokyo | |
0x73564052D8e469ED0721c4e53379DC3C91228930 | Tokyo |
And 5: and according to the record, the statistical analysis and the grading result, adopting a corresponding network connection strategy to keep the uplink rate of the instant transaction of the network higher than 80 percent and the pass rate of the instant transaction higher than 95 percent.
The anticipatory network connection policy includes.
And (4) setting the block link points with the transaction awareness rate less than 10% as idle nodes according to the transaction awareness rate recorded in the step (4), and disconnecting the network connection of the nodes by the probe and adding the nodes into a blacklist to save network resources.
And (4) setting the block chain nodes with the invalid transaction number of more than 1000 or the invalid block number of more than 20 as cheating nodes according to the invalid transaction number and the invalid block number recorded in the step (4), and disconnecting the network connection of the nodes by the probe and adding the nodes into a blacklist to save network resources.
And (4) sorting according to the grading result in the step (4), adding the block chain link points with the grades of 10% in a white list, continuously trying to reestablish the connection after the probe is restarted or the node is disconnected, and disconnecting the block chain link points with the grades of 10% later by the probe when the node connection number reaches the set maximum connection number so as to establish new connection for other block chain link points.
According to the statistical analysis result in the step 4, the regional scope of the EtherFang network in the America Virginia, germany Frankfurt, japan and the like is detailed, and a plurality of probes are more deployed. In addition, when a new transaction is generated in the memory pool of the destination block chain node in the currency An Zhi energy chain, the transaction is preferentially broadcast to the probe in the European area, so that the new transaction can reach the memory pool of the verification node as soon as possible.
In addition, the following network connection strategies are realized, namely, firstly, the current connection state is recorded when the node is disconnected, and the node in the state is tried to be connected after the node is restarted; recording node disconnection message prompt, and continuously trying to connect the node prompting the Too Man Peer; thirdly, according to the node connectivity recorded in the step 3, when the node is disconnected, the node with the value larger than 100 is tried to be connected.
The invention also comprises a device for collecting and broadcasting the transaction data of the block chain node 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 the RLPx protocol, which implements node discovery based on the widely used routing algorithm of Distributed Hash Table (DHT) Kademlia. The p2p network discovery unit can gradually discover all nodes of the whole network and send network connection character strings of the nodes to the IP geographical position query analysis unit by continuously running the RLPx protocol.
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 node. The unit can inquire the IP geographical area information of the nodes and count and analyze the area distribution condition of the nodes.
The IP geographical position query analysis unit adopts high-precision global IP geographical region information, and the geographical region information comprises continents, countries, provincial administrative units, service providers and dimensions, and can support the detailed division of regions. The IP geographical region information base comprises 42.9 million pieces of global IP information, a true IP base file format algorithm is used, the storage space is only 30MB, a distributed deployment mode is used, and low-delay frequent inquiry is supported.
And the IP geographic position query analysis unit performs statistical analysis according to the queried IP geographic area information result to generate the area distribution condition of the block chain nodes.
And the network connection management unit is used for deploying a probe in each area, is used as a bridge for communicating the block chain nodes in the areas and the target block chain nodes, forms a tree network topological graph, and collects and broadcasts transaction data. The cell is a component that connects a blockchain node within a region and a destination blockchain node. The unit communicates with a destination block link node memory pool upwards, including transaction data submission and transmission, establishes connection with block link points in a region downwards according to network connection character strings and configuration requirements of the node region, and is responsible for subsequent management of the connection.
The network connection management unit manages the DEVp2p and the etherhouse application level protocol ETH (current versions are mainly 66 and 67) for p2p application session establishment. The network connection management unit requests the selected node to establish a secure TCP connection according to the regional distribution of the blockchain nodes and the connection configuration, DEVp2p negotiates an application session between two connected peer nodes, and periodically sends PING/PONG message pairs to keep the session alive. The ETH protocol then communicates with the block chain nodes in the network over the session, taking care of the codec protocol data. The network connection management unit also receives the network connection instruction sent by the network policy management unit to manage the session.
In addition, the network connection management unit and the destination block chain node communicate by adopting a websocket supporting disconnection and reconnection. The websocket asynchronous communication protocol can support frequent transaction data submission, and as the probe and the target block link point are often in different continents, the stability of network transmission cannot be guaranteed, so that the function of disconnection and reconnection is necessary. The network connection management unit also supports communication with the public block chain nodes through an HTTP protocol, and transaction submission and basic state acquisition are carried out by using RPC interfaces provided by the public block chain nodes.
And the node network behavior monitoring unit is used for recording the network behavior of the node of the block chain connected with the probe, and performing 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 the network behavior data of the block link points, performing statistical analysis and grading on the result, and providing data support for the network strategy making and execution of the network strategy management unit. Currently used network behavior data indicators include node connectivity, connection hold time, IP hosting factors, transaction priority arrival number, block priority arrival number, node transaction broadcast records, node block broadcast records, transaction awareness rate, transaction request reply failure rate, block request reply failure rate, invalid transaction number, and invalid block number.
And the network strategy management unit is used for adopting a corresponding network connection strategy according to the recording, the statistical analysis and the grading result. The uplink rate of the real-time transaction of the network is kept to be higher than 80%, and the passing rate of the real-time transaction is kept to be higher than 95%.
According to the record, statistical analysis and grading result of the node network behavior monitoring unit, the network strategy management unit can flexibly make a plurality of network connection strategies and control the effective conditions and the execution period of the network strategies. 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 understood by those skilled in the art that the foregoing is only a single example of the invention and is not intended to limit the invention, which has been described in detail with reference to the foregoing examples, but it will be apparent to those skilled in the art that various changes in the form and details of the invention may be made and equivalents may be substituted for elements thereof. All modifications, equivalents and the like which come within the spirit and principle 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 of a block chain node memory pool is characterized by comprising the following steps:
traversing the block chain network, and recording the link point connection character strings of the discovered peer blocks;
according to the found connection character strings of the link points of the peer blocks, analyzing the distribution condition of ip geographic regions of the link points of the block chains of the whole network, and carrying out region division on the link points of the blocks;
deploying probes in each area to serve as bridges of the block chain nodes in the communication area and the target block chain nodes to form a tree network topological graph, and collecting and broadcasting transaction data;
recording the network behavior of the block chain nodes connected with the probe while collecting and broadcasting transaction data, and performing statistical analysis and scoring on the recorded results to form statistical analysis and scoring results;
and according to the recording, statistical analysis and grading results, adopting a corresponding network connection strategy to keep the uplink rate of the instant transaction of the network higher than 80 percent and the pass rate of the instant transaction higher than 95 percent.
2. The method for collecting and broadcasting transaction data of the block link point memory pool according to claim 1, wherein the distribution condition of ip geographic areas of all-network block link nodes is analyzed, the block link points are divided into areas, when the query of the ip geographic area information of part of the nodes is not accurate, the network delay of the nodes is measured, and the nodes with the network delay of more than 50ms are excluded from the areas.
3. The method for collecting and broadcasting transaction data in a block link point memory pool according to claim 1, wherein a probe is deployed in each area to serve as a bridge between a block link node in a communication area and a destination block link node to form a tree network topology for collecting and broadcasting transaction data, and the probe has a buffer height of 11052984, 14811135, 15466495, 1920000 and the closest 1024 block information, that is, the probe can respond to RequestOneHeader, requestHeaderByNumber and RequestBodies requests of the block link node in the area without being disconnected, and continuously collect and broadcast the transaction data.
4. The method of claim 1, wherein said steps are performed according to recorded, statistically analyzed, and scored results using a corresponding network connection policy, said policy comprising: firstly, identifying idle and cheating block chain nodes according to a statistical analysis result, adding the nodes into a blacklist, and shielding node connection; secondly, adding the block chain link points with the scores closer to the top 10% in the score result into a white list, and regularly and continuously trying to reestablish connection after the probe is restarted or the nodes are disconnected; thirdly, according to the difference of arrival time of the transaction (block) data recorded by different probes in the statistical analysis result, judging the area information of important nodes (block-out nodes and transaction main generation nodes) in the block chain network, improving the number of the probes or system configuration of the areas, and preferentially broadcasting the transaction to the areas; recording the current connection state when the node is disconnected, and trying to connect the node in the state after restarting; fifthly, recording node disconnection message prompt, and continuing trying to connect the node prompting the Too Man Peer; and sixthly, estimating the node degree of the block chain, and trying to continuously connect nodes with the degree of more than 100.
5. A device for collecting and broadcasting transaction data of a block chain link point memory pool 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 connection character string;
the IP geographical position query analysis unit is used for analyzing the distribution condition of IP geographical regions of the block chain nodes of the whole network according to the found connection character strings of the chain link points of the peer blocks and carrying out region division on the chain link points of the blocks;
the network connection management unit is used for deploying probes in each area, and the probes are used as bridges of the block chain nodes in the communication areas and the target block chain nodes to form a tree network topological graph for collecting and broadcasting transaction data;
the node network behavior monitoring unit is used for recording the network behavior of the block chain nodes connected with the probe while collecting and broadcasting the transaction data, and performing statistical analysis and scoring on the recorded result to form a statistical analysis and scoring result;
and the network strategy management unit is used for adopting a corresponding network connection strategy according to the recording, statistical analysis and grading results, and keeping the uplink rate of the instant transaction of the network higher than 80 percent and the passing rate of the instant transaction higher than 95 percent.
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 true CN115766745A (en) | 2023-03-07 |
CN115766745B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116708464A (en) * | 2023-08-09 | 2023-09-05 | 杭州安碣信息安全科技有限公司 | De-centralized blockchain node connection management protocol method |
Citations (14)
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 |
US20180294967A1 (en) * | 2017-04-07 | 2018-10-11 | Citizen Hex | Techniques for increasing the probability that a transaction will be included in a target block of a blockchain |
CN109617994A (en) * | 2018-12-30 | 2019-04-12 | 于涛 | A kind of method and system positioning block chain interior joint position |
CN110474818A (en) * | 2019-07-11 | 2019-11-19 | 福州博泉网络科技有限公司 | Block chain network sniffer, Network Sniffing method and optimization method |
EP3635608A1 (en) * | 2017-06-07 | 2020-04-15 | Nchain Holdings Limited | Computer-implemented system and method for managing large blocks over a blockchain network |
EP3643034A1 (en) * | 2017-06-20 | 2020-04-29 | Nchain Holdings Limited | Fast propagation of recent transactions over a blockchain network |
US20210073212A1 (en) * | 2018-01-17 | 2021-03-11 | Geeq Corporation | Blockchain methods, nodes, systems and products |
CN112633882A (en) * | 2020-12-28 | 2021-04-09 | 青岛海链数字科技有限公司 | Block chain network, data storage method and device, electronic equipment and storage medium |
CN112819433A (en) * | 2021-02-01 | 2021-05-18 | 北京工业大学 | Consensus method for collaborative government affair block chain |
CN113362181A (en) * | 2021-07-20 | 2021-09-07 | 永旗(北京)科技有限公司 | Transaction method and system based on block chain |
CN113489681A (en) * | 2021-06-08 | 2021-10-08 | 湖南大学 | Block link point data consistency consensus method, device, equipment and storage medium |
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 |
CN114915404A (en) * | 2022-05-13 | 2022-08-16 | 北京邮电大学 | Block chain data storage extension model construction method for Internet of things |
-
2023
- 2023-01-09 CN CN202310028641.7A patent/CN115766745B/en active Active
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180294967A1 (en) * | 2017-04-07 | 2018-10-11 | Citizen Hex | Techniques for increasing the probability that a transaction will be included in a target block of a blockchain |
EP3635608A1 (en) * | 2017-06-07 | 2020-04-15 | Nchain Holdings Limited | Computer-implemented system and method for managing large blocks over a blockchain network |
EP3643034A1 (en) * | 2017-06-20 | 2020-04-29 | Nchain Holdings Limited | Fast propagation of recent transactions over a blockchain network |
US20210073212A1 (en) * | 2018-01-17 | 2021-03-11 | Geeq Corporation | Blockchain methods, nodes, systems and products |
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 |
CN110474818A (en) * | 2019-07-11 | 2019-11-19 | 福州博泉网络科技有限公司 | 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 |
CN112819433A (en) * | 2021-02-01 | 2021-05-18 | 北京工业大学 | Consensus method for collaborative government affair block chain |
CN113489681A (en) * | 2021-06-08 | 2021-10-08 | 湖南大学 | Block link point data consistency consensus method, device, equipment and storage medium |
CN113973021A (en) * | 2021-07-13 | 2022-01-25 | 华中科技大学 | Network transmission optimization device and method for image block chain |
CN113362181A (en) * | 2021-07-20 | 2021-09-07 | 永旗(北京)科技有限公司 | Transaction method and system based on 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 |
CN114915404A (en) * | 2022-05-13 | 2022-08-16 | 北京邮电大学 | Block chain data storage extension model construction method for Internet of things |
Non-Patent Citations (3)
Title |
---|
HAORAN QIU: "A Geography-Based P2P Overlay Network for Fast and Robust Blockchain Systems", 《IEEE TRANSACTIONS ON SERVICES COMPUTING ( EARLY ACCESS )》 * |
包振山;王凯旋;张文博;: "基于树形拓扑网络的实用拜占庭容错共识算法" * |
尤瑶;孔兰菊;肖宗水;郑永清;李庆忠;: "一种支持区块链交易溯源的混合索引机制", 计算机集成制造系统 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116708464A (en) * | 2023-08-09 | 2023-09-05 | 杭州安碣信息安全科技有限公司 | De-centralized blockchain node connection management protocol method |
CN116708464B (en) * | 2023-08-09 | 2023-10-31 | 杭州安碣信息安全科技有限公司 | De-centralized blockchain node connection management protocol method |
Also Published As
Publication number | Publication date |
---|---|
CN115766745B (en) | 2023-05-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Liu et al. | Location-aware topology matching in P2P systems | |
He et al. | Lord of the links: a framework for discovering missing links in the internet topology | |
Dhamdhere et al. | Measuring the deployment of IPv6: topology, routing and performance | |
Ager et al. | Anatomy of a large European IXP | |
Liu et al. | A distributed approach to solving overlay mismatching problem | |
Liu et al. | Location awareness in unstructured peer-to-peer systems | |
CN109246211B (en) | Resource uploading and resource requesting method in block chain | |
Antoniades et al. | One-click hosting services: a file-sharing hideout | |
Liu et al. | Building a scalable bipartite P2P overlay network | |
CN101102250B (en) | Distributed hashing mechanism for self-organizing networks | |
Chun et al. | Netbait: a distributed worm detection service | |
CN100550859C (en) | A kind of autonomic system network routing topology constructing method | |
Pujol et al. | Steering hyper-giants' traffic at scale | |
EP2230802A1 (en) | A method and apparatus for maintaining route information | |
CN102724063A (en) | Log collection server, data packet delivering and log clustering methods and network | |
CN1859239A (en) | Monitoring and analytic system for route between domain of internet and its working method | |
CN115766745A (en) | Method and device for collecting and broadcasting transaction data of block chain node memory pool | |
US20130242801A1 (en) | Reverse Engineering Peering At Internet Exchange Points | |
McQuistin et al. | Taming anycast in the wild internet | |
Wang et al. | DiCAS: An efficient distributed caching mechanism for P2P systems | |
Durairajan et al. | Timeweaver: Opportunistic one way delay measurement via ntp | |
Kim | Measuring Ethereum's peer-to-peer network | |
Cisco | Configuring Network Proximity | |
Zhou et al. | Regional IP Anycast: Deployments, Performance, and Potentials | |
AT&T |
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 |