WO2022260501A1 - 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법 - Google Patents

블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법 Download PDF

Info

Publication number
WO2022260501A1
WO2022260501A1 PCT/KR2022/008316 KR2022008316W WO2022260501A1 WO 2022260501 A1 WO2022260501 A1 WO 2022260501A1 KR 2022008316 W KR2022008316 W KR 2022008316W WO 2022260501 A1 WO2022260501 A1 WO 2022260501A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
data
node
transaction
block node
Prior art date
Application number
PCT/KR2022/008316
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
Priority claimed from KR1020210117125A external-priority patent/KR20220167177A/ko
Application filed by 삼성전자 주식회사 filed Critical 삼성전자 주식회사
Publication of WO2022260501A1 publication Critical patent/WO2022260501A1/ko
Priority to US18/300,001 priority Critical patent/US20230254118A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/04Protocols specially adapted for terminals or networks with limited capabilities; specially adapted for terminal portability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1042Peer-to-peer [P2P] networks using topology management mechanisms

Definitions

  • Various embodiments according to the present disclosure relate to an electronic device for controlling function execution using a blockchain network and an operating method thereof.
  • various embodiments according to the present disclosure relate to an electronic device and an operating method thereof for performing an agreement on a transaction between block nodes in a blockchain network including block nodes having partial ledgers.
  • a blockchain network is a network that is distinct from a centralized network in which decisions are made 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 the 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.
  • the distributed ledger may be stored in each of the nodes participating in the blockchain network.
  • the distributed ledger existing in the blockchain network can be updated according to the consensus algorithm of the nodes participating in the blockchain network.
  • a distributed ledger may include connecting at least one block. The connection of these blocks can be represented as a blockchain.
  • the distributed ledger can be updated according to the consensus algorithm of the nodes participating in the blockchain network.
  • block nodes participating in a blockchain network may perform an endorsement operation, an ordering operation, and a validation operation in order to confirm a block generated based on a transaction.
  • a blockchain network may include blockchain nodes that make the blockchain system effective.
  • Blockchain nodes can be composed of electronic devices.
  • Nodes participating in the blockchain network must store and maintain data about the entire blockchain on the device for the integrity of the block. This is not a problem if the data for the entire block chain is not large, but as the number of blocks increases, the size of the data for the entire block chain gradually increases. Therefore, nodes participating in the blockchain have a problem of storing, maintaining, and managing large amounts of data. If the node participating in the blockchain is a personal mobile device, there is a problem that this level of performance cannot be reached.
  • nodes participating in the blockchain network must participate in the consensus operation for transactions performed in the blockchain network. Nodes participating in the blockchain network must participate in consensus even though the transaction is not related to them. Therefore, since each block node must maintain CPU processing and blockchain network communication, there is a problem of continuously consuming power. In addition to this, security problems may occur because it communicates randomly with other nodes included in the blockchain network.
  • An electronic device constituting a first block node included in a blockchain network includes a communication circuit for transmitting or receiving a signal with a second block node or a third block node included in the blockchain network, and a blockchain network.
  • an operating method of an electronic device constituting a first block node included in a blockchain network includes an operation of storing a partial ledger including a part of an entire ledger for the blockchain network, and the partial ledger is stored in a first database.
  • the first electronic device includes a part of the entire ledger for the blockchain system. It includes a partial ledger and a first database, and in response to a request for performing a transaction, the first electronic device determines whether data necessary for executing a first smart contract for the transaction is stored in the first database, and 1 electronic device obtains node information including at least one external device storing data based on the determination result from the third electronic device, the first electronic device obtains data based on the node information, and the obtained data
  • the first smart contract can be executed using
  • Embodiments of the present disclosure address at least the problems and/or disadvantages noted above and provide at least the advantages described below.
  • an electronic device may form a blockchain network with external electronic devices. At this time, the electronic device may efficiently use the memory by storing a partial ledger including at least a part of the distributed ledger of the blockchain network.
  • the electronic device may secure reliability and integrity of blocks included in the partial ledger even if the partial ledger including at least a part of the distributed ledger of the blockchain network is stored.
  • the electronic device can maintain the same level of consensus authentication as that of a general block chain while storing a partial ledger.
  • An electronic device can reduce unnecessary power consumption and reduce randomly occurring communication with other electronic devices by participating only in processing transactions related to the electronic device.
  • An electronic device may improve security issues by participating only in processing transactions related to the electronic device in a blockchain network.
  • FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment.
  • FIG. 2 is a diagram for explaining a blockchain platform of an electronic device according to an embodiment.
  • FIG. 3 is a diagram for explaining a blockchain network according to an embodiment.
  • FIG. 4 is a diagram for explaining a blockchain network including blockchain nodes that store a partial ledger or a full ledger, according to an embodiment.
  • 5 is a diagram for explaining the structure of a block chain included in the entire ledger according to an embodiment.
  • FIG. 6 is a flowchart illustrating an operation of processing an agreement on a transaction by an electronic device including a partial ledger.
  • FIG. 7 is a flowchart illustrating an operation in which a first block node executes a first smart contract according to an embodiment.
  • FIG. 8 is a flowchart illustrating a guarantee operation for a transaction in a blockchain network according to an embodiment.
  • FIG. 9 is a flowchart illustrating an operation of determining a block in a blockchain network according to an embodiment.
  • FIG. 10 is a block diagram of an electronic device in a network environment, according to various embodiments.
  • FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment.
  • an electronic device 100 may include a memory 110, a communication circuit 120, a processor 130 and a display 140, or a combination thereof.
  • the electronic device 100 may include additional components in addition to the components shown in FIG. 1 or may omit at least one of the components shown in FIG. 1 .
  • the memory 110 includes instructions that allow the processor 130 to process data or control components of the electronic device 100 to perform an operation of the electronic device 100 when executed. ) can be stored.
  • the memory 110 may include a secure area or a separate secure storage medium (eg, a secure memory area accessible only through a secure OS (eg, trust zone)).
  • the memory 110 may include at least one blockchain application that performs a blockchain-related operation. For example, it may include a blockchain platform corresponding to a blockchain application or a blockchain module that performs a blockchain-related operation.
  • the memory 110 may store a distributed ledger for a blockchain network.
  • the memory 110 may store the entire distributed ledger for the blockchain network.
  • the entirety of the distributed ledger can be expressed as the entire ledger.
  • the server node of the blockchain network may include a node list including information on block nodes that store data about the blockchain network.
  • the memory 110 may store a node list.
  • the memory 110 may store a partial ledger including a part of a distributed ledger for the blockchain network.
  • some distributed ledgers that are distinct from full ledgers can be expressed as partial ledgers.
  • the distributed ledger may include at least one block each including at least one transaction in a blockchain network and a state database (state data-base, State DB).
  • the state database may be expressed as a state database or state DB.
  • the memory 110 may store a partial ledger including at least one block corresponding to each of at least one transaction in which the electronic device 100 participates in an agreement.
  • the memory 110 may store data about at least one transaction in which the electronic device 100 participated in an agreement in a state database. Accordingly, the electronic device 100 can efficiently manage the memory 110 by storing in the memory 110 only blocks related to transactions in which the electronic device 100 participated in an agreement.
  • the communication circuit 120 may be connected to an external device to transmit/receive data.
  • the electronic device 100 may form a blockchain network with at least one external device through the communication circuit 120 .
  • a blockchain network may include at least one external device and the electronic device 100 as a blockchain node. Accordingly, the electronic device 100 and/or at least one external device may serve as a block node and a client at the same time.
  • the electronic device 100 may transmit/receive data with at least one external device included in the blockchain network through the communication circuit 120 and perform a transaction agreement in the blockchain network.
  • a blockchain network may include a server node and/or a mobile node as a blockchain node.
  • the mobile node is the electronic device 100 and/or an external electronic device, and may represent a portable electronic device.
  • the electronic device 100 and/or an external electronic device may correspond to a mobile device, a tablet PC, and/or a laptop computer.
  • a description of a blockchain network according to various embodiments will be described later with reference to FIG. 3 .
  • the processor 130 may be electrically or operatively connected to the memory 110 , the communication circuit 120 and the display 140 . According to an embodiment, the processor 130 may execute calculations or data processing related to control and/or communication of at least one other component of the electronic device 100 using instructions stored in the memory 110 .
  • the processor 130 may include a central processing unit (CPU), a graphics processing unit (GPU), a micro controller unit (MCU), a sensor hub, a supplementary processor, a communication processor, and an application. It may include at least one of a processor, an application specific integrated circuit (ASIC), and a field programmable gate array (FPGA), and may have a plurality of cores.
  • the processor 130 may perform an operation related to a blockchain through a blockchain platform stored in the memory 110 . According to an embodiment, the processor 130 may obtain a transaction execution request. For example, the processor 130 may detect a transaction execution request from the user of the electronic device 100 .
  • the processor 130 may determine data required to execute the first smart contract for the transaction requested to be executed. In addition, the processor 130 may determine whether data necessary for executing the first smart contract is stored in the memory 110. For example, the processor 130 may determine whether data (eg, read-set) for executing the first smart contract is included in the state database stored in the memory 110 . For example, the processor 130 may determine whether data to be read from the state database to execute the first smart contract is stored in the memory 110 .
  • data required to execute a smart contract may correspond to a read-set.
  • the processor 130 executes the first smart contract based on the stored data.
  • the processor 130 may obtain the data from another block node included in the blockchain network. have.
  • the processor 130 may obtain information on block nodes having the data from a server node included in a blockchain network in order to obtain the data from another block node.
  • the processor 130 may request the data from another block node based on information acquired from the server node. For example, the processor 130 may obtain a node list from a server node included in a blockchain network when data necessary for executing the first smart contract is not stored in the state database.
  • the processor 130 may obtain hash information on the data from the server node.
  • the hash information on the data may represent an identification value unique to the data.
  • the processor 130 may obtain a data value for the data from another block node included in the blockchain network based on the node list and the hash information obtained from the server node. have. For example, the processor 130 may identify at least one block node storing the data based on a node list, and obtain the data from the identified at least one block node based on the hash information. .
  • the processor 130 may execute the first smart contract for performing a transaction using the acquired data.
  • the processor 130 includes a hash field including previous block information in the entire ledger and previous block information in the partial ledger stored in the memory 110, and the transaction An operation for generating a block including block data for may be performed.
  • the processor 130 may request generation of a block including transaction data to a block node (eg, a block generation node) included in a blockchain network.
  • the block may be confirmed through agreement with nodes included in the blockchain network through the communication circuit 120.
  • processor 130 may store blocks in memory 110 .
  • the processor 130 may obtain an update request for the block determined through consensus from a server node, and store the block in the memory 110 based on the update request. At this time, the processor 130 may store the block as a block subsequent to the end block of the block chain of the partial ledger.
  • the display 140 may display various contents (eg, text, image, video, icon, and/or symbol).
  • the display 140 may include a liquid crystal display (LCD), a light emitting diode (LED) display, or an organic light emitting diode (OLED) display.
  • LCD liquid crystal display
  • LED light emitting diode
  • OLED organic light emitting diode
  • the processor 130 may display various contents related to the blockchain application through the display 140.
  • the processor 130 may display content representing a notification of success or failure of a transaction requested to be executed through the display 140 .
  • the processor 130 suspends the transaction agreement operation and displays a notification of block generation failure through the display 140. can do.
  • the processor 130 may output the failure notification using various components included in the electronic device 100 without being limited to the display 140 .
  • FIG. 2 is a diagram for explaining a blockchain platform of an electronic device according to an embodiment.
  • the electronic device 100 may include a blockchain platform 200.
  • the blockchain platform 200 may correspond to a blockchain application that performs a blockchain-related operation stored in the memory 110 or a blockchain module that performs a blockchain-related operation.
  • the blockchain platform 200 includes a smart contract 210, a distributed ledger 220, a blockchain processor 230, a transaction agreement module 240, and a blockchain network management module 250. ) may be included. According to various embodiments, the blockchain platform 200 may further include various components or may omit some components to perform operations related to the blockchain.
  • the blockchain processor 230 may be included in the processor 130.
  • the blockchain processor 230 may control the operation of components included in the blockchain platform 200.
  • the blockchain processor 230 may execute transactions including synchronizing ledgers, signing transactions, and/or recording transactions on a blockchain network.
  • the blockchain platform 200 may include a smart contract 210.
  • the blockchain processor 230 may provide the smart contract 210 with a value (eg, read-set) necessary for executing the smart contract 210 for a transaction.
  • the blockchain processor 230 may store an output value (eg, write-set) by executing the smart contract 210.
  • blockchain processor 230 may provide data and arguments to execute smart contract 210 .
  • a set of data (required data) to be read for execution of the smart contract 210 eg, read-set
  • a smart contract A data set (eg, write-set) including a result value of execution of 210) may be returned.
  • the distributed ledger 220 may include a blockchain 221 and a state data-base 222. According to an embodiment, the distributed ledger 220 may store data about transactions related to the electronic device 100 in a blockchain network. For example, the distributed ledger 220 may store blocks and data based on transactions in which the electronic device 100 participates in consensus processing. According to one embodiment, the distributed ledger 220 may be a partial ledger including at least a portion of the entire ledger of the blockchain network. For example, the distributed ledger may be a partial ledger that stores blocks and data for transactions related to the electronic device 100 in a full ledger that stores blocks and data related to all transactions in a blockchain network.
  • the blockchain 221 may include at least one block generated through a blockchain network.
  • Blocks can include block headers and transaction data.
  • the block header includes a hash value of the header and data areas, a hash value of a previous block, a height value of the block, a hash value of state data after performing a transaction included in the block, and a block creator's It may include at least one of a public key, a value obtained by signing a hash with a private key of a block creator, an attestation key certificate chain, or a value obtained by signing a hash value with an attestation key.
  • Block data includes the hash value of at least some of the transaction data, version information of the smart contract, smart contract ID, smart contract function ID, smart contract data that is an argument value required for the smart contract function, and a nonce value that is the transaction generation number of the transaction creator. , a value obtained by signing a hash value with a public key of a transaction creator, a private key of a transaction creator, a verification key authentication chain, or a value obtained by signing a hash value with a verification key.
  • blocks of the distributed ledger 220 may form a chain and store block data in the distributed ledger 220 .
  • at least one block included in the blockchain 221 may include a hash field and block data.
  • the hash field may include previous block information in the entire ledger of the blockchain network and previous block information in the partial ledger of the blockchain network.
  • block data may include transaction data for a corresponding block.
  • At least one block included in the blockchain 221 may be expressed as being connected based on previous block information included in the hash field.
  • at least one block included in the blockchain 221 may be connected in a directed acyclic graph (DAG) structure.
  • DAG directed acyclic graph
  • the partial ledger of the blockchain network may be connected in a sub-graph structure of the entire ledger.
  • the state database 222 may store values changed due to transaction execution in a blockchain network in a key-value form.
  • the form of the key-value is the key of the data, the data value, the hash of the data, and the information of the block node that owns the data in the blockchain network. and block number.
  • data stored in the state database 222 may be expressed as state data.
  • State data may refer to data stored in a world state, which is a database used in, for example, a hyperledger fabric. However, it is not limited to this.
  • the state database 222 is a kind of database used in Hyperledger Fabric, and can store final values changed by executing transactions in the form of key values. Accordingly, the electronic device 100 may check the state database 222 in order to check the final values by executing a transaction in the blockchain network.
  • the state database 222 may store data about a transaction involving a user of the electronic device 100 .
  • values changed due to execution of a transaction related to the electronic device 100 may be stored in a blockchain network.
  • the transaction agreement module 240 may control an operation for the electronic device 100 to process a transaction agreement in a blockchain network.
  • the transaction agreement module 240 may perform an operation of processing a transaction agreement based on a consensus algorithm used in a blockchain network.
  • the transaction agreement module 240 may support various agreement algorithms used in a typical blockchain.
  • the transaction agreement module 240 may perform transaction agreement with nodes included in a blockchain network based on proof of work (POW), proof of stake (POS), PBFT, or RAFT.
  • POW proof of work
  • POS proof of stake
  • PBFT proof of stake
  • RAFT An operation of performing a transaction agreement through the transaction agreement module 240 in a blockchain network according to an embodiment will be described later with reference to FIGS. 7 to 9 .
  • the blockchain network management module 250 may perform an operation related to a blockchain network in which the electronic device 100 participates as a node. According to an embodiment, the blockchain network management module 250 may form a blockchain network and perform operations related to other nodes (external devices) included in the blockchain network.
  • the electronic device constituting the first block node included in the blockchain network is the block chain network (eg, the block in FIG. 3). Transmits a signal with a second block node (eg, the first external device 310 of FIG. 3) or a third block node (eg, the third external device 330 of FIG. 3) included in the chain network 300) Or a receiving communication circuit (eg, communication circuit 120 in FIG. 1), a memory for storing a partial ledger (eg, distributed ledger 220 in FIG. 2) including a part of the entire ledger for the blockchain network ( Example: memory 110 of FIG.
  • the partial ledger includes a first database (eg, state database 222 of FIG. 2), and at least one processor electrically connected to the communication circuit and the memory (eg: and the processor 130 of FIG. 1), wherein the at least one processor stores data necessary for executing a first smart contract (eg, smart contract 210 of FIG. 2) for a transaction requested to be executed. 1 determining whether it is stored in a database, and based on the determination result, obtaining node information including information on at least one block node storing the data from the third block node through the communication circuit; Based on the node information, the data may be obtained from the second block node or the third block node, and the first smart contract may be executed.
  • a first database eg, state database 222 of FIG. 2
  • the processor 130 of FIG. 1 the at least one processor stores data necessary for executing a first smart contract (eg, smart contract 210 of FIG. 2) for a transaction requested to be executed. 1 determining whether it is stored in a database, and based on the determination
  • the partial ledger includes at least one block corresponding to each of at least one transaction in which the electronic device participated in an agreement, and the at least one block includes information about a previous block in the full ledger and the It may include block hash and block data including previous block information in the partial ledger.
  • the first database may store state data related to the at least one transaction.
  • the third block node includes the entire ledger including a second database
  • the second database stores entire state data for the blockchain network
  • the at least one processor comprises the When the data is stored in the second database, the data may be obtained from the third block node.
  • the at least one processor obtains hash information on the data together with the node information from the third block node through the communication circuit, and guarantees including a first data set and the transaction.
  • Send a request to the second block node receive a second data set generated based on the guarantee request and a guarantee result including the first data set from the second block node, and send the guarantee result to the hash information
  • the first data set includes data required to execute the first smart contract
  • the second data set is stored in the first database based on execution of the first smart contract. It may contain data to be stored.
  • the second data set may be generated as the second block node executes a second smart contract based on the first data set.
  • the at least one processor generates transaction data for the transaction based on the first data set and the second data set as the assurance result is verified, and the first data set , Transmits a block creation request including the second data set and the transaction data to the third block node, and sends an update request for the partial ledger and the first database generated based on the block creation request to the third block node. 3 It is received from the block node, and based on the update request, the partial ledger and the first database may be updated.
  • the update request includes at least one of the hash information, block order information, and the node list that stores the first data set and the second data set generated from the third block node in the third block node. It can be generated based on the result of comparison with one.
  • the operating method of the electronic device constituting the first block node included in the blockchain network (eg, the blockchain network 300 of FIG. 3),
  • An operation of storing a partial ledger including a part of the entire ledger for the blockchain network, the partial ledger including a first database, an operation of obtaining a request for performing a transaction, and a first smart contract for the transaction Determining whether data necessary for execution is stored in the first database, obtaining node information about at least one block node storing the data from a third block node based on the determination result, It may include obtaining the data from the second block node or the third block node based on node information and executing the first smart contract.
  • the partial ledger includes at least one block corresponding to each of at least one transaction in which the electronic device participated in an agreement
  • the storing operation includes information about a previous block in the full ledger and the partial ledger.
  • An operation of storing the at least one block each including block data and a block hash including information of a previous block in the ledger and an operation of storing state data related to the at least one transaction may be included.
  • the third block node includes the entire ledger including a second database for storing the entire state data for the blockchain network, and the operation of obtaining the data is performed in the second database.
  • the data may be obtained from the third block node in response to the data being stored.
  • the method further includes receiving from a block node and verifying the guarantee result based on hash information for each of the first data set and the second data set, wherein the first data set includes the first smart contract. It includes data required for execution, and the second data set may include data to be stored in the first database based on execution of the first smart contract.
  • the second data set may be generated as the second block node executes a second smart contract based on the first data set.
  • the method may further include updating the partial ledger and the first database.
  • the update request includes the first data set and the second data set generated from the third block node, and at least one of hash information, block order information, and the node list stored in the third block node. It can be generated based on the result of comparing with.
  • At least a first electronic device eg, the electronic device 100 of FIG. 3
  • a second electronic device eg, the first external device 310 or the second external device 320 of FIG. 3
  • a blockchain system eg, the blockchain network 300
  • the third electronic device eg, the third external device 330 of FIG. 3
  • the first electronic device A partial ledger including a part of the entire ledger for the chain system and a first database, wherein the first electronic device is required to execute a first smart contract for the transaction in response to receiving a request to perform the transaction.
  • the first electronic device determines whether data is stored in the first database, and based on a result of the determination, the first electronic device obtains node information including at least one external device storing the data from the third electronic device; The first electronic device may obtain the data based on the node information and execute the first smart contract using the acquired data.
  • the first electronic device transmits a guarantee request including a first data set and the transaction to the second electronic device, and the second electronic device sends a second data set based on the guarantee request. and transmits an assurance result including the second data set and the first data set to the first electronic device, the first electronic device verifies the assurance result, and the first data set It may include data required to execute the first smart contract, and the second data set may include data to be stored in the first database based on the execution of the first smart contract.
  • the first electronic device generates transaction data corresponding to the transaction based on the first data set and the second data set based on the guarantee result, and Transmits a block generation request including a second data set and the transaction data to the third electronic device, and the third electronic device stores the first data set and the second data in a memory of the third electronic device
  • the data may be compared with at least one of hash information, block order information, and the node list, and the block may be determined based on the comparison result.
  • the third electronic device in response to the confirmation of the block, sends the electronic devices related to the transaction to the confirmed information. You can request updates according to blocks.
  • the full ledger of the blockchain system includes at least one block corresponding to each of the at least one transaction for the blockchain system, and each of the at least one block is a previous block in the full ledger.
  • information and a block hash including previous block information in the partial ledger, and the at least one block may be connected in a directed acyclic graph (DAG) structure.
  • DAG directed acyclic graph
  • FIG. 3 is a diagram for explaining a blockchain network according to an embodiment.
  • a plurality of electronic devices 100 , 310 , 320 , and 330 may configure a blockchain network 300 .
  • the plurality of electronic devices 100, 310, 320, and 330 constituting the blockchain network 300 may include portable electronic devices.
  • the plurality of electronic devices 100, 310, 320, and 330 may correspond to mobile devices, tablet PCs, and/or notebook computers.
  • the electronic device 100, the first external device 310, and the second external device 320 may be portable mobile nodes
  • the third external device 330 may be a server node.
  • the blockchain network 300 may include a plurality of server nodes similar to the third external device 330 .
  • the plurality of electronic devices 100 , 310 , 320 , and 330 may have a configuration similar to that of the electronic device 100 .
  • the plurality of electronic devices 100, 310, 320, and 330 may include components similar to those of the blockchain platform 200 as configurations for performing necessary operations in a blockchain network.
  • the third external device 330 may be a server node.
  • the third external device 330 serving as a server node may store the entire ledger of the blockchain network 300 .
  • the third external device 330 may perform consensus on all transactions and record all blocks in the blockchain network 300 .
  • the third external device 330 may participate in all transaction agreements and store block and state data of all transactions in the blockchain network 300 in memory.
  • the third external device 330 may store the entire ledger, which is a distributed ledger of the blockchain network 300, in memory.
  • the electronic device 100 , the first external device 310 and/or the second external device 320 may be mobile nodes of the blockchain network 300 .
  • the electronic device 100, the first external device 310, and/or the second external device 320 acting as a mobile node are connected to each device among all transactions in the blockchain network 300. It can create related transactions and write blocks.
  • the electronic device 100, the first external device 310, and/or the second external device 320 participate in a transaction agreement related to each of the devices, block and Only state data can be stored in memory within each device.
  • the electronic device 100 may participate in a transaction agreement related to the electronic device 100 and/or a user of the electronic device 100 and store only block and state data of the transaction in the memory 110 .
  • the electronic device 100, the first external device 310, and/or the second external device 320 are the electronic device 100, the first external device 310, and the first external device 310 among the entire ledger of the blockchain network 300 /
  • a partial ledger storing only block and state data of transactions in which each of the second external devices 320 participated may be stored in each memory.
  • the electronic device 100, the first external device 310, and/or the second external device 320 participate only in the agreement of a transaction in which the user of the device participates, and transmits data by transaction execution, respectively.
  • the electronic device 100 may participate only in agreements of transactions in which a user of the electronic device 100 participates, and may store data resulting from transaction execution in the state database 222 .
  • the third external device 330 selects the transaction among the electronic device 100, the first external device 310, and/or the second external device 320. Devices involved in can be requested to update the distributed ledger.
  • each of the plurality of electronic devices 100, 310, 320, and 330 may independently execute a smart contract for transaction execution.
  • a smart contract can execute the same program logic to process a transaction.
  • Nodes included in the blockchain network 300 may be configured to participate only in the execution of transactions related to each device. For example, each of the electronic device 100, the first external device 310, and/or the second external device 320 corresponding to a mobile node may only participate in execution of a transaction associated with the device. Alternatively, server nodes can participate in the execution of any transaction.
  • the plurality of electronic devices 100, 310, 320, and 330 use a state database included in at least one of the plurality of electronic devices 100, 310, 320, and 330 to execute a smart contract.
  • Stored state data can be referenced.
  • each of the plurality of electronic devices 100, 310, 320, and 330 executes a smart contract based on state data, and the plurality of electronic devices 100, 310, 320, and 330 each execute the smart contract. Based on the outcome of the consensus process, it can decide whether or not to execute the transaction. For example, when the result values generated by executing the smart contract by each of the plurality of electronic devices 100, 310, 320, and 330 match, it may be determined that the agreement is successful.
  • a block for a transaction may be generated through an agreement performed between devices involved in transaction execution among the plurality of electronic devices 100 , 310 , 320 , and 330 .
  • the created block may be added to the blockchain of the distributed ledger stored in each of the devices involved in the transaction execution.
  • the added block can be linked to the block after the end block of the block chain of the distributed ledger.
  • a key value stored in a state database of each of the plurality of electronic devices 100 , 310 , 320 , and 330 related to the transaction execution may be updated by the transaction execution. Since each node of the blockchain network 300 according to an embodiment participates only in the execution of a transaction related to a device, each node may store state data for a transaction related to a device. Accordingly, the nodes of the blockchain network 300 may update state data when transactions related to devices are executed, without needing to update the state database according to execution of all transactions.
  • the distributed ledger of the blockchain network 300 may have a structure similar to that of the distributed ledger 220 described with reference to FIG. 2 .
  • the distributed ledger of the blockchain network 300 may include a blockchain and a state database. As a blockchain executes a transaction in the blockchain network 300, at least one block including a hash field including previous block information in the full ledger and previous block information in the partial ledger and block data for the transaction is generated. can include
  • all blockchain nodes included in the blockchain network 300 may each own a full ledger or a partial ledger.
  • at least one block included in each of the full ledger or partial ledger may be connected using a hash field. Therefore, if the connection based on the hash field is broken or a different distributed ledger is found, blockchain nodes may doubt the reliability and validity of the corresponding block.
  • FIG. 4 is a diagram for explaining a blockchain network including blockchain nodes that store a partial ledger or a full ledger, according to an embodiment.
  • a blockchain network may include a plurality of electronic devices as block nodes constituting the blockchain network.
  • the blockchain network includes a first block node 410, a second block node 420, a third block node 430, a fourth block node 440 and/or a fifth block node 450. It can be included as a blockchain node.
  • the first to fifth block nodes 410 to 450 may have a configuration similar to that of the electronic device 100 .
  • the first to fifth block nodes 410 to 450 may each include a configuration that performs an operation similar to that of the blockchain platform 200.
  • the first block node 410, the second block node 420 and the fifth block node 450 may be configured as mobile nodes.
  • the third block node 430 and the fourth block node 440 may be configured as server nodes.
  • the first block node 410, the second block node 420, and the fifth block node 450 may represent portable electronic devices.
  • the first block node 410, the second block node 420, and the fifth block node 450 may correspond to a mobile, tablet PC, and/or notebook.
  • the third block node 430 and the fourth block node 440 are server nodes, and the first block node 410, the second block node 420 and the fifth block node 450 and It may be an electronic device having a comparatively large memory capacity.
  • the first to fifth block nodes 410 to 450 included in the blockchain network may communicate with each other. Accordingly, the first to fifth block nodes 410 to 450 may perform an operation required for transaction execution using a communication circuit included in each device (eg, the communication circuit 120 of FIG. 1 ). For example, each of the first to fifth block nodes 410 to 450 may perform an agreement operation on a transaction using a communication circuit.
  • blocks generated in the blockchain network may be included in the distributed ledger described with reference to FIGS. 2 and 3 .
  • the distributed ledger may include the first to fourth blocks.
  • the first to fourth blocks may be generated based on execution of the first to fourth transactions, respectively.
  • each of the first to fourth blocks may be generated based on the execution of at least one transaction.
  • At least one block included in the distributed ledger may be similar to the configuration of the blocks described with reference to FIGS. 2 and 3 .
  • a block may include a hash field including information of a previous block and block data including transaction data of the block.
  • at least one block included in the distributed ledger of the blockchain network may be connected in a directed acyclic graph (DAG) structure based on previous block information included in the hash field.
  • DAG directed acyclic graph
  • each of the first to fifth block nodes 410 to 450 may include at least a part of a distributed ledger of a blockchain network.
  • the first block node 410, the second block node 420, and the fifth block node 450 are the entire ledger of the blockchain network in memory (eg, memory 110 in FIG. 1), respectively. You can store a partial ledger containing some of these.
  • the third block node 430 and the fourth block node 440 may store the entire ledger of the blockchain network in memory.
  • each of the block nodes that store the partial ledger may store a partial ledger including blocks for transactions related to the block node.
  • whether each transaction is related to a block node is whether data necessary for the execution of the transaction is stored in the memory of the node, whether the user of the node has requested transaction generation, and/or whether the block node has reached an agreement based on the transaction. It can be judged based on whether or not you participated in the According to one embodiment, the first block node 410 may be related to the fourth transaction.
  • the second block node 420 may be involved in the first transaction and the third transaction.
  • the fifth block node 450 may be involved in the second transaction and the third transaction.
  • server nodes of a blockchain network may be determined to be related to all transactions executed in the blockchain network.
  • server nodes may participate in the consensus of all transactions in a blockchain network.
  • the third block node 430 and the fourth block node 440 may be related to the first to fourth transactions, respectively.
  • the first to fifth block nodes 410 to 450 included in the blockchain network are blocks based on transactions related to each node and a state for storing data about transactions related to each node.
  • the first to fifth block nodes 410 to 450 may store a blockchain including the blocks and a ledger including a state database in memory, respectively.
  • the first block node 410 may store a fourth block based on the fourth transaction and a first partial ledger 411 including data for the fourth transaction in a memory.
  • the second block node 420 includes a first block and a third block generated based on the first transaction and the third transaction, respectively, and includes data for the first transaction and the third transaction.
  • a two-part ledger 421 may be stored in memory.
  • the third block node 430 and the fourth block node 440 are server nodes, and may participate in block consensus on the execution of all transactions in the blockchain network. Accordingly, the third block node 430 generates a third full ledger 431 including the first to fourth blocks generated based on each of the first to fourth transactions and including a state database of the blockchain network.
  • the fourth block node 440 includes the first to fourth blocks generated based on the first to fourth transactions, respectively, and the fourth full ledger 441 including the state database of the blockchain network. can be stored in memory.
  • the third full ledger 431 and the fourth full ledger 441 may correspond to a distributed ledger of a blockchain network. Accordingly, the third block node 430 and the fourth block node 440 may store the same entire ledger.
  • the fifth block node 450 includes a second block and a third block generated based on the second transaction and the third transaction, respectively, and includes data for the first transaction and the third transaction.
  • a five-part ledger 451 may be stored in memory.
  • 5 is a diagram for explaining a graph structure of blocks included in the entire ledger according to an embodiment.
  • the distributed ledger of the blockchain network may include an initial block 500 and first to fourth blocks 501 to 504.
  • a block for a transaction related to the creation of a blockchain network may be included as the first block 500 among blocks included in the blockchain of the ledger.
  • the first block created can be expressed as a blockchain genesis block.
  • the first block 500 may correspond to a root node according to a graph representing a connection structure of blocks included in a distributed ledger.
  • the first to fourth blocks 501 to 504 may be blocks generated based on the first to fourth transactions, respectively.
  • the distributed ledger may include the first block 500 and the first to fourth blocks 501 to 504 connected in a DAG structure.
  • the first block 500 and each of the first to fourth blocks 501 to 504 may correspond to a node of a DAG graph.
  • a connection structure of the first block 500 and the first to fourth blocks 501 to 504 may be formed based on information of a hash field included in each block.
  • each block may include a block hash including information about the corresponding block.
  • the first block 500 may include an initial block hash representing the first block 500 .
  • the hash field included in each block may include a block hash representing information of a previous block in the entire ledger and a block hash representing information of a previous block in the partial ledger.
  • at least one block connected by making the first block 500 a previous block in the full ledger or partial ledger may include hash information about the first block 500 in a hash field. Therefore, the full ledger or partial ledger may be a structure that is connected to the hash field of the next block using the block hash included in the corresponding block.
  • the previous block and the next block may be connected. Therefore, connection using hash information can be expressed as being connected toward another block according to a directed acyclic graph.
  • the first block 500 is a genesis block and corresponds to a root node, and the first block 500 is directed toward the fourth block 504, the first block 501, and the second block 502. can be expressed as being connected to
  • each of the first block 501 , the second block 502 , and the fourth block 504 may include hash information about the first block 500 as information of a previous block.
  • the first block 501 may be connected in a direction toward the third block 503 and the second block 502 .
  • each of the third block 503 and the second block 502 may include hash information about the first block 501 .
  • the second block 502 may be connected in a direction toward the third block 503 .
  • the third block 503 may include hash information about the second block 502 .
  • the third block 503 may be connected in a direction toward the fourth block 504 .
  • the fourth block 504 may include hash information about the third block 503 .
  • block nodes included in a blockchain network may each store at least a part of a distributed ledger in a memory.
  • server nodes eg, the third block node 430 and the fourth block node 440 described with reference to FIG. 4
  • the mobile node eg, the first block node 410, the second block node 420, and the fifth block node 450 described with reference to FIG. 4
  • the mobile node is a part of the distributed ledger, respectively. can be stored in the included memory.
  • a partial ledger including only blocks based on transactions related to the mobile node may be stored in memory.
  • the mobile node may store a part of the distributed ledger in a memory in a sub-graph structure.
  • FIG. 6 is a flowchart 600 illustrating an operation of processing an agreement on a transaction by an electronic device including a partial ledger.
  • a blockchain network including the electronic device 100 as a block node may include a plurality of block nodes.
  • the blockchain network may include the third block node 430 described with reference to FIG. 4 as a server node.
  • the third block node may contain the entire ledger for the blockchain network.
  • the third block node may include a node list indicating information about which block node stores state data for the blockchain network.
  • the third block node may include hash information on data required to execute the first smart contract.
  • the meaning that a block node includes data may mean that it is stored in a memory of an electronic device corresponding to the block node.
  • the processor 130 may determine whether data necessary for executing the first smart contract for the transaction requested to be performed is stored in the first database.
  • the electronic device 100 is a block node of a blockchain network, and the processor 130 may obtain a transaction execution request.
  • the processor 130 may determine whether the distributed ledger 220 includes data required to execute the smart contract for the transaction requested to be executed.
  • the processor 130 may determine whether data required to execute the first smart contract is stored in the state database 222 .
  • the processor 130 may obtain information about at least one block node storing the data from a third block node. For example, the processor 130 generates a node list including information on at least one block node storing data required to execute the first smart contract from a third block node and hash information on the necessary data. can be obtained For example, the processor 130 may transmit a signal requesting the node list and hash information to the third block node, and the third block node may transmit the node list and hash information to the electronic device 100 in response to the request. have.
  • the processor 130 may obtain the data from the second block node or the third block node based on the node list and the hash information and execute the first smart contract in operation 605 .
  • the processor 130 may determine which node is a block node that owns the data based on the node list. Accordingly, the processor 130 may request and obtain the data from a block node that owns the data. For example, when the block node that owns the data is the second block node 420 included in the blockchain network, the processor 130 may request the data from the second block node 420 .
  • the second block node 420 may transmit data included in the partial ledger stored in the second block node 420 to the electronic device 100 in response to the request.
  • the processor 130 may obtain the data from the third block node 430 when the third block node 430 owns the data. For example, if the third block node 430 stores not only the key value and hash information of the data but also the actual data value of the data, the processor 130 obtains a node list and hash information in operation 603, In operation 605 , the value of the data may be obtained from the third block node 430 .
  • the processor 130 may obtain all data from one block node. For another example, the processor 130 may acquire the data from a plurality of block nodes in a round robin method.
  • the processor 130 may execute the first smart contract using the data stored in the first database. .
  • the processor 130 sets a first data set including data to be read (required) to execute the first smart contract (eg: As the read-set and the first smart contract are executed, a second data set (eg, write-set) including data to be updated in the state database may be created.
  • each of the block nodes included in the blockchain network may execute a smart contract and compare a second data set generated as a result.
  • block nodes may agree on a second data set generated by executing a smart contract based on a shared first data set.
  • the agreement of the second data set may represent an operation of determining whether the second data set for each block node, which is a result of a smart contract included in each block node, matches.
  • the agreement of the second data set may represent an operation of determining whether each of the second data sets generated as each of the block nodes executes a smart contract based on the shared first data set includes the same value.
  • the processor 130 may terminate the execution of the transaction when the agreement fails, for example, when it is determined that the second data sets generated from each block node are different.
  • the processor 130 when it is determined that the second data sets generated from each block node are identical, that is, when the agreement is successful, the processor performs an operation for generating a block based on the first data set and the second data set. can be done For example, the processor 130 may transmit transaction data including the first data set and the second data set to the third block node 430 . In one embodiment, the processor 130 may generate a block for the requested transaction and request block generation to the third block node to confirm. According to an embodiment, when a block for a requested transaction is created and confirmed through a third block node, the block nodes participating in the transaction may update the partial ledger or the entire ledger stored in each based on the generated block. have.
  • FIG. 7 is a flowchart 700 for explaining an operation in which the first block node 410 executes a first smart contract according to an embodiment.
  • a blockchain network including a first block node 410 , a second block node 420 , and a third block node 430 as block nodes appears.
  • the first block node 410, the second block node 420, and the third block node 430 may include the same / similar configuration to the configuration described with reference to FIG. Redundant descriptions below may be omitted.
  • the first block node 410 may be the electronic device 100
  • the second block node 420 and the third block node 4630 may have a configuration similar to that of the electronic device 100. .
  • the first block node 410 and the second block node 420 may be represented as mobile nodes, and the third block node 430 may be represented as a server node.
  • each of the first to third block nodes 410 to 430 may include a ledger for a blockchain network.
  • the first block node 410 may include a first partial ledger
  • the second block node 420 may include a second partial ledger
  • the third block node 430 may include a full ledger. have.
  • the first and second block nodes 410 to 420 may include a partial ledger having the distributed ledger structure described with reference to FIG. 2 .
  • the third block node 430 is a server node and may include the entire ledger for the blockchain network.
  • the state database included in each of the first to third block nodes 410 to 430 may include at least one of key values, data values, hash information, node information, and/or block numbers. .
  • Table 1 may represent state data stored in a state database included in the first block node 410 .
  • Table 2 may indicate state data stored in the state database included in the second block node 420 .
  • the key value may indicate key information of state data. For example, when the state data indicates information on the 'budget of D2', the key value may be expressed as 'the budget of D2'.
  • the data value may represent an actual value of state data. For example, if the key value is 'D2 budget', the data value may represent the actual budget value of D2 (eg, 200 million).
  • hash information is a unique value for state data and may be determined according to data creation and/or update.
  • the processor 130 can determine whether to correct state data through hash information.
  • the node information may include information about other block nodes of a blockchain network storing state data. For example, when the first block node 410 and the second block node 420 store 'D2 budget' data, the node information for the first block node 410 and the second block node 420 information may be included.
  • the block number may include information about a block number for generation of state data in a blockchain network. For example, if the block number is '2', it may indicate that it is the second block created in the blockchain network.
  • Table 3 may indicate state data included in the third block node 430 .
  • the third block node 430 according to an embodiment is a server node and may store all state data for a blockchain network. According to an embodiment, the third block node 430 may include information about state data but may not include actual data values. For another example, the third block node 430 may also include actual data values.
  • the first block node 410 may obtain a transaction request 701 from a user (client) of a blockchain network.
  • the first block node 410 may obtain a transaction request 'modifying the budget of D2 to 300 million'.
  • the first block node 410 that obtains the transaction execution request may be represented as a transaction leader.
  • the first block node 410 may execute 702 the first smart contract. According to an embodiment, the first block node 410 may determine whether the first partial ledger includes data required for the first smart contract execution 702 . For example, the first block node 410 may determine whether 'D2 budget' is stored in the state database.
  • the first block node 410 sends a first smart contract to the third block node 430 in order to obtain 'D2 budget' data required to execute the first smart contract (702). It is possible to request information on block nodes storing necessary data to execute (702). For example, the first block node 410 may request 703 node list and hash information to the third block node 430 .
  • the third block node 430 detects (704) a node list including information on a block node that owns the data and hash information on the data in response to the request (703). can For example, the third block node 430 may detect '154254', which is hash information about the 'D2 budget' and a node list containing information about the second block node 420 that owns the 'D2 budget' data. can
  • the third block node 430 may transmit the detected node list and hash information to the first block node 410 (705).
  • the third block node 430 may transmit a node list including information about the second block node 420 and '154254' hash information about the 'D2 budget'.
  • the third block node 430 when it stores data values in the state database, it may transmit the node list, hash information, and data values to the first block node 410 .
  • the third block node 430 includes a node list including information about the second block node 420 and '154254' hash information for 'D2 budget' as well as 'D2 budget' data value of '100 million'. ' may be transmitted together to the first block node 410.
  • the first block node 410 may request a data value based on the node list and hash information (706). For example, the first block node 410 generates a second block node 420 based on a node list indicating that the second block node 420 includes data necessary for executing the first smart contract. You can request the data with For example, the first block node 410 sends the second block node 420 to the second block node 420 based on the node list including information about the second block node 420 and the hash information '154254' for 'D2 budget'. Data values can be requested.
  • the second block node 420 may transmit (707) a data value to the first block node 410 in response to the request (706). For example, '100 million', which is the data value of the 'D2 budget', may be transmitted to the first block node 410 .
  • the first block node 410 may perform a verification operation by comparing hash information obtained from the third block node 430 with hash information based on the obtained data value. That is, the first block node 410 may verify the data value based on the hash information (708). According to an embodiment, the verification operation 708 may be performed based on whether hash information matches. For example, when the hash information for the data value obtained from the second block node 420 and the hash information (eg, '154254') obtained from the third block node 430 are different, the first block node 410 ) may determine that the obtained data is forged. If it is determined that the obtained data is falsified, the first block node 410 may determine that verification 708 has failed. In one embodiment, if the verification 708 fails, the first block node 410 may terminate the transaction and provide a notification of the transaction failure to the user.
  • the verification 708 fails, the first block node 410 may terminate the transaction and provide a notification of the transaction failure to the user.
  • the first block node 410 executes the first smart contract using the data.
  • data required for execution of the first smart contract may be represented by a first data set (eg, a read-set).
  • a first data set can be created for the execution of the first smart contract.
  • data necessary for executing the first smart contract may be returned as a first data set. That is, as a result of executing the first smart contract, a first data set (eg, a read-set) may be created (709).
  • a first data set including data to be read in executing the first smart contract can be created.
  • the first block node 410 may generate a first data set including (data value, hash information, node information, and block number). Accordingly, the first block node 410 may generate (100 million, 154254, second block node 420, 3) as the first data set.
  • FIG. 8 is a flowchart 800 for explaining a guarantee operation for a transaction in a blockchain network according to an embodiment.
  • FIG. 8 a method 800 of performing endorsement operations with other block nodes included in a blockchain network for transaction consensus in a blockchain network is shown.
  • the description of FIG. 8 may omit duplicate content from that described in FIG. 7 .
  • the first block node 410 may transmit the guarantee request 801 based on the requested transaction together with the first data set to the second block node 420 for transaction agreement.
  • the first block node 410 may generate a first data set (eg, (100 million, 154254, 2 block node 420, 3)) and a transaction generated based on the execution of the first smart contract. You can send a guarantee request for
  • the second block node 420 may execute (802) a second smart contract in response to the request (801). According to an embodiment, the second block node 420 executes the second smart contract (802) when necessary data is stored in the partial ledger included in the second block node 420, the second block node The second smart contract may be executed (802) using the data included in (420).
  • the second block node 420 may generate a first data set and a second data set (eg, write-set) as the second smart contract is executed.
  • the second data set may include data to be updated when execution of the smart contract for the transaction is completed.
  • the second data set may include data to be updated in the state database as a transaction 'revise the budget of D2 to 300 million' is executed.
  • the second data set may include the entire budget and the D2 budget to be updated as the D2 budget is modified to 300 million.
  • the second data set may include a node list including information about block nodes to be updated in the state database as transactions are executed, and information about block numbers of blocks to be generated based on transaction execution.
  • the second block node 420 may transmit ( 803 ) the first data set and the second data set to the first block node 410 .
  • the second block node 420 may transmit the first data set and the second data set generated by executing the second smart contract.
  • the second block node 420 may transmit a first data set including a data value for 'D2 budget', hash information, node information, and a block number.
  • the second block node 420 may transmit a second data set including data values for data to be updated based on transaction execution, node information, and block information.
  • the first block node 410 may perform verification 804 on the first data set and the second data set received from the second block node 420 .
  • the first block node 410 may perform a verification operation based on hash information for at least the second data set.
  • the first block node 410 may perform a verification operation based on hash information for the first data set and/or the second data set.
  • the first block node 410 includes a first data set and a second data set for the first smart contract generated by executing the first smart contract and a second data set received from the second block node 420. The first data set and the second data set for the smart contract may be compared, and a verification operation may be performed based on the comparison result.
  • the first block node 410 may stop performing the transaction and provide a failure notification (805).
  • the first block node 410 may provide a notification of failure of the transaction through a display included in the first block node 410 (eg, the display 140 of FIG. 1 ).
  • FIG. 9 is a flowchart 900 for explaining an operation of determining a block in a blockchain network according to an embodiment.
  • the first block node 410 requests block confirmation to the third block node 430, and the block is confirmed in the blockchain network.
  • the first block node 410 may generate (901) data for a transaction requested to be executed based on the first data set and the second data set.
  • the first block node 410 may execute a smart contract for a transaction 'modifying the budget of D2 to 300 million' and generate transaction data based on the first data set and the second data set.
  • the first block node 410 may transmit a block generation request 902 including the first data set, the second data set, and transaction data to the third block node 430 .
  • the third block node 430 may store the transaction data in a block confirmation queue in response to the request 902 (903).
  • the third block node 430 may store transaction data using one of various data structures without being limited to a queue.
  • the third block node 430 may perform a block generation operation in a first-in-first-out manner in the order stored in the block confirmation queue. The block generation operation may be expressed as ordering.
  • the third block node 430 may verify (904) the block requested to be generated based on the order stored in the block confirmation queue. For example, the third block node 430 may generate a block based on the transaction data according to the order stored in the block confirmation queue and perform a verification operation on the block.
  • the verification operation 904 may be performed by comparing data of the state database stored in the third block node 430 with block numbers and hash information of the first data set and the second data set. For example, the third block node 430 compares the hash information and the block number stored in the state database of the third block node 430 with the hash information and the block number for the first data set for verification 904.
  • the third block node 430 may compare the node information of the second data set and the block number of the second data set with the node list and block number stored in the state database, respectively, for verification 904 . As a result of the comparison, the third block node 430 may determine that the verification operation is successful if both data are the same.
  • the third block node 430 may confirm the block and generate an update request (905).
  • the third block node 430 may perform a consensus operation to determine a block that has been verified.
  • the third block node 430 may perform an agreement operation with other block nodes included in the blockchain network 300 and the created block, and confirm the block when the agreement is completed.
  • the third block node 430 may determine the generated block as a verified block and connect the node to the block chain of the entire ledger included in the block chain network.
  • the third block node 430 may generate an update request for the full ledger or partial ledger based on the confirmed block.
  • the third block node 430 requests an update of the D2 budget and the entire budget included in the second data set based on the block generated and confirmed by executing the 'modify D2 budget to 300 million' transaction. can create
  • the third block node 430 may transmit the generated update request to block nodes included in the blockchain network.
  • a partial ledger update request 906 may be made to the second block node 420 .
  • the second block node 420 may update the partial ledger in response to the request 906 .
  • the second block node 420 may update the state database in response to the partial ledger update request 906. That is, the second block node 420 may update (907) the partial ledger included in the second block node 420. For example, in response to execution of a transaction for 'modifying the budget of D2 to 300 million', the second block node 420 may modify data having a key value of 'the budget of D2'. For example, the second block node 420 may update the data value of 'D2 budget' stored in the state database to 300 million. Accordingly, the hash information and block number of 'D2 budget' may be modified.
  • the second block node 420 may also update the 'total budget' value based on the 'D2 budget' being updated. According to an embodiment, the second block node 420 may modify the data value of 'total budget' to 500 million, and update hash information and block number.
  • the third block node 430 may confirm the block and request updates of the partial ledger and/or the entire ledger from all block nodes included in the blockchain network.
  • a block node receiving a partial ledger and/or full ledger update request may update the partial ledger and/or full ledger based on a transaction in which it participates. Therefore, nodes not involved in the transaction execution in the blockchain network can maintain the data included in the state database as it is despite a request to update the partial ledger and/or the full ledger.
  • the third block node 430 may make a partial ledger update request 908 to the first block node 410 .
  • the third block node 430 may request an update for a 'modify the budget of D2 to 300 million' transaction.
  • the first block node 410 may update the partial ledger 909 based on the partial ledger update request 908 .
  • the state database of the third block node 430 may be updated according to block confirmation.
  • the state database stored in the third block node 430 is shown.
  • the third block node 430 may or may not include a data value.
  • data included in the third block node 430 may be updated as a block is confirmed through a transaction agreement. For example, as a transaction is executed, 'D2 budget' and 'total budget' may be updated based on 'modify D2 budget to 300 million won'.
  • FIG. 10 is a block diagram of an electronic device in a network environment, according to various embodiments.
  • an electronic device 1001 communicates with an electronic device 1002 through a first network 1098 (eg, a short-range wireless communication network) or through a second network 1099. It may communicate with at least one of the electronic device 1004 or the server 1008 through (eg, a long-distance wireless communication network). According to an embodiment, the electronic device 1001 may communicate with the electronic device 1004 through the server 1008 .
  • a first network 1098 eg, a short-range wireless communication network
  • a second network 1099 e.g., a second network 1099. It may communicate with at least one of the electronic device 1004 or the server 1008 through (eg, a long-distance wireless communication network). According to an embodiment, the electronic device 1001 may communicate with the electronic device 1004 through the server 1008 .
  • the electronic device 1001 includes a processor 1020, a memory 1030, an input module 1050, an audio output module 1055, a display module 1060, an audio module 1070, a sensor module ( 1076), interface 1077, connection terminal 1078, haptic module 1079, camera module 1080, power management module 1088, battery 1089, communication module 1090, subscriber identification module 1096 , or an antenna module 1097.
  • a processor 1020 e.g, a memory 1030, an input module 1050, an audio output module 1055, a display module 1060, an audio module 1070, a sensor module ( 1076), interface 1077, connection terminal 1078, haptic module 1079, camera module 1080, power management module 1088, battery 1089, communication module 1090, subscriber identification module 1096 , or an antenna module 1097.
  • at least one of these components eg, the connection terminal 1078
  • some of these components eg, sensor module 1076,
  • the processor 1020 for example, executes software (eg, the program 1040) to cause at least one other component (eg, hardware or software component) of the electronic device 1001 connected to the processor 1020. It can control and perform various data processing or calculations. According to one embodiment, as at least part of data processing or operation, the processor 1020 transfers instructions or data received from other components (e.g., sensor module 1076 or communication module 1090) to volatile memory 1032. , process commands or data stored in the volatile memory 1032 , and store resultant data in the non-volatile memory 1034 .
  • software eg, the program 1040
  • the processor 1020 transfers instructions or data received from other components (e.g., sensor module 1076 or communication module 1090) to volatile memory 1032. , process commands or data stored in the volatile memory 1032 , and store resultant data in the non-volatile memory 1034 .
  • the processor 1020 may include a main processor 1021 (eg, a central processing unit or an application processor) or a secondary processor 1023 (eg, a graphic processing unit, a neural network processing unit ( NPU: neural processing unit (NPU), image signal processor, sensor hub processor, or communication processor).
  • a main processor 1021 e.g, a central processing unit or an application processor
  • a secondary processor 1023 e.g, a graphic processing unit, a neural network processing unit ( NPU: neural processing unit (NPU), image signal processor, sensor hub processor, or communication processor.
  • NPU neural network processing unit
  • NPU neural processing unit
  • image signal processor sensor hub processor
  • communication processor e.g., a communication processor.
  • the auxiliary processor 1023 may use less power than the main processor 1021 or be set to be specialized for a designated function.
  • the auxiliary processor 1023 may be implemented separately from or as part of the main processor 1021 .
  • the secondary processor 1023 may, for example, take the place of the main processor 1021 while the main processor 1021 is inactive (eg sleep), or the main processor 1021 is active (eg application execution). ) state, together with the main processor 1021, at least one of the components of the electronic device 1001 (eg, the display module 1060, the sensor module 1076, or the communication module 1090) It is possible to control at least some of the related functions or states.
  • the auxiliary processor 1023 eg, image signal processor or communication processor
  • may be implemented as part of other functionally related components eg, camera module 1080 or communication module 1090). have.
  • the auxiliary processor 1023 may include a hardware structure specialized for processing an artificial intelligence model.
  • AI models can be created through machine learning. Such learning may be performed, for example, in the electronic device 1001 itself where the artificial intelligence model is performed, or may be performed through a separate server (eg, the server 1008).
  • the learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning or reinforcement learning, but in the above example Not limited.
  • the artificial intelligence model may include a plurality of artificial neural network layers.
  • Artificial neural networks include deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks (RNNs), restricted boltzmann machines (RBMs), deep belief networks (DBNs), bidirectional recurrent deep neural networks (BRDNNs), It may be one of deep Q-networks or a combination of two or more of the foregoing, but is not limited to the foregoing examples.
  • the artificial intelligence model may include, in addition or alternatively, software structures in addition to hardware structures.
  • the memory 1030 may store various data used by at least one component (eg, the processor 1020 or the sensor module 1076) of the electronic device 1001 .
  • the data may include, for example, input data or output data for software (eg, the program 1040) and commands related thereto.
  • the memory 1030 may include a volatile memory 1032 or a non-volatile memory 1034 .
  • the program 1040 may be stored as software in the memory 1030 and may include, for example, an operating system 1042 , middleware 1044 , or an application 1046 .
  • the input module 1050 may receive a command or data to be used for a component (eg, the processor 1020) of the electronic device 1001 from an outside of the electronic device 1001 (eg, a user).
  • the input module 1050 may include, for example, a microphone, a mouse, a keyboard, a key (eg, a button), or a digital pen (eg, a stylus pen).
  • the sound output module 1055 may output sound signals to the outside of the electronic device 1001 .
  • the sound output module 1055 may include, for example, a speaker or receiver.
  • the speaker can be used for general purposes such as multimedia playback or recording playback.
  • a receiver may be used to receive an incoming call. According to one embodiment, the receiver may be implemented separately from the speaker or as part of it.
  • the display module 1060 may visually provide information to the outside of the electronic device 1001 (eg, a user).
  • the display module 1060 may include, for example, a display, a hologram device, or a projector and a control circuit for controlling the device.
  • the display module 1060 may include a touch sensor configured to detect a touch or a pressure sensor configured to measure the intensity of force generated by the touch.
  • the audio module 1070 may convert sound into an electrical signal or vice versa. According to an embodiment, the audio module 1070 acquires sound through the input module 1050, the sound output module 1055, or an external electronic device connected directly or wirelessly to the electronic device 1001 (eg: Sound may be output through the electronic device 1002 (eg, a speaker or a headphone).
  • the audio module 1070 acquires sound through the input module 1050, the sound output module 1055, or an external electronic device connected directly or wirelessly to the electronic device 1001 (eg: Sound may be output through the electronic device 1002 (eg, a speaker or a headphone).
  • the sensor module 1076 detects an operating state (eg, power or temperature) of the electronic device 1001 or an external environmental state (eg, a user state), and generates an electrical signal or data value corresponding to the detected state. can do.
  • the sensor module 1076 may include, for example, a gesture sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, It may include a temperature sensor, humidity sensor, or light sensor.
  • the interface 1077 may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device 1001 to an external electronic device (eg, the electronic device 1002).
  • the interface 1077 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
  • HDMI high definition multimedia interface
  • USB universal serial bus
  • SD card interface Secure Digital Card
  • connection terminal 1078 may include a connector through which the electronic device 1001 may be physically connected to an external electronic device (eg, the electronic device 1002).
  • the connection terminal 1078 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).
  • the haptic module 1079 may convert electrical signals into mechanical stimuli (eg, vibration or motion) or electrical stimuli that a user can perceive through tactile or kinesthetic senses.
  • the haptic module 1079 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
  • the camera module 1080 may capture still images and moving images. According to one embodiment, the camera module 1080 may include one or more lenses, image sensors, image signal processors, or flashes.
  • the power management module 1088 may manage power supplied to the electronic device 1001 .
  • the power management module 1088 may be implemented as at least part of a power management integrated circuit (PMIC), for example.
  • PMIC power management integrated circuit
  • the battery 1089 may supply power to at least one component of the electronic device 1001 .
  • the battery 1089 may include, for example, a non-rechargeable primary cell, a rechargeable secondary cell, or a fuel cell.
  • the communication module 1090 is a direct (eg, wired) communication channel or a wireless communication channel between the electronic device 1001 and an external electronic device (eg, the electronic device 1002, the electronic device 1004, or the server 1008). Establishment and communication through the established communication channel may be supported.
  • the communication module 1090 may include one or more communication processors that operate independently of the processor 1020 (eg, an application processor) and support direct (eg, wired) communication or wireless communication.
  • the communication module 1090 may be a wireless communication module 1092 (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 1094 (e.g., : a local area network (LAN) communication module or a power line communication module).
  • a wireless communication module 1092 e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module
  • GNSS global navigation satellite system
  • a wired communication module 1094 e.g., : a local area network (LAN) communication module or a power line communication module.
  • the corresponding communication module is a first network 1098 (eg, a short-distance communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network 1099 (eg, legacy It may communicate with the external electronic device 1004 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a telecommunications network such as a computer network (eg, LAN or WAN).
  • a first network 1098 eg, a short-distance communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)
  • a second network 1099 eg, legacy It may communicate with the external electronic device 1004 through a cellular network, a 5G network, a next-generation communication network, the Internet, or a telecommunications network such as a computer network (eg, LAN or WAN).
  • a telecommunications network such as a computer
  • the wireless communication module 1092 uses subscriber information (eg, International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 1096 within a communication network such as the first network 1098 or the second network 1099.
  • subscriber information eg, International Mobile Subscriber Identifier (IMSI)
  • IMSI International Mobile Subscriber Identifier
  • the electronic device 1001 may be identified or authenticated.
  • the wireless communication module 1092 may support a 5G network after a 4G network and a next-generation communication technology, for example, NR access technology (new radio access technology).
  • NR access technologies include high-speed transmission of high-capacity data (enhanced mobile broadband (eMBB)), minimization of terminal power and access of multiple terminals (massive machine type communications (mMTC)), or high reliability and low latency (ultra-reliable and low latency (URLLC)). -latency communications)) can be supported.
  • the wireless communication module 1092 may support a high frequency band (eg, mmWave band) to achieve a high data rate, for example.
  • a high frequency band eg, mmWave band
  • the wireless communication module 1092 uses various technologies for securing performance in a high frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), and full-dimensional multiplexing. Technologies such as input/output (FD-MIMO: full dimensional MIMO), array antenna, analog beam-forming, or large scale antenna may be supported.
  • the wireless communication module 1092 may support various requirements defined for the electronic device 1001, an external electronic device (eg, the electronic device 1004), or a network system (eg, the second network 1099).
  • the wireless communication module 1092 may include a peak data rate (eg, 20 Gbps or more) for eMBB realization, a loss coverage (eg, 164 dB or less) for mMTC realization, or a U-plane latency (eg, URLLC realization).
  • a peak data rate eg, 20 Gbps or more
  • a loss coverage eg, 164 dB or less
  • a U-plane latency eg, URLLC realization
  • DL downlink
  • UL uplink
  • the antenna module 1097 may transmit or receive signals or power to the outside (eg, an external electronic device).
  • the antenna module 1097 may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (eg, PCB).
  • the antenna module 1097 may include a plurality of antennas (eg, an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network such as the first network 1098 or the second network 1099 is selected from the plurality of antennas by, for example, the communication module 1090. can be chosen A signal or power may be transmitted or received between the communication module 1090 and an external electronic device through the selected at least one antenna.
  • other components eg, a radio frequency integrated circuit (RFIC) may be additionally formed as a part of the antenna module 1097 in addition to the radiator.
  • RFIC radio frequency integrated circuit
  • the antenna module 1097 may form a mmWave antenna module.
  • the mmWave antenna module includes a printed circuit board, an RFIC disposed on or adjacent to a first surface (eg, a lower surface) of the printed circuit board and capable of supporting a designated high frequency band (eg, mmWave band); and a plurality of antennas (eg, array antennas) disposed on or adjacent to a second surface (eg, a top surface or a side surface) of the printed circuit board and capable of transmitting or receiving signals of the designated high frequency band. can do.
  • peripheral devices eg, a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)
  • signal e.g. commands or data
  • commands or data may be transmitted or received between the electronic device 1001 and the external electronic device 1004 through the server 1008 connected to the second network 1099 .
  • Each of the external electronic devices 1002 or 1004 may be the same as or different from the electronic device 1001 .
  • all or part of operations executed in the electronic device 1001 may be executed in one or more external electronic devices among the external electronic devices 1002 , 1004 , or 1008 .
  • the electronic device 1001 when the electronic device 1001 needs to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device 1001 instead of executing the function or service by itself.
  • one or more external electronic devices may be requested to perform the function or at least part of the service.
  • One or more external electronic devices receiving the request may execute at least a part of the requested function or service or an additional function or service related to the request, and deliver the execution result to the electronic device 1001 .
  • the electronic device 1001 may provide the result as at least part of a response to the request as it is or after additional processing.
  • cloud computing distributed computing, mobile edge computing (MEC), or client-server computing technology may be used.
  • the electronic device 1001 may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing.
  • the external electronic device 1004 may include an internet of things (IoT) device.
  • Server 1008 may be an intelligent server using machine learning and/or neural networks.
  • the external electronic device 1004 or server 1008 may be included in the second network 1099 .
  • the electronic device 1001 may be applied to intelligent services (eg, smart home, smart city, smart car, or health care) based on 5G communication technology and IoT-related technology.
  • Electronic devices may be devices of various types.
  • the electronic device may include, for example, a portable communication device (eg, a smart phone), a computer device, a portable multimedia device, a portable medical device, a camera, a wearable device, or a home appliance.
  • a portable communication device eg, a smart phone
  • a computer device e.g., a smart phone
  • a portable multimedia device e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a camera e.g., a portable medical device
  • a camera e.g., a camera
  • a wearable device e.g., a smart bracelet
  • first, second, or first or secondary may simply be used to distinguish a given component from other corresponding components, and may be used to refer to a given component in another aspect (eg, importance or order) is not limited.
  • a (e.g., first) component is said to be “coupled” or “connected” to another (e.g., second) component, with or without the terms “functionally” or “communicatively.”
  • the certain component may be connected to the other component directly (eg by wire), wirelessly, or through a third component.
  • module used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and is interchangeable with terms such as, for example, logic, logical blocks, parts, or circuits.
  • a module may be an integrally constructed component or a minimal unit of components or a portion thereof that performs one or more functions.
  • the module may be implemented in the form of an application-specific integrated circuit (ASIC).
  • ASIC application-specific integrated circuit
  • a storage medium eg, internal memory 1036 or external memory 1038
  • a machine eg, electronic device 1001
  • It may be implemented as software (eg, the program 1040) including them.
  • a processor eg, the processor 1020
  • a device eg, the electronic device 1001
  • the one or more instructions may include code generated by a compiler or code executable by an interpreter.
  • the device-readable storage medium may be provided in the form of a non-transitory storage medium.
  • the storage medium is a tangible device and does not contain a signal (e.g. electromagnetic wave), and this term refers to the case where data is stored semi-permanently in the storage medium. It does not discriminate when it is temporarily stored.
  • a signal e.g. electromagnetic wave
  • the method according to various embodiments disclosed in this document may be included and provided in a computer program product.
  • Computer program products may be traded between sellers and buyers as commodities.
  • a computer program product is distributed in the form of a device-readable storage medium (e.g. compact disc read only memory (CD-ROM)), or through an application store (e.g. Play Store TM ) or on two user devices (e.g. It can be distributed (eg downloaded or uploaded) online, directly between smart phones.
  • a device e.g. compact disc read only memory (CD-ROM)
  • an application store e.g. Play Store TM
  • It can be distributed (eg downloaded or uploaded) online, directly between smart phones.
  • at least part of the computer program product may be temporarily stored or temporarily created in a storage medium readable by a device such as a manufacturer's server, an application store server, or a relay server's memory.
  • each component (eg, module or program) of the above-described components may include a single object or a plurality of entities, and some of the plurality of entities may be separately disposed in other components. have.
  • one or more components or operations among the aforementioned corresponding components may be omitted, or one or more other components or operations may be added.
  • a plurality of components eg modules or programs
  • the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by a corresponding component of the plurality of components prior to the integration. .
  • the actions performed by a module, program, or other component are executed sequentially, in parallel, iteratively, or heuristically, or one or more of the actions are executed in a different order, or omitted. or one or more other actions may be added.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Power Engineering (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 개시에 따른 일 실시 예에서의 블록체인 네트워크에 포함된 제1 블록 노드를 구성하는 전자 장치는 블록체인 네트워크에 대한 전체 원장 중에서 일부를 포함하는 부분 원장을 저장하고, 수행 요청된 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 제1 데이터베이스에 저장되어 있는지 판단하고, 판단 결과에 기초하여, 데이터를 저장한 적어도 하나의 블록 노드에 대한 정보를 포함하는 노드 정보를 통신 회로를 통해 제3 블록 노드로부터 획득하고, 노드 정보에 기초하여 데이터를 제2 블록 노드 또는 제3 블록 노드로부터 획득하고, 제1 스마트 컨트랙트를 실행할 수 있다.

Description

블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법
본 개시에 따른 다양한 실시 예들은 블록체인 네트워크를 이용하여 기능 실행을 제어하는 전자 장치 및 이의 동작 방법에 관한 것이다.
구체적으로, 본 개시에 따른 다양한 실시 예들은 부분 원장을 가진 블록 노드들을 포함하는 블록체인 네트워크에서, 블록 노드들 간에 트랜잭션에 대한 합의를 수행하는 전자 장치 및 이의 동작 방법에 관한 것이다.
블록체인 네트워크(blockchain network)는 의사결정이 중앙 서버에 의해 수행되는 중앙화 네트워크(centralized network)와 구분되는 네트워크로, 탈중앙화 네트워크(decentralized network)로 표현된다. 블록체인 네트워크는, 블록체인 네트워크에 참여하는 노드들의 합의 알고리즘에 따라 의사결정이 수행되는 네트워크를 지칭할 수 있다.
블록체인 네트워크에서 존재하는 분산 원장은, 블록체인 네트워크에서 실행되는 트랜잭션에 기초하여 생성된 적어도 하나의 블록들과 트랜잭션에 관련된 데이터를 저장하는 데이터베이스를 포함할 수 있다. 분산 원장은 블록체인 네트워크에 참여하는 노드들에 각각 저장되어 있을 수 있다. 블록체인 네트워크에서 존재하는 분산 원장은, 블록체인 네트워크에 참여하는 노드들의 합의 알고리즘에 따라 갱신될 수 있다. 분산 원장은 적어도 하나의 블록들을 연결하여 포함할 수 있다. 이러한 블록들의 연결은 블록체인으로 표현될 수 있다.
보안성과 무결성을 유지하기 위해, 분산 원장은 블록체인 네트워크에 참여하는 노드들의 합의 알고리즘에 따라 갱신될 수 있다. 구체적으로, 블록체인 네트워크에 참여하는 블록 노드들은 트랜잭션에 기초하여 생성된 블록을 확정하기 위해, 보증(endorsement) 동작, 순서 결정(ordering) 동작 및 검증(validation) 동작을 수행할 수 있다.
상기 정보는 본 개시 내용의 이해를 돕기 위한 배경 정보로서만 제공된다. 상기 중 어느 것이 본 개시와 관련하여 선행 기술로서 적용될 수 있는지 여부에 대한 결정이 이루어지지 않았으며 어떠한 주장도 이루어 지지 않는다.
블록체인 네트워크는 블록체인 시스템을 유효하게 만드는 블록체인 노드들을 포함할 수 있다. 블록체인 노드들은 전자 장치로 구성될 수 있다.
블록체인 네트워크에 참여하는 노드들은 블록의 무결성을 위해 전체 블록체인에 대한 데이터를 장치에 저장하고 유지관리 해야 한다. 전체 블록체인에 대한 데이터가 크지 않은 경우에는 문제되지 않으나, 블록의 개수가 증가할수록 전체 블록체인에 대한 데이터의 크기는 점차 증가하게 된다. 따라서, 블록체인에 참여하는 노드들은 대용량의 데이터를 저장하고 유지하고, 관리해야 하는 문제가 있다. 블록체인에 참여하는 노드가 개인용 모바일 장치인 경우에는 이러한 수준의 성능에 도달하지 못하는 문제가 있다.
또한, 블록체인 네트워크에 참여하는 노드들은 블록체인 네트워크에서 수행되는 트랜잭션에 대한 합의 동작에 참여해야 한다. 블록체인 네트워크에 참여하는 노드들은 자신과 관련된 트랜잭션이 아님에도 불구하고 합의에 참여해야 한다. 따라서, 각각의 블록 노드들은, CPU 프로세싱과 블록체인 네트워크 통신이 유지되어야 하므로, 지속적으로 전력을 소모해야 하는 문제가 있다. 이에 더하여, 블록체인 네트워크에 포함된 다른 노드들과 랜덤하게 통신하므로 보안문제가 발생할 수 있다.
일 실시 예에 따른 블록체인 네트워크에 포함된 제1 블록 노드를 구성하는 전자 장치는 블록체인 네트워크에 포함된 제2 블록 노드 또는 제3 블록 노드와 신호를 송신 또는 수신하는 통신 회로, 블록체인 네트워크에 대한 전체 원장 중에서 일부를 포함하는 부분 원장을 저장하는 메모리, 부분 원장은 제1 데이터베이스를 포함, 통신 회로 및 메모리와 전기적으로 연결된 적어도 하나의 프로세서를 포함하고, 적어도 하나의 프로세서는, 수행 요청된 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 제1 데이터베이스에 저장되어 있는지 판단하고, 판단 결과에 기초하여, 데이터를 저장한 적어도 하나의 블록 노드에 대한 정보를 포함하는 노드 정보를 통신 회로를 통해 제3 블록 노드로부터 획득하고, 노드 정보에 기초하여 데이터를 제2 블록 노드 또는 제3 블록 노드로부터 획득하고, 제1 스마트 컨트랙트를 실행할 수 있다.
일 실시 예에 따르면, 블록체인 네트워크에 포함된 제1 블록 노드를 구성하는 전자 장치의 동작 방법은 블록체인 네트워크에 대한 전체 원장 중에서 일부를 포함하는 부분 원장을 저장하는 동작, 부분 원장은 제1 데이터베이스를 포함, 트랜잭션의 수행에 대한 요청을 획득하는 동작, 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 제1 데이터베이스에 저장되어 있는지 판단하는 동작, 판단 결과에 기초하여, 데이터를 저장한 적어도 하나의 블록 노드에 대한 노드 정보를 제3 블록 노드로부터 획득하는 동작, 노드 정보에 기초하여 제2 블록 노드 또는 제3 블록 노드로부터 데이터를 획득하는 동작 및 제1 스마트 컨트랙트를 실행하는 동작을 포함할 수 있다.
일 실시 예에 따른 적어도 제1 전자 장치, 제2 전자 장치 및 제3 전자 장치를 각각 블록체인 노드로 포함하는 블록체인 시스템은, 제1 전자 장치는 블록체인 시스템에 대한 전체 원장 중에서 일부를 포함하는 부분 원장 및 제1 데이터베이스를 포함하고, 제1 전자 장치는 트랜잭션의 수행을 요청 받음에 응답하여, 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 제1 데이터베이스에 저장되어 있는지 판단하고, 제1 전자 장치는 판단 결과에 기초하여 데이터를 저장한 적어도 하나의 외부 장치를 포함하는 노드 정보를 제3 전자 장치로부터 획득하고, 제1 전자 장치는 노드 정보에 기초하여 데이터를 획득하고, 획득된 데이터를 이용하여 제1 스마트 컨트랙트를 실행할 수 있다.
본 개시의 실시 예들은 적어도 위에서 언급된 문제 및/또는 단점을 해결하고, 적어도 아래에서 설명되는 이점을 제공하는 것이다.
본 개시에 따르면, 전자 장치는 외부 전자 장치들과 블록체인 네트워크를 형성할 수 있다. 이때, 전자 장치는 블록체인 네트워크의 분산 원장의 적어도 일부를 포함하는 부분 원장을 저장함으로써, 메모리를 효율적으로 사용할 수 있다.
본 개시에 따른 전자 장치는 블록체인 네트워크의 분산 원장의 적어도 일부를 포함하는 부분 원장을 저장하더라도 부분 원장에 포함된 블록들에 대한 신뢰성 및 무결성을 확보할 수 있다.
본 개시에 따른 전자 장치는 부분 원장을 저장하면서도 일반적인 블록체인의 합의 인증 수준과 같은 수준의 합의 인증 수준을 유지할 수 있다.
본 개시에 따른 전자 장치는, 전자 장치와 관련된 트랜잭션의 처리에만 참여함으로써, 불필요한 전력 소비를 줄이고 랜덤하게 발생하는 다른 전자 장치들과 통신을 줄일 수 있다.
본 개시에 따른 전자 장치는, 블록체인 네트워크에서 전자 장치와 관련된 트랜잭션의 처리에만 참여함으로써 보안 문제를 개선할 수 있다.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 일 실시 예에 따른 전자 장치의 블록도이다.
도 2는 일 실시 예에 따른 전자 장치의 블록체인 플랫폼을 설명하기 위한 도면이다.
도 3은 일 실시 예에 따른 블록체인 네트워크를 설명하기 위한 도면이다.
도 4는 일 실시 예에 따라, 부분 원장 또는 전체 원장을 저장하는 블록체인 노드들을 포함하는 블록체인 네트워크를 설명하기 위한 도면이다.
도 5는 일 실시 예에 따른 전체 원장에 포함된 블록체인의 구조를 설명하기 위한 도면이다.
도 6은 부분 원장을 포함하는 전자 장치가 트랜잭션에 대한 합의를 처리하는 동작을 나타내는 흐름도이다.
도 7은 일 실시 예에 따른 제1 블록 노드가 제1 스마트 컨트랙트를 실행하는 동작을 설명하기 위한 흐름도이다.
도 8은 일 실시 예에 따른 블록체인 네트워크에서 트랜잭션에 대한 보증 동작을 설명하기 위한 흐름도이다.
도 9는 일 실시 예에 따른 블록체인 네트워크에서 블록을 확정하는 동작을 설명하기 위한 흐름도이다.
도 10은, 다양한 실시예들에 따른, 네트워크 환경 내의 전자 장치의 블록도이다.
도 1은 일 실시 예에 따른 전자 장치의 블록도이다.
도 1을 참조하면, 전자 장치(100)는 메모리(110), 통신 회로(120), 프로세서(130) 및 디스플레이(140) 또는 이들의 조합을 포함할 수 있다. 다양한 실시 예에서, 전자 장치(100)는 도 1에 도시된 구성요소 외에 추가적인 구성요소를 포함하거나, 도 1에 도시된 구성요소 중 적어도 하나를 생략할 수 있다.
일 실시 예에 따르면, 메모리(110)는 프로세서(130)가 실행 시에 전자 장치(100)의 동작을 수행하기 위해 데이터를 처리하거나 전자 장치(100)의 구성요소를 제어하도록 하는 인스트럭션들(instructions)을 저장할 수 있다. 메모리(110)는 보안 영역 또는 별도의 보안 저장 매체(예: 보안 OS를 통해서만 접근 가능한 보안 메모리 영역(예: trust zone))을 포함할 수 있다. 일 실시 예에 따르면, 메모리(110)는 블록체인 관련 동작을 수행하는 적어도 하나의 블록체인 어플리케이션을 포함할 수 있다. 예를 들어, 블록체인 관련된 동작을 수행하는 블록체인 어플리케이션 또는 블록체인 모듈에 대응되는 블록체인 플랫폼을 포함할 수 있다.
일 실시 예에 따르면, 메모리(110)는 블록체인 네트워크에 대한 분산 원장을 저장할 수 있다. 예를 들어, 전자 장치(100)가 블록체인 네트워크에서 서버 노드에 해당하는 경우, 메모리(110)는 블록체인 네트워크에 대한 분산 원장의 전체를 저장할 수 있다. 이하 분산 원장의 전체는 전체 원장으로 표현될 수 있다. 또한, 블록체인 네트워크의 서버 노드는 블록체인 네트워크에 대한 데이터를 저장한 블록 노드들의 정보를 포함하는 노드 리스트를 포함할 수 있다. 예를 들어, 전자 장치(100)가 서버 노드인 경우, 메모리(110)는 노드 리스트를 저장할 수 있다. 다른 예를 들어, 전자 장치(100)가 블록체인 네트워크에서 모바일 노드에 해당하는 경우, 메모리(110)는 블록체인 네트워크에 대한 분산 원장 중에서 일부를 포함하는 부분 원장을 저장할 수 있다. 이하 전체 원장과 구별되는 일부의 분산 원장은 부분 원장으로 표현될 수 있다.
일 실시 예에 따르면, 분산 원장은 블록체인 네트워크에서의 적어도 하나의 트랜잭션을 각각 포함하는 적어도 하나의 블록 및 상태 데이터베이스 (state data-base, State DB)를 포함할 수 있다. 이하, 상태 데이터베이스는 스테이트 데이터베이스 또는 State DB로 표현될 수 있다. 일 실시 예에 따르면, 메모리(110)는 전자 장치(100)가 합의에 참여한 적어도 하나의 트랜잭션 각각에 상응하는 적어도 하나의 블록을 포함하는 부분 원장을 저장할 수 있다. 또한, 메모리(110)는 전자 장치(100)가 합의에 참여한 적어도 하나의 트랜잭션에 대한 데이터를 스테이트 데이터베이스에 저장할 수 있다. 따라서, 전자 장치(100)는 전자 장치(100)가 합의에 참여한 트랜잭션에 관련된 블록만을 메모리(110)에 저장함으로써, 효율적으로 메모리(110)를 관리할 수 있다.
일 실시 예에 따르면, 통신 회로(120)는 외부 장치와 연결되어 데이터를 송수신하도록 구성될 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 통신 회로(120)를 통해 적어도 하나의 외부 장치와 블록체인 네트워크를 형성할 수 있다. 블록체인 네트워크는 적어도 하나의 외부 장치 및 전자 장치(100)를 블록체인 노드로 포함할 수 있다. 따라서, 전자 장치(100) 및/또는 적어도 하나의 외부 장치는 블록 노드인 동시에 클라이언트(client) 역할을 수행할 수 있다. 일 실시 예에서, 전자 장치(100)는 통신 회로(120)를 통해 블록체인 네트워크에 포함된 적어도 하나의 외부 장치들과 데이터를 송수신하고, 블록체인 네트워크에서의 트랜잭션 합의를 수행할 수 있다.
다양한 실시 예들에 따라, 블록체인 네트워크는 블록체인 노드로 서버 노드 및/또는 모바일 노드를 포함할 수 있다. 일 실시 예에 따르면, 모바일 노드는 전자 장치(100) 및/또는 외부 전자 장치로, 휴대 가능한 포터블(portable) 전자 장치를 나타낼 수 있다. 예를 들어, 전자 장치(100) 및/또는 외부 전자 장치는 모바일, 태블릿 PC 및/또는 노트북에 해당할 수 있다. 다양한 실시 예들에 따른 블록체인 네트워크에 대한 설명은 도 3을 참조하여 후술된다.
일 실시 예에 따르면, 프로세서(130)는 메모리(110), 통신 회로(120) 및 디스플레이(140)와 전기적으로 또는 작동적으로(operatively) 연결될 수 있다. 일 실시 예에 따르면, 프로세서(130)는 메모리(110)에 저장된 인스트럭션들을 이용하여 전자 장치(100)의 적어도 하나의 다른 구성요소들의 제어 및/또는 통신에 관한 연산이나 데이터 처리를 실행할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 중앙처리장치(CPU), 그래픽처리장치(GPU), MCU(micro controller unit), 센서 허브, 보조프로세서(supplementary processor), 통신프로세서(communication processor), 어플리케이션 프로세서(application processor), ASIC(application specific integrated circuit), FPGA(field programmable gate arrays) 중 적어도 하나를 포함할 수 있으며, 복수의 코어를 가질 수 있다.
일 실시 예에 따르면, 프로세서(130)는 메모리(110)에 저장된 블록체인 플랫폼을 통해 블록체인과 관련된 동작을 수행할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 트랜잭션의 수행 요청을 획득할 수 있다. 예를 들어, 전자 장치(100)의 사용자로부터 프로세서(130)는 트랜잭션의 수행 요청을 감지할 수 있다.
일 실시 예에 따르면, 프로세서(130)는 수행 요청된 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터를 판단할 수 있다. 또한, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 메모리(110)에 저장되어 있는지 판단할 수 있다. 예를 들어, 프로세서(130)는 메모리(110)에 저장된 스테이트 데이터베이스에 상기 제1 스마트 컨트랙트를 실행하기 위한 데이터(예: 읽기-집합(read-set))가 포함되어 있는지 판단할 수 있다. 예를 들어, 프로세서(130)는 제1 스마트 컨트랙트를 실행하기 위해 스테이트 데이터베이스로부터 읽어야 할 데이터가 메모리(110)에 저장되어 있는지 판단할 수 있다. 이하, 스마트 컨트랙트를 실행하기 위해 필요한 데이터는 읽기-집합(read-set)에 대응될 수 있다.
일 실시 예에 따르면, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행하기 위해 필요한 모든 데이터가 상기 스테이트 데이터베이스에 저장되어 있는 경우, 프로세서(130)는 저장된 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행할 수 있다.
다른 예에 따르면, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터 중에서 일부가 상기 스테이트 데이터베이스에 저장되어 있지 않은 경우, 상기 데이터를 블록체인 네트워크에 포함된 다른 블록 노드로부터 획득할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 상기 데이터를 다른 블록 노드로부터 획득하기 위해, 블록체인 네트워크에 포함된 서버 노드로부터 상기 데이터를 가진 블록 노드들에 대한 정보를 획득할 수 있다. 프로세서(130)는 서버 노드로부터 획득한 정보에 기초하여 다른 블록 노드로 상기 데이터를 요청할 수 있다. 예를 들어, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 상기 스테이트 데이터베이스에 저장되어 있지 않은 경우, 블록체인 네트워크에 포함된 서버 노드로부터 노드 리스트를 획득할 수 있다. 또한, 프로세서(130)는 상기 데이터에 대한 해시 정보를 서버 노드로부터 획득할 수 있다. 일 실시 예에 따르면, 상기 데이터에 대한 해시 정보는 데이터 고유의 식별 값을 나타낼 수 있다.
일 실시 예에 따르면, 프로세서(130)는 서버 노드로부터 획득한 상기 노드 리스트 및 상기 해시 정보에 기초하여, 상기 데이터에 대한 데이터 값(value)을 블록체인 네트워크에 포함된 다른 블록 노드로부터 획득할 수 있다. 예를 들어, 프로세서(130)는 노드 리스트에 기초하여 상기 데이터를 저장하고 있는 적어도 하나의 블록 노드를 확인하고, 확인된 적어도 하나의 블록 노드로부터 상기 해시 정보에 기초하여 상기 데이터를 획득할 수 있다.
일 실시 예에 따르면, 프로세서(130)는 획득한 데이터를 이용하여 트랜잭션을 수행하기 위한 상기 제1 스마트 컨트랙트를 실행할 수 있다.
일 실시 예에 따르면, 블록체인 네트워크에서 트랜잭션을 실행함에 따라, 프로세서(130)는 전체 원장에서의 이전 블록 정보 및 메모리(110)에 저장된 부분 원장에서의 이전 블록 정보를 포함하는 해시 필드 및 상기 트랜잭션에 대한 블록 데이터를 포함하는 블록을 생성하기 위한 동작을 수행할 수 있다. 예를 들어, 프로세서(130)는 블록체인 네트워크에 포함된 블록 노드(예: 블록 생성 노드)로 트랜잭션 데이터를 포함하는 블록 생성을 요청할 수 있다. 상기 블록은 통신 회로(120)를 통해 블록체인 네트워크에 포함된 노드들과 합의를 통해 확정될 수 있다. 일 실시 예에서, 프로세서(130)는 블록을 메모리(110)에 저장할 수 있다. 예를 들어, 프로세서(130)는 합의를 통해 확정된 상기 블록에 대한 업데이트 요청을 서버 노드로부터 획득하고, 상기 업데이트 요청에 기초하여 상기 블록을 메모리(110)에 저장할 수 있다. 이때, 프로세서(130)는 상기 블록을 부분 원장의 블록체인의 말단 블록 이후의 블록으로 저장할 수 있다.
일 실시 예에 따르면, 디스플레이(140)는 각종 컨텐츠(예: 텍스트, 이미지, 비디오, 아이콘, 및/또는 심볼 등)를 표시할 수 있다. 일 실시 예에 따르면, 디스플레이(140)는 액정 디스플레이(LCD), 발광 다이오드(LED) 디스플레이 또는 유기 발광 다이오드(OLED) 디스플레이를 포함할 수 있다.
일 실시 예에 따르면, 프로세서(130)는 블록체인 어플리케이션과 관련된 각종 컨텐츠를 디스플레이(140)를 통해 표시할 수 있다. 예를 들어, 프로세서(130)는 디스플레이(140)를 통해 수행 요청된 트랜잭션에 대한 성공 또는 실패 알림을 나타내는 컨텐츠를 표시할 수 있다. 예를 들어, 프로세서(130)는 트랜잭션 합의를 위한 보증 동작, 검증 동작 및/또는 순서 결정 동작이 실패하는 경우, 트랜잭션 합의 동작을 중단하고 블록 생성의 실패에 대한 알림을 디스플레이(140)를 통해 표시할 수 있다. 다양한 실시 예들에 따라, 프로세서(130)는 디스플레이(140)에 제한되지 않고 전자 장치(100)에 포함된 다양한 구성을 이용하여 상기 실패 알림을 출력할 수 있다.
도 2는 일 실시 예에 따른 전자 장치의 블록체인 플랫폼을 설명하기 위한 도면이다.
도 2를 참조하면, 전자 장치(100)는 블록체인 플랫폼(200)을 포함할 수 있다. 일 실시 예에 따르면, 블록체인 플랫폼(200)은 메모리(110)에 저장된 블록체인 관련된 동작을 수행하는 블록체인 어플리케이션 또는 블록체인 관련된 동작을 수행하는 블록체인 모듈에 대응될 수 있다.
일 실시 예에 따르면, 블록체인 플랫폼(200)은 스마트 컨트랙트(smart contract)(210), 분산 원장(220), 블록체인 프로세서(230), 트랜잭션 합의 모듈(240) 및 블록체인 네트워크 관리 모듈(250)을 포함할 수 있다. 다양한 실시 예들에 따라, 블록체인 플랫폼(200)은 블록체인과 관련된 동작을 수행하기 위해 다양한 구성을 더 포함하거나 일부 구성이 생략될 수 있다.
일 실시 예에 따르면, 블록체인 프로세서(230)는 프로세서(130)에 포함될 수 있다. 블록체인 프로세서(230)는 블록체인 플랫폼(200)에 포함된 구성들의 동작을 제어할 수 있다. 예를 들어, 블록체인 프로세서(230)는 블록체인 네트워크 상에서 원장 동기화, 트랜잭션 서명 및/또는 트랜잭션 기록 수행을 포함하는 트랜잭션의 실행을 할 수 있다.
일 실시 예에 따르면, 블록체인 플랫폼(200)은 스마트 컨트랙트(210)를 포함할 수 있다. 블록체인 프로세서(230)는 트랜잭션에 대한 스마트 컨트랙트(210)를 실행함에 있어서 필요한 값(예: 읽기-집합(read-set))을 스마트 컨트랙트(210)에 제공할 수 있다. 또한, 블록체인 프로세서(230)는 스마트 컨트랙트(210)를 실행함으로써, 출력되는 값(예: 쓰기-집합(write-set))을 저장할 수 있다. 예를 들어, 블록체인 프로세서(230)는 스마트 컨트랙트(210)를 실행하기 위해 데이터 및 인수들을 제공할 수 있다. 일 실시 예에 따르면, 스마트 컨트랙트(210)가 실행됨에 따라, 스마트 컨트랙트(210)의 실행을 위해 읽어야 할 데이터(요구되는 데이터) 세트(예: 읽기-집합(read-set)) 및 스마트 컨트랙트(210)의 실행의 결과값을 포함하는 데이터 세트(예: 쓰기-집합(write-set))가 반환(return)될 수 있다.
일 실시 예에서, 분산 원장(220)은 블록체인(221)과 스테이트 데이터베이스(state data-base)(222)를 포함할 수 있다. 일 실시 예에 따르면, 분산 원장(220)은 블록체인 네트워크에서 전자 장치(100)와 관련된 트랜잭션에 대한 데이터를 저장할 수 있다. 예를 들어, 분산 원장(220)은 전자 장치(100)가 합의 처리에 참여한 트랜잭션에 기초한 블록 및 데이터를 저장할 수 있다. 일 실시 예에 따르면, 분산 원장(220)은 블록체인 네트워크의 전체 원장의 적어도 일부를 포함하는 부분 원장일 수 있다. 예를 들어, 분산 원장은 블록체인 네트워크에서의 모든 트랜잭션과 관련된 블록 및 데이터를 저장하는 전체 원장에서 전자 장치(100)와 관련된 트랜잭션에 대한 블록 및 데이터를 저장하는 부분 원장일 수 있다.
일 실시 예에 따르면, 블록체인(221)은 블록체인 네트워크를 통해 생성된 적어도 하나의 블록을 포함할 수 있다. 블록은 블록 헤더와 트랜잭션 데이터를 포함할 수 있다. 일 실시 예에 따르면, 블록 헤더는 헤더 및 데이터 영역의 해시 값, 이전 블록의 해시 값, 블록의 높이(height) 값, 블록에 포함된 트랜잭션을 수행한 이후의 스테이트 데이터의 해시 값, 블록 생성자의 공개 키, 블록 생성자의 개인 키로 해시를 서명한 값, 입증 키 인증 체인(Attestation Key Certificate Chain) 또는 입증 키(Attestation Key)로 해시 값을 서명한 값 중 적어도 하나를 포함할 수 있다.
블록 데이터는 트랜잭션 데이터 중 적어도 일부의 해시 값, 스마트 컨트랙트의 버전 정보, 스마트 컨트랙트 ID, 스마트 컨트랙트 함수 ID, 스마트 컨트랙트 함수에 필요한 인자 값인 스마트 컨트랙트 데이터, 트랜잭션 생성자의 트랜잭션 생성 번호인 논스(nonce) 값, 트랜잭션 생성자의 공개 키, 트랜잭션 생성자의 개인 키로 해시 값을 서명한 값, 입증 키 인증 체인 또는 해시 값을 입증 키로 서명한 값 중 적어도 하나를 포함할 수 있다.
일 실시 예에서, 분산 원장(220)의 블록들은 체인 형태를 이루며 분산 원장(220)에 블록 데이터를 저장할 수 있다. 예를 들어, 블록체인(221)에 포함된 적어도 하나의 블록은 해시 필드와 블록 데이터를 포함할 수 있다. 일 실시 예에 따르면, 해시 필드는 블록체인 네트워크의 전체 원장에서의 이전 블록 정보 및 블록체인 네트워크의 부분 원장에서의 이전 블록 정보를 포함할 수 있다. 일 실시 예에서, 블록 데이터는 해당 블록에 대한 트랜잭션 데이터를 포함할 수 있다.
일 실시 예에 따르면, 블록체인(221)에 포함된 적어도 하나의 블록은 해시 필드에 포함된 이전 블록 정보에 기초하여 연결되는 것으로 표현될 수 있다. 예를 들어, 블록체인(221)에 포함된 적어도 하나의 블록은 유향 비순환 그래프(directed acyclic graph, DAG) 구조로 연결될 수 있다. 일 실시 예에 따르면, 블록체인 네트워크의 전체 원장에 포함된 적어도 하나의 블록이 DAG 구조로 연결된 경우, 블록체인 네트워크의 부분 원장은 전체 원장의 서브 그래프 구조로 연결될 수 있다.
일 실시 예에서, 스테이트 데이터베이스(222)는 블록체인 네트워크에서의 트랜잭션 실행으로 인해 변경된 값들을 키 값(key-value) 형태로 저장할 수 있다. 일 실시 예에 따르면, 상기 키 값(key-value)의 형태는 데이터의 키(key), 데이터 값(value), 데이터에 대한 해시(hash), 블록체인 네트워크에서 데이터를 소유한 블록 노드의 정보 및 블록 넘버를 포함할 수 있다. 일 실시 예에서, 스테이트 데이터베이스(222)에 저장된 데이터는 스테이트 데이터(state data)로 표현될 수 있다. 스테이트 데이터는, 예를 들어, 하이퍼레저 패브릭(hyperledger fabric)에서 사용되는 데이터베이스인 월드 스테이트(world state)에 저장된 데이터를 의미할 수 있다. 다만, 이에 한정되지 아니한다.
스테이트 데이터베이스(222)는 하이퍼레저 패브릭에서 사용되는 일종의 데이터베이스로, 트랜잭션을 실행하여 변경된 최종의 값들을 키값 형태로 저장할 수 있다. 따라서, 전자 장치(100)는 블록체인 네트워크 내의 트랜잭션 실행에 의한 최종의 값들을 확인하기 위해서 스테이트 데이터베이스(222)를 확인할 수 있다.
일 실시 예에 따르면, 스테이트 데이터베이스(222)는 전자 장치(100)의 사용자가 관여한 트랜잭션에 대한 데이터를 저장할 수 있다. 예를 들어, 블록체인 네트워크에서 전자 장치(100)와 관련된 트랜잭션 실행으로 인해 변경된 값들을 저장할 수 있다.
일 실시 예에 따르면, 트랜잭션 합의 모듈(240)은 블록체인 네트워크에서 전자 장치(100)가 트랜잭션의 합의를 처리하기 위한 동작을 제어할 수 있다. 예를 들어, 트랜잭션 합의 모듈(240)은 블록체인 네트워크에서 사용되는 합의 알고리즘에 기초하여 트랜잭션 합의를 처리하는 동작을 수행할 수 있다. 트랜잭션 합의 모듈(240)은 통상적인 블록체인에서 사용되는 다양한 합의 알고리즘을 지원할 수 있다. 예를 들어, 트랜잭션 합의 모듈(240)은 proof of work(POW), proof of stake(POS), PBFT, RAFT에 기초하여 블록체인 네트워크에 포함된 노드들과 트랜잭션 합의를 수행할 수 있다. 일 실시 예에 따른, 블록체인 네트워크에서 트랜잭션 합의 모듈(240)을 통해 트랜잭션 합의를 수행하는 동작은 도 7 내지 도 9를 참조하여 후술된다.
일 실시 예에 따르면, 블록체인 네트워크 관리 모듈(250)은 전자 장치(100)가 노드로 참여한 블록체인 네트워크와 관련된 동작을 수행할 수 있다. 일 실시 예에 따르면, 블록체인 네트워크 관리 모듈(250)은 블록체인 네트워크를 형성하고, 블록체인 네트워크에 포함된 다른 노드들(외부 장치들)과 관련된 동작을 수행할 수 있다.
상술한 바와 같이, 일 실시 예에 따르면, 블록체인 네트워크에 포함된 제1 블록 노드를 구성하는 전자 장치(예: 도 1의 전자 장치(100))는 상기 블록체인 네트워크(예: 도 3의 블록체인 네트워크(300))에 포함된 제2 블록 노드(예: 도 3의 제1 외부 장치(310)) 또는 제3 블록 노드(예: 도 3의 제3 외부 장치(330))와 신호를 송신 또는 수신하는 통신 회로(예: 도 1의 통신 회로(120)), 상기 블록체인 네트워크에 대한 전체 원장 중에서 일부를 포함하는 부분 원장(예: 도 2의 분산 원장(220))을 저장하는 메모리(예: 도 1의 메모리(110)), 상기 부분 원장은 제1 데이터베이스(예: 도 2의 스테이트 데이터베이스(222))를 포함, 상기 통신 회로 및 상기 메모리와 전기적으로 연결된 적어도 하나의 프로세서(예: 도 1의 프로세서(130))를 포함하고, 상기 적어도 하나의 프로세서는, 수행 요청된 트랜잭션에 대한 제1 스마트 컨트랙트(예: 도 2의 스마트 컨트랙트(210))를 실행하기 위해 필요한 데이터가 상기 제1 데이터베이스에 저장되어 있는지 판단하고, 상기 판단 결과에 기초하여, 상기 데이터를 저장한 적어도 하나의 블록 노드에 대한 정보를 포함하는 노드 정보를 상기 통신 회로를 통해 상기 제3 블록 노드로부터 획득하고, 상기 노드 정보에 기초하여 상기 데이터를 상기 제2 블록 노드 또는 상기 제3 블록 노드로부터 획득하고, 상기 제1 스마트 컨트랙트를 실행할 수 있다.
일 실시 예에 따르면, 상기 부분 원장은 상기 전자 장치가 합의에 참여한 적어도 하나의 트랜잭션 각각에 상응하는 적어도 하나의 블록을 포함하고, 상기 적어도 하나의 블록은 각각 상기 전체 원장에서의 이전 블록 정보 및 상기 부분 원장에서의 이전 블록 정보를 포함하는 블록 해시 및 블록 데이터를 포함할 수 있다.
일 실시 예에 따르면, 상기 제1 데이터베이스는 상기 적어도 하나의 트랜잭션과 관련된 스테이트(state) 데이터를 저장할 수 있다.
일 실시 예에 따르면, 상기 제3 블록 노드는 제2 데이터베이스를 포함하는 상기 전체 원장을 포함하고, 상기 제2 데이터베이스는 상기 블록체인 네트워크에 대한 전체 스테이트 데이터를 저장하고, 상기 적어도 하나의 프로세서는 상기 제2 데이터베이스에 상기 데이터가 저장된 경우, 상기 제3 블록 노드로부터 상기 데이터를 획득할 수 있다.
일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 노드 정보와 함께 상기 데이터에 대한 해시 정보를 상기 통신 회로를 통해 상기 제3 블록 노드로부터 획득하고, 제1 데이터 세트 및 상기 트랜잭션을 포함하는 보증 요청을 상기 제2 블록 노드로 전송하고, 상기 보증 요청에 기초하여 생성된 제2 데이터 세트 및 상기 제1 데이터 세트를 포함하는 보증 결과를 상기 제2 블록 노드로부터 수신하고, 상기 보증 결과를 상기 해시 정보에 기초하여 검증하고, 상기 제1 데이터 세트는 상기 제1 스마트 컨트랙트를 실행하기 위해 요구되는 데이터를 포함하고, 상기 제2 데이터 세트는 상기 제1 스마트 컨트랙트의 실행에 기초하여 상기 제1 데이터베이스에 저장될 데이터를 포함할 수 있다.
일 실시 예에 따르면, 상기 제2 데이터 세트는, 상기 제2 블록 노드가 상기 제1 데이터 세트에 기초하여 제2 스마트 컨트랙트를 실행함에 따라 생성될 수 있다.
일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 보증 결과가 검증됨에 따라 상기 제1 데이터 세트 및 상기 제2 데이터 세트에 기초하여 상기 트랜잭션에 대한 트랜잭션 데이터를 생성하고, 상기 상기 제1 데이터 세트, 상기 제2 데이터 세트 및 상기 트랜잭션 데이터를 포함하는 블록 생성 요청을 상기 제3 블록 노드로 전송하고, 상기 블록 생성 요청에 기초하여 생성된 상기 부분 원장 및 상기 제1 데이터베이스에 대한 업데이트 요청을 상기 제3 블록 노드로부터 수신하고, 상기 업데이트 요청에 기초하여, 상기 부분 원장 및 상기 제1 데이터베이스를 업데이트할 수 있다.
일 실시 예에 따르면, 상기 업데이트 요청은 상기 제3 블록 노드로부터 생성된 상기 제1 데이터 세트 및 상기 제2 데이터 세트를 상기 제3 블록 노드에 저장된 상기 해시 정보, 블록 순서 정보, 상기 노드 리스트 중 적어도 하나와 비교한 결과에 기초하여 생성될 수 있다.
상술한 바와 같이, 블록체인 네트워크(예: 도 3의 블록체인 네트워크(300))에 포함된 제1 블록 노드를 구성하는 전자 장치(예: 도 3의 전자 장치(100))의 동작 방법은, 상기 블록체인 네트워크에 대한 전체 원장 중에서 일부를 포함하는 부분 원장을 저장하는 동작, 상기 부분 원장은 제1 데이터베이스를 포함, 트랜잭션의 수행에 대한 요청을 획득하는 동작, 상기 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 상기 제1 데이터베이스에 저장되어 있는지 판단하는 동작, 상기 판단 결과에 기초하여, 상기 데이터를 저장한 적어도 하나의 블록 노드에 대한 노드 정보를 제3 블록 노드로부터 획득하는 동작, 상기 노드 정보에 기초하여 제2 블록 노드 또는 상기 제3 블록 노드로부터 상기 데이터를 획득하는 동작 및 상기 제1 스마트 컨트랙트를 실행하는 동작을 포함할 수 있다.
일 실시 예에 따르면, 상기 부분 원장은 상기 전자 장치가 합의에 참여한 적어도 하나의 트랜잭션 각각에 상응하는 적어도 하나의 블록을 포함하고, 상기 저장하는 동작은, 상기 전체 원장에서의 이전 블록 정보 및 상기 부분 원장에서의 이전 블록 정보를 포함하는 블록 해시 및 블록 데이터를 각각 포함하는 상기 적어도 하나의 블록을 저장하는 동작 및 상기 적어도 하나의 트랜잭션과 관련된 스테이트(state) 데이터를 저장하는 동작을 포함할 수 있다.
일 실시 예에 따르면, 상기 제3 블록 노드는 상기 블록체인 네트워크에 대한 전체 스테이트 데이터를 저장하는 제2 데이터베이스를 포함하는 상기 전체 원장을 포함하고, 상기 데이터를 획득하는 동작은, 상기 제2 데이터베이스에 상기 데이터가 저장되어 있음에 응답하여 상기 제3 블록 노드로부터 상기 데이터를 획득할 수 있다.
제1 데이터 세트 및 상기 트랜잭션을 포함하는 보증 요청을 상기 제2 블록 노드로 전송하는 동작, 상기 보증 요청에 기초하여 생성된 제2 데이터 세트 및 상기 제1 데이터 세트를 포함하는 보증 결과를 상기 제2 블록 노드로부터 수신하는 동작 및 상기 제1 데이터 세트 및 상기 제2 데이터 세트 각각에 대한 해시 정보에 기초하여 상기 보증 결과를 검증하는 동작을 더 포함하고, 상기 제1 데이터 세트는 상기 제1 스마트 컨트랙트를 실행하기 위해 요구되는 데이터를 포함하고, 상기 제2 데이터 세트는 상기 제1 스마트 컨트랙트의 실행에 기초하여 상기 제1 데이터베이스에 저장될 데이터를 포함할 수 있다.
일 실시 예에 따르면, 상기 제2 데이터 세트는, 상기 제2 블록 노드가 상기 제1 데이터 세트에 기초하여 제2 스마트 컨트랙트를 실행함에 따라 생성될 수 있다.
일 실시 예에 따르면, 상기 보증 결과가 검증됨에 따라 상기 제1 데이터 세트 및 상기 제2 데이터 세트에 기초하여 상기 트랜잭션에 대한 트랜잭션 데이터를 생성하는 동작, 상기 제1 데이터 세트, 상기 제2 데이터 세트 및 상기 트랜잭션 데이터를 포함하는 블록 생성 요청을 상기 제3 블록 노드로 전송하는 동작, 상기 블록 생성 요청에 기초하여 생성된 상기 부분 원장 및 상기 제1 데이터베이스에 대한 업데이트 요청을 상기 제3 블록 노드로부터 수신하는 동작 및 상기 업데이트 요청에 기초하여, 상기 부분 원장 및 상기 제1 데이터베이스를 업데이트 하는 동작을 더 포함할 수 있다.
일 실시 예에 따르면, 상기 업데이트 요청은 상기 제3 블록 노드로부터 생성된 상기 제1 데이터 세트 및 상기 제2 데이터 세트를 상기 제3 블록 노드에 저장된 해시 정보, 블록 순서 정보, 상기 노드 리스트 중 적어도 하나와 비교한 결과에 기초하여 생성될 수 있다.
상술한 바와 같이, 적어도 제1 전자 장치(예: 도 3의 전자 장치(100)), 제2 전자 장치(예: 도 3의 제1 외부 장치(310) 또는 제2 외부 장치(320)) 및 제3 전자 장치(예: 도 3의 제3 외부 장치(330))를 각각 블록체인 노드로 포함하는 블록체인 시스템(예: 블록체인 네트워크(300))에 있어서, 상기 제1 전자 장치는 상기 블록체인 시스템에 대한 전체 원장 중에서 일부를 포함하는 부분 원장 및 제1 데이터베이스를 포함하고, 상기 제1 전자 장치는 트랜잭션의 수행을 요청 받음에 응답하여, 상기 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 상기 제1 데이터베이스에 저장되어 있는지 판단하고, 상기 제1 전자 장치는 상기 판단 결과에 기초하여 상기 데이터를 저장한 적어도 하나의 외부 장치를 포함하는 노드 정보를 상기 제3 전자 장치로부터 획득하고, 상기 제1 전자 장치는 상기 노드 정보에 기초하여 상기 데이터를 획득하고, 획득된 상기 데이터를 이용하여 상기 제1 스마트 컨트랙트를 실행할 수 있다.
일 실시 예에 따르면, 상기 제1 전자 장치는 제1 데이터 세트 및 상기 트랜잭션을 포함하는 보증 요청을 상기 제2 전자 장치로 전송하고, 상기 제2 전자 장치는 상기 보증 요청에 기초하여 제2 데이터 세트를 생성하고, 상기 제2 데이터 세트 및 상기 제1 데이터 세트를 포함하는 보증 결과를 상기 제1 전자 장치로 전송하고, 상기 제1 전자 장치는 상기 보증 결과를 검증하고, 상기 제1 데이터 세트는 상기 제1 스마트 컨트랙트를 실행하기 위해 요구되는 데이터를 포함하고, 상기 제2 데이터 세트는 상기 제1 스마트 컨트랙트의 실행에 기초하여 상기 제1 데이터베이스에 저장될 데이터를 포함할 수 있다.
일 실시 예에 따르면, 상기 제1 전자 장치는 상기 보증 결과에 기초하여 상기 제1 데이터 세트 및 상기 제2 데이터 세트에 기초하여 상기 트랜잭션에 상응하는 트랜잭션 데이터를 생성하고, 상기 제1 데이터 세트, 상기 제2 데이터 세트 및 상기 트랜잭션 데이터를 포함하는 블록 생성 요청을 상기 제3 전자 장치로 전송하고, 상기 제3 전자 장치는 상기 제1 데이터 세트 및 상기 제2 데이터를 상기 제3 전자 장치의 메모리에 저장된 상기 데이터에 대한 해시 정보, 블록 순서 정보, 상기 노드 리스트 중 적어도 하나와 비교하고, 상기 비교 결과에 기초하여 상기 블록을 확정할 수 있다.
일 실시 예에 따르면, 상기 제3 전자 장치는 상기 블록이 확정됨에 응답하여, 상기 블록체인 시스템에 블록체인 노드로 포함된 적어도 하나의 전자 장치들 중에서, 상기 트랜잭션에 관련된 전자 장치들에게 확정된 상기 블록에 따른 업데이트를 요청할 수 있다.
일 실시 예에 따르면, 상기 블록체인 시스템의 전체 원장은 상기 블록체인 시스템에 대한 적어도 하나의 트랜잭션 각각에 상응하는 적어도 하나의 블록을 포함하고, 상기 적어도 하나의 블록은 각각 상기 전체 원장에서의 이전 블록 정보 및 상기 부분 원장에서의 이전 블록 정보를 포함하는 블록 해시를 포함하고, 상기 적어도 하나의 블록은 유향 비순환 그래프(directed acyclic graph, DAG) 구조로 연결될 수 있다.
도 3은 일 실시 예에 따른 블록체인 네트워크를 설명하기 위한 도면이다.
도 3를 참조하면, 복수 개의 전자 장치들(100, 310, 320, 330)은 블록체인 네트워크(300)를 구성할 수 있다. 블록체인 네트워크(300)를 구성하는 복수 개의 전자 장치들(100, 310, 320, 330)은 휴대 가능한 전자 장치를 포함할 수 있다. 예를 들어, 복수 개의 전자 장치들(100, 310, 320, 330)은 모바일, 태블릿 PC 및/또는 노트북에 해당할 수 있다. 일 실시 예에 따르면, 전자 장치(100), 제1 외부 장치(310) 및 제2 외부 장치(320)는 휴대 가능한 모바일 노드이고, 제3 외부 장치(330)는 서버 노드일 수 있다. 다양한 실시 예들에 따라, 블록체인 네트워크(300)는 제3 외부 장치(330)와 유사한 서버 노드를 복수 개 포함할 수 있다.
일 실시 예에 따르면, 복수 개의 전자 장치들(100, 310, 320, 330)은 전자 장치(100)의 구성과 유사한 구성을 포함할 수 있다. 예를 들어, 복수 개의 전자 장치들(100, 310, 320, 330)은 블록체인 네트워크에서 필요한 동작들을 수행하기 위한 구성으로 블록체인 플랫폼(200)과 유사한 구성들을 포함할 수 있다.
본 개시에 따르면, 설명의 편의를 위해 4개의 전자 장치들이 블록체인 네트워크를 구성하는 것으로 설명하였지만, 이에 제한되지 않는다.
일 실시 예에서, 제3 외부 장치(330)는 서버 노드일 수 있다. 서버 노드 역할을 하는 제3 외부 장치(330)는 블록체인 네트워크(300)의 전체 원장을 저장할 수 있다. 일 실시 예에 따르면, 제3 외부 장치(330)는 블록체인 네트워크(300)에 모든 트랜잭션에 대한 합의 및 모든 블록 기록을 수행할 수 있다. 예를 들어, 제3 외부 장치(330)는 모든 트랜잭션 합의에 참여하고, 블록체인 네트워크(300)의 모든 트랜잭션의 블록 및 스테이트 데이터를 메모리에 저장할 수 있다. 따라서, 제3 외부 장치(330)는 블록체인 네트워크(300)의 분산 원장인 전체 원장을 메모리에 저장할 수 있다.
일 실시 예에서, 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320)는 블록체인 네트워크(300)의 모바일 노드일 수 있다. 일 실시 예에 따르면, 모바일 노드 역할을 하는 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320)는 블록체인 네트워크(300)에 모든 트랜잭션 중에서 각각의 장치들과 관련된 트랜잭션의 생성 및 블록 기록을 수행할 수 있다. 예를 들어, 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320)는 각각의 장치들과 관련된 트랜잭션 합의에 참여하고, 각각의 장치들과 관련된 트랜잭션의 블록 및 스테이트 데이터만을 각각 장치 내 메모리에 저장할 수 있다. 예를 들어, 전자 장치(100)는 전자 장치(100) 및/또는 전자 장치(100)의 사용자와 관련된 트랜잭션 합의에 참여하고, 상기 트랜잭션의 블록 및 스테이트 데이터만을 메모리(110)에 저장할 수 있다. 따라서, 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320)는 블록체인 네트워크(300)의 전체 원장 중에서 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320) 각각이 참여한 트랜잭션의 블록 및 스테이트 데이터만을 저장하는 부분 원장을 각각의 메모리에 저장할 수 있다.
일 실시 예에 따르면, 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320)는 장치의 사용자가 관여하는 트랜잭션의 합의에만 참여하고, 트랜잭션 실행에 의한 데이터를 각각의 스테이트 데이터베이스에 저장할 수 있다. 예를 들어, 전자 장치(100)는 전자 장치(100)의 사용자가 관여하는 트랜잭션의 합의에만 참여하고, 트랜잭션 실행에 의한 데이터를 스테이트 데이터베이스(222)에 저장할 수 있다. 일 실시 예에 따라, 트랜잭션 실행에 의해 블록이 확정되면, 상기 제3 외부 장치(330)는 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320) 중에서 상기 트랜잭션에 관여한 장치에 분산 원장의 업데이트를 요청할 수 있다.
일 실시 예에 따르면, 복수 개의 전자 장치들(100, 310, 320, 330) 각각은 트랜잭션 실행을 위한 스마트 컨트랙트를 각각 독립적으로 실행할 수 있다. 일 실시 예에서, 스마트 컨트랙트는 트랜잭션을 처리하기 위한 동일한 프로그램 로직을 실행할 수 있다. 일 실시 예에 따른 블록체인 네트워크(300)에 포함된 노드들은 각각 장치들과 관련된 트랜잭션의 실행에만 참여하도록 구성될 수 있다. 예를 들어, 모바일 노드에 해당하는 전자 장치(100), 제1 외부 장치(310) 및/또는 제2 외부 장치(320)는 각각 장치와 연관된 트랜잭션의 실행에만 참여할 수 있다. 이와 달리, 서버 노드는 모든 트랜잭션의 실행에 참여할 수 있다.
일 실시 예에서, 복수 개의 전자 장치들(100, 310, 320, 330)은 스마트 컨트랙트를 실행하기 위해, 복수 개의 전자 장치들(100, 310, 320, 330) 중 적어도 하나에 포함된 스테이트 데이터베이스에 저장된 스테이트 데이터를 참조할 수 있다. 일 실시 예에 따르면, 복수 개의 전자 장치들(100, 310, 320, 330) 각각이 스테이트 데이터에 기초하여 스마트 컨트랙트를 실행하고, 복수 개의 전자 장치들(100, 310, 320, 330) 서로간에 수행되는 합의 프로세스의 결과에 기초하여 트랜잭션을 실행할 지 여부를 결정할 수 있다. 예를 들어, 복수 개의 전자 장치들(100, 310, 320, 330) 각각에 의한 스마트 컨트랙트를 실행하여 생성된 결과 값이 일치하는 경우 합의에 성공한 것으로 판단할 수 있다. 복수 개의 전자 장치들(100, 310, 320, 330) 중에서 트랜잭션 실행에 관련된 장치들 사이에 수행되는 합의를 통해 트랜잭션에 대한 블록이 생성될 수 있다. 일 실시 예에 따르면, 상기 트랜잭션 실행에 관련된 장치들 각각에 저장된 분산 원장의 블록체인에 생성된 블록이 추가될 수 있다. 예를 들어, 추가된 블록이 분산 원장의 블록체인의 말단 블록 이후의 블록으로 연결될 수 있다.
일 실시 예에 따르면, 복수 개의 전자 장치들(100, 310, 320, 330) 중에서 상기 트랜잭션 실행에 관련된 장치들 각각의 스테이트 데이터베이스에 저장된 키 값은 상기 트랜잭션 실행에 의해 업데이트 될 수 있다. 일 실시 예에 따른 블록체인 네트워크(300)의 노드들은 각각 장치와 관련된 트랜잭션의 실행에만 참여하므로, 노드들은 각각 장치와 관련된 트랜잭션에 대한 스테이트 데이터를 저장할 수 있다. 따라서, 블록체인 네트워크(300)의 노드들은 모든 트랜잭션의 실행에 따라 스테이트 데이터베이스를 업데이트할 필요 없이, 각각 장치들과 관련된 트랜잭션의 실행된 경우에 스테이트 데이터를 업데이트 할 수 있다.
일 실시 예에 따른 블록체인 네트워크(300)의 분산 원장은 도 2를 참조하여 설명된 분산 원장(220)과 유사한 구조를 가질 수 있다. 일 실시 예에 따르면, 블록체인 네트워크(300)의 분산 원장은 블록체인과 스테이트 데이터베이스를 포함할 수 있다. 블록체인은 블록체인 네트워크(300)에서 트랜잭션을 실행함에 따라, 전체 원장에서의 이전 블록 정보 및 부분 원장에서의 이전 블록 정보를 포함하는 해시 필드 및 트랜잭션에 대한 블록 데이터를 포함하는 적어도 하나의 블록을 포함할 수 있다.
일 실시 예에 따르면, 블록체인 네트워크(300)에 포함된 모든 블록체인 노드들은 각각 전체 원장 또는 부분 원장을 소유할 수 있다. 일 실시 예에 따르면, 전체 원장 또는 부분 원장 각각에에 포함된 각각의 적어도 하나의 블록은 각각 해시 필드를 이용해 연결될 수 있다. 따라서, 상기 해시 필드에 기초한 연결이 끊어지거나, 상이한 분산 원장이 발견된 경우, 블록체인 노드들은 해당 블록에 대한 신뢰성 및 유효성을 의심할 수 있다.
도 4는 일 실시 예에 따라, 부분 원장 또는 전체 원장을 저장하는 블록체인 노드들을 포함하는 블록체인 네트워크를 설명하기 위한 도면이다.
도 4를 참조하면, 블록체인 네트워크(예: 도 3의 블록체인 네트워크(300))는 블록체인 네트워크를 구성하는 블록 노드들로 복수 개의 전자 장치를 포함할 수 있다. 예를 들어, 블록체인 네트워크는 제1 블록 노드(410), 제2 블록 노드 (420), 제3 블록 노드(430), 제4 블록 노드(440) 및/또는 제5 블록 노드(450)를 블록체인 노드로 포함할 수 있다. 일 실시 예에 따르면, 제1 내지 제5 블록 노드들(410~450)은 전자 장치(100)와 유사한 구성을 포함할 수 있다. 예를 들어, 제1 내지 제5 블록 노드들(410~450)은 블록체인 플랫폼(200)과 유사한 동작을 수행하는 구성을 각각 포함할 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410), 제2 블록 노드(420) 및 제5 블록 노드(450)는 모바일 노드로 구성될 수 있다. 또한, 제3 블록 노드(430) 및 제4 블록 노드(440)는 서버 노드로 구성될 수 있다. 일 실시 예에 따르면, 제1 블록 노드(410), 제2 블록 노드(420) 및 제5 블록 노드(450)는 휴대 가능한 포터블(portable) 전자 장치를 나타낼 수 있다. 예를 들어, 제1 블록 노드(410), 제2 블록 노드(420) 및 제5 블록 노드(450)는 모바일, 태블릿 PC 및/또는 노트북에 해당할 수 있다. 일 실시 예에 따르면, 제3 블록 노드(430) 및 제4 블록 노드(440)는 서버 노드로, 제1 블록 노드(410), 제2 블록 노드(420) 및 제5 블록 노드(450)와 비교하여 큰 메모리 용량을 가진 전자 장치일 수 있다.
일 실시 예에 따르면, 블록체인 네트워크에 포함된 제1 내지 제5 블록 노드들(410~450)은 서로 통신할 수 있다. 따라서, 제1 내지 제5 블록 노드들(410~450)은 각각의 장치에 포함된 통신 회로(예: 도 1의 통신 회로(120))를 이용하여 트랜잭션 실행에 필요한 동작을 수행할 수 있다. 예를 들어, 제1 내지 제5 블록 노드들(410~450)은 각각 통신 회로를 이용하여 트랜잭션에 대한 합의 동작을 수행할 수 있다.
일 실시 예에 따르면, 블록체인 네트워크에서 생성된 블록들은 도2 및 도 3을 참조하여 설명된 분산 원장에 포함될 수 있다. 예를 들어, 블록체인 네트워크에서 제1 내지 제4 블록이 생성된 경우, 분산 원장은 제1 내지 제4 블록들을 포함할 수 있다. 일 실시 예에 따르면, 제1 내지 제4 블록들은 각각 제1 트랜잭션 내지 제4 트랜잭션 실행에 기초하여 생성될 수 있다. 다양한 실시 예들에 따라, 제1 내지 제4 블록들은 각각 적어도 하나의 트랜잭션의 실행에 기초하여 생성될 수 있다.
일 실시 예에 따르면, 분산 원장에 포함된 적어도 하나의 블록은 도 2 및 도 3을 참조하여 설명된 블록의 구성과 유사할 수 있다. 예를 들어, 블록은 이전 블록의 정보를 포함하는 해시 필드와 블록의 트랜잭션 데이터를 포함하는 블록 데이터를 포함할 수 있다. 일 실시 예에 따르면, 블록체인 네트워크의 분산 원장에 포함된 적어도 하나의 블록은 해시 필드에 포함된 이전 블록 정보에 기초하여 유향 비순환 그래프(directed acyclic graph, DAG) 구조로 연결될 수 있다. 제1 내지 제4 블록들의 구성 및 연결 구조는 도 5를 참조하여 후술된다.
일 실시 예에 따르면, 제1 내지 제5 블록 노드들(410~450)은 각각 블록체인 네트워크의 분산 원장 중에서 적어도 일부를 포함할 수 있다. 예를 들어, 제1 블록 노드(410), 제2 블록 노드(420) 및 제5 블록 노드(450)는 각각 노드들은 메모리(예: 도 1의 메모리(110))에 블록체인 네트워크의 전체 원장 중에서 일부를 포함하는 부분 원장을 저장할 수 있다. 예를 들어, 제3 블록 노드(430) 및 제4 블록 노드(440)는 메모리에 블록체인 네트워크의 전체 원장을 저장할 수 있다.
일 실시 예에 따르면, 부분 원장을 저장하는 블록 노드들은 각각 블록 노드와 관련된 트랜잭션에 대한 블록들을 포함하는 부분 원장을 저장할 수 있다. 일 실시 예에 따라, 각각 블록 노드와 관련된 트랜잭션인지는 트랜잭션의 실행에 필요한 데이터를 노드의 메모리에 저장하고 있는지 여부, 노드의 사용자가 트랜잭션 생성을 요청한 것인지 여부 및/또는 블록 노드가 트랜잭션에 기초한 합의에 참여하였는지 여부에 따라 판단될 수 있다. 일 실시 예에 따르면, 제1 블록 노드(410)는 제4 트랜잭션에 관련될 수 있다. 제2 블록 노드(420)는 제1 트랜잭션 및 제3 트랜잭션에 관련될 수 있다. 제5 블록 노드(450)는 제2 트랜잭션 및 제3 트랜잭션에 관련될 수 있다.
일 실시 예에 따르면, 블록체인 네트워크의 서버 노드들은 블록체인 네트워크에서 실행되는 모든 트랜잭션에 관련된 것으로 판단될 수 있다. 일 실시 예에서, 서버 노드들은 블록체인 네트워크의 모든 트랜잭션 합의에 참여할 수 있다. 따라서, 제3 블록 노드(430) 및 제4 블록 노드(440)는 각각 제1 내지 제4 트랜잭션에 관련될 수 있다.
일 실시 예에 따르면, 블록체인 네트워크에 포함된 제1 내지 제5 블록 노드들(410~450)은 각각의 노드들이 관련된 트랜잭션에 기초한 블록들 및 각각의 노드들이 관련된 트랜잭션에 대한 데이터를 저장하는 스테이트 데이터베이스를 포함할 수 있다. 예를 들어, 제1 내지 제5 블록 노드들(410~450)은 상기 블록들을 포함하는 블록체인 및 스테이트 데이터베이스를 포함하는 원장을 각각 메모리에 저장할 수 있다.
예를 들어, 제1 블록 노드(410)는 제4 트랜잭션에 기초한 제4 블록 및 제4 트랜잭션에 대한 데이터 포함한 제1 부분 원장(411)을 메모리에 저장할 수 있다. 예를 들어, 제2 블록 노드(420)는 제1 트랜잭션 및 제3 트랜잭션 각각에 기초하여 생성된 제1 블록 및 제3 블록을 포함하고, 제1 트랜잭션 및 제3 트랜잭션에 대한 데이터를 포함하는 제2 부분 원장(421)을 메모리에 저장할 수 있다. 예를 들어, 제3 블록 노드(430) 및 제4 블록 노드(440)는 서버 노드로서, 블록체인 네트워크의 모든 트랜잭션 실행에 대한 블록 합의에 참여할 수 있다. 따라서, 제3 블록 노드(430)는, 제1 내지 제4 트랜잭션들 각각에 기초하여 생성된 제1 내지 제4 블록을 포함하고 블록체인 네트워크의 스테이트 데이터베이스를 포함하는 제3 전체 원장(431)을 메모리에 저장할 수 있다. 또한, 제4 블록 노드(440)는, 제1 내지 제4 트랜잭션들 각각에 기초하여 생성된 제1 내지 제4 블록을 포함하고 블록체인 네트워크의 스테이트 데이터베이스를 포함하는 제4 전체 원장(441)을 메모리에 저장할 수 있다. 일 실시 예에 따르면, 제3 전체 원장(431) 및 제4 전체 원장(441)은 블록체인 네트워크의 분산 원장에 대응될 수 있다. 따라서, 제3 블록 노드(430) 및 제4 블록 노드(440)는 서로 동일한 전체 원장을 저장할 수 있다. 예를 들어, 제5 블록 노드(450)는 제2 트랜잭션 및 제3 트랜잭션 각각에 기초하여 생성된 제2 블록 및 제3 블록을 포함하고, 제1 트랜잭션 및 제3 트랜잭션에 대한 데이터를 포함하는 제5 부분 원장(451)을 메모리에 저장할 수 있다.
도 5는 일 실시 예에 따른 전체 원장에 포함된 블록들의 그래프 구조를 설명하기 위한 도면이다.
도 5를 참조하면, 도 4를 참조하여 설명된 블록체인 네트워크의 분산 원장에 포함된 블록들의 연결 구조가 나타난다. 블록체인 네트워크의 분산 원장은 최초 블록(500) 및 제1 내지 제4 블록들(501~504)을 포함할 수 있다. 일 실시 예에 따르면, 블록체인 네트워크의 생성과 관련된 트랜잭션에 대한 블록은 원장의 블록체인에 포함된 블록들 중 최초 블록(500)으로 포함될 수 있다. 블록체인에 포함된 블록들 중 최초로 생성된 블록은 블록체인 제네시스(genesis) 블록으로 표현될 수 있다. 일 실시 예에서, 최초 블록(500)은 분산 원장에 포함된 블록들의 연결 구조를 그래프로 표현한 것에 따르면, 뿌리 노드에 해당할 수 있다. 일 실시 예에 따르면 제1 내지 제4 블록들(501~504)은 각각 제1 내지 제4 트랜잭션에 기초하여 생성된 블록일 수 있다.
일 실시 예에 따르면, 분산 원장은 최초 블록(500) 및 제1 내지 제4 블록들(501~504)을 DAG 구조로 연결하여 포함할 수 있다. 예를 들어, 최초 블록(500) 및 제1 내지 제4 블록들(501~504) 각각이 DAG 그래프의 노드에 해당할 수 있다. 일 실시 예에 따르면, 최초 블록(500) 및 제1 내지 제4 블록들(501~504)의 연결 구조는 각각의 블록들에 포함된 해시 필드의 정보에 기초하여 형성될 수 있다. 일 실시 예에 따르면, 각각의 블록은 해당 블록에 대한 정보를 포함하는 블록 해시를 포함할 수 있다. 예를 들어, 최초 블록(500)은 최초 블록(500)을 나타내는 최초 블록 해시를 포함할 수 있다. 또한, 각각의 블록에 포함된 해시 필드는 전체 원장에서의 이전 블록 정보를 나타내는 블록 해시 및 부분 원장에서의 이전 블록 정보를 나타내는 블록 해시를 포함할 수 있다. 예를 들어, 최초 블록(500)을 전체 원장 또는 부분 원장에서 이전 블록으로 하여 연결된 적어도 하나의 블록은 해시 필드에 최초 블록(500)에 대한 해시 정보를 포함할 수 있다. 따라서, 전체 원장 또는 부분 원장은 해당 블록에 포함된 블록 해시를 이용해 다음 블록의 해시 필드와 연결되는 구조일 수 있다.
일 실시 예에 따르면, 앞선 블록에 포함된 해시 정보를 포함하는 다음 블록이 생성됨에 따라, 앞선 블록과 다음 블록이 연결될 수 있다. 따라서, 해시 정보를 이용한 연결은 유향 비순환 그래프에 따라, 다른 블록을 향하여 연결되었다고 표현될 수 있다.
일 실시 예에 따르면, 최초 블록(500)은 제네시스 블록으로 뿌리 노드에 해당하고, 최초 블록(500) 은 제4 블록(504), 제1 블록(501) 및 제2 블록(502)을 향하는 방향으로 연결된 것으로 표현될 수 있다. 예를 들어, 제1 블록(501), 제2 블록(502) 및 제4 블록(504)은 이전 블록의 정보로서 각각 최초 블록(500)에 대한 해시 정보를 포함할 수 있다. 일 실시 예에 따르면, 제1 블록(501)은 제3 블록(503) 및 제2 블록(502)을 향하는 방향으로 연결될 수 있다. 예를 들어, 제3 블록(503) 및 제2 블록(502)은 각각 제1 블록(501)에 대한 해시 정보를 포함할 수 있다. 일 실시 예에 따르면, 제2 블록(502)은 제3 블록(503)을 향하는 방향으로 연결될 수 있다. 예를 들어, 제3 블록(503)은 제2 블록(502)에 대한 해시 정보를 포함할 수 있다. 일 실시 예에 따르면, 제3 블록(503)은 제4 블록(504)을 향하는 방향으로 연결될 수 있다. 예를 들어, 제4 블록(504)은 제3 블록(503)에 대한 해시 정보를 포함할 수 있다.
일 실시 예에 따르면, 블록체인 네트워크에 포함된 블록 노드들은 각각 분산 원장의 적어도 일부를 메모리에 저장할 수 있다. 예를 들어, 서버 노드(예: 도 4를 참조하여 설명된 제3 블록 노드(430), 제4 블록 노드(440))는 분산 원장 전체를 각각에 포함된 메모리에 저장할 수 있다. 일 실시 예에 따르면, 모바일 노드(예: 도 4를 참조하여 설명된 제1 블록 노드(410), 제2 블록 노드(420) 및 제5 블록 노드(450))는 분산 원장의 일부를 각각에 포함된 메모리에 저장할 수 있다. 이때, 모바일 노드와 관련된 트랜잭션에 기초한 블록들만을 포함하는 부분 원장을 메모리에 저장할 수 있다. 또한, 모바일 노드는 분산 원장의 일부를 서브-그래프(sub-graph) 구조로 메모리에 저장할 수 있다.
도 6은 부분 원장을 포함하는 전자 장치가 트랜잭션에 대한 합의를 처리하는 동작을 나타내는 흐름도(600)이다.
일 실시 예에 따르면, 전자 장치(100)가 블록 노드로 포함된 블록체인 네트워크는 복수 개의 블록 노드들을 포함할 수 있다. 예를 들어, 블록체인 네트워크는 도 4를 참조하여 설명된 제3 블록 노드(430)를 서버 노드로서 포함할 수 있다. 따라서, 제3 블록 노드는 블록체인 네트워크에 대한 전체 원장을 포함할 수 있다. 제3 블록 노드는 블록체인 네트워크에 대한 스테이트 데이트를 어떤 블록 노드가 저장하고 있는지에 대한 정보를 나타내는 노드 리스트를 포함할 수 있다. 또한, 제3 블록 노드는 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터에 대한 해시 정보를 포함할 수 있다. 일 실시 예에 따르면, 블록 노드가 데이터를 포함하고 있다는 것의 의미는 블록 노드에 대응되는 전자 장치의 메모리에 저장되어 있음을 의미할 수 있다.
도 6을 참조하면, 프로세서(130)는 동작 601에서, 수행 요청된 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 제1 데이터베이스에 저장되어 있는지 판단할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 블록체인 네트워크의 블록 노드로서, 프로세서(130)는 트랜잭션 수행의 요청을 획득할 수 있다. 프로세서(130)는 수행 요청된 트랜잭션에 대한 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 분산 원장(220)에 포함되어 있는지 판단할 수 있다. 예를 들어, 프로세서(130)는 제1 스마트 컨트랙트를 실행하는데 필요한 데이터가 스테이트 데이터베이스(222)에 저장되어 있는지 판단할 수 있다.
일 실시 예에 따르면, 동작 603에서, 프로세서(130)는 제3 블록 노드로부터 상기 데이터를 저장한 적어도 하나의 블록 노드에 대한 정보를 획득할 수 있다. 예를 들어, 프로세서(130)는 제3 블록 노드로부터 제1 스마트 컨트렉트를 실행하기 위해 필요한 데이터를 저장한 적어도 하나의 블록 노드의 정보를 포함하는 노드 리스트 및 상기 필요한 데이터에 대한 해시 정보를 획득할 수 있다. 예를 들면, 프로세서(130)는 제3 블록 노드로 노드 리스트 및 해시 정보를 요청하는 신호를 송신하고, 제3 블록 노드는 요청에 응답하여 노드 리스트 및 해시 정보를 전자 장치(100)로 전송할 수 있다.
일 실시 예에 따르면, 프로세서(130)는 동작 605에서, 상기 노드 리스트 및 상기 해시 정보에 기초하여 제2 블록 노드 또는 제3 블록 노드로부터 상기 데이터를 획득하여 제1 스마트 컨트랙트를 실행할 수 있다. 예를 들어, 프로세서(130)는 노드 리스트에 기초하여 상기 데이터를 소유하고 있는 블록 노드가 어떤 노드인지 판단할 수 있다. 따라서, 프로세서(130)는 상기 데이터를 소유하고 있는 블록 노드에게 상기 데이터를 요청하여 획득할 수 있다. 예를 들어, 상기 데이터를 소유하고 있는 블록 노드가 블록체인 네트워크에 포함된 제2 블록 노드(420)인 경우, 프로세서(130)는 제2 블록 노드(420)로 상기 데이터를 요청할 수 있다. 제2 블록 노드(420)는 상기 요청에 응답하여, 제2 블록 노드(420)에 저장된 부분 원장에 포함된 데이터를 전자 장치(100)로 전송할 수 있다.
다른 예를 들어, 프로세서(130)는 상기 데이터를 제3 블록 노드(430)가 소유하고 있는 경우, 제3 블록 노드(430)로부터 상기 데이터를 획득할 수 있다. 예를 들어, 제3 블록 노드(430)가 데이터의 키 값, 해시 정보 뿐 아니라 상기 데이터의 실제 데이터 값을 저장하고 있는 경우, 프로세서(130)는 동작 603에서 노드 리스트 및 해시 정보를 획득하고, 동작 605에서 상기 제3 블록 노드(430)로부터 상기 데이터의 값을 획득할 수 있다.
일 실시 예에 따르면, 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 복수 개의 블록 노드들에 저장되어 있는 경우, 프로세서(130)는 하나의 블록 노드로부터 모든 데이터를 획득할 수 있다. 다른 예를 들어, 프로세서(130)는 복수 개의 블록 노드들 로부터 라운드 로빈(round robin) 방법으로 상기 데이터를 획득할 수 있다.
다른 실시 예에 따르면, 프로세서(130)는 동작 601에서 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 제1 데이터베이스에 저장되어 있으면, 제1 데이터베이스에 저장된 데이터를 이용하여 제1 스마트 컨트랙트를 실행할 수 있다.
일 실시 예에 따르면, 수행 요청된 트랜잭션에 대한 제1 스마트 컨트랙트가 실행됨에 따라, 프로세서(130)는 제1 스마트 컨트랙트를 실행하기 위해 읽어야할(필요한) 데이터를 포함하는 제1 데이터 세트(예: 읽기-집합(read-set)) 및 제1 스마트 컨트랙트가 실행됨에 따라 스테이트 데이터베이스에 업데이트 되어야할 데이터를 포함하는 제2 데이터 세트(예: 쓰기-집합(write-set))가 생성될 수 있다.
일 실시 예에 따르면, 블록체인 네트워크에 포함된 블록 노드들은 각각 스마트 컨트랙트를 실행하고 결과로 생성되는 제2 데이터 세트를 비교할 수 있다. 예를 들어, 블록 노드들은 공유된 제1 데이터 세트에 기초하여 스마트 컨트랙트를 실행함에 따라 생성된 제2 데이터 세트를 합의할 수 있다. 일 실시 예에 따르면, 제2 데이터 세트의 합의는 블록 노드들 각각에 포함된 스마트 컨트랙트의 결과인 각각 블록 노드들에 대한 제2 데이터 세트가 일치하는지 판단하는 동작을 나타낼 수 있다. 예를 들어, 제2 데이터 세트의 합의는 공유된 제1 데이터 세트에 기초하여 블록 노드들 각각이 스마트 컨트랙트를 실행함에 따라 생성된 제2 데이터 세트 각각이 동일한 값을 포함하는지 판단하는 동작을 나타낼 수 있다. 일 실시 예에 따라, 프로세서(130)는 상기 합의가 실패한 경우, 예를 들어 각 블록 노드로부터 생성된 제2 데이터 세트가 상이하다고 판단된 경우 트랜잭션의 수행을 종료할 수 있다.
다른 예를 들어, 각각의 블록 노드로부터 생성된 제2 데이터 세트가 동일하다고 판단된 경우, 즉 합의에 성공한 경우, 프로세서는 제1 데이터 세트 및 제2 데이터 세트에 기초하여 블록을 생성하기 위한 동작을 수행할 수 있다. 예를 들어, 프로세서(130)는 제1 데이터 세트 및 제2 데이터 세트를 포함하는 트랜잭션 데이터를 제3 블록 노드(430)로 전송할 수 있다. 일 실시 예에서, 프로세서(130)는 요청된 트랜잭션에 대한 블록을 생성하고, 확정하기 위해 제3 블록 노드로 블록 생성을 요청할 수 있다. 일 실시 예에 따라, 제3 블록 노드를 통해 요청된 트랜잭션에 대한 블록이 생성되고 확정되는 경우, 트랜잭션 수행에 참여한 블록 노드들은 생성된 블록에 기초하여 각각에 저장된 부분 원장 또는 전체 원장을 업데이트 할 수 있다.
일 실시 예에 따른 블록체인 네트워크에서 트랜잭션 합의를 수행하는 동작은 도 7 내지 도 9를 참조하여 자세히 후술된다.
도 7은 일 실시 예에 따른 제1 블록 노드(410)가 제1 스마트 컨트랙트를 실행하는 동작을 설명하기 위한 흐름도(700)이다.
도 7을 참조하면, 제1 블록 노드(410), 제2 블록 노드(420) 및 제3 블록 노드(430)를 블록 노드로 포함하는 블록체인 네트워크가 나타난다. 일 실시 예에 따르면, 제1 블록 노드(410), 제2 블록 노드(420) 및 제3 블록 노드(430)는 도 4를 참조하여 설명된 구성과 동일/유사한 구성을 포함할 수 있다. 이하 중복되는 설명은 생략될 수 있다. 예를 들어, 제1 블록 노드(410)는 전자 장치(100)일 수 있고, 제2 블록 노드(420) 및 제3 블록 노드(4630)는 전자 장치(100)와 유사한 구성을 포함할 수 있다. 제1 블록 노드(410) 및 제2 블록 노드(420)는 모바일 노드로 표현될 수 있고, 제3 블록 노드(430)는 서버 노드로 표현될 수 있다. 일 실시 예에 따르면, 제1 내지 제3 블록 노드들(410~430)은 각각 블록체인 네트워크에 대한 원장을 포함할 수 있다. 예를 들어, 제1 블록 노드(410)는 제1 부분 원장을 포함하고, 제2 블록 노드(420)는 제2 부분 원장을 포함하고, 제3 블록 노드(430)는 전체 원장을 포함할 수 있다.
일 실시 예에 따르면, 제1 및 제2 블록 노드들(410~420)은 도2 를 참조하여 설명된 분산 원장의 구조를 가진 부분 원장을 포함할 수 있다. 제3 블록 노드(430)는 서버 노드로서, 블록체인 네트워크에 대한 전체 원장을 포함할 수 있다. 일 실시 예에 따르면, 제1 내지 제3 블록 노드들(410~430) 각각에 포함된 스테이트 데이터베이스는 키 값, 데이터 값, 해시 정보, 노드 정보 및/또는 블록 번호 중에서 적어도 하나를 포함할 수 있다.
Figure PCTKR2022008316-appb-img-000001
Figure PCTKR2022008316-appb-img-000002
일 실시 예에 따르면 표 1은 제1 블록 노드(410)에 포함된 스테이트 데이터베이스에 저장된 스테이트 데이터를 나타낼 수 있다. 또한, 표 2는 제2 블록 노드(420)에 포함된 스테이트 데이터베이스에 저장된 스테이트 데이터를 나타낼 수 있다. 일 실시 예에 따르면, 키 값은 스테이트 데이터의 키 정보를 나타낼 수 있다. 예를 들어, 스테이트 데이터가 'D2의 예산'에 대한 정보를 나타내는 경우, 키 값은 'D2 예산'으로 표현될 수 있다. 일 실시 예에 따르면, 데이터 값은 스테이트 데이터의 실제 값을 나타낼 수 있다. 예를 들어, 키 값이 'D2 예산'이라면, 데이터 값은 실제 D2의 예산 값(예: 2억)을 나타낼 수 있다. 일 실시 예에 따르면, 해시 정보는 스테이트 데이터에 대한 고유 값으로 데이터의 생성 및/또는 업데이트에 따라 결정될 수 있다. 일 실시 예에 따르면, 스테이트 데이터는 블록의 생성에 기초하여 변경될 수 있으므로, 프로세서(130)는 해시 정보를 통해 스테이트 데이터의 보정 여부를 판단할 수 있다. 일 실시 예에 따르면, 노드 정보는 스테이트 데이터를 저장하고 있는 블록체인 네트워크의 다른 블록 노드들에 대한 정보를 포함할 수 있다. 예를 들어, 제1 블록 노드(410) 및 제2 블록 노드(420)가 'D2 예산'데이터를 저장한 경우, 노드 정보는 제1 블록 노드(410) 및 제2 블록 노드(420)에 대한 정보를 포함할 수 있다. 일 실시 예에 따르면, 블록 번호는 블록체인 네트워크에서 스테이트 데이터의 생성에 대한 블록 번호에 대한 정보를 포함할 수 있다. 예를 들어, 블록 번호가 '2'인 경우, 블록체인 네트워크에서 두번째로 생성된 블록임을 나타낼 수 있다.
Figure PCTKR2022008316-appb-img-000003
일 실시 예에 따르면, 표 3은 제3 블록 노드(430)에 포함된 스테이트 데이터를 나타낼 수 있다. 일 실시 예에 따른 제3 블록 노드(430)는 서버 노드로서, 블록체인 네트워크에 대한 모든 스테이트 데이터를 저장할 수 있다. 일 실시 예에 따르면, 제3 블록 노드(430)는 스테이트 데이터에 대한 정보는 포함하되 실제 데이터 값은 포함하지 않을 수 있다. 다른 예를 들어, 제3 블록 노드(430)는 실제 데이터 값도 포함할 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410)는 블록체인 네트워크의 사용자(client)로부터 트랜잭션 요청(701)을 획득 할 수 있다. 예를 들어, 제1 블록 노드(410)는 'D2 예산을 3억으로 수정'이라는 트랜잭션 요청을 획득할 수 있다. 일 실시 예에 따라 트랜잭션 수행 요청을 획득한 제1 블록 노드(410)는 트랜잭션 리더로 표현될 수 있다.
일 실시 예에 따르면, 트랜잭션 요청(701)에 기초하여, 제1 블록 노드(410)는 제1 스마트 컨트랙트를 실행(702)할 수 있다. 일 실시 예에 따르면, 제1 블록 노드(410)는 제1 스마트 컨트랙트 실행(702)을 위해서 필요한 데이터를 제1 부분 원장에 포함하고 있는지 판단할 수 있다. 예를 들어, 제1 블록 노드(410)는 스테이트 데이터베이스에 'D2 예산'을 저장하고 있는지 판단할 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410)는 제1 스마트 컨트랙션을 실행(702)하기 위해 필요한 'D2 예산' 데이터를 획득하기 위해, 제3 블록 노드(430)로 제1 스마트 컨트랙션을 실행(702)하기 위해 필요한 데이터를 저장한 블록 노드들에 대한 정보를 요청할 수 있다. 예를 들어, 제1 블록 노드(410)는 제3 블록 노드(430)로 노드 리스트 및 해시 정보 요청(703)을 할 수 있다. 일 실시 예에 따르면, 제3 블록 노드(430)는 상기 요청(703)에 응답하여 상기 데이터를 소유한 블록 노드에 대한 정보를 포함하는 노드 리스트 및 상기 데이터에 대한 해시 정보를 검출(704)할 수 있다. 예를 들어, 제3 블록 노드(430)는 'D2 예산' 데이터를 소유한 제2 블록 노드(420)에 대한 정보가 담긴 노드 리스트 및 'D2 예산'에 대한 해시 정보인 '154254'를 검출할 수 있다.
일 실시 예에 따르면, 제3 블록 노드(430)는 검출된 노드 리스트, 해시 정보를 제1 블록 노드(410)로 전송(705)할 수 있다. 예를 들어, 제3 블록 노드(430)는 제2 블록 노드(420)에 대한 정보를 포함하는 노드 리스트 및 'D2 예산'에 대한 '154254' 해시 정보를 전송할 수 있다. 다른 예를 들어, 제3 블록 노드(430)가 데이터 값을 스테이트 데이터베이스에 저장하고 있는 경우, 노드 리스트, 해시 정보 및 데이터 값을 제1 블록 노드(410)로 전송할 수 있다. 예를 들어, 제3 블록 노드(430)는 제2 블록 노드(420)에 대한 정보를 포함하는 노드 리스트 및 'D2 예산'에 대한 '154254' 해시 정보 뿐만 아니라 'D2 예산' 데이터 값인 '1억'을 제1 블록 노드(410)로 함께 전송할 수 있다.
일 실시 예에 따르면, 제3 블록 노드(430)가 데이터 값을 저장하지 않은 경우, 제1 블록 노드(410)는 노드 리스트 및 해시 정보에 기초하여 데이터 값을 요청(706)할 수 있다. 예를 들어, 제1 블록 노드(410)는 제1 스마트 컨트랙션을 실행하기 위해 필요한 데이터를 제2 블록 노드(420)가 포함하고 있음을 나타내는 노드 리스트에 기초하여, 제2 블록 노드(420)로 상기 데이터를 요청할 수 있다. 예를 들어, 제1 블록 노드(410)는 제2 블록 노드(420)에 대한 정보를 포함하는 노드 리스트 및 '154254' 해시 정보에 기초하여 제2 블록 노드(420)로 'D2 예산'에 대한 데이터 값을 요청할 수 있다.
일 실시 예에 따르면, 제2 블록 노드(420)는 상기 요청(706)에 응답하여 제1 블록 노드(410)로 데이터 값을 전송(707)할 수 있다. 예를 들어, 'D2 예산' 의 데이터 값인 '1억'을 제1 블록 노드(410)로 전송할 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410)는 제3 블록 노드(430)로부터 획득한 해시 정보와 획득된 데이터 값에 기초한 해시 정보를 비교하여 검증 동작을 수행할 수 있다. 즉, 제1 블록 노드(410)는 해시 정보에 기초하여 데이터 값을 검증(708)할 수 있다. 일 실시 예에 따르면, 상기 검증(708) 동작은 해시 정보가 일치하는지에 기초하여 수행될 수 있다. 예를 들어, 제2 블록 노드(420)로부터 획득한 데이터 값에 대한 해시 정보와 제3 블록 노드(430)로부터 획득된 해시 정보(예: '154254')가 상이한 경우, 제1 블록 노드(410)는 상기 획득된 데이터가 위조된 것으로 판단할 수 있다. 상기 획득된 데이터가 위조된 것으로 판단된 경우, 제1 블록 노드(410)는 검증(708)이 실패한 것으로 판단할 수 있다. 일 실시 예에서, 검증(708)이 실패한 경우, 제1 블록 노드(410)는 트랜잭션 수행을 종료하고, 사용자에게 트랜잭션 실패에 대한 알림을 제공할 수 있다.
일 실시 예에 따르면, 상기 검증(708) 결과, 제1 스마트 컨트랙션 실행에 필요한 데이터가 올바르게 획득된 것으로 판단된 경우, 제1 블록 노드(410)는 상기 데이터를 이용하여 제1 스마트 컨트랙트의 실행을 완료할 수 있다. 일 실시 예에 따르면, 제1 스마트 컨트랙트의 실행에 필요한 데이터는 제1 데이터 세트(예: 읽기-집합(read-set))로 나타낼 수 있다. 따라서, 제1 스마트 컨트랙트의 실행을 위해 제1 데이터 세트가 생성될 수 있다. 일 실시 예에 따르면, 제1 스마트 컨트랙트 실행의 결과 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 제1 데이터 세트로 반환될 수 있다. 즉, 제1 스마트 컨트랙션 실행의 결과 제1 데이터 세트(예: 읽기-집합(read-set))가 생성(709)될 수 있다. 예를 들어, 제1 스마트 컨트랙트 실행에 있어 읽어야 할 데이터를 포함하는 제1 데이터 세트를 생성할 수 있다. 예를 들어, 제1 블록 노드(410)는 (데이터 값, 해시 정보, 노드 정보 및 블록 번호)를 포함하는 제1 데이터 세트를 생성할 수 있다. 따라서, 제1 블록 노드(410)는 (1억, 154254, 제2 블록 노드(420), 3)을 제1 데이터 세트로 생성할 수 있다.
도 8은 일 실시 예에 따른 블록체인 네트워크에서 트랜잭션에 대한 보증 동작을 설명하기 위한 흐름도(800)이다.
도 8을 참조하면, 블록체인 네트워크에서 트랜잭션 합의를 위해 블록체인 네트워크에 포함된 다른 블록 노드들과 보증 동작을 수핸하는 방법(800)이 도시된다. 일 실시 예에 따르면, 도 7에 설명된 내용과 중복되는 내용은 도 8에 대한 설명에서 생략될 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410)는 트랜잭션 합의를 위해, 제2 블록 노드(420)로 제1 데이터 세트와 함께 수행 요청된 트랜잭션에 기초한 보증 요청(801)을 전송할 수 있다. 예를 들어, 제1 블록 노드(410)는 제1 스마트 컨트랙트의 실행에 기초하여 생성된 제1 데이터 세트(예: (1억, 154254, 제2 블록 노드(420), 3))와 및 트랜잭션에 대한 보증 요청을 전송할 수 있다.
일 실시 예에 따르면, 제2 블록 노드(420)는 상기 요청(801)에 응답하여 제2 스마트 컨트랙트를 실행(802)할 수 있다. 일 실시 예에 따르면, 제2 블록 노드(420)는 제2 스마트 컨트랙트를 실행(802)함에 있어 필요한 데이터가 제2 블록 노드(420)에 포함된 부분 원장에 저장되어 있는 경우, 제2 블록 노드(420)에 포함된 데이터를 이용하여 제2 스마트 컨트랙트를 실행(802)할 수 있다.
일 실시 예에 따르면, 제2 블록 노드(420)는 제2 스마트 컨트랙트를 실행함에 따라, 제1 데이터 세트 및 제2 데이터 세트(예: 쓰기-집합(write-set))를 생성할 수 있다. 일 실시 예에 따르면, 제2 데이터 세트는 트랜잭션에 대한 스마트 컨트랙트의 실행이 완료되면 업데이트 될 데이터를 포함할 수 있다. 예를 들어, 제2 데이터 세트는 'D2 예산을 3억으로 수정'이라는 트랜잭션을 실행함에 따라 스테이트 데이터베이스에 업데이트 될 데이터를 포함할 수 있다. 예를 들어, 제2 데이터 세트는 D2 예산이 3억으로 수정됨에 따라 업데이트될 D2 예산 및 전체 예산을 포함할 수 있다. 또한, 제2 데이터 세트는 트랜잭션을 실행함에 따라 스테이트 데이터베이스를 업데이트 해야할 블록 노드에 대한 정볼르 포함하는 노드 리스트 및 트랜잭션 실행에 기초하여 생성될 블록의 블록 번호에 대한 정보를 포함할 수 있다.
일 실시 예에 따르면, 제2 블록 노드(420)는 제1 블록 노드(410)로 제1 데이터 세트 및 제2 데이터 세트를 전송(803)할 수 있다. 예를 들어, 제2 블록 노드(420)는 제2 스마트 컨트랙트를 실행함에 따라 생성된 제1 데이터 세트 및 제2 데이터 세트를 전송할 수 있다. 예를 들어, 제2 블록 노드(420)는'D2 예산'에 대한 데이터 값, 해시 정보, 노드 정보 및 블록 번호를 포함하는 제1 데이터 세트를 전송할 수 있다. 또한, 제2 블록 노드(420)는 트랜잭션 실행에 기초하여 업데이트될 데이터에 대한 데이터 값, 노드 정보 및 블록 정보를 포함하는 제2 데이터 세트를 전송할 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410)는 제2 블록 노드(420)로부터 수신된 제1 데이터 세트 및 제2 데이터 세트에 대한 검증(804)을 수행할 수 있다. 일 실시 예에 따르면 제1 블록 노드(410)는 적어도 제2 데이터 세트에 대한 해시 정보에 기초하여 검증 동작을 수행할 수 있다. 예를 들어, 제1 블록 노드(410)는 제1 데이터 세트 및/또는 제2 데이터 세트에 대한 해시 정보에 기초하여 검증 동작을 수행할 수 있다. 예를 들어, 제1 블록 노드(410)는 제1 스마트 컨트랙트를 실행함에 따라 생성된 제1 스마트 컨트랙트에 대한 제1 데이터 세트 및 제2 데이터 세트와 제2 블록 노드(420)로부터 수신되는 제2 스마트 컨트랙트에 대한 제1 데이터 세트 및 제2 데이터 세트를 비교하고, 상기 비교 결과에 기초하여 검증 동작을 수행할 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410)는 상기 검증(804) 실패 시, 트랜잭션 수행을 중지하고 실패 알림을 제공(805)할 수 있다. 예를 들어, 제1 블록 노드(410)는 제1 블록 노드(410)에 포함된 디스플레이(예: 도 1의 디스플레이(140))를 통해 상기 트랜잭션 수행의 실패에 대한 알림을 제공할 수 있다.
도 9는 일 실시 예에 따른 블록체인 네트워크에서 블록을 확정하는 동작을 설명하기 위한 흐름도(900)이다.
도 9를 참조하면, 도 8을 참조하여 설명된 보증 동작을 통해 제1 블록 노드(410)가 제3 블록 노드(430)로 블록 확정을 요청하고, 블록체인 네트워크에서 블록이 확정되는 내용이 나타난다. 일 실시 예에 따르면, 제1 블록 노드(410)는 제1 데이터 세트, 제2 데이터 세트에 기초하여 수행 요청된 트랜잭션에 대한 데이터를 생성(901)할 수 있다. 예를 들어, 제1 블록 노드(410)는'D2 예산을 3억으로 수정'이라는 트랜잭션에 대한 스마트 컨트랙트를 실행하고, 제1 데이터 세트 및 제2 데이터 세트에 기초한 트랜잭션 데이터를 생성할 수 있다.
일 실시 예에 따르면, 제1 블록 노드(410)는 제1 데이터 세트, 제2 데이터 세트 및 트랜잭션 데이터를 포함하는 블록 생성 요청(902)을 제3 블록 노드(430)로 전송할 수 있다. 일 실시 예에 따르면, 제3 블록 노드(430)는 상기 요청(902)에 응답하여 상기 트랜잭션 데이터를 블록 확정 큐(queue)에 저장(903)할 수 있다. 다양한 실시 예들에 따라, 제3 블록 노드(430)는 큐에 한정되지 않고 다양한 자료 구조 중에서 하나를 이용하여 트랜잭션 데이터를 저장할 수 있다. 일 실시 예에 따르면, 제3 블록 노드(430)는 블록 확정 큐에 저장된 순서대로 선입선출 방식으로 블록 생성 동작을 수행할 수 있다. 상기 블록 생성 동작은 오더링으로 표현될 수 있다. 일 실시 예에 따르면, 제3 블록 노드(430)는 블록 확정 큐에 저장된 순서에 기초하여 생성 요청된 블록을 검증(904)할 수 있다. 예를 들어, 제3 블록 노드(430)는 블록 확정 큐에 저장된 순서에 따라 트랜잭션 데이터에 기초한 블록을 생성하고, 블록에 대한 검증 동작을 수행할 수 있다. 상기 검증(904) 동작은 제3 블록 노드(430)에 저장된 스테이트 데이터베이스의 데이터들과 제1 데이터 세트 및 제2 데이터 세트의 블록 번호, 해시 정보를 비교함에 따라 수행될 수 있다. 예를 들어, 제3 블록 노드(430)는 검증(904)을 위해, 제3 블록 노드(430) 의 스테이트 데이터베이스에 저장된 해시 정보 및 블록 번호를 제1 데이터 세트에 대한 해시 정보 및 블록 번호와 비교할 수 있다. 또한, 제3 블록 노드(430)는 검증(904)을 위해 제2 데이터 세트의 노드 정보와 제2 데이터 세트의 블록 번호를 스테이트 데이터베이스에 저장된 노드 리스트 및 블록 번호와 각각 비교할 수 있다. 제3 블록 노드(430)는 비교 결과, 양 데이터가 동일하면 검증 동작을 성공한 것으로 판단할 수 있다.
일 실시 예에 따르면, 상기 검증(904)이 성공함에 따라, 제3 블록 노드(430)는 블록을 확정하고, 업데이트 요청을 생성(905)할 수 있다. 예를 들어, 제3 블록 노드(430)는 검증이 완료된 블록을 확정하기 위해 합의 동작을 수행할 수 있다. 예를 들어, 제3 블록 노드(430)는 블록체인 네트워크(300)에 포함된 다른 블록 노드들과 생성된 블록에 대하여 합의 동작을 수행하고, 합의가 완료되면 블록을 확정할 수 있다. 일 실시 예에 따르면, 제3 블록 노드(430)는 생성된 블록을 검증 완료된 블록으로 확정하고, 블록체인 네트워크에 포함된 전체 원장의 블록체인에 노드로 연결할 수 있다. 또한, 제3 블록 노드(430)는 확정된 블록에 기초한 전체 원장, 부분 원장의 업데이트 요청을 생성할 수 있다. 예를 들어, 제3 블록 노드(430)는 'D2 예산을 3억으로 수정'트랜잭션의 실행으로 생성되고 확정된 블록에 기초하여, 제2 데이터 세트에 포함된 D2 예산 및 전체 예산의 업데이트를 요청을 생성할 수 있다.
일 실시 예에 따르면, 제3 블록 노드(430)는 생성된 업데이트 요청을 블록체인 네트워크에 포함된 블록 노드들에게 전송할 수 있다. 예를 들어, 제2 블록 노드(420)로 부분 원장 업데이트를 요청(906)할 수 있다. 일 실시 예에 따르면, 제2 블록 노드(420)는 상기 요청(906)에 응답하여 부분 원장을 업데이트 할 수 있다.
Figure PCTKR2022008316-appb-img-000004
표 4를 참조하면, 제2 블록 노드(420)는 부분 원장 업데이트 요청(906)에 응답하여 스테이트 데이터베이스를 업데이트할 수 있다. 즉, 제2 블록 노드(420)는 제2 블록 노드(420)에 포함된 부분 원장을 업데이트(907)할 수 있다. 예를 들어, 'D2 예산을 3억으로 수정'에 대한 트랜잭션이 실행됨에 응답하여, 제2 블록 노드(420)는 키 값이 'D2 예산'인 데이터를 수정할 수 있다. 예를 들어, 제2 블록 노드(420)는 스테이트 데이터베이스에 저장된 'D2 예산'에 관한 데이터 값을 3억으로 업데이트 할 수 있다. 따라서, 'D2 예산'의 해시 정보 및 블록 번호는 수정될 수 있다. 또한, 제2 블록 노드(420)는 'D2 예산'이 업데이트 됨에 기초하여'전체 예산'값도 업데이트 할 수 있다. 일 실시 예에 따르면, 제2 블록 노드(420)는 '전체 예산'의 데이터 값을 5억으로 수정하고, 해시 정보 및 블록 번호를 업데이트 할 수 있다.
일 실시 예에 따르면, 제3 블록 노드(430)는 블록을 확정 짓고, 블록체인 네트워크에 포함된 모든 블록 노드들에게 부분 원장 및/또는 전체 원장의 업데이트를 요청할 수 있다. 일 실시 예에 따르면, 부분 원장 및/또는 전체 원장 업데이트 요청을 받은 블록 노드는 자신이 관여한 트랜잭션에 기초하여 부분 원장 및/또는 전체 원장을 업데이트 할 수 있다. 따라서, 블록체인 네트워크에서 상기 트랜잭션 실행에 관련이 없는 노드는 부분 원장 및/또는 전체 원장을 업데이트 요청에도 불구하고 스테이트 데이터베이스에 포함된 데이터를 그대로 유지할 수 있다.
일 실시 예에 따르면, 제3 블록 노드(430)는 제1 블록 노드(410)로 부분 원장 업데이트 요청(908)을 할 수 있다. 예를 들어, 제3 블록 노드(430)는 'D2 예산을 3억으로 수정' 트랜잭션에 대한 업데이트 요청을 할 수 있다. 일 실시 예에 따르면, 제1 블록 노드(410)는 부분 원장 업데이트 요청(908)에 기초하여, 부분 원장을 업데이트(909)할 수 있다. 일 실시 예에 따르면, 실행된 트랜잭션이 제1 블록 노드(410)와 관련 없는 경우, 제1 블록 노드(410)는 업데이트를 실행하지 않을 수 있다. 일 실시 예에 따르면, 블록의 확정에 따라 제3 블록 노드(430)의 스테이트 데이터베이스는 업데이트 될 수 있다.
Figure PCTKR2022008316-appb-img-000005
표 5를 참조하면, 제3 블록 노드(430)에 저장된 스테이트 데이터베이스를 나타난다. 일 실시 예에 따르면, 제3 블록 노드(430)는 데이터 값을 포함하거나 포함하지 않을 수 있다. 일 실시 예에 따르면, 트랜잭션 합의를 통해 블록이 확정됨에 따라, 제3 블록 노드(430)에 포함된 데이터는 업데이트 될 수 있다. 예를 들어, 트랜잭션이 실행됨에 따라 'D2 예산을 3억으로 수정'에 기반하여, 'D2 예산' 및 '전체 예산'이 업데이트 될 수 있다.
도 10은, 다양한 실시예들에 따른, 네트워크 환경 내의 전자 장치의 블록도이다.
도 10을 참조하면, 네트워크 환경(1000)에서 전자 장치(1001)는 제 1 네트워크(1098)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(1002)와 통신하거나, 또는 제 2 네트워크(1099)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(1004) 또는 서버(1008) 중 적어도 하나와 통신할 수 있다. 일실시예에 따르면, 전자 장치(1001)는 서버(1008)를 통하여 전자 장치(1004)와 통신할 수 있다. 일실시예에 따르면, 전자 장치(1001)는 프로세서(1020), 메모리(1030), 입력 모듈(1050), 음향 출력 모듈(1055), 디스플레이 모듈(1060), 오디오 모듈(1070), 센서 모듈(1076), 인터페이스(1077), 연결 단자(1078), 햅틱 모듈(1079), 카메라 모듈(1080), 전력 관리 모듈(1088), 배터리(1089), 통신 모듈(1090), 가입자 식별 모듈(1096), 또는 안테나 모듈(1097)을 포함할 수 있다. 어떤 실시예에서는, 전자 장치(1001)에는, 이 구성요소들 중 적어도 하나(예: 연결 단자(1078))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(1076), 카메라 모듈(1080), 또는 안테나 모듈(1097))은 하나의 구성요소(예: 디스플레이 모듈(1060))로 통합될 수 있다.
프로세서(1020)는, 예를 들면, 소프트웨어(예: 프로그램(1040))를 실행하여 프로세서(1020)에 연결된 전자 장치(1001)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일실시예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(1020)는 다른 구성요소(예: 센서 모듈(1076) 또는 통신 모듈(1090))로부터 수신된 명령 또는 데이터를 휘발성 메모리(1032)에 저장하고, 휘발성 메모리(1032)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(1034)에 저장할 수 있다. 일실시예에 따르면, 프로세서(1020)는 메인 프로세서(1021)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(1023)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(1001)가 메인 프로세서(1021) 및 보조 프로세서(1023)를 포함하는 경우, 보조 프로세서(1023)는 메인 프로세서(1021)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(1023)는 메인 프로세서(1021)와 별개로, 또는 그 일부로서 구현될 수 있다.
보조 프로세서(1023)는, 예를 들면, 메인 프로세서(1021)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(1021)를 대신하여, 또는 메인 프로세서(1021)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(1021)와 함께, 전자 장치(1001)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(1060), 센서 모듈(1076), 또는 통신 모듈(1090))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일실시예에 따르면, 보조 프로세서(1023)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(1080) 또는 통신 모듈(1090))의 일부로서 구현될 수 있다. 일실시예에 따르면, 보조 프로세서(1023)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능 모델이 수행되는 전자 장치(1001) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(1008))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)을 포함할 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은, 복수의 인공 신경망 레이어들을 포함할 수 있다. 인공 신경망은 심층 신경망(DNN: deep neural network), CNN(convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), 심층 Q-네트워크(deep Q-networks) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다.
메모리(1030)는, 전자 장치(1001)의 적어도 하나의 구성요소(예: 프로세서(1020) 또는 센서 모듈(1076))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(1040)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(1030)는, 휘발성 메모리(1032) 또는 비휘발성 메모리(1034)를 포함할 수 있다.
프로그램(1040)은 메모리(1030)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(1042), 미들 웨어(1044) 또는 어플리케이션(1046)을 포함할 수 있다.
입력 모듈(1050)은, 전자 장치(1001)의 구성요소(예: 프로세서(1020))에 사용될 명령 또는 데이터를 전자 장치(1001)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(1050)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다.
음향 출력 모듈(1055)은 음향 신호를 전자 장치(1001)의 외부로 출력할 수 있다. 음향 출력 모듈(1055)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일실시예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.
디스플레이 모듈(1060)은 전자 장치(1001)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(1060)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일실시예에 따르면, 디스플레이 모듈(1060)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다.
오디오 모듈(1070)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일실시예에 따르면, 오디오 모듈(1070)은, 입력 모듈(1050)을 통해 소리를 획득하거나, 음향 출력 모듈(1055), 또는 전자 장치(1001)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(1002))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.
센서 모듈(1076)은 전자 장치(1001)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일실시예에 따르면, 센서 모듈(1076)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다.
인터페이스(1077)는 전자 장치(1001)가 외부 전자 장치(예: 전자 장치(1002))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일실시예에 따르면, 인터페이스(1077)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.
연결 단자(1078)는, 그를 통해서 전자 장치(1001)가 외부 전자 장치(예: 전자 장치(1002))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일실시예에 따르면, 연결 단자(1078)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.
햅틱 모듈(1079)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일실시예에 따르면, 햅틱 모듈(1079)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.
카메라 모듈(1080)은 정지 영상 및 동영상을 촬영할 수 있다. 일실시예에 따르면, 카메라 모듈(1080)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.
전력 관리 모듈(1088)은 전자 장치(1001)에 공급되는 전력을 관리할 수 있다. 일실시예에 따르면, 전력 관리 모듈(1088)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.
배터리(1089)는 전자 장치(1001)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일실시예에 따르면, 배터리(1089)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.
통신 모듈(1090)은 전자 장치(1001)와 외부 전자 장치(예: 전자 장치(1002), 전자 장치(1004), 또는 서버(1008)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(1090)은 프로세서(1020)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일실시예에 따르면, 통신 모듈(1090)은 무선 통신 모듈(1092)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(1094)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제 1 네트워크(1098)(예: 블루투스, WiFi(wireless fidelity) direct 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제 2 네트워크(1099)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(1004)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(1092)은 가입자 식별 모듈(1096)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제 1 네트워크(1098) 또는 제 2 네트워크(1099)와 같은 통신 네트워크 내에서 전자 장치(1001)를 확인 또는 인증할 수 있다.
무선 통신 모듈(1092)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(1092)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(1092)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔형성(analog beam-forming), 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(1092)은 전자 장치(1001), 외부 전자 장치(예: 전자 장치(1004)) 또는 네트워크 시스템(예: 제 2 네트워크(1099))에 규정되는 다양한 요구사항을 지원할 수 있다. 일실시예에 따르면, 무선 통신 모듈(1092)은 eMBB 실현을 위한 Peak data rate(예: 20Gbps 이상), mMTC 실현을 위한 손실 Coverage(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.
안테나 모듈(1097)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일실시예에 따르면, 안테나 모듈(1097)은 서브스트레이트(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일실시예에 따르면, 안테나 모듈(1097)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제 1 네트워크(1098) 또는 제 2 네트워크(1099)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(1090)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(1090)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(1097)의 일부로 형성될 수 있다.
다양한 실시예에 따르면, 안테나 모듈(1097)은 mmWave 안테나 모듈을 형성할 수 있다. 일실시예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제 1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제 2 면(예: 윗 면 또는 측 면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.
상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.
일실시예에 따르면, 명령 또는 데이터는 제 2 네트워크(1099)에 연결된 서버(1008)를 통해서 전자 장치(1001)와 외부의 전자 장치(1004)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(1002, 또는 1004) 각각은 전자 장치(1001)와 동일한 또는 다른 종류의 장치일 수 있다. 일실시예에 따르면, 전자 장치(1001)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(1002, 1004, 또는 1008) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(1001)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(1001)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(1001)로 전달할 수 있다. 전자 장치(1001)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(1001)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시예에 있어서, 외부의 전자 장치(1004)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(1008)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일실시예에 따르면, 외부의 전자 장치(1004) 또는 서버(1008)는 제 2 네트워크(1099) 내에 포함될 수 있다. 전자 장치(1001)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다.
본 문서에 개시된 다양한 실시예들에 따른 전자 장치는 다양한 형태의 장치가 될 수 있다. 전자 장치는, 예를 들면, 휴대용 통신 장치(예: 스마트폰), 컴퓨터 장치, 휴대용 멀티미디어 장치, 휴대용 의료 기기, 카메라, 웨어러블 장치, 또는 가전 장치를 포함할 수 있다. 본 문서의 실시예에 따른 전자 장치는 전술한 기기들에 한정되지 않는다.
본 문서의 다양한 실시예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시예들로 한정하려는 것이 아니며, 해당 실시예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제 1", "제 2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제 1) 구성요소가 다른(예: 제 2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제 3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.
본 문서의 다양한 실시예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일실시예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다.
본 문서의 다양한 실시예들은 기기(machine)(예: 전자 장치(1001)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(1036) 또는 외장 메모리(1038))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(1040))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(1001))의 프로세서(예: 프로세서(1020))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.
일실시예에 따르면, 본 문서에 개시된 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory(CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
다양한 실시예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 대체적으로 또는 추가적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.

Claims (15)

  1. 블록체인 네트워크에 포함된 제1 블록 노드를 구성하는 전자 장치에 있어서,
    상기 블록체인 네트워크에 포함된 제2 블록 노드 또는 제3 블록 노드와 신호를 송신 또는 수신하는 통신 회로;
    상기 블록체인 네트워크에 대한 전체 원장 중에서 일부를 포함하는 부분 원장을 저장하는 메모리, 상기 부분 원장은 제1 데이터베이스를 포함;
    상기 통신 회로 및 상기 메모리와 전기적으로 연결된 적어도 하나의 프로세서를 포함하고,
    상기 적어도 하나의 프로세서는,
    수행 요청된 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 상기 제1 데이터베이스에 저장되어 있는지 판단하고,
    상기 판단 결과에 기초하여, 상기 데이터를 저장한 적어도 하나의 블록 노드에 대한 정보를 포함하는 노드 정보를 상기 통신 회로를 통해 상기 제3 블록 노드로부터 획득하고,
    상기 노드 정보에 기초하여 상기 데이터를 상기 제2 블록 노드 또는 상기 제3 블록 노드로부터 획득하고, 상기 제1 스마트 컨트랙트를 실행하는 전자 장치.
  2. 청구항 1에 있어서,
    상기 부분 원장은 상기 전자 장치가 합의에 참여한 적어도 하나의 트랜잭션 각각에 상응하는 적어도 하나의 블록을 포함하고,
    상기 적어도 하나의 블록은 각각 상기 전체 원장에서의 이전 블록 정보 및 상기 부분 원장에서의 이전 블록 정보를 포함하는 블록 해시 및 블록 데이터를 포함하는 전자 장치.
  3. 청구항 2에 있어서, 상기 제1 데이터베이스는 상기 적어도 하나의 트랜잭션과 관련된 스테이트(state) 데이터를 저장하는 전자 장치.
  4. 청구항 1에 있어서,
    상기 제3 블록 노드는 제2 데이터베이스를 포함하는 상기 전체 원장을 포함하고,
    상기 제2 데이터베이스는 상기 블록체인 네트워크에 대한 전체 스테이트 데이터를 저장하고,
    상기 적어도 하나의 프로세서는 상기 제2 데이터베이스에 상기 데이터가 저장된 경우, 상기 제3 블록 노드로부터 상기 데이터를 획득하는 전자 장치.
  5. 청구항 1에 있어서,
    상기 적어도 하나의 프로세서는:
    상기 노드 정보와 함께 상기 데이터에 대한 해시 정보를 상기 통신 회로를 통해 상기 제3 블록 노드로부터 획득하고,
    제1 데이터 세트 및 상기 트랜잭션을 포함하는 보증 요청을 상기 제2 블록 노드로 전송하고,
    상기 보증 요청에 기초하여 생성된 제2 데이터 세트 및 상기 제1 데이터 세트를 포함하는 보증 결과를 상기 제2 블록 노드로부터 수신하고,
    상기 보증 결과를 상기 해시 정보에 기초하여 검증하고,
    상기 제1 데이터 세트는 상기 제1 스마트 컨트랙트를 실행하기 위해 요구되는 데이터를 포함하고, 상기 제2 데이터 세트는 상기 제1 스마트 컨트랙트의 실행에 기초하여 상기 제1 데이터베이스에 저장될 데이터를 포함하는 전자 장치.
  6. 청구항 5에 있어서,
    상기 제2 데이터 세트는, 상기 제2 블록 노드가 상기 제1 데이터 세트에 기초하여 제2 스마트 컨트랙트를 실행함에 따라 생성되는 전자 장치.
  7. 청구항 6에 있어서,
    상기 적어도 하나의 프로세서는, 상기 보증 결과가 검증됨에 따라 상기 제1 데이터 세트 및 상기 제2 데이터 세트에 기초하여 상기 트랜잭션에 대한 트랜잭션 데이터를 생성하고,
    상기 상기 제1 데이터 세트, 상기 제2 데이터 세트 및 상기 트랜잭션 데이터를 포함하는 블록 생성 요청을 상기 제3 블록 노드로 전송하고,
    상기 블록 생성 요청에 기초하여 생성된 상기 부분 원장 및 상기 제1 데이터베이스에 대한 업데이트 요청을 상기 제3 블록 노드로부터 수신하고,
    상기 업데이트 요청에 기초하여, 상기 부분 원장 및 상기 제1 데이터베이스를 업데이트하는 전자 장치.
  8. 청구항 7에 있어서,
    상기 업데이트 요청은 상기 제3 블록 노드로부터 생성된 상기 제1 데이터 세트 및 상기 제2 데이터를 상기 제3 블록 노드에 저장된 상기 해시 정보, 블록 순서 정보, 상기 노드 리스트 중 적어도 하나와 비교한 결과에 기초하여 생성되는 전자 장치.
  9. 블록체인 네트워크에 포함된 제1 블록 노드를 구성하는 전자 장치의 동작 방법에 있어서,
    상기 블록체인 네트워크에 대한 전체 원장 중에서 일부를 포함하는 부분 원장을 저장하는 동작, 상기 부분 원장은 제1 데이터베이스를 포함;
    트랜잭션의 수행에 대한 요청을 획득하는 동작;
    상기 트랜잭션에 대한 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 상기 제1 데이터베이스에 저장되어 있는지 판단하는 동작;
    상기 판단 결과에 기초하여, 상기 데이터를 저장한 적어도 하나의 블록 노드에 대한 노드 정보를 제3 블록 노드로부터 획득하는 동작;
    상기 노드 정보에 기초하여 제2 블록 노드 또는 상기 제3 블록 노드로부터 상기 데이터를 획득하는 동작; 및
    상기 제1 스마트 컨트랙트를 실행하는 동작을 포함하는 전자 장치의 동작 방법.
  10. 청구항 9에 있어서,
    상기 부분 원장은 상기 전자 장치가 합의에 참여한 적어도 하나의 트랜잭션 각각에 상응하는 적어도 하나의 블록을 포함하고,
    상기 저장하는 동작은, 상기 전체 원장에서의 이전 블록 정보 및 상기 부분 원장에서의 이전 블록 정보를 포함하는 블록 해시 및 블록 데이터를 각각 포함하는 상기 적어도 하나의 블록을 저장하는 동작; 및
    상기 적어도 하나의 트랜잭션과 관련된 스테이트(state) 데이터를 저장하는 동작을 포함하는 전자 장치의 동작 방법.
  11. 청구항 9에 있어서,
    상기 제3 블록 노드는 상기 블록체인 네트워크에 대한 전체 스테이트 데이터를 저장하는 제2 데이터베이스를 포함하는 상기 전체 원장을 포함하고,
    상기 데이터를 획득하는 동작은, 상기 제2 데이터베이스에 상기 데이터가 저장되어 있음에 응답하여 상기 제3 블록 노드로부터 상기 데이터를 획득하는 동작인 전자 장치의 동작 방법.
  12. 청구항 9에 있어서,
    제1 데이터 세트 및 상기 트랜잭션을 포함하는 보증 요청을 상기 제2 블록 노드로 전송하는 동작;
    상기 보증 요청에 기초하여 생성된 제2 데이터 세트 및 상기 제1 데이터 세트를 포함하는 보증 결과를 상기 제2 블록 노드로부터 수신하는 동작; 및
    상기 제1 데이터 세트 및 상기 제2 데이터 세트 각각에 대한 해시 정보에 기초하여 상기 보증 결과를 검증하는 동작을 더 포함하고,
    상기 제1 데이터 세트는 상기 제1 스마트 컨트랙트를 실행하기 위해 요구되는 데이터를 포함하고,
    상기 제2 데이터 세트는 상기 제1 스마트 컨트랙트의 실행에 기초하여 상기 제1 데이터베이스에 저장될 데이터를 포함하는 전자 장치의 동작 방법.
  13. 청구항 12에 있어서,
    상기 제2 데이터 세트는, 상기 제2 블록 노드가 상기 제1 데이터 세트에 기초하여 제2 스마트 컨트랙트를 실행함에 따라 생성되는 전자 장치.
  14. 청구항 13에 있어서,
    상기 보증 결과가 검증됨에 따라 상기 제1 데이터 세트 및 상기 제2 데이터 세트에 기초하여 상기 트랜잭션에 대한 트랜잭션 데이터를 생성하는 동작;
    상기 제1 데이터 세트, 상기 제2 데이터 세트 및 상기 트랜잭션 데이터를 포함하는 블록 생성 요청을 상기 제3 블록 노드로 전송하는 동작;
    상기 블록 생성 요청에 기초하여 생성된 상기 부분 원장 및 상기 제1 데이터베이스에 대한 업데이트 요청을 상기 제3 블록 노드로부터 수신하는 동작; 및
    상기 업데이트 요청에 기초하여, 상기 부분 원장 및 상기 제1 데이터베이스를 업데이트 하는 동작을 더 포함하는 전자 장치의 동작 방법.
  15. 청구항 14에 있어서,
    상기 업데이트 요청은 상기 제3 블록 노드로부터 생성된 상기 제1 데이터 세트 및 상기 제2 데이터 세트를 상기 제3 블록 노드에 저장된 해시 정보, 블록 순서 정보, 상기 노드 리스트 중 적어도 하나와 비교한 결과에 기초하여 생성되는 전자 장치의 동작 방법.
PCT/KR2022/008316 2021-06-11 2022-06-13 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법 WO2022260501A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/300,001 US20230254118A1 (en) 2021-06-11 2023-04-13 Electronic device including partial ledger and method in blockchain network

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2021-0076072 2021-06-11
KR20210076072 2021-06-11
KR1020210117125A KR20220167177A (ko) 2021-06-11 2021-09-02 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법
KR10-2021-0117125 2021-09-02

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/300,001 Continuation US20230254118A1 (en) 2021-06-11 2023-04-13 Electronic device including partial ledger and method in blockchain network

Publications (1)

Publication Number Publication Date
WO2022260501A1 true WO2022260501A1 (ko) 2022-12-15

Family

ID=84425347

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2022/008316 WO2022260501A1 (ko) 2021-06-11 2022-06-13 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법

Country Status (2)

Country Link
US (1) US20230254118A1 (ko)
WO (1) WO2022260501A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190122843A (ko) * 2017-04-11 2019-10-30 휴렛-팩커드 디벨롭먼트 컴퍼니, 엘.피. 블록체인 부분 원장
KR20200004444A (ko) * 2015-08-28 2020-01-13 스월즈, 인크. 네트워크 내의 분산 데이터베이스를 위한 방법 및 장치
KR20200077366A (ko) * 2018-12-20 2020-06-30 공주대학교 산학협력단 허가형 블록체인 시스템 상에서의 프라이버시 보존형 데이터 분석 방법
KR20200097147A (ko) * 2019-02-07 2020-08-18 넷마블 주식회사 파일 공유 서비스를 제공하는 컴퓨팅 장치
US20200294129A1 (en) * 2018-05-06 2020-09-17 Strong Force TX Portfolio 2018, LLC Systems and methods of smart contract and distributed ledger platform with blockchain authenticity verification

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200004444A (ko) * 2015-08-28 2020-01-13 스월즈, 인크. 네트워크 내의 분산 데이터베이스를 위한 방법 및 장치
KR20190122843A (ko) * 2017-04-11 2019-10-30 휴렛-팩커드 디벨롭먼트 컴퍼니, 엘.피. 블록체인 부분 원장
US20200294129A1 (en) * 2018-05-06 2020-09-17 Strong Force TX Portfolio 2018, LLC Systems and methods of smart contract and distributed ledger platform with blockchain authenticity verification
KR20200077366A (ko) * 2018-12-20 2020-06-30 공주대학교 산학협력단 허가형 블록체인 시스템 상에서의 프라이버시 보존형 데이터 분석 방법
KR20200097147A (ko) * 2019-02-07 2020-08-18 넷마블 주식회사 파일 공유 서비스를 제공하는 컴퓨팅 장치

Also Published As

Publication number Publication date
US20230254118A1 (en) 2023-08-10

Similar Documents

Publication Publication Date Title
WO2022154272A1 (ko) Iot 장치 및 iot 장치를 서버에 온보딩 하는 방법
WO2020231177A1 (en) Electronic device and method for receiving push message stored in blockchain
WO2022114857A1 (ko) 블록 체인 네트워크를 이용하여 데이터를 공유하는 전자 장치 및 이의 동작 방법
WO2023038466A1 (ko) 블록체인 네트워크에서 트랜잭션을 생성하는 전자 장치 및 그의 동작 방법
WO2022260501A1 (ko) 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법
WO2023058860A1 (ko) 멀티 서명된 apk 파일을 처리하는 전자 장치 및 그 동작 방법
WO2022260500A1 (ko) 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법
WO2023054936A1 (ko) 블록체인 네트워크에서 블록 데이터를 복구하는 전자 장치 및 그의 동작 방법
WO2022098015A1 (ko) 내부 데이터가 포함된 트랜잭션을 생성하는 전자 장치 및 이의 동작 방법
WO2023068609A1 (ko) 외부 장치를 이용하여 트랜잭션을 전송하는 전자 장치 및 그의 동작 방법
WO2023063694A1 (ko) 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법
WO2023096181A1 (ko) 블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법
WO2023054839A1 (ko) 상황에 기반하여 서비스의 인증 방식을 적응적으로 제공하기 위한 전자 장치, 방법, 및 비일시적 컴퓨터 판독가능 저장 매체
WO2024019258A1 (ko) 외부 전자 장치로 송신되는 신호를 제어하는 전자 장치 및 방법
WO2023214695A2 (ko) 비활성 노드를 위한 대리 합의 방법 및 전자 장치
WO2023080338A1 (ko) 복수의 카메라들을 이용해 얼굴 인증을 수행하는 전자 장치 및 방법
WO2023106594A1 (ko) 복수 개의 실행 환경을 포함하는 전자 장치 및 그의 동작 방법
WO2023287207A1 (ko) 전자 장치 및 이를 이용한 외부 전자 장치 연결 방법
WO2023128208A1 (ko) 사용자의 머리에 장착 가능한 전자 장치 및 상기 전자 장치에서 생체 정보를 이용한 기능을 제공하는 방법
WO2024071927A1 (ko) 전자 장치 및 이를 이용한 데이터 보호 방법
WO2021206452A1 (ko) 보안 데이터 처리 방법 및 이를 지원하는 전자 장치
WO2024071582A1 (ko) 블록체인 기반 데이터 전송 방법 및 장치
WO2023013845A1 (ko) 전자 장치 및 전자 장치에서 임베디드 가입자 식별 모듈 프로파일을 설치하는 방법
WO2023149648A1 (ko) 보안 기능을 제공하는 전자 장치 및 그의 동작 방법
WO2021085996A1 (ko) 신경망의 커널들을 정렬하는 전자 장치 및 이의 동작 방법

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE