CN115834087B - Block chain slicing method, system, equipment and storage medium based on stacked network - Google Patents
Block chain slicing method, system, equipment and storage medium based on stacked network Download PDFInfo
- Publication number
- CN115834087B CN115834087B CN202310139898.XA CN202310139898A CN115834087B CN 115834087 B CN115834087 B CN 115834087B CN 202310139898 A CN202310139898 A CN 202310139898A CN 115834087 B CN115834087 B CN 115834087B
- Authority
- CN
- China
- Prior art keywords
- nodes
- node
- blockchain
- fragments
- randomly
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Blockchain slicing method, system, equipment and storage medium based on stacked network, wherein the method comprises the following steps: s1, randomly and uniformly distributing nodes into the fragments; s2, after the nodes are randomly and uniformly distributed to one segment, adding a plurality of other segments to form a laminated network model; determining preconditions which are required to be met by each piece of attack difficulty elimination of 51% and adding minimum values and maximum values of different piece numbers into each node; and S3, managing the neighbor nodes, and storing and managing the neighbor nodes in each fragment added by the nodes. The invention has the advantages that: according to the method and the device, the attack difficulty of 51% is improved to a single slice, so that the safety and the decentralization degree of the slice block chain system are enhanced, and the communication efficiency among nodes in different slices is improved.
Description
Technical Field
The invention belongs to the technical field of blockchains, and particularly relates to a blockchain slicing method, a system, equipment and a storage medium based on a stacked network.
Background
Blockchain scalability is currently the main bottleneck impeding widespread adoption of distributed ledger technology. The slicing technology is used as one of the main stream modes of the block chain capacity expansion, and can realize the high-performance on-chain capacity expansion without reducing the decentralization degree of the block chain, thereby solving the problems of insufficient block chain expandability and lower throughput.
There are also significant limitations to the slicing technique, such as the security of the sliced blockchain system. In blockchain systems employing PoW consensus, malicious nodes may attack through counterfeit blocks if they control over 50% of the mining capacity. In fact, it is very difficult for an attacker to control over 50% of the mining capacity, but much easier in a sliced blockchain system.
Disclosure of Invention
In order to enhance the security and the decentralization degree of a segmented block chain system and improve the communication efficiency among nodes in different segments, the invention provides a block chain segmentation method, a system, equipment and a storage medium based on a stacked network, and the specific technical scheme is as follows:
the blockchain slicing method based on the stacked network comprises the following steps:
s1, randomly and uniformly distributing nodes into the fragments;
s2, after the nodes are randomly and uniformly distributed to one segment, adding a plurality of other segments to form a laminated network model; determining preconditions which are required to be met by each piece of attack difficulty elimination of 51% and adding minimum values and maximum values of different piece numbers into each node;
and S3, managing the neighbor nodes, and storing and managing the neighbor nodes in each fragment added by the nodes.
Specifically, the specific steps of randomly and uniformly distributing the nodes to the slices in the step S1 are as follows:
s11, at the beginning of a new network slicing period, each node randomly adds different slices;
s12, after each node solves a PoW problem based on the node ID and the slicing period randomness, participating in the slicing period; finally, the nodes are randomly assigned to different shards based on the node ID and the randomness of the shard period.
Specifically, step S2 includes determining nodes of its area according to a random allocation method, each area being divided intoSub-areas, each node in the sub-areas adding other slices in sequence, wherein +.>Is the number of slices of the entire blockchain system.
Specifically, the minimum value and the maximum value in step S2 are respectively
Wherein the method comprises the steps ofIs the number of slices of the entire blockchain system, < >>The ratio of the upper limit and the lower limit of the number of the added fragments is set by the block chain system.
Specifically, step S2 further includes an average value
Specifically, the step of determining preconditions that each fragment needs to satisfy to eliminate 51% of the attack difficulty is:
Wherein the method comprises the steps ofIs the computational effort of the whole blockchain system, +.>Is the number of fragments added by a node;
if the security of the sliced blockchain system is not degraded, the following inequality is satisfied:
Specifically, in step S3, a distributed hash table is used to perform storage management on the neighbor nodes in each fragment added by the node.
The system using the block chain slicing method based on the laminated network is characterized by comprising the following modules,
the method comprises the steps of layering a network model, wherein nodes in the model are randomly and uniformly distributed into different fragments, then adding other different fragments, and communicating any node with the nodes in the fragments to obtain block, transaction and state data;
the node distribution unit is used for adding a plurality of other fragments after the nodes are randomly and uniformly distributed to one fragment;
the security management module is used for determining preconditions which are required to be met by each partition to eliminate 51% of attack difficulty and minimum and maximum values of different partition numbers added to each node;
and the neighbor node storage unit is used for storing neighbor nodes of the nodes in each fragment.
An apparatus comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method described above.
A storage medium having stored thereon computer instructions which, when executed by a processor, perform the above method.
The invention has the advantages that:
according to the method and the system, the attack difficulty of 51% is improved to a single slice, so that the safety and the decentralization degree of the sliced block chain system are enhanced, after the nodes are randomly and uniformly distributed to one slice, a plurality of other slices are added to form a stacked network model, and the communication efficiency among the nodes in different slices is improved.
Drawings
Fig. 1 is a diagram of a stacked network model.
FIG. 2 is a schematic diagram of nodes allocated in different regions.
FIG. 3 is a schematic diagram of a node joining other multiple slices.
FIG. 4 is a block diagram of a computer system running aspects of the present application.
Detailed Description
As shown in fig. 1, the blockchain slicing method based on the stacked network in this embodiment includes the following steps:
s1, randomly and uniformly distributing nodes into the fragments; the method for forming the fragments comprises the following steps: firstly, at the beginning of a new network slicing period, each node randomly adds different slices; specifically, every certain time (such as 3 days), all nodes of the blockchain are randomly allocated and added into different fragments again so as to prevent node cheating; then, each node participates in a slicing cycle after solving a PoW problem based on node identity (node ID) and slicing period randomness; finally, the nodes are randomly assigned to different shards based on the node ID and the randomness of the shard time period. As shown in fig. 2. The number of regions U, V and W equal to the number of slices is created by blockchain randomness. In fig. 2, each node in the U, V and W areas is assigned to a slice s1, s2 and s3, respectively, and thus nodes n1 and n2 are assigned to a slice s1.
S2, as shown in FIG. 1, adding nodes into other multiple fragments; after the nodes are randomly and uniformly distributed to one segment, a plurality of other segments are added to form a stacked network model, and in FIG. 3, each region (U, V and W in FIG. 2) is divided intoA sub-region in which->Is the number of slices of the entire blockchain system; each node in the subregion joins the other shards in sequence. In fig. 3, the region U is divided into 2 (i.e., 3-1) sub-regions U1 and U2, and each node in the regions U1 and U2 is connected to the slices s2 and s3, respectively, so that the node n1 is connected to the slice s2 and the node n2 is connected to the slice s3. Similarly, each node may join more other shards. Because the node n1 and the node n2 in the slice s1 are respectively distributed to the slice s2 and the slice s3, the node n1 of the slice s2 stores the full data of the slice s2, and the node n2 of the slice s3 stores the full data of the slice s3, the slice s1 and the slice s2 can realize high-efficiency communication through the node n1, and the slice s1 and the slice s3 can realize high-efficiency communication through the node n 2.
In a tiled blockchain system, one of the major security issues is the attack on a single tile. For example, in a system employing PoW consensus, if a malicious node has controlled over 50% of the mining capacity, an attack may be initiated by forging a block. Assuming that the mining capacity of a malicious node in a non-sliced blockchain system does not exceed 50%, in a sliced blockchain system each slice must meet this condition, i.e. that malicious participants have less than 50% of the mining capacity in each slice. This will result in reduced security of the blockchain that enables the shards.
Wherein the method comprises the steps ofIs the computational effort of the whole blockchain system, +.>Is the number of fragments added by a node;
if the security of the sliced blockchain system is not degraded, the following inequality is satisfied:
If miners add too few slices, malicious nodes may control more than 50% of the mining capacity in one slice, and if miners add too many slices, the degree of decentralization of the blockchain system may decrease, so the number of added slices for the miners needs to be range-defined. Where miners tend to add more slices, even all slices, to get more rewards for mining, but with greater energy consumption and less de-centralisation. Thus, IT can be added differently according to the IT resource capacity of minersAverage value of number of fragmentsMinimum->Maximum->Respectively is
Wherein, the liquid crystal display device comprises a liquid crystal display device,the method is used for avoiding the reduction of the decentralization degree of the segmented block chain system; />The method is used for guaranteeing the safety of the fragments and preventing miners from adding too few fragments, so that malicious nodes can control the fragments more easily;the ratio of the upper limit and the lower limit of the added number of fragments is set by the block chain system. For example, the average value of the number of different fragments added by miners is 12, + for each fragment>25%, adding different fragments to the node by 9-15.
S3, managing the neighbor nodes; because each node can be added with a plurality of fragments, the node has neighbor nodes in each fragment, so that the neighbor nodes of the node in each fragment need to be managed and stored, and subsequent actions such as cross-fragment communication and transaction are facilitated. The neighbor nodes in each fragment that the node joins are stored by employing DHT (distributed hash table). For example, the neighbor node of node n1 is shown in table 1.
TABLE 1
Node n1 has the DHT of two neighboring nodes because it connects the two slices s1 and s2. In slice s1, node n1 has three neighboring nodes n2, n4, and n5, which also join the other slices, respectively.
The embodiment also includes a system using the block chain slicing method based on the stacked network, including:
the method comprises the steps of layering a network model, wherein nodes in the model are randomly and uniformly distributed into different fragments, then adding other different fragments, and communicating any node with the nodes in the fragments to obtain data such as blocks, transactions, states and the like; as shown in fig. 1, in the stacked network model, nodes are randomly and uniformly allocated to different segments. In addition, each node must join other more slices to ensure the security of the sliced blockchain system.
The node distribution unit is used for adding a plurality of other fragments after the nodes are randomly and uniformly distributed to one fragment; as shown in fig. 1, nodes n1 and n2 are assigned to segment s1. Meanwhile, the node n1 joins another slice s2, and the node n2 joins another slice s3. There are 4 nodes in slice s 1: n1, n2, n4, and n5, wherein nodes n1, n4 also join slice s2, and nodes n2, n5 also join slice s3. Thus, slice s1 may obtain the data of slice s2 from n1, or may obtain the data of slice s3 from n 2.
The security management module is used for determining preconditions which are required to be met by each partition to eliminate 51% of attack difficulty and minimum and maximum values of different partition numbers added to each node;
the preconditions that each fragment needs to satisfy to eliminate 51% of attack difficulty are determined as follows:
Wherein the method comprises the steps ofIs the computational effort of the whole blockchain system, +.>Is the number of fragments added by a node;
if the security of the sliced blockchain system is not degraded, the following inequality is satisfied:
The average value, the minimum value and the maximum value of adding different fragments to each node are determined as follows:
Wherein the method comprises the steps ofIs the number of slices of the entire blockchain system, < >>The ratio of the upper limit and the lower limit of the number of the added fragments is set by the block chain system.
And the neighbor node storage unit is used for storing neighbor nodes of the nodes in each fragment.
The embodiment also includes an apparatus comprising a memory and a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executable by the processor to implement the above-described hierarchical network based blockchain slicing method.
As shown in fig. 4, the present embodiment also discloses a computer system 1000 including a processor (CPU, GPU, FPGA, etc.) 1001 which can execute part or all of the processing in the embodiment shown in the above-described drawings according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage section 1008 into a Random Access Memory (RAM) 1003. In the RAM1003, various programs and data required for the operation of the system 1000 are also stored. The processor 1001, the ROM1002, and the RAM1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004. The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output portion 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage portion 1008 including a hard disk or the like; and a communication section 1009 including a network interface card such as a LAN card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The drive 1010 is also connected to the I/O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is installed as needed in the drive 1010, so that a computer program read out therefrom is installed as needed in the storage section 1008.
In particular, according to embodiments of the present disclosure, the method described above with reference to the drawings may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a medium readable thereby, the computer program comprising program code for performing the method in the accompanying drawings. In such an embodiment, the computer program can be downloaded and installed from a network via the communication portion 1009, and/or installed from the removable medium 1011.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware. The units or modules described may also be provided in a processor, the names of which in some cases do not constitute a limitation of the unit or module itself.
The present disclosure also provides a computer storage medium, which is understood to be a computer readable storage medium, where the computer readable storage medium may be a computer readable storage medium included in the node in the foregoing embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer-readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present disclosure.
The above embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention, and any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.
Claims (10)
1. The blockchain slicing method based on the stacked network is characterized by comprising the following steps of:
s1, randomly and uniformly distributing nodes into the fragments;
s2, after the nodes are randomly and uniformly distributed to one segment, adding a plurality of other segments to form a laminated network model; determining preconditions which are required to be met by each piece of attack difficulty elimination of 51% and adding minimum values and maximum values of different piece numbers into each node;
and S3, managing the neighbor nodes, and storing and managing the neighbor nodes in each fragment added by the nodes.
2. The stacked network-based blockchain sharding method of claim 1 wherein the specific steps of randomly and evenly distributing nodes into shards in step S1 are as follows:
s11, at the beginning of a new network slicing period, each node randomly adds different slices;
s12, after each node solves a PoW problem based on the node ID and the slicing period randomness, participating in the slicing period; finally, the nodes are randomly assigned to different shards based on the node ID and the randomness of the shard period.
3. The stacked network-based blockchain slicing method of claim 1, wherein step S2 comprises determining nodes of its regions according to a random allocation method, each region being divided intoSub-areas, each node in the sub-areas adding other slices in sequence, wherein +.>Is the number of slices of the entire blockchain system.
4. The stacked network-based blockchain slicing method of claim 1, wherein the minimum and maximum values in step S2 are respectively
6. The blockchain sharding method based on the stacked network of claim 1 wherein the step of determining preconditions that each shard needs to meet to eliminate 51% of the attack difficulty is:
Wherein the method comprises the steps ofIs the computational effort of the whole blockchain system, +.>Is the number of fragments added by a node;
if the security of the sliced blockchain system is not degraded, the following inequality is satisfied:
7. The stacked network-based blockchain sharding method of claim 1 wherein in step S3, a distributed hash table is used to store and manage neighbor nodes in each shard that a node joins.
8. A system using the stacked network based blockchain slicing method of any of claims 1-7, comprising,
the method comprises the steps of layering a network model, wherein nodes in the model are randomly and uniformly distributed into different fragments, then adding other different fragments, and communicating any node with the nodes in the fragments to obtain block, transaction and state data;
the node distribution unit is used for adding a plurality of other fragments after the nodes are randomly and uniformly distributed to one fragment;
the security management module is used for determining preconditions which are required to be met by each partition to eliminate 51% of attack difficulty and minimum and maximum values of different partition numbers added to each node;
and the neighbor node storage unit is used for storing neighbor nodes of the nodes in each fragment.
9. An apparatus comprising a memory and a processor; wherein the memory is for storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any of claims 1-7.
10. A storage medium having stored thereon computer instructions which, when executed by a processor, implement the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310139898.XA CN115834087B (en) | 2023-02-21 | 2023-02-21 | Block chain slicing method, system, equipment and storage medium based on stacked network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310139898.XA CN115834087B (en) | 2023-02-21 | 2023-02-21 | Block chain slicing method, system, equipment and storage medium based on stacked network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115834087A CN115834087A (en) | 2023-03-21 |
CN115834087B true CN115834087B (en) | 2023-06-06 |
Family
ID=85521966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310139898.XA Active CN115834087B (en) | 2023-02-21 | 2023-02-21 | Block chain slicing method, system, equipment and storage medium based on stacked network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115834087B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020011154A1 (en) * | 2018-07-09 | 2020-01-16 | 云图有限公司 | Method, apparatus, and system for blockchain transparent fragmentation |
CN112468255A (en) * | 2020-12-10 | 2021-03-09 | 电子科技大学 | Block link point time synchronization method based on network consensus and VRF algorithm |
CN113626875A (en) * | 2021-07-06 | 2021-11-09 | 北京理工大学 | Knowledge graph file storage method for block chain fragment enabling |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020000011A1 (en) * | 2018-06-25 | 2020-01-02 | Commonwealth Scientific And Industrial Research Organisation | Blockchain system and method |
-
2023
- 2023-02-21 CN CN202310139898.XA patent/CN115834087B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020011154A1 (en) * | 2018-07-09 | 2020-01-16 | 云图有限公司 | Method, apparatus, and system for blockchain transparent fragmentation |
CN112468255A (en) * | 2020-12-10 | 2021-03-09 | 电子科技大学 | Block link point time synchronization method based on network consensus and VRF algorithm |
CN113626875A (en) * | 2021-07-06 | 2021-11-09 | 北京理工大学 | Knowledge graph file storage method for block chain fragment enabling |
Non-Patent Citations (1)
Title |
---|
王柯元,姜鑫,贾林鹏,段田田,孙毅.区块链星型分片架构通量模型及应用.软件学报.2023,1-14. * |
Also Published As
Publication number | Publication date |
---|---|
CN115834087A (en) | 2023-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10664485B2 (en) | Block chain mining method, device, and node apparatus | |
Stehle et al. | A memory bandwidth-efficient hybrid radix sort on gpus | |
US11070361B2 (en) | Block generation method in blockchain-based system | |
US11190525B2 (en) | Blockchain system and permission management method thereof | |
US8819236B2 (en) | Resource optimization for online services | |
US20230009961A1 (en) | Graphic-blockchain-orientated sharding storage apparatus and method thereof | |
CN106156159A (en) | A kind of table connection processing method, device and cloud computing system | |
US9785515B2 (en) | Directed backup for massively parallel processing databases | |
US11429450B2 (en) | Aggregated virtualized compute accelerators for assignment of compute kernels | |
CN113114496A (en) | Block chain expandability problem solution based on fragmentation technology | |
CN109800261B (en) | Dynamic control method and device for double-database connection pool and related equipment | |
CN110336668B (en) | Random number generation method and device, application, equipment and storage medium | |
CN110809042A (en) | Intelligent contract fragmentation storage method based on de bruijn sequence generation technology | |
CN115202836A (en) | Computational power pooling system for improving GPU utilization efficiency | |
CN115834087B (en) | Block chain slicing method, system, equipment and storage medium based on stacked network | |
Atighehchi et al. | Generic Parallel Cryptography for Hashing Schemes | |
CN112527898B (en) | Security calculation method, device, computer and storage medium | |
CN116112507A (en) | Hierarchical blockchain-based multitasking asynchronous execution method and device | |
Bai et al. | Defending against contagious attacks on a network with resource reallocation | |
CN117061516B (en) | Multi-party security computing method, system and readable storage medium based on distribution | |
Yang et al. | Adapted PBFT consensus protocol for sharded blockchain | |
CN117376137A (en) | Block chain node slicing method, equipment and storage medium | |
CN113242123B (en) | Common user data acquisition method and device and server | |
CN113242286B (en) | Method, equipment and storage medium for flexibly improving transaction throughput | |
CN114268637B (en) | Data asset storage method and device based on distributed system |
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 |