CN108876361A - Block catenary system, block generation method and computer readable storage medium - Google Patents
Block catenary system, block generation method and computer readable storage medium Download PDFInfo
- Publication number
- CN108876361A CN108876361A CN201710333007.9A CN201710333007A CN108876361A CN 108876361 A CN108876361 A CN 108876361A CN 201710333007 A CN201710333007 A CN 201710333007A CN 108876361 A CN108876361 A CN 108876361A
- Authority
- CN
- China
- Prior art keywords
- node
- nodes
- block
- specific
- new 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 16
- 230000007246 mechanism Effects 0.000 claims abstract description 48
- 238000012423 maintenance Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 9
- 238000012216 screening Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000009825 accumulation Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000007613 environmental effect Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 230000002860 competitive effect Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000007599 discharging Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000004134 energy conservation Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 238000013016 damping Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000003999 initiator Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/389—Keeping log of transactions for guaranteeing non-repudiation of a transaction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/36—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
- G06Q20/367—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes
- G06Q20/3678—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes involving electronic purses or money safes e-cash details, e.g. blinded, divisible or detecting double spending
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a kind of block catenary system, block generation method and computer readable storage medium, which includes:Multiple first nodes constitute point to point network between the multiple first node;Multiple second nodes, each first node are connected at least one second node in the multiple second node, constitute centralized network between first node and the second node connected;Wherein, pass through point-to-point mode sending and receiving data between the multiple first node, and new block is generated by common recognition mechanism and the validity of the new block received is verified, in common recognition mechanism, first node selects the specific second node in multiple second nodes connected to it by pre-defined rule, specific second node collaboration first node generates new block, wherein, specific second node executes the witness of new block, the publication of first node execution new block, first node is stationary nodes, and second node is stationary nodes or mobile node.
Description
Technical Field
The present invention relates to a blockchain technology, and more particularly, to a blockchain system, a method for generating a blockchain, and a computer-readable storage medium.
Background
Since the advent of the bitcoin system in 2009, decentralized cryptocurrencies, represented by bitcoins and their derived competitive currencies, have received much attention. The system is characterized in that a distributed shared general ledger is constructed based on a block chain, so that the safe, reliable and decentralized characteristics of system operation are guaranteed.
The blockchains are currently divided into three categories, public blockchains, alliance blockchains, and private blockchains. The public blockchain is the oldest blockchain and is also the most widely used blockchain.
There are basically three kinds of common block chain common mechanism.
The first consensus mechanism is a workload certification mechanism, which finds a specific value by performing a large number of SHA256 calculations, so that the Hash value of a new block containing the value and some transaction data satisfies the preset conditions of the system. The mechanism is adopted by the bitcoin, and is also adopted by Ethengfang at present. The SHA256 is very computationally intensive, requiring specialized equipment and consuming a significant amount of power to accomplish. Another side effect of the very large amount of computation is that the speed of generating new blocks is difficult to increase, with the current bitcoin being one new block every 10 minutes on average. And because the difficulty is too big, only a small number of professional organizations can finish, form monopoly, have deviated from the initial purpose of decentralization of the block chain. The benefit of the workload proving mechanism is security because the computational workload is too large and there is no possibility at all to create a new blockchain to transfer the digital currency stored therein.
The second consensus mechanism is the asset attestation mechanism, which is an improvement over workload attestation. The idea is that the difficulty of workload certification is inversely proportional to the assets held by the node, the more assets are, the lower the difficulty of workload certification is, and conversely, the less assets are, the greater the difficulty of workload certification is. The mechanism can actually lead the two poles of the asset holders to be differentiated, the more assets are held, the easier the ore digging is, the more assets are, finally, monopoly can be formed, the center is formed, and the unfairness is caused.
A third consensus mechanism is the asset proof of authority mechanism. In the mechanism, each node can authorize the accounting right of the asset held by the node to a third party, and finally, a plurality of previous nodes which obtain the most authorization in the system carry out block chain accounting in turn. The consensus mechanism has the advantages that the generation speed of the new block is high, but the defect still exists in monopoly center, and the problem of safety is easily caused due to the lack of a competitive mechanism of a bookkeeper.
The three consensus mechanisms all have the defect of centralized trend, and how to design a quick consensus mechanism can improve the transaction speed, does not need large-scale mathematical operation, is energy-saving and environment-friendly, can remove the centralized trend, ensures the system safety, and is a technical subject continuously explored in the field of block chains.
Disclosure of Invention
The invention aims to provide a block chain system, which adopts a first node forming a point-to-point network and a second node forming a centralized network with the first node, and can solve the problems of the existing block chain system.
A first aspect of the invention provides a blockchain system comprising: a plurality of first nodes, wherein a point-to-point network is formed among the plurality of first nodes; each first node is connected with at least one second node in the plurality of second nodes, and a centralized network is formed between the first nodes and the connected second nodes; in the consensus mechanism, a specific second node in the second nodes is selected through a preset rule, the specific second node generates a new block in cooperation with the first node connected with the specific second node, the specific second node executes witness of the new block, and the first node executes release of the new block. The first node is a fixed node and the second node is a fixed node or a mobile node.
Preferably, the plurality of first nodes collect transaction information which is not recorded in blocks in the peer-to-peer network, record and maintain the transaction information, and generate candidate blocks, and the first nodes store a list of all second nodes connected with the first nodes, when a specific second node is selected, the first node connected with the specific second node is authorized to issue the generated candidate block to the peer-to-peer network after being signed by the specific second node, the first node adds the newly received block to the block chain main chain after verifying the block, and the plurality of first nodes all store the block chain main chain.
Preferably, in the consensus mechanism, the second nodes participating in consensus are screened according to the hash value of the head of the optimal block in the blockchain main chain, the signature of the second node performing the witness when the optimal block is generated, and the address of the second node meeting the conditions of participating in consensus, and the address of the second node needs to have historical transaction information meeting the specified conditions and account balance of the specified amount.
Preferably, in the consensus mechanism, the number of matching bits of SHA256(witnessAddress) and SHA256(bestBlockHeaderHash | | | Signature | | | witnessAddress) are compared, and when a preset number of matching bits is reached, it is determined that the second node can participate in consensus, where witnessAddress is an address of the second node, bestBlockHeaderHash is an optimal block header hash value, and Signature is a Signature of the second node that performs the witness when the optimal block is generated.
Preferably, when there are a plurality of second nodes reaching the preset number of matching bits, the second node with the larger number of matching bits has the priority witness.
Preferably, when the second node reaching the preset matching bit number does not exist, the first node allows to reduce the preset matching bit number after waiting for a specified time, and performs the comparison again until the second node reaching the preset matching bit number exists or a new block issued by another first node is received.
Preferably, when a specific second node is selected, the first node connected with the specific second node sends the transaction information digests in the history blocks of the specified number to the specific second node as part of the signature information for signature, and the signature is taken as the proof of the account book maintenance.
Preferably, when a candidate block is added to the blockchain backbone and released to the peer-to-peer network, a first node connected to a particular second node pays a 4:3:2:1 ratio of charges to the release nodes of the first 4 blocks in the blockchain backbone and receives a specified amount of reward, which is proportionally distributed by the first node to the second node.
Preferably, when the transaction record before a certain block in the block chain main chain does not contain the unetched transaction, the transaction records before the block are not maintained by the plurality of first nodes.
Preferably, the number of matching bits for a particular second node address determines the weight of the block, the weight of the block chain is the sum of the weights of all blocks constituting the block chain, and the block chain with the highest weight is the main chain of the block chain.
A second aspect of the present invention provides a block generation method based on a block chain system, where the block chain system includes a plurality of first nodes and a plurality of second nodes, the plurality of first nodes form a peer-to-peer network therebetween, each first node is connected to at least one second node in the plurality of second nodes, the first nodes form a centralized network with the connected second nodes, the first nodes are fixed nodes, the second nodes are fixed nodes or mobile nodes, and data is transmitted and received between the plurality of first nodes in a peer-to-peer manner, and the block generation method includes the following steps: the first node generates a new block through a consensus mechanism and verifies the validity of the received new block; the first node selects a specific second node from the plurality of second nodes connected with the first node through a predetermined rule, the specific second node generates a new block in cooperation with the first node, wherein the specific second node performs witness of the new block, and the first node performs release of the new block.
A third aspect of the present invention provides a computer-readable storage medium storing a program, which when executed by a processor, controls a blockchain system including a plurality of first nodes and a plurality of second nodes, the plurality of first nodes forming a peer-to-peer network therebetween, each of the first nodes being connected to at least one of the plurality of second nodes, the first nodes forming a centralized network with the connected second nodes, the plurality of first nodes transmitting and receiving data therebetween in a peer-to-peer manner, the first nodes being fixed nodes and the second nodes being fixed nodes or mobile nodes, the program when executed by the processor controlling the blockchain system to implement the following steps: enabling the first node to generate a new block through a consensus mechanism and verifying the validity of the received new block; wherein the first node selects a specific second node among the plurality of second nodes connected thereto by a predetermined rule, the specific second node generates a new tile in cooperation with the first node, wherein the specific second node performs witness of the new tile, and the first node performs release of the new tile.
The block chain system adopts a mechanism that a preset rule can not prejudge a pair of first node and second node which obtain the accounting right, and introduces the mobile terminal into a consensus mechanism, so that the block-out time of the system reaches the second level, and the transaction processing capacity can be effectively improved.
The block chain system reuses a huge resource of the mobile terminal to replace a huge power resource consumed in a POW mechanism, so that the purposes of energy conservation and environmental protection can be achieved, the block discharging speed of the block chain can be increased, the transaction processing capacity can be improved, and the maintenance cost of a transaction book can be reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate preferred embodiments of the invention and together with the description, serve to explain the principles of the invention. In the drawings:
fig. 1 is a topological diagram of a first embodiment of a blockchain system according to the present invention.
Fig. 2 is a topological diagram of a second embodiment of a blockchain system according to the present invention.
Fig. 3A and 3B are flow diagrams illustrating screening of nodes in a first embodiment of a blockchain system according to the present invention.
FIG. 4 is a diagram illustrating address matching difficulty adjustment in a first embodiment of a blockchain system according to the present invention.
Fig. 5 is a flowchart of address matching difficulty adjustment in the first embodiment of the block chain system according to the present invention.
Fig. 6 is a diagram illustrating the block weight assignment in the first embodiment of the block chain system according to the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. In the drawings, like parts are designated by like reference numerals.
Fig. 1 is a topological diagram of a first embodiment of a blockchain system according to the present invention.
As described above, Bizhou aims at solving the double flower problem by designing a workload certification mechanism. The workload proving mechanism can be understood as increasing the damping of an attacker and reducing the speed of the attacker, so that the attacker can not theoretically catch up with the speed of a system generated block on the premise that the calculation capacity is less than 51% of the total calculation capacity of the system, and thus the data of the block cannot be changed. The workload proving mechanism also inevitably limits the block-out speed of the block while increasing the difficulty of the attack.
In order to solve the aforementioned drawback of bitcoin, the blockchain system of the present invention employs an address winning mechanism instead of a workload proving mechanism, for example, a mobile terminal is introduced into a consensus mechanism, so that the block-out time of the system reaches the second level, thereby effectively improving the transaction processing capability.
The invention aims to reuse the huge resource of the mobile terminal to replace the huge power resource consumed in a POW mechanism, thereby achieving the purposes of energy conservation and environmental protection, improving the block discharging speed of a block chain, improving the transaction processing capacity and reducing the maintenance cost of a transaction book.
In the consensus mechanism of the present invention, a cryptocurrency is defined as a currency.
As shown in fig. 1, the first embodiment of the blockchain system of the present invention includes: a plurality of first nodes 10, wherein the first nodes 10 form a point-to-point network; a plurality of second nodes 20, each first node 10 being connected to at least one of the plurality of second nodes 20, the first nodes 10 and the connected second nodes 20 forming a centralized network therebetween. The centralized network is also referred to herein as a centralized network, wherein each second node 20 is connected to a first node 10. The data are transmitted and received between the plurality of first nodes 10 in a point-to-point mode, and the validity of the data is verified through a consensus mechanism, in the consensus mechanism, a specific second node in the plurality of second nodes 20 is selected through a preset rule, the specific second node generates a new block in cooperation with the first node connected with the specific second node, the specific second node 20 is responsible for new block witness, and the first node 10 is responsible for new block issue. The first node 10 is a fixed node and the second node may be a fixed node or a mobile node.
In fig. 15 first nodes 10 are shown, each first node 10 having connected thereto a number (3 in the figure) of second nodes 20. In the embodiment of the present invention, the blockchain is mainly used for accounting the transaction, and therefore, in the present invention, the first node 10 is also referred to as accounting node 10, and the second node 20 is also referred to as witness node.
These 5 accounting nodes 10 form a peer-to-peer network with each other. The accounting node 10 is comprised primarily of a personal computer or larger server for maintaining and maintaining blockchain data. In addition, the accounting node 10 is also responsible for collecting transaction information that is not recorded in the block, and sorting and ordering the transactions to generate new candidate blocks. Furthermore, the accounting node 10 needs to provide proof of its maintenance history data while publishing the blocks, and verification is accomplished by the witness node 20 in conjunction with other accounting nodes 10.
As shown in fig. 1, in the blockchain system of the present invention, each accounting node 10 forms a centralized network with several witness nodes 20 connected.
The witness node 20 is primarily composed of a mobile terminal device, the account of which should have a certain amount of monetary balance and a transaction record that has been made before a certain time. Unlike SPV nodes in bitcoin networks, all witness nodes 20 in the blockchain system of the present invention have equal opportunities to participate in and gain revenue from the consensus process.
In the blockchain system of the invention, transaction addresses are used for identifying the initiator and the receiver of the transaction, each node should at least comprise one transaction address, and the node can selectively disclose or hide the transaction address. Typically the witness node 20 will disclose an address for participating in the consensus witness; the billing node 10 also exposes an address to assist the witness node 20 and other billing nodes 10 in completing verification of the historical transactions.
The 5 accounting nodes 10 in fig. 1 collect transaction information that is not recorded in blocks, record and maintain the transaction information, and generate candidate blocks in the peer-to-peer network, and each accounting node 10 stores a list of all witness nodes 20 connected thereto. When a particular witness node 20 is selected, the billing node 10 to which it is connected is authorized to generate and issue new blocks, during which the particular witness node 20 witnesses the new blocks. The new block is received and verified by the other accounting nodes 10 and added to the respective stored blockchain backbone and 5 accounting nodes 10 each save the blockchain backbone.
In fig. 1, 5 accounting nodes 10 are shown, but it should be understood that this is only an example, and in the blockchain system of the present invention there may be more or fewer accounting nodes 10 and accounting nodes 10 are allowed to join or exit freely.
Fig. 2 is a topological diagram of a second embodiment of a blockchain system according to the present invention.
As shown in fig. 2, in contrast to the first embodiment of the blockchain system of the present invention, in the second embodiment, at least one (only 1 shown) wallet node 30 is also connected to each accounting node 10. That is, a centralized network is also formed between the wallet node 30 and the accounting node 10.
In a second embodiment, the wallet node 30 is a node for general transaction activities, the transaction being dependent on the accounting node 10 or the block data service provider. The wallet node 30 need not store transaction data and the wallet node 30 may be automatically upgraded to the witness node 20 when its currency balance and transaction records meet the threshold requirements of the witness node 20.
The screening of witness nodes is specifically described below by taking the first embodiment as an example.
In order to shorten the time for achieving consensus and ensure fairness, the block chain system screens out a certain number (such as 2-3) of witness nodes to participate in the consensus process according to the optimal blocks each time.
The accounting node 10 continuously receives and verifies the generated new blocks, the verified block with the highest weight is called an optimal block, and a block chain in which most accounting nodes 10 in the peer-to-peer network formed by the accounting node 10 agree with the optimal block is a block chain main chain.
The witness node 20 selected by the screening method described below obtains the right to generate a new tile with the first node 10 connected to it. In the new block created, the selected witness nodes 20 and their accounting nodes 10 have the right to create a coinage transaction for a coinage award, the selected witness nodes 20 also being referred to as winning witness nodes.
Fig. 3A and 3B are flow diagrams of witness node screening in a blockchain system according to a preferred embodiment of the present invention.
The process of witness screening is described in detail with reference to fig. 3A and 3B.
In fig. 3A, the accounting node 10 maintains a list of witness nodes 20 connected thereto, and receives an address disclosed by a new witness node 20 whenever the witness node 20 is connected thereto (step S300). It is then determined whether the witness node 20 satisfies the constraint conditions for participation in consensus (step S302), including but not limited to:
1) the address has a transaction record and the earliest transaction time is before a certain time (e.g., 1 day), the condition may prevent the witness node from temporarily generating an address matching the winning address;
2) the address has no less than a specified amount of money, and the condition prevents the witness node from generating a large number of empty addresses to increase the probability of being selected and to reduce the risk of an attack on the basis thereof.
In the consensus mechanism of the present invention, the witness nodes 20 participating in witness consensus are screened based on the chunk header hash value of the optimal chunk within the accounting node 10, the signature of the witness node 20 witness when the optimal chunk was generated, and the address of the witness node 20 satisfying the conditions for participation in consensus.
If the result of the determination in step S302 is yes, the witness node 20 is allowed to participate in the block consensus (step S304). If the determination result in step S302 is no, the process ends.
The screening of witness nodes is described below with reference to fig. 3B.
The screening of witness nodes 20 is based on the chunk-header hash of the optimal chunk and the signature of witness node 20 in the transaction of the chunk coinage. Specifically, as shown in fig. 3B, the chunk head hash value of the optimal chunk and the signature of the witness node 20 in the chunk coinage transaction are obtained (step S306).
Then, the address hash value SHA256(witnessAddress) of the witness node 20 is compared with the matching number of bits of SHA256(bestBlockHeaderHash | | | Signature | | | witnessAddress) (step S308).
Various methods of comparing matching addresses are within the scope of the present invention, including but not limited to the following:
a) comparing the matching bit number of SHA256(witnessAddress) and SHA256(witnessAddress | | | bestblock Header Hash | | | Signature);
b) the matching bit numbers of SHA256(witnessAddress) and SHA256(witnessAddress | | | bestblock Header Hash | | | Signature | | | | witnessAddress) are compared.
If the predetermined matching objective is reached (step S308, YES), the witness node may participate in block consensus to generate a new block (step S310).
If the preset matching target is not reached (step S308, NO), delay adjustment is performed (step S312).
After step S312 is performed, step S308 is repeated until a witness node satisfying the preset target is found.
In the present invention, the delay adjustment is also referred to as address matching difficulty adjustment, and the address matching difficulty adjustment is described in detail below with reference to fig. 4 and 5.
The blockchain system of the present invention uses 2 bytes (16 bits) in the block header to represent the matching difficulty parameter, which is defined as the following table:
TABLE 1 matching difficulty adjustment parameters
Bits | Symbol | Means of |
bit15~bit10 | A | Winning match digit |
bit9~bit0 | B | Prize winning matching adjustment parameters |
In table 1, a indicates the minimum matching bit number of the witness node, B indicates the range of 10 digits after a digit, and the initial value thereof is 512, as shown in fig. 4.
Fig. 5 is a flowchart of address matching difficulty adjustment in the first embodiment of the block chain system according to the present invention.
According to the screening rule of the witness nodes, when the exclusive or result of the hash value SHA256(witnessAddress) of the witness node address and the SHA256(bestblockHeaderHash | | | Signature | | | witnessAddress) meets the condition that all the first A bits are 0, and the following 11-bit numbers are [2 ]10,B+210]If the node is within the range, the witness node can participate in the block consensus (step S500).
In the invention, the address matching difficulty adjusting parameter can be adjusted once every a period of time.
Preferably, the address matching difficulty adjustment parameter is adjusted on average once every 3 days. For example, assuming that the average block-out time is 10 seconds, the theoretical number of blocks in 3 days is 25920. Note that the total block output time of the latest 25920 blocks is T, and the theoretical total block output time is 259200 seconds, i.e. it can be determined whether the current matching difficulty is higher or lower according to the ratio (denoted as ratio) of T/259200 (step S502).
When the ratio is less than 1, it indicates that the current matching difficulty is low (step S502, low), resulting in a block time shorter than the theoretical value, and at this time, a should be increased or B should be decreased to increase the difficulty (step S504); when ratio is greater than 1, it indicates that the current matching difficulty is higher (step S502, higher), resulting in a longer block time than the theoretical value, and at this time, a should be decreased or B should be increased to decrease the difficulty (step S506).
Preferably, in the embodiment of the present invention, a specific adjustment scheme of the matching difficulty is as follows:
1) when 256< ratio B <768, then a is not adjusted, and only B is adjusted to ratio B;
2) when ratio B < 256, adding 1 to A, and adjusting B to 2 ratio B;
3) when ratio B > 768, then A minus 1, B adjusted to 0.5 ratio B.
In addition, when there are a plurality of witness nodes 20 that have reached the preset number of matching bits, witness nodes 20 that have a large number of matching bits take precedence.
The weights of the blocks are explained below.
The weights of the blocks consist of two parts, namely the address matching bit number weight and the parent block weight. The higher the address matching digit is, the larger the weight is, and the weight calculation parameters are set as follows: the matching bit number is the same as the target matching bit number (a), and the weight is 7. When the actual matching digit number exceeds the target matching digit number by less than 5 digits, adding 4 to the weight of each more digit of the actual matching digit number, and subtracting 4 from the weight of each less digit of the actual matching digit number; when the number of actual matching bits exceeds the target number of matching bits by 5 bits, the weight is constant at 27, i.e., the upper limit of the individual block weight. The individual block weight formula is expressed as follows:
where w is a weight value, m is the difference between the actual match digit and the target match digit (A), and m may be a negative number.
Each block weight in the block chain is the sum of the parent block weight and the current block address matching bit weight, namely the weight of the current block is the sum of the weight accumulation of the block chain from the created block to the current block address matching bit weight. The weight accumulation is represented in the block header by four bytes. Blocks with larger weights can only eventually join the backbone when the block chain branches, so each accounting node 10 always selects the one with the largest accumulated weight when it receives different blocks of the same height. Here, the height of a block refers to a distance from an originating block to a current block, or the number of blocks passed.
Fig. 6 is a diagram illustrating the block weight assignment in the first embodiment of the block chain system according to the present invention.
As shown in fig. 6, the bottom right corner of each block is the weight corresponding to its matching bit number, and the top left corner is the weight accumulation of the block. For example, taking the 2A block in the figure as an example, the weight corresponding to the matching bit number is 15, and the weight accumulation of the block is 33.
In a network connected to the same accounting node 10, if more than one witness node 20 that achieves the matching objective, the witness node 20 with the highest number of matching digits will participate in the consensus process. The preset matching target is expressed by two bytes in the block header and can be dynamically adjusted according to the address matching condition in the last period of time. The more the number of address matching bits, the more advantageous in block consensus.
When the specific witness node 20 is selected, the accounting node 10 connected to the specific witness node 20 sends the transaction information in a predetermined number of history blocks to the specific witness node 20 to sign the transaction information as a proof of the account book maintenance.
In the blockchain system of the invention, in order to limit the issuing of a plurality of highly identical blocks by the accounting node 10, a block issuing fee mechanism is designed, namely, when the accounting node 10 connected with a specific witness node 20 adds a candidate block into a blockchain main chain and issues the candidate block to a peer-to-peer network, the accounting node 10 pays a fee with a ratio of 4:3:2:1 to the issuing nodes of the first 4 blocks in the blockchain main chain. If the block issued by the accounting node 10 is adopted, its issuing fee can be compensated by 100% or more than 100% from the issuing fee of its descendant block; if the block is not adopted, the block issue transaction is eventually validated by inclusion of other blocks, and is typically not compensated for the absence of descendant blocks.
In the blockchain system of the present invention, when a previous transaction record for a block in the blockchain backbone does not contain an uneventful transaction, the accounting node 10 optionally does not maintain the previous transaction record for the block.
As is well known, as the amount of data that needs to be stored in the blockchain increases with time, the present invention proposes a checkpoint mechanism that can appropriately relieve the storage pressure of the accounting node 10 with limited storage space.
In the present invention, the check point refers to a block that does not include an unspent transaction output (UTXO) in all blocks before a certain height. Once a chunk has been checkpointed, it is possible for the limited storage billing node 10 to choose to delete the portion of the chunk prior to the checkpoint locally, but at the cost of missing a portion of the opportunity to obtain the reward. The accounting node 10 can only miss the opportunity to recommend candidate blocks once when the history chosen by the rule is just before the checkpoint.
In the blockchain system of the invention, the accounting node 10 is served by a fixed terminal, the computing capability and the storage capability are stronger, and the witness nodes 20 are served by mobile terminals, the number of the witness nodes is huge, and a certain amount of digital currency for transaction is associated.
The block chain system of the invention adopts an address winning mechanism to replace a workload proving mechanism, introduces the mobile terminal into a consensus mechanism, enables the block-out time of the system to reach the second level, and can effectively improve the transaction processing capacity.
The invention reuses the huge resource of the mobile terminal to replace the huge power resource consumed in the POW mechanism, thereby achieving the purposes of energy saving and environmental protection, improving the block output speed of a block chain, improving the transaction processing capacity and reducing the maintenance cost of a transaction book.
The functions of the blockchain system of the present invention can be realized by a program. When the functions of the blockchain system of the present invention are to be realized, the program is obtained from a network or installed from a storage medium into an electronic device such as a computer, and a series of processes are executed by the program.
The computer-readable storage medium storing the program may be a removable medium that is separate from the apparatus main body and that provides the program to the user, or may be pre-installed in the storage medium of the apparatus main body. For example, the program may be stored in a computer-readable storage medium. The first node and/or the second node can read the program and execute the program to realize the above functions of the blockchain system.
In the case that the second node is a mobile terminal, the user may install a corresponding program, join the program in the blockchain system, and participate in the consensus mechanism. This can improve the time of leaving the piece of block chain system, in addition, encourages more users to participate through certain reward mechanism, reduces the maintenance cost of transaction account book, reduces power consumption by a wide margin.
The computer-readable storage medium may be, for example, an Optical Disk such as a CD-ROM, a phase-change Optical Disk such as a DVD-ROM, an Optical Disk such as an MO (magneto Optical) Disk or an MD (Mini Disk), a magnetic Disk such as a floppy (registered trademark) Disk or a portable hard Disk, a flash memory (registered trademark), a smart media, an SD memory card, a memory stick, or various storage devices connected via a network.
The above is only a preferred embodiment of the present invention, and is intended to provide further explanation of the invention claimed, not to limit the present invention, but to those skilled in the art that various modifications, changes and omissions may be made in the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (12)
1. A blockchain system, comprising:
a plurality of first nodes, wherein a point-to-point network is formed among the plurality of first nodes;
each first node is connected with at least one second node in the plurality of second nodes, and a centralized network is formed between the first nodes and the connected second nodes; wherein,
the first nodes send and receive data in a point-to-point mode, generate a new block through a consensus mechanism and verify the validity of the received new block,
in the consensus mechanism, the first node selects a specific second node from the plurality of second nodes connected with the first node through a predetermined rule, the specific second node generates a new block in cooperation with the first node, wherein the specific second node performs witness of the new block, the first node performs release of the new block,
the first node is a fixed node and the second node is a fixed node or a mobile node.
2. The blockchain system of claim 1, wherein in the predetermined rule, the first node filters the second nodes participating in consensus according to a blockhead hash value of an optimal block in the blockchain backbone, a signature of the second node performing the witness when generating the optimal block, and an address of the second node satisfying a condition for participating in consensus, and the address of the second node has historical transaction information meeting a specified condition and a specified amount of account balance.
3. The blockchain system of claim 2, wherein in the predetermined rule, the first node compares the number of matching bits of SHA256(witnessAddress) with SHA256 (bestblockheadhas ║ Signature ║ witnessAddress), and determines that the second node can participate in the consensus when a preset number of matching bits is reached, wherein witnessAddress is an address of the second node, bestblockheadhash is an optimal blockheadhash value, and Signature is a Signature of the second node that performed the witness when the optimal block was generated.
4. The blockchain system of claim 3, wherein when there are a plurality of second nodes that reach the predetermined number of matching bits, the second node with the larger number of matching bits has a priority witness.
5. The blockchain system of claim 3, wherein when the second node reaching the preset number of matching bits is not present, the first node allows to reduce the preset number of matching bits after waiting for a prescribed time, and the comparison is performed again until the second node reaching the preset number of matching bits is present or a new block issued by other first nodes is received.
6. The blockchain system of claim 1, wherein the plurality of first nodes collect transaction information in the peer-to-peer network that is not recorded in a block, record and maintain transaction information, and generate candidate blocks, and the first nodes store a list of all second nodes connected thereto,
when the specific second node is selected, the first nodes connected with the specific second node are authorized to issue the generated candidate blocks to the peer-to-peer network after being signed by the specific second node, the first nodes verify the received blocks and add the blocks to the block chain main chain, and the plurality of first nodes all store the block chain main chain.
7. The blockchain system of claim 6, wherein when the particular second node is selected, the first node connected thereto sends transaction message digests in a prescribed number of historical blocks as part of signature information to the particular second node for signature as proof of ledger maintenance.
8. The blockchain system of claim 6, wherein a first node connected to the particular second node pays a 4:3:2:1 ratio of charges to publishing nodes of the first 4 blocks in the blockchain backbone and receives a specified amount of reward for being proportionally allocated by the first node to the particular second node when adding a candidate block to the blockchain backbone and publishing to the peer-to-peer network.
9. The blockchain system of claim 6, wherein when a previous transaction record for a block in the blockchain backbone does not include an uneaten transaction, the plurality of first nodes no longer maintain the previous transaction record for the block.
10. The blockchain system of claim 3, wherein the number of address matching bits of the specific second node determines the address matching weight of the current block, the weight of each block is the sum of the address matching weight and the parent block weight, the block with the highest weight at the same height is the optimal block, and the blockchain in which the optimal block commonly identified by the peer-to-peer network is located is the blockchain main chain.
11. A block generation method of a block chain system comprises a plurality of first nodes and a plurality of second nodes, a point-to-point network is formed among the plurality of first nodes, each first node is connected with at least one second node in the plurality of second nodes, a centralized network is formed among the first nodes and the connected second nodes, the first nodes are fixed nodes, the second nodes are fixed nodes or mobile nodes, and data are transmitted and received among the plurality of first nodes in a point-to-point mode,
the block generation method comprises the following steps:
the first node generates a new block through a consensus mechanism and verifies the validity of the received new block; wherein,
the first node selects a specific second node from the plurality of second nodes connected with the first node through a predetermined rule, the specific second node generates a new block in cooperation with the first node, wherein the specific second node performs witness of the new block, and the first node performs release of the new block.
12. A computer-readable storage medium storing a program which, when executed by a processor, controls a blockchain system including a plurality of first nodes and a plurality of second nodes, the plurality of first nodes forming a peer-to-peer network therebetween, each of the first nodes being connected to at least one of the plurality of second nodes, the first nodes forming a centralized network with the connected second nodes, the plurality of first nodes transmitting and receiving data therebetween in a peer-to-peer manner, the first nodes being fixed nodes, the second nodes being fixed nodes or mobile nodes,
the program when executed by a processor controls the blockchain system to implement the steps of:
enabling the first node to generate a new block through a consensus mechanism and verifying the validity of the received new block; wherein
The first node selects a specific second node from the plurality of second nodes connected with the first node through a predetermined rule, the specific second node generates a new block in cooperation with the first node, wherein the specific second node performs witness of the new block, and the first node performs release of the new block.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710333007.9A CN108876361A (en) | 2017-05-12 | 2017-05-12 | Block catenary system, block generation method and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710333007.9A CN108876361A (en) | 2017-05-12 | 2017-05-12 | Block catenary system, block generation method and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108876361A true CN108876361A (en) | 2018-11-23 |
Family
ID=64319516
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710333007.9A Pending CN108876361A (en) | 2017-05-12 | 2017-05-12 | Block catenary system, block generation method and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108876361A (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109636389A (en) * | 2018-12-13 | 2019-04-16 | 东软集团股份有限公司 | Block chain goes out determination method, apparatus, equipment and the storage medium of block time |
CN109863522A (en) * | 2018-12-28 | 2019-06-07 | 阿里巴巴集团控股有限公司 | It is retransmitted using transaction and the transaction in block chain network is accelerated to deliver |
CN109902091A (en) * | 2019-02-21 | 2019-06-18 | 腾讯科技(深圳)有限公司 | Method, leader's accounting nodes and the medium that data block records on block chain |
CN110222538A (en) * | 2019-06-17 | 2019-09-10 | 北京艾摩瑞策科技有限公司 | It is related to the verification method and device of block chain |
CN110471987A (en) * | 2019-08-09 | 2019-11-19 | 全链通有限公司 | Date storage method, equipment and computer readable storage medium |
US10505708B2 (en) | 2018-12-28 | 2019-12-10 | Alibaba Group Holding Limited | Blockchain transaction speeds using global acceleration nodes |
CN110851448A (en) * | 2019-11-08 | 2020-02-28 | 四川长虹电器股份有限公司 | Local data storage optimization method based on block chain intelligent contract |
CN110990490A (en) * | 2019-12-19 | 2020-04-10 | 北京海益同展信息科技有限公司 | Method, device, equipment and medium for posting block chain in block chain network |
US20200119926A1 (en) * | 2017-07-07 | 2020-04-16 | Pablo Javier BUKI | Methods and systems for processing high volume, fast settlement blockchain transactions |
CN111090891A (en) * | 2020-03-23 | 2020-05-01 | 卓尔智联(武汉)研究院有限公司 | Notary selection method and notary selection system based on block chain |
US10664469B2 (en) | 2018-12-28 | 2020-05-26 | Alibaba Group Holding Limited | Accelerating transaction deliveries in blockchain networks using acceleration nodes |
TWI699986B (en) * | 2019-03-14 | 2020-07-21 | 柯賓漢數位金融科技有限公司 | Method and system for generating blockchain |
CN111555890A (en) * | 2020-05-06 | 2020-08-18 | 昆明大棒客科技有限公司 | Method, device and equipment for preventing malicious bifurcation |
CN111641666A (en) * | 2019-03-01 | 2020-09-08 | 湖南天河国云科技有限公司 | Main chain selection method and device and computer readable storage medium |
CN111708832A (en) * | 2020-05-18 | 2020-09-25 | 杜晓楠 | Method for adjusting block outlet difficulty in block chain network, computer medium and block chain network |
CN114971421A (en) * | 2022-07-22 | 2022-08-30 | 中国长江三峡集团有限公司 | Hydropower station operation risk management and control system based on block chain technology |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448021A (en) * | 2008-12-29 | 2009-06-03 | 深圳市迅雷网络技术有限公司 | Method and device for realizing point to point network communicating |
CN106100981A (en) * | 2016-08-22 | 2016-11-09 | 布比(北京)网络技术有限公司 | Social network data exchange method and device |
CN106296191A (en) * | 2016-08-13 | 2017-01-04 | 深圳市樊溪电子有限公司 | A kind of PoW common recognition mechanism of block chain power-aware |
WO2017011601A1 (en) * | 2015-07-14 | 2017-01-19 | Fmr Llc | Computationally efficient transfer processing, auditing, and search apparatuses, methods and systems |
CN106453636A (en) * | 2016-11-22 | 2017-02-22 | 深圳银链科技有限公司 | Credible block generation method and system |
-
2017
- 2017-05-12 CN CN201710333007.9A patent/CN108876361A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101448021A (en) * | 2008-12-29 | 2009-06-03 | 深圳市迅雷网络技术有限公司 | Method and device for realizing point to point network communicating |
WO2017011601A1 (en) * | 2015-07-14 | 2017-01-19 | Fmr Llc | Computationally efficient transfer processing, auditing, and search apparatuses, methods and systems |
CN106296191A (en) * | 2016-08-13 | 2017-01-04 | 深圳市樊溪电子有限公司 | A kind of PoW common recognition mechanism of block chain power-aware |
CN106100981A (en) * | 2016-08-22 | 2016-11-09 | 布比(北京)网络技术有限公司 | Social network data exchange method and device |
CN106453636A (en) * | 2016-11-22 | 2017-02-22 | 深圳银链科技有限公司 | Credible block generation method and system |
Cited By (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200119926A1 (en) * | 2017-07-07 | 2020-04-16 | Pablo Javier BUKI | Methods and systems for processing high volume, fast settlement blockchain transactions |
CN109636389B (en) * | 2018-12-13 | 2020-09-22 | 东软集团股份有限公司 | Method, device, equipment and storage medium for determining block chaining-out time |
CN109636389A (en) * | 2018-12-13 | 2019-04-16 | 东软集团股份有限公司 | Block chain goes out determination method, apparatus, equipment and the storage medium of block time |
CN109863522B (en) * | 2018-12-28 | 2023-09-26 | 创新先进技术有限公司 | Accelerating transaction delivery in blockchain networks using transaction retransmissions |
WO2019072306A3 (en) * | 2018-12-28 | 2019-10-24 | Alibaba Group Holding Limited | Accelerating transaction deliveries in blockchain networks using transaction resending |
US11082239B2 (en) | 2018-12-28 | 2021-08-03 | Advanced New Technologies Co., Ltd. | Accelerating transaction deliveries in blockchain networks using transaction resending |
US10505708B2 (en) | 2018-12-28 | 2019-12-10 | Alibaba Group Holding Limited | Blockchain transaction speeds using global acceleration nodes |
US11151127B2 (en) | 2018-12-28 | 2021-10-19 | Advanced New Technologies Co., Ltd. | Accelerating transaction deliveries in blockchain networks using acceleration nodes |
US11032057B2 (en) | 2018-12-28 | 2021-06-08 | Advanced New Technologies Co., Ltd. | Blockchain transaction speeds using global acceleration nodes |
US11042535B2 (en) | 2018-12-28 | 2021-06-22 | Advanced New Technologies Co., Ltd. | Accelerating transaction deliveries in blockchain networks using acceleration nodes |
US11082237B2 (en) | 2018-12-28 | 2021-08-03 | Advanced New Technologies Co., Ltd. | Accelerating transaction deliveries in blockchain networks using transaction resending |
US10664469B2 (en) | 2018-12-28 | 2020-05-26 | Alibaba Group Holding Limited | Accelerating transaction deliveries in blockchain networks using acceleration nodes |
CN109863522A (en) * | 2018-12-28 | 2019-06-07 | 阿里巴巴集团控股有限公司 | It is retransmitted using transaction and the transaction in block chain network is accelerated to deliver |
CN109902091B (en) * | 2019-02-21 | 2021-08-10 | 腾讯科技(深圳)有限公司 | Method for recording data blocks on block chain, leading accounting node and medium |
CN109902091A (en) * | 2019-02-21 | 2019-06-18 | 腾讯科技(深圳)有限公司 | Method, leader's accounting nodes and the medium that data block records on block chain |
CN111641666A (en) * | 2019-03-01 | 2020-09-08 | 湖南天河国云科技有限公司 | Main chain selection method and device and computer readable storage medium |
CN111641666B (en) * | 2019-03-01 | 2023-04-07 | 湖南天河国云科技有限公司 | Main chain selection method and device and computer readable storage medium |
TWI699986B (en) * | 2019-03-14 | 2020-07-21 | 柯賓漢數位金融科技有限公司 | Method and system for generating blockchain |
CN110222538B (en) * | 2019-06-17 | 2020-09-08 | 北京瑞策科技有限公司 | Verification method and device related to block chain |
CN110222538A (en) * | 2019-06-17 | 2019-09-10 | 北京艾摩瑞策科技有限公司 | It is related to the verification method and device of block chain |
CN110471987A (en) * | 2019-08-09 | 2019-11-19 | 全链通有限公司 | Date storage method, equipment and computer readable storage medium |
CN110851448A (en) * | 2019-11-08 | 2020-02-28 | 四川长虹电器股份有限公司 | Local data storage optimization method based on block chain intelligent contract |
CN110851448B (en) * | 2019-11-08 | 2022-05-03 | 四川长虹电器股份有限公司 | Local data storage optimization method based on block chain intelligent contract |
CN110990490A (en) * | 2019-12-19 | 2020-04-10 | 北京海益同展信息科技有限公司 | Method, device, equipment and medium for posting block chain in block chain network |
CN110990490B (en) * | 2019-12-19 | 2023-09-01 | 京东科技信息技术有限公司 | Method, device, equipment and medium for checking in blockchain network |
CN111090891A (en) * | 2020-03-23 | 2020-05-01 | 卓尔智联(武汉)研究院有限公司 | Notary selection method and notary selection system based on block chain |
CN111555890A (en) * | 2020-05-06 | 2020-08-18 | 昆明大棒客科技有限公司 | Method, device and equipment for preventing malicious bifurcation |
CN111708832A (en) * | 2020-05-18 | 2020-09-25 | 杜晓楠 | Method for adjusting block outlet difficulty in block chain network, computer medium and block chain network |
CN114971421A (en) * | 2022-07-22 | 2022-08-30 | 中国长江三峡集团有限公司 | Hydropower station operation risk management and control system based on block chain technology |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108876361A (en) | Block catenary system, block generation method and computer readable storage medium | |
CN113794675B (en) | Distributed Internet of things intrusion detection method and system based on block chain and federal learning | |
CN109150972B (en) | Working method of consensus mechanism of double-layer partitioned efficient block chain | |
Anderegg et al. | Ad hoc-VCG: a truthful and cost-efficient routing protocol for mobile ad hoc networks with selfish agents | |
US20200162261A1 (en) | System and method of blockchain consensus mechanism with custom hardware based on geographic distribution, density, node asset and reputation | |
Huang et al. | Resource allocation and consensus on edge blockchain in pervasive edge computing environments | |
CN107094145B (en) | Data processing method, server and system based on block chain | |
CN109166037B (en) | Consensus method of block chains | |
Engelmann et al. | Towards an economic analysis of routing in payment channel networks | |
WO2016202952A1 (en) | Digital token exchange system | |
CN111130790B (en) | Block co-recognition method based on block chain node network | |
CN110855432A (en) | Asynchronous BFT & DPOS consensus mechanism for assigning verifier rewards based on verifiable random functions | |
CN110298641B (en) | Rule updating method and device for block chain, block chain node and network | |
CN109035011A (en) | A kind of control method and system of block chain DAG width | |
CN110570308A (en) | block chain-based electronic warehouse receipt transaction system with incentive mechanism | |
CN110580617A (en) | bit currency packet network system based on Starkeberg game and excitation method thereof | |
Bashar et al. | Contextualizing consensus protocols in blockchain: A short survey | |
Ramezan et al. | A strong adaptive, strategic double-spending attack on blockchains | |
CN108596586A (en) | Block chain operation method and book keeping operation power node | |
CN112118138B (en) | System and method for realizing block chain consensus mechanism | |
CN111078787A (en) | Block chain consensus method based on random number mapping | |
Yu et al. | Low powered blockchain consensus protocols based on consistent hash | |
Liu et al. | Decentralization is vulnerable under the gap game | |
Xie et al. | HLOChain: A hierarchical blockchain framework with lightweight consensus and optimized storage for IoT | |
CN111582864A (en) | Block chain data volume certification consensus protocol |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20181123 |