WO2021077962A1 - 一种区块链节点同步的方法及装置 - Google Patents

一种区块链节点同步的方法及装置 Download PDF

Info

Publication number
WO2021077962A1
WO2021077962A1 PCT/CN2020/116439 CN2020116439W WO2021077962A1 WO 2021077962 A1 WO2021077962 A1 WO 2021077962A1 CN 2020116439 W CN2020116439 W CN 2020116439W WO 2021077962 A1 WO2021077962 A1 WO 2021077962A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
node
block height
target node
contract account
Prior art date
Application number
PCT/CN2020/116439
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 WO2021077962A1 publication Critical patent/WO2021077962A1/zh

Links

Images

Classifications

    • 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/2255Hash tables
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • 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

Definitions

  • the embodiment of the present invention relates to the field of financial technology (Fintech), and in particular to a method and device for synchronization of blockchain nodes.
  • the newly added node When a new node is added to the blockchain network, the newly added node needs to correctly synchronize the state data of the existing node before it can participate in the consensus as a consensus node.
  • the newly added node synchronizes the block from the existing node, and after verifying that the synchronized block is correct, executes the transaction in the block, and then verifies that the transaction result (modification of the blockchain state data by the transaction) meets expectations Then update the corresponding status data.
  • This method requires new nodes to serially execute all transactions in all blocks from the genesis block to update state data. Therefore, in the case of a large number of historical blocks, the block synchronization process takes a long time.
  • the embodiment of the present invention provides a method and device for block chain node synchronization to improve the efficiency of block synchronization.
  • An embodiment of the present invention provides a method for synchronizing blockchain nodes, including:
  • the root hash of the state tree of each first target node on the target block height is the same; the target block height is based on the lowest block of the current block height of each first target node Highly certain
  • the system table entry records the block height of each contract account when it is created, and the block height when the target contract account is created is less than or equal to the target Block height
  • each first target node determines the target contract account requested from the first target node, generate a synchronization request and send it to the first target node; the synchronization request is used by the first target node to determine the corresponding target The status data of the contract account on the target block height is returned.
  • the target contract account can be allocated to multiple first target nodes, so that the newly added node can synchronize with multiple first target nodes at the same time.
  • the status data of the target contract account is repeated, and the synchronization efficiency is high.
  • the method further includes:
  • the state data of the corresponding target contract account returned by each first target node on the target block height is stored in the local database In; wherein, the first state tree root hash is the state tree root hash of each first target node on the target block height.
  • the hash value of the state data can be determined according to all the received state data, that is, the state tree root corresponding to the target block height can be determined Hash, and judge whether the hash value is consistent with the state tree root hash obtained from each first target node. If so, confirm that the obtained state data is the correct data, and the storage can be performed to complete Synchronous operation of the status data of the target block.
  • the method further includes:
  • the transaction in the first block is executed, the state data of the modified contract account is generated, and the state data of the modified contract account is updated to the local database.
  • the newly added node after the newly added node completes the synchronization operation of the state data on the target block height, it can further start the process of synchronizing subsequent blocks and executing the new block transaction, so as to synchronize the state data in the blockchain during the operation.
  • the newly added blocks in the network are synchronized to complete the update of the state data corresponding to the newly added blocks, so that the newly added node has the same state data as other existing nodes, and can be used as a new consensus node to participate in the consensus.
  • the first target node includes a third target node; the synchronization request sent to the third target node is also used by the third target node to determine system state data and return the system state data .
  • the newly added node synchronizes the system status data, and completes the synchronization of the system configuration information in the blockchain network, thereby completing the synchronization of all status data in the blockchain network.
  • an embodiment of the present invention also provides a device for synchronizing blockchain nodes, including:
  • the determining unit is configured to determine multiple first target nodes from the blockchain network; the root hash of the state tree of each first target node on the target block height is the same; the target block height is based on each first target The lowest block height of the current block height of the node is determined;
  • the determining unit is further configured to determine a target contract account from a system entry according to the target block height; the system entry records the block height when each contract account is created, and when the target contract account is created The block height of is less than or equal to the target block height;
  • the processing unit is configured to determine, for each first target node, a target contract account requested from the first target node, generate a synchronization request and send it to the first target node; the synchronization request is used for the The first target node determines the status data of the corresponding target contract account on the target block height and returns it.
  • processing unit is further configured to:
  • a synchronization request is generated and sent to the first target node, in receiving the plurality of first target nodes After the state data of the corresponding target contract account on the target block height returned by each first target node, calculate the root hash of the second state tree;
  • the state data of the corresponding target contract account returned by each first target node on the target block height is stored in the local database In; wherein, the first state tree root hash is the state tree root hash of each first target node on the target block height.
  • processing unit is further configured to:
  • the transaction in the first block is executed, the state data of the modified contract account is generated, and the state data of the modified contract account is updated to the local database.
  • the first target node includes a third target node; the synchronization request sent to the third target node is also used by the third target node to determine system state data and return the system state data .
  • an embodiment of the present invention also provides a computing device, including:
  • processor, memory, and communication interface among them, the processor, memory and communication interface are connected by a bus;
  • the processor is configured to read the program in the memory and execute the above-mentioned method for synchronization of blockchain nodes
  • the memory is used to store one or more executable programs, and can store data used by the processor when performing operations.
  • the embodiment of the present invention also provides a non-transitory computer-readable storage medium, in which computer instructions are stored in the non-transitory computer-readable storage medium, and when it runs on a computer, the computer executes the above-mentioned blockchain node The method of synchronization.
  • an embodiment of the present invention also provides a computer program product containing instructions.
  • the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium.
  • the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the above-mentioned blockchain node synchronization method.
  • FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for synchronizing blockchain nodes according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another method for synchronizing blockchain nodes according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of a device for synchronization of blockchain nodes provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a computing device provided by this application.
  • the state data of the block chain can be divided into two categories.
  • One is the system state data related to the overall state of the block chain, such as the current block height of the block chain, the list of nodes participating in the consensus under the current block height, and the block chain configuration (such as the maximum number of transactions that can be packaged in each block) and other content;
  • the other type is contract account data, which records the balance of the contract account and the contract code hash.
  • contract account data constitutes most of the state data, but all state data (including system state data and contract account data) need to be synchronized.
  • LevelDB and RocksDB the main database engines used by the blockchain are LevelDB and RocksDB. Both types of databases are NoSQL databases (non-relational databases), which are physically stored in the form of key-value pairs, and only provide specified Key and traverse operations to obtain related records. value. Therefore, if it is necessary to obtain all the state data stored in the form of key-value pairs on the blockchain, it can only be obtained by serially traversing the database instance.
  • NoSQL databases non-relational databases
  • the blockchain needs to record the historical value of the state data, that is, record the Value of the same Key at different block heights.
  • the root hash of the MPT tree that is, the state tree root hash, StateRoot
  • the root hash of the MPT tree will also be stored in the header of the specific block (Header )in.
  • Header the header of the specific block
  • the embodiment of the present invention provides a system architecture to which the method for synchronizing blockchain nodes is applicable.
  • the system architecture may be a blockchain network, where the blockchain network includes newly added nodes and existing nodes, When a newly joined node joins the blockchain network, it sends a request for synchronization of state data to an existing node, and receives the state data responded by the existing node, thereby completing the synchronization of the state data.
  • system architecture can also include multiple newly added nodes, each of which can send a request for synchronization of status data to an existing node, and receive the status data returned by the existing node, thereby completing the synchronization of the status data .
  • FIG. 2 exemplarily shows the flow of a method for synchronization of blockchain nodes provided by an embodiment of the present invention.
  • the flow can be executed by a device synchronized by blockchain nodes, and the device can be newly added to the node. , Can be the newly added node.
  • the process specifically includes:
  • Step 201 Determine multiple first target nodes from the blockchain network.
  • the newly joined node After the newly joined node joins the blockchain network, a synchronization operation will be triggered.
  • the newly joined node obtains the number of existing nodes in the current blockchain network and the current block height of each existing node, and determines the amount used for the synchronization operation.
  • the first target node and the target block height wherein the root hash of the state tree of each first target node on the target block height is the same; the target block height is determined according to the lowest block height of the current block height of each first target node.
  • the maximum value that is less than the lowest block height and an integer multiple of the preset value can be taken.
  • the lowest block height is 3430, and the preset value If it is 100, take the maximum value that is less than 3430 and an integer multiple of 100, which is 3400. It may also be a value obtained by subtracting a preset value from the lowest block height. For example, if the lowest block height is 3430 and the preset value is 5, then the value of 3430 minus 5 is taken, which is 3425.
  • the preset values in the above two methods can be determined based on experience.
  • the newly added node can sort the existing nodes from high to low according to the current block height of each existing node in the blockchain network, and according to the kth
  • the current block height of the existing node determines the preset block height (the preset block height here is the same as the above method for determining the target block height), and obtains that each of the first k existing nodes is above the preset block height And determine whether the root hashes of the k state trees are the same.
  • the preset block height is the target block height; otherwise, Update the above preset block height according to the current block height of the k+1th existing node, and obtain the state tree root of each existing node in the first k+1 existing nodes on the updated preset block height.
  • the existing nodes corresponding to the k identical state tree root hashes are regarded as the k first target nodes, and the updated pre- Set the block height as the target block height, otherwise, continue to update the above preset block height according to the current block height of the k+2th existing node, until k identical state tree root hashes and corresponding k existing nodes are determined Node, and further determine k existing nodes corresponding to the k identical state tree root hashes as k first target nodes, and determine the corresponding preset block height as the target block height.
  • the sorting is C, A, B, D, then the first two existing nodes are determined to be C and A, according to
  • the current block height corresponding to node A is 3430, and the maximum value 3400, which is less than 3430 and an integer multiple of 100, is taken as the preset block height.
  • node C is at a block height of 3400
  • the state tree root hash and node A are at a block height of 3400
  • the root hashes of the state tree above are consistent, which means that C and A are correct nodes.
  • C and A can be used as the two first target nodes, and the preset block height of 3400 at this time is the target block height.
  • the root hash of the state tree of node C at block height 3400 is inconsistent with the root hash of the state tree of node A at block height 3400, it is determined that one of node A and node C is the wrong node (the tampered node) , Then obtain node B (the next node of node A in the current block height ranking) according to the current block height 3320 corresponding to node B, and take the maximum value 3300 which is less than 3320 and an integer multiple of 100 as the preset block height, and further determine The root hash of the state tree of node B at block height 3300 is consistent with the root hash of the state tree of node A at block height 3300 or the root hash of the state tree of node C at block height 3300.
  • the preset block height at this time is 3300. Is the target block height; if it is determined that the state tree root hash of B at block height 3300 is consistent with the state tree root hash of node C at block height 3300, then node B and node C are regarded as the two first target nodes, And the preset block height of 3300 at this time is the target block height.
  • Step 202 Determine the target contract account from the system table entry according to the target block height.
  • LevelDB or RocksDB used to store state data is physically stored in the form of key-value pairs
  • the existing node can only read the corresponding state data through traversal.
  • the efficiency of synchronizing state data of the newly joined node is slow.
  • the embodiment of the present invention provides a system entry.
  • the system entry is a list used to record contract account data. For example, as shown in Table 1, the system entry The block height of each contract account when it was created is recorded in it. For example, the contract account Account2 was created when the block height was 1, and the contract account Account890 was created when the block height was 3450.
  • the newly added node can determine which contract accounts have been created before the target block height in the blockchain network, and the newly added node can know which contract account status data should be synchronized from the blockchain network In other words, the newly added node determines the target contract account from the above system entry according to the target block height, where the block height corresponding to the determined target contract account at the time of creation is less than or equal to the target block height.
  • the target block height is determined to be 3400, it can be determined that the target block height is 3400 and the contract accounts that have been created before the target block height of 3400 have Account0 to Account799, that is, the contract accounts Account0 to Account799 are target contract accounts.
  • Step 203 For each first target node, determine the target contract account requested from the first target node, generate a synchronization request and send it to the first target node.
  • the newly added node After the newly added node determines the target contract account, it assigns the target contract account to each first target node according to preset rules. For example, the contract account that has been created before the target block height is 3400 and the target block height is 3400 has Account0 To Account799, use 500 as a data interval to divide the contract account, then you can assign Account0 to Account499 to node A, and assign Account500 to Account799 to node C, then the newly added node can synchronize the status of Account0 to Account499 from node A Data, synchronize the status data of Account500 to Account799 from node C.
  • preset rules For example, the contract account that has been created before the target block height is 3400 and the target block height is 3400 has Account0 To Account799, use 500 as a data interval to divide the contract account, then you can assign Account0 to Account499 to node A, and assign Account500 to Account799 to node C, then the newly added node can synchronize the status of Account0 to Account499
  • the newly added node generates a synchronization request for each first target node, and each synchronization request includes the target contract account and target block height requested from the corresponding first target node.
  • any one of the first target nodes may be used to illustrate that the newly added node determines the target contract account requested from the first target node, generates a synchronization request corresponding to the first target node, and sends it to the first target node.
  • the synchronization request corresponding to the first target node is used for the first target node to determine the state data of the corresponding target contract account on the target block height and return to the newly added node. Taking the previous example as an example to continue the explanation, the newly added node generates a synchronization request sent to node A.
  • the synchronization request includes the target contract account from Account0 to Account499, and the target block height is 3400; in the same way, the newly added node generates and sends to node C
  • the synchronization request includes that the target contract account is Account500 to Account799, and the target block height is 3400.
  • the first target node After the first target node obtains the synchronization request, it will determine the status data according to the target contract account and target block height in the synchronization request. For example, the synchronization request received by node C includes the target contract account as Account500 and the target block. If the height is 3400, node C will determine the status data of Account500 at the target block height of 3400, and return the status data to the newly added node.
  • a newly added node joins the blockchain network, instead of synchronizing blocks from existing nodes and executing transactions in the blocks, it directly determines the target contract account that needs to synchronize state data based on the system entries, and then Synchronize the state of the target contract account on the target block height in each first target node (the state tree root hash of each first target node on the target block height is the same to ensure the correctness of the state data on each first target node) Data, the amount of synchronized data is small, and there is no need to execute transactions in the block again.
  • the target contract account can be assigned to multiple first target nodes, so that the newly added node can synchronize with multiple first target nodes at the same time.
  • the status data of the target contract account is repeated, and the synchronization efficiency is high.
  • the newly added node After the newly added node sends the synchronization request corresponding to each first target node to each first target node, it can also receive the state data of the corresponding target contract account on the target block height returned by each first target node, and after confirming all After receiving the status data returned by the first target node, it is determined whether the received status data is correct status data.
  • the newly added node constructs complete state data, and then calculates the state tree root hash of the complete state data, that is, the second state tree root hash. After calculating the root hash of the second state tree, compare the root hash of the second state tree with the root hash of the first state tree, where the root hash of the first state tree refers to the fact that each first target node is in the target block.
  • the root hash of the high-level state tree If the two are the same, it means that the state data synchronized by the newly added node is correct.
  • the newly added node can set the corresponding target contract account returned by each first target node to the target block height
  • the status data of the target block is stored in the local database, thereby completing the synchronization operation of the status data of the target block.
  • the two are inconsistent, it means that the state data synchronized to the newly added node is wrong, and corresponding measures need to be taken.
  • the newly added node After the newly added node obtains the state data returned by node A and node C, it parses and constructs the complete state data and calculates the root hash of the state tree. After the verification is passed, the constructed state data is stored on disk , To establish the data status of its own node at a height of 3400 blocks. At this time, the data status of the newly added node at the level of 3400 blocks is equivalent to the data status of the genesis block of the newly added node.
  • the hash value of the status data can be determined according to all the received status data, that is, the root of the status tree corresponding to the target block height can be determined Hash, and judge whether the hash value is consistent with the state tree root hash obtained from each first target node. If so, confirm that the obtained state data is the correct data, and the storage can be performed to complete Synchronous operation of the status data of the target block.
  • the newly added node stores the state data of the corresponding target contract account on the target block height returned by each first target node into the local database, which means that the newly added node completes the synchronization operation of the state data on the target block height.
  • the joining node initiates the process of synchronizing subsequent blocks and executing transactions of newly added blocks, which is used to update its state data to the latest state.
  • the newly added node determines the second target node whose current block height is higher than the target block height from the blockchain network, and obtains the first block after the target block height from the second target node, and executes the first zone
  • the transaction in the block generates the state data of the modified contract account, and updates the state data of the modified contract account to the local database.
  • the second target node may be at least one.
  • the newly added node may determine from the blockchain network at least one existing node whose current block height is greater than the target block height as the second target node, Exemplarily, after the newly added node completes the synchronization operation of the target block height status data, the newly added node determines that the current block heights of nodes A, B, and C in the blockchain network are all higher than the target block height of 3400, and the node can be A, B, and C are all determined as the second target node.
  • the block chain network continues to generate blocks during the process of synchronizing the state data of the newly added node on the target block height, which has reached the block height of 3455.
  • the newly added node After the newly added node has established a data state of 3400 blocks, it will synchronize the blocks of 3401-3455 with nodes A, B, and C whose current block height is higher than 3400 in the blockchain network until the block height of the newly added node is equal to The highest block height of the existing nodes in the blockchain network is consistent.
  • the newly added node after the newly added node completes the synchronization operation of the state data on the target block height, it can further start the process of synchronizing subsequent blocks and executing the newly added block transaction, so as to synchronize the state data in the blockchain during the operation.
  • the newly added blocks in the network are synchronized to complete the update of the state data corresponding to the newly added blocks, so that the newly added node has the same state data as other existing nodes, and can be used as a new consensus node to participate in the consensus.
  • the newly added node not only needs to synchronize the state data of the contract account, but also needs to synchronize the system state data.
  • the newly added node can synchronize the system state data to any one of the first target nodes, and
  • the first target node serves as the third target node, and the synchronization request sent by the newly added node to the third target node is also used for the third target node to determine the system state data.
  • the synchronization request may also include the system state data identifier.
  • the target node determines the account data of the corresponding contract account on the target block height and determines the system status data and returns it to the newly added node.
  • the system state data can be allocated to node C, that is, the newly added node obtains the system state data from node C.
  • a third target node can also be determined in the first target node, which is specifically used for newly joining nodes to obtain system state data, which is not limited here.
  • the newly added node synchronizes the system status data and completes the synchronization of the system configuration information in the blockchain network, thereby completing the synchronization of all status data in the blockchain network.
  • the newly added node can be the subject of execution of the above process, or it can be a third-party node, which acts as an intermediate node between the newly added node and the existing node in the blockchain network, for example, After the third-party node determines a new node in the blockchain network, it will determine multiple first target nodes from the current blockchain network, and determine the target contract account from the system table according to the target block height, and target each A target node determines the target contract account requested from each first target node, generates a synchronization request corresponding to each first target node, and sends it to each first target node.
  • the embodiment of the present invention also provides a process of another method for synchronizing blockchain nodes. As shown in FIG. 3, the specific process is as follows.
  • the execution subject has a newly added node and a first target node.
  • Step 301 The newly added node determines the target node list and target block height for pulling status data
  • the target node list includes multiple first target nodes determined by the newly added node.
  • Step 302 The newly added node divides the state data of the target block height, and allocates it to the corresponding first target node;
  • Step 303 The newly added node generates a synchronization request for status data for each first target node
  • Step 304 The newly added node sends a synchronization request to the corresponding first target node
  • Step 305 The first target node generates a response data packet recording the status data corresponding to the synchronization request according to the received synchronization request;
  • Step 306 The first target node sends the response data packet to the newly added node
  • Step 307 The newly added node parses the response data packet to generate status data, and stores the status data on a disk after the verification is passed;
  • Step 308 After the newly added node completes the synchronization of the historical state data, the synchronization process of the subsequent block is started.
  • FIG. 4 exemplarily shows the structure of a block chain node synchronization device provided by an embodiment of the present invention, and the device can execute the process of the block chain node synchronization method.
  • the device includes:
  • the determining unit 401 is configured to determine multiple first target nodes from the blockchain network; the root hash of the state tree of each first target node on the target block height is the same; the target block height is based on each first target node. The lowest block height of the current block height of the target node is determined;
  • the determining unit 401 is further configured to determine a target contract account from a system entry according to the target block height; the system entry records the block height when each contract account is created, and the target contract account is created The block height at time is less than or equal to the target block height;
  • the processing unit 402 is configured to determine the target contract account requested from the first target node for each first target node, generate a synchronization request and send it to the first target node; the synchronization request is used for all
  • the first target node determines the status data of the corresponding target contract account on the target block height and returns it.
  • processing unit 402 is further configured to:
  • a synchronization request is generated and sent to the first target node, in receiving the plurality of first target nodes After the state data of the corresponding target contract account on the target block height returned by each first target node, calculate the root hash of the second state tree;
  • the state data of the corresponding target contract account returned by each first target node on the target block height is stored in the local database In; wherein, the first state tree root hash is the state tree root hash of each first target node on the target block height.
  • processing unit 402 is further configured to:
  • the transaction in the first block is executed, the state data of the modified contract account is generated, and the state data of the modified contract account is updated to the local database.
  • the first target node includes a third target node; the synchronization request sent to the third target node is also used by the third target node to determine system state data and return the system state data .
  • the present application also provides a computing device.
  • the computing device includes at least one processor 520 for implementing the method in FIG. 2 provided by the embodiment of the present application. Either method.
  • the computing device 500 may also include at least one memory 530 for storing program instructions and/or data.
  • the memory 530 and the processor 520 are coupled.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 520 may cooperate with the memory 530 to operate.
  • the processor 520 may execute program instructions stored in the memory 530. At least one of the at least one memory may be included in the processor.
  • each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
  • the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
  • the processor in the embodiment of the present application may be an integrated circuit chip with signal processing capability.
  • the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
  • the above-mentioned processor may be a general-purpose processor, a digital signal processing circuit (digital signal processor, DSP), a dedicated integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • DSP digital signal processing circuit
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • Programming logic devices discrete gates or transistor logic devices, discrete hardware components.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers.
  • the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
  • the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM), which is used as an external cache.
  • RAM random access memory
  • static random access memory static random access memory
  • dynamic RAM dynamic RAM
  • DRAM dynamic random access memory
  • synchronous dynamic random access memory synchronous DRAM, SDRAM
  • double data rate synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
  • enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
  • synchronous connection dynamic random access memory serial DRAM, SLDRAM
  • direct rambus RAM direct rambus RAM
  • the computing device 500 may further include a communication interface 510 for communicating with other devices through a transmission medium, so that the apparatus used in the computing device 500 can communicate with other devices.
  • the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface.
  • the transceiver when the communication interface is a transceiver, the transceiver may include an independent receiver and an independent transmitter; it may also be a transceiver with integrated transceiver functions, or an interface circuit.
  • the computing device 500 may also include a communication line 540.
  • the communication interface 510, the processor 520, and the memory 530 may be connected to each other through a communication line 540;
  • the communication line 540 may be a peripheral component interconnection standard (peripheral component interconnect, PCI for short) bus or an extended industry standard architecture (extended industry standard architecture). , Referred to as EISA) bus and so on.
  • the communication line 540 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used to represent in FIG. 5, but it does not mean that there is only one bus or one type of bus.
  • embodiments of the present invention also provide a non-transitory computer-readable storage medium.
  • the non-transitory computer-readable storage medium stores computer instructions. When it runs on a computer, the computer executes the above-mentioned blocks. The method of link node synchronization.
  • inventions of the present application provide a computer program product.
  • the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium.
  • the computer program includes program instructions. When executed by a computer, the computer is caused to execute the above-mentioned blockchain node synchronization method.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种区块链节点同步的方法及装置,其中,方法包括:从区块链网络中确定多个第一目标节点;根据目标块高从系统表项中确定目标合约账户;针对每个第一目标节点,确定向第一目标节点请求的目标合约账户,生成同步请求并发送至第一目标节点;第一目标节点确定对应目标合约账户在目标块高上的状态数据并返回。该技术方案用以提高区块同步的效率。

Description

一种区块链节点同步的方法及装置
相关申请的交叉引用
本申请要求在2019年10月21日提交中国专利局、申请号为201910999466.X、申请名称为“一种区块链节点同步的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及金融科技(Fintech)领域,尤其涉及一种区块链节点同步的方法及装置。
背景技术
随着计算机技术的发展,越来越多的技术(例如:区块链、云计算或大数据)应用在金融领域,传统金融业正在逐步向金融科技转变,区块链技术也不例外,但由于金融、支付行业的安全性、实时性要求,也对区块链技术提出的更高的要求。
区块链网络中增加新的节点时,新加入节点需要正确同步已有节点的状态数据后,才能作为共识节点参与共识。现有技术中,新加入节点从已有节点同步区块,并在验证同步到的区块正确后,执行区块中交易,进而验证交易结果(交易对区块链状态数据的修改)符合预期后更新对应的状态数据。该方式由于要求新增节点从创世块开始串行执行所有区块中的所有交易来更新状态数据,因此在历史区块数量较大的情况下,区块同步过程耗时较长。
发明内容
本发明实施例提供一种区块链节点同步的方法及装置,用以提高区块同步的效率。
本发明实施例提供的一种区块链节点同步的方法,包括:
从区块链网络中确定多个第一目标节点;各第一目标节点在目标块高上的状态树根哈希相同;所述目标块高是根据各第一目标节点的当前块高中最低块高确定的;
根据所述目标块高从系统表项中确定目标合约账户;所述系统表项中记录有各合约账户被创建时的块高,所述目标合约账户被创建时的块高小于等于所述目标块高;
针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点;所述同步请求用于所述第一目标节点确定对应目标合约账户在所述目标块高上的状态数据并返回。
上述技术方案中,新加入节点加入至区块链网络时,不是从已有节点同步区块并执行区块中交易,而是直接根据系统表项确定需要同步状态数据的目标合约账户,进而从各第一目标节点(各第一目标节点在目标块高上的状态树根哈希均相同,保障各第一目标节点上状态数据的正确性)中同步目标合约账户在目标块高上的状态数据,同步的数据量少,而且无需再次执行区块中交易。进一步的,新加入节点根据系统表项确定需要同步状态数据的目标合约账户后,可以将目标合约账户分配给多个第一目标节点,实现新加入节点同时向多个第一目标节点同步互不重复目标合约账户的状态数据,同步效率高。
可选的,在所述针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点之后,还包括:
在接收所述多个第一目标节点中每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据之后,计算第二状态树根哈希;
若所述第二状态树根哈希与第一状态树根哈希相同,则将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中;其中,所述第一状态树根哈希是各第一目标节点在所述目标块高上的状态树根哈希。
上述技术方案中,在新加入节点接收到各第一目标节点返回的状态数据后,可以根据接收到的所有状态数据确定状态数据的哈希值,也即确定出目标块高对应的状态树根哈希,并判断该哈希值是否与之前从各第一目标节点中获取到的状态树根哈希一致,若是,则确定获取到的状态数据为正确数据,可以进行落盘存储,从而完成目标块高下的状态数据的同步操作。
可选的,在所述将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中之后,还包括:
从所述区块链网络中确定出当前块高高于所述目标块高的第二目标节点;
从所述第二目标节点中获取所述目标块高之后的第一区块;
执行所述第一区块中的交易,生成修改后的合约账户的状态数据,并将所述修改后的合约账户的状态数据更新至所述本地数据库中。
上述技术方案中,新加入节点在完成目标块高上状态数据的同步操作之后,可以进一步启动同步后续区块和执行新增区块交易的流程,从而将上述状态数据同步操作过程中区块链网络中的新增区块进行同步,以完成新增区块对应状态数据的更新,实现新加入节点与其他已有节点的状态数据相同,可作为新的共识节点参与共识。
可选的,所述第一目标节点中包括第三目标节点;向所述第三目标节点发送的同步请求还用于所述第三目标节点确定系统状态数据,并将所述系统状态数据返回。
上述技术方案中,新加入节点同步系统状态数据,将区块链网络中的系统配置信息同步完成,从而完成区块链网络中全部状态数据的同步。
相应的,本发明实施例还提供了一种区块链节点同步的装置,包括:
确定单元、处理单元;
所述确定单元,用于从区块链网络中确定多个第一目标节点;各第一目标节点在目标块高上的状态树根哈希相同;所述目标块高是根据各第一目标节点的当前块高中最低块高确定的;
所述确定单元,还用于根据所述目标块高从系统表项中确定目标合约账户;所述系统表项中记录有各合约账户被创建时的块高,所述目标合约账户被创建时的块高小于等于所述目标块高;
所述处理单元,用于针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点;所述同步请求用于所述第一目标节点确定对应目标合约账户在所述目标块高上的状态数据并返回。
可选的,所述处理单元还用于:
在所述针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成 同步请求并发送至所述第一目标节点之后,在接收所述多个第一目标节点中每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据之后,计算第二状态树根哈希;
若所述第二状态树根哈希与第一状态树根哈希相同,则将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中;其中,所述第一状态树根哈希是各第一目标节点在所述目标块高上的状态树根哈希。
可选的,所述处理单元还用于:
在所述将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中之后,从所述区块链网络中确定出当前块高高于所述目标块高的第二目标节点;
从所述第二目标节点中获取所述目标块高之后的第一区块;
执行所述第一区块中的交易,生成修改后的合约账户的状态数据,并将所述修改后的合约账户的状态数据更新至所述本地数据库中。
可选的,所述第一目标节点中包括第三目标节点;向所述第三目标节点发送的同步请求还用于所述第三目标节点确定系统状态数据,并将所述系统状态数据返回。
相应的,本发明实施例还提供了一种计算设备,包括:
处理器、存储器、通信接口;其中,处理器、存储器与通信接口之间通过总线连接;
所述处理器,用于读取所述存储器中的程序,执行上述区块链节点同步的方法;
所述存储器,用于存储一个或多个可执行程序,可以存储所述处理器在执行操作时所使用的数据。
相应的,本发明实施例还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质中存储计算机指令,当其在计算机上运行时,使得计算机执行上述区块链节点同步的方法。
相应的,本发明实施例还提供一种包含指令的计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述区块链节点同步的方法。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种系统架构的示意图;
图2为本发明实施例提供的一种区块链节点同步的方法的流程示意图;
图3为本发明实施例提供的另一种区块链节点同步的方法的流程示意图;
图4为本发明实施例提供的一种区块链节点同步的装置的结构示意图;
图5为本申请提供的一种计算设备的结构示意图。
具体实施方式
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步 地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
为了更好的解释本发明实施例,先对本发明实施例所涉及的专业术语或知识进行说明如下:
(一)区块链状态数据的分类
区块链的状态数据可以分为两类,一类为与区块链整体状态相关的系统状态数据,例如区块链当前块高、当前块高下参与共识的节点列表和区块链配置(如每个区块能打包的最大交易数量)等内容;另一类为合约账户数据,记录了合约账户的余额、合约代码哈希等内容。其中,合约账户数据组成了绝大多数状态数据,但所有状态数据(包括系统状态数据和合约账户数据)都是需要同步的。
(二)区块链数据库引擎的访问限制
目前区块链主要使用的数据库引擎有LevelDB和RocksDB,这两类数据库均为NoSQL数据库(非关系性数据库),以键值对的形式进行物理存储,只提供指定Key和遍历操作来获取相关记录值。因此若需获取区块链上所有以键值对的方式进行存储的状态数据,只能通过串行遍历数据库实例的方式进行获取。
(三)区块链状态数据验证方案
区块链需记录状态数据历史数值,即记录同一Key在不同块高下的Value。对特定块高下的状态数据,需计算其MPT树的根哈希(也即状态树根哈希,StateRoot),此MPT树的根哈希也将存储在该特定区块的区块头(Header)中。在同步状态数据过程中,需重新计算所同步的状态数据的MPT树的根哈希是否与通过其他途径所获取的区块头中根哈希一致,若一致,则代表同步的状态数据是正确的。
本发明实施例提供区块链节点同步的方法所适用的系统架构,如图1中,该系统架构可以为区块链网络,其中,该区块链网络中包括新加入节点和已有节点,新加入节点在加入至区块链网络中时,向已有节点发送同步状态数据的请求,并接收已有节点响应的状态数据,从而完成状态数据的同步。
此外,该系统架构中,还可以包括多个新加入节点,每个新加入节点都可以向已有节点发送同步状态数据的请求,并接收已有节点返回的状态数据,从而完成状态数据的同步。
基于上述描述,图2示例性的示出了本发明实施例提供的一种区块链节点同步的方法的流程,该流程可以由区块链节点同步的装置执行,该装置可以新加入节点中,可以是该新加入节点。
如图2所示,该流程具体包括:
步骤201,从区块链网络中确定多个第一目标节点。
新加入节点在加入区块链网络后,会触发同步操作,新加入节点获取当前区块链网络中已有节点的个数和各已有节点的当前块高,并确定用于同步操作的多个第一目标节点和目标块高,其中,各第一目标节点在目标块高上的状态树根哈希相同;目标块高是根据各第一目标节点的当前块高中最低块高确定的。在根据各第一目标节点的当前块高中最低块高确定目标块高时,可以是取小于最低块高且为预设数值的整数倍的最大值,比如,最低块高为3430,预设数值为100,则取小于3430且为100的整数倍的最大值,即为3400。 还可以是取最低块高减去预设数值的值,比如,最低块高为3430,预设数值为5,则取3430减去5的值,即为3425。上述两种方式中的预设数值均可以根据经验进行确定。
第一目标节点的个数可以是根据共识算法和区块链网络中的已有节点的总数确定。具体的,区块链网络中可以有N个已有节点,新加入节点根据不同的共识算法,从N个已有节点中确定出k个第一目标节点,其中,当该共识算法是PBFT(Practical Byzantine Fault Tolerance,实用拜占庭容错)时,新加入节点可以确定k=(N-1)/3+1;当共识算法是POW(Proof of Work,工作证明)时,新加入节点可以确定k=50%×N+1。以PBFT为例,当区块链网络中包括10个已有节点时,新加入节点可以确定出4个第一目标节点。
在新加入节点确定k个第一目标节点过程中,可以是新加入节点根据区块链网络中各已有节点的当前块高,将各已有节点从高到低排序,并根据第k个已有节点的当前块高确定预设块高(此处的预设块高和上述确定目标块高的方式相同),获取前k个已有节点中各已有节点在该预设块高上的状态树根哈希,并判断该k个状态树根哈希是否相同,若是,则确定前k个已有节点为k个第一目标节点,该预设块高为目标块高;否则,根据第k+1个已有节点的当前块高更新上述预设块高,并获取前k+1个已有节点中各已有节点在该更新后的预设块高上的状态树根哈希,并判断是否存在k个相同的状态树根哈希,若是,则将该k个相同的状态树根哈希对应的已有节点作为k个第一目标节点,以及将该更新后的预设块高作为目标块高,否则,继续根据第k+2个已有节点的当前块高更新上述预设块高,直至确定出k个相同的状态树根哈希以及对应的k个已有节点,进而将该k个相同的状态树根哈希对应的k个已有节点确定为k个第一目标节点,将对应的预设块高确定为目标块高。
举例来说,当前区块链网络中已有节点A、B、C和D四个,且A、B、C和D各自对应的当前块高为3430、3320、3450和3100,则有:根据PBFT确定k=2,根据A、B、C和D各自的当前块高从高到低进行排序,排序为C、A、B、D,则确定前2个已有节点为C和A,根据节点A对应的当前块高3430,取小于3430且为100的整数倍的最大值3400作为预设块高,若确定节点C在块高3400上的状态树根哈希和节点A在块高3400上的状态树根哈希一致,则表示C和A为正确的节点,可以将C和A作为两个第一目标节点,且此时的预设块高3400即为目标块高。若确定节点C在块高3400上的状态树根哈希和节点A在块高3400上的状态树根哈希不一致,则确定节点A和节点C中有一个为错误节点(被篡改的节点),则获取节点B(当前块高排序中的节点A的下一个节点)根据节点B对应的当前块高3320,取小于3320且为100的整数倍的最大值3300作为预设块高,进一步确定节点B在块高3300上的状态树根哈希与节点A在块高3300上的状态树根哈希一致还是和节点C在块高3300上的状态树根哈希一致,若确定B在块高3300上的状态树根哈希与节点A在块高3300上的状态树根哈希一致,则将节点B和节点A作为两个第一目标节点,且此时的预设块高3300即为目标块高;若确定B在块高3300上的状态树根哈希与节点C在块高3300上的状态树根哈希一致,则将节点B和节点C作为两个第一目标节点,且此时的预设块高3300即为目标块高。
步骤202,根据目标块高从系统表项中确定目标合约账户。
由于用于存储状态数据的LevelDB或RocksDB均以键值对的形式进行物理存储,在新加入节点从已有节点中请求状态数据时,已有节点只能通过遍历方式读取相应的状态数 据以返回至新加入节点,新加入节点同步状态数据的效率较慢。本发明实施例为提高新加入节点同步状态数据的效率,提供一个系统表项,该系统表项是用于记录合约账户数据的列表,示例性的,可以如表1所示,该系统表项中记录有各合约账户被创建时的块高,如合约账户Account2在块高1时被创建,合约账户Account890在块高3450时被创建。
表1
合约账户 块高
Account0 0
Account1 0
Account2 1
Account3 5
…… ……
Account798 3400
Account799 3400
Account800 3401
…… ……
Account890 3450
根据上述系统表项,新加入节点可以确定出区块链网络中目标块高之前已经被创建的合约账户有哪些,新加入节点即可以知道应该从区块链网络中同步哪些合约账户的状态数据,换句话说,新加入节点根据目标块高从上述系统表项中确定出目标合约账户,其中确定出的目标合约账户对应的被创建时的块高小于等于目标块高。如表1中,确定目标块高为3400,则可以确定目标块高3400以及目标块高3400之前已经被创建的合约账户有Account0至Account799,即该合约账户Account0至Account799为目标合约账户。
步骤203,针对每个第一目标节点,确定向第一目标节点请求的目标合约账户,生成同步请求并发送至第一目标节点。
新加入节点在确定出目标合约账户后,根据预设规则将目标合约账户分配给各第一目标节点,举例来说,确定目标块高3400以及目标块高3400之前已经被创建的合约账户有Account0至Account799,以500作为一个数据区间进行合约账户的划分,则可以将Account0至Account499分配给节点A,将Account500至Account799分配给节点C,则新加入节点可以从节点A中同步Account0至Account499的状态数据,从节点C中同步Account500至Account799的状态数据。
新加入节点针对每个第一目标节点生成同步请求,每个同步请求中包括向对应第一目标节点请求的目标合约账户和目标块高。具体的,可以以其中的任一个第一目标节点说明,新加入节点确定向该第一目标节点请求的目标合约账户,并生成该第一目标节点对应的同步请求发送至该第一目标节点,该第一目标节点对应的同步请求即用于该第一目标节点确定其对应目标合约账户在目标块高上的状态数据并返回至新加入节点。以前述例子为例继续说明,新加入节点生成向节点A发送的同步请求,该同步请求中包括目标合约账户为Account0至Account499、目标块高为3400;同理,新加入节点生成向节点C发送的同步请求,该同步请求中包括目标合约账户为Account500至Account799、目标块高为3400。
换个角度,第一目标节点在获取到同步请求后,会根据同步请求中的目标合约账户和目标块高确定状态数据,比如,节点C接收到的同步请求中包括目标合约账户为Account500、目标块高为3400,则节点C会确定Account500在目标块高3400上的状态数据,并将该状态数据返回至新加入节点。
上述实施例中,新加入节点加入至区块链网络时,不是从已有节点同步区块并执行区块中交易,而是直接根据系统表项确定需要同步状态数据的目标合约账户,进而从各第一目标节点(各第一目标节点在目标块高上的状态树根哈希均相同,保障各第一目标节点上状态数据的正确性)中同步目标合约账户在目标块高上的状态数据,同步的数据量少,而且无需再次执行区块中交易。进一步的,新加入节点根据系统表项确定需要同步状态数据的目标合约账户后,可以将目标合约账户分配给多个第一目标节点,实现新加入节点同时向多个第一目标节点同步互不重复目标合约账户的状态数据,同步效率高。
新加入节点在向各第一目标节点发送各第一目标节点对应的同步请求之后,还可以接收各第一目标节点返回的对应目标合约账户在目标块高上的状态数据,并在确定将所有第一目标节点返回的状态数据接收完成后,判断接收到的状态数据是否为正确的状态数据。具体实现中,新加入节点构建完整的状态数据,进而计算该完整状态数据的状态树根哈希,也即第二状态树根哈希。在计算第二状态树根哈希之后,将第二状态树根哈希和第一状态树根哈希作比较,其中,第一状态树根哈希指的是各第一目标节点在目标块高上的状态树根哈希,若二者一致,则代表新加入节点同步到的状态数据是正确的,新加入节点可以将每个第一目标节点返回的对应目标合约账户在目标块高上的状态数据存储至本地数据库中,从而完成目标块高上状态数据的同步操作。当然,若二者不一致,则代表新加入节点同步到的状态数据是错误的,需要采取相应措施。
以前述例子为例继续说明,新加入节点获取节点A和节点C返回的状态数据后,解析构造完整的状态数据并计算状态树根哈希,验证通过后将所构造的状态数据进行落盘存储,建立起自身节点在3400块高下的数据状态。此时新加入节点在3400块高下的数据状态相当于新加入节点的创世块的数据状态。
上述实施例中,在新加入节点接收到各第一目标节点返回的状态数据后,可以根据接收到的所有状态数据确定状态数据的哈希值,也即确定出目标块高对应的状态树根哈希,并判断该哈希值是否与之前从各第一目标节点中获取到的状态树根哈希一致,若是,则确定获取到的状态数据为正确数据,可以进行落盘存储,从而完成目标块高下的状态数据的同步操作。
新加入节点将每个第一目标节点返回的对应目标合约账户在目标块高上的状态数据存储至本地数据库中,即代表新加入节点完成目标块高上状态数据的同步操作,进一步的,新加入节点启动同步后续区块和执行新增区块交易的流程,用于更新其状态数据到最新状态。具体的,新加入节点从区块链网络中确定出当前块高高于目标块高的第二目标节点,并从第二目标节点中获取目标块高之后的第一区块,执行第一区块中的交易,生成修改后的合约账户的状态数据,并将修改后的合约账户的状态数据更新至本地数据库中。此处,第二目标节点可以是至少一个,新加入节点在确定第二目标节点时,可以从区块链网络中确定至少一个当前块高大于目标块高的已有节点作为第二目标节点,示例性,在新加入节点完成目标块高上状态数据的同步操作之后,新加入节点确定区块链网络中节点A、B、C 的当前块高都高于目标块高3400,则可以将节点A、B、C都确定为第二目标节点。
当新加入节点的块高与已有节点的最高块高一致,则表示新加入节点已完成同步区块链网络中其他共识节点状态数据的同步操作,可作为新的共识节点参与共识。以前述例子为例继续说明,新加入节点在同步目标块高上的状态数据过程中,区块链网络继续出块,已达到3455的块高。新加入节点在建立起3400块高下的数据状态后,向区块链网络中当前块高高于3400的节点A、B、C同步3401-3455的区块,直至新加入节点的块高与区块链网络中已有节点的最高块高一致。
上述实施例中,新加入节点在完成目标块高上状态数据的同步操作之后,可以进一步启动同步后续区块和执行新增区块交易的流程,从而将上述状态数据同步操作过程中区块链网络中的新增区块进行同步,以完成新增区块对应状态数据的更新,实现新加入节点与其他已有节点的状态数据相同,可作为新的共识节点参与共识。
本发明实施例中,新加入节点不仅需要同步合约账户的状态数据,还需要同步系统状态数据,新加入节点可以向第一目标节点中的任一个第一目标节点同步该系统状态数据,将该第一目标节点作为第三目标节点,则有新加入节点向第三目标节点发送的同步请求还用于第三目标节点确定系统状态数据,该同步请求中还可以包括系统状态数据的标识,第三目标节点根据接收到的同步请求,确定对应合约账户在目标块高上的账户数据以及确定系统状态数据并返回给新加入节点。上述例子中,可以将系统状态数据分配至节点C,也即新加入节点向节点C获取系统状态数据。当然,还可以在第一目标节点中确定一个第三目标节点,专门用于新加入节点获取系统状态数据,在此不做限制。新加入节点同步系统状态数据,将区块链网络中的系统配置信息同步完成,从而完成区块链网络中全部状态数据的同步。
上述同步流程中,可以是新加入节点作为执行上述流程的执行主体,还可以是第三方节点,第三方节点作为区块链网络中新加入节点和已有节点之间交互的中间节点,比如,第三方节点在确定区块链网络中新加入节点后,会从当前区块链网络中确定多个第一目标节点,并根据目标块高从系统表项中确定目标合约账户,以及针对各第一目标节点,确定向各第一目标节点请求的目标合约账户,生成各第一目标节点对应同步请求并发送至各第一目标节点。在接收到多个第一目标节点中每个第一目标节点返回的对应目标合约账户在目标块高上的状态数据之后,计算第二状态树根哈希;若确定第二状态树根哈希与第一状态树根哈希相同,则将每个第一目标节点返回的对应目标合约账户在目标块高上的状态数据发送至新加入节点,以使得新加入节点存储在本地。其他步骤与此类似,不再赘述。
本发明实施例还提供另一种区块链节点同步的方法的流程,如图3具体流程如下,执行主体有新加入节点和第一目标节点。
步骤301,新加入节点确定用于拉取状态数据的目标节点列表和目标块高;
其中,目标节点列表中即包括新加入节点确定的多个第一目标节点。
步骤302,新加入节点对目标块高的状态数据进行划分,并分配到对应第一目标节点上;
步骤303,新加入节点针对每个第一目标节点生成状态数据的同步请求;
步骤304,新加入节点将同步请求发送至对应的第一目标节点中;
步骤305,第一目标节点根据接收到的同步请求,生成记录有同步请求对应状态数据 的响应数据包;
步骤306,第一目标节点将响应数据包发送至新加入节点;
步骤307,新加入节点解析响应数据包生成状态数据,并在验证通过后将状态数据落盘存储;
步骤308,新加入节点完成历史状态数据的同步后,启动后续区块的同步流程。
基于同一发明构思,图4示例性的示出了本发明实施例提供的一种区块链节点同步的装置的结构,该装置可以执行区块链节点同步的方法的流程。
该装置包括:
确定单元401、处理单元402;
所述确定单元401,用于从区块链网络中确定多个第一目标节点;各第一目标节点在目标块高上的状态树根哈希相同;所述目标块高是根据各第一目标节点的当前块高中最低块高确定的;
所述确定单元401,还用于根据所述目标块高从系统表项中确定目标合约账户;所述系统表项中记录有各合约账户被创建时的块高,所述目标合约账户被创建时的块高小于等于所述目标块高;
所述处理单元402,用于针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点;所述同步请求用于所述第一目标节点确定对应目标合约账户在所述目标块高上的状态数据并返回。
可选的,所述处理单元402还用于:
在所述针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点之后,在接收所述多个第一目标节点中每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据之后,计算第二状态树根哈希;
若所述第二状态树根哈希与第一状态树根哈希相同,则将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中;其中,所述第一状态树根哈希是各第一目标节点在所述目标块高上的状态树根哈希。
可选的,所述处理单元402还用于:
在所述将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中之后,从所述区块链网络中确定出当前块高高于所述目标块高的第二目标节点;
从所述第二目标节点中获取所述目标块高之后的第一区块;
执行所述第一区块中的交易,生成修改后的合约账户的状态数据,并将所述修改后的合约账户的状态数据更新至所述本地数据库中。
可选的,所述第一目标节点中包括第三目标节点;向所述第三目标节点发送的同步请求还用于所述第三目标节点确定系统状态数据,并将所述系统状态数据返回。
基于与上述图2所示的方法相同的构思,本申请还提供一种计算设备,如图5所示,该计算设备包括至少一个处理器520,用于实现本申请实施例提供的图2中任一方法。
计算设备500还可以包括至少一个存储器530,用于存储程序指令和/或数据。存储器530和处理器520耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理 器520可能和存储器530协同操作。处理器520可能执行存储器530中存储的程序指令。所述至少一个存储器中的至少一个可以包括于处理器中。
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。
应注意,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理电路(digital signal processor,DSP)、专用集成芯片(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
计算设备500还可以包括通信接口510,用于通过传输介质和其它设备进行通信,从而用于计算设备500中的装置可以和其它设备进行通信。在本申请实施例中,通信接口可以是收发器、电路、总线、模块或其它类型的通信接口。在本申请实施例中,通信接口为收发器时,收发器可以包括独立的接收器、独立的发射器;也可以集成收发功能的收发器、或者是接口电路。
计算设备500还可以包括通信线路540。其中,通信接口510、处理器520以及存储器530可以通过通信线路540相互连接;通信线路540可以是外设部件互连标准(peripheral  component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述通信线路540可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
基于同一发明构思,本发明实施例还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质中存储计算机指令,当其在计算机上运行时,使得计算机执行上述区块链节点同步的方法。
基于同一发明构思,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述区块链节点同步的方法。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (11)

  1. 一种区块链节点同步的方法,其特征在于,包括:
    从区块链网络中确定多个第一目标节点;各第一目标节点在目标块高上的状态树根哈希相同;所述目标块高是根据各第一目标节点的当前块高中最低块高确定的;
    根据所述目标块高从系统表项中确定目标合约账户;所述系统表项中记录有各合约账户被创建时的块高,所述目标合约账户被创建时的块高小于等于所述目标块高;
    针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点;所述同步请求用于所述第一目标节点确定对应目标合约账户在所述目标块高上的状态数据并返回。
  2. 如权利要求1所述的方法,其特征在于,在所述针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点之后,还包括:
    在接收所述多个第一目标节点中每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据之后,计算第二状态树根哈希;
    若所述第二状态树根哈希与第一状态树根哈希相同,则将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中;其中,所述第一状态树根哈希是各第一目标节点在所述目标块高上的状态树根哈希。
  3. 如权利要求2所述的方法,其特征在于,在所述将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中之后,还包括:
    从所述区块链网络中确定出当前块高高于所述目标块高的第二目标节点;
    从所述第二目标节点中获取所述目标块高之后的第一区块;
    执行所述第一区块中的交易,生成修改后的合约账户的状态数据,并将所述修改后的合约账户的状态数据更新至所述本地数据库中。
  4. 如权利要求1所述的方法,其特征在于,所述第一目标节点中包括第三目标节点;向所述第三目标节点发送的同步请求还用于所述第三目标节点确定系统状态数据,并将所述系统状态数据返回。
  5. 一种区块链节点同步的装置,其特征在于,包括:
    确定单元、处理单元;
    所述确定单元,用于从区块链网络中确定多个第一目标节点;各第一目标节点在目标块高上的状态树根哈希相同;所述目标块高是根据各第一目标节点的当前块高中最低块高确定的;
    所述确定单元,还用于根据所述目标块高从系统表项中确定目标合约账户;所述系统表项中记录有各合约账户被创建时的块高,所述目标合约账户被创建时的块高小于等于所述目标块高;
    所述处理单元,用于针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成同步请求并发送至所述第一目标节点;所述同步请求用于所述第一目标节点确定对应目标合约账户在所述目标块高上的状态数据并返回。
  6. 如权利要求5所述的装置,其特征在于,所述处理单元还用于:
    在所述针对每个第一目标节点,确定向所述第一目标节点请求的目标合约账户,生成 同步请求并发送至所述第一目标节点之后,在接收所述多个第一目标节点中每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据之后,计算第二状态树根哈希;
    若所述第二状态树根哈希与第一状态树根哈希相同,则将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中;其中,所述第一状态树根哈希是各第一目标节点在所述目标块高上的状态树根哈希。
  7. 如权利要求6所述的装置,其特征在于,所述处理单元还用于:
    在所述将所述每个第一目标节点返回的对应目标合约账户在所述目标块高上的状态数据存储至本地数据库中之后,从所述区块链网络中确定出当前块高高于所述目标块高的第二目标节点;
    从所述第二目标节点中获取所述目标块高之后的第一区块;
    执行所述第一区块中的交易,生成修改后的合约账户的状态数据,并将所述修改后的合约账户的状态数据更新至所述本地数据库中。
  8. 如权利要求5所述的装置,其特征在于,所述第一目标节点中包括第三目标节点;向所述第三目标节点发送的同步请求还用于所述第三目标节点确定系统状态数据,并将所述系统状态数据返回。
  9. 一种计算设备,其特征在于,包括处理器、存储器、通信接口,其中处理器、存储器与通信接口之间通过总线连接;
    所述处理器,用于读取所述存储器中的程序,执行权利要求1至4任一所述方法;
    所述存储器,用于存储一个或多个可执行程序,以及存储所述处理器在执行操作时所使用的数据。
  10. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行权利要求1至4任一所述方法。
  11. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1至4任一所述方法。
PCT/CN2020/116439 2019-10-21 2020-09-21 一种区块链节点同步的方法及装置 WO2021077962A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910999466.X 2019-10-21
CN201910999466.XA CN110737664B (zh) 2019-10-21 2019-10-21 一种区块链节点同步的方法及装置

Publications (1)

Publication Number Publication Date
WO2021077962A1 true WO2021077962A1 (zh) 2021-04-29

Family

ID=69270322

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/116439 WO2021077962A1 (zh) 2019-10-21 2020-09-21 一种区块链节点同步的方法及装置

Country Status (2)

Country Link
CN (1) CN110737664B (zh)
WO (1) WO2021077962A1 (zh)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110059089B (zh) * 2019-03-27 2021-01-22 深圳前海达闼云端智能科技有限公司 数据同步方法、装置、存储介质及电子设备
CN110737664B (zh) * 2019-10-21 2022-11-25 深圳前海微众银行股份有限公司 一种区块链节点同步的方法及装置
CN111432009B (zh) * 2020-03-30 2023-04-07 深圳壹账通智能科技有限公司 一种区块链数据的同步方法、装置及电子设备、存储介质
SG11202102371QA (en) * 2020-04-15 2021-04-29 Alipay Hangzhou Inf Tech Co Ltd Distributed blockchain data storage under account model
WO2020143853A2 (en) 2020-04-20 2020-07-16 Alipay (Hangzhou) Information Technology Co., Ltd. Distributed blockchain data storage under account model
CN111949634A (zh) * 2020-08-07 2020-11-17 广州科创空间信息科技有限公司 一种区块链数据同步迁移的方法
CN111934996B (zh) 2020-09-25 2021-01-12 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN111935000B (zh) 2020-09-25 2021-01-08 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN111934990B (zh) 2020-09-25 2021-02-09 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN112968967B (zh) * 2020-09-25 2023-05-19 支付宝(杭州)信息技术有限公司 区块同步方法及装置
CN111934997B (zh) 2020-09-25 2021-01-12 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN112968969B (zh) 2020-09-25 2023-05-12 支付宝(杭州)信息技术有限公司 区块链系统、消息传输方法及装置
CN113079079B (zh) 2020-09-25 2022-08-02 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN113079082B (zh) 2020-09-25 2022-02-18 支付宝(杭州)信息技术有限公司 消息传输方法及装置
CN113364847B (zh) * 2021-05-31 2022-07-19 新疆大学 区块链节点的数据同步方法、装置及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107103054A (zh) * 2017-04-12 2017-08-29 北京航空航天大学 一种私有区块链的智能合约异步执行存储系统与实现方法
CN107332876A (zh) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 区块链状态的同步方法及装置
KR20180086679A (ko) * 2017-01-23 2018-08-01 주식회사 데일리인텔리전스 블록체인 네트워크를 이용해서 사용자를 인증하고 블록을 동기화하는 시스템 및 방법
CN109063109A (zh) * 2018-07-27 2018-12-21 电子科技大学 一种基于以太坊的数据查询系统
CN109086325A (zh) * 2018-06-29 2018-12-25 阿里巴巴集团控股有限公司 基于区块链的数据处理方法和装置
CN110737664A (zh) * 2019-10-21 2020-01-31 深圳前海微众银行股份有限公司 一种区块链节点同步的方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10255342B2 (en) * 2017-04-12 2019-04-09 Vijay K. Madisetti Method and system for tuning blockchain scalability, decentralization, and security for fast and low-cost payment and transaction processing
GB2572627A (en) * 2018-04-05 2019-10-09 Electroneum Ltd Hybrid blockchain transaction system
CN110400142B (zh) * 2018-06-01 2021-06-25 腾讯科技(深圳)有限公司 数据处理方法、装置及存储介质
CN109325039A (zh) * 2018-06-07 2019-02-12 海南新软软件有限公司 一种区块链浏览器及区块链信息浏览方法
CN109522362B (zh) * 2018-10-17 2020-09-15 北京瑞卓喜投科技发展有限公司 基于区块链数据的非完全数据同步方法、系统及设备
CN109587263B (zh) * 2018-12-20 2021-08-03 众安信息技术服务有限公司 一种区块同步方法及系统
CN109714412B (zh) * 2018-12-25 2021-08-10 深圳前海微众银行股份有限公司 区块同步方法、装置、设备及计算机可读存储介质
CN110113408B (zh) * 2019-04-30 2020-08-14 杭州复杂美科技有限公司 一种区块同步方法、设备和存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180086679A (ko) * 2017-01-23 2018-08-01 주식회사 데일리인텔리전스 블록체인 네트워크를 이용해서 사용자를 인증하고 블록을 동기화하는 시스템 및 방법
CN107103054A (zh) * 2017-04-12 2017-08-29 北京航空航天大学 一种私有区块链的智能合约异步执行存储系统与实现方法
CN107332876A (zh) * 2017-05-31 2017-11-07 深圳前海微众银行股份有限公司 区块链状态的同步方法及装置
CN109086325A (zh) * 2018-06-29 2018-12-25 阿里巴巴集团控股有限公司 基于区块链的数据处理方法和装置
CN109063109A (zh) * 2018-07-27 2018-12-21 电子科技大学 一种基于以太坊的数据查询系统
CN110737664A (zh) * 2019-10-21 2020-01-31 深圳前海微众银行股份有限公司 一种区块链节点同步的方法及装置

Also Published As

Publication number Publication date
CN110737664A (zh) 2020-01-31
CN110737664B (zh) 2022-11-25

Similar Documents

Publication Publication Date Title
WO2021077962A1 (zh) 一种区块链节点同步的方法及装置
WO2021068728A1 (zh) 一种区块的状态树的生成和链上数据验证的方法及装置
KR102431459B1 (ko) 블록체인 스마트 계약 검증 방법, 장치 및 저장 매체
WO2021027531A1 (zh) 一种区块链交易记录的处理方法及装置
US20220141018A1 (en) Method and system for an efficient consensus mechanism for permissioned blockchains using audit guarantees
WO2020248982A1 (zh) 一种区块链中交易处理的方法及装置
WO2018161760A1 (zh) 区块链数据存储系统和方法
US9483386B2 (en) Information interaction test device and method based on automatic generation of associated test cases
CN112887437B (zh) 区块链交易处理方法、区块链节点和区块链系统
WO2020082576A1 (zh) 区块链事务处理的装置、方法及存储介质
CN105447046A (zh) 一种分布式系统数据一致性处理方法、装置和系统
CN106649828B (zh) 一种数据查询方法及系统
WO2021169169A1 (zh) 资源转移数据核对方法、装置、计算机设备和存储介质
CN111190901B (zh) 业务数据存储方法、装置、计算机设备和存储介质
WO2020244237A1 (zh) 一种块链式账本中的验证方法、装置及设备
WO2020042813A1 (zh) 一种分布式数据连接处理方法、装置、设备及存储介质
US11288274B1 (en) System and method for storing data for, and providing, rapid database join functions and aggregation statistics
WO2019033741A1 (zh) 投资产品的资源处理方法、装置、存储介质和计算机设备
CN111899019A (zh) 一种黑名单多方交叉验证和共享的方法及系统
CN112184436B (zh) 数据同步方法、电子设备及可读存储介质
CN110505084B (zh) 一种区块链打包节点共识推举方法
WO2021196463A1 (zh) 一种区块链数据的同步方法、装置及电子设备、存储介质
WO2021115002A1 (zh) 一种区块链交易记录的处理方法及装置
CN106445933A (zh) 一种数据处理方法和系统
CN112634034B (zh) 预约方法、装置、电子设备及计算机可读存储介质

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.08.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20879490

Country of ref document: EP

Kind code of ref document: A1