Blockchain system using state trie node, and mining method therefor

The blockchain mining method using state trie nodes addresses the performance issues and dominance concerns by generating nonce values for changed nodes, enhancing network security and transaction efficiency.

WO2024181793A1PCT designated stage expired Publication Date: 2024-09-06SEOUL NATIONAL UNIVERSITY R&DB FOUNDATION
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/002568
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-28
Filing Date
2024-02-28
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The large size of the state database in account-based blockchains, which uses the Merkle Patricia Trie data structure, leads to performance degradation during transactions due to the need to access and store trie nodes with random key values, and the conventional proof-of-work consensus algorithm allows mining pools to dominate the network, threatening the stability of the blockchain.

Method used

A blockchain mining method using state trie nodes, where a specific node device generates a nonce value for each second node changed in a block, ensuring the hash value derived from this nonce value and the node satisfies preset criteria, thereby improving mining pool resistance and transaction synchronization speed.

Benefits of technology

This method enhances the security of the blockchain network by making it difficult for mining pools to dominate and improves transaction verification efficiency by reducing the overhead of verifying all nodes, especially for light clients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024002568_06092024_PF_FP
    Figure KR2024002568_06092024_PF_FP
Patent Text Reader

Abstract

One embodiment of the present invention provides a blockchain mining method using state trie nodes. The present invention relates to a mining method performed by means of node devices connected to a blockchain network, the method comprising steps in which a specific node device: acquires a first block including a first trie node related to specific state data of a blockchain network, and a transaction including state change data for changing the state of a specific account; generates, on the basis of the transaction and the first trie node, a second block including a second trie node; and generates a nonce value for a second node corresponding to a state path, which is the path to a specific route node from a specific leaf node corresponding to the specific account, from among one or more second nodes included in the second trie node, so as to determine, on the basis of the generated nonce value and the second node corresponding to the state path, whether a derived hash value satisfies preset criteria.
Need to check novelty before this filing date? Find Prior Art

Description

Blockchain system using state trie nodes and its mining method

[0001] The present invention relates to a blockchain system using a state trie node and a mining method thereof, and more particularly, to a blockchain system using a state trie node and a mining method thereof, wherein a specific node device generates a second block based on a first block and a transaction, generates a nonce value for each of second nodes changed in the first block among one or more second nodes included in a second trie node of the second block, and determines whether a hash value of the second node derived based on the nonce value and the second node satisfies a preset criterion.

[0002] Blockchain is a technology that collects data into blocks and links them together to create a chain in a peer-to-peer (P2P) manner. More specifically, blockchain is a technology in which servers are operated by users and data is stored in a distributed manner, preventing attackers from arbitrarily modifying the data. Furthermore, blockchain uses hash functions and digital signatures to ensure data integrity and reliability. Blockchain is currently being used in various ways, including smart contracts, cryptocurrencies, and personal information authentication.

[0003] Account-based blockchains like Ethereum store state data, which stores account data, in their blockchain state database using the Merkle Patricia Trie data structure. The trie data structure of an account-based blockchain includes leaf nodes, where accounts are stored, intermediate nodes containing path data that identifies the path to the account address, and a root node.

[0004] When a transaction is executed for a specific block in an account-based blockchain, a new block is created with the nodes of the trie node corresponding to the account affected by the transaction changed. More specifically, the new block includes a newly created trie node, which includes the leaf node for the account affected by the transaction in the specific block, and the intermediate and root nodes of the specific block corresponding to the path of the changed account. The trie node of the new block calculates hash values ​​for each node in the order of the newly created leaf node, intermediate node, and root node. The hash values ​​of each node in the trie node serve as pointers to the trie node. The newly created nodes in the new block are stored in the state database using their respective hash values ​​as keys. Since the nodes that are not changed in the new block are stored in the state database, the account status can be tracked by accessing the trie node of the specific block preceding the new block.

[0005] In blockchains with this architecture, the state database, where state data is stored, is so large that it accounts for the majority of the entire blockchain data. Consequently, when performing a transaction for a specific block, reading a trie node from the state database or storing a new trie node requires accessing the state database using a random key value (a hash value), resulting in significant performance degradation on the device performing the transaction.

[0006] The traditional proof-of-work consensus algorithm for account-based blockchains requires miners to find a nonce that ensures that the hash value of the block header, which includes a nonce field, satisfies certain conditions. Miners receive blocks as a reward by calculating the nonce that ensures that the hash value of the block header of a newly created block satisfies these conditions. The stability of a blockchain is achieved by the network of miners calculating the nonce for the proof-of-work. In a blockchain, mining power can mean having more opportunities to be the first to calculate the nonce required for the proof-of-work. Miners are forming mining pools to pool their mining power. As the size of mining pools grows, their hash power for calculating nonce values ​​on the blockchain network also increases. If a mining pool's hash power exceeds 50% of the blockchain network, it can dominate the network of an account-based blockchain. Therefore, a method to suppress the hash power of mining pools is needed.

[0007] The present invention is intended to solve the above-mentioned problem, and provides a blockchain system using a state trie node and a mining method thereof, in which a specific node device generates a second block based on a first block and a transaction, generates a nonce value for each of the second nodes changed in the first block among one or more second nodes included in a second trie node of the second block, and determines whether the hash value of the second node derived based on the nonce value and the second node satisfies a preset standard.

[0008] The technical problems to be solved by the present invention are not limited to the technical problems described above, and other technical problems of the present invention can be derived from the following description.

[0009] As a technical means for solving the above-described technical problem, according to one aspect of the present invention, a blockchain mining method using a state trie node is provided. The method is a mining method performed by node devices connected to a blockchain network, comprising: a step in which a specific node device obtains a first block including a first trie node regarding specific state data of the blockchain network and a transaction including state change data for changing the state of a specific account; a step in which the specific node device generates a second block including a second trie node based on the transaction and the first trie node; and a step in which the specific node device generates a nonce value for a second node corresponding to a state path, which is a path from a specific leaf node corresponding to the specific account to a specific root node among one or more second nodes included in the second trie node, and determines whether a hash value derived based on the generated nonce value and the second node corresponding to the state path satisfies a preset criterion.

[0010] In addition, as a technical means for solving the above-described technical problem, according to another aspect of the present invention, a blockchain system using a state tree node is provided. The system includes at least one processor and a memory electrically connected to the processor and storing at least one code to be executed by the processor, wherein the memory stores a code that, when executed through the processor, causes the processor to obtain a first block including a first tree node regarding specific state data of a blockchain network and a transaction including state change data for changing the state of a specific account, generate a second block including a second tree node based on the transaction and the first tree node, and generate a nonce value for a second node corresponding to a state path, which is a path from a specific leaf node corresponding to the specific account to a specific root node among one or more second nodes included in the second tree node, and determine whether a hash value derived based on the generated nonce value and the second node corresponding to the state path satisfies a preset criterion.

[0011] According to the above-described problem solving means of the present invention, unlike the conventional method in which a miner finds a nonce value that makes the hash value of the block header of a block newly created by a transaction satisfy a specific condition, the miner must find a nonce value that makes the hash value of each of the nodes among one or more nodes included in the trie node of a newly created block that have been changed by the transaction in the previous block satisfy a preset condition, so that the mining pool resistance can be increased.

[0012] In addition, according to the present invention, when a verification request for the account information of the light client and a specific block is received from a light client, verification is performed on the leaf nodes corresponding to the account information of the light client among the nodes changed by the transaction in the previous block and the nodes associated with the leaf nodes, thereby making it difficult to falsify the account of the light client.

[0013] In addition, according to the present invention, the transaction synchronization speed can be improved by making the prefix of the hash value of each of the nodes changed by the transaction in the previous block among one or more nodes included in the trie node of the newly created block the same as the block number of the newly created block.

[0014] FIG. 1 is a diagram showing a blockchain system using a state tree node according to one embodiment of the present invention and node devices communicating with a blockchain network.

[0015] Figure 2 is a block diagram illustrating the configuration of a blockchain system using the state tree node illustrated in Figure 1.

[0016] FIG. 3 is a diagram showing an example of performing a proof-of-work consensus algorithm through a blockchain system using the state tree node illustrated in FIG. 1.

[0017] Figure 4 is a diagram showing an example of a mining pool.

[0018] FIG. 5 is a flowchart illustrating a blockchain mining method using a state tree node according to another embodiment of the present invention.

[0019] Figures 6 to 8 are flowcharts showing detailed steps included in the steps of the blockchain mining method using the state tree node illustrated in Figure 5.

[0020] FIG. 9 is a flowchart illustrating an additional step of a blockchain mining method using the state tree node illustrated in FIG. 5.

[0021] Hereinafter, the present invention will be described in detail with reference to the attached drawings. However, the present invention can be implemented in various different forms and is not limited to the embodiments described herein. In addition, the attached drawings are only intended to facilitate understanding of the embodiments disclosed in this specification, and the technical ideas disclosed in this specification are not limited by the attached drawings. All terms, including technical and scientific terms, used herein should be interpreted as having meanings generally understood by a person of ordinary skill in the technical field to which the present invention pertains. Terms defined in the dictionary should be interpreted as having additional meanings consistent with the related technical literature and the presently disclosed content, and shall not be interpreted in an extremely ideal or restrictive sense unless otherwise defined.

[0022] In order to clearly explain the present invention in the drawings, parts irrelevant to the description have been omitted, and the size, shape, and appearance of each component shown in the drawings may be modified in various ways. Identical / similar parts throughout the specification are given identical / similar drawing reference numerals.

[0023] The suffixes "module" and "part" used in the following description for components are given or used interchangeably solely for the convenience of writing the specification, and do not in themselves have distinct meanings or roles. In addition, when describing the embodiments disclosed in this specification, if a detailed description of a related known technology is judged to obscure the gist of the embodiments disclosed in this specification, the detailed description thereof has been omitted.

[0024] Throughout the specification, when a part is said to be "connected (connected, in contact with, or coupled)" to another part, this includes not only cases where it is "directly connected (connected, in contact with, or coupled)" but also cases where it is "indirectly connected (connected, in contact with, or coupled)" with another member in between. Furthermore, when a part is said to "include (have or provide)" a certain component, this does not mean that it excludes other components, but rather that it may "include (have or provide)" other components, unless otherwise specifically stated.

[0025] As used herein, ordinal terms such as "first," "second," etc., are used solely to distinguish one component from another and do not limit the order or relationship of the components. For example, the first component of the present invention may be referred to as the "second component," and similarly, the second component may also be referred to as the "first component." As used herein, singular expressions should be construed to include plural expressions, unless explicitly stated otherwise.

[0026] The communication module described below may include a device including hardware and software necessary for transmitting and receiving signals such as control signals or data signals through wired or wireless connections with other network devices. In addition, the memory may store at least one of information and data input to the communication module, information and data necessary for functions performed by the processor, and data generated according to the execution of the processor. The memory should be interpreted as a general term for non-volatile storage devices that continue to retain stored information even when no power is supplied and volatile storage devices that require power to retain stored information. In addition to volatile storage devices that require power to retain stored information, the memory may include magnetic storage media or flash storage media, but the scope of the present invention is not limited thereto. The processor may include various types of devices that control and process data. The processor may mean a data processing device built into hardware that has a physically structured circuit to perform a function expressed by code or instructions included in a program. In one example, the processor may be implemented in the form of a microprocessor, a central processing unit (CPU), a processor core, a multiprocessor, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), etc., but the scope of the present invention is not limited thereto.

[0027] FIG. 1 is a diagram showing a blockchain system (hereinafter referred to as “blockchain system (100)”) using a state tree node according to one embodiment of the present invention and node devices (200, 300) being connected to a blockchain network for communication.

[0028] Referring to FIG. 1, a blockchain system (100) may be interconnected with a blockchain network via a wired or wireless communication network, and may be interconnected with node devices (200, 300) via the blockchain network. The blockchain system (100) may be formed as a cloud computing server such as SaaS (Software as a Service), PaaS (Platform as a Service), or IaaS (Infrastructure as a Service). The blockchain system (100) may be another node device. The configuration, function, and operation of the blockchain system (100) described below may also be performed in the same manner by the node devices (200, 300). The node devices (200, 300) may refer to all types of handheld-based wireless communication devices, such as, for example, a notebook computer, desktop computer, laptop computer equipped with a web browser, a wireless communication device that ensures portability and mobility, a smartphone, a tablet PC including a touchpad, etc. A communications network can be implemented as a wired network such as a Local Area Network (LAN), a Wide Area Network (WAN), or a Value Added Network (VAN), or any type of wireless network such as a mobile radio communication network or a satellite communication network.

[0029] The node devices (200, 300) may be a client node device (200) and a mining node device (300).

[0030] The client node device (200) includes a communication module, a memory, an input / output module, and a processor. The communication module of the client node device (200) can transmit and receive information with a blockchain network. The memory of the client node device (200) stores a blockchain program. The name of the blockchain program is set for convenience of explanation, and the name itself does not limit the function of the program. The memory of the client node device (200) may be configured to store at least one of data input to the communication module of the client node device (200), data required for a function performed by the processor of the client node device (200), and data generated according to the execution of the processor of the client node device (200). The input / output module of the client node device (200) may receive information, data, etc. transmitted to the client node device (200) from the outside, or output information, data, etc. held by the client node device (200) to the outside. For example, the input / output module of the client's node device (200) may include a display, a touchpad, a speaker, and a microphone.

[0031] The processor of the client's node device (200) is configured to execute a blockchain program stored in memory to perform the following functions and procedures.

[0032] The processor of the client's node device (200) can generate a transaction and transmit the generated transaction to the blockchain network. The processor of the client's node device (200) can transmit a request for proof of a block generated by the transaction to the blockchain network.

[0033] The mining node device (300) may be an operator device of a mining pool or a miner node device of a mining pool. It includes a communication module, a memory, an input / output module, and a processor. The communication module of the mining node device (300) can transmit and receive information with a blockchain network. The memory of the mining node device (300) stores a blockchain mining program. The name of the blockchain mining program is set for convenience of explanation, and the name itself does not limit the function of the program. The memory of the mining node device (300) may be configured to store at least one of data input to the communication module of the mining node device (300), data required for a function performed by the processor of the mining node device (300), and data generated according to the execution of the processor of the mining node device (300). The input / output module of the mining node device (300) can receive information, data, etc. transmitted from the outside to the mining node device (300), or output information, data, etc. held by the mining node device (300) to the outside. For example, the input / output module of the mining node device (300) can include a display, a touchpad, a speaker, a microphone, etc.

[0034] The processor of the mining node device (300) is configured to execute a blockchain program stored in memory to perform the following functions and procedures.

[0035] The processor of the mining node device (300) receives information about a new block generated by a transaction. The new block includes state data and a block, and the state data is stored as a trie node including one or more nodes. The processor of the mining node device (300) derives a nonce value such that the hash value of each of one or more nodes included in the newly generated trie node, which is different from the trie node of the previous block, satisfies a preset criterion. The processor of the mining node device (300) transmits the nonce value for the newly generated block to the blockchain network and receives a reward.

[0036] FIG. 2 is a block diagram illustrating the configuration of a blockchain system (100), and FIG. 3 is a diagram illustrating an example of performing a proof-of-work consensus algorithm through a blockchain system (100).

[0037] Referring to FIGS. 2 and 3 together, the blockchain system (100) includes at least one processor (130) and memory (140), and may further include a communication module (110) and a database (120).

[0038] The communication module (110) can transmit and receive data necessary to perform a state tree node proof-of-work consensus algorithm by transmitting and receiving information with an external device or server.

[0039] The database (120) may be a place where data required to perform the state trie node proof-of-work consensus algorithm is stored. The database (120) may be built in a portion of the memory (140) or implemented as separate hardware.

[0040] The processor (130) performs operations according to the code stored in the memory (140).

[0041] The memory (140) is electrically connected to the processor (130) and stores at least one code to be executed by the processor (130). The memory (140) stores code that, when executed by the processor (130), causes the processor (130) to perform the following functions and procedures.

[0042] The memory (140) stores a first block (400) including a first trie node (430) regarding specific state data of a blockchain network and code that causes a transaction to be acquired. The transaction may correspond to data and information for changing or updating the state of a trie node included in a tree structure. The tree structure may be a Merkle Patricia Trie data structure. The transaction includes state change data for changing the state of a specific account. The state change data includes the address of the specific account and the number of transactions. The transaction may be acquired from the blockchain mempool. The transaction is a new transaction not included in the first block.

[0043] The memory (140) stores code that causes a second block (500) to be generated that includes a second trie node (530) based on a transaction and a first trie node (430). The memory (140) generates a second block (500) by performing a transaction, and stores a transaction list that includes one or more transactions performed with the second trie node (530) in the second block (500). The memory (140) can generate a second trie node (530) that is generated by changing a transaction based on the first trie node (430) of the first block. More specifically, the memory (140) stores code that causes a first node corresponding to a state path, which is a path from a specific leaf node corresponding to a specific account to be changed through state change data of a transaction, to a specific root node, among the first nodes (431 to 439) included in the first trie node (430) of the first block (400). The memory (140) stores code that causes a second node corresponding to the state path to be created based on a first node corresponding to the state path, using state change data and a state path. More specifically, the memory (140) stores code that causes the memory to create account information of a leaf node corresponding to a specific account to be changed in the state change data based on the first node corresponding to the state path, or, if there is no leaf node corresponding to the specific account to be changed in the state change data among the first nodes corresponding to the state path, to create a leaf node for the specific account according to the state path based on the state change data. The memory (140) stores code that causes the memory to search for a sibling node for the second node corresponding to the state path. A sibling node for the second node corresponding to the state path is a node that has the same parent node as the second node corresponding to the state path.More specifically, the memory (140) stores code that causes the memory to search for a modified sibling node among the sibling nodes of the second node corresponding to the state path. For example, the sibling node of the leaf node (537) is the leaf node (437), and the sibling nodes of the intermediate node (535) are the leaf node (435) and the leaf node (534). The memory (140) stores code that causes the memory to generate a second trie node (530) by associating the searched sibling node with the second node corresponding to the state path.

[0044] For example, if the state path, which is a path from a specific leaf node corresponding to a specific account to be changed through the status change data of a transaction to a specific root node, is path data for a path from a root node (431) including hash A to a leaf node (436) including hash (a1) and a path from a root node (431) including hash A to a leaf node (438) including hash (a3), then the path from the root node (431) to the leaf node (436) is ' / 2 / 9', and the path from the root node (431) to the leaf node (438) is ' / b / 6 / 1', so the first node corresponding to the state path is the root node (431) including hash A, the intermediate node (432) including hash B, the leaf node (436), the intermediate node (433) including hash C, the intermediate node (434) including hash D, and the leaf node (438). Among the first nodes corresponding to the state path, leaf nodes (436, 438) are modified by the state change data of the transaction, and leaf nodes (534, 538) are generated. If the data of a specific leaf node (537) is generated by the state change data of the transaction, and the state path is '2 / a / 5 / b', which is the path of the specific leaf node (537), there is no leaf node corresponding to the specific leaf node (537) among the 1 nodes, so the specific leaf node (537) can be generated by adding it to the first nodes. The newly generated nodes in the second block (500) are stored in the blockchain state database, but the existing nodes that have not been changed remain in the state database, so the first try node (430) in the previous block (400) of the second block (500) is still accessible.

[0045] The first nodes (431 to 439) included in the first block (400) and the second nodes (435, 437, 439, 531 to 538) included in the second block include at least one of a root node (431, 531), an intermediate node (432, 433, 434, 532, 533, 535, 536), and a leaf node (435, 436, 437, 438, 439, 537, 538). The root node is associated with the intermediate node as a child node, or with the leaf node as a child node. For example, the child nodes of the root node (431) whose hash value is hash A are the intermediate node (432) whose hash value is hash B, and the intermediate node (433) whose hash value is hash C. An intermediate node is associated with other intermediate nodes as child nodes, or with leaf nodes as child nodes. For example, the child nodes of an intermediate node (532) whose hash value is hash F are a leaf node (435) whose hash value is hash(a0), a leaf node (534) whose hash value is hash(a1), and an intermediate node (535) whose hash value is hashG. The root node and the intermediate nodes include path data for the child nodes, a nonce field into which a nonce value is input, and a hash value. For example, the root node (431) whose hash value is Hash A includes path data such as {2: hash B, b: hash C} and a nonce field. The leaf nodes include account information including an account (Account, 541), an address (Address, 543), a balance (Balance, 544), and the number of transactions (545), and a nonce field (546) into which a nonce value is input, and a hash value. The hash value of a leaf node is stored in a field (codeHash) that stores the hash value of the code if the account is a smart contract. If the account is a smart contract, the leaf node also includes a field (storageRoot) that stores the storage tree. The hash value of an intermediate node is calculated based on the hash value of each of its child nodes, as well as the nonce value entered in the nonce field of the intermediate node, based on the path data of the intermediate node.The hash value of the root node is calculated based on the hash value of each of the child nodes associated with the root node's path data and the nonce value entered in the nonce field of the root node. The hash value of a leaf node is calculated based on the account information of the leaf node and the nonce value entered in the nonce field of the leaf node.

[0046] The memory (140) stores code that causes a second node corresponding to a state path, which is a path from a specific leaf node corresponding to a specific account that is changed through the state change data of a transaction among one or more second nodes included in the second trie node (530), to a specific root node, to generate a nonce value. The memory (140) stores code that causes a determination to be made as to whether a hash value derived based on the generated nonce value and the second node corresponding to the state path satisfies a preset criterion. The memory (140) can generate a nonce value for the second node corresponding to the state path and insert the nonce value into a nonce field of the second node corresponding to the state path to derive a hash value. More specifically, the memory (140) stores code that causes a first leaf node, which is a leaf node included in the second nodes, to generate a nonce value and determine whether a hash value of the first leaf node derived based on the nonce value and account information of the first leaf node satisfies the preset criterion. The first leaf node may be a plurality of leaf nodes (534, 537, 538), and the hash value of the first leaf node is a hash value for each of the plurality of leaf nodes (534, 537, 538). The memory (140) stores a code that causes a hash value of the first parent node associated with the first leaf node to be generated when the hash value of the first leaf node satisfies a preset criterion, and to determine whether the hash value of the first parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the first parent node satisfies the preset criterion. If the hash value of the first parent node satisfies a preset criterion and there is a second parent node associated with the first parent node, the memory (140) stores code that causes a nonce value to be generated for the second parent node and determines whether the hash value of the second parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the second parent node satisfies the preset criterion.The first parent node and the second parent node are intermediate nodes included in the second node or root nodes included in the second node. If the first parent node or the second parent node is a root node included in the second node, the memory (140) stores a code that causes a hash value for a state root included in a block header of the second block (500) to be derived based on the hash value of the root node included in the second node if the hash value of the root node included in the second node satisfies a preset criterion. The first block (400) and the second block (500) further include block numbers (410, 510). The block number (510) of the second block (500) has a value greater than the block number of the first block (400). The preset criterion may be a criterion that causes the hash value to have a smaller hash value than a hash value that satisfies a preset difficulty. The preset criteria may further include a criterion that the prefix of the hash value is identical to the block number of the block (second block (500)) newly created by the transaction in the previous block (first block (400)).

[0047] The memory (140) stores a code that causes the second block (500) to be transmitted to the blockchain network when the hash value of the second node corresponding to the state path satisfies a preset criterion.

[0048] When the memory (140) receives a request for verification for a second block (500) from a node device (200, 300) or another node device, a code is stored that causes the second nodes of the second block (500) to verify whether the hash value of each node satisfies a preset criterion. Since the verification of each second node can be performed in parallel, verification overhead can be reduced.

[0049] When the node device (200, 300) and another node device are node devices of a light client and receive a verification request for the account information of the light client and the second block (500) from the node device of the light client, the memory (140) stores a code that causes the second nodes of the second block (500) to verify whether the hash value of the leaf node corresponding to the account information and the hash value of one or more nodes including the path data for the corresponding leaf node satisfy a preset standard. Through this, in the case of a light client that lacks resources for block verification or a smart contract of another blockchain for compatibility, the validity of the verification can be maintained while reducing overhead by verifying only the leaf node corresponding to the account information of the light client and one or more nodes including the path data for the corresponding leaf node. For example, if a particular block changed 200 accounts, which resulted in the creation of a new trie node that created 1300 new nodes, a light client would not need to verify all 1300 nodes, but would only verify the two leaf nodes for the light client's accounts and the 18 nodes that contain path data for those leaf nodes (at least one intermediate node and one root node).

[0050] Figure 4 is a diagram showing an example of a mining pool.

[0051] Referring to FIG. 4, a mining pool includes an operator device (600) and a plurality of miner node devices (700). The operator device (600) is communicatively connected to a blockchain network. A plurality of miner node devices (700) are communicatively connected to the operator device (600). The conventional operator device (600) transmits a block header of a block to be mined to the plurality of miner node devices (700). When the operator device (600) receives a nonce value that makes the hash value of the block header of the block to be mined from a specific miner node device (700) among the plurality of miner node devices (700) smaller than a hash value that satisfies a specific difficulty, the operator device (600) stops the nonce value calculation for the corresponding block to the plurality of miner node devices (700) and provides a reward to the plurality of miner node devices (700) according to their contribution to the nonce value calculation.

[0052] Meanwhile, the state tri-node proof-of-work consensus algorithm of the present invention, when a block is created by a transaction, must produce a nonce value that ensures that the hash value of each of one or more nodes changed from a previous block, where state data is stored as a tri-node including one or more nodes, satisfies a preset standard in order to prove the work for the block. In addition, the state tri-node proof-of-work consensus algorithm of the present invention can enhance the security of the network by forcing a plurality of miner node devices (700) to have a block header and a portion of the state tri-node data of the blockchain. For example, in order to mine the current block including a tri-node where 1,000 nodes have changed from a previous block, network communication between the operator device (600) of the mining pool and the plurality of miner node devices (700) is required 1,000 times each. Through this, the blockchain system (100) can reduce the utility of the mining pool by increasing the network overhead of the mining pool, the network bandwidth usage, the computational load of the miner node devices (700), and the network usage. That is, you can gain resistance to mining pools.

[0053] FIG. 5 is a flowchart illustrating a blockchain mining method using a state trie node according to another embodiment of the present invention, FIGS. 6 to 8 are flowcharts illustrating detailed steps included in the steps of the blockchain mining method using a state trie node, and FIG. 9 is a flowchart illustrating additional steps of the blockchain mining method using a state trie node. Hereinafter, a blockchain mining method using a state trie node will be described with reference to FIGS. 5 to 9. Each step of the blockchain mining method using a state trie node to be described below can be performed by the blockchain system (100) using the state trie node described above with reference to FIGS. 1 to 4. Therefore, the contents of the embodiments of the present invention described above with reference to FIGS. 1 to 4 can be equally applied to the embodiments to be described below, and any description overlapping with the above description will be omitted below. The steps described below do not necessarily have to be performed in order, the order of the steps can be set in various ways, and the steps can be performed almost simultaneously.

[0054] Referring to FIG. 5, a blockchain mining method using a state tree node is a mining method performed by node devices connected to a blockchain network, and includes a transaction acquisition step (S1100), a block generation step (S1200), and a hash value derivation step (S1300), and may further include a block transmission step (S1400).

[0055] The transaction acquisition step (S1100) is a step in which a specific node device acquires a transaction including a first block containing a first trie node regarding specific state data of a blockchain network and state change data for changing the state of a specific account. The state change data includes the address and transaction count of the specific account.

[0056] The block generation step (S1200) is a step in which a specific node device generates a second block including a second trie node based on a transaction and a first trie node. The first node included in the first block and the second node included in the second block include at least one of a root node, an intermediate node, and a leaf node. The root node is associated with the intermediate node as a child node, or with a leaf node as a child node. The intermediate node is associated with another intermediate node as a child node, or with a leaf node as a child node. The root node and the intermediate node include path data for the child node, a nonce field into which a nonce value is input, and a hash value. The leaf node includes account information including an account, an address, a balance, and the number of transactions, a nonce field into which a nonce value is input, and a hash value. The hash value of the intermediate node is calculated based on the hash value of each of one or more child nodes associated with the path data of the intermediate node and the nonce value input into the nonce field of the intermediate node. The hash value of the root node is calculated based on the hash value of each of the child nodes associated with the root node's path data and the nonce value entered in the nonce field of the root node. The hash value of the leaf node is calculated based on the account information and the nonce value entered in the nonce field of the leaf node.

[0057] The hash value derivation step (S1300) is a step in which a specific node device generates a nonce value for a second node corresponding to a state path from a specific leaf node corresponding to a specific account to be changed through transaction state change data among one or more second nodes included in a second trie node to a specific root node, and determines whether the derived hash value based on the generated nonce value and the second node corresponding to the state path satisfies a preset criterion. The first block and the second block further include block numbers. The block number of the second block has a value greater than the block number of the first block. The preset criterion may be a criterion that the hash value has a smaller hash value than a hash value that satisfies a preset difficulty. The preset criterion may further include a criterion that the prefix of the hash value is identical to the block number of the second block.

[0058] The block transmission step (S1400) is a step in which a specific node device transmits a second block to the blockchain network if the hash value of the second node corresponding to the state path satisfies a preset criterion.

[0059] Referring to FIG. 6, the block generation step (S1200) includes a node search step (S1210), a node generation step (S1220), a sibling node search step (S1230), and a trie node generation step (S1240).

[0060] The node search step (S1210) is a step in which a specific node device searches for a first node corresponding to a state path, which is a path from a specific leaf node corresponding to a specific account to be changed through the state change data of a transaction among the first nodes included in the first trie node to a specific root node. The node creation step (S1220) is a step in which a specific node device creates a second node corresponding to the state path based on the first node corresponding to the state path using the state change data and the state path. The sibling node search step (S1230) is a step in which a specific node device searches for a sibling node for the second node corresponding to the state path. The trie node creation step (S1240) is a step in which a specific node device creates a second trie node by associating the searched sibling node with the second node corresponding to the state path. The sibling node searched for in the second trie node is a second node that does not correspond to the state path.

[0061] Referring to FIG. 7, the node creation step (S1220) includes a leaf node creation step (S1221) and a leaf node addition step (S1222).

[0062] The leaf node creation step (S1221) is a step in which a specific node device creates account information of a leaf node corresponding to a specific leaf node of state change data in the first node corresponding to the state path. The leaf node addition step (S1222) is a step in which a specific node device creates a leaf node by adding it according to the state path when there is no leaf node corresponding to a specific leaf node of state change data in the first node corresponding to the state path.

[0063] Referring to Fig. 8, the hash value derivation step (S1300) includes a hash value determination step of a leaf node (S1310), a hash value determination step of a first parent node (S1320), a hash value determination step of a second parent node (S1330), and a state root hash value derivation step (S1340).

[0064] The step of determining the hash value of the leaf node (S1310) is a step in which a specific node device generates a nonce value for the first leaf node, which is a leaf node included in the second nodes, and determines whether the hash value of the first leaf node derived based on the nonce value and the account information of the first leaf node satisfies a preset standard.

[0065] The step of determining the hash value of the first parent node (S1320) is a step of generating a nonce value for the first parent node associated with the first leaf node when the hash value of the first leaf node of a specific node device satisfies a preset criterion, and determining whether the hash value of the first parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the first parent node satisfies the preset criterion.

[0066] The step of determining the hash value of the second parent node (S1330) is a step in which, if a specific node device determines that the hash value of the first parent node satisfies a preset criterion and a second parent node associated with the first parent node exists, it generates a nonce value for the second parent node and determines whether the hash value of the second parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the second parent node satisfies the preset criterion.

[0067] The state root hash value derivation step (S1340) is a step of deriving a hash value for the state root included in the block header of the second block based on the hash value of the root node included in the second node, when the first parent node and the second parent node are intermediate nodes included in the second node or root nodes included in the second node, and the first parent node or the second parent node is a root node included in the second nodes, and when the hash value of the root node included in the second nodes satisfies a preset criterion.

[0068] Referring to Fig. 9, after the block transfer step (S1400), a client verification step (S1500), a node-wide verification step (S1600), and a node-partial verification step (S1700) are further included.

[0069] The client verification step (S1500) is a step of receiving a request for proof of a second block from a specific node device among the node devices and another node device, and verifying whether the specific node device among the node devices and another node device are node devices of a light client.

[0070] The node-wide verification step (S1600) is a step for verifying whether the hash value of the second node corresponding to the first state path of the second block satisfies a preset standard when a specific node device among the node devices and another node device are not the node devices of the light client.

[0071] The node partial verification step (S1700) is a step performed when the node device and another node device are the node devices of the light client and receive a verification request for the light client's account information and the second block from the node device of the light client. The node partial verification step (S1700) is a step of verifying whether the hash value of the leaf node corresponding to the light client's account information among the second nodes of the two blocks and the hash value of one or more nodes including the path data for the corresponding leaf node satisfy the above-described criteria.

[0072] The blockchain mining method using a state tree node according to the embodiments of the present invention described so far can also be implemented in the form of a recording medium including computer-executable instructions, such as program modules executed by a computer. The computer-readable medium may be any available medium that can be accessed by a computer, and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium may include a computer storage medium. The computer storage medium includes both volatile and nonvolatile, removable and non-removable media implemented with any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data.

[0073] Those skilled in the art will appreciate that the present invention can be easily modified into other specific forms without changing the technical spirit or essential characteristics of the present invention based on the above description. Therefore, it should be understood that the embodiments described above are illustrative in all respects and not restrictive. The scope of the present invention is indicated by the following claims, and all changes or modifications derived from the meaning and scope of the claims and their equivalents should be interpreted as being included in the scope of the present invention. The scope of the present application is indicated by the following claims rather than the detailed description above, and all changes or modifications derived from the meaning and scope of the claims and their equivalents should be interpreted as being included in the scope of the present application.

[0074] The form for carrying out the invention is the same as the best form for carrying out the invention described above.

[0075] A technology in which a specific node device generates a second block based on a first block and a transaction, generates a nonce value for each of the second nodes changed in the first block among one or more second nodes included in a second trie node of the second block, and determines whether the hash value of the second node derived based on the nonce value and the second node satisfies a preset standard, is applicable to the blockchain industry, and thus has industrial applicability.

[0076] [Explanation of symbols]

[0077] 100: Blockchain system using state tree nodes

[0078] 110: Communication Module 120: Database

[0079] 130: Processor 140: Memory

[0080] 200: Client's node device 300: Mining node device

[0081] 400: Block 1

[0082] 500: Block 2

[0083] 600: Operator device

[0084] 700: Minor node device

Claims

1. A mining method performed by node devices connected to a blockchain network, a) A step in which a specific node device obtains a first block including a first trie node regarding specific state data of the blockchain network and a transaction including state change data for changing the state of a specific account; b) a step in which the specific node device generates a second block including a second trie node based on the transaction and the first trie node; and c) A blockchain mining method using a state trie node, comprising a step of generating a nonce value for a second node corresponding to a state path from a specific leaf node corresponding to the specific account to a specific root node among one or more second nodes included in the second trie node, and determining whether a hash value derived based on the generated nonce value and the second node corresponding to the state path satisfies a preset criterion.

2. In paragraph 1, The first node included in the first block and the second node included in the second block include at least one of a root node, an intermediate node, and a leaf node, The root node is associated with the intermediate node as a child node, or with the leaf node as a child node, The above intermediate node is associated with another intermediate node as a child node, or is associated with the above leaf node as a child node, The root node and the intermediate node include path data for child nodes, a nonce field into which the nonce value is input, and a hash value, The above leaf node includes account information including account, address, balance and number of transactions, a nonce field where the nonce value is entered and a hash value, The hash value of the intermediate node is calculated based on the hash value of each of one or more child nodes associated with the path data of the intermediate node and the nonce value entered in the nonce field of the intermediate node. The hash value of the root node is calculated based on the hash value of each of one or more child nodes associated with the path data of the root node and the nonce value entered in the nonce field of the root node, and The hash value of the above leaf node is calculated based on the account information and the nonce value entered in the nonce field of the above leaf node, and The above status change data is data of a specific leaf node including the account information address and transaction count for the specific account, and A blockchain mining method using a state trie node, wherein the above state path is path data for a path from a specific root node to the specific leaf node.

3. In paragraph 2, d) A blockchain mining method using a state trie node, comprising a step of transmitting the second block to the blockchain network when the hash value of the second node corresponding to the state path satisfies the preset criterion.

4. In paragraph 2, Step b) above, b-1) A step of the specific node device searching for a first node corresponding to the state path among the first nodes included in the first trie node; b-2) A step in which the specific node device creates a second node corresponding to the state path based on the first node corresponding to the state path using the state change data and the state path; b-3) a step of searching for a sibling node for the second node corresponding to the state path by the specific node device; and b-4) A blockchain mining method using a state trie node, comprising a step of generating the second trie node by associating the searched sibling node with the second node corresponding to the state path, by the specific node device.

5. In paragraph 4, Step b-2) above, A blockchain mining method using a state trie node, comprising: generating, in a first node corresponding to the state path, account information of a leaf node corresponding to the specific account of the state change data of a leaf node corresponding to the specific account of the state change data, based on the state change data; or, if there is no leaf node corresponding to the specific account in the first node corresponding to the state path, generating a leaf node for the specific account in the first node according to the state path based on the state change data.

6. In paragraph 2, Step c) above, A step of generating a nonce value for a first leaf node included in second nodes corresponding to the state path, and determining whether a hash value of the first leaf node derived based on the nonce value and the account information of the first leaf node satisfies the preset criterion; A step of generating a nonce value for a first parent node associated with the first leaf node when the hash value of the first leaf node satisfies the preset criterion, and determining whether the hash value of the first parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the first parent node satisfies the preset criterion; and A blockchain mining method using a state trie node, comprising the step of generating a nonce value for a second parent node when the hash value of the first parent node satisfies the preset criterion and a second parent node associated with the first parent node exists, and determining whether a hash value of the second parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the second parent node satisfies the preset criterion.

7. In paragraph 6, The first parent node and the second parent node are intermediate nodes included in the second node or root nodes included in the second node, A blockchain mining method using a state trie node, further comprising a step of deriving a hash value for a state root included in a block header of the second block based on the hash value of the root node included in the second node, if the first parent node or the second parent node is a root node included in the second node and the hash value of the root node included in the second node satisfies the preset criterion.

8. In paragraph 1, The above-mentioned criteria are: A blockchain mining method using a state trie node, wherein the above hash value is a criterion for having a hash value smaller than a hash value that satisfies a preset difficulty level.

9. In paragraph 3, e) A blockchain mining method using a state trie node, further comprising a step of verifying whether a hash value of a second node corresponding to the state path of the second block satisfies the preset criterion when a request for proof for the second block is received from a node device other than the specific node device among the node devices.

10. In paragraph 9, The above node device and the other node device are node devices of a light client, When receiving the account information of the light client and a verification request for the second block from the node device of the light client, A blockchain mining method using a state tree node, further comprising a step of verifying whether a hash value of a leaf node corresponding to the account information among the second nodes of the second block and a hash value of one or more nodes including path data for the corresponding leaf node satisfy the preset criterion.

11. At least one processor; and A memory electrically connected to the processor and storing at least one code to be executed by the processor, The above memory, when executed through the processor, causes the processor to: Obtain a transaction including a state path and state change data for changing the state of a specific account, including a first trie node for a first block containing specific state data of a blockchain network, and Generating a second block including a second trie node based on the above transaction and the first trie node, and A blockchain system using a state trie node, which stores a code that causes a determination to be made whether a hash value derived based on the generated nonce value and the second node corresponding to the state path satisfies a preset criterion by generating a nonce value for a second node corresponding to a state path, which is a path from a specific leaf node corresponding to a specific account to a specific root node among one or more second nodes included in the second trie node.

12. In paragraph 11, The first node included in the first block and the second node included in the second block include at least one of a root node, an intermediate node, and a leaf node, The root node is associated with the intermediate node as a child node, or with the leaf node as a child node, The above intermediate node is associated with another intermediate node as a child node, or is associated with the above leaf node as a child node, The root node and the intermediate node include path data for child nodes, a nonce field into which the nonce value is input, and a hash value, The above leaf node includes account information including account, address, balance and number of transactions, a nonce field where the nonce value is entered and a hash value, The hash value of the intermediate node is calculated based on the hash value of each of one or more child nodes associated with the path data of the intermediate node and the nonce value entered in the nonce field of the intermediate node. The hash value of the root node is calculated based on the hash value of each of one or more child nodes associated with the path data of the root node and the nonce value entered in the nonce field of the root node, and The hash value of the above leaf node is calculated based on the account information and the nonce value entered in the nonce field of the above leaf node, and A blockchain system using a state tree node, wherein the above state change data includes the address and number of transactions of the specific account.

13. In paragraph 12, The above memory causes the processor to: A blockchain system using a state trie node, which stores a code that causes the second block to be transmitted to the blockchain network when the hash value of the second node corresponding to the state path satisfies the preset criterion.

14. In paragraph 12, The above memory causes the processor to: Search for a first node corresponding to the state path among the first nodes included in the first trie node, Using the above state change data and the above state path, the second node corresponding to the state path is generated based on the first node corresponding to the state path, Search for a sibling node for the second node corresponding to the above state path, A blockchain system using a state trie node, storing a code that causes the second trie node to be created by associating the searched sibling node with the second node corresponding to the state path.

15. In paragraph 12, The above memory causes the processor to: Generate a nonce value for the first leaf node included in the second nodes, and determine whether the hash value of the first leaf node derived based on the nonce value and the account information of the first leaf node satisfies the preset criterion; If the hash value of the first leaf node satisfies the preset criterion, a nonce value for the first parent node associated with the first leaf node is generated, and a hash value of the first parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the first parent node is determined to satisfy the preset criterion, and A blockchain system using a state trie node, which stores code that causes a second parent node to be determined to satisfy the preset criteria when the hash value of the first parent node satisfies the preset criteria and a second parent node associated with the first parent node exists, and to generate a nonce value for the second parent node and determine whether the hash value of the second parent node derived based on the nonce value and the hash value of each of one or more child nodes associated with the second parent node satisfies the preset criteria.

16. In paragraph 11, The above-mentioned criteria are: A blockchain system using a state trie node, which is a criterion for ensuring that the above hash value has a smaller hash value than a hash value that satisfies a preset difficulty level.

Citation Information

Patent Citations

  • METHOD AND SYSTEM FOR MINING BLOCKCHAIN ​​TRANSACTIONS PROVIDED BY VALIDATOR NODES

    JP2020523677A

  • Method and Apparatus for Secure Symbiosis Mining

    JP2022551874A

  • Block mining methods and apparatus

    KR1020160106570A

  • System scaffold

    KR102276051B1