WO2021232509A1 - Method and apparatus for expanding tree block chain - Google Patents

Method and apparatus for expanding tree block chain Download PDF

Info

Publication number
WO2021232509A1
WO2021232509A1 PCT/CN2020/095083 CN2020095083W WO2021232509A1 WO 2021232509 A1 WO2021232509 A1 WO 2021232509A1 CN 2020095083 W CN2020095083 W CN 2020095083W WO 2021232509 A1 WO2021232509 A1 WO 2021232509A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
chain
main chain
tree
blockchain
Prior art date
Application number
PCT/CN2020/095083
Other languages
French (fr)
Chinese (zh)
Inventor
文格彬
Original Assignee
昆明大棒客科技有限公司
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 昆明大棒客科技有限公司 filed Critical 昆明大棒客科技有限公司
Publication of WO2021232509A1 publication Critical patent/WO2021232509A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0208Trade or exchange of goods or services in exchange for incentives or rewards

Definitions

  • This application relates to the technical field of blockchain expansion, and in particular to a tree-shaped blockchain expansion method and device.
  • blocks are storage units one by one, recording all the communication information of each block node within a certain period of time.
  • Each block is linked by a random hash (also known as a hash algorithm).
  • the next block contains the hash value of the previous block.
  • One block and one block are connected one after another to form a chain.
  • the data structure we call it a blockchain.
  • this application provides a tree-shaped blockchain expansion method and device.
  • a tree-shaped blockchain expansion method including:
  • the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
  • Blocks are produced and connected in chronological order according to the block production configuration parameters.
  • the tree block chain includes a security main chain and at least one application branch chain;
  • the security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
  • the security main chain is the parent chain; the application branch is the parent chain or the child chain.
  • the generation process of the secure main chain includes:
  • the genesis block is the first block of the tree-shaped blockchain
  • the main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence
  • the preset consensus sequence is EDPoS consensus and CPoW consensus.
  • the block generation and connection in chronological order according to the block generation configuration parameter includes:
  • the mortgage token is thawed according to the preset thawing rule.
  • the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
  • a tree-shaped blockchain extension module including:
  • the sending module is used to send the fork transaction to the pre-designated parent chain
  • the designated module is used to designate the anchor block so that all the sub-chains after the anchor block are valid;
  • the obtaining module is used to obtain block generation configuration parameters;
  • the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
  • the processing module is configured to produce blocks and connect them in chronological order according to the block production configuration parameters.
  • the tree block chain includes a security main chain and at least one application branch chain;
  • the security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
  • the security main chain is the parent chain; the application branch is the parent chain or the child chain.
  • the generating device of the security main chain includes:
  • the setting unit is used to set a genesis block; the genesis block is the first block of the tree-shaped blockchain;
  • the designated unit is used to designate the chain composed of blocks that meet the judgment conditions of the main chain as the parent chain;
  • the main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence
  • the preset consensus sequence is EDPoS consensus and CPoW consensus.
  • the processing module includes:
  • the first obtaining unit is used to obtain the mortgage token of the parent chain of the target quantity
  • the freezing unit is used to store and freeze the mortgage token in the target address
  • the second obtaining unit is used to obtain the block height of the sub-chain
  • the unfreezing unit is used to unfreeze the mortgage token according to the block height according to the preset unfreezing rule.
  • the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
  • the technical solution provided by this application may include the following beneficial effects: first send a fork transaction to a pre-designated parent chain, then specify an anchor block, and when the block generation configuration parameters are obtained, blocks are generated in chronological order according to the block generation configuration parameters And connect, among them, the anchor block is used to calibrate all subsequent sub-chains to be valid.
  • the tree block chain can be used in uranium bifurcation transactions to bifurcate on the pre-designated parent chain to form a child chain, which eliminates the drawbacks of filling all transactions in the main chain block in the traditional single chain structure, and realizes the district Horizontal expansion of the overall block chain system.
  • FIG. 1 is a schematic flowchart of a tree-shaped blockchain expansion method provided in Embodiment 1 of the present application.
  • FIG. 2 is a schematic diagram of the structure of a tree-shaped blockchain extension module provided in the second embodiment of the present application.
  • blocks are storage units one by one, recording all the communication information of each block node within a certain period of time.
  • Each block is linked by a random hash (also known as a hash algorithm), the next block contains the hash value of the previous block, and one block and one block are connected one after another to form a chain
  • the data structure we call it a blockchain.
  • the present application provides a tree-shaped blockchain extension method and device, which are described below by way of embodiments.
  • FIG. 1 is a schematic flowchart of a tree-shaped blockchain extension method provided by Embodiment 1 of the present application.
  • the tree-shaped blockchain expansion method provided in this embodiment may include:
  • Step S101 Send a fork transaction to a pre-designated parent chain.
  • the fork transaction is sent by the application side, and the pre-designated parent chain is formulated by the application side.
  • the parent chain will start to branch, that is to say ,
  • the data of the application side can be stored in the branch of the parent chain, and the branch is the child chain in step S102.
  • Step S102 Specify an anchor block so that all sub-chains after the anchor block are valid
  • the application side will specify the anchor block to determine whether the later transaction is valid in the parent chain and the child chain.
  • the anchor block is a block in the parent chain (referred to here as the designated parent chain block)
  • the later transactions of the child chain will be included in all child chains connected to the designated parent chain block ;
  • the anchor block is a block in the sub-chain (referred to here as the designated sub-chain block)
  • the later transactions of the sub-chain will only be included in the sub-chain connected to the designated sub-chain block .
  • Step S103 Obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
  • block generation interval needs to be consistent with the block generation interval of the security main chain, and other parameters can be configured by the application side.
  • the security main chain mentioned above is one chain in the entire tree-shaped blockchain system, and other chains in the tree-shaped blockchain system can be application side chains.
  • the security main chain is used to record the token transfer data of the security main chain and the negotiation target process data of EDPoS nodes; the security main chain is used to support the security and consensus of the whole block system, and all application branch nodes need to synchronize and verify security The block header information of the main chain. After the new node is connected to the network, the security main chain synchronization is completed first, and then the application branch chain synchronization is started.
  • the generation process of the secure main chain includes: setting a genesis block; the genesis block is the first block of the tree-shaped blockchain; and the chain consisting of blocks that meet the judgment conditions of the main chain is designated Is the parent chain;
  • the main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence; the preset consensus sequence is EDPoS consensus and CPoW consensus.
  • the security main chain of this embodiment can be set to start from the genesis block, the maximum block size is 2MB, the block generation reward is 15 tokens by default, the minimum difficulty of CPoW block generation is 8, and the maximum difficulty is 255.
  • the expected time to generate a block is 60 seconds, and the difficulty coefficient between two adjacent blocks will be adjusted according to the actual situation, so that the block generation time interval is close to the expected value.
  • the transaction volume processed per second may not be very high, for example, only the theoretical value of 156TPS. Of course, these parameters can be adjusted according to actual conditions.
  • the EDPoS node needs to raise enough token votes in each round of negotiation, and use this to create a registration transaction to register on the chain in advance and publish its initial negotiation parameters. Only the nodes that have completed the registration before the negotiation round starts. (More than 2% of the total votes) is allowed to enter the negotiation process and obtain the right to block.
  • the EDPoS node In the EDPoS node registration transaction, the EDPoS node needs to raise enough token votes in each round of negotiation, and use this to create a registration transaction to register on the chain in advance and release its initial negotiation parameters. Only the nodes that have completed the registration before the negotiation round (more than Only 2% of the total votes are allowed to enter the negotiation process and obtain the right to produce blocks.
  • the CPoW consensus is only used for the main chain consensus block production by default, and the corresponding block production reward is provided to participants through this type of transaction. Since the function of this type of transaction is similar to the coinbase transaction in Bitcoin, it will not be repeated here.
  • step S104 blocks are generated and connected in chronological order according to the block generation configuration parameters.
  • each time an application branch is created it is necessary to use the parent chain's token for mortgage, and the token used for mortgage is sent to a special address for freezing ,
  • the frozen token can be unfrozen in stages according to the height of the block, and the creator can use his own private key to transfer the unfrozen token to another address.
  • the freezing and unfreezing process can be: obtaining a target number of mortgage certificates of the parent chain; storing the mortgage certificates in the target address and freezing; obtaining the block height of the child chain;
  • the preset unfreeze rules will unfreeze the mortgage tokens.
  • the anchor block Since the fork transaction is first sent to the pre-specified parent chain, and then the anchor block is specified, when the block generation configuration parameters are obtained, the blocks are generated and connected in chronological order according to the block generation configuration parameters. Among them, the anchor block is used for All subsequent sub-chains after calibration are valid. Based on this, the tree block chain can be used in uranium bifurcation transactions to bifurcate on the pre-designated parent chain to form a child chain, which eliminates the drawbacks of filling all transactions in the main chain block in the traditional single chain structure, and realizes the district Horizontal expansion of the overall block chain system.
  • the application branch chain can either use the nodes of the secure main chain to generate blocks, or build a node to generate the block, or customize the consensus mechanism to generate the block. .
  • the EDPoS node of the secure main chain to produce blocks, there is no need to set up a block producing node.
  • the EDPoS node obtains the right to produce blocks on the main chain while generating new blocks for the branch.
  • This method corresponds to the public business model; self-built nodes can produce blocks.
  • the application side builds a block node in the application branch, and borrows the random beacon generated by the security main chain to set the block generation mechanism of this branch.
  • This method corresponds to a closed business model; of course, the application party can customize the consensus mechanism for the generation of branch chain blocks and sub-blocks.
  • the application branch chain can generate sub-blocks, and the parameters generated by the sub-blocks can be customized, for example, the sub-block interval is not less than 2 Seconds, and no empty blocks can be generated.
  • the node that generates the sub-block is determined by the independent random beacon of the same height block of the security main chain. There is no additional block reward for the sub-block, but it can obtain high transaction fee income.
  • the transaction capacity of each application branch chain can be increased by 30 times, and the TPS can reach 5200.
  • multiple application branches can be created to meet the demand.
  • the application side chain height is maintained in synchronization with the block of the security main chain, which is used to support cross-branch chain transactions between application side chains and facilitate the side chain blocks to refer to the consensus results of the same height of the main chain, reducing the number of traversal queries.
  • the application side chain can generate empty blocks. Specifically, when the application branch selects the EDPoS node of the main chain to generate blocks, the EDPoS node of the security main chain will take the token value of the application branch as a priority reference and independently select the supported application branch. Application side chains with relatively low value may be excluded from the block list by some EDPoS nodes of the security main chain. At this time, in order to maintain the high synchronization of the main chain, the branch will automatically fill in an empty block.
  • FIG. 2 is a schematic structural diagram of a tree-shaped blockchain extension module provided in the second embodiment of the present application.
  • the tree-shaped blockchain extension module provided by this embodiment may include:
  • the sending module 21 is used to send a fork transaction to a pre-designated parent chain
  • the designation module 22 is used to designate an anchor block so that all sub-chains after the anchor block are valid;
  • the obtaining module 23 is configured to obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
  • the processing module 24 is configured to produce blocks and connect them in chronological order according to the block production configuration parameters.
  • the tree block chain includes a security main chain and at least one application branch chain;
  • the security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
  • the security main chain is the parent chain; the application branch is the parent chain or the child chain.
  • the generating device of the security main chain includes:
  • the setting unit is used to set a genesis block; the genesis block is the first block of the tree-shaped blockchain;
  • the designated unit is used to designate the chain composed of blocks that meet the judgment conditions of the main chain as the parent chain;
  • the main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence
  • the preset consensus sequence is EDPoS consensus and CPoW consensus.
  • processing module includes:
  • the first obtaining unit is used to obtain the mortgage token of the parent chain of the target quantity
  • the freezing unit is used to store and freeze the mortgage token in the target address
  • the second obtaining unit is used to obtain the block height of the sub-chain
  • the unfreezing unit is used to unfreeze the mortgage token according to the block height according to the preset unfreezing rule.
  • the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
  • each part of this application can be implemented by hardware, software, firmware, or a combination thereof.
  • multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if it is implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of the following technologies known in the art: Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate array (PGA), field programmable gate array (FPGA), etc.
  • the functional units in the various embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
  • the aforementioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.

Abstract

A method and an apparatus for expanding a tree block chain. The method comprises: first sending a branching transaction to a pre-designated parent chain, then designating an anchor block, and when block generation configuration parameters are acquired, generating blocks in a time sequence according to the block generation configuration parameters, and connecting the blocks, the anchor block being used for calibrating the validity of all subsequent child chains. On this basis, in a branching transaction, a tree block chain can be branched on a pre-designated parent chain, so as to form sub chains, avoiding the disadvantage in a traditional single-chain structure of filling blocks of a main chain with all transactions, achieving the horizontal expansion of a whole block chain system.

Description

树状区块链扩展方法及装置Tree-shaped block chain expansion method and device 技术领域Technical field
本申请涉及区块链扩展技术领域,尤其涉及一种树状区块链扩展方法及装置。This application relates to the technical field of blockchain expansion, and in particular to a tree-shaped blockchain expansion method and device.
背景技术Background technique
在比特币形成过程中,区块是一个一个的存储单元,记录了一定时间内各个区块节点全部的交流信息。各个区块之间通过随机散列(也称哈希算法)实现链接,后一个区块包含前一个区块的哈希值,一个区块与一个区块相继连接起来,形成了一种链状的数据结构,我们称之为区块链。In the process of Bitcoin formation, blocks are storage units one by one, recording all the communication information of each block node within a certain period of time. Each block is linked by a random hash (also known as a hash algorithm). The next block contains the hash value of the previous block. One block and one block are connected one after another to form a chain. The data structure, we call it a blockchain.
在如今常见的区块链项目中,所有交易信息均存储在区块当中并以单链的形式组织起来,使得整个系统面对不断增长的交易规模时缺乏足够的灵活性,过低的交易处理速度和过于复杂的部署问题。In today’s common blockchain projects, all transaction information is stored in blocks and organized in the form of a single chain, making the entire system lack sufficient flexibility in the face of ever-increasing transaction scale, and low transaction processing Speed and overly complex deployment issues.
发明内容Summary of the invention
为至少在一定程度上克服相关技术中存在的问题,本申请提供一种树状区块链扩展方法及装置。In order to overcome the problems existing in the related technology to a certain extent, this application provides a tree-shaped blockchain expansion method and device.
根据本申请的第一方面,提供一种树状区块链扩展方法,包括:According to the first aspect of this application, a tree-shaped blockchain expansion method is provided, including:
向预先指定的父链发送分叉交易;Send a fork transaction to the pre-designated parent chain;
指定锚定区块,以标定所述锚定区块后的所有子链有效;Designate an anchor block, so that all sub-chains after the anchor block are valid;
获取出块配置参数;所述出块配置参数包括区块产生间隔、通证总量、通证分布、出块奖励和增发方式;Obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
根据所述出块配置参数按照时间先后顺序出块并连接。Blocks are produced and connected in chronological order according to the block production configuration parameters.
可选的,所述树状区块链包括安全主链和至少一个应用支链;Optionally, the tree block chain includes a security main chain and at least one application branch chain;
所述安全主链用于记录所述安全主链的通证转移数据和EDPoS节点协商目标过程数据;The security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
所述安全主链为所述父链;所述应用支链为所述父链或所述子链。The security main chain is the parent chain; the application branch is the parent chain or the child chain.
可选的,所述安全主链的产生过程包括:Optionally, the generation process of the secure main chain includes:
设置创世区块;所述创世区块为所述树状区块链的第一个区块;Set a genesis block; the genesis block is the first block of the tree-shaped blockchain;
将满足主链判定条件的区块构成的链指定为父链;Designate the chain composed of blocks that meet the judgment conditions of the main chain as the parent chain;
所述主链判定条件为连接在所述创世区块之后且通过预设共识顺序产生;The main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence;
所述预设共识顺序为EDPoS共识和CPoW共识。The preset consensus sequence is EDPoS consensus and CPoW consensus.
可选的,所述根据所述出块配置参数按照时间先后顺序出块并连接,包括:Optionally, the block generation and connection in chronological order according to the block generation configuration parameter includes:
获取目标数量的父链的抵押通证;Obtain the mortgage token of the parent chain of the target number;
将所述抵押通证存储于目标地址并冻结;Store the mortgage token in the target address and freeze it;
获取子链的区块高度;Get the block height of the child chain;
根据所述区块高度按照预设解冻规则对抵押通证进行解冻。According to the block height, the mortgage token is thawed according to the preset thawing rule.
可选的,所述安全主链的交易机制包括:EDPoS节点投票交、EDPoS节点登记交易、CPoW出块奖励交易。Optionally, the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
根据本申请的第二方面,提供一种树状区块链扩展模块,包括:According to the second aspect of the present application, a tree-shaped blockchain extension module is provided, including:
发送模块,用于向预先指定的父链发送分叉交易;The sending module is used to send the fork transaction to the pre-designated parent chain;
指定模块,用于指定锚定区块,以标定所述锚定区块后的所有子链有效;The designated module is used to designate the anchor block so that all the sub-chains after the anchor block are valid;
获取模块,用于获取出块配置参数;所述出块配置参数包括区块产生间隔、通证总量、通证分布、出块奖励和增发方式;The obtaining module is used to obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
处理模块,用于根据所述出块配置参数按照时间先后顺序出块并连接。The processing module is configured to produce blocks and connect them in chronological order according to the block production configuration parameters.
可选的,所述树状区块链包括安全主链和至少一个应用支链;Optionally, the tree block chain includes a security main chain and at least one application branch chain;
所述安全主链用于记录所述安全主链的通证转移数据和EDPoS节点协商 目标过程数据;The security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
所述安全主链为所述父链;所述应用支链为所述父链或所述子链。The security main chain is the parent chain; the application branch is the parent chain or the child chain.
可选的,所述安全主链的产生装置包括:Optionally, the generating device of the security main chain includes:
设置单元,用于设置创世区块;所述创世区块为所述树状区块链的第一个区块;The setting unit is used to set a genesis block; the genesis block is the first block of the tree-shaped blockchain;
指定单元,用于将满足主链判定条件的区块构成的链指定为父链;The designated unit is used to designate the chain composed of blocks that meet the judgment conditions of the main chain as the parent chain;
所述主链判定条件为连接在所述创世区块之后且通过预设共识顺序产生;The main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence;
所述预设共识顺序为EDPoS共识和CPoW共识。The preset consensus sequence is EDPoS consensus and CPoW consensus.
可选的,所述处理模块,包括:Optionally, the processing module includes:
第一获取单元,用于获取目标数量的父链的抵押通证;The first obtaining unit is used to obtain the mortgage token of the parent chain of the target quantity;
冻结单元,用于将所述抵押通证存储于目标地址并冻结;The freezing unit is used to store and freeze the mortgage token in the target address;
第二获取单元,用于获取子链的区块高度;The second obtaining unit is used to obtain the block height of the sub-chain;
解冻单元,用于根据所述区块高度按照预设解冻规则对抵押通证进行解冻。The unfreezing unit is used to unfreeze the mortgage token according to the block height according to the preset unfreezing rule.
可选的,所述安全主链的交易机制包括:EDPoS节点投票交、EDPoS节点登记交易、CPoW出块奖励交易。Optionally, the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
本申请提供的技术方案可以包括以下有益效果:首先向预先指定的父链发送分叉交易,然后指定锚定区块,在获取到出块配置参数时,根据出块配置参数按照时间顺序出块并连接,其中,锚定区块用于标定其后的所有子链有效。基于此,树状区块链可以在铀分叉交易使在预先指定的父链上进行分叉形成子链,杜绝了传统单链结构中所有交易填充在主链区块的弊端,实现了区块链整体系统的横向拓展。The technical solution provided by this application may include the following beneficial effects: first send a fork transaction to a pre-designated parent chain, then specify an anchor block, and when the block generation configuration parameters are obtained, blocks are generated in chronological order according to the block generation configuration parameters And connect, among them, the anchor block is used to calibrate all subsequent sub-chains to be valid. Based on this, the tree block chain can be used in uranium bifurcation transactions to bifurcate on the pre-designated parent chain to form a child chain, which eliminates the drawbacks of filling all transactions in the main chain block in the traditional single chain structure, and realizes the district Horizontal expansion of the overall block chain system.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments that conform to the application, and are used together with the specification to explain the principle of the application.
图1是本申请的实施例一提供的一种树状区块链扩展方法的流程示意图。FIG. 1 is a schematic flowchart of a tree-shaped blockchain expansion method provided in Embodiment 1 of the present application.
图2是本申请的实施例二提供的一种树状区块链扩展模块的结构示意图。FIG. 2 is a schematic diagram of the structure of a tree-shaped blockchain extension module provided in the second embodiment of the present application.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。The exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the application as detailed in the appended claims.
在比特币形成过程中,区块是一个一个的存储单元,记录了一定时间内各个区块节点全部的交流信息。各个区块之间通过随机散列(也称哈希算法)实现链接,后一个区块包含前一个区块的哈希值,一个区块与一个区块相继连接起来,形成了一种链状的数据结构,我们称之为区块链。In the process of Bitcoin formation, blocks are storage units one by one, recording all the communication information of each block node within a certain period of time. Each block is linked by a random hash (also known as a hash algorithm), the next block contains the hash value of the previous block, and one block and one block are connected one after another to form a chain The data structure, we call it a blockchain.
在如今常见的区块链项目中,所有交易信息均存储在区块当中并以单链的形式组织起来,使得整个系统面对不断增长的交易规模时缺乏足够的灵活性,过低的交易处理速度和过于复杂的部署问题。In today’s common blockchain projects, all transaction information is stored in blocks and organized in the form of a single chain, making the entire system lack sufficient flexibility in the face of ever-increasing transaction scale, and low transaction processing Speed and overly complex deployment issues.
为了解决上述技术问题,本申请提供了一种树状区块链扩展方法及装置,下面以实施例的方式进行说明。In order to solve the above technical problems, the present application provides a tree-shaped blockchain extension method and device, which are described below by way of embodiments.
实施例一Example one
请参阅图1,图1是本申请的实施例一提供的一种树状区块链扩展方法的流程示意图。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a tree-shaped blockchain extension method provided by Embodiment 1 of the present application.
如图1所示,本实施例提供的树状区块链扩展方法可以包括:As shown in Fig. 1, the tree-shaped blockchain expansion method provided in this embodiment may include:
步骤S101、向预先指定的父链发送分叉交易。Step S101: Send a fork transaction to a pre-designated parent chain.
需要说明的是,该分叉交易是由应用方发送的,而预先指定的父链是由应用方进行制定的,在父链接收到分叉交易后,父链会开始产生分支,也就是说,应用方的数据可以存储在父链的分支中,而该分支即为步骤S102中的子链。It should be noted that the fork transaction is sent by the application side, and the pre-designated parent chain is formulated by the application side. After the parent link receives the fork transaction, the parent chain will start to branch, that is to say , The data of the application side can be stored in the branch of the parent chain, and the branch is the child chain in step S102.
步骤S102、指定锚定区块,以标定所述锚定区块后的所有子链有效;Step S102: Specify an anchor block so that all sub-chains after the anchor block are valid;
当然,父链分支时,应用方会指定锚定区块,以确定后期交易在父链和子链中是否有效。当锚定区块为父链中的一个区块(此处称为指定父链区块)时,子链后期的交易则会被包含到与该指定父链区块相连接的所有子链中;当锚定区块为子链中的一个区块时(此处称为指定子链区块),那么子链后期的交易只会包含到与该指定子链区块相连接的子链中。Of course, when the parent chain branches, the application side will specify the anchor block to determine whether the later transaction is valid in the parent chain and the child chain. When the anchor block is a block in the parent chain (referred to here as the designated parent chain block), the later transactions of the child chain will be included in all child chains connected to the designated parent chain block ; When the anchor block is a block in the sub-chain (referred to here as the designated sub-chain block), then the later transactions of the sub-chain will only be included in the sub-chain connected to the designated sub-chain block .
步骤S103、获取出块配置参数;所述出块配置参数包括区块产生间隔、通证总量、通证分布、出块奖励和增发方式;Step S103: Obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
需要说明的是,该区块产生间隔需要和安全主链的区块产生间隔一致,其他参数可以由应用方自行配置。It should be noted that the block generation interval needs to be consistent with the block generation interval of the security main chain, and other parameters can be configured by the application side.
其中,上述提到的安全主链为整个树状区块链系统中的一条链,树状区块链系统中的其他链可以为应用支链。安全主链用于记录所述安全主链的通证转移数据和EDPoS节点协商目标过程数据;安全主链用于支撑全区块系统的安全和共识,所有应用分支节点都需要同步和校验安全主链的区块头信息。新节点接入网络后,首先完成安全主链同步,才开始进行对应用支链同步。Among them, the security main chain mentioned above is one chain in the entire tree-shaped blockchain system, and other chains in the tree-shaped blockchain system can be application side chains. The security main chain is used to record the token transfer data of the security main chain and the negotiation target process data of EDPoS nodes; the security main chain is used to support the security and consensus of the whole block system, and all application branch nodes need to synchronize and verify security The block header information of the main chain. After the new node is connected to the network, the security main chain synchronization is completed first, and then the application branch chain synchronization is started.
另外,安全主链的产生过程包括:设置创世区块;所述创世区块为所述树状区块链的第一个区块;将满足主链判定条件的区块构成的链指定为父链;In addition, the generation process of the secure main chain includes: setting a genesis block; the genesis block is the first block of the tree-shaped blockchain; and the chain consisting of blocks that meet the judgment conditions of the main chain is designated Is the parent chain;
其中,所述主链判定条件为连接在所述创世区块之后且通过预设共识顺序产生;所述预设共识顺序为EDPoS共识和CPoW共识。Wherein, the main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence; the preset consensus sequence is EDPoS consensus and CPoW consensus.
具体的,本实施例的安全主链可以设定为从创世区块开始,区块最大为2MB,出块奖励默认为15个通证,CPoW出块的最小难度为8,最大难度为255,产生一个区块的期望时间为60秒,相邻的两个区块之间会根据实际情 况调整难度系数,使得出块时间间隔逼近期望值。另外,安全主链由于不需要参与实际应用,所以每秒处理的交易量可以不是很高,比如,只有156TPS理论值。当然,这些参数都可以根据实际情况进行调整。Specifically, the security main chain of this embodiment can be set to start from the genesis block, the maximum block size is 2MB, the block generation reward is 15 tokens by default, the minimum difficulty of CPoW block generation is 8, and the maximum difficulty is 255. , The expected time to generate a block is 60 seconds, and the difficulty coefficient between two adjacent blocks will be adjusted according to the actual situation, so that the block generation time interval is close to the expected value. In addition, since the security main chain does not need to participate in practical applications, the transaction volume processed per second may not be very high, for example, only the theoretical value of 156TPS. Of course, these parameters can be adjusted according to actual conditions.
另外,与应用支链相比,有三类与共识机制相关交易是安全主链独有的:EDPOS节点投票交易、EDPOS节点登记交易、CPOW出块奖励交易。In addition, compared with the application branch chain, there are three types of transactions related to the consensus mechanism that are unique to the security main chain: EDPOS node voting transactions, EDPOS node registration transactions, and CPOW block reward transactions.
其中,EDPoS节点登记交易中,EDPoS节点在每轮协商需要筹集足够通证投票,并以此创建登记交易提前在链上进行登记和发布自己初始协商参数,只有协商轮次开始前完成登记的节点(超过总票数的2%)才允许进入协商过程以及获取出块权。Among them, in the EDPoS node registration transaction, the EDPoS node needs to raise enough token votes in each round of negotiation, and use this to create a registration transaction to register on the chain in advance and publish its initial negotiation parameters. Only the nodes that have completed the registration before the negotiation round starts. (More than 2% of the total votes) is allowed to enter the negotiation process and obtain the right to block.
EDPoS节点登记交易中,EDPoS节点在每轮协商需要筹集足够通证投票,并以此创建登记交易提前在链上进行登记和发布自己初始协商参数,只有协商轮次开始前完成登记的节点(超过总票数的2%)才允许进入协商过程以及获取出块权。In the EDPoS node registration transaction, the EDPoS node needs to raise enough token votes in each round of negotiation, and use this to create a registration transaction to register on the chain in advance and release its initial negotiation parameters. Only the nodes that have completed the registration before the negotiation round (more than Only 2% of the total votes are allowed to enter the negotiation process and obtain the right to produce blocks.
CPoW出块奖励交易中,CPoW共识缺省情况下只用于主链共识出块,对应出块奖励通过这类交易提供给参与者。由于该类交易的作用类似Bitcoin中coinbase交易,此处不再赘述。In the CPoW block production reward transaction, the CPoW consensus is only used for the main chain consensus block production by default, and the corresponding block production reward is provided to participants through this type of transaction. Since the function of this type of transaction is similar to the coinbase transaction in Bitcoin, it will not be repeated here.
步骤S104、根据所述出块配置参数按照时间先后顺序出块并连接。In step S104, blocks are generated and connected in chronological order according to the block generation configuration parameters.
为了防止有人通过高频率的恶意分叉造成不必要的资源消耗,每一次创建应用支链时都需要使用父链的通证来进行抵押,用来抵押的通证被发送到一个特殊的地址冻结,被冻结的通证可以根据区块的高度分阶段进行解冻,创建者可以使用自己的私钥将被解冻的通证转移到别的地址。In order to prevent someone from causing unnecessary resource consumption through high-frequency malicious forks, each time an application branch is created, it is necessary to use the parent chain's token for mortgage, and the token used for mortgage is sent to a special address for freezing , The frozen token can be unfrozen in stages according to the height of the block, and the creator can use his own private key to transfer the unfrozen token to another address.
具体的,该冻结和解冻过程可以为:获取目标数量的父链的抵押通证;将所述抵押通证存储于目标地址并冻结;获取子链的区块高度;根据所述区块高度按照预设解冻规则对抵押通证进行解冻。Specifically, the freezing and unfreezing process can be: obtaining a target number of mortgage certificates of the parent chain; storing the mortgage certificates in the target address and freezing; obtaining the block height of the child chain; The preset unfreeze rules will unfreeze the mortgage tokens.
由于首先向预先指定的父链发送分叉交易,然后指定锚定区块,在获取到出块配置参数时,根据出块配置参数按照时间顺序出块并连接,其中,锚 定区块用于标定其后的所有子链有效。基于此,树状区块链可以在铀分叉交易使在预先指定的父链上进行分叉形成子链,杜绝了传统单链结构中所有交易填充在主链区块的弊端,实现了区块链整体系统的横向拓展。Since the fork transaction is first sent to the pre-specified parent chain, and then the anchor block is specified, when the block generation configuration parameters are obtained, the blocks are generated and connected in chronological order according to the block generation configuration parameters. Among them, the anchor block is used for All subsequent sub-chains after calibration are valid. Based on this, the tree block chain can be used in uranium bifurcation transactions to bifurcate on the pre-designated parent chain to form a child chain, which eliminates the drawbacks of filling all transactions in the main chain block in the traditional single chain structure, and realizes the district Horizontal expansion of the overall block chain system.
需要说明的是,步骤S103中的通证分布的方式可以但不仅限于以下三种:It should be noted that the distribution of the tokens in step S103 can be but not limited to the following three:
1)创建独立分支,分支起始块重新设置通证总数和分配方式;1) Create an independent branch, and reset the total number of tokens and the distribution method of the starting block of the branch;
2)完整继承分叉点通证分布;2) Completely inherit the distribution of fork points;
3)继承分叉点通证分布,并在此基础上进行增发,增发部分的分布方式在分支起始块中。3) Inherit the distribution of the bifurcation point token, and perform additional issuance on this basis. The distribution of the additional issuance part is in the starting block of the branch.
而对于应用支链的出块,基于安全主链的共识机制,应用支链既可以借助安全主链的节点进行出块,也可以自建节点进行出块,还可以自定义共识机制进行出块。比如,借助安全主链的EDPoS节点出块,可以不设立出块节点,由EDPoS节点在获得主链出块权同时为分支产生新区块,该种方式对应公开业务模型;自建节点出块可以是由应用方在应用支链自建出块节点,借用安全主链产生的随机信标设置本分支的出块机制。该种方式对应封闭业务模型;当然,应用方可以自定义共识机制用于支链区块和子块的生成。As for the block generation of the application branch chain, based on the consensus mechanism of the secure main chain, the application branch chain can either use the nodes of the secure main chain to generate blocks, or build a node to generate the block, or customize the consensus mechanism to generate the block. . For example, with the help of the EDPoS node of the secure main chain to produce blocks, there is no need to set up a block producing node. The EDPoS node obtains the right to produce blocks on the main chain while generating new blocks for the branch. This method corresponds to the public business model; self-built nodes can produce blocks. The application side builds a block node in the application branch, and borrows the random beacon generated by the security main chain to set the block generation mechanism of this branch. This method corresponds to a closed business model; of course, the application party can customize the consensus mechanism for the generation of branch chain blocks and sub-blocks.
需要说明的是,为了使交易上链的延迟更低,在正常每分钟出块间隔中,应用支链可以产生子块,子块产生的参数可以自定义配置,比如子块间隔不低于2秒,且不可以产生空块。产生子块的节点由安全主链同高度区块独立随机信标决定,子块没有额外出块奖励,但可以获取高额交易费收益。It should be noted that in order to make the transaction on the chain lower delay, in the normal block generation interval per minute, the application branch chain can generate sub-blocks, and the parameters generated by the sub-blocks can be customized, for example, the sub-block interval is not less than 2 Seconds, and no empty blocks can be generated. The node that generates the sub-block is determined by the independent random beacon of the same height block of the security main chain. There is no additional block reward for the sub-block, but it can obtain high transaction fee income.
考虑应用支链中的子块,每个应用支链的交易容量可以提高30倍,TPS可达到5200。当业务数据过大,需要更高的交易容量和并发量时,可以创建多个应用支链来满足需求。Considering the sub-blocks in the application branch chain, the transaction capacity of each application branch chain can be increased by 30 times, and the TPS can reach 5200. When business data is too large and higher transaction capacity and concurrency are required, multiple application branches can be created to meet the demand.
另外,应用支链高度维持和安全主链的区块高度同步,用于支撑应用支链间的跨支链交易以及方便支链区块引用主链同一高度的共识结果,减少遍历查询的次数。为了维持应用支链和安全主链的高度一致,应用支链可以产生空块。具体的,应用支链选择主链的EDPoS节点出块时,安全主链的 EDPoS节点会将应用支链的通证价值作为优先级参考,并自主选择支持的应用支链。价值比较低的应用支链可能会被安全主链的部分EDPoS节点排除在出块列表以外。此时支链为了维持主链的高度同步,会自动填充一个空块。In addition, the application side chain height is maintained in synchronization with the block of the security main chain, which is used to support cross-branch chain transactions between application side chains and facilitate the side chain blocks to refer to the consensus results of the same height of the main chain, reducing the number of traversal queries. In order to maintain the high consistency between the application side chain and the security main chain, the application side chain can generate empty blocks. Specifically, when the application branch selects the EDPoS node of the main chain to generate blocks, the EDPoS node of the security main chain will take the token value of the application branch as a priority reference and independently select the supported application branch. Application side chains with relatively low value may be excluded from the block list by some EDPoS nodes of the security main chain. At this time, in order to maintain the high synchronization of the main chain, the branch will automatically fill in an empty block.
实施例二Example two
请参阅图2,图2是本申请的实施例二提供的一种树状区块链扩展模块的结构示意图。Please refer to FIG. 2, which is a schematic structural diagram of a tree-shaped blockchain extension module provided in the second embodiment of the present application.
如图2所示,本实施例提供的树状区块链扩展模块可以包括:As shown in Figure 2, the tree-shaped blockchain extension module provided by this embodiment may include:
发送模块21,用于向预先指定的父链发送分叉交易;The sending module 21 is used to send a fork transaction to a pre-designated parent chain;
指定模块22,用于指定锚定区块,以标定所述锚定区块后的所有子链有效;The designation module 22 is used to designate an anchor block so that all sub-chains after the anchor block are valid;
获取模块23,用于获取出块配置参数;所述出块配置参数包括区块产生间隔、通证总量、通证分布、出块奖励和增发方式;The obtaining module 23 is configured to obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
处理模块24,用于根据所述出块配置参数按照时间先后顺序出块并连接。The processing module 24 is configured to produce blocks and connect them in chronological order according to the block production configuration parameters.
进一步地,所述树状区块链包括安全主链和至少一个应用支链;Further, the tree block chain includes a security main chain and at least one application branch chain;
所述安全主链用于记录所述安全主链的通证转移数据和EDPoS节点协商目标过程数据;The security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
所述安全主链为所述父链;所述应用支链为所述父链或所述子链。The security main chain is the parent chain; the application branch is the parent chain or the child chain.
进一步地,所述安全主链的产生装置包括:Further, the generating device of the security main chain includes:
设置单元,用于设置创世区块;所述创世区块为所述树状区块链的第一个区块;The setting unit is used to set a genesis block; the genesis block is the first block of the tree-shaped blockchain;
指定单元,用于将满足主链判定条件的区块构成的链指定为父链;The designated unit is used to designate the chain composed of blocks that meet the judgment conditions of the main chain as the parent chain;
所述主链判定条件为连接在所述创世区块之后且通过预设共识顺序产生;The main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence;
所述预设共识顺序为EDPoS共识和CPoW共识。The preset consensus sequence is EDPoS consensus and CPoW consensus.
进一步地,所述处理模块,包括:Further, the processing module includes:
第一获取单元,用于获取目标数量的父链的抵押通证;The first obtaining unit is used to obtain the mortgage token of the parent chain of the target quantity;
冻结单元,用于将所述抵押通证存储于目标地址并冻结;The freezing unit is used to store and freeze the mortgage token in the target address;
第二获取单元,用于获取子链的区块高度;The second obtaining unit is used to obtain the block height of the sub-chain;
解冻单元,用于根据所述区块高度按照预设解冻规则对抵押通证进行解冻。The unfreezing unit is used to unfreeze the mortgage token according to the block height according to the preset unfreezing rule.
进一步地,所述安全主链的交易机制包括:EDPoS节点投票交、EDPoS节点登记交易、CPoW出块奖励交易。Further, the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the foregoing embodiment, the specific manner in which each module performs operation has been described in detail in the embodiment of the method, and detailed description will not be given here.
可以理解的是,上述各实施例中相同或相似部分可以相互参考,在一些实施例中未详细说明的内容可以参见其他实施例中相同或相似的内容。It can be understood that the same or similar parts in the foregoing embodiments may be referred to each other, and the contents not described in detail in some embodiments may refer to the same or similar contents in other embodiments.
需要说明的是,在本申请的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中,除非另有说明,“多个”的含义是指至少两个。It should be noted that in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "plurality" means at least two.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any process or method description described in the flowchart or described in other ways herein can be understood as a module, segment, or part of code that includes one or more executable instructions for implementing specific logical functions or steps of the process , And the scope of the preferred embodiments of the present application includes additional implementations, which may not be in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. This should be It is understood by those skilled in the art to which the embodiments of the present application belong.
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that each part of this application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if it is implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of the following technologies known in the art: Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate array (PGA), field programmable gate array (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried in the method of the foregoing embodiments can be implemented by a program instructing relevant hardware to complete. The program can be stored in a computer-readable storage medium. When executed, it includes one of the steps of the method embodiment or a combination thereof.
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, the functional units in the various embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。The aforementioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. mean specific features described in conjunction with the embodiment or example , The structure, materials, or characteristics are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above-mentioned terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present application have been shown and described above, it can be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present application. A person of ordinary skill in the art can comment on the foregoing within the scope of the present application. The embodiment undergoes changes, modifications, substitutions, and modifications.

Claims (10)

  1. 一种树状区块链扩展方法,其特征在于,包括:A tree-shaped blockchain expansion method, which is characterized in that it includes:
    向预先指定的父链发送分叉交易;Send a fork transaction to the pre-designated parent chain;
    指定锚定区块,以标定所述锚定区块后的所有子链有效;Designate an anchor block, so that all sub-chains after the anchor block are valid;
    获取出块配置参数;所述出块配置参数包括区块产生间隔、通证总量、通证分布、出块奖励和增发方式;Obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
    根据所述出块配置参数按照时间先后顺序出块并连接。Blocks are produced and connected in chronological order according to the block production configuration parameters.
  2. 根据权利要求1所述的树状区块链扩展方法,其特征在于,所述树状区块链包括安全主链和至少一个应用支链;The tree-shaped blockchain expansion method according to claim 1, wherein the tree-shaped blockchain includes a security main chain and at least one application branch chain;
    所述安全主链用于记录所述安全主链的通证转移数据和EDPoS节点协商目标过程数据;The security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
    所述安全主链为所述父链;所述应用支链为所述父链或所述子链。The security main chain is the parent chain; the application branch is the parent chain or the child chain.
  3. 根据权利要求2所述的树状区块链扩展方法,其特征在于,The tree-shaped blockchain expansion method according to claim 2, characterized in that:
    所述安全主链的产生过程包括:The generation process of the security main chain includes:
    设置创世区块;所述创世区块为所述树状区块链的第一个区块;Set a genesis block; the genesis block is the first block of the tree-shaped blockchain;
    将满足主链判定条件的区块构成的链指定为父链;Designate the chain composed of blocks that meet the judgment conditions of the main chain as the parent chain;
    所述主链判定条件为连接在所述创世区块之后且通过预设共识顺序产生;The main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence;
    所述预设共识顺序为EDPoS共识和CPoW共识。The preset consensus sequence is EDPoS consensus and CPoW consensus.
  4. 根据权利要求1所述的树状区块链扩展方法,其特征在于,所述根据所述出块配置参数按照时间先后顺序出块并连接,包括:The tree-shaped blockchain expansion method according to claim 1, wherein the generating and connecting blocks in chronological order according to the block generation configuration parameters comprises:
    获取目标数量的父链的抵押通证;Obtain the mortgage token of the parent chain of the target number;
    将所述抵押通证存储于目标地址并冻结;Store the mortgage token in the target address and freeze it;
    获取子链的区块高度;Get the block height of the child chain;
    根据所述区块高度按照预设解冻规则对抵押通证进行解冻。According to the block height, the mortgage token is thawed according to the preset thawing rule.
  5. 根据权利要求2所述的树状区块链扩展方法,其特征在于,所述安全 主链的交易机制包括:EDPoS节点投票交、EDPoS节点登记交易、CPoW出块奖励交易。The tree-shaped blockchain expansion method according to claim 2, wherein the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
  6. 一种树状区块链扩展模块,其特征在于,包括:A tree-shaped blockchain extension module, which is characterized in that it includes:
    发送模块,用于向预先指定的父链发送分叉交易;The sending module is used to send the fork transaction to the pre-designated parent chain;
    指定模块,用于指定锚定区块,以标定所述锚定区块后的所有子链有效;The designated module is used to designate the anchor block so that all the sub-chains after the anchor block are valid;
    获取模块,用于获取出块配置参数;所述出块配置参数包括区块产生间隔、通证总量、通证分布、出块奖励和增发方式;The obtaining module is used to obtain block generation configuration parameters; the block generation configuration parameters include block generation interval, total number of tokens, distribution of tokens, block generation rewards and additional issuance methods;
    处理模块,用于根据所述出块配置参数按照时间先后顺序出块并连接。The processing module is configured to produce blocks and connect them in chronological order according to the block production configuration parameters.
  7. 根据权利要求6所述的树状区块链扩展模块,其特征在于,所述树状区块链包括安全主链和至少一个应用支链;The tree-shaped blockchain expansion module according to claim 6, wherein the tree-shaped blockchain includes a security main chain and at least one application branch chain;
    所述安全主链用于记录所述安全主链的通证转移数据和EDPoS节点协商目标过程数据;The security main chain is used to record the token transfer data of the security main chain and EDPoS node negotiation target process data;
    所述安全主链为所述父链;所述应用支链为所述父链或所述子链。The security main chain is the parent chain; the application branch is the parent chain or the child chain.
  8. 根据权利要求7所述的树状区块链扩展模块,其特征在于,The tree-shaped blockchain expansion module according to claim 7, wherein:
    所述安全主链的产生装置包括:The generating device of the security main chain includes:
    设置单元,用于设置创世区块;所述创世区块为所述树状区块链的第一个区块;The setting unit is used to set a genesis block; the genesis block is the first block of the tree-shaped blockchain;
    指定单元,用于将满足主链判定条件的区块构成的链指定为父链;The designated unit is used to designate the chain composed of blocks that meet the judgment conditions of the main chain as the parent chain;
    所述主链判定条件为连接在所述创世区块之后且通过预设共识顺序产生;The main chain judgment condition is that it is connected after the genesis block and is generated through a preset consensus sequence;
    所述预设共识顺序为EDPoS共识和CPoW共识。The preset consensus sequence is EDPoS consensus and CPoW consensus.
  9. 根据权利要求6所述的树状区块链扩展模块,其特征在于,所述处理模块,包括:The tree-shaped blockchain expansion module according to claim 6, wherein the processing module comprises:
    第一获取单元,用于获取目标数量的父链的抵押通证;The first obtaining unit is used to obtain the mortgage token of the parent chain of the target quantity;
    冻结单元,用于将所述抵押通证存储于目标地址并冻结;The freezing unit is used to store and freeze the mortgage token in the target address;
    第二获取单元,用于获取子链的区块高度;The second obtaining unit is used to obtain the block height of the sub-chain;
    解冻单元,用于根据所述区块高度按照预设解冻规则对抵押通证进行解冻。The unfreezing unit is used to unfreeze the mortgage token according to the block height according to the preset unfreezing rule.
  10. 根据权利要求7所述的树状区块链扩展模块,其特征在于,所述安全主链的交易机制包括:EDPoS节点投票交、EDPoS节点登记交易、CPoW出块奖励交易。The tree-shaped blockchain expansion module according to claim 7, wherein the transaction mechanism of the secure main chain includes: EDPoS node voting, EDPoS node registration transaction, and CPoW block production reward transaction.
PCT/CN2020/095083 2020-05-21 2020-06-09 Method and apparatus for expanding tree block chain WO2021232509A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010436152.1A CN111598569B (en) 2020-05-21 2020-05-21 Tree block chain expansion method and device
CN202010436152.1 2020-05-21

Publications (1)

Publication Number Publication Date
WO2021232509A1 true WO2021232509A1 (en) 2021-11-25

Family

ID=72189169

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/095083 WO2021232509A1 (en) 2020-05-21 2020-06-09 Method and apparatus for expanding tree block chain

Country Status (2)

Country Link
CN (1) CN111598569B (en)
WO (1) WO2021232509A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850446A (en) * 1996-06-17 1998-12-15 Verifone, Inc. System, method and article of manufacture for virtual point of sale processing utilizing an extensible, flexible architecture
CN108280646A (en) * 2018-01-19 2018-07-13 中国科学院软件研究所 Block chain group chain method based on alliance's chain and block catenary system
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
CN111062596A (en) * 2019-12-09 2020-04-24 华北电力大学 Distributed generation energy management method based on block chain double-chain structure

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10812274B2 (en) * 2015-05-07 2020-10-20 Blockstream Corporation Transferring ledger assets between blockchains via pegged sidechains
US11321680B2 (en) * 2017-04-26 2022-05-03 Ashish Kumar System and method for processing and management of transactions using electronic currency
CN109426952B (en) * 2017-08-22 2021-06-01 汇链丰(北京)科技有限公司 Block chain structure
US10630463B2 (en) * 2018-02-26 2020-04-21 Ca, Inc. Meta block chain
CN108846667A (en) * 2018-04-23 2018-11-20 上海分布信息科技有限公司 A kind of logical card regulation method based on block chain and logical card regulator control system
CN110807623A (en) * 2018-08-06 2020-02-18 触信(厦门)智能科技有限公司 Block chain three-party intelligent contract transaction method and system
CN109461075A (en) * 2018-10-09 2019-03-12 哈希(武汉)网络科技有限公司 A kind of block catenary system
CN109461076A (en) * 2018-10-09 2019-03-12 哈希(武汉)网络科技有限公司 A kind of block chain method of commerce
US20200127844A1 (en) * 2018-10-23 2020-04-23 Vopy Technology As Apparatus, systems, and methods for stemmed blockchain operation with secured participant identities
CN109635165A (en) * 2018-12-06 2019-04-16 北京磁云数字科技有限公司 Data summarization method, device, equipment and medium based on tree-like block chain network
CN109409899B (en) * 2018-12-14 2022-05-10 致信互链(北京)科技有限公司 Transaction verification method, device and system
CN109951474B (en) * 2019-03-15 2021-07-30 杭州云象网络技术有限公司 Method for realizing block chain common identification block
CN110471984B (en) * 2019-07-15 2020-08-25 阿里巴巴集团控股有限公司 Service processing method and device based on block chain and electronic equipment
CN110505223B (en) * 2019-08-15 2021-09-14 腾讯科技(深圳)有限公司 Block chain multi-chain management method, block chain multi-chain management device and computer readable storage medium
CN110365493B (en) * 2019-08-22 2020-09-11 电子科技大学 Multi-form derivable annular block chain construction method
CN110941673B (en) * 2019-11-26 2023-03-24 中国人民解放军战略支援部队信息工程大学 Block chain data structure and task processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5850446A (en) * 1996-06-17 1998-12-15 Verifone, Inc. System, method and article of manufacture for virtual point of sale processing utilizing an extensible, flexible architecture
CN108280646A (en) * 2018-01-19 2018-07-13 中国科学院软件研究所 Block chain group chain method based on alliance's chain and block catenary system
CN109033422A (en) * 2018-08-08 2018-12-18 云南天之游科技股份有限公司 A kind of method, apparatus and block chain generating block chain
CN111062596A (en) * 2019-12-09 2020-04-24 华北电力大学 Distributed generation energy management method based on block chain double-chain structure

Also Published As

Publication number Publication date
CN111598569A (en) 2020-08-28
CN111598569B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
US10795857B2 (en) Blockchain system and method thereof
CN110868440B (en) Block chain male chain
Aoki et al. Simblock: A blockchain network simulator
Wu et al. Hybrid consensus algorithm optimization: A mathematical method based on POS and PBFT and its application in blockchain
CN107733651B (en) Block chain generation method, node and system
EP4209980A1 (en) Computer-implemented system and method for managing a large distributed memory pool in a blockchain network
CN109327459B (en) Consensus method for union block chain network
TW201943250A (en) Cross-blockchain authentication method and apparatus, and electronic device
TW202145759A (en) High throughput blockchain consensus systems, computer-implemented methods and non-transitory computer readable medium with low finalization time
WO2021218459A1 (en) Cross-chain interaction method, apparatus and system
WO2020118862A1 (en) Decentralized chip research and development transaction data storage method and system
US20210233068A1 (en) Settlement system, settlement method, user device, and settlement program
US20230273912A1 (en) Data processing method and apparatus for blockchain network, computer device, and computer-readable storage medium
CN111612613A (en) Block chain network with centralized system
CN110611701A (en) Parameter configuration and transaction processing method based on block chain
US20220237153A1 (en) Synchronization processing method and related apparatus
WO2022076429A1 (en) Methods and apparatus for a distributed database within a network
WO2021232509A1 (en) Method and apparatus for expanding tree block chain
CN112163950A (en) Block chain network construction method and system convenient for expansion and node resource reuse and terminal equipment
CN111491020A (en) Data processing method, data processing device, computer equipment and storage medium
CN116938523A (en) Blockchain system, operating method, electronic device and storage medium
CN111309809A (en) Block header storage method and equipment thereof
WO2021232508A1 (en) Blockchain expansion method, blockchain node, and blockchain system
WO2022213706A1 (en) Block data structures of blockchain, and storage medium and electronic device
CN115664724A (en) Consensus method in block chain system, block chain system and consensus node

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20936990

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20936990

Country of ref document: EP

Kind code of ref document: A1