WO2020015668A1 - 区块链的存储方法和区块链的节点 - Google Patents

区块链的存储方法和区块链的节点 Download PDF

Info

Publication number
WO2020015668A1
WO2020015668A1 PCT/CN2019/096316 CN2019096316W WO2020015668A1 WO 2020015668 A1 WO2020015668 A1 WO 2020015668A1 CN 2019096316 W CN2019096316 W CN 2019096316W WO 2020015668 A1 WO2020015668 A1 WO 2020015668A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
node
reserved
transaction
blockchain
Prior art date
Application number
PCT/CN2019/096316
Other languages
English (en)
French (fr)
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 WO2020015668A1 publication Critical patent/WO2020015668A1/zh

Links

Images

Classifications

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

Definitions

  • the present application relates to a storage method of a blockchain and a node of the blockchain.
  • blockchain technology has significant features such as distributed highly redundant storage, time series data, immutability and forgery, decentralized credit, smart contracts, security and privacy protection.
  • Applications in the fields of economics, finance and social systems are developing at a high speed. Among them are digital currency, data storage, data verification, financial transactions, asset management and election voting.
  • the purpose of this application is to provide a storage method of a blockchain and a node of the blockchain.
  • a method for storing a blockchain including: storing a block header of a complete blockchain; and storing a block obtained by downsampling a block body of the complete blockchain according to a regular rule body.
  • a blockchain node including a block header and a block body, the block header includes a block header of a complete blockchain, and the block body includes a complete The block body obtained by downsampling the block body of the blockchain.
  • Figure 1 shows the blockchain structure of a distributed accounting system.
  • Figure 2 shows a schematic diagram of a block body.
  • Figure 3 shows a schematic view of transactions stored in a block.
  • FIG. 4 shows a schematic diagram of a storage method of a blockchain according to an embodiment of the present application.
  • FIG. 5 shows a schematic diagram of a node of a blockchain according to an embodiment of the present application.
  • FIG. 6 illustrates an embodiment of determining a reservation set according to a regular rule.
  • FIG. 7 shows a schematic diagram of a probability density function of a survival block according to an embodiment of the present application.
  • FIG. 8 shows a schematic diagram of a probability distribution that each block is used by a new transaction according to an embodiment of the present application.
  • FIG. 9 shows a schematic diagram of a node of a blockchain according to an embodiment of the present application.
  • Blockchain is a decentralized shared ledger that cannot be tampered with or forged by a cryptographic method to combine data blocks into a specific data structure in a chronological order. Simple, sequential data that can be verified within the system.
  • the generalized blockchain technology is a brand-new technology that uses a crypto-chain block structure to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses automated script code (smart contracts) to program and manipulate data. Decentralized infrastructure and distributed computing paradigm.
  • the blockchain uses the encrypted chain block structure to verify and store data, the storage of the blockchain is highly redundant, and each full node must independently store a complete blockchain data.
  • FIG. 1 shows the blockchain structure of a distributed accounting system.
  • a complete blockchain consists of N blocks that are stored sequentially from block 1 to block N.
  • Each block consists of a block body and a block header.
  • the block body of each block contains transactions and the merkle tree generated by these transactions.
  • the block header of each block stores data such as the hash value of the block header of the previous block of the block and the Merkle root of the merkle tree in the block body of the block.
  • the block body and the block header are closely linked together by storing the block Merkle root in the block header. This constitutes a complete blockchain.
  • the merkle tree is generated by generating transaction hash identifiers. These transaction identifiers are paired and hashed to obtain the hash value of the paired data. The process of pairing and hashing is repeated until the only hash remains. Value, this hash is the merkle root of a merkle tree.
  • Figure 2 shows a schematic diagram of a block body. It contains four transactions (T1, T2, T3, T4) and the merkle tree generated by these transactions.
  • T1, T2, T3, T4 When generating a block, first perform hash operations on T1, T2, T3, and T4 respectively to obtain their hash identifiers: hash 0-0, hash 0-1, hash 1-0, and hash 1-1. . These transaction identifiers are then paired and hashed. The hash identifier hash 0-0 and hash 0-1 are hashed together to obtain hash 0, and hash 1-0 and hash 1-1 are hashed together to obtain hash 1. Repeat the pairing hash process as above, pair hash 0 and hash 1 to get the merkle root, pack the hash value and transaction data other than the merkle root to form a block body.
  • FIG 3 shows a schematic view of transactions stored in a block.
  • Transactions include inputs and outputs.
  • the output of a transaction includes the output of used transactions and the output of unused transactions (Unspent Transaction Outputs, UTXOs).
  • UTXOs Unspent Transaction Outputs
  • a legal new transaction that is, quoting UTXOs of some existing transactions as input to the transaction and generating new output. Only minting transactions are required as special transactions to generate new bitcoins.
  • Figure 3 shows the generation and use of 7 transactions (transactions 0-6).
  • One bit smart equals 0.00000001 Bitcoins.
  • Transaction 0 refers to the UTXOs of a previous transaction as input 0, and input 0 contains 100kbits.
  • Transaction 0 generates two outputs, output 0 and output 1, which include 40k and 50k bitcons respectively. The difference between the input and output is the accounting fee paid for the transaction, and transaction 0 includes the 10k accounting fee.
  • Transaction 1 refers to the output 0 generated by transaction 0 as its own input 0 and generates its own output 0. The output 0 of transaction 1 contains 30kbit Satoshi, and at the same time, 10kbit Satoshi is not used as an output, but as an accounting fee.
  • Transactions 2-6 reference the output of previous transactions as their own inputs and generate their own outputs.
  • the nodes in the network will check if the new transaction is legal after receiving the new transaction information. Specifically, check whether the input referenced by the transaction is UTXOs, that is, the latest transaction status. In addition, you can check whether the address is legal, the originator of the transaction is the legal owner of the input address, and so on. It also checks whether the transaction has been processed and whether the sum of the inputs is greater than the sum of the outputs. If the new transaction check passes, the new transaction is marked as a legitimate unconfirmed new transaction and broadcasted within the network.
  • a transaction recorder is required to write the new transaction to the blockchain, that is, to make the new transaction a part of the new block.
  • These transaction recorders use the new transactions to generate a merkle tree, add the corresponding parameters of the block header, package the new transactions into blocks, and make the newly packaged blocks meet the consensus mechanism through calculations and other operations, and broadcast the new blocks. .
  • the node in the network After the node in the network receives the new block (block N + 1), it will check the content of the block, that is, the legality of the new transaction in the block. In addition, the node can also check the format of the block, including data structure syntax, consensus mechanism, time, block size, and whether the coin transaction is the first transaction.
  • the new block check is passed, the new block N + 1 is marked as a legitimate new block and an attempt is made to connect the new block N + 1 to the existing blockchain. If the connection is successful, block N + 1 is taken as part of the current blockchain, and block N + 1 is broadcast in the network.
  • nodes Under the blockchain architecture, the prior art believes that to support the verification and broadcast of all new transactions, nodes must store all historical transaction states of the blockchain, that is, full nodes. Because the full node downloads and verifies the block from the genesis block to the recently discovered block, these blocks can be strictly composed into a complete blockchain through the hash value and merkle root of the previous block header in each block. To ensure the effectiveness of the blockchain.
  • the full node stores all the historical transaction status of a real blockchain, which can verify the legitimacy of all new transactions and has a high degree of security.
  • the block data of the Bitcoin network increases by about 50GB every year, and the accumulated block data is nearly 140GB.
  • Bitcoin's data volume has grown rapidly from less than 1GB in 2009 to nearly 140GB in 2017.
  • Light nodes In which only the block header is stored. However, light nodes cannot perform transactions and block broadcasts. Light nodes can only verify the validity and security of a transaction with the support of a reliable full node. Although the light node reduces the storage capacity, the price paid is that the working capacity of the light node depends on the full node, which increases the workload of the full node, resulting in the occupation of bandwidth resources, and also reduces the security of smart devices using the light node .
  • a method for storing a blockchain is disclosed. As shown in Figure 4, in S100, the block header of the complete blockchain is stored. In S200, a block body obtained by downsampling a block body of a complete block chain according to a regular rule is stored.
  • a method for storing a blockchain including: storing a block header of a complete blockchain; and a block body storing a reserved set, wherein according to each The probability distribution of blocks used by new transactions determines the reserved set of blocks obtained by downsampling the blocks of the complete blockchain.
  • the regular rules may include the probability distribution that each block in the blockchain is used by a new transaction.
  • a node of a blockchain includes a block header and a block body.
  • the block header of this node includes the block header of the complete blockchain.
  • the block body of this node includes a block body obtained by downsampling a block body of a complete block chain according to a regular rule.
  • a node of a blockchain is also disclosed.
  • the node includes a block header and a block body.
  • the block header of this node includes the block header of the complete blockchain.
  • the block body of this node includes a block body of a reserved set, wherein the reserved set is a region obtained by downsampling the block body of the complete block chain according to the probability distribution of each block in the block chain used by a new transaction A reserved collection of blocks.
  • the blocks with the latest transaction status are the blocks needed for transaction verification and broadcasting in the future.
  • the latest transaction status may be, for example, the output UTXOs of the aforementioned unused transaction, or the account balance.
  • the probability distribution of each block in the blockchain used by new transactions is determined by the distribution law of the latest transaction status.
  • a "survival block” is defined, which means that when a certain transaction state in the blockchain is generated from The number of blocks that the most recent transaction state has experienced until it was later changed by the transaction (ie, becoming a non-latest transaction state).
  • the existence block of the transaction state reflects the inherent regularity of the transaction state. For a certain network, although the distribution of the latest transaction status will change as the block height increases, the distribution of transaction status survival blocks will not change, which means that transaction status survival blocks are more universally meaningful . Therefore, the probability that each block is used by a new transaction can be obtained by the probability density function of the survival block of the transaction state.
  • FIG. 6 illustrates an embodiment of determining a reservation set according to a regular rule.
  • the probability density function f (x) of the survival block in the transaction state is obtained according to the statistical distribution probability of the survival block x in the transaction state.
  • the living block x of each transaction state can be counted to obtain the statistical distribution probability of the living block of the transaction state.
  • the probability distribution u (d) of each block including the latest transaction state is calculated according to the probability density function f (x) of the survival block x of the transaction state.
  • a reserved set is determined according to the probability distribution u (d) of each block containing the latest transaction status and a preset downsampling threshold.
  • the statistical distribution probability of the living block x in the transaction state Obtain the probability density function f (x) of the living block in the transaction state, and calculate each block containing the latest transaction state according to the probability density function f (x) of the living block x in the transaction state.
  • Probability distribution u (d) For example, when the number of transactions in each block is uniform, u (d):
  • the block depth is the position where a block is located from the latest block, and the latest block depth is 1.
  • the preset down-sampling threshold may be a preset information entropy threshold H t .
  • the block entropy function based on the block depth can be obtained according to the probability distribution u (d) of each block containing the latest transaction status; and the range of reserved block depth can be calculated according to the information entropy function and the preset information entropy threshold H t to determine The reserved set.
  • P (A) the probability of P (A) being A. The higher the probability that the block contains the latest transaction status, the higher the probability of A, and the greater the information entropy.
  • the reserved set may be obtained by: obtaining an information entropy function H (d) of a block based on a block depth d according to the probability distribution of each block used by a new transaction; according to the information
  • the entropy function H (d) and the preset information entropy threshold H t calculate the range of the reserved block depth to determine the reserved set, that is, the range of all reserved block depths that satisfy H (d) ⁇ H t , and determine the reserved set according to the range D; stores all block headers of the complete blockchain and a block body that retains set D. In this way, a new type of downsampling node (DS node) according to the present application can be obtained.
  • DS node downsampling node
  • the DS node generates the latest transaction status pool according to the stored block of the reserved set. DS nodes can verify and broadcast new transactions and new blocks based on the latest transaction status pool generated.
  • the DS node When the DS node is working, for example, when a DS node receives a new transaction, the DS node checks whether the input is in the latest transaction status pool generated by the DS node. In addition, it can be understood that the DS node can also check whether the transaction address is valid and the sender is the legal owner of the input address. The DS node can also check whether the transaction has been processed, whether the input of the transaction is greater than the sum of the outputs, and so on. If the check passes, the DS node marks the new transaction as an unprocessed legitimate transaction for broadcast.
  • a DS node When a DS node receives a newly generated block, it will check the validity of all transactions within the block. If the check passes, the DS node marks the new block as a legitimate block for broadcasting.
  • the data stored by each DS node according to this application can be reduced according to the requirements of the application environment. sampling.
  • N t is the number of historical transaction state of complete block chain
  • N u is the number of the latest state of complete transaction block chain
  • N st and N su is the number of historical transaction state DS node
  • the correct rate of DS node to verify and broadcast the new transaction is N su / N u . If the number of historical transaction states in each block is the same, then,
  • is the number of reserved block bodies, that is, the cardinality of the reserved set.
  • a node's storage efficiency can be characterized by broadcasting a ratio R of correctness to storage capacity:
  • the selection of blocks in the down-sampling block chain storage method is a one-time job, because the reserve set D is stable although the block depth is constantly changing. Therefore, the complexity of the downsampling block chain storage method depends on the number of downloaded blocks. Only full nodes need to download ⁇ DS blocks with proper H t .
  • UTXOs represent the latest transaction status, and nodes use the UTXOs pool to verify new transactions.
  • UTXOs Through the study of UTXOs, it can be found that the distribution of UTXOs conforms to a certain law. It can count the survival blocks x of each UTXOs to obtain the statistical distribution probability of the survival blocks of UTXOs.
  • the reserved set of the block body to be downsampled is obtained by: obtaining the block-based information entropy function H (d) of the block according to the probability distribution of each block used by a new transaction;
  • the information entropy function H (d) and the preset information entropy threshold H t are used to calculate the range of the reserved block depth to determine the reserved set. That is, the solution H (d) ⁇ H t is obtained to obtain the range of depth d.
  • Set D stores all block headers of the complete blockchain and the block body that holds set D. In this way, a downsampling node (DS node) according to the present application can be obtained.
  • the DS node checks whether the input is in the latest transaction status pool generated by the DS node, whether the transaction is legal, including whether the address is valid, and the sender is the legal owner of the input address. In addition, the DS node also checks whether the transaction has been processed and whether the input to the transaction is greater than the sum of the outputs. If the check passes, the DS node marks the new transaction as an unprocessed legitimate transaction for broadcast.
  • a DS node When a DS node receives a newly generated block, it will check the validity of the transactions within the verification block, the data structure, the consensus mechanism, the block time, and the coin transaction. If the check passes, the DS node marks the new block as a legitimate block for broadcasting.
  • the DS node has a similar broadcast accuracy rate as the full node, with a higher R than the full node.
  • Table 2 The average number of downloaded blocks for full nodes and DS nodes
  • a DS node with an appropriate downsampling rate has only a small portion of the number of blocks that a full node needs to download.
  • the probability distribution of each block in the blockchain being used by a new transaction can be different.
  • the probability density function of the survival block x of the transaction status of other blockchain networks may change, so as to obtain the corresponding probability distribution u (d) of each block used by the new transaction.
  • the downsampling blockchain storage method and node working method are the same as the above-mentioned blockchain storage method.
  • the living block x of each transaction state can be counted to obtain the statistical distribution probability of the living block of the transaction state, and obtained according to the statistical distribution probability of the living block x of the transaction state.
  • the reserved set of the block body to be downsampled is obtained by: obtaining the block-based information entropy function H (d) of the block according to the probability distribution of each block used by a new transaction;
  • the information entropy function H (d) and the preset information entropy threshold H t are used to calculate the range of the reserved block depth to determine the reserved set. That is, the solution H (d) ⁇ H t is obtained to obtain the range of depth d.
  • Set D stores all block headers of the complete blockchain and the block body that holds set D. In this way, a downsampling node (DS node) according to the present application can be obtained.
  • the preset down-sampling threshold is a preset down-sampling rate.
  • the cardinality of the reserved set can be calculated according to the downsampling rate and the total number of blocks; the range of the depth of the reserved block is calculated according to the cardinality of the reserved set and the probability distribution that each block contains the latest transaction status to determine the reserved set.
  • the downsampling rate can be preset to M.
  • the cardinality ⁇ of the reserved set is calculated according to the downsampling rate M and the total number of blocks. Calculate the range of the reserved block depth based on the cardinality of the reserved set ⁇ and the probability distribution u (d) of each block used by the new transaction to determine the reserved set D. Stores all the block headers of the complete blockchain and the block body that retains set D. In this way, a downsampling node (DS node) according to the present application can be obtained.
  • DS node downsampling node
  • UTXOs represent the latest transaction status, and nodes use the UTXOs pool to verify new transactions.
  • the survival block x of each UTXOs can be counted to obtain the statistical distribution probability of the survival blocks of UTXOs.
  • the probability density function f (x) of the survival blocks of UTXOs is obtained, as shown in the figure. 7:
  • the probability u (d) of a block with a block depth d containing all UTXOs is As shown in Figure 8:
  • the DS node checks whether the input is in the latest transaction status pool generated by the DS node and whether the transaction is legal, including whether the address is valid and the sender is the legal owner of the input address. In addition, the DS node also checks whether the transaction has been processed and whether the input to the transaction is greater than the sum of the outputs. If the check passes, the DS node marks the new transaction as an unprocessed legitimate transaction for broadcast.
  • a DS node When a DS node receives a newly generated block, it will check the validity of the transactions in the verification block, the data structure, the consensus mechanism, the block time, and the coin transaction. If the check passes, the DS node marks the new block as a legitimate block for broadcasting.
  • the DS node has a similar broadcast accuracy rate as the full node, with a higher R than the full node.
  • Table 4 shows the average number of downloaded blocks of the full node and the DS node.
  • the DS node with the appropriate downsampling rate is only 1 / M of the average number of downloaded blocks of the full node.
  • a non-retained set is a set of blocks other than a reserved set of blocks of a complete blockchain.
  • a method for storing a blockchain including: storing a block header of a complete blockchain; and a block body storing a reserved set and a non-reserved set area selected according to a random rule. Block.
  • a node of a blockchain includes a block header and a block body.
  • the block header of this node includes the block header of the complete blockchain.
  • the block body of this node includes a block body obtained by downsampling a block body of a complete block chain according to a regular rule, and a block body of a non-retained set selected according to a random rule.
  • a non-repeating random sequence j 1 , j 2 , ... j L of length L can be randomly generated from a non-reserved set.
  • J 1 is schematically shown in FIG.
  • the DS node not only stores the reservation
  • the block body of the set also stores the block body of the non-reserved set with a block depth of j 1 , j 2 ,... J L.
  • the latest transaction status pool may be generated according to the stored blocks of the reserved set and the stored blocks of the non-reserved set selected by random rules. This can verify the legitimacy of the new transaction, with independent verification and broadcasting capabilities. At the same time, because it has L randomly stored non-retained sets of blocks, it can effectively resist guessing attacks by attackers.

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种区块链的存储方法和区块链的节点,所述存储方法包括:存储完整区块链的区块头(S100);以及存储根据规律规则对完整区块链的区块体进行降采样得到的区块体(S200)。所述方法克服了现有技术对区块链架构认识的局限,提出了一种区块链的存储方法和新型的节点,不仅能够降低全节点存储冗余,而且具有验证和广播能力。

Description

区块链的存储方法和区块链的节点
相关申请的交叉引用
本申请要求于2018年7月20日递交于中国国家知识产权局(CNIPA)的、申请号为201810804118.8、发明名称为“区块链的存储方法和区块链的节点”的中国发明专利申请的优先权和权益,该中国发明专利申请通过引用整体并入本文。
技术领域
本申请涉及一种区块链的存储方法和区块链的节点。
背景技术
随着分布式***的广泛应用,区块链技术由于其具有分布式高冗余存储、时序数据、不可篡改和伪造、去中心化信用、智能合约、安全和隐私保护等显著的特点,因而在经济、金融和社会***领域的应用高速发展,其中代表性的有数字货币、数据存储、数据鉴证、金融交易、资产管理和选举投票等。
随着区块链技术的进步和发展,区块膨胀问题已经成为制约区块链效率和应用范围的主要问题之一。区块链要求每个全节点都备份一份完整的区块链数据,然而随着区块链的广泛应用和交易量的高速增长,对于每个节点而言,存储日益增长的大量数据是极为困难的。
尤其是对于移动终端,随着智能设备的增多,海量数据不断产生,重要数据的传输消耗了大量的带宽、时间和能量,因此大量设备之间需要通过分布式自组织的模式管理。区块链自身分布式和抗攻击的特点可以很好的使用到这一场景中。而减少单个节点需要存储的区块链数据对于区块链在智能设备上的自由使用有极为重要的意义。
发明内容
本申请的目的是提供一种区块链的存储方法和区块链的节点。
根据本申请的一个方面,公开了一种区块链的存储方法,包括:存储完整区块链的区块头;以及存储根据规律规则对完整区块链的区块体进行降采样得到的区块体。
根据本申请的一个方面,公开了一种区块链的节点,包括区块头和区块体,所述区块头包括完整区块链的区块头,以及所述区块体包括根据规律规则对完整区块链的区块体进行降采样得到的区块体。
根据本申请,克服了现有技术对区块链架构认识的局限,提出了一种区块链的存储方法和新型的节点,不仅能够降低全节点存储冗余,而且具有验证和广播能力。
附图说明
图1示出了一种分布式记账***的区块链结构。
图2示出了一种区块体的示意图。
图3示出了区块体中存储的交易的示意图。
图4示出了根据本申请的一种实施方式的区块链的存储方法的示意图。
图5示出了根据本申请的一种实施方式的区块链的节点的示意图。
图6示出了根据规律规则确定保留集合的一种实施方式。
图7示出了根据本申请的一种实施方式的生存区块的概率密度函数的示意图。
图8示出了根据本申请的一种实施方式的每个区块被新交易使用的概率分布的示意图。
图9示出了根据本申请的一种实施方式的区块链的节点的示意图。
具体实施方式
下面参照附图对本申请公开的区块链的存储方法和区块链的节点进行详细说明。为简明起见,本申请各实施方式的说明中,相同或类似的装置使用相同或相似的附图标记。
区块链是一种按照时间顺序将数据区块以链条的方式组合成特定数 据结构,并以密码学方式保证的不可篡改和不可伪造的去中心化共享总账(Decentralized shared ledger),能够安全存储简单的、有先后关系的、能在***内验证的数据。广义的区块链技术则是利用加密链式区块结构来验证与存储数据、利用分布式节点共识算法来生成和更新数据、利用自动化脚本代码(智能合约)来编程和操作数据的一种全新的去中心化基础架构与分布式计算范式。
由于区块链使用加密链式区块结构来验证与存储数据,因此区块链的存储具有高度的冗余性,每个全节点都必须独立存储一份完整的区块链数据。
例如,分布式记账***是通过区块链网络提供一个公共可见的记账本,用来记录发生过的历史交易状态。图1显示了一种分布式记账***的区块链结构。如图1所示,一个完整的区块链由从区块1到区块N顺序存储的N个区块组成。每个区块包括区块体和区块头两个部分。每一个区块的区块体中包含了交易以及由这些交易生成的merkle树。每一个区块的区块头存储有该区块的前一个区块的区块头的哈希值和该区块的区块体中merkle树的Merkle根等数据。通过在区块的区块头中存储前一个区块头的哈希值,将不同区块顺序的链接在一起。通过在区块头中存储区块Merkle根将区块体和区块头紧密链接在一起。由此构成一个完整的区块链。
merkle树的生成方式为生成交易的哈希标识符,将这些交易标识符通过配对、哈希,得到配对后数据的哈希值,不断重复配对、哈希的过程,直到剩下唯一一个哈希值,这个哈希值是一个merkle树的merkle根。
图2示出了一种区块体的示意图。其中,包含有四笔交易(T1,T2,T3,T4)和由这些交易生成的merkle树。生成区块体时先分别对T1,T2,T3,T4进行哈希运算,得到它们的哈希标识符哈希0-0,哈希0-1,哈希1-0,哈希1-1。再对这些交易标识符两两配对,进行哈希运算。其中哈希标识符哈希0-0和哈希0-1共同进行哈希运算,得到哈希0,哈希1-0和哈希1-1共同进行哈希运算得到哈希1。再重复如上配对哈希过程,对哈希0和哈希1配对哈希,得到merkle根,将除merkle根以外的哈希值和交易数据打包,就构成了一个区块体。
图3示出了区块体中存储的交易的示意图。交易包括输入和输出。以比特币网络为例,交易的输出包括已经使用的交易的输出和未经使用的交易的输出(Unspent Transaction Outputs,UTXOs)。一笔合法的新交易,即引用某些已存在交易的UTXOs,作为交易的输入,并生成新的输出。只有铸币交易作为产生新比特币的特殊交易不需要输入。图3给出了7笔交易(交易0-6)的生成和使用示意图,一比特聪等于0.00000001比特币。交易0引用之前某笔交易的UTXOs作为输入0,输入0包含100k比特聪。交易0同时生成了输出0和输出1两个输出,这两个输出分别包含40k和50k比特聪,输入和输出之间的差值为交易付出的记账费,交易0包含10k记账费。交易1引用交易0产生的输出0作为自己的输入0,并生成自已的输出0,交易1的输出0包含30k比特聪,同时也有10k比特聪没有作为输出,而是作为记账费。交易2-6分别引用之前交易的输出作为自己的输入,并生成自己的输出。当前示意中,交易3的输出0和交易6的输出0没有被其他交易引用为输入,因此交易3和交易6当前有20k和10k的UTXOs,可以被之后产生的交易引用为输入。可以看出,UTXOs是作为可以被使用的余额而存在的。
当用户向网络发送了一笔新交易,网络中的节点收到新交易信息后,将检查新交易是否合法。具体地,检查交易引用的输入是否是UTXOs,即最新的交易状态。此外,还可以检查地址是否合法、发起交易者是输入地址的合法拥有者等。还将检查交易是否已经处理过以及输入之和是否大于输出之和。如果新交易检查通过,则将新交易标记为合法的未确认新交易,并在网络内进行广播。
当网络中的节点验证并广播上述新交易后,需要有交易记录者将新交易写到区块链中,也就是使新交易成为新的区块中的一部分。这些交易记录者用新交易生成merkle树,添加区块头的相应参数,将新交易打包成区块,并通过计算等操作,使新打包的区块满足共识机制,并将新的区块广播出去。
网络中的节点收到新区块(区块N+1)后,将检查区块的内容也就是区块内的新交易的合法性。此外,节点还可以检查区块的格式,包括数据结构语法、共识机制、时间、区块大小和铸币交易是否是第一个交 易等。
如果新区块检查通过,则将新区块N+1标记为合法的新区块,并尝试将新区块N+1连接到现存的区块链。如果连接成功,就将区块N+1作为当前区块链的一部分,并在网络内对区块N+1进行广播。
在区块链架构下,现有技术认为若要支持所有新交易的验证和广播,节点必须存储区块链所有历史交易状态,即全节点。因为全节点下载和验证了从创世区块到最近发现的区块,因此可以通过每个区块中前一个区块头的哈希值和merkle根将这些区块严格的组成完整的区块链,确保区块链的有效性。全节点存储了一个真实区块链的所有历史交易状态,可以验证所有新交易的合法性,具有高度的安全性。
但保证高度安全性的同时也带来了存储的高度冗余。根据目前的交易量,比特币网络的区块数据每年增加50GB左右,而已经累积的区块数据近140GB。例如,比特币的数据量从2009年的不到1GB快速增长到2017年的近140GB。
这些数据不仅需要下载、存储,还需要耗费大量资源进行验证、索引和状态更新,增加了节点的存储开销,降低了处理交易的效率。
还存在一种轻节点,轻节点中只存储区块头。但是,轻节点不能够进行交易和区块广播,轻节点仅能够在可靠全节点的支持下验证某笔交易的有效性和安全性。轻节点虽然降低了存储量,但付出的代价是轻节点的工作能力依赖于全节点,增加了全节点的工作负担,导致带宽资源的占用,同时也降低了使用轻节点的智能设备的安全性。
根据本申请,克服了现有技术对区块链架构认识的局限,提出了一种区块链存储方法和新型的区块链节点,不仅能够降低全节点存储冗余,而且具有验证和广播能力。
根据本申请的一种实施方式,公开了一种区块链的存储方法。如图4所示,在S100中,存储完整区块链的区块头。在S200中,存储根据规律规则对完整区块链的区块体进行降采样得到的区块体。
根据本申请的另一种实施方式,公开了一种区块链的存储方法,包括:存储完整区块链的区块头;以及存储保留集合的区块体,其中,根据区块链中每个区块被新交易使用的概率分布确定对完整区块链的区块体 进行降采样得到的区块体的保留集合。这里,规律规则可以包括区块链中每个区块被新交易使用的概率分布。
根据本申请的一种实施方式,还公开了一种区块链的节点。该节点包括区块头和区块体。该节点的区块头包括完整区块链的区块头。该节点的区块体包括根据规律规则对完整区块链的区块体进行降采样得到的区块体。
根据本申请的另一种实施方式,还公开了一种区块链的节点。如图5所示,该节点包括区块头和区块体。该节点的区块头包括完整区块链的区块头。该节点的区块体包括保留集合的区块体,其中,保留集合是根据区块链中每个区块被新交易使用的概率分布对完整区块链的区块体进行降采样得到的区块体的保留集合。
在区块链中,所有历史交易状态都存储在区块体中,最新交易状态(most recent state)是历史交易状态的一部分。具有最新交易状态的区块是在未来进行交易验证和广播所需要用到的区块。最新交易状态例如可以是前述未经使用的交易的输出UTXOs、或者账户余额等。区块链中每个区块被新交易使用的概率分布由最新交易状态的分布规律确定。
为了表示新交易状态的分布规律(即,每个区块被新交易使用的概率),在本申请中,定义“生存区块”,其表示区块链中的某个交易状态从产生时的最新交易状态到之后被交易变更(即,成为非最新交易状态)为止所经历的区块的数目。交易状态的生存区块反映了交易状态的固有规律规则。对于某个确定网络来说,虽然最新交易状态的分布会随着区块高度的增加而改变,但是交易状态生存区块的分布并不会改变,这意味着交易状态生存区块更具有普遍意义。因而,每个区块被新交易使用的概率可以通过交易状态的生存区块的概率密度函数获得。
图6示出了根据规律规则确定保留集合的一种实施方式。
如图所示,在S210中,根据交易状态的生存区块x的统计分布概率获得交易状态的生存区块的概率密度函数f(x)。可以统计每个交易状态的生存区块x以获得交易状态的生存区块的统计分布概率。
在S220中,根据交易状态的生存区块x的概率密度函数f(x)计算各区块包含最新交易状态的概率分布u(d)。
在S230中,根据所述各区块包含最新交易状态的概率分布u(d)和预设降采样阈值确定保留集合。
交易状态的生存区块x的统计分布概率获得交易状态的生存区块的概率密度函数f(x),根据交易状态的生存区块x的概率密度函数f(x)计算各区块包含最新交易状态的概率分布u(d)。例如,当每个区块中的交易数量是均匀的时候,u(d):
Figure PCTCN2019096316-appb-000001
其中d表示区块深度,如图5所示,区块深度是从最新区块算起某个区块所处的位置,其中最新的区块深度为1。
根据本申请的一种实施方式,预设降采样阈值可以是预设信息熵阈值H t。可以根据各区块包含最新交易状态的概率分布u(d)获得区块基于区块深度的信息熵函数;以及根据信息熵函数和预设信息熵阈值H t计算保留区块深度的范围,以确定所述保留集合。
为了反映每个区块中为验证和广播新交易提供信息量的多少,可以使用信息熵,其定义为H(A)=E[-log P(A)],A是不确定事件区块被新交易使用,P(A)是A的概率。区块中包含最新交易状态的概率越高,A的概率越高,信息熵也就越大。
独立观察每个区块,则当前时刻区块深度d的区块的信息熵如下:
H(A)=E[-log P(A)]=E[-log u(d)]=-u(d)log u(d)=H(d)。
根据本申请的一种实施方式,保留集合可以通过以下方式获得:根据所述每个区块被新交易使用的概率分布获得区块基于区块深度d的信息熵函数H(d);根据信息熵函数H(d)和预设信息熵阈值H t计算保留区块深度的范围以确定保留集合,即所有满足H(d)≥H t的保留区块深度的范围,根据该范围确定保留集合D;存储完整区块链的全部区块头和保留集合D的区块体。这样,就能够获得根据本申请的新型降采样节点(DS节点)。
根据本申请的一种实施方式,DS节点根据所存储的保留集合的区块体生成最新交易状态池。DS节点可以根据所生成最新交易状态池,进行 新交易和新区块的验证和广播。
当DS节点工作时,例如当DS节点收到新的交易时,DS节点检查输入是否在DS节点生成的最新交易状态池中。此外,可以理解,DS节点还可以检查交易地址是否有效、发送人是输入地址的合法所有者等。DS节点还可以检查交易是否已处理完毕,交易的输入是否大于输出的总和等。如果检查通过,则DS节点将新交易标记为未处理的合法交易进行广播。
对于新区块验证和广播也是相似的。当DS节点收到一个新生成的区块时,它将检查验证区块内的所有交易的合法性。如果检查通过,则DS节点将新区块标记为合法区块进行广播。
在使本申请提出的DS节点具有独立的验证和广播能力基础上,为了提高节点的存储效率,适应多变的应用环境,根据本申请每个DS节点存储的数据可以根据应用环境的要求进行降采样。在满足区块链性能和安全的基础上,减少存储开销,提高***的资源利用率。
为了说明本申请的性能,假设N t是完整区块链的历史交易状态的数量,N u是完整区块链的最新交易状态的数量,N st和N su是DS节点的历史交易状态的数量和最新交易状态的数量。那么DS节点验证和广播新交易的正确率为N su/N u。如果每个区块中的历史交易状态的数量是一样的,那么,
Figure PCTCN2019096316-appb-000002
其中
Figure PCTCN2019096316-appb-000003
是DS节点保留集合,δ是保留区块体的数量,也即保留集合的基数。
根据本申请的一种实施方式,可以通过广播正确率与存储量的比R来表征节点的存储效率:
Figure PCTCN2019096316-appb-000004
其中
Figure PCTCN2019096316-appb-000005
是保留集合,δ是保留区块体的数量。
降采样块链存储方法中区块的选择是一次性工作,因为虽然区块深度不断变化,保留集合D是稳定的。因此,降采样块链存储方法的复杂度 取决于下载区块体的数量。具有适当H t的DS节点只有完整节点需要下载区块体中的δ个。
对于比特币网络而言,UTXOs代表最新交易状态,节点使用UTXOs池验证新交易。通过对UTXOs的研究,可以发现UTXOs的分布符合一定的规律,可以统计每个UTXOs的生存区块x以获得UTXOs的生存区块的统计分布概率,根据UTXOs的生存区块x的统计分布概率获得UTXOs的生存区块的概率密度函数f(x):
Figure PCTCN2019096316-appb-000006
(当x<0时,f(x)=0)
其中x是生存区块。
如果认为每个区块中的交易的输出数量是均匀的,根据UTXOs的生存区块x的概率密度函数f(x)计算各区块包含UTXOs的概率分布u(d):
Figure PCTCN2019096316-appb-000007
独立观察每个区块,则当前时刻区块深度d的区块的信息熵如下:
H(d)=E[-log u(d)]=-u(d)log u(d)
在这里,我们可以采用以下步骤对区块链进行降采样:
所述待降采样存储的区块体的保留集合通过以下方式获得:根据所述每个区块被新交易使用的概率分布获得区块基于区块深度的信息熵函数H(d);根据所述信息熵函数H(d)和预设信息熵阈值H t计算保留区块深度的范围以确定保留集合,即解H(d)≥H t得到深度d范围,深度d范围组成的集合为保留集合D;存储完整区块链的全部区块头和保留集合D的区块体。这样,就能够获得根据本申请的降采样节点(DS节点)。
当DS节点收到新的交易时,DS节点检查输入是否在DS节点生成的最新交易状态池中、交易是否合法,包括地址是否有效、发件人是输入地址的合法所有者。除此之外,DS节点还要检查交易是否已处理完毕,交易的输入是否大于输出的总和。如果检查通过,则DS节点将新交易标记为未处理的合法交易进行广播。
对于新生成的区块工作步骤也是相似的。当一个DS节点收到一个新生成的区块时,它将检查验证块内的交易的合法性、数据结构、共识机制、区块时间以及铸币交易。如果检查通过,则DS节点将新区块标记为合法区块进行广播。
为了说明降采样区块链存储方法在比特币上的性能,在表1中,示出了出了全节点、H t=0.23e-27的DS节点的广播正确率和R。
表1全节点、H t=0.23e-27的DS节点的广播正确率和R
  广播正确率 R
DS节点 1.000 0.006
全节点 1 6.049e-6
可以看出,当降采样率小于1024时,DS节点具有与全节点相似的广播正确率,有比全节点更高的R。
在表2中,示出了全节点和DS节点的平均下载块数。
表2全节点和DS节点的平均下载块数
H t 0 0.23e-27 0.22e-06
DS节点 519893 508 127
全节点 519893 - -
可以看出,具有适当降采样率的DS节点只有完整节点需要下载块的数量的很少一部分。
根据区块链类型的不同,区块链中每个区块被新交易使用的概率分布可以不同。例如,除了比特币之外,其他区块链网络的交易状态的生存区块x的概率密度函数可能发生变化,从而获得相应的每个区块被新交易使用的概率分布u(d)。不过,可以理解,其降采样区块链存储方法和节点工作方式和上述区块链存储方法是相同的。
例如,对于某种示例性的区块链网络,可以统计每个交易状态的生存区块x以获得交易状态的生存区块的统计分布概率,根据交易状态的生存区块x的统计分布概率获得交易状态的生存区块的概率密度函数 f(x):
f(x)=e -x
(当x<0时,f(x)=0)
其中x是生存区块。
根据交易状态的生存区块x的概率密度函数f(x)计算各区块包含最新交易状态的概率分布u(d):
Figure PCTCN2019096316-appb-000008
独立观察每个区块,则当前时刻区块深度d的区块的信息熵如下:
H(d)=E[-log u(d)]=-u(d)log u(d)=de -dlog e
在这里,我们可以采用以下步骤对区块链进行降采样:
所述待降采样存储的区块体的保留集合通过以下方式获得:根据所述每个区块被新交易使用的概率分布获得区块基于区块深度的信息熵函数H(d);根据所述信息熵函数H(d)和预设信息熵阈值H t计算保留区块深度的范围以确定保留集合,即解H(d)≥H t得到深度d范围,深度d范围组成的集合为保留集合D;存储完整区块链的全部区块头和保留集合D的区块体。这样,就能够获得根据本申请的降采样节点(DS节点)。
根据本申请的另一种实施方式,预设降采样阈值是预设降采样率。可以根据降采样率和总区块数量计算保留集合的基数;根据保留集合的基数和所述各区块包含最新交易状态的概率分布计算保留区块深度的范围,以确定所述保留集合。
例如,可以预设降采样率为M。根据降采样率M和总区块数量计算保留集合的基数δ。根据保留集合的基数δ和每个区块被新交易使用的概率分布u(d)计算保留区块深度的范围以确定保留集合D。存储完整区块链的全部区块头和保留集合D的区块体。这样,就能够获得根据本申请的降采样节点(DS节点)。
根据本申请的另一种实施方式,对于比特币网络而言,UTXOs代表最新交易状态,节点使用UTXOs池验证新交易。可以统计每个UTXOs 的生存区块x以获得UTXOs的生存区块的统计分布概率,根据UTXOs的生存区块x的统计分布概率获得UTXOs的生存区块的概率密度函数f(x),如图7:
Figure PCTCN2019096316-appb-000009
(当x<0时,f(x)=0)
其中x是生存区块。
如果认为每个区块中的交易的输出数量是均匀的,那么区块深度为d的区块包含全部UTXOs的概率u(d)(即,每个区块被新交易使用的概率分布)如图8所示:
Figure PCTCN2019096316-appb-000010
在这里,我们可以采用以下步骤对区块链进行降采样:确定降采样率M;根据降采样率M和总区块数量d max计算保留集合的基数δ,δ=d max/M,根据保留集合的基数δ和每个区块被新交易使用的概率分布u(d)计算保留区块深度的范围以确定保留集合D,D为u(d)最大的δ个区块体的集合,由于u(d)是单调递减函数,因此D为完整区块链区块深度的前δ个区块体,
Figure PCTCN2019096316-appb-000011
以及存储完整区块链的全部区块头和保留集合D的区块体。这样,就能够获得根据本申请的降采样节点(DS节点)。
当DS节点收到新的交易时,DS节点检查输入是否在DS节点生成的最新交易状态池中、交易是否合法,包括地址是否有效、发件人是输入地址的合法所有者。除此之外,DS节点还要检查交易是否已处理完毕,交易的输入是否大于输出的总和。如果检查通过,则DS节点将新交易标记为未处理的合法交易进行广播。
对于新生成的区块工作步骤也是相似的。当一个DS节点收到一个新生成的区块时,它将检查验证块内的交易的合法性、数据结构、共识机 制、区块时间以及铸币交易。如果检查通过,则DS节点将新区块标记为合法区块进行广播。
为了说明降采样区块链存储方法在比特币上的性能,在表3中,示出了全节点、降采样率M=1024的DS节点的广播正确率和R。
表3全节点、降采样率M=1024的DS节点的广播正确率和R
  广播正确率 R
DS节点 1.000 0.006
全节点 1 6.049e-6
可以看出,当降采样率小于1024时,DS节点具有与全节点相似的广播正确率,有比全节点更高的R。
在表4中,示出了全节点和DS节点的平均下载块数。
表4全节点和DS节点的平均下载块数
M 1 16 256 1024 4096
DS节点 519893 32494 2031 508 127
全节点 519893 - - - -
可以看出,具有适当降采样率的DS节点只有完整节点的下载块的平均数量的1/M。
进一步的,对于每种区块链的降采样区块链存储方法中,还可以引入随机采样,即在前述降采样区块链存储方法的基础上,随机存储L个非保留集合的区块体来抵抗攻击者的猜测。其中,非保留集合是完整区块链的区块体除保留集合外的区块体的集合。根据本申请的一种实施方式,公开了一种区块链的存储方法包括:存储完整区块链的区块头;以及存储保留集合的区块体和根据随机规则而选择的非保留集合的区块体。
根据本申请的一种实施方式,公开了一种区块链的节点。其中,该节点包括区块头和区块体。该节点的区块头包括完整区块链的区块头。该节点的区块体包括根据规律规则对完整区块链的区块体进行降采样得 到的区块体,以及根据随机规则而选择的非保留集合的区块体。如图9所示,可以在非保留集合随机生成长度为L的互不重复的随机序列j 1、j 2、…j L,(j 1在图9中示意性示出)DS节点不仅存储保留集合的区块体,还存储区块深度为j 1、j 2、…j L的非保留集合的区块体。通过引入随机采样,即使攻击者知道了降采样存储方法和降采样的起始区块深度,也不能够完全预测DS节点所存储的区块体。因而有效防止了被成功攻击的可能性。
根据本申请的一种实施方式,可以根据所存储的保留集合的区块体和所存储的由随机规则而选择的非保留集合的区块体,生成最新交易状态池。由此可以验证新交易的合法性,具有独立的验证和广播能力。同时由于具有L个随机存储的非保留集合的区块体,能够有效抵抗攻击者的猜测攻击。
以上参照附图对本申请的示例性的实施方案进行了描述。本领域技术人员应该理解,上述实施方案仅仅是为了说明的目的而所举的示例,而不是用来进行限制,凡在本申请的教导和权利要求保护范围下所作的任何修改、等同替换等,均应包含在本申请要求保护的范围内。

Claims (15)

  1. 一种区块链的存储方法,包括:存储完整区块链的区块头;以及存储根据规律规则对完整区块链的区块体进行降采样得到的区块体。
  2. 如权利要求1所述的存储方法,其中,根据区块链中每个区块被新交易使用的概率分布确定对完整区块链的区块体进行降采样得到的区块体的保留集合。
  3. 如权利要求2所述的存储方法,其中,根据交易状态的生存区块的统计分布概率获得交易状态的生存区块的概率密度函数,根据交易状态的生存区块的概率密度函数计算各区块包含最新交易状态的概率分布;根据所述各区块包含最新交易状态的概率分布和预设降采样阈值确定所述保留集合。
  4. 如权利要求3所述的存储方法,其中,所述预设降采样阈值是预设信息熵阈值,其中,根据所述各区块包含最新交易状态的概率分布获得区块基于区块深度的信息熵函数;根据所述信息熵函数和预设信息熵阈值计算保留区块深度的范围,以确定所述保留集合。
  5. 如权利要求4所述的存储方法,还包括:根据所存储的保留集合的区块体生成最新交易状态池。
  6. 如权利要求2所述的存储方法,其中,所述预设降采样阈值是预设降采样率,其中,根据降采样率和总区块数量计算保留集合的基数;根据保留集合的基数和所述各区块包含最新交易状态的概率分布计算保留区块深度的范围,以确定所述保留集合。
  7. 如权利要求6所述的存储方法,还包括:根据所存储的保留集合的区块体生成最新交易状态池。
  8. 如前述任一权利要求所述的存储方法,还包括:存储根据随机规 则而选择的非保留集合的区块体。
  9. 如权利要求8所述的存储方法,还包括:根据所存储的保留集合的区块体和所存储的由随机规则而选择的非保留集合的区块体,生成最新交易状态池。
  10. 一种区块链的节点,包括区块头和区块体,所述区块头包括完整区块链的区块头,以及所述区块体包括根据规律规则对完整区块链的区块体进行降采样得到的区块体。
  11. 如权利要求10所述的节点,其中,所述区块体包括保留集合的区块体,所述保留集合是根据区块链中每个区块被新交易使用的概率分布对完整区块链的区块体进行降采样得到的区块体的保留集合。
  12. 如权利要求11所述的节点,其中,所述区块体包括保留集合的区块体,所述保留集合通过以下方式获得:根据交易状态的生存区块的统计分布概率获得交易状态的生存区块的概率密度函数;根据交易状态的生存区块的概率密度函数计算各区块包含最新交易状态的概率分布;根据所述各区块包含最新交易状态的概率分布和预设降采样阈值确定所述保留集合。
  13. 如权利要求12所述的节点,其中,所述预设降采样阈值是预设信息熵阈值,其中,根据所述各区块包含最新交易状态的概率分布获得区块基于区块深度的信息熵函数;根据所述信息熵函数和预设信息熵阈值计算保留区块深度的范围,以确定所述保留集合。
  14. 如权利要求12所述的节点,其中,所述预设降采样阈值是预设降采样率,其中,根据降采样率和总区块数量计算保留集合的基数;根据保留集合的基数和所述各区块包含最新交易状态的概率分布计算保留区块深度的范围,以确定所述保留集合。
  15. 如权利要求10-14中任一项所述的节点,其中,所述区块体还包括根据随机规则而选择的非保留集合的区块体。
PCT/CN2019/096316 2018-07-20 2019-07-17 区块链的存储方法和区块链的节点 WO2020015668A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810804118.8A CN110738472B (zh) 2018-07-20 2018-07-20 区块链的存储方法和区块链的节点
CN201810804118.8 2018-07-20

Publications (1)

Publication Number Publication Date
WO2020015668A1 true WO2020015668A1 (zh) 2020-01-23

Family

ID=69164281

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/096316 WO2020015668A1 (zh) 2018-07-20 2019-07-17 区块链的存储方法和区块链的节点

Country Status (2)

Country Link
CN (1) CN110738472B (zh)
WO (1) WO2020015668A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111614721A (zh) * 2020-04-14 2020-09-01 梁伟 一种多维区块链网、多维区块链网的生成方法、装置
CN111651525A (zh) * 2020-06-24 2020-09-11 北京米弘科技有限公司 区块链数据存储方法和装置
GB2587541A (en) * 2018-10-05 2021-03-31 Dragon Infosec Ltd A consensus method and framework for a blockchain system
CN112947868A (zh) * 2021-04-08 2021-06-11 辽宁大学 四分支链式结构金融区块链存储***

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111858751A (zh) * 2020-06-29 2020-10-30 深圳壹账通智能科技有限公司 基于区块链的数据存储方法及装置
CN112988893B (zh) * 2021-03-15 2023-05-12 中国联合网络通信集团有限公司 基于区块链的信息管理方法、***、区块链节点及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106415530A (zh) * 2013-11-19 2017-02-15 日出科技集团有限责任公司 区块挖掘方法和装置
CN106406896A (zh) * 2016-09-27 2017-02-15 北京天德科技有限公司 一种并行PipeLine技术的区块链建块方法
CN107122477A (zh) * 2017-05-02 2017-09-01 成都中远信电子科技有限公司 一种区块链存储***
CN107276762A (zh) * 2017-05-08 2017-10-20 飞天诚信科技股份有限公司 一种多协议区块链的工作方法及装置
CN107729471A (zh) * 2017-10-13 2018-02-23 上海策赢网络科技有限公司 一种区块链及其生成方法与设备

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10304143B2 (en) * 2016-05-05 2019-05-28 Lance Timothy Kasper Consensus system for manipulation resistant digital record keeping
US20160379212A1 (en) * 2015-06-26 2016-12-29 Intel Corporation System, apparatus and method for performing cryptographic operations in a trusted execution environment
CN107079059B (zh) * 2016-12-21 2019-12-10 深圳前海达闼云端智能科技有限公司 区块链存储方法、装置及节点设备
CN106656798B (zh) * 2016-12-30 2020-03-27 质数链网科技成都有限公司 一种计算决策路径的方法及分布式节点
CN107657438B (zh) * 2017-09-18 2020-12-04 联动优势科技有限公司 一种区块链生成方法、数据验证方法、节点及***
CN107766540A (zh) * 2017-10-31 2018-03-06 上海分布信息科技有限公司 一种分区的区块链网络及其实现分区存储的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106415530A (zh) * 2013-11-19 2017-02-15 日出科技集团有限责任公司 区块挖掘方法和装置
CN106406896A (zh) * 2016-09-27 2017-02-15 北京天德科技有限公司 一种并行PipeLine技术的区块链建块方法
CN107122477A (zh) * 2017-05-02 2017-09-01 成都中远信电子科技有限公司 一种区块链存储***
CN107276762A (zh) * 2017-05-08 2017-10-20 飞天诚信科技股份有限公司 一种多协议区块链的工作方法及装置
CN107729471A (zh) * 2017-10-13 2018-02-23 上海策赢网络科技有限公司 一种区块链及其生成方法与设备

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2587541A (en) * 2018-10-05 2021-03-31 Dragon Infosec Ltd A consensus method and framework for a blockchain system
CN111614721A (zh) * 2020-04-14 2020-09-01 梁伟 一种多维区块链网、多维区块链网的生成方法、装置
CN111614721B (zh) * 2020-04-14 2022-11-22 梁伟 一种多维区块链网、多维区块链网的生成方法、装置
CN111651525A (zh) * 2020-06-24 2020-09-11 北京米弘科技有限公司 区块链数据存储方法和装置
CN112947868A (zh) * 2021-04-08 2021-06-11 辽宁大学 四分支链式结构金融区块链存储***
CN112947868B (zh) * 2021-04-08 2024-05-03 辽宁大学 四分支链式结构金融区块链存储方法

Also Published As

Publication number Publication date
CN110738472B (zh) 2023-10-03
CN110738472A (zh) 2020-01-31

Similar Documents

Publication Publication Date Title
WO2020015668A1 (zh) 区块链的存储方法和区块链的节点
US12008524B2 (en) Method and system of mining blockchain transactions provided by a validator node
JP6999023B2 (ja) ブロックチェーンネットワークにおいて大規模分散メモリプールを管理するためのコンピュータ実装されたシステム及び方法
CN110245956B (zh) 一种基于异步多链的区块链交易确认方法及***
Leung et al. Vault: Fast bootstrapping for the algorand cryptocurrency
Mišić et al. Adapting PBFT for use with blockchain-enabled IoT systems
CN109391645B (zh) 区块链轻量化处理方法、区块链节点及存储介质
JP2020504927A (ja) イベントの削除を可能にする分散データベースのための方法および装置
KR20190067581A (ko) 블록체인 트랜잭션 분산 처리 장치 및 방법
US20220407728A1 (en) Systems and methods for processing blockchain transactions
CN111047439A (zh) 一种基于区块链的交易处理方法
Lee et al. Poster: A proof-of-stake (PoS) blockchain protocol using fair and dynamic sharding management
US12007972B2 (en) Systems and methods for processing blockchain transactions
CN109391643B (zh) 区块链轻量化处理方法、区块链节点及存储介质
Grybniak et al. Waterfall: a scalable distributed ledger technology
CN111177262A (zh) 一种区块链共识方法、相关装置及***
Zhang et al. Blockchain data provenance scheme based on grouping consensus and bm tree
CN113495982B (zh) 交易节点管理方法、装置、计算机设备及存储介质
Elwi et al. Stateful Layered Chain Model to Improve the Scalability of Bitcoin
Prinz et al. Blockchain: Reliable Transactions
He et al. A Blockchain-Enabled Location Privacy-preserving under Local Differential Privacy for Internet of Vehicles
Rajkumar et al. Enhancing Security in Key Management Using Hybrid Cache Supported One Way Hash Chain Technique
CN116633675A (zh) 针对区块链中资源受限节点的云服务提供方法
Huo A Light-weight Authentication Scheme in the Internet of Things using the Enhanced Bloom Filter
Michel et al. ammBoost: State Growth Control for AMMs

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: 19838113

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: 19838113

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19838113

Country of ref document: EP

Kind code of ref document: A1