Search

US-12621176-B2 - Electronic device having partial ledger in blockchain network and operation method thereof

US12621176B2US 12621176 B2US12621176 B2US 12621176B2US-12621176-B2

Abstract

An electronic device constituting a blockchain node included in a blockchain network is provided. The electronic device includes a communication circuit configured to at least one of transmit a signal to or receive another signal from one or more external devices, a memory configured to store a partial ledger including a part of an entire ledger for the blockchain network, the partial ledger including at least one block corresponding to respective at least one transaction in which the electronic device has participated in a consensus, and at least one processor electrically connected to the communication circuit and the memory, wherein the at least one processor is configured to execute a transaction related to the electronic device, according to the execution of the transaction, generate a block which includes block data for the transaction, and a hash field including previous block information in the entire ledger and previous block information in the partial ledger, and to store the block in the memory in association with the partial ledger.

Inventors

  • Sungwook WON
  • Woongah YOON
  • Seungmin HA
  • Jinsu JO

Assignees

  • SAMSUNG ELECTRONICS CO., LTD.

Dates

Publication Date
20260505
Application Date
20230417
Priority Date
20210611

Claims (20)

  1. 1 . An electronic device constituting a blockchain node of a blockchain network, the electronic device comprising: communication circuitry configured to at least one of transmit a signal to or receive another signal from one or more external devices; memory, comprising one or more storage media, storing instructions and a partial ledger including a part of an entire ledger for the blockchain network, the partial ledger including at least one block corresponding to respective at least one transaction in which the electronic device has participated in a consensus; and at least one processor communicatively coupled to the communication circuitry and the memory, wherein the instructions, when executed by the at least one processor is individually or collectively, cause the electronic device to: execute a transaction related to the electronic device, and according to the execution of the transaction, generate a block which includes: block data for the transaction, and a hash field including first previous block information associated with a first block preceding the block in the entire ledger and second previous block information associated with a second block preceding the block in the partial ledger, and store the block in the memory in association with the partial ledger, and wherein the second block is generated via consensus of the blockchain node and other blockchain nodes included in the blockchain network before generation of the block, when the electronic device is associated with a transaction corresponding to the second block as the blockchain node.
  2. 2 . The electronic device of claim 1 , wherein the partial ledger has a directed acyclic graph (DAG) structure, in which the at least one block is included as a node, respectively, and wherein the partial ledger includes, as a root node, an initial block among the at least one block.
  3. 3 . The electronic device of claim 1 , wherein the instructions that, when executed by the at least one processor is-individually or collectively, further cause the electronic device to: execute a smart contract for the execution of the transaction, reach a consensus with at least one external device associated with the transaction from among one or more external devices respectively constituting blockchain nodes of the blockchain network, based on a consensus algorithm of the blockchain network, and synchronize the block.
  4. 4 . The electronic device of claim 1 , wherein the memory includes a state database for the blockchain network, and wherein the state database is configured to store state data related to the at least one transaction.
  5. 5 . The electronic device of claim 4 , wherein the instructions that, when executed by the at least one processor individually or collectively, further cause the electronic device to: determine whether data to be used for the execution of the transaction is stored in the state database, and based on a result of the determination, acquire the data to be used for the execution of the transaction from at least one external device constituting a blockchain node in the blockchain network via the communication circuitry.
  6. 6 . The electronic device of claim 4 , wherein the instructions that, when executed by the at least one processor individually or collectively, further cause the electronic device to: determine whether data to be used for the execution of the transaction is stored in the state database, and based on a result of the determination, if the data to be used for the execution of the transaction is acquired from each of multiple external devices via the communication circuitry, acquire the data in a round robin manner from each of the multiple external devices.
  7. 7 . The electronic device of claim 4 , wherein the instructions that, when executed by the at least one processor individually or collectively, further cause the electronic device to: update the state database based on the execution of the transaction.
  8. 8 . The electronic device of claim 1 , wherein the hash field further includes information on the block, and wherein the information on the block includes information based on a generation sequence of the block in the entire ledger.
  9. 9 . A method performed by an electronic device constituting a blockchain node of a blockchain network, the method comprising: executing a transaction related to the electronic device; according to the executing of the transaction, generating a block which includes: block data for the transaction, and a hash field including first previous block information associated with a first block preceding the block in an entire ledger and second previous block information associated with a second block preceding the block in a partial ledger with respect to the blockchain network; and storing the block in a memory of the electronic device in association with the partial ledger, wherein the partial ledger includes a part of the entire ledger for the blockchain network, wherein the partial ledger includes at least one block corresponding to respective at least one transaction in which the electronic device has participated in a consensus, and wherein the second block is generated via consensus of the blockchain node and other blockchain nodes included in the blockchain network before generation of the block, when the electronic device is associated with a transaction corresponding to the second block as the blockchain node.
  10. 10 . The method of claim 9 , wherein the storing in the memory includes storing in a directed acyclic graph (DAG) structure, in which the at least one block is included as a node, respectively, in association with the partial ledger, and wherein the partial ledger includes, as a root node, an initial block among the at least one block.
  11. 11 . The method of claim 9 , further comprising: executing a smart contract for the executing of the transaction; reaching a consensus with at least one external device associated with the transaction from among one or more external devices respectively constituting blockchain nodes of the blockchain network, based on a consensus algorithm of the blockchain network; and synchronizing the block.
  12. 12 . The method of claim 9 , wherein the memory includes a state database for the blockchain network, and wherein the method further comprises storing state data related to the at least one transaction.
  13. 13 . The method of claim 12 , further comprising: determining whether data to be used for the executing of the transaction is stored in the state database; and based on a result of the determination, acquiring data to be used for the executing of the transaction from at least one external device constituting a blockchain node in the blockchain network.
  14. 14 . The method of claim 12 , further comprising, based on the executing of the transaction, updating the state database.
  15. 15 . The method of claim 9 , wherein the hash field further includes information on the block, and wherein the information on the block includes information based on a generation sequence of the block in the entire ledger.
  16. 16 . A blockchain system comprising: a first electronic device as a blockchain node; and a second electronic device as another blockchain node, wherein the first electronic device includes a first memory configured to store a partial ledger including a part of an entire ledger for the blockchain system, wherein the second electronic device includes a second memory configured to store the entire ledger for the blockchain system, wherein the entire ledger includes at least one block generated according to execution of at least one transaction in the blockchain system, wherein the partial ledger includes at least a part of the entire ledger, and wherein each of the at least one block includes: block data for a transaction, and a hash field including first previous block information associated with a first block preceding the block in the entire ledger and second previous block information associated with a second block preceding the block in a partial ledger, and wherein the second block is generated via consensus of the blockchain node and other blockchain nodes included in a blockchain network before generation of the block, when the electronic device is associated with a transaction corresponding to the second block as the blockchain node.
  17. 17 . The blockchain system of claim 16 , wherein the second electronic device is configured to participate in a consensus for execution of all of the at least one transaction in the blockchain system, and wherein the first electronic device is configured to participate in a consensus for execution of a transaction related to the first electronic device from among the at least one transaction.
  18. 18 . The blockchain system of claim 17 , wherein the first memory of the first electronic device includes a first state database configured to store data for the transaction related to the first electronic device, and wherein the second memory of the second electronic device includes a second state database configured to store data for all of the at least one transaction executed in the blockchain system.
  19. 19 . The blockchain system of claim 16 , wherein the first electronic device is configured to: determine whether data to be used for the execution of the at least one transaction is stored in the first memory, and based on a result of the determination, acquire data to be used for the execution of the at least one transaction from at least one external device included in the blockchain system.
  20. 20 . The blockchain system of claim 16 , wherein the entire ledger has a directed acyclic graph (DAG) structure, in which the at least one block is included as a node, and wherein the entire ledger includes, as a root node, an initial block of the blockchain system from among the at least one block.

Description

CROSS-REFERENCE TO RELATED APPLICATION(S) This application is a continuation application, claiming priority under § 365(c), of an International application No. PCT/KR2022/008313, filed on Jun. 13, 2022, which is based on and claims the benefit of a Korean patent application number 10-2021-0075917, filed on Jun. 11, 2021, in the Korean Intellectual Property Office, and of a Korean patent application number 10-2021-0106777, filed on Aug. 12, 2021, in the Korean Intellectual Property Office, the disclosure of each of which is incorporated by reference herein in its entirety. TECHNICAL FIELD The disclosure relates to an electronic device for controlling execution of a function by using a blockchain network and a method performed by the electronic device. More particularly, the disclosure relates to an electronic device for controlling execution of a function by using a blockchain network including blockchain nodes having a partial ledger, and a method performed by the electronic device. BACKGROUND ART A blockchain network is a network differentiated from a centralized network in which decision-making is performed by a central server, and is expressed as a decentralized network. A blockchain network may refer to a network in which decision-making is performed according to a consensus algorithm of nodes participating in a blockchain network. A distributed ledger existing in a blockchain network may include at least one block generated based on a transaction executed in the blockchain network and a database that stores data related to the transaction. A distributed ledger may be stored in each node participating in a blockchain network. A distributed ledger existing in a blockchain network may be updated according to a consensus algorithm of nodes participating in the blockchain network. A distributed ledger may include at least one block by connection of the same. The block connection may be expressed as a blockchain. The above information is presented as background information only to assist with an understanding of the disclosure. No determination has been made, and no assertion is made, as to whether any of the above might be applicable as prior art with regard to the disclosure. DISCLOSURE Technical Problem A blockchain network may include blockchain nodes that make a blockchain system valid. Blockchain nodes may include electronic devices. Nodes participating in a blockchain network store and maintain data for the entire blockchain on electronic devices for the integrity of a block. A case in which data for the entire blockchain is not large is not a problem, but as the number of blocks increases, the size of the data for the entire blockchain gradually increases. Therefore, there is a problem in that nodes participating in a blockchain store, maintain, and manage a large amount of data. If a node participating in a blockchain is a personal mobile device, there is a problem that this level of performance cannot be achieved. Nodes participating in a blockchain network participate in a consensus operation for transactions performed in the blockchain network. Nodes participating in a blockchain network participate in a consensus even though transactions are not related to the nodes themselves. Therefore, since central processing unit (CPU) processing and blockchain network communication should be maintained, there is a problem that each blockchain node continuously consumes power. In addition, since random communication is performed with other nodes included in a blockchain network, a security problem may occur. Aspects of the disclosure are to address at least the above-mentioned problems and/or disadvantages and to provide at least the advantages described below. Technical Solution In accordance with an aspect of the disclosure, an electronic device constituting a blockchain node of a blockchain network is provided. The electronic device includes a communication circuit configured to at least one of transmit a signal to or receive another signal from one or more external devices, a memory configured to store a partial ledger including a part of an entire ledger for the blockchain network, the partial ledger including at least one block corresponding to respective at least one transaction in which the electronic device has participated in a consensus, and at least one processor electrically connected to the communication circuit and the memory, wherein the at least one processor is configured to execute a transaction related to the electronic device, according to the execution of the transaction, generate a block which includes block data for the transaction, and a hash field including previous block information in the entire ledger and previous block information in the partial ledger, and to store the block in the memory in association with the partial ledger. In accordance with another aspect of the disclosure, a method performed by an electronic device constituting a blockchain node of a blockchain network