CN109508968B - Block chain system and control method thereof - Google Patents

Block chain system and control method thereof Download PDF

Info

Publication number
CN109508968B
CN109508968B CN201811249001.4A CN201811249001A CN109508968B CN 109508968 B CN109508968 B CN 109508968B CN 201811249001 A CN201811249001 A CN 201811249001A CN 109508968 B CN109508968 B CN 109508968B
Authority
CN
China
Prior art keywords
transaction
chain
fragment
sub
block
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
CN201811249001.4A
Other languages
Chinese (zh)
Other versions
CN109508968A (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.)
Changzhou Weikang Information Technology Co ltd
Original Assignee
Changzhou Weikang Information 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 Changzhou Weikang Information Technology Co ltd filed Critical Changzhou Weikang Information Technology Co ltd
Priority to CN201811249001.4A priority Critical patent/CN109508968B/en
Publication of CN109508968A publication Critical patent/CN109508968A/en
Application granted granted Critical
Publication of CN109508968B publication Critical patent/CN109508968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention discloses a block chain system and a control method thereof, belonging to the technical field of block chains. The blockchain system comprises a main chain and a sublink, and the method comprises: any sub-chain fragment verifies the validity of the distributed transaction, wherein the transaction comprises transaction content, a transaction account and a transaction signature; when the transaction is verified to be valid by any sub-chain fragment, recording the transaction and a verification result of the transaction in a fragment block of any sub-chain fragment to form block information; the any sub-chain fragment broadcasts the block information to the main chain; the main chain executes the transaction according to the block information; the problem of low TPS (thermoplastic polystyrene) capacity of a block chain system in the related technology is solved; the effect of improving the TPS peak value of the block chain system is achieved.

Description

Block chain system and control method thereof
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a blockchain system and a control method thereof.
Background
There are a large number of solutions for blockchain-based content distribution systems and value exchange systems in the market today, except for advanced ideas, i.e. the decentralized trust mechanism based on blockchain and free from decentralization, but today's blockchain is limited to tenant and laboratory applications, and the core problem is transaction speed, i.e. transaction Throughput (TPS). Any application, once applied on a large scale, must be a huge number of transactions. The TPS capability of the existing block chain technology cannot support landing of practical application.
As some practical application requirements: the apple and android markets (excluding mainland china) achieved 260 hundred million downloads in 2017 by Q3, with an average of 3300 downloads per second; each month, YouTube's users will always watch 60 hundred million hours long videos, 40 hundred million videos per day, and 46296 times per second on average. In practice, only the YouTube system charges for transmission traffic during playing, and each (short) video is calculated to be 5M on average in a charging unit of 256K (fragmentation scheme of IPFS), and the average charging is about 925920 times per million times per second. If every 4K (the SWARM/EDX fragmentation scheme) is taken as a charging unit, the charging is nearly 6400 ten thousand times per second, which is a number that all block chains can not reach at present.
Disclosure of Invention
In order to solve the problem of low TPS capability of a blockchain system in the prior art, embodiments of the present invention provide a blockchain system and a control method thereof. The technical scheme is as follows:
in a first aspect, a method for controlling a blockchain system is provided, the blockchain system including a main chain and a sub-chain, the sub-chain including a plurality of sub-chain fragments, the method including:
any sub-chain fragment verifies the validity of the distributed transaction, wherein the transaction comprises transaction content, a transaction account and a transaction signature;
when the transaction is verified to be valid by any sub-chain fragment, recording the transaction and a verification result of the transaction in a fragment block of any sub-chain fragment to form block information;
the any sub-chain fragment broadcasts the block information to the main chain;
the main chain executes the transaction according to the block information.
Optionally, the main chain executes the transaction according to the block information, including:
inquiring the information of the transaction account, and verifying whether the balance in the transaction account reaches a transfer value in the transaction;
and if the balance reaches the transfer value, modifying the information of the transaction account according to the difference value between the balance and the transfer value, and recording the modified information of the transaction account in a main chain block of the main chain.
Optionally, the main chain executes the transaction according to the block information, and further includes:
if the balance is below the transfer value, the backbone records that the transaction was declined in a declined transaction list in the backbone block.
Optionally, the method further includes:
the main chain records a block summary of the partitioned block.
Optionally, the main chain controls the limit number of the enabled sub-chain segments in the blockchain system according to the transaction amount in the blockchain system, and the enabled sub-chain segments have the capability of processing transactions.
Optionally, the blockchain system includes a plurality of nodes, and each node selects a child chain segment from the plurality of child chain segments to join according to the computation power of each child chain segment in the blockchain system.
Optionally, the main chain controls the sub-chain fragments in the blockchain system through a fragment index, a fragment flag and a fragment difficulty value, and the fragment difficulty value of each sub-chain fragment is used for indicating the calculation power of the sub-chain fragment.
Optionally, when the computing power of the disabled sub-chain fragment reaches an enabling threshold, the main chain controls the disabled sub-chain fragment to be enabled.
Optionally, the main chain controls enabling of the disabled sub-chain fragment by fragmenting the disabled sub-chain at a corresponding position in the fragment flag.
Optionally, the main chain and the child chain share the same P2P network.
In a second aspect, there is provided a blockchain system comprising a main chain and a sub-chain, the sub-chain comprising a plurality of sub-chain fragments, wherein:
any sub-chain fragment verifies the validity of the distributed transaction, wherein the transaction comprises transaction content, a transaction account and a transaction signature;
when the transaction is verified to be valid by any sub-chain fragment, recording the transaction and a verification result of the transaction in a fragment block of any sub-chain fragment to form block information;
the any sub-chain fragment broadcasts the chunk information to the main chain.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
verifying the validity of the distributed transaction by any sub-chain fragment, wherein the transaction comprises transaction content, a transaction account and a transaction signature; when any sub-chain fragment verifies that the transaction is valid, recording the transaction and a verification result of the transaction in a fragment block of any sub-chain fragment to form block information; broadcasting the block information to the main chain by any sub-chain fragment; the main chain executes the transaction according to the block information; the problem of low TPS (thermoplastic polystyrene) capacity of a block chain system in the related technology is solved; the effect of improving the TPS peak value of the block chain system is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for controlling a blockchain system according to an embodiment of the present invention;
FIG. 2 is a flow diagram of information in the main chain and the sub-chain provided in an embodiment of the present invention;
FIG. 3 is a flow diagram of a mechanism for network propagation of child chains in a blockchain system in accordance with one embodiment of the present invention;
FIG. 4 is a flow chart of the network propagation mechanism of the backbone in the blockchain system in one embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Currently, etherhouse (english name: Ethereum) is an open source public blockchain platform with intelligent contract function, and provides a decentralized Virtual Machine, namely an "ethereal Virtual Machine", to process point-to-point contracts through ethernet money etherer, wherein the dedicated cryptocurrency etherman is used for processing point-to-point contracts, and TPS is about 20. An Enterprise Operation System (EOS) is a block chain operating System, which introduces a new block chain architecture and aims to implement performance expansion of distributed applications. Even if this system is vulnerable to insufficient decentralization, its TPS has only a peak on the test of 4000 and is still insufficient to support the practical application of block chains. Before the block chain is actually used, the TPS capability of the block chain needs to be improved; most blockchain applications are only conceptual and cannot actually fall to the ground until the TPS capability of the blockchain reaches a certain level.
As exemplified by the existing payment system, the TPS of Visa is around 4000; the Payment Bao has a peak transaction speed of 18 million TPS when the Payment Bao is active at double 11, while the Payment Bao (Payment Bao application is a centralized transaction System) is used only for transfers. In the blockchain application, the transaction action will not only include the transfer, but also include the intelligent contract invocation, other action processes needing benefit exchange, and the like, and the actual execution content requires that the TPS requirement is higher.
The present inventors have recognized that in a blockchain system, where synchronization is performed by block dropping, the efficiency of TPS is limited by the block size (i.e., the maximum number of transactions that each block can accommodate) and the block dropping time (how many times a block is dropped), and block consistency verification is achieved by a consensus mechanism (e.g., Pow/Pos/PBF/DPos, etc.). That is, TPS ═ P ÷ V, where P is the number of transactions recorded per block and V is the average out-of-block time. To increase TPS, either P is increased or V is decreased.
And V is affected by several factors: network bandwidth, network latency, and speed of validation of transactions and smart contracts. Under the current bandwidth conditions, the value of V cannot be decreased infinitely. At present, the block-out time of about 10 seconds is a limit of realization in consideration of contract difficulty speed through statistics. Therefore, increasing the maximum number of transactions accommodated by each block by increasing P for providing TPS will result in an increase in the content to be verified within each block, and the CPU utilization of the verification node will increase.
In order to avoid overhigh CPU utilization rate of the verification node and ensure the promotion of TPS, the method adopts a fragmentation technology. Each fragment runs independently and processes different transactions in parallel to achieve high throughput, but the problem of 'double flowers' easily occurs when the fragments are adopted in the prior art. "double-flower," i.e., double payment, refers to a situation in a digital monetary system where the same digital asset is reused due to improper operations, due to the reproducibility of the data. "double flowers" is a problem to be solved by any kind of digital currency. If a certain digital currency can be reused by a person, the same money is spent twice or more times, which is of no value.
For example, Zilliqa is the first public blockchain platform that uses secure fragmentation technology to achieve high throughput extending to thousands of transactions per second, and uses the fragmentation concept as the underlying technology. Zilliqa establishes a management committee in the system, each transaction fragment processes transactions in parallel, the processed results are verified by the management committee, a final block is synthesized, and finally the final block is transmitted back to each fragment. It can be seen that each shard in the system verifies that the transaction is not in communication individually, which is prone to the problem of double-flower formation.
For example, when the same user submits two transactions with the same input but different outputs to the system simultaneously or sequentially (with a shorter time interval), the two transactions may be assigned to different segments for verification, and each segment verification will be ignored in the other segments, which creates a double-flower problem. To prevent the double flower problem, the fragments will have to communicate with each other during the authentication process. And in fact, such mutual communication may disrupt the overall system.
The core difficulty of all the fragmentation technologies proposed so far is that each fragment maintains different state information, and during the authentication process of the fragment, the transaction causes state changes, and the changes need to be synchronized among different fragments, and the complexity of the communication required by the synchronization causes the whole fragmentation system to be hardly usable. In order to remove the complexity caused by the inter-fragment communication, the etherhouse Shard scheme provides a strategy of distributing each transaction to different fragments according to the account of a sender, and in this way, because the status data of one account only exists on one fragment, the data verification only needs to be carried out in one fragment, and under the condition of not considering the intelligent contract, the cross-fragment communication is not needed. However, in the above-mentioned fragmentation situation, a malicious node may focus on attacking a certain fragment, and compared with attacking the whole network, the cost of attacking a certain fragment is in inverse relation to the number of total fragments.
Because a certain account is always on a certain fragment, a malicious node can completely attack a certain fragment, then an account which can run on the fragment is generated, and double-flower attack is carried out through the account. In this case, the TPS capability of the blockchain is proportional to the number of tiles, the security strength of the blockchain is always inversely proportional to the number of tiles, and thus the security strength of the blockchain is always inversely proportional to the TPS capability.
The inventor of the application provides a decentralized block chain system with high TPS peak value and a control method thereof for solving the problem of double flowers which is difficult to solve due to the difficult problem of communication between fragments in the prior art, so as to provide the TPS peak value on the premise of not reducing decentralized. Wherein the blockchain system comprises a main chain and a daughter chain, and the daughter chain comprises a plurality of daughter chain fragments. Referring to fig. 1, a flowchart of a control method of a blockchain system according to an embodiment of the present invention is shown. As shown in fig. 1, the method for controlling a blockchain system may include the following steps:
at step 110, any child chain segment verifies the validity of its assigned transaction, which includes transaction content, transaction account, and transaction signature.
In the present application, the allocation manner of the transaction received in the system in the plurality of sub-chain segments is not specifically limited, and may be implemented by using the allocation manner of the transaction allocation algorithm in the prior art, for example, the sub-chain segment to which the transaction is allocated is determined according to the last several bits of the transaction hash value, which is not described in detail in this embodiment.
In this application, the validity verification of the sub-chain segment on its assigned transaction is the verification of the transaction signature in the transaction. For example, if Alice initiates a transaction T1 to Bob and initiates another transaction T2 to Cathy, the transaction flow includes:
in the process 1, Alice signs the transactions T1 and T2 and broadcasts the transactions in a blockchain system; the process 2, the blockchain system allocates transaction T1 to the sub-chain shard in the blockchain system according to the hash value of transaction T1S 1, and the blockchain system allocates transaction T2 to the sub-chain shard in the blockchain system according to the hash value of transaction T2S 2; flow 3, sub-chain sharding S1 verifies whether the signature in transaction T1 is valid to determine whether transaction T1 was indeed initiated by Alice; 4. the child chain fragment S2 verifies that the signature in transaction T2 is valid to determine whether transaction T2 was indeed initiated by Alice.
Step 120, when the sub-chain segment verifies that the transaction is valid, recording the transaction and the verification result of the transaction in the segment block of the sub-chain segment to form block information.
In the application, the verification result of the sub-chain fragment on the transaction may include that the signature is valid and the signature is invalid.
In step 130, the any sub-chain fragment broadcasts the block information to the main chain.
The present application relates to a blockchain system that includes and includes only one main chain. Also, the main chain and the sub-chains in the blockchain system share the same point-to-point (P2P) network.
For example, the transaction flow of the user Alice initiating one transaction T1 to the user Bob and initiating another transaction T2 to the user Cathy further includes: flow 5, if the sub-chain segment S1 verifies that the signature of the result of the transaction T1 is valid, record the result signatures of the transaction T1 and the transaction T1 in its segment block to generate block information, and broadcast the block information to the main chain; if the sub-chain segment S2 verifies that the signature of the transaction T2 is valid, the sub-chain segment S2 records the transaction T2 and the signature of the transaction T2 in its segment block, and broadcasts the segment information to the main chain.
In step 140, the main chain executes the transaction according to the block information.
Optionally, before step 140, the main chain receives the block information and verifies whether the block information or the partitioned block storing the block information is valid; if so, step 140 is performed.
Referring to fig. 2, the specific implementation of this step may be: inquiring information of a transaction account in the transaction, and verifying whether balance in the information (namely, balance of the transaction account) reaches a transfer value in the transaction; if the balance reaches the transfer value in the transaction, calculating the difference between the balance and the transfer value in the transaction, modifying the information of the transaction account according to the difference (including taking the difference as the balance of the transaction account after the transaction is successful), and recording the modified information of the transaction account in a main chain block of the main chain, otherwise, recording that the transaction is rejected in a rejected transaction list of the main chain block.
Optionally, the transaction further includes a collection account, the main chain calculates the difference between the balance and the transfer value in the transaction as the balance of the transaction account after the transaction is successful, and simultaneously calculates the sum of the balance of the collection account and the transfer value to update the balance of the collection account, and records the balance of the collection account in the main chain block.
For example, the transaction flow of the user Alice initiating one transaction T1 to the user Bob and initiating another transaction T2 to the user Cathy further includes: step 7, if the balance of the Alice transaction account reaches the transfer value in the T1 transaction, calculating the difference value between the balance and the transfer value as the balance of the Alice transaction account after the transaction is successful, and recording the balance of the Alice transaction account after the transaction is successful in the main chain block; flow 8, if Alice's transaction account balance does not reach the transfer value in the T2 transaction, then the transaction is recorded in the declined transaction list in the main chain block as declined T2.
In summary, in the method provided in the embodiment of the present invention, the validity of the assigned transaction is verified through any sub-chain segment, where the transaction includes transaction content, a transaction account, and a transaction signature; when any sub-chain fragment verifies that the transaction is valid, recording the transaction and a verification result of the transaction in a fragment block of any sub-chain fragment to form block information; broadcasting the block information to the main chain by any sub-chain fragment; the main chain executes the transaction according to the block information; the problem of low TPS (thermoplastic polystyrene) capacity of a block chain system in the related technology is solved; the effect of improving the TPS peak value of the block chain system is achieved.
The above embodiments essentially divide the execution of the transaction into two parts: a verify transaction signature validity section and an update transaction results section. The verify transaction signature validity portion includes verifying a transaction signature and the update transaction results portion includes information updates of a transaction account. The verification of the transaction signature subchain is carried out, the subchain fragments do not modify the data of any transaction account, the signature effectiveness of the transaction can be verified on any subchain fragment, and the transaction capability linearly increases along with the increase of the number of the fragments; and the transaction result updating part is carried out on the main chain, so that the main chain only needs to verify whether the block of the sub-chain fragment is valid, when the sub-chain fragment verifies that the transaction result is that the signature is valid, the information of the transaction account is modified according to the transaction, and the balance of all the transaction accounts cannot support the completion of the transaction, so that the transaction is rejected. Therefore, the redundant computation amount of the sub-chain fragments or the main chain nodes of the main chain is greatly reduced, and the main chain nodes and the sub-chain fragments only carry out partial verification work, so that a large amount of network and computing resources can be saved.
In addition, the part for updating the transaction result is only completed by the main chain, thereby avoiding the problem of 'double flowers' and ensuring the real-time property and the effectiveness of the information of the transaction account.
In addition, in the application, the transactions generated by the same transaction account are dynamically distributed to different sub-chain fragments for processing, so that the income obtained by attacking a certain fragment is smaller than the cost of the attack, and the security of the transaction account, the transaction fragment (namely, the sub-chain fragment related to the application) and the security strength of a block system are ensured.
Optionally, the main chain records the information of the transaction account after the transaction is rejected or the transaction is successful in the main chain block, and records only the block summary of the segment block, so as to improve the security strength of the block chain and improve the TPS capability. In the prior art, the main chain records the transaction and needs to record all contents related to the transaction, including transaction contents, transaction results, information of a transaction account after the transaction is successful, and the like; in the application, only the block digests of the fragment blocks of the sub-chain fragments are recorded in the main chain block through the main chain, so that the number of transactions which can be actually recorded in one main chain block is increased by H times (Hash) -H, which is the number of the block digests of the sub-chain fragment blocks which can be recorded in one main chain block.
In addition, a theoretical value calculation is carried out on the TPS which can be achieved by the block chain system adopting the control method. In the blockchain system, the fragment block size of the sub-chain fragments is 1M, and the size of each transaction is 300 bytes; the available transaction data area except the block head in each sub-chain is 900K, so the number of transactions contained in each partition block is 3K, the average block-out time of the transactions is about 10 seconds to 15 seconds, calculated by taking the average block-out time of the transactions as 15 seconds, and the TPS of each sub-chain partition is 3K/15, which is 200.
The size of the main chain block is also 1M, the data of each summary in the main chain block is 64 bytes, after the block head is removed from the main chain block, the available transaction area of the main chain block is about 800K, the summary data that can be contained in each transaction is 12.5K, if the number of the fragments is not limited, when the average block-out time of the main chain is 10 seconds, the theoretical TPS value is 12.5K × 3K/10 — 3.75M. Currently, the number of slices is limited to 2048 slices, and theoretically, the maximum TPS value of a block chain system is 200 × 2048 — 409600.
If the control method is applied to the current network technology, the TPS value is limited by the bandwidth of the network and the computing and storing capacity of the main chain node; when each transaction is 300 bytes, the bandwidth of 40 ten thousand TPS will reach 300 × 400K to 120MBps, i.e. 1.2Gbps, and since the transaction information needs to be reported to the main chain once by sub-chain fragmentation, the bandwidth needs to be doubled, about 2.4 Gbps; this requirement to achieve this bandwidth across the network is very difficult at present, and considering that the bandwidth is currently substantially maintained at around 100M, the TPS in this case can also achieve around 2 million.
In this application, each sub-chain segment in the blockchain system includes at least one node to implement a verification function of a transaction. Performing full-network data broadcasting based on a P2P network in a blockchain system, wherein each node in the blockchain system needs to maintain an adjacent node table; when any node joins or leaves the P2P network, the surrounding neighbors need to update the neighbor table synchronously. So too frequent node changes will result in increased broadband load on the network and instability of the system. In the blockchain system provided by the application, nodes in the whole network can be allowed to freely select and join the shards with the lowest calculation power, a large number of nodes can be switched among different shards, in order to avoid instability of a P2P network caused by node leaving and joining, in the blockchain system, all nodes share one P2P network system, all data are transmitted and received in the whole network, and data filtering and distribution are performed in a session layer.
In a system with shards (e.g., a blockchain system as referred to herein), the attack resistance of the system is related to the transaction allocation algorithm and the number of shards. Ether works proposed a conceptual solution, and the system uses 100 shards, which are managed by a main chain Verifier Manager Contract (VMC). When a certain node needs to add the fragment, the corresponding function of the VMC is called first, a certain token is stored, and the corresponding fragment is added.
ZILLIQA (an open source block chain) provides another fragment management scheme, and each fragment is fixedly formed by 600 nodes; when a new node is added, a Proof of Work (PoW) mechanism is calculated for one time, and a network which can be added is determined according to a calculation result; as more nodes are present, more network fragments can be generated. The scheme aims to prevent a malicious node from implementing the attack by actively adding a certain fragment.
In practical application, from the viewpoint of attack resistance, a node should dynamically join a segment and stay in the segment for a limited time; from the network communication point of view, it is desirable that the nodes stay within a certain slice as much as possible to avoid data communication traffic generated by synchronizing the slice contents generated when switching slices.
In the block chain system provided by the application, fragmentation is dynamically adjusted according to the current transaction amount and the calculation power, so that the attack resistance is improved, and the data communication flow generated by synchronous fragmentation content generated during fragmentation switching is reduced, which is described in the following.
The sub-chain fragments in the blockchain system are controlled by a main chain, and the main chain realizes the control of the sub-chain fragments through three parameters (SE, Mask, Df), wherein: SE is an abbreviation for fragmentation index (ShardExp), Mask is a Mask flag indicating whether a child chain fragment has been allowed (i.e., enabled), and Df is an abbreviation for the child chain fragment's difficulty value (Shard difficities) used to identify the computation power of the child chain fragment.
SE, i.e. the sharded index (ShardExp). Allowing maximum enabled 2 in blockchain systemsSEAnd (4) slicing. Optionally, the main chain controls the limit number of the enabled sub-chain segments in the blockchain system according to the transaction amount in the blockchain system, and the enabled sub-chain segments have the capability of verifying the transaction. The concrete implementation is as follows: the main chain dynamically adjusts the fragmentation index according to the current system transaction amount so as to adjust the limit number of the enabled sub-chain fragments in the blockchain system. For example, when the main chain block transaction amount of 6 consecutive main chains reaches more than 50% of the maximum transaction amount supported by all sub-chain segments in the current block chain system, the value of SE is increased by 1, allowing one more time more sub-chain segments to be enabled.
However, the SE expansion in the blockchain system is not immediately enabled for the slice that is not enabled in the blockchain system. After the main chain expands SE, the calculation force of each sub-chain fragment which is not enabled in the block chain system needs to be monitored; when the computing power of the disabled sub-chain fragment reaches the enabling threshold, the main chain sets the corresponding position of the disabled sub-chain fragment in the fragment flag (namely, set 1) to control the disabled sub-chain fragment to be enabled. Wherein, Mask is a Mask flag indicating whether each sub-chain fragment is already present, i.e. shadow Enable Mask, which is an array with a total length of 2048 bits (256 bytes); when the child chain fragment is enabled, the reservation in the array is 1.
Optionally, the node in the blockchain system may freely select the sub-chain fragments that need to be added according to the computational power of each fragment; the node of the sub-chain fragment continuously checks the difficulty value of each sub-chain fragment in the network, automatically selects the fragment with the lowest difficulty to join, avoids calculation competition to the maximum extent, and promotes the calculation of each fragment in the whole network to be more average.
The initial strength of a sub-chain fragment newly created in the blockchain system is low. To prevent the performance of the blockchain system from being degraded due to low computation power, the blockchain system requires that each slice has the lowest computation power (i.e., the above-mentioned enabling threshold), which is specified by the blockchain system after initialization and continuously dynamically expands as the blockchain system expands.
Carrying out workload certification on the newly created sub-chain fragments according to the hash value of the main chain block of the main chain; broadcasting the workload proof to the backbone after completion of the workload proof; after the main chain receives the workload certification, when the computing force of the sub-chain fragments reaches an enabling threshold value according to the workload certification, the sub-chain fragments are positioned at corresponding position bits in Mask of the main chain so as to enable the sub-chain fragments; the sub-chain fragments in the block chain system can only verify the transaction and formally generate the blocks after the sub-chain fragments are at the position corresponding to the main chain Mask.
When the blockchain system is started, a sub-chain fragment with Shard Id (fragment Id) of 0 is started, the sub-chain fragment is also a sub-chain default fragment, and transactions which cannot be processed by other fragments in the system are processed by the sub-chain default fragment.
Referring to fig. 3, which shows a flowchart of the network propagation mechanism of the child chain in the blockchain system, the network propagation mechanism of the child chain may include the following steps:
each child chain segment obtains a new transaction from the network, step 310.
Each child sub-chain fragment checks whether the new transaction should be handled by itself, step 320.
In step 330, if the new transaction is processed by itself, the sub-chain segment verifies the transaction and records the verification result into its segment block.
At step 340, each node of each child shard attempts to find a sufficiently difficult proof of workload in its shard zone.
In step 350, if any node in any sub-chain fragment finds a workload proof in its own block with sufficient difficulty, the block information of the block is broadcasted in the block chain system.
In step 360, the other nodes in the sub-chain segment except the node that finds the workload proof with enough difficulty verify the workload proof of the block and whether the transaction in the block information is valid after receiving the block information.
Step 370, if the other nodes verify that the workload of the block proves to be valid and the transaction in the block information is valid, the hash of the block is used as the latest block, the transaction in the transaction pool is deleted, and the block is reconstructed.
Through steps 340 to 370, the transactions recorded in each node in the same sub-chain segment are unified into the block with the workload proof of sufficient difficulty, and the duplicates recorded in the other nodes are deleted from the transaction in the block.
Referring to fig. 4, a flow chart of a network propagation mechanism of a main chain in a blockchain system is shown, which may include the following steps:
in step 410, the main chain receives the chunk information of each sub-chain fragment from the network and buffers the chunk information into the transaction pool.
In step 420, the main chain cache creates a block chain corresponding to the sub-chain fragment, waits until the number of blocks in the chain is greater than or equal to 6, and verifies each transaction result in the front block.
The transaction result involved in step 420 includes the result of the sub-chain segment verifying whether the transaction signature of the transaction is valid, the transaction content, and the transaction account.
Step 430, if any transaction result passes the verification, the main chain modifies the information of the transaction account corresponding to the transaction result, otherwise, a transaction rejection record is generated.
Optionally, the main chain records the modified transaction account information or the transaction declination record in the main chain block.
In step 440, the main chain generates segment control information according to all transaction amounts in the main chain segment, and incorporates the segment control information into the segment header.
The fragmentation control information comprises a fragmentation index, a fragmentation mark and a fragmentation difficulty value.
At step 450, each backbone node in the backbone attempts to find a sufficiently difficult workload proof in its own block.
If any of the backbone nodes finds a sufficiently difficult workload proof, this block is broadcast to the entire network, step 460.
In step 470, after the other main chain nodes receive the block and verify the workload certification of the block and the validity of the transaction result in the block, the block is the latest block, and the corresponding partitioned block record in the transaction pool is deleted.
Through steps 450 to 470, the transactions recorded in each main chain node are unified into the block of the workload certification which finds a sufficient difficulty, and the repeated transactions recorded in the other main chain nodes are deleted from the block.
In step 480, all sub-chain fragments in the system determine the state of the fragment according to the fragment control information of the block.
Wherein the state of the slice comprises enabled and not enabled.
The transaction is verified on different sub-chain fragments in parallel through a sub-chain fragment and two-step verification method, but the information of a transaction account is updated only on a main chain, so that the complex operation of communication among the sub-chain fragments is eliminated, and the TPS capability can be linearly expanded according to the number of the fragments. The slicing and two-step verification method ensures that the system has enough robustness because of simple structure and clear logic.
Nodes in the blockchain system can freely enter or leave at any time; the nodes can freely select to enter a main chain or a sub-chain according to own computing capacity and storage capacity; and selecting the fragment which is most favorable for the fragment to enter according to the calculation force condition of the sub-chain fragments.
The system adopts a block chain technology to realize an unchangeable transaction account book, realizes a consensus mechanism in a decentralized environment through a Pow mechanism, and can ensure the effectiveness of the transaction account book record as long as honest nodes control over 50 percent of computing power.
The terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying a number of the indicated technical features. Thus, a defined feature of "first", "second", may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A method of controlling a blockchain system, the blockchain system comprising a main chain and a child chain, the child chain comprising a plurality of child chain fragments, the method comprising:
any sub-chain fragment verifies the validity of the distributed transaction, wherein the transaction comprises transaction content, a transaction account and a transaction signature;
when the transaction is verified to be valid by any sub-chain fragment, recording the transaction and a verification result of the transaction in a fragment block of any sub-chain fragment to form block information;
the any sub-chain fragment broadcasts the block information to the main chain;
the main chain executes the transaction according to the block information, and the main chain comprises the following steps: and verifying whether the block of the sub-chain fragment is valid, when the result of verifying the transaction by the sub-chain fragment is that the signature is valid, modifying the information of the transaction account according to the transaction, meanwhile, obtaining a block abstract from the block information, and recording the block abstract of the fragment block.
2. The method of claim 1, wherein the backbone performs the transaction according to the tile information, comprising:
inquiring the information of the transaction account, and verifying whether the balance in the information reaches a transfer value in the transaction;
and if the balance reaches the transfer value, modifying the information of the transaction account according to the difference value between the balance and the transfer value, and recording the modified information of the transaction account in a main chain block of the main chain.
3. The method of claim 2, wherein the backbone performs the transaction according to the tile information, further comprising:
if the balance is below the transfer value, the backbone records that the transaction was declined in a declined transaction list in the backbone block.
4. The method of claim 1, wherein the master chain controls a limit number of sub-chain slices enabled in the blockchain system according to a transaction amount in the blockchain system, the enabled sub-chain slices having a capability of processing transactions.
5. The method of claim 1, wherein the blockchain system comprises a plurality of nodes, and each node selects a child chain fragment to join from the plurality of nodes according to the computation power of each child chain fragment in the blockchain system.
6. The method of claim 4, wherein the main chain controls the sub-chain fragments in the blockchain system by fragment index, fragment flag, and fragment difficulty value, and wherein the fragment difficulty value of each sub-chain fragment is used to indicate its computational power.
7. The method of claim 4, wherein the master chain controls the non-enabled sub-chain fragmentation to be enabled when the computational power of the non-enabled sub-chain fragmentation reaches an enable threshold; and/or the presence of a gas in the gas,
the main chain controls the enabling of the disabled sub-chain fragment by dividing the disabled sub-chain fragment into corresponding position bits in the fragment mark.
8. The method of claim 1, wherein the main chain and the child chain share a same P2P network.
CN201811249001.4A 2018-10-25 2018-10-25 Block chain system and control method thereof Active CN109508968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811249001.4A CN109508968B (en) 2018-10-25 2018-10-25 Block chain system and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811249001.4A CN109508968B (en) 2018-10-25 2018-10-25 Block chain system and control method thereof

Publications (2)

Publication Number Publication Date
CN109508968A CN109508968A (en) 2019-03-22
CN109508968B true CN109508968B (en) 2020-12-18

Family

ID=65745960

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811249001.4A Active CN109508968B (en) 2018-10-25 2018-10-25 Block chain system and control method thereof

Country Status (1)

Country Link
CN (1) CN109508968B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3628093B1 (en) * 2019-04-30 2021-07-07 Advanced New Technologies Co., Ltd. Method and device for avoiding double-spending problem in read-write set-model-based blockchain technology
CN110610421B (en) * 2019-09-03 2022-03-25 北京航空航天大学 Guarantee fund management method and device under fragment framework
CN110570187A (en) * 2019-09-10 2019-12-13 苏州阿尔山数字科技有限公司 digital currency performance expanding method based on fragment area
CN110675257B (en) * 2019-09-12 2022-09-06 广州蚁比特区块链科技有限公司 Block group chain construction method and device
CN110933022A (en) * 2019-10-11 2020-03-27 深圳壹账通智能科技有限公司 Block processing method and device, computer equipment and storage medium
CN110855761B (en) * 2019-10-29 2021-09-21 深圳前海微众银行股份有限公司 Data processing method and device based on block chain system
CN111046437A (en) * 2019-10-31 2020-04-21 中国科学院计算技术研究所 Block chain parallel transaction processing method and system based on isomorphic multi-chain and terminal
CN111179086B (en) * 2019-12-31 2024-01-02 杭州趣链科技有限公司 Intelligent contract virtual machine based on WebAsssemly
CN113141542B (en) * 2020-01-20 2023-07-07 亦非云互联网技术(上海)有限公司 Video stream safe playing system, method, medium and server based on block chain
TWI804707B (en) * 2020-01-21 2023-06-11 新加坡商鴻運科股份有限公司 Method and device for preventing a double spend attack and a computer readable memory medium
CN112260836A (en) * 2020-09-28 2021-01-22 电子科技大学 Method for improving block chain throughput based on fragmentation technology
CN113259450A (en) * 2020-09-30 2021-08-13 苏州讯如电子科技有限公司 Transaction management system based on block chain fragmentation
CN112261158B (en) * 2020-12-21 2021-04-20 支付宝(杭州)信息技术有限公司 Method and system for returning cross-fragment transaction response, main chain node and source fragment node
CN112257118B (en) * 2020-12-21 2021-08-03 支付宝(杭州)信息技术有限公司 Method and system for locking cross-fragment transactions in a blockchain system containing fragments
CN113259466B (en) * 2021-06-02 2021-10-15 支付宝(杭州)信息技术有限公司 Block chain subnet operation state control method and block chain system
CN113239052B (en) * 2021-07-13 2021-09-28 广东卓启云链科技有限公司 Alliance chain grouping method, device, equipment and medium
CN114416866A (en) * 2021-12-17 2022-04-29 深圳先进技术研究院 Fragmentation method and device of distributed system, electronic equipment and storage medium
CN116488818A (en) * 2022-01-17 2023-07-25 腾讯科技(深圳)有限公司 Block chain-based data processing method, device, equipment and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231299A (en) * 2017-06-07 2017-10-03 众安信息技术服务有限公司 A kind of chain route and realized the system that block chain communicates across chain
CN108665272A (en) * 2018-05-02 2018-10-16 百度在线网络技术(北京)有限公司 Block chain data processing method, device, equipment and storage medium
CN108667632A (en) * 2018-04-19 2018-10-16 阿里巴巴集团控股有限公司 Based on the credit record sharing method and device of block chain, electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11095432B2 (en) * 2017-04-05 2021-08-17 Samsung Sds Co., Ltd. System for processing data based on blockchain and operating method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107231299A (en) * 2017-06-07 2017-10-03 众安信息技术服务有限公司 A kind of chain route and realized the system that block chain communicates across chain
CN108667632A (en) * 2018-04-19 2018-10-16 阿里巴巴集团控股有限公司 Based on the credit record sharing method and device of block chain, electronic equipment
CN108665272A (en) * 2018-05-02 2018-10-16 百度在线网络技术(北京)有限公司 Block chain data processing method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"侧链、子链、分片是啥? V神说的分片第四部是啥?";链接世界;《看点快报》;20180604;正文第1页 *
"侧链、子链、分片是啥?V神说的分片第四步是啥?";企鹅号 - 链接世界;《腾讯[云+社区]》;20180613;正文第2页 *

Also Published As

Publication number Publication date
CN109508968A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
CN109508968B (en) Block chain system and control method thereof
CN110868439B (en) Block chain system
CN109150972B (en) Working method of consensus mechanism of double-layer partitioned efficient block chain
CN107888562B (en) Data verification and transceiving method, node and system for parallel link access to interconnection chain
CN110474846B (en) Method and device for block propagation in block chain
JP2023071805A (en) Method of high-speed transmission in block chain network and special network node
CN111046437A (en) Block chain parallel transaction processing method and system based on isomorphic multi-chain and terminal
CN112235420B (en) Data synchronization method, system and related equipment based on block chain
CN111046109A (en) Cross-chain task processing method, device and equipment and readable storage medium
CN114218612B (en) Consensus method suitable for alliance chain high-frequency transaction scene
CN111371905A (en) Block chain layered consensus proving system structure and method based on cloud computing
CN113783699B (en) Data processing method, device and equipment based on block chain and readable storage medium
CN111159289A (en) Method and device for synchronizing blocks
CN113553375A (en) Partitioned storage device and method for schema block chain
CN114219650B (en) Block chain consensus method with low transaction delay
Xu et al. Occam: A secure and adaptive scaling scheme for permissionless blockchain
CN113452747B (en) Extensible and safe consensus method, system, storage medium and intelligent terminal
CN113157450B (en) Method and apparatus for executing blocks in a blockchain system
CN116258609B (en) Electric power system transaction cooperation method, device and storage medium
CN112866025B (en) Intelligent contract fragmentation processing method
WO2020019343A1 (en) Message transmission method and apparatus in blockchain system, and storage medium
CN111491020B (en) Data processing method, data processing device, computer equipment and storage medium
CN113269543A (en) Multilayer mixed transaction capacity expansion system and method for block chain
CN116707759B (en) Lightweight alliance chain consensus method for high concurrency scene of data flow
CN112783983A (en) Self-adaptive consensus method based on major-minor block diagram chain structure block chain account book design

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