CN109508968A - Block catenary system and its control method - Google Patents

Block catenary system and its control method Download PDF

Info

Publication number
CN109508968A
CN109508968A CN201811249001.4A CN201811249001A CN109508968A CN 109508968 A CN109508968 A CN 109508968A CN 201811249001 A CN201811249001 A CN 201811249001A CN 109508968 A CN109508968 A CN 109508968A
Authority
CN
China
Prior art keywords
fragment
transaction
subchain
block
main chain
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
Application number
CN201811249001.4A
Other languages
Chinese (zh)
Other versions
CN109508968B (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 Wicanders Mdt Infotech Ltd
Original Assignee
Changzhou Wicanders Mdt Infotech 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 Wicanders Mdt Infotech Ltd filed Critical Changzhou Wicanders Mdt Infotech 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

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

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a kind of block catenary system and its control methods, belong to block chain technical field.The block catenary system includes main chain and subchain, which comprises any subchain fragment verifies its validity for being assigned transaction, and the transaction includes transaction content, transaction account, trading signature;Any subchain fragment verify it is described transaction it is effective when, recorded in the fragment block of any subchain fragment it is described transaction and the transaction verification result formed block information;Any subchain fragment broadcasts the block information to the main chain;The main chain executes the transaction according to the block information;Solve the problems, such as that block catenary system TPS ability is low in the related technology;The TPS peak value for improving block catenary system is achieved the effect that.

Description

Block catenary system and its control method
Technical field
The present invention relates to block chain technical field, in particular to a kind of block catenary system and its control method.
Background technique
There is the scheme of the content distribution system and Valum transfer system largely based on block chain currently on the market, has removed Advanced theory -- except decentralization bring freedom, the non-stop layer faith mechanism based on block chain, but area of today Block chain is only limited to extremely visitor and laboratory applications, the reason is that its key problem is transactions velocity, that is, throughput problem of trading (Transactions Per Second, TPS).Once any application large-scale application, transactions velocity necessarily huge number Word.The TPS ability of existing block chain technology can not support the landing of practical application.
Such as some actual application demands: apple and Android market (not including China's Mainland) realized in Q3 in 2017 26000000000 downloadings, average downloading 3300 times per second;Every month, the user of YouTube always meet viewing 6,000,000,000 hours views of duration together Frequently, 4,000,000,000 videos can be seen daily, it is 46296 times per second average.Actually only YouTube system in playing process with transport stream Meter takes, and is a charge unit with every 256K (slicing scheme of IPFS), every (short) video average out to 5M is calculated, average Charging per second will be close to million times -- say it is 925920 times in confirmation ground.If being with every 4K (slicing scheme of SWARM/EDX) One charge unit, close to 64,000,000 times, this is the number that current all block chains are all unable to reach for charging per second.
Summary of the invention
In order to solve the problems, such as that block catenary system TPS ability is low in the prior art, the embodiment of the invention provides a kind of areas Block catenary system and its control method.The technical solution is as follows:
In a first aspect, provide a kind of control method of block catenary system, the block catenary system includes main chain and subchain, The subchain includes multiple subchain fragments, which comprises
Any subchain fragment verifies its validity for being assigned transaction, and the transaction includes transaction content, transaction account, friendship Easily signature;
Any subchain fragment verify it is described transaction it is effective when, remember in the fragment block of any subchain fragment The verification result for recording the transaction and the transaction forms block information;
Any subchain 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, comprising:
Inquire whether remaining sum in the information of the transaction account, and the verifying transaction account reaches in the transaction It transfers accounts numerical value;
If the remaining sum reaches the numerical value of transferring accounts, institute is modified according to the remaining sum and the difference of the numerical value of transferring accounts State the information of transaction account, and the information of the transaction account in the main chain block of the main chain after record modification.
Optionally, the main chain executes the transaction according to the block information, further includes:
If the remaining sum is lower than the numerical value of transferring accounts, refusal transaction List Table of the main chain in the main chain block In record it is described transaction be rejected.
Optionally, the method also includes:
The main chain records the block abstract of the fragment block.
Optionally, the main chain according to the trading volume in the block catenary system control in the block catenary system enable The limit quantity of subchain fragment, the enabled subchain fragment have the ability of processing transaction.
It optionally, include multiple nodes in the block catenary system, each node is according in the block catenary system The calculation power of each subchain fragment therefrom selects subchain fragment to be added.
Optionally, the main chain is by fragment index, fragment mark, fragment difficulty value to control in the block catenary system Subchain fragment, the fragment difficulty value of each subchain fragment be used to indicate its calculate power.
Optionally, when the calculation power for being not enabled on subchain fragment reaches enabled threshold value, son is not enabled on described in the main chain control Chain fragment is enabled.
Optionally, the main chain will be by that will be not enabled on subchain fragment corresponding position position in the fragment mark, with control It is enabled that subchain fragment is not enabled on described in system.
Optionally, the main chain and the subchain share same P2P network.
Second aspect, provides a kind of block catenary system, and the block catenary system includes main chain and subchain, the subchain packet Include multiple subchain fragments, in which:
Any subchain fragment verifies its validity for being assigned transaction, and the transaction includes transaction content, transaction account, friendship Easily signature;
Any subchain fragment verify it is described transaction it is effective when, remember in the fragment block of any subchain fragment The verification result for recording the transaction and the transaction forms block information;
Any subchain fragment broadcasts the block information to the main chain.
Technical solution provided in an embodiment of the present invention has the benefit that
By any subchain fragment verify its be assigned transaction validity, the transaction include transaction content, transaction account, Trading signature;Any subchain fragment verify the transaction it is effective when, in the fragment block of any subchain fragment record should The verification result of transaction and the transaction forms block information;Any subchain fragment chain linked to owner broadcasts the block information;Main chain The transaction is executed according to the block information;Solve the problems, such as that block catenary system TPS ability is low in the related technology;Raising is reached The effect of the TPS peak value of block catenary system.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of method flow diagram of the control method of the block catenary system provided in one embodiment of the invention;
Fig. 2 is the main chain provided in one embodiment of the invention, information flow direction figure in subchain;
Fig. 3 is the flow chart of the Internet communication mechanism of subchain in block catenary system in one embodiment of the invention;
Fig. 4 is the flow chart of the Internet communication mechanism of main chain in block catenary system in one embodiment of the invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Ether mill (English name: Ethereum) is that the public block chain for having intelligent contract function of an open source is flat at present Platform, by its dedicated encrypted currency ether coin Ether provide decentralization virtual machine-" ether virtual machine (English name: Ethereum Virtual Machine) " handle point-to-point contract, TPS is 20 or so.Commercial Distributed Application design (Enterprise Operation System, EOS) is a block chain operating system, introduces a kind of new block chain frame Structure, it is intended to realize the behavior extension of Distributed Application.Even this system is so denounced because of inadequate decentralization by people, The experiment peak value of its TPS is only capable of reaching 4000, is still not enough to support the practical application of block chain.Block chain is being subjected to reality Before use, the TPS ability of block chain need to be first improved;Before the TPS ability of block chain reaches a certain level, most area Block chain can not actually be landed using that all can only be concept.
Come with existing payment system for example, the TPS of Visa is 4000 or so;Alipay it is double 11 activity when, Peak value transactions velocity is 180,000 TPS, and Alipay (Alipay application is centralization transaction system) is used only for transferring accounts.In block In chain application, transaction movement will be not only include account transfer, will also include that intelligent contract calls, other needs to carry out interests friendship The action process etc. changed, the content actually executed, needing TPS to require can be higher.
Present inventor recognizes to synchronize in block catenary system by going out block, and it is big that the efficiency of TPS is limited to block Small (that is, maximum number of deals that each block can accommodate) and out block time (per how often a block is gone out), pass through The consistency of common recognition mechanism (for example, Pow/Pos/PBF/DPos etc.) Lai Shixian block confirms.That is, TPS=P ÷ V, Wherein P is the number of deals of each block record, and V is to average out the block time.It improves TPS or increases P or reduce V.
And V is influenced by following factor: the verifying speed of network bandwidth, network delay and transaction and intelligent contract Degree.Under current bandwidth condition, the numerical value of V can not be reduced infinitely.At present by statistics, it is contemplated that contract difficulty speed, 10 seconds The block time that goes out of left and right is the limit realized.Therefore it provides TPS need to increase the maximum that each block is accommodated by increasing P Number of deals will lead to the content for needing to verify in each block and increase, and the CPU usage for verifying node will rise.
To avoid the CPU usage of verifying node excessively high, and guarantee the promotion of TPS, the application uses allocation methods.Often A fragment independent operating, parallel processing different transaction reaches high-throughput, however uses in current technology and hold when fragment Easily there is the problem of " honeysuckle "." honeysuckle ", i.e., dual payment, refers in digital coin systems, reproducible due to data Property, so that the case where system is reused there may be same stroke numeral assets because of improper operation." honeysuckle " is any Digital cash will solve the problems, such as.If certain digital cash can be reused by people, same a sum of money used up twice or Repeatedly, it is not worth.
For example, Zilliqa is that the safe allocation methods of first use make handling capacity per second thousands of up to expanding to The publicly-owned block platform chain of the high-throughput of transaction, which employs the concepts of fragment, and the skill based on allocation methods Art.Zilliqa establishes an administration committee, each transaction fragment parallel processing transaction in systems, and the result of processing is passed through Administration committee's verifying, synthesizes a final block, and finally return to each fragment.As it can be seen that each dividing in the system Piece individually verifies transaction without communication, this is easy to appear to form honeysuckle problem.
For example, when the same user simultaneously or successively (time interval is shorter) to system submit two input it is identical but It is the transaction of different outputs, this two transaction may be assigned to being verified on different fragments, and each divide verifying will Ignore in other fragments, this forms honeysuckle problem.Honeysuckle problem is prevented, in verification process, fragment will have to carry out It is in communication with each other.And in fact, this mutual communication may destroy whole system.
The core problem of all allocation methods proposed at present is that each fragment maintains different status informations, And fragment is traded and is caused state change in verification process, and these variations need to synchronize in different fragments, And this synchronizes required communication bring complexity that will lead to entire separating system almost unavailable.Lead between fragment to remove The bring complexity of letter, ether mill Shard scheme, which is proposed, is assigned to difference according to the account of sender for each transaction Fragment on strategy, under this mode, since the status data of an account exists only on a fragment, it is only necessary to one Data verification is carried out in a fragment, therefore in the case of not considering intelligent contract, does not need to carry out the communication across fragment.But Above-mentioned under fragment situation, malicious node can be absorbed in a certain fragment of attack, compared with attacking the whole network, attack a certain The cost of fragment and the quantity of total fragment are inversely.
Since some account is always on a certain fragment, malicious node can attack some fragment completely, then give birth to The account that may operate on the fragment at one carries out honeysuckle attack by this account.In this case, block chain TPS ability is proportional to fragment quantity, and the security intensity of block chain is always inversely proportional to fragment quantity, therefore the security intensity of block chain Always it is inversely proportional with TPS ability.
Present inventor is for of the existing technology because communication problem causes insoluble honeysuckle to be asked between fragment Topic provides a kind of decentralization and the higher block catenary system of TPS peak value and its control method, not reduce center The peak value of TPS is provided under the premise of change.Wherein, block catenary system includes main chain and subchain, and subchain includes multiple subchain fragments.Please Referring to Fig. 1, it illustrates the embodiment of the invention provides a kind of flow charts of the control method of block catenary system.As shown in Figure 1, A kind of control method of block catenary system may include the following steps:
Step 110, any subchain fragment verifies its validity for being assigned transaction, which includes transaction content, transaction Account, trading signature.
The method of salary distribution of the transaction received in system in multiple subchain fragments is not specifically limited in the application, it can It is realized using the method for salary distribution that transaction allocation algorithm uses in multiple fragments in the prior art, such as according to transaction cryptographic Hash Last several determine the transaction allocation that, to which subchain fragment, the present embodiment repeats no more this.
In the application, the validation verification that subchain fragment is assigned transaction to it is testing to the trading signature in transaction Card.For example, user Alice initiates a transaction T1 to user Bob, initiates another transaction T2 to user Cathy, then hands over Easy process includes:
Process 1, Alice are broadcasted in block catenary system after transaction T1, T2 signature;Process 2, block catenary system root Transaction T1 is distributed into the subchain fragment S1 in block catenary system according to the cryptographic Hash of transaction T1, block catenary system is according to transaction T2's Transaction T2 is distributed to the subchain fragment S2 in block catenary system by cryptographic Hash;Label in process 3, subchain fragment S1 verifying transaction T1 Whether name is effective, to determine whether transaction T1 is initiated by Alice really;4, whether the signature in subchain fragment S2 verifying transaction T2 Effectively, to determine whether transaction T2 is initiated by Alice really.
Step 120, any subchain fragment verify the transaction it is effective when, in the fragment block of any subchain fragment The verification result for recording the transaction and the transaction forms block information.
Wherein, subchain fragment may include that signature is effective, signature is invalid to the verification result of transaction in the application.
Step 130, which broadcasts the block information.
It in block catenary system involved in the application, including and only include a main chain.Also, it is main in the block catenary system Chain and subchain share same point-to-point (person-to-person, P2P) network.
For example, user Alice initiates another transaction T2 to one transaction T1 of user Bob initiation, to user Cathy Transaction flow further include: process 5, if subchain fragment S1 verifying transaction T1 result be signature effectively, in its fragment area The result of record transaction T1 and the T1 that trades are signed effectively to generate block information in block, and the block information chain linked to owner is wide It broadcasts;Process 6, if the result of subchain fragment S2 verifying transaction T2 is that signature is effective, the record transaction T2 in its fragment block And the result signature of transaction T2 efficiently generates block information, and the block information chain linked to owner is broadcasted.
Step 140, main chain executes the transaction according to the block information.
Optionally, before step 140, main chain receives the block information, and verifies the block information or store the area Whether the fragment block of block message is effective;If it is valid, executing step 140.
Refer to Fig. 2, the specific implementation of this step can be with are as follows: inquires the information of transaction account in the transaction, and verifying Whether remaining sum (that is, remaining sum of trading account) reaches the numerical value of transferring accounts in the transaction in the information;If the remaining sum reaches this It transfers accounts in transaction numerical value, then calculates the difference for numerical value of transferring accounts in the remaining sum and the transaction, transaction account is modified according to the difference Information (including using the difference as the remaining sum of transaction account after transaction success), and the record modification in the main chain block of main chain The information of transaction account afterwards, otherwise, main chain record the transaction in the refusal transaction List Table in main chain block and are rejected.
It optionally, further include collecting account in the transaction, main chain is transferred accounts the difference of numerical value in calculating the remaining sum and the transaction It is worth as while the remaining sum of transaction account, the also remaining sum of calculating collecting account and the sum for numerical value of transferring accounts is with more after transaction success The remaining sum of new collecting account, and the remaining sum of the collecting account is also recorded in main chain block.
For example, user Alice initiates another transaction T2 to one transaction T1 of user Bob initiation, to user Cathy Transaction flow further include: process 7, if the remaining sum of the transaction account of Alice reach T1 transaction in numerical value of transferring accounts, calculate Remaining sum of the difference of the remaining sum and the numerical value of transferring accounts as the transaction account of Alice after trading successfully, and after trading successfully The remaining sum of the transaction account of Alice is recorded in main chain block;Process 8, if the remaining sum of the transaction account of Alice is not up to T2 Numerical value of transferring accounts in transaction then records transaction T2 in the refusal transaction List Table in main chain block and is rejected.
In conclusion method provided in an embodiment of the present invention, verifies it by any subchain fragment and is assigned having for transaction Effect property, which includes transaction content, transaction account, trading signature;Any subchain fragment verify the transaction it is effective when, The verification result that the transaction and the transaction are recorded in the fragment block of any subchain fragment forms block information;Any son Chain fragment chain linked to owner broadcasts the block information;Main chain executes the transaction according to the block information;Solves block in the related technology The low problem of catenary system TPS ability;The TPS peak value for improving block catenary system is achieved the effect that.
The execution of transaction is mainly divided into two parts by above embodiments: verifying trading signature validity part and update are handed over Easy result part.Verifying trading signature validity part includes verifying trading signature, and updating transaction results part includes transaction account The information update at family.It is carried out in verifying trading signature subchain, subchain fragment does not modify the data of any transaction account, the label of transaction Name validity can be verified on any subchain fragment, and trading capacity increases and linear increase with the quantity of fragment;And Update transaction results part carried out on main chain, therefore trade main chain need to only verify subchain fragment block it is whether effective, in son The result of chain fragment verifying transaction is when signature is effective according to the information of transaction modification transaction account, the remaining sum of All Activity account It can not support the completion of the transaction, then refuse the transaction.It can be seen that the node of either subchain fragment or the main chain of main chain The redundant computation amount of node, progress greatly reduces, and each fragment of main chain node and subchain only carries out the verifying work of a part, A large amount of network and computing resource can so be saved.
In addition, the problem of part for updating transaction results only has main chain completion, avoids appearance " honeysuckle ", ensure that transaction The real-time and validity of the information of account.
In addition, the transaction that same transaction account generates is directed in the application, by dynamically distributing to different subchain point On piece is handled, and is allowed the income that can obtain of a certain fragment of attack to be less than the cost attacked, be ensure that the peace of transaction account Entirely, the security intensity of transaction fragment (that is, subchain fragment involved in the application) and tile system.
Optionally, main chain recorded in main chain block the transaction be rejected or record trade successfully after transaction account information While, the block abstract of the fragment block is only recorded, to improve the security intensity of block chain, while can also improve TPS ability. Since the transaction of main chain record needs to record full content relevant to the transaction, including transaction content, transaction knot in the prior art Fruit, trade successfully after transaction account information etc.;And subchain fragment is only recorded in main chain block by main chain in this application Fragment block block abstract, so that the practical number of transaction being able to record of a main chain block is increased H times (Hash) -- H is The quantity of the block abstract for the subchain fragment that one main chain block is able to record.
It is calculated in addition, doing a theoretical value to the TPS that the block catenary system using above-mentioned control method can reach.? In block catenary system, the fragment block size of subchain fragment is 1M, and the size of each transaction is 300 bytes;It is removed in each subchain Going to the available transaction data zone of block head is 900K, therefore the number of deals that each fragment block accommodates is 3K, and transaction is averaged The block time is to calculate for 15 seconds with the block time that averages out of transaction about between 10 seconds to 15 seconds out, each subchain fragment TPS is 3K/15=200.
The size of main chain block is similarly 1M, and the data of each abstract are 64 bytes in main chain block, removes in main chain block After removing block head, the available transaction region of main chain block is about 800K, and the summary data that each transaction can accommodate is 12.5K, If not limiting fragment quantity, when a length of 10 seconds when averaging out block of main chain, theory T PS value was 12.5K*3K/10= 3.75M.Fragment quantity is limited in 2048 fragments at present, theoretically block catenary system maximum TPS value is 200*2048= 409600。
If it is considered that above-mentioned control method is in current application of net, TPS value is by the bandwidth of network, main chain node Calculate the limitation of storage capacity;When each transaction is 300 byte, the bandwidth of 400,000 TPS is up to 300*400K=120MBps That is 1.2Gbps, and since Transaction Information is primary to main chain due to needing to be reported again by subchain fragment, bandwidth needs double, About 2.4Gbps;This want whole network to reach the requirement of this bandwidth at present can be extremely difficult, it is contemplated that current bandwidth is basic 100M or so is maintained, TPS in this case can also reach 20,000 or so.
In the application, each subchain fragment in block catenary system includes at least one node, to realize the verifying of transaction Function.Whole network data broadcast is carried out based on P2P network in block catenary system, each node in block catenary system needs to safeguard one A neighbortable;When any one node is added or leaves P2P network, the neighbors of surrounding needs synchronized update neighbortable. Therefore excessively frequent node variation increases the broadband load that will lead to network unstable with system.Provided herein Allow the node unrestricted choice in the whole network in block catenary system and be added to calculate the minimum fragment of power, has a large amount of node in difference Fragment between switch over, lead to the unstable of P2P network in order to avoid node leaves and is added, in block catenary system, own One P2P network system of nodes sharing, all data the whole network receive and dispatch, session layer carry out again data filtering and point Hair.
In the system with fragment (such as block catenary system involved in the application), the anti-attack ability of system and friendship Easy allocation algorithm is related with fragment quantity.Ether mill proposes a conceptual scheme, and system uses 100 fragments, fragment Pass through checker management agreement (validator manager contract, VMC) Lai Guanli of main chain.When some node needs When fragment is added, the corresponding function of VMC is first called, certain token is stored in and corresponding fragment is added.
ZILLIQA (the block chain of an open source) proposes another management by district scheme, and each fragment is fixed to be had 600 nodes are constituted;When new node is added, first carrying out one action amount proves that mechanism (Proof of Work, PoW) is calculated, root Which network can be added to according to calculated result decision;When node is more, the network fragment that can be generated is more.Program mesh Be to avoid malicious node by being actively added some fragment to implement to attack.
In practical applications, for attack tolerant angle, node should be dynamically joined to fragment, and stop in fragment Stay the limited time;And for the angle of network communication, it is desirable to which node as far as possible more to be rested in some fragment, to avoid cutting The data communication flow that the synchronization fragment content generated when changing fragment generates.
According to current trading volume and calculation power dynamic adjustment fragment in block catenary system provided by the present application, to improve attack resistance Property, and the data communication flow that the synchronization fragment content generated when switching fragment generates is reduced, it is described accordingly below.
Subchain fragment is controlled by main chain in the block catenary system, and main chain passes through three parameter (SE, Mask, Df) Lai Shixian The control of subchain fragment, in which: SE is the abbreviation of fragment index (ShardExp), and Mask refers to whether subchain fragment has allowed for (that is, enabled) covers mark, and Df is the abbreviation of the difficulty value (Shard Difficulties) of subchain fragment, for identifying this The calculation power of subchain fragment.
SE is fragment index (ShardExp).Allow at most to enable in block catenary system 2SEA fragment.Optionally, Limit quantity of the main chain according to the subchain fragment enabled in the trading volume control block catenary system in block catenary system, enabled son Chain fragment has the ability of verifying transaction.Specific implementation are as follows: main chain dynamically adjusts fragment index according to current system trading volume, To adjust the limit quantity of the subchain fragment enabled in block catenary system.For example, the continuous 6 main chain blocks when main chain are traded When amount reaches 50% or more of the maximum trading volume that all subchain fragments are supported in current block catenary system, the numerical value of SE adds 1, permits Perhaps more one times of subchain fragments can enable.
However, the SE in block catenary system expands, it is not that the fragment being not enabled in the block catenary system just makes at once Energy.Main chain need to monitor the calculation power for the subchain fragment being respectively not enabled in the block catenary system after expanding SE;Divide when being not enabled on subchain When the calculation power of piece reaches enabled threshold value, main chain will be not enabled on subchain fragment in fragment mark corresponding position position (that is, setting 1), to control this, to be not enabled on subchain fragment enabled.Wherein, Mask be each subchain fragment whether cover mark, i.e. Shard Enable Mask, this is an array, and total length is 2048 (256 byte);When the subchain fragment is enabled, in the array Be predefined as 1.
Optionally, the node in the block catenary system can need the subchain being added according to the calculation power of each fragment, unrestricted choice Fragment;The node of subchain fragment will constantly check the difficulty value of each subchain fragment in network, automatically select minimum difficulty Fragment be added, with utmostly avoid calculate power competition, and on the whole come, also promote the calculation Li Gengping of each fragment in the whole network ?.
Newly created subchain fragment in the block catenary system, initially calculating power can be relatively low.It is too low to calculate power for it in order to prevent Lead to the attack resistance reduced performance of block catenary system, block catenary system requires each fragment to have minimum calculation power (on that is, State enabled threshold value), this minimum calculation power is specified after initialization by block catenary system, and in the extension with block catenary system And continuous dynamic expansion.
Newly created subchain fragment carries out the proof of work of difficulty according to the cryptographic Hash of the main chain block of main chain;It completes After the completion of proof of work, chain linked to owner broadcasts the proof of work;After main chain receives proof of work, demonstrate,proved according to the workload Clearly determine the calculation power of the subchain fragment when reaching enabled threshold value, just by the subchain fragment in the Mask of main chain corresponding position Position, so that the subchain fragment is enabled;Subchain fragment in the block catenary system only has it behind the corresponding position position main chain Mask, Transaction can be verified and formally go out block.
When block catenary system is initial, the subchain fragment that a Shard Id (fragment Id) is 0, this subchain fragment are started Fragment is defaulted for subchain simultaneously, and the transaction that can not be handled by other fragments in system can all be defaulted fragment processing by subchain.
Referring to FIG. 3, it illustrates the flow chart of the Internet communication mechanism of subchain in block catenary system, then the network of subchain Mechanism of transmission may comprise steps of:
Step 310, each subchain fragment obtains new transaction from network.
Step 320, whether the new transaction of each subchain subdivision planning should be handled by oneself.
Step 330, if new transaction is handled by oneself, which verifies the transaction and remembers verification result Record is into the fragment block of oneself.
Step 340, enough difficulty is looked in each node trial of each subchain fragment in the fragment block of oneself Proof of work.
Step 350, if any node in any subchain fragment finds enough difficulty in the block of oneself Proof of work then broadcasts the block information of the block in block catenary system.
Step 360, its in the subchain fragment in addition to the node of the above-mentioned proof of work for finding enough difficulty Whether his node, verifying to trade in the proof of work and the block information of the block after receiving the block information has Effect.
Step 370, if transaction is equal in the proof of work of above-mentioned other node verifications block and the block information Effectively, then using the Hash of this block as newest block, the transaction in trading pit is deleted, block is reconfigured.
It is realized by step 340 to step 370, the transaction recorded in each node in same subchain fragment is unified to above-mentioned In the block for finding the proof of work of enough difficulty, the repetition recorded in other above-mentioned nodes is traded from block is deleted It removes.
Fig. 4 is referred to, it illustrates the flow chart of the Internet communication mechanism of main chain in block catenary system, which be can wrap Include following steps:
Step 410, main chain receives the block information of each subchain fragment from network, is cached in trading pit.
Step 420, main chain caching creates the corresponding block chain of the subchain fragment, waits until the number of block on chain is greater than Or it is equal to 6, verify each of block of foremost transaction results.
Transaction results involved in step 420 include whether the trading signature of subchain fragment verifying transaction is effectively tied Fruit, transaction content, transaction account.
Step 430, if any transaction results are by verifying, main chain modifies the letter that the transaction results correspond to transaction account Breath, otherwise, generates a refusal transaction record.
Optionally, the information of modified transaction account or refusal transaction record are recorded in main chain block by main chain.
Step 440, main chain generates fragment according to all transaction total amounts in main chain block and controls information, brings block into Head.
Wherein, fragment control information includes fragment index, fragment mark, fragment difficulty value.
Step 450, each main chain node trial looks for the workload of enough difficulty to demonstrate,prove in the block of oneself in main chain It is bright.
Step 460, if any main chain node has found the proof of work of enough difficulty, this is broadcasted to the whole network A block.
Step 470, other main chain nodes receive this block, verify in the proof of work and the block of the block It is newest block by this block after transaction results validity, deletes corresponding fragment block record in trading pit.
It is realized by step 450 to step 470, the transaction recorded in each main chain node is unified to find a foot to above-mentioned In the block of the proof of work of enough difficulty, the repeat business recorded in other above-mentioned main chain nodes is deleted from block.
Step 480, all subchain fragments in system control information according to the fragment of this block, determine the shape of fragment State.
Wherein, the state of fragment includes enabled and is not enabled on.
Make the parallel proof on different subchain fragments of trading by subchain fragment and two step demonstrations, but only on main chain Carry out transaction account information update, eliminate the complex operations communicated between subchain fragment, at the same allow TPS ability according to The quantity linear expansion of fragment.This fragment and two step demonstrations have system strong enough because of its simple for structure, clear logic Strong property.
Node in block catenary system can be freely accessible to or leave at any time;Node can also be according to itself calculating energy Power, storage capacity unrestricted choice enter main chain or subchain;It can also be selected to itself most according to the calculation power situation of subchain fragment Advantageous fragment enters.
This system uses block chain technology, realizes not modifiable transaction account book, is realized by Pow mechanism in decentralization In the environment of common recognition mechanism, as long as 50% or more calculation power of honest node control, it is ensured that transaction account book record has Effect property.
Term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance or hidden Quantity containing indicated technical characteristic.The feature of " first ", " second " that limit as a result, can express or implicitly include one A or more this feature.In the description of the present invention, unless otherwise indicated, the meaning of " plurality " is two or two with On.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of control method of block catenary system, which is characterized in that the block catenary system includes main chain and subchain, the son Chain includes multiple subchain fragments, which comprises
Any subchain fragment verifies its validity for being assigned transaction, and the transaction includes transaction content, transaction account, transaction label Name;
Any subchain fragment verify it is described transaction it is effective when, record institute in the fragment block of any subchain fragment The verification result for stating transaction and the transaction forms block information;
Any subchain fragment broadcasts the block information to the main chain;
The main chain executes the transaction according to the block information.
2. the method according to claim 1, wherein the main chain executes the friendship according to the block information Easily, comprising:
Inquire whether remaining sum in the information of the transaction account, and the verifying information reaches the number of transferring accounts in the transaction Value;
If the remaining sum reaches the numerical value of transferring accounts, the friendship is modified according to the remaining sum and the difference of the numerical value of transferring accounts The information of easy account, and the information of the transaction account in the main chain block of the main chain after record modification.
3. according to the method described in claim 2, it is characterized in that, the main chain executes the friendship according to the block information Easily, further includes:
If the remaining sum is remembered in the refusal transaction List Table in the main chain block lower than the numerical value of transferring accounts, the main chain The transaction is recorded to be rejected.
4. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
The main chain records the block abstract of the fragment block.
5. the method according to claim 1, wherein the main chain is according to the trading volume in the block catenary system The limit quantity of the subchain fragment enabled in the block catenary system is controlled, the enabled subchain fragment has processing transaction Ability.
6. the method according to claim 1, wherein including multiple nodes, Mei Gesuo in the block catenary system It states node and therefrom selects subchain fragment to be added according to the calculation power of subchain fragment each in the block catenary system.
7. according to the method described in claim 5, it is characterized in that, the main chain is difficult by fragment index, fragment mark, fragment To control the subchain fragment in the block catenary system, the fragment difficulty value of each subchain fragment is used to indicate it and calculates power angle value.
8. according to the method described in claim 5, it is characterized in that, when the calculation power for being not enabled on subchain fragment reaches enabled threshold value When, it is enabled that subchain fragment is not enabled on described in main chain control;And/or
The main chain will be by that will be not enabled on subchain fragment corresponding position position in fragment mark, to be not enabled on subchain described in control Fragment is enabled.
9. the method according to claim 1, wherein the main chain and the subchain share same P2P network.
10. a kind of block catenary system, which is characterized in that the block catenary system includes main chain and subchain, and the subchain includes more A subchain fragment, in which:
Any subchain fragment verifies its validity for being assigned transaction, and the transaction includes transaction content, transaction account, transaction label Name;
Any subchain fragment verify it is described transaction it is effective when, record institute in the fragment block of any subchain fragment The verification result for stating transaction and the transaction forms block information;
Any subchain fragment broadcasts the block information to the main chain.
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 true CN109508968A (en) 2019-03-22
CN109508968B 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)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110570187A (en) * 2019-09-10 2019-12-13 苏州阿尔山数字科技有限公司 digital currency performance expanding method based on fragment area
CN110610421A (en) * 2019-09-03 2019-12-24 北京航空航天大学 Guarantee fund management method and device under fragment framework
CN110675257A (en) * 2019-09-12 2020-01-10 广州蚁比特区块链科技有限公司 Method and device for constructing block group chain
CN110855761A (en) * 2019-10-29 2020-02-28 深圳前海微众银行股份有限公司 Data processing method and device based on block chain system
CN110998633A (en) * 2019-04-30 2020-04-10 阿里巴巴集团控股有限公司 Method and apparatus for avoiding double-flower problem in block chain technology based on read-write set model
CN111046437A (en) * 2019-10-31 2020-04-21 中国科学院计算技术研究所 Block chain parallel transaction processing method and system based on isomorphic multi-chain and terminal
CN111179086A (en) * 2019-12-31 2020-05-19 杭州趣链科技有限公司 Intelligent contract virtual machine based on WebAssembly
CN111445329A (en) * 2020-03-20 2020-07-24 广州金丘链云科技有限公司 Block chain transaction processing method and system
CN112235382A (en) * 2020-09-30 2021-01-15 苏州讯如电子科技有限公司 Transaction management system and method based on block chain fragmentation
CN112260836A (en) * 2020-09-28 2021-01-22 电子科技大学 Method for improving block chain throughput based on fragmentation technology
CN112261158A (en) * 2020-12-21 2021-01-22 支付宝(杭州)信息技术有限公司 Method and system for returning cross-fragment transaction response, main chain node and source fragment node
CN112257118A (en) * 2020-12-21 2021-01-22 支付宝(杭州)信息技术有限公司 Method and system for locking cross-fragment transactions in a blockchain system containing fragments
WO2021068477A1 (en) * 2019-10-11 2021-04-15 深圳壹账通智能科技有限公司 Block processing method, apparatus, computer device and storage medium
CN113141542A (en) * 2020-01-20 2021-07-20 亦非云互联网技术(上海)有限公司 Video stream safe playing system, method, medium and server based on block chain
CN113239052A (en) * 2021-07-13 2021-08-10 广东卓启云链科技有限公司 Alliance chain grouping method, device, equipment and medium
CN113259466A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Block chain subnet operation state control method and block chain system
TWI804707B (en) * 2020-01-21 2023-06-11 新加坡商鴻運科股份有限公司 Method and device for preventing a double spend attack and a computer readable memory medium
WO2023109627A1 (en) * 2021-12-17 2023-06-22 深圳先进技术研究院 Distributed system sharding method and apparatus, electronic device, and storage medium
WO2023134291A1 (en) * 2022-01-17 2023-07-20 腾讯科技(深圳)有限公司 Blockchain-based data processing method and apparatus, and device and readable storage medium

Citations (4)

* 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
US20180294955A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. System for processing data based on blockchain and operating method thereof
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180294955A1 (en) * 2017-04-05 2018-10-11 Samsung Sds Co., Ltd. System for processing data based on blockchain and operating method thereof
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神说的分片第四步是啥?"", 《腾讯[云+社区]》 *
链接世界: ""侧链、子链、分片是啥? V神说的分片第四部是啥?"", 《看点快报》 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110998633B (en) * 2019-04-30 2023-11-21 创新先进技术有限公司 Method and apparatus for avoiding double-flower problem in blockchain technology
CN110998633A (en) * 2019-04-30 2020-04-10 阿里巴巴集团控股有限公司 Method and apparatus for avoiding double-flower problem in block chain technology based on read-write set model
CN110610421A (en) * 2019-09-03 2019-12-24 北京航空航天大学 Guarantee fund management method and device under fragment framework
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
CN110675257A (en) * 2019-09-12 2020-01-10 广州蚁比特区块链科技有限公司 Method and device for constructing block group chain
CN110675257B (en) * 2019-09-12 2022-09-06 广州蚁比特区块链科技有限公司 Block group chain construction method and device
WO2021068477A1 (en) * 2019-10-11 2021-04-15 深圳壹账通智能科技有限公司 Block processing method, apparatus, computer device and storage medium
CN110855761A (en) * 2019-10-29 2020-02-28 深圳前海微众银行股份有限公司 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
CN111179086A (en) * 2019-12-31 2020-05-19 杭州趣链科技有限公司 Intelligent contract virtual machine based on WebAssembly
CN113141542A (en) * 2020-01-20 2021-07-20 亦非云互联网技术(上海)有限公司 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
CN111445329A (en) * 2020-03-20 2020-07-24 广州金丘链云科技有限公司 Block chain transaction processing method and system
CN112260836A (en) * 2020-09-28 2021-01-22 电子科技大学 Method for improving block chain throughput based on fragmentation technology
CN112235382A (en) * 2020-09-30 2021-01-15 苏州讯如电子科技有限公司 Transaction management system and method based on block chain fragmentation
CN112261158A (en) * 2020-12-21 2021-01-22 支付宝(杭州)信息技术有限公司 Method and system for returning cross-fragment transaction response, main chain node and source fragment node
CN112257118A (en) * 2020-12-21 2021-01-22 支付宝(杭州)信息技术有限公司 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
CN113259466A (en) * 2021-06-02 2021-08-13 支付宝(杭州)信息技术有限公司 Block chain subnet operation state control method and block chain system
CN113239052A (en) * 2021-07-13 2021-08-10 广东卓启云链科技有限公司 Alliance chain grouping method, device, equipment and medium
WO2023109627A1 (en) * 2021-12-17 2023-06-22 深圳先进技术研究院 Distributed system sharding method and apparatus, electronic device, and storage medium
WO2023134291A1 (en) * 2022-01-17 2023-07-20 腾讯科技(深圳)有限公司 Blockchain-based data processing method and apparatus, and device and readable storage medium

Also Published As

Publication number Publication date
CN109508968B (en) 2020-12-18

Similar Documents

Publication Publication Date Title
CN109508968A (en) Block catenary system and its control method
CN109150972B (en) Working method of consensus mechanism of double-layer partitioned efficient block chain
CN107169865B (en) Asset data processing system based on block chain technology
Jesus et al. A survey of how to use blockchain to secure internet of things and the stalker attack
CN109522362A (en) Incomplete markets synchronous method, system and equipment based on block chain data
Wang et al. A comparative study of blockchain consensus algorithms
US11157487B2 (en) Trusted storage method and system based on directed acyclic graph structure
CN108776929A (en) Bill processing method, system based on block chain database and readable storage medium storing program for executing
KR20200032449A (en) A method for establishing agreement between nodes in a Blockchain network and a Blockchain system
CN112163950B (en) Block chain network construction method, system and terminal equipment convenient for expansion and node resource multiplexing
CN111371905B (en) Block chain layering consensus proving system and method based on cloud computing
CN109447603B (en) Ocean data resource sharing method based on block chain
Ramezan et al. Analysis of proof-of-work-based blockchains under an adaptive double-spend attack
CN113407977B (en) Cross-chain extension method and system based on aggregated signature
Zhao et al. Evaluating DAG-based blockchains for IoT
Doku et al. LightChain: On the lightweight blockchain for the Internet-of-Things
Xue et al. STBC: A novel blockchain-based spectrum trading solution
Tang et al. Hedera: A permissionless and scalable hybrid blockchain consensus algorithm in multiaccess edge computing for IoT
CN114219650B (en) Block chain consensus method with low transaction delay
Cong et al. DTNB: A blockchain transaction framework with discrete token negotiation for the delay tolerant network
CN114143021B (en) News information credit score system based on block chain
Gojka et al. Security in distributed ledger technology: An analysis of vulnerabilities and attack vectors
Sun et al. A reputation based hybrid consensus for e-commerce blockchain
CN113269543A (en) Multilayer mixed transaction capacity expansion system and method for block chain
CN116258609B (en) Electric power system transaction cooperation method, device and storage medium

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