KR20230052165A - Electronic device including partial ledger and method in blockchain network - Google Patents

Electronic device including partial ledger and method in blockchain network Download PDF

Info

Publication number
KR20230052165A
KR20230052165A KR1020210169754A KR20210169754A KR20230052165A KR 20230052165 A KR20230052165 A KR 20230052165A KR 1020210169754 A KR1020210169754 A KR 1020210169754A KR 20210169754 A KR20210169754 A KR 20210169754A KR 20230052165 A KR20230052165 A KR 20230052165A
Authority
KR
South Korea
Prior art keywords
data
transaction
blockchain
encryption key
blockchain node
Prior art date
Application number
KR1020210169754A
Other languages
Korean (ko)
Inventor
윤웅아
권우업
김훈
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to PCT/KR2022/015327 priority Critical patent/WO2023063694A1/en
Publication of KR20230052165A publication Critical patent/KR20230052165A/en
Priority to US18/139,551 priority patent/US20230261887A1/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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0894Escrow, recovery or storing of secret information, e.g. secret key escrow or cryptographic key storage
    • 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/1865Transactional file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0827Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving distinctive intermediate devices or communication paths
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • 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/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

According to various embodiments, an electronic device constituting a first blockchain node included in a blockchain network includes at least one processor and a memory for storing a partial ledger containing a portion of the entire distributed ledger for the blockchain network. The at least one processor generates an encryption key corresponding to a transaction in response to obtaining a request to generate the transaction, transmits information about the encryption key to at least one blockchain node related to the transaction, encrypts first data stored in the partial ledger among input data required for execution of a first smart contract for the transaction based on the encryption key, encrypts the first data, uploads the encrypted first data to a data server included in the blockchain network, and downloads second data encrypted based on the encryption key from the data server, wherein the second data is data which is not stored in the partial ledger among the input data. In addition, the at least one processor decrypts the second data based on the encryption key, and executes the first smart contract based on the first data and the decrypted second data. In addition, various embodiments identified through the specification are possible. The present invention can reduce unnecessary power consumption.

Description

블록체인 네트워크에서 부분 원장을 가진 전자 장치 및 그의 동작 방법{ELECTRONIC DEVICE INCLUDING PARTIAL LEDGER AND METHOD IN BLOCKCHAIN NETWORK}Electronic device having a partial ledger in a blockchain network and its operating method {ELECTRONIC DEVICE INCLUDING PARTIAL LEDGER AND METHOD IN BLOCKCHAIN NETWORK}

본 개시에 따른 다양한 실시 예들은 블록체인 네트워크를 이용하여 기능 실행을 제어하는 전자 장치 및 이의 동작 방법에 관한 것이다.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.

구체적으로, 본 개시에 따른 다양한 실시 예들은 부분 원장을 가진 블록체인 노드들을 포함하는 블록체인 네트워크에서, 블록체인 노드들 간에 트랜잭션에 대한 합의를 수행하는 전자 장치 및 이의 동작 방법에 관한 것이다.Specifically, 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 blockchain nodes in a blockchain network including blockchain nodes having partial ledgers.

블록체인 네트워크(blockchain network)는 의사결정이 중앙 서버에 의해 수행되는 중앙화 네트워크(centralized network)와 구분되는 네트워크로, 탈중앙화 네트워크(decentralized network)로 표현된다. 블록체인 네트워크는, 블록체인 네트워크에 참여하는 노드들의 합의 알고리즘에 따라 의사결정이 수행되는 네트워크를 지칭할 수 있다.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.

블록체인 네트워크에서 존재하는 분산 원장은, 블록체인 네트워크에서 실행되는 트랜잭션에 기초하여 생성된 적어도 하나의 블록들과 트랜잭션에 관련된 상태 데이터(state data)를 저장하는 데이터베이스(예: state data-base)를 포함할 수 있다. 분산 원장에 저장된 적어도 하나의 블록은 블록체인으로 표현될 수 있다. 분산 원장은 블록체인 네트워크에 참여하는 블록체인 노드들 각각에 저장되어 있을 수 있다. A distributed ledger that exists in a blockchain network includes a database (e.g., state data-base) that stores at least one block generated based on a transaction executed in the blockchain network and state data related to the transaction. can include At least one block stored in the distributed ledger can be represented as a blockchain. The distributed ledger may be stored in each of the blockchain nodes participating in the blockchain network.

보안성과 무결성을 유지하기 위해, 분산 원장은 블록체인 네트워크에 참여하는 블록체인 노드들의 합의 알고리즘에 따라 갱신될 수 있다. 구체적으로, 블록체인 네트워크에 참여하는 블록체인 노드들은 트랜잭션에 기초한 블록을 생성하기 위해, 보증(endorsement) 동작, 순서 결정(ordering) 동작 및 검증(validation) 동작을 수행할 수 있다.To maintain security and integrity, the distributed ledger can be updated according to the consensus algorithm of the blockchain nodes participating in the blockchain network. Specifically, blockchain nodes participating in a blockchain network may perform an endorsement operation, an ordering operation, and a validation operation in order to generate a block 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 a distributed ledger containing data on all transactions performed on the blockchain network on the device to ensure block integrity. This is not a problem if the data size of the distributed ledger is not large, but as the number of blocks increases, the size of the distributed ledger 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.

또한, 블록체인 네트워크에 참여하는 노드들은 블록체인 네트워크에서 수행되는 트랜잭션에 대한 합의 동작에 참여해야 한다. 블록체인 네트워크에 참여하는 블록체인 노드들은 자신과 관련된 트랜잭션이 아님에도 불구하고 합의에 참여해야 한다. 따라서, 각각의 블록체인 노드들은, CPU 프로세싱과 블록체인 네트워크 통신이 유지되어야 하므로, 지속적으로 전력을 소모해야 하는 문제가 있다. 이에 더하여, 블록체인 네트워크에 포함된 다른 블록체인 노드들과 랜덤하게 통신하므로 보안문제가 발생할 수 있다.In addition, nodes participating in the blockchain network must participate in the consensus operation for transactions performed in the blockchain network. Blockchain nodes participating in a blockchain network must participate in consensus even though the transaction is not related to them. Therefore, each blockchain node has a problem of continuously consuming power because CPU processing and blockchain network communication must be maintained. In addition to this, security problems may occur because it communicates randomly with other blockchain nodes included in the blockchain network.

다양한 실시 예들에 따라, 블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치는, 블록체인 네트워크와 통신하는 통신 회로, 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장을 저장하는 메모리 및 통신 회로 및 메모리와 전기적으로 연결된 적어도 하나의 프로세서를 포함하고, 적어도 하나의 프로세서는, 트랜잭션의 생성 요청을 획득함에 응답하여 트랜잭션에 대응되는 암호키를 생성하고, 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 암호키에 대한 정보를 전달하고, 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 부분 원장에 저장된 제1 데이터를 암호키에 기반하여 암호화하고, 제1 데이터를 암호화하여 블록체인 네트워크에 포함된 데이터 서버에 업로드하고, 데이터 서버로부터 암호키에 기초하여 암호화된 제2 데이터를 다운로드하고, 제2 데이터는 입력 데이터 중에서 부분 원장에 저장되지 않은 데이터이며, 제2 데이터를 암호키에 기반하여 복호화하고, 제1 데이터 및 복호화된 제2 데이터에 기초하여 제1 스마트 컨트랙트를 실행할 수 있다.According to various embodiments, an electronic device constituting a first blockchain node included in a blockchain network stores a communication circuit that communicates with the blockchain network and a partial ledger including a part of the entire distributed ledger for the blockchain network. and at least one processor electrically connected to the memory, communication circuitry, and the memory, wherein the at least one processor generates an encryption key corresponding to the transaction in response to obtaining a transaction generation request, and generates at least one encryption key related to the transaction. Transmits information about the encryption key to the blockchain node, encrypts the first data stored in the partial ledger among the input data required for execution of the first smart contract for the transaction based on the encryption key, and encrypts the first data Upload to the data server included in the blockchain network, download second data encrypted based on the encryption key from the data server, the second data is data that is not stored in the partial ledger among the input data, and encrypts the second data Decryption may be performed based on the key, and a first smart contract may be executed based on the first data and the decrypted second data.

다양한 실시 예들에 따라, 블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치의 동작 방법은, 트랜잭션의 생성 요청을 획득함에 응답하여 트랜잭션에 대응되는 암호키를 생성하는 동작, 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 암호키에 대한 정보를 전달하는 동작, 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장에 저장된 데이터인 제1 데이터를 암호키에 기반하여 암호화하는 동작, 암호화된 제1 데이터를 블록체인 네트워크에 포함된 데이터 서버에 업로드하는 동작, 데이터 서버로부터 암호키에 기초하여 암호화된 제2 데이터를 다운로드하는 동작, 제2 데이터는 입력 데이터 중에서 부분 원장에 저장되지 않은 데이터이고, 제2 데이터를 암호키에 기반하여 복호화하는 동작 및 제1 데이터 및 복호화된 제2 데이터에 기초하여 제1 스마트 컨트랙트를 실행하는 동작을 포함할 수 있다.According to various embodiments, a method of operating an electronic device constituting a first blockchain node included in a blockchain network includes an operation of generating an encryption key corresponding to a transaction in response to obtaining a request for generating a transaction, and an operation related to the transaction. Data stored in a partial ledger including a part of the entire distributed ledger for the blockchain network among the input data required for the operation of transmitting information about the encryption key to at least one blockchain node and the execution of the first smart contract for the transaction An operation of encrypting the first data based on the encryption key, an operation of uploading the encrypted first data to a data server included in the blockchain network, and an operation of downloading the second data encrypted based on the encryption key from the data server. , The second data is data that is not stored in the partial ledger among the input data, and the operation of decrypting the second data based on the encryption key and the operation of executing the first smart contract based on the first data and the decrypted second data can include

다양한 실시 예들에 따라, 블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치에 있어서, 블록체인 네트워크와 통신하는 통신 회로, 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장을 저장하는 메모리 및 통신 회로 및 메모리와 전기적으로 연결된 적어도 하나의 프로세서를 포함하고, 적어도 하나의 프로세서는, 트랜잭션의 생성 요청을 획득함에 응답하여 트랜잭션에 대응되는 암호키를 생성하고, 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 암호키에 대한 정보를 전달하고, 트랜잭션에 대한 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 부분 원장에 저장된 데이터인 제1 데이터를 암호키에 기반하여 암호화하고, 암호화된 제1 데이터를 블록체인 네트워크의 공유 원장을 저장하고, 적어도 하나의 블록체인 노드들이 접근할 수 있는 데이터 서버에 업로드하고, 적어도 하나의 블록체인 노드로 트랜잭션에 대한 보증 요청을 전송하고, 보증 요청에 응답하여, 데이터 서버에 저장된 공유 원장의 적어도 일부에 기반하여 적어도 하나의 블록체인 노드가 각각에 저장된 트랜잭션에 대한 스마트 컨트랙트를 각각 실행함에 따라 생성된 출력 데이터를 각각 포함하는 적어도 하나의 보증 데이터를 획득하고, 적어도 하나의 블록체인 노드 각각으로부터 생성된 출력 데이터 및 메모리에 저장된 트랜잭션에 대한 제1 스마트 컨트랙트를 실행함에 따라 생성된 출력 데이터에 기초하여 트랜잭션에 대한 보증을 수행할 수 있다.According to various embodiments, in an electronic device constituting a first blockchain node included in a blockchain network, a communication circuit for communicating with the blockchain network and a partial ledger including a part of the entire distributed ledger for the blockchain network A memory for storing and communication circuitry, and at least one processor electrically connected to the memory, wherein the at least one processor generates a cryptographic key corresponding to the transaction in response to obtaining a transaction creation request, and generates at least one encryption key related to the transaction. Transfers information about the encryption key to the blockchain node of the transaction, encrypts the first data, which is data stored in the partial ledger, among the input data required for the execution of the smart contract for the transaction based on the encryption key, and encrypts the encrypted first data stores the shared ledger of the blockchain network, uploads it to a data server accessible by at least one blockchain node, sends an endorsement request for a transaction to at least one blockchain node, and responds to the endorsement request, Obtaining at least one guarantee data each including output data generated as at least one blockchain node respectively executes a smart contract for each stored transaction based on at least a portion of the shared ledger stored in the data server, and at least The transaction can be guaranteed based on the output data generated from each blockchain node and the output data generated by executing the first smart contract for the transaction stored in the memory.

본 문서에 개시되는 다양한 실시 예들에 따르면, 전자 장치는 외부 장치들과 블록체인 네트워크를 형성할 수 있다. 전자 장치는 블록체인 네트워크의 분산 원장의 보다 크기가 작은 부분 원장을 저장함으로써, 메모리를 효율적으로 사용할 수 있다.According to various embodiments disclosed in this document, an electronic device may form a blockchain network with external devices. An electronic device can efficiently use memory by storing a smaller partial ledger of a distributed ledger of a blockchain network.

또한 다양한 실시 예들에 따르면, 전자 장치는 부분 원장을 저장하면서도 블록체인 네트워크에 포함된 데이터 서버를 통해 일반적인 블록체인의 합의 인증 수준과 같은 수준의 합의 인증 수준을 유지할 수 있다.Also, according to various embodiments, the electronic device may maintain the same level of consensus authentication as that of a general blockchain through a data server included in a blockchain network while storing a partial ledger.

또한 다양한 실시 예들에 따르면, 전자 장치와 관련된 트랜잭션의 처리에만 참여함으로써 불필요한 전력 소비를 줄일 수 있다.Also, according to various embodiments, unnecessary power consumption may be reduced by participating only in processing a transaction related to an electronic device.

또한, 다양한 실시 예들에 따르면, 전자 장치는 블록체인 네트워크에 포함된 데이터 서버를 이용하여 트랜잭션의 실행에 필요한 데이터를 획득함으로써 랜덤하게 발생하는 다른 전자 장치들과 통신을 줄일 수 있다.Also, according to various embodiments, the electronic device can reduce randomly occurring communication with other electronic devices by obtaining data necessary for executing a transaction using a data server included in a blockchain network.

이 외에, 본 문서를 통해 직접적 또는 간접적으로 파악되는 다양한 효과들이 제공될 수 있다.In addition to this, various effects identified directly or indirectly through this document may be provided.

도 1은 일 실시 예에 따른 전자 장치의 블록도이다.
도 2는 일 실시 예에 따른 전자 장치의 블록체인 플랫폼을 설명하기 위한 도면이다.
도 3은 일 실시 예에 따른 블록체인 네트워크를 설명하기 위한 도면이다.
도 4는 일 실시 예에 따른 전자 장치가 암호키를 생성하는 동작을 나타내는 흐름도이다.
도 5는 일 실시 예에 따른 전자 장치가 스마트 컨트랙트를 실행하는 동작을 나타내는 흐름도이다.
도 6은 일 실시 예에 따른 블록체인 네트워크의 트랜잭션 보증을 나타내는 흐름도이다.
도 7은 일 실시 예에 따른 전자 장치가 데이터 서버를 이용하여 스마트 컨트랙트를 실행하는 동작을 설명하기 위한 흐름도이다.
도 8은 일 실시 예에 따른 전자 장치가 트랜잭션에 대한 보증을 수행하는 동작을 설명하기 위한 흐름도이다.
도 9는 일 실시 예에 따른 네트워크 환경 내의 전자 장치를 도시한 도면이다.
도면의 설명과 관련하여, 동일 또는 유사한 구성요소에 대해서는 동일 또는 유사한 참조 부호가 사용될 수 있다.
1 is a block diagram of an electronic device according to an exemplary embodiment.
2 is a diagram for explaining a blockchain platform of an electronic device according to an embodiment.
3 is a diagram for explaining a blockchain network according to an embodiment.
4 is a flowchart illustrating an operation of generating an encryption key by an electronic device according to an exemplary embodiment.
5 is a flowchart illustrating an operation of executing a smart contract by an electronic device according to an embodiment.
6 is a flowchart illustrating transaction assurance in a blockchain network according to an embodiment.
7 is a flowchart illustrating an operation of executing a smart contract by an electronic device using a data server according to an embodiment.
8 is a flowchart illustrating an operation of performing a transaction guarantee by an electronic device according to an exemplary embodiment.
9 is a diagram illustrating an electronic device in a network environment according to an embodiment.
In connection with the description of the drawings, the same or similar reference numerals may be used for the same or similar elements.

이하, 본 발명의 다양한 실시 예가 첨부된 도면을 참조하여 기재된다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 실시 예의 다양한 변경(modification), 균등물(equivalent), 및/또는 대체물(alternative)을 포함하는 것으로 이해되어야 한다.Hereinafter, various embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that this is not intended to limit the present invention to the specific embodiments, and includes various modifications, equivalents, and/or alternatives of the embodiments of the present invention.

도 1은 일 실시 예에 따른 전자 장치의 블록도이다.1 is a block diagram of an electronic device according to an exemplary embodiment.

도 1을 참조하면, 전자 장치(100)는 메모리(110), 통신 회로(120), 프로세서(130) 및 디스플레이(140) 또는 이들의 조합을 포함할 수 있다. 다양한 실시 예에서, 전자 장치(100)는 도 1에 도시된 구성요소 외에 추가적인 구성요소를 포함하거나, 도 1에 도시된 구성요소 중 적어도 하나를 생략할 수 있다.Referring to FIG. 1 , an electronic device 100 may include a memory 110, a communication circuit 120, a processor 130 and a display 140, or a combination thereof. In various embodiments, 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 .

일 실시 예에 따르면, 메모리(110)는 프로세서(130)가 실행 시에 전자 장치(100)의 동작을 수행하기 위해 데이터를 처리하거나 전자 장치(100)의 구성요소를 제어하도록 하는 인스트럭션들(instructions)을 저장할 수 있다. 또한, 메모리(110)는 보안 영역 또는 별도의 보안 저장 매체(예: 보안 OS를 통해서만 접근 가능한 보안 메모리 영역(예: trust zone))을 포함할 수 있다. 일 실시 예에 따르면, 메모리(110)는 블록체인 관련 동작을 수행하는 적어도 하나의 블록체인 어플리케이션을 포함할 수 있다. 예를 들어, 블록체인 관련 동작을 수행하는 블록체인 어플리케이션 또는 블록체인 모듈에 대응되는 블록체인 플랫폼을 포함할 수 있다.According to an embodiment, 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. Also, 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)). According to one embodiment, 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.

일 실시 예에 따르면, 메모리(110)는 블록체인 네트워크에 대한 분산 원장을 저장할 수 있다. 전자 장치(100)가 블록체인 네트워크에 포함된 모바일 노드에 해당하는 경우, 메모리(110)는 블록체인 네트워크에 대한 분산 원장 중에서 일부를 포함하는 부분 원장을 저장할 수 있다. 이하 전체 원장과 구별되는 분산 원장의 일부는 부분 원장으로 지칭될 수 있다.According to one embodiment, the memory 110 may store a distributed ledger for a blockchain network. When the electronic device 100 corresponds to a mobile node included in a blockchain network, the memory 110 may store a partial ledger including a part of a distributed ledger for the blockchain network. Hereinafter, a part of the distributed ledger that is distinct from the full ledger may be referred to as a partial ledger.

일 실시 예에 따르면, 분산 원장은 적어도 하나의 블록이 연결된 블록체인을 포함할 수 있다. 적어도 하나의 블록은 블록체인 네트워크에서의 적어도 하나의 트랜잭션을 각각 포함할 수 있다. 또한, 분산 원장은 블록체인 네트워크에서 실행되는 트랜잭션과 관련된 상태 데이터(state data)를 포함하는 상태 데이터베이스(state data-base)를 포함할 수 있다. According to an embodiment, the distributed ledger may include a block chain to which at least one block is connected. Each of the at least one block may include at least one transaction in the blockchain network. In addition, the distributed ledger may include a state data-base containing state data related to transactions executed on the blockchain network.

일 실시 예에 따르면, 메모리(110)에 저장된 부분 원장은 전자 장치(100)가 합의에 참여한 적어도 하나의 트랜잭션 각각에 상응하는 적어도 하나의 블록을 포함할 수 있다. 또한, 메모리(110)에 저장된 상태 데이터베이스는 전자 장치(100)가 합의에 참여한 적어도 하나의 트랜잭션에 대한 데이터를 포함할 수 있다. 따라서, 전자 장치(100)는 전자 장치(100)가 합의에 참여한 트랜잭션에 관련된 블록만을 메모리(110)에 저장함으로써, 메모리(110)를 효율적으로 관리할 수 있다.According to an embodiment, the partial ledger stored in the memory 110 may include at least one block corresponding to each of at least one transaction in which the electronic device 100 participates in an agreement. Also, the state database stored in the memory 110 may include data on at least one transaction in which the electronic device 100 participated in an agreement. 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.

일 실시 예에 따르면, 통신 회로(120)는 외부 장치와 연결되어 데이터를 송수신하도록 구성될 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 통신 회로(120)를 통해 적어도 하나의 외부 장치와 블록체인 네트워크를 형성할 수 있다. 블록체인 네트워크는 적어도 하나의 외부 장치 및 전자 장치(100)를 블록체인 노드로 포함할 수 있다. 따라서, 전자 장치(100) 및/또는 적어도 하나의 외부 장치는 블록체인 노드인 동시에 클라이언트(client) 역할을 수행할 수 있다. 일 실시 예에서, 전자 장치(100)는 통신 회로(120)를 통해 블록체인 네트워크에 포함된 적어도 하나의 외부 장치들과 데이터를 송수신하고, 블록체인 네트워크에서의 트랜잭션 합의를 수행할 수 있다. According to an embodiment, the communication circuit 120 may be connected to an external device to transmit/receive data. According to an embodiment, 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 client as well as a blockchain node. In one embodiment, 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.

일 실시 예에 따르면, 상기 블록체인 네트워크는 상기 블록체인 노드들이 접근 가능한 데이터 서버를 포함할 수 있다. 일 실시 예에 따르면, 데이터 서버는 상기 블록체인 노드들 중에서 적어도 일부에 기초하여 생성되는 공유 원장을 저장하는 데이터 베이스를 포함할 수 있다.According to one embodiment, the blockchain network may include a data server accessible by the blockchain nodes. According to an embodiment, the data server may include a database for storing a shared ledger generated based on at least some of the blockchain nodes.

다양한 실시 예들에 따라, 상기 데이터 서버는 데이터를 공유할 수 있는 다양한 전자 장치를 나타낼 수 있다. 예를 들어, 데이터 서버는 모바일 장치, 서버, 태블릿 PC, 컴퓨터, 및/또는 블록체인 네트워크에 포함된 블록체인 노드일 수 있다. 데이터 서버는 기재된 예시에 제한되지 않고, 전자 장치(100)와 통신 가능한 장치라면 데이터 서버에 해당할 수 있다.According to various embodiments, the data server may represent various electronic devices capable of sharing data. For example, the data server may be a mobile device, server, tablet PC, computer, and/or a blockchain node included in a blockchain network. The data server is not limited to the described example, and any device capable of communicating with the electronic device 100 may correspond to the data server.

다양한 실시 예들에 따라, 블록체인 네트워크는 블록체인 노드로 피어(peer) 노드 및/또는 순서 결정 노드를 포함할 수 있다. 일 실시 예에 따르면, 블록체인 노드는 전자 장치(100) 및/또는 외부 전자 장치로, 휴대 가능한 포터블(portable) 전자 장치를 나타낼 수 있다. 예를 들어, 전자 장치(100) 및/또는 외부 전자 장치는 모바일, 태블릿 PC 및/또는 노트북에 해당할 수 있다. 다양한 실시 예들에 따른 블록체인 네트워크에 대한 설명은 도 3을 참조하여 후술된다.According to various embodiments, a blockchain network may include a peer node and/or an order decision node as a blockchain node. According to an embodiment, a blockchain node is the electronic device 100 and/or an external electronic device, and may represent a portable electronic device. For example, 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 .

일 실시 예에 따르면, 프로세서(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) 중 적어도 하나를 포함할 수 있으며, 복수의 코어를 가질 수 있다.According to an embodiment, 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 . According to an embodiment, 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.

일 실시 예에 따르면, 프로세서(130)는 메모리(110)에 저장된 블록체인 플랫폼을 통해 블록체인과 관련된 동작을 수행할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 트랜잭션에 대한 요청을 획득할 수 있다. 예를 들어, 전자 장치(100)의 사용자 및/또는 메모리(110)에 저장된 다른 어플리케이션으로부터, 프로세서(130)는 트랜잭션의 생성 요청을 획득할 수 있다.According to an embodiment, the processor 130 may perform an operation related to a blockchain through a blockchain platform stored in the memory 110 . According to one embodiment, the processor 130 may obtain a request for a transaction. For example, the processor 130 may obtain a transaction creation request from a user of the electronic device 100 and/or another application stored in the memory 110 .

일 실시 예에 따르면, 프로세서(130)는 트랜잭션의 생성 요청을 획득함에 응답하여 트랜잭션에 대응되는 암호키를 생성할 수 있다. 일 실시 예에 따르면, 상기 암호키는 트랜잭션에 기초한 것으로, 블록체인 네트워크에서 실행되는 트랜잭션에 대하여 고유한 암호키를 나타낼 수 있다. 일 실시 예에 따르면, 프로세서(130)는 다양한 암호키 생성 알고리즘에 기초하여 상기 암호키를 생성할 수 있다. 예를 들어, 프로세서(130)는 대칭 암호화 알고리즘(예: 고급 암호화 표준(advanced encryption standard, AES)) 또는 비대칭 암호화 알고리즘(예: rivest shamir adleman, RSA)에 사용되는 암호키를 생성할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 생성된 암호키를 블록체인 네트워크에 포함된 다른 블록체인 노드들에게 공유할 수 있다.According to an embodiment, the processor 130 may generate an encryption key corresponding to the transaction in response to obtaining a transaction generation request. According to an embodiment, the encryption key is based on a transaction and may indicate a unique encryption key for a transaction executed in a blockchain network. According to an embodiment, the processor 130 may generate the encryption key based on various encryption key generation algorithms. For example, the processor 130 may generate an encryption key used for a symmetric encryption algorithm (eg, advanced encryption standard (AES)) or an asymmetric encryption algorithm (eg, rivest shamir adleman, RSA). According to one embodiment, the processor 130 may share the generated encryption key to other blockchain nodes included in the blockchain network.

일 실시 예에 따르면, 대칭 암호화 알고리즘은 데이터를 암호화하는 키와 복호화하는 키가 동일한 형태의 암호화 방식을 의미할 수 있다. 일 실시 예에서, 프로세서(130)가 대칭 암호화 알고리즘을 이용하는 경우, 프로세서(130)는 트랜잭션에 대한 암호키를 생성하고, 생성된 암호키를 블록체인 네트워크에 포함된 다른 블록체인 노드들에게 공유할 수 있다. 다른 예에서, 프로세서(130)는 암호키를 생성하는데 사용된 종자 값을 다른 블록체인 노드들에게 공유할 수 있다. 상기 종자 값(예: 루트 시드(root seed))을 공유 받은 다른 블록체인 노드들은, 종자 값을 이용해 프로세서(130)가 생성한 암호키와 동일한 암호키를 생성할 수 있다. 프로세서(130)는 데이터에 대한 암호화 동작에서 생성된 암호키를 사용할 수 있다. 또한, 암호키 및/또는 암호키에 대한 종자 값을 공유 받은 다른 블록체인 노드들은 획득한 암호키에 대한 정보에 기반하여 데이터에 대한 복호화 동작을 수행할 수 있다. 다양한 실시 예들에 따라 프로세서(130)는 데이터에 대한 암호화 또는 복호화를 위해, 다양한 암호화 방식을 사용할 수 있다. 예를 들어, 프로세서(130)는 스트림 암호 방식(예: RC4, A5) 또는 블록 암호 방식(예: 데이터 암호화 표준(data encryption standard), 고급 암호화 표준(AES))을 이용할 수 있다.According to an embodiment, a symmetric encryption algorithm may mean an encryption method in which a key for encrypting data and a key for decrypting data are the same. In one embodiment, when the processor 130 uses a symmetric encryption algorithm, the processor 130 generates an encryption key for the transaction and shares the generated encryption key to other blockchain nodes included in the blockchain network. can In another example, the processor 130 may share the seed value used to generate the encryption key with other blockchain nodes. Other blockchain nodes that have shared the seed value (eg, root seed) can generate the same encryption key as the encryption key generated by the processor 130 using the seed value. The processor 130 may use an encryption key generated in an encryption operation for data. In addition, other blockchain nodes that have shared the encryption key and/or the seed value for the encryption key can perform a decryption operation on data based on the obtained information about the encryption key. According to various embodiments, the processor 130 may use various encryption schemes to encrypt or decrypt data. For example, the processor 130 may use a stream cipher method (eg, RC4 or A5) or a block cipher method (eg, data encryption standard, advanced encryption standard (AES)).

일 실시 예에서, 비대칭 암호화 알고리즘은 데이터를 암호화하는 키와 복호화하는 키가 각기 다른 형태의 암호화 방식을 의미할 수 있다. 비대칭 암호화에서 프로세서(130)는 공개키 및 개인키를 모두 사용하여 데이터를 암호화 하거나 복호화할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 종자 값에 기반하여 트랜잭션에 대한 개인키 및 공개키를 생성할 수 있다. 예를 들어, 프로세서(130)는 HMAC-SHAR 512 알고리즘 함수를 통해 생성한 해시 값에서 마스터 개인키(Master Private key)와 마스터 체인코드(Master Chain Code)를 생성할 수 있다. 512 비트의 해시된 값에서 왼쪽 256비트를 개인키로 사용하고, 오른쪽 256 비트를 체인코드로 사용할 수 있다. 프로세서(130)는 개인키와 타원곡선 함수를 이용하여 공개키를 획득할 수 있다.In one embodiment, an asymmetric encryption algorithm may mean an encryption method in which a key for encrypting data and a key for decrypting data are different from each other. In asymmetric encryption, the processor 130 can encrypt or decrypt data using both a public key and a private key. According to an embodiment, the processor 130 may generate a private key and a public key for the transaction based on the seed value. For example, the processor 130 may generate a master private key and a master chain code from a hash value generated through an HMAC-SHAR 512 algorithm function. In a 512-bit hashed value, the left 256 bits can be used as a private key and the right 256 bits can be used as a chain code. The processor 130 may obtain the public key using the private key and the elliptic curve function.

일 실시 예에 따르면, 프로세서(130)는 트랜잭션에 대한 암호키인 공개키 및 개인키를 생성하고, 생성된 공개키 및 개인키를 블록체인 네트워크에 포함된 다른 블록체인 노드들에게 공유할 수 있다. 다른 예에서, 프로세서(130)는 암호키를 생성하는데 사용된 종자 값을 다른 블록체인 노드들에게 공유할 수 있다. 상기 종자 값을 공유 받은 다른 블록체인 노드들은, 종자 값을 이용해 프로세서(130)가 생성한 암호키와 동일한 암호키인 공개키 및 개인키를 생성할 수 있다. 이후, 프로세서(130)는 데이터에 대한 암호화 동작에서 생성된 공개키 및/또는 암호키를 사용할 수 있다. 또한, 암호키 또는 암호키에 대한 종자 값을 공유 받은 다른 블록체인 노드들은 암호키에 대한 정보에 기반하여 데이터에 대한 복호화 동작을 수행할 수 있다. 일 실시 예에서, 프로세서(130)가 개인키를 공유하는 경우, 프로세서(130) 외부 장치의 접근이 허용되지 않는 보안 필드에 생성된 개인키를 포함하는 데이터 패킷을 다른 블록체인 노드들로 전송할 수 있다. 다양한 실시 예들에 따라 프로세서(130)는 데이터에 대한 암호화 또는 복호화를 위해, 타원곡선암호(elliptic curve cryptosystem(ECC)), RSA, 엘가말(elgammal)을 포함하는 다양한 암호화 방식 중에서 하나를 이용할 수 있다. 본 문서에 개시된 암호키는 프로세서(130)가 이용하는 암호화 알고리즘에 따라 대칭키 또는 비대칭키(공개키 및 개인키)를 의미할 수 있다.According to an embodiment, the processor 130 may generate a public key and a private key, which are encryption keys for a transaction, and share the generated public key and private key with other blockchain nodes included in the blockchain network. . In another example, the processor 130 may share the seed value used to generate the encryption key with other blockchain nodes. Other blockchain nodes that have shared the seed value can generate a public key and a private key that are the same encryption keys as the encryption key generated by the processor 130 using the seed value. Thereafter, the processor 130 may use the public key and/or encryption key generated in the data encryption operation. In addition, other blockchain nodes that have shared the encryption key or the seed value for the encryption key can perform a decryption operation on data based on the information about the encryption key. In one embodiment, when the processor 130 shares a private key, a data packet including a private key generated in a security field in which access of a device external to the processor 130 is not allowed may be transmitted to other blockchain nodes. there is. According to various embodiments, the processor 130 may use one of various encryption schemes including elliptic curve cryptosystem (ECC), RSA, and elgammal to encrypt or decrypt data. . The encryption key disclosed in this document may mean a symmetric key or an asymmetric key (public key and private key) according to the encryption algorithm used by the processor 130.

일 실시 예에 따르면, 상기 종자 값은 많은 키를 생성할 수 있는 기본이 되는 값을 의미할 수 있다. 종자 값은 블록체인 네트워크에서 사용 가능한 범위의 조건 내에서 임의적으로 생성되는 값을 의미할 수 있다. 예를 들어, 종자 값은 전자 장치(100)의 동작 중에 발생하는 동적 특징(예: 하드웨어 칩의 고유한 값)에 기초하여 생성될 수 있다.According to an embodiment, the seed value may mean a basic value capable of generating many keys. Seed value may refer to a value randomly generated within the range of conditions available in the blockchain network. For example, the seed value may be generated based on a dynamic feature (eg, a unique value of a hardware chip) generated during operation of the electronic device 100 .

일 실시 예에 따르면, 프로세서(130)는 요청된 트랜잭션에 대한 제1 스마트 컨트랙트(smart contract)의 실행에 요구되는 입력 데이터를 판단할 수 있다. 일 실시 예에 따르면, 상기 입력 데이터는 스마트 컨트랙트를 실행함에 따라, 메모리(110)에 저장된 상태 데이터베이스에서 참조해야 하는 데이터(예: 읽기-집합(read-set))를 의미할 수 있다. 이하 지칭되는 입력 데이터는 같은 의미를 나타낼 수 있다. 또한, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터가 메모리(110)에 저장되어 있는지 판단할 수 있다. 예를 들어, 프로세서(130)는 메모리(110)에 상기 제1 스마트 컨트랙트를 실행하기 위해 요구되는 입력 데이터(예: 읽기-집합(read-set))가 포함되어 있는지 판단할 수 있다. 예를 들어, 프로세서(130)는 제1 스마트 컨트랙트를 실행하기 위해 상태 데이터베이스로부터 읽어야 할 데이터가 메모리(110)에 저장되어 있는지 판단할 수 있다.According to one embodiment, the processor 130 may determine input data required for execution of the first smart contract for the requested transaction. According to one embodiment, the input data may refer to data (eg, read-set) to be referred to in a state database stored in the memory 110 as a smart contract is executed. Input data referred to below may have the same meaning. 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 the memory 110 includes input data (eg, read-set) required to execute the first smart contract. 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 .

일 실시 예에 따르면, 프로세서(130)는 상기 입력 데이터 중에서 메모리(110)에 저장된 제1 데이터를 암호키에 기반하여 암호화할 수 있다. 일 실시 예에 따르면, 제1 데이터는 트랜잭션에 대한 스마트 컨트랙트를 실행하기 위해 요구되는 입력 데이터 중에서 메모리(110)에 저장된 데이터일 수 있다. 일 실시 예에 따르면, 프로세서(130)는 트랜잭션에 대한 스마트 컨트랙트를 실행하기 위해 요구되는 입력 데이터 중에서 메모리(110)에 포함된 부분 원장에 저장된 제1 데이터를, 트랜잭션에 기초한 암호키를 이용하여 암호화할 수 있다. 다양한 실시 예들에 따라, 프로세서(130)는 다양한 암호화 알고리즘에 기초하여 제1 데이터를 암호키를 이용하여 암호화할 수 있다.According to an embodiment, the processor 130 may encrypt first data stored in the memory 110 among the input data based on an encryption key. According to one embodiment, the first data may be data stored in the memory 110 among input data required to execute a smart contract for a transaction. According to an embodiment, the processor 130 encrypts first data stored in the partial ledger included in the memory 110 among input data required to execute a smart contract for a transaction using an encryption key based on the transaction. can do. According to various embodiments, the processor 130 may encrypt the first data using an encryption key based on various encryption algorithms.

일 실시 예에 따르면, 프로세서(130)는 대칭 암호화 알고리즘에 기초하여 상기 제1 데이터를 암호화할 수 있다. 예를 들어, 프로세서(130)는 고급 암호화 표준(AES) 알고리즘에 기초하여 암호키를 통해 제1 데이터를 암호화할 수 있다. 프로세서(130)는 생성된 암호키의 크기에 따라 4X4 바이트 배열 형태의 상태 배열을 여러 라운드에 걸쳐 수정하여 제1 데이터를 암호화할 수 있다. 프로세서(130)는 네 단계의 연산(addrounkey, subbytes, shiftrows, mixcolumns)을 거치는 세트 동작을 반복하며 제1 데이터에 대한 암호화를 수행할 수 있다. 상기 서술한 예시는 프로세서(130)가 고급 암호화 표준(AES) 알고리즘에 따라 대칭 암호화 방식으로 데이터를 암호화 하는 경우에 적용될 수 있다. 프로세서(130)는 설명된 예시에 제한되지 않고 다양한 알고리즘에 기초하여 생성된 암호키에 기반한 대칭 암호화 방식으로 제1 데이터를 암호화할 수 있다.According to an embodiment, the processor 130 may encrypt the first data based on a symmetric encryption algorithm. For example, the processor 130 may encrypt the first data using an encryption key based on an Advanced Encryption Standard (AES) algorithm. The processor 130 may encrypt the first data by modifying the state array in the form of a 4X4 byte array over several rounds according to the size of the generated encryption key. The processor 130 may perform encryption on the first data while repeating a set operation through four operations (addrounkey, subbytes, shiftrows, and mixcolumns). The above-described example may be applied when the processor 130 encrypts data in a symmetric encryption method according to the Advanced Encryption Standard (AES) algorithm. The processor 130 may encrypt the first data in a symmetric encryption method based on an encryption key generated based on various algorithms without being limited to the described example.

일 실시 예에 따르면, 프로세서(130)는 비대칭 암호화 알고리즘에 기초하여 상기 제1 데이터를 암호화할 수 있다. 예를 들어, 프로세서(130)는 생성된 암호키 중에서 공개키를 이용하여 제1 데이터를 암호화할 수 있다. According to an embodiment, the processor 130 may encrypt the first data based on an asymmetric encryption algorithm. For example, the processor 130 may encrypt the first data using a public key among generated encryption keys.

일 실시 예에 따르면, 프로세서(130)는 비대칭 암호화 알고리즘에 기초하여 상기 제1 데이터를 암호화할 수 있다. 예를 들어, 프로세서(130)는 RSA 알고리즘에 기초하여 공개키를 통해 제1 데이터를 암호화할 수 있다. 일 실시 예에서 프로세서(130)는 공개키와 암호화 함수를 사용해 제1 데이터를 암호화할 수 있다. 상기 서술한 예에 제한되지 않고, 프로세서(130)는 다양한 알고리즘에 기초하여 생성된 암호키를 이용해 비대칭 암호화 방식으로 제1 데이터를 암호화할 수 있다.According to an embodiment, the processor 130 may encrypt the first data based on an asymmetric encryption algorithm. For example, the processor 130 may encrypt the first data using a public key based on the RSA algorithm. In one embodiment, the processor 130 may encrypt the first data using a public key and an encryption function. Without being limited to the above-described example, the processor 130 may encrypt the first data using an asymmetric encryption method using an encryption key generated based on various algorithms.

본 문서에서 개시된 데이터에 대한 암호화 방식은 상기 제1 데이터를 암호화 하는 방식과 유사할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 암호화된 제1 데이터를 블록체인 네트워크에 포함된 데이터 서버에 업로드할 수 있다. 예를 들어, 프로세서(130)는 통신 회로(120)를 통해 전자 장치(100)가 블록체인 노드로 포함된 블록체인 네트워크로 상기 제1 데이터를 전송할 수 있다. 예를 들어, 프로세서(130)는 상기 블록체인 네트워크에 포함된 데이터 서버에 암호키를 통해 암호화한 제1 데이터를 업로드 할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 데이터 서버에 포함된 트랜잭션에 대한 공유 원장에 상기 암호키를 이용하여 암호화한 제1 데이터를 업로드 할 수 있다.The encryption method for data disclosed in this document may be similar to the method for encrypting the first data. According to one embodiment, the processor 130 may upload the encrypted first data to a data server included in a blockchain network. For example, the processor 130 may transmit the first data to a blockchain network including the electronic device 100 as a blockchain node through the communication circuit 120 . For example, the processor 130 may upload the first data encrypted through an encryption key to a data server included in the blockchain network. According to an embodiment, the processor 130 may upload first data encrypted using the encryption key to a shared ledger for transactions included in the data server.

일 실시 예에 따르면, 업로드된 제1 데이터를 블록체인 네트워크에 포함된 다른 블록체인 노드들이 다운로드 할 수 있다. 일 실시 예에서, 다른 블록체인 노드들은 전자 장치(100)를 통해 공유된 암호키에 대한 정보에 기반하여 상기 암호화된 제1 데이터를 복호화할 수 있다.According to an embodiment, other blockchain nodes included in the blockchain network may download the uploaded first data. In one embodiment, other blockchain nodes may decrypt the encrypted first data based on information about an encryption key shared through the electronic device 100 .

예를 들어, 프로세서(130)가 대칭 암호화 알고리즘에 기반하여 제1 데이터를 암호화한 경우, 다른 블록체인 노드들은 공유된 암호키인 대칭키를 사용하여 제1 데이터를 복호화할 수 있다. 또는 다른 블록체인 노드들은 공유된 종자 값을 이용하여 대칭키를 생성하고, 생성된 대칭키를 이용하여 제1 데이터를 복호화할 수 있다. 생성되는 대칭키는 전자 장치(100)가 소유한 대칭키와 동일한 키를 나타낼 수 있다.For example, when the processor 130 encrypts the first data based on a symmetric encryption algorithm, other blockchain nodes may decrypt the first data using a symmetric key that is a shared encryption key. Alternatively, other blockchain nodes may generate a symmetric key using the shared seed value and decrypt the first data using the generated symmetric key. The generated symmetric key may indicate the same key as the symmetric key owned by the electronic device 100 .

다른 예를 들어, 프로세서(130)가 비대칭 암호화 알고리즘에 기반하여 제1 데이터를 암호화한 경우, 즉 프로세서(130)가 공개키로 제1 데이터를 암호화한 경우 다른 블록체인 노드들은 공유된 개인키를 사용하여 제1 데이터를 복호화할 수 있다. 예를 들어, 다른 블록체인 노드들은 전자 장치(100)로부터 공유된 개인키를 사용해 암호화된 제1 데이터를 암호화 함수에 넣어 제1 데이터를 획득할 수 있다. 다른 예를 들어, 프로세서(130)가 개인키를 생성할 수 있는 종자 값을 공유한 경우, 다른 블록체인 노드들은 종자 값을 이용하여 개인키를 생성할 수 있다. 생성되는 개인키는 전자 장치(100)가 소유한 개인키와 동일한 키를 나타낼 수 있다. 다른 블록체인 노드들은 종자 값을 이용하여 개인키를 생성하고, 생성된 개인키를 이용하여 암호화된 제1 데이터를 복호화할 수 있다.For another example, when the processor 130 encrypts the first data based on an asymmetric encryption algorithm, that is, when the processor 130 encrypts the first data with a public key, other blockchain nodes use the shared private key. Thus, the first data may be decoded. For example, other blockchain nodes may acquire the first data by inserting the encrypted first data using the private key shared from the electronic device 100 into an encryption function. For another example, when the processor 130 shares a seed value capable of generating a private key, other blockchain nodes may generate a private key using the seed value. The generated private key may indicate the same key as the private key owned by the electronic device 100 . Other blockchain nodes may generate a private key using the seed value and decrypt the encrypted first data using the generated private key.

일 실시 예에 따르면, 프로세서(130)는 상기 데이터 서버로부터 상기 암호키에 기초하여 암호화된 제2 데이터를 다운로드할 수 있다. 일 실시 예에 따르면, 제2 데이터는 트랜잭션에 대한 스마트 컨트랙트를 실행하기 위해 요구되는 입력 데이터 중에서 메모리(110)에 저장되지 않은 데이터일 수 있다. 일 실시 예에 따르면, 프로세서(130)는 트랜잭션에 대한 스마트 컨트랙트를 실행하기 위해 요구되는 입력 데이터 중에서 메모리(110)에 저장되지 않은 제2 데이터를 상기 데이터 서버를 통해 획득할 수 있다. 일 실시 예에 따르면, 데이터 서버로부터 획득되는 제2 데이터는 전자 장치(100)로부터 암호키를 공유 받은 외부 장치를 통해 암호화된 데이터를 나타낼 수 있다.According to an embodiment, the processor 130 may download second data encrypted based on the encryption key from the data server. According to an embodiment, the second data may be data not stored in the memory 110 among input data required to execute a smart contract for a transaction. According to an embodiment, the processor 130 may acquire second data not stored in the memory 110 from among input data required to execute a smart contract for a transaction through the data server. According to an embodiment, the second data acquired from the data server may represent encrypted data through an external device sharing an encryption key from the electronic device 100 .

일 실시 예에 따르면, 프로세서(130)는 상기 제2 데이터를 암호키에 기반하여 복호화하고, 제1 데이터 및 제2 데이터에 기초하여 상기 요청된 트랜잭션에 대한 제1 스마트 컨트랙트를 실행할 수 있다. 예를 들어, 프로세서(130)는 부분 원장에 저장된 제1 데이터 및 복호화된 제2 데이터를 입력 데이터로 하여 제1 스마트 컨트랙트를 실행할 수 있다.According to an embodiment, the processor 130 may decrypt the second data based on an encryption key and execute a first smart contract for the requested transaction based on the first data and the second data. For example, the processor 130 may execute the first smart contract by using the first data stored in the partial ledger and the decrypted second data as input data.

일 실시 예에 따르면, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행하기 위해 요구되는 모든 입력 데이터가 상기 상태 데이터베이스에 저장되어 있는 경우, 프로세서(130)는 저장된 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행할 수 있다. According to an embodiment, when all input data required to execute the first smart contract are stored in the state database, the processor 130 executes the first smart contract based on the stored data. can run

다른 예에 따르면, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행하기 위해 필요한 데이터 중에서 일부가 상기 상태 데이터베이스에 저장되어 있지 않은 경우, 저장되지 않은 데이터를 블록체인 네트워크에 포함된 데이터 서버로부터 획득할 수 있다. 일 실시 예에 따르면, 상기 데이터 서버는 블록체인 네트워크에 포함된 블록체인 노드들이 업로드한 데이터를 저장할 수 있다. 예를 들어, 데이터 서버는 블록체인 네트워크에서 실행중인 트랜잭션에 대응되는 공유 원장을 포함하고, 상기 공유 원장에 트랜잭션에 대한 상태 데이터를 저장할 수 있다. 일 실시 예에 따르면, 공유 원장에 업로드된 데이터는 상기 암호키에 기반하여 암호화된 데이터일 수 있다. 일 실시 예에 따르면, 프로세서(130)는 획득한 데이터를 이용하여 상기 제1 스마트 컨트랙트를 실행할 수 있다.According to another example, the processor 130 obtains the unstored data from a data server included in the blockchain network when some of the data necessary for executing the first smart contract is not stored in the state database. can According to an embodiment, the data server may store data uploaded by blockchain nodes included in the blockchain network. For example, the data server may include a shared ledger corresponding to a transaction running in a blockchain network, and store state data about the transaction in the shared ledger. According to an embodiment, data uploaded to the shared ledger may be encrypted data based on the encryption key. According to one embodiment, the processor 130 may execute the first smart contract using the acquired data.

다양한 실시 예들에 따라, 전자 장치(100)는 다양한 데이터를 블록체인 네트워크에 포함된 다른 블록체인 노드들과 공유할 수 있다. 예를 들어, 전자 장치(100)는 상기 다른 블록체인 노드들과 공유하고자 하는 다양한 데이터를 상기 데이터 서버를 이용해 공유할 수 있다. 예를 들어, 프로세서(130)는 스마트 컨트랙트와 관련된 데이터(예: 스마트 컨트랙트의 버전 정보) 및/또는 블록체인 네트워크에 포함된 블록체인 노드와 관련된 데이터(예: 블록체인 노드 구성과 관련된 정보)를 상기 데이터 서버를 통해 다른 블록체인 노드들과 공유할 수 있다. 일 실시 예에 따르면, 프로세서(130)는 다른 블록체인 노드들과 공유하고자 하는 다양한 데이터를 상기 암호키를 통해 암호화하고, 암호화된 데이터를 상기 데이터 서버를 통해 다른 블록체인 노드와 공유할 수 있다. 예를 들어, 프로세서(130)는 다른 블록체인 노드들과 공유하고자 하는 다양한 데이터를 상기 암호키를 이용하여 암호화하고, 암호화된 데이터를 상기 데이터 서버에 업로드할 수 있다. 블록체인 네트워크에 포함된 다른 블록체인 노드들은 데이터 서버에 업로드된 데이터를 다운로드할 수 있다. 또한, 프로세서(130)는 데이터 서버에 업로드된 다양한 데이터를 다운로드할 수 있다. 데이터 서버에 업로드된 다양한 데이터는 상기 암호키를 이용하여 암호화된 데이터일 수 있다. 따라서, 프로세서(130)는 암호화된 데이터를 다운로드하고, 상기 암호키를 이용하여 복호화할 수 있다.According to various embodiments, the electronic device 100 may share various data with other blockchain nodes included in a blockchain network. For example, the electronic device 100 can share various data to be shared with the other blockchain nodes using the data server. For example, the processor 130 may process smart contract-related data (eg, smart contract version information) and/or data related to blockchain nodes included in a blockchain network (eg, blockchain node configuration-related information). It can be shared with other blockchain nodes through the data server. According to an embodiment, the processor 130 may encrypt various data to be shared with other blockchain nodes through the encryption key, and share the encrypted data with other blockchain nodes through the data server. For example, the processor 130 may encrypt various data to be shared with other blockchain nodes using the encryption key and upload the encrypted data to the data server. Other blockchain nodes included in the blockchain network can download data uploaded to the data server. Also, the processor 130 may download various data uploaded to the data server. Various data uploaded to the data server may be encrypted data using the encryption key. Accordingly, the processor 130 may download the encrypted data and decrypt it using the encryption key.

일 실시 예에 따르면, 프로세서(130)는 상기 제1 스마트 컨트랙트를 실행함에 따라 반환(return)되는 데이터 중에서 적어도 일부를 사용하여 상기 트랜잭션에 대한 보증을 수행할 수 있다. According to an embodiment, the processor 130 may perform a guarantee for the transaction by using at least a part of data returned by executing the first smart contract.

일 실시 예에 따르면, 블록체인 네트워크에서 트랜잭션에 대한 보증이 완료됨에 따라, 트랜잭션에 대한 트랜잭션 데이터를 포함하는 블록을 생성하기 위한 동작을 수행할 수 있다. 예를 들어, 프로세서(130)는 분산 원장에서의 이전 블록 정보를 포함하는 해시 필드 및 상기 트랜잭션에 대한 블록 데이터를 포함하는 블록을 생성하기 위한 동작을 수행할 수 있다. 예를 들어, 프로세서(130)는 트랜잭션 데이터를 포함하는 블록 생성을 블록체인 네트워크에 포함된 순서 결정 노드(예: 블록 생성 노드)로 요청할 수 있다. 상기 블록은 통신 회로(120)를 통해 블록체인 네트워크에 포함된 블록체인 노드들과 합의를 통해 확정될 수 있다. 일 실시 예에서, 프로세서(130)는 블록을 메모리(110)에 저장할 수 있다. 예를 들어, 프로세서(130)는 합의를 통해 확정된 상기 블록에 대한 업데이트 요청을 순서 결정 노드로부터 획득하고, 상기 업데이트 요청에 기초하여 상기 블록을 메모리(110)에 저장할 수 있다. 이때, 프로세서(130)는 상기 블록을 부분 원장의 블록체인의 말단 블록 이후의 블록으로 저장할 수 있다.According to an embodiment, as the guarantee for the transaction is completed in the blockchain network, an operation for generating a block including transaction data for the transaction may be performed. For example, the processor 130 may perform an operation for generating a block including block data for the transaction and a hash field including previous block information in the distributed ledger. For example, the processor 130 may request block generation including transaction data to an order determining node (eg, a block generation node) included in a blockchain network. The block may be confirmed through agreement with blockchain nodes included in the blockchain network through the communication circuit 120. In one embodiment, processor 130 may store blocks in memory 110 . For example, the processor 130 may obtain an update request for the block determined through consensus from an order decision 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.

일 실시 예에 따르면, 디스플레이(140)는 각종 컨텐츠(예: 텍스트, 이미지, 비디오, 아이콘, 및/또는 심볼 등)를 표시할 수 있다. 일 실시 예에 따르면, 디스플레이(114)는 액정 디스플레이(LCD), 발광 다이오드(LED) 디스플레이 또는 유기 발광 다이오드(OLED) 디스플레이를 포함할 수 있다.According to an embodiment, the display 140 may display various contents (eg, text, image, video, icon, and/or symbol). According to one embodiment, the display 114 may include a liquid crystal display (LCD), a light emitting diode (LED) display, or an organic light emitting diode (OLED) display.

일 실시 예에 따르면, 프로세서(130)는 블록체인 어플리케이션과 관련된 각종 컨텐츠를 디스플레이(140)를 통해 표시할 수 있다. 예를 들어, 프로세서(130)는 디스플레이(140)를 통해 수행 요청된 트랜잭션에 대한 성공 또는 실패 알림을 나타내는 컨텐츠를 표시할 수 있다. 예를 들어, 프로세서(130)는 트랜잭션 합의를 위한 보증 동작, 검증 동작 및/또는 순서 결정 동작이 실패하는 경우, 트랜잭션 합의 동작을 중단하고 블록 생성의 실패에 대한 알림을 디스플레이(140)를 통해 표시할 수 있다. 다양한 실시 예들에 따라, 프로세서(130)는 디스플레이(140)에 제한되지 않고 전자 장치(100)에 포함된 다양한 구성을 이용하여 상기 실패 알림을 출력할 수 있다.According to one embodiment, the processor 130 may display various contents related to the blockchain application through the display 140. For example, the processor 130 may display content representing a notification of success or failure of a transaction requested to be executed through the display 140 . For example, if the guarantee operation, verification operation, and/or order determination operation for transaction agreement fails, the processor 130 suspends the transaction agreement operation and displays a notification of block generation failure through the display 140. can do. According to various embodiments, the processor 130 may output the failure notification using various components included in the electronic device 100 without being limited to the display 140 .

도 2는 일 실시 예에 따른 전자 장치의 블록체인 플랫폼을 설명하기 위한 도면이다.2 is a diagram for explaining a blockchain platform of an electronic device according to an embodiment.

도 2는 일 실시 예에 따른 전자 장치의 블록체인 플랫폼(200)을 설명하기 위한 도면이다.2 is a diagram for explaining a blockchain platform 200 of an electronic device according to an embodiment.

도 2를 참조하면, 전자 장치(100)는 블록체인 플랫폼(200)을 포함할 수 있다. 일 실시 예에 따르면, 블록체인 플랫폼(200)은 메모리(110)에 저장된 블록체인 관련 동작을 수행하는 블록체인 어플리케이션 또는 프로세서(130)에 포함된 블록체인 관련 동작을 수행하는 블록체인 모듈에 대응될 수 있다.Referring to FIG. 2 , the electronic device 100 may include a blockchain platform 200. According to one embodiment, the blockchain platform 200 corresponds 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 included in the processor 130. can

일 실시 예에 따르면, 블록체인 플랫폼(200)은 스마트 컨트랙트(smart contract)(210), 부분 원장(220) 및/또는 블록체인 프로세서(230)를 포함할 수 있다. 다양한 실시 예들에 따라, 블록체인 플랫폼(200)은 블록체인과 관련된 동작을 수행하기 위해 다양한 구성을 더 포함하거나 일부 구성이 생략될 수 있다.According to one embodiment, the blockchain platform 200 may include a smart contract 210, a partial ledger 220, and/or a blockchain processor 230. 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.

일 실시 예에 따르면, 블록체인 프로세서(230)는 프로세서(130)에 포함될 수 있다. 블록체인 프로세서(230)는 블록체인 플랫폼(200)에 포함된 구성들의 동작을 제어할 수 있다. 예를 들어, 블록체인 프로세서(230)는 블록체인 네트워크 상에서 원장 동기화, 트랜잭션 서명 및/또는 트랜잭션 기록 수행을 포함하는 트랜잭션의 실행을 할 수 있다.According to one embodiment, 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. For example, the blockchain processor 230 may execute transactions including synchronizing ledgers, signing transactions, and/or recording transactions on a blockchain network.

일 실시 예에 따르면, 블록체인 플랫폼(200)은 스마트 컨트랙트(210)를 포함할 수 있다. 스마트 컨트랙트는, 블록체인 기반 시스템에서 트랜잭션 처리에 이용되는 스크립트 또는 소프트웨어 코드를 의미한다. 보다 구체적으로, 상기 스마트 컨트랙트는 트랜잭션 처리에 이용되는 각종 조건, 상태, 상기 조건에 따른 행위를 프로그래밍 방식으로 작성한 코드로, 예를 들어, 이더리움의 스마트 컨트랙트, 하이퍼레져 패브릭(hyper ledger fabric)의 체인코드(chain code) 등을 포함할 수 있다. 블록체인 기반 시스템에서, 블록체인 노드는 업로드 된 스마트 컨트랙트를 공유할 수 있다.According to one embodiment, the blockchain platform 200 may include a smart contract 210. A smart contract refers to a script or software code used for transaction processing in a blockchain-based system. More specifically, the smart contract is a code written programmatically for various conditions, states, and actions according to the conditions used in transaction processing. For example, a smart contract of Ethereum or a hyperledger fabric It may include chain code and the like. In blockchain-based systems, blockchain nodes can share uploaded smart contracts.

블록체인 프로세서(230)는 트랜잭션에 대한 스마트 컨트랙트(210)를 실행함에 있어서 필요한 값(예: 읽기-집합(read-set))을 스마트 컨트랙트(210)에 제공할 수 있다. 예를 들어, 블록체인 프로세서(230)는 도 1을 참조하여 설명된 입력 데이터를 스마트 컨트랙트(210)에 제공할 수 있다. 또한, 블록체인 프로세서(230)는 스마트 컨트랙트(210)를 실행함으로써, 출력되는 값을 저장할 수 있다. 예를 들어, 블록체인 프로세서(230)는 스마트 컨트랙트(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. For example, the blockchain processor 230 may provide input data described with reference to FIG. 1 to the smart contract 210. In addition, the blockchain processor 230 may store the output value by executing the smart contract 210. For example, blockchain processor 230 may provide data and arguments required to execute smart contract 210.

일 실시 예에 따르면, 스마트 컨트랙트(210)가 실행됨에 따라, 스마트 컨트랙트(210)의 실행을 위해 상태 데이터베이스(state database)(222)에서 읽어야 할 데이터(요구되는 데이터) 세트(예: 읽기-집합(read-set)), 스마트 컨트랙트(210)의 실행에 따라 상태 데이터베이스에 저장된 데이터 중에서 변경되는 데이터(예: 쓰기-집합(write-set)) 및/또는 스마트 컨트랙트(210)를 실행함에 따라 상태데이터베이스에서 삭제되는 데이터(예: 삭제-집합(delete-set))가 반환(return)될 수 있다. 이하, 스마트 컨트랙트(210)를 실행함에 따라 반환되는 데이터는 출력 데이터로 지칭될 수 있다.According to one embodiment, as the smart contract 210 is executed, a set of data (requested data) to be read from the state database 222 for the execution of the smart contract 210 (eg, read-set) (read-set)), data that changes among data stored in the state database according to the execution of the smart contract 210 (e.g., write-set) and/or state according to the execution of the smart contract 210 Data to be deleted from the database (eg delete-set) may be returned. Hereinafter, data returned by executing the smart contract 210 may be referred to as output data.

일 실시 예에서, 블록체인 플랫폼(200)은 전자 장치(100)가 블록체인 노드로 구성된 블록체인 네트워크에 대한 분산 원장 중에서 일부를 저장할 수 있다. 분산 원장은 블록체인 네트워크에서 실행된 트랜잭션에 대한 데이터를 포함하는 블록의 링크드 리스트(linked-list)인 블록체인(221)과 전역 상태(world state) 데이터를 저장하는 상태 데이터베이스(222)로 구성될 수 있다.In one embodiment, the blockchain platform 200 may store a part of a distributed ledger for a blockchain network in which the electronic device 100 is composed of blockchain nodes. The distributed ledger will consist of a blockchain 221, which is a linked-list of blocks containing data about transactions executed on the blockchain network, and a state database 222 that stores world state data. can

일 실시 예에서, 부분 원장(220)은 블록체인(221)과 상태 데이터베이스(222)를 포함할 수 있다. 일 실시 예에서, 부분 원장은 블록체인 네트워크의 분산 원장의 일부를 포함할 수 있다. 일 실시 예에 따르면, 부분 원장(220)은 블록체인 네트워크에서 전자 장치(100)와 관련된 트랜잭션에 대한 데이터를 저장할 수 있다. 예를 들어, 전자 장치(100)가 합의 처리에 참여한 트랜잭션에 기초한 블록 및 데이터를 저장할 수 있다. 일 실시 예에 따르면, 부분 원장(220)은 블록체인 네트워크의 전체 원장의 적어도 일부를 포함하는 부분 원장일 수 있다. 예를 들어, 부분 원장은 블록체인 네트워크에서의 모든 트랜잭션과 관련된 블록 및 데이터를 저장하는 전체 원장에서 전자 장치(100)와 관련된 트랜잭션에 대한 블록 및 데이터를 저장하는 부분 원장일 수 있다. In one embodiment, partial ledger 220 may include a blockchain 221 and a state database 222 . In one embodiment, a partial ledger may include a portion of a distributed ledger of a blockchain network. According to an embodiment, the partial ledger 220 may store data about transactions related to the electronic device 100 in a blockchain network. For example, the electronic device 100 may store blocks and data based on transactions participating in consensus processing. According to one embodiment, the partial ledger 220 may be a partial ledger including at least a portion of the entire ledger of the blockchain network. For example, the partial 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.

일 실시 예에 따르면, 블록체인(221)은 블록체인 네트워크를 통해 생성된 적어도 하나의 블록을 포함할 수 있다. 블록은 블록 헤더와 트랜잭션 데이터를 포함할 수 있다. 일 실시 예에 따르면, 블록 헤더는 헤더 및 데이터 영역의 해시 값, 이전 블록의 해시 값, 블록의 높이(height) 값, 블록에 포함된 트랜잭션을 수행한 이후의 상태 데이터의 해시 값, 블록 생성자의 공개 키, 블록 생성자의 개인 키로 해시를 서명한 값, 입증 키 인증 체인(Attestation Key Certificate Chain) 또는 입증 키(Attestation Key)로 해시 값을 서명한 값 중 적어도 하나를 포함할 수 있다.According to one embodiment, the blockchain 221 may include at least one block generated through a blockchain network. Blocks can include block headers and transaction data. According to an embodiment, 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.

블록 데이터는 트랜잭션 데이터 중 적어도 일부의 해시 값, 스마트 컨트랙트의 버전 정보, 스마트 컨트랙트 ID, 스마트 컨트랙트 함수 ID, 스마트 컨트랙트 함수에 필요한 인자 값(예: 읽기-집합)인 스마트 컨트랙트 데이터, 트랜잭션 생성자의 트랜잭션 생성 번호인 논스(nonce) 값, 트랜잭션 생성자의 공개 키, 트랜잭션 생성자의 개인 키로 해시 값을 서명한 값, 입증 키 인증 체인 또는 해시 값을 입증 키로 서명한 값 중 적어도 하나를 포함할 수 있다. 또한, 블록 데이터는 트랜잭션의 유형, 트랜잭션 버전, 타임스탬프, 블록체인 네트워크의 채널 식별 값, 에폭, 페이로드 노출도, 체인코드 경로, 체인코드 이름, 체인코드 버전, 체인코드 유형, 타임아웃, 트랜잭션 보증자의 식별 값 및 보증자의 서명, 응답 상태, 네임스페이스, 읽기 집합, 쓰기 집합, 읽기 리스트, 머클 트리 질의 요약 중 적어도 하나를 포함할 수 있다. 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 (e.g. read-set), and the transaction of the transaction creator. It may include at least one of a nonce value that is a generation number, 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. Block data also includes the type of transaction, transaction version, timestamp, channel identification value of the blockchain network, epoch, payload exposure, chaincode path, chaincode name, chaincode version, chaincode type, timeout, transaction It may include at least one of an identification value of the guarantor, a signature of the guarantor, a response state, a namespace, a read set, a write set, a read list, and a Merkle tree query summary.

일 실시 예에서, 블록 데이터는 블록 메타데이터를 포함할 수 있다. 블록 메타데이터는 블록 생성자의 식별 값, 관련 서명, 마지막 구성 블록 번호, 블록에 포함된 각 트랜잭션의 플래그 중 적어도 하나를 포함할 수 있다. In one embodiment, block data may include block metadata. The block metadata may include at least one of an identification value of a block creator, a related signature, a last component block number, and a flag of each transaction included in the block.

일 실시 예에서, 트랜잭션은 스마트 컨트랙트(또는 체인코드)를 포함할 수 있다. 트랜잭션 요청에 따라, 스마트 컨트랙트가 실행될 수 있고, 이에 기초하여 전역 상태가 업데이트될 수 있다.In one embodiment, a transaction may include a smart contract (or chaincode). According to the transaction request, the smart contract can be executed and the global state can be updated based on it.

일 실시 예에서, 부분 원장(220)의 블록들은 체인 형태(예: 링크드-리스트)를 이루며 부분 원장(220)에 블록 데이터를 저장할 수 있다. 예를 들어, 블록체인(221)에 포함된 적어도 하나의 블록은 해시 필드와 블록 데이터를 포함할 수 있다. 일 실시 예에 따르면, 해시 필드는 블록체인 네트워크의 전체 원장에서의 이전 블록 정보 및 블록체인 네트워크의 부분 원장에서의 이전 블록 정보를 포함할 수 있다. 일 실시 예에서, 블록 데이터는 해당 블록에 대한 트랜잭션 데이터를 포함할 수 있다. In one embodiment, the blocks of the partial ledger 220 form a chain (eg, a linked list) and block data may be stored in the partial ledger 220 . For example, at least one block included in the blockchain 221 may include a hash field and block data. According to an embodiment, 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. In one embodiment, block data may include transaction data for a corresponding block.

일 실시 예에 따르면, 블록체인(221)에 포함된 적어도 하나의 블록은 해시 필드에 포함된 이전 블록 정보에 기초하여 연결되는 것으로 표현될 수 있다. According to one embodiment, 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.

일 실시 예에서, 상태 데이터베이스(222)는 블록체인 네트워크에서의 트랜잭션 실행으로 인해 변경된 값들을 키 값(key-value) 형태로 저장할 수 있다. 일 실시 예에 따르면, 상기 키 값(key-value)의 형태는 데이터의 키(key), 데이터 값(value), 데이터에 대한 해시(hash), 블록체인 네트워크에서 데이터를 소유한 블록 노드의 정보 및 블록 넘버를 포함할 수 있다. 일 실시 예에서, 상태 데이터베이스(222)에 저장된 데이터는 상태 데이터(state data)로 표현될 수 있다. 상태 데이터는, 예를 들어, 하이퍼레저 패브릭(hyperledger fabric)에서 사용되는 데이터베이스인 월드 스테이트(world state)에 저장된 데이터를 의미할 수 있다. 다만, 이에 한정되지 아니하고 상태 데이터베이스(222)는 레벨 데이터베이스 또는 카우치 데이터베이스가 사용될 수 있다.In one embodiment, the state database 222 may store values changed due to transaction execution in a blockchain network in a key-value form. According to one embodiment, 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. In one embodiment, data stored in the state database 222 may be represented as state data. The 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 thereto, and a level database or a couch database may be used as the state database 222 .

상태 데이터베이스(222)는 트랜잭션을 실행하여 변경된 최종의 값들을 키-값 형태로 저장할 수 있다. 따라서, 전자 장치(100)는 블록체인 네트워크 내의 트랜잭션 실행에 의한 최종의 값들을 확인하기 위해서 상태 데이터베이스(222)를 확인할 수 있다.The state database 222 may store final values changed by executing a transaction in a key-value form. Accordingly, the electronic device 100 may check the state database 222 in order to check final values by transaction execution in the blockchain network.

일 실시 예에 따르면, 상태 데이터베이스(222)는 전자 장치(100)의 사용자가 관여한 트랜잭션에 대한 데이터를 저장할 수 있다. 예를 들어, 블록체인 네트워크에서 전자 장치(100)와 관련된 트랜잭션 실행으로 인해 변경된 값들을 저장할 수 있다.According to an embodiment, the state database 222 may store data about a transaction involving a user of the electronic device 100 . For example, values changed due to execution of a transaction related to the electronic device 100 may be stored in a blockchain network.

일 실시 예에 따르면, 블록체인 프로세서(230)는 블록체인 네트워크에서 전자 장치(100)가 트랜잭션의 합의를 처리하기 위한 동작을 제어할 수 있다. 예를 들어, 블록체인 프로세서(230)는 블록체인 네트워크에서 사용되는 합의 알고리즘에 기초하여 트랜잭션 합의를 처리하는 동작을 수행할 수 있다. 블록체인 프로세서(230)는 통상적인 블록체인에서 사용되는 다양한 합의 알고리즘을 지원할 수 있다. 예를 들어, 블록체인 프로세서(230)는 proof of work(POW), proof of stake(POS), PBFT, RAFT에 기초하여 블록체인 네트워크에 포함된 블록체인 노드들과 트랜잭션 합의를 수행할 수 있다.According to an embodiment, the blockchain processor 230 may control an operation for the electronic device 100 to process a transaction agreement in a blockchain network. For example, the blockchain processor 230 may perform an operation of processing a transaction agreement based on a consensus algorithm used in a blockchain network. The blockchain processor 230 may support various consensus algorithms used in conventional blockchains. For example, the blockchain processor 230 may perform a transaction agreement with blockchain nodes included in a blockchain network based on proof of work (POW), proof of stake (POS), PBFT, or RAFT.

일 실시 예에 따르면, 블록체인 프로세서(230)는 생성 요청된 트랜잭션에 대한 보증 동작을 수행할 수 있다. 예를 들어, 블록체인 프로세서(230)는 트랜잭션에 대한 스마트 컨트랙트를 실행하여 제1 출력 데이터를 생성할 수 있다. 일 실시 예에 따르면, 상기 제1 출력 데이터는 스마트 컨트랙트를 실행함에 따라 반환되는 데이터 세트를 나타낼 수 있다. 예를 들어, 제1 출력 데이터는 스마트 컨트랙트 실행에 따라 상태 데이터베이스(222)에서 변경되는 데이터(예: 쓰기-집합(write-set)), 스마트 컨트랙트 실행에 따라 상태 데이터베이스(222)에서 참조되는 데이터(예: 도 1을 참조하여 설명된 입력 데이터), 스마트 컨트랙트 실행에 따라 상태 데이터베이스(222)에서 삭제되는 데이터(예: 삭제-집합(delete-set))를 포함할 수 있다. According to one embodiment, the blockchain processor 230 may perform a guarantee operation on a transaction requested to be created. For example, the blockchain processor 230 may generate first output data by executing a smart contract for the transaction. According to one embodiment, the first output data may represent a data set returned as a smart contract is executed. For example, the first output data is data that is changed in the state database 222 according to smart contract execution (eg, write-set), data referenced in the state database 222 according to smart contract execution (eg, input data described with reference to FIG. 1) and data deleted from the state database 222 according to smart contract execution (eg, delete-set).

일 실시 예에 따르면, 블록체인 프로세서(230)는 블록체인 네트워크에 포함된 적어도 하나의 블록체인 노드(예: 피어 노드) 중에서 상기 트랜잭션에 관련된 블록체인 노드로 트랜잭션을 포함하는 보증 요청을 전송할 수 있다.According to an embodiment, the blockchain processor 230 may transmit an assurance request including a transaction to a blockchain node related to the transaction among at least one blockchain node (eg, peer node) included in the blockchain network. .

일 실시 예에 따르면, 블록체인 프로세서(230)는 상기 보증 요청에 기초하여 상기 트랜잭션에 관련된 블록체인 노드로부터 상기 트랜잭션에 대한 제2 출력 데이터를 포함하는 보증 데이터를 획득할 수 있다. 예를 들어, 블록체인 프로세서(230)는 상기 트랜잭션에 관련된 제2 블록체인 노드로부터 상기 트랜잭션에 대한 스마트 컨트랙트를 실행한 결과를 포함하는 제2 출력 데이터를 획득할 수 있다.According to an embodiment, the blockchain processor 230 may obtain guarantee data including second output data for the transaction from a blockchain node related to the transaction based on the guarantee request. For example, the blockchain processor 230 may obtain second output data including a result of executing a smart contract for the transaction from a second blockchain node related to the transaction.

일 실시 예에 따르면, 블록체인 프로세서(230)는 제1 출력 데이터 및 상기 제2 블록체인 노드로부터 획득한 제2 출력 데이터에 기반하여 트랜잭션에 대한 보증을 수행할 수 있다. 예를 들어, 블록체인 프로세서(230)는 전자 장치(100)에 포함된 제1 스마트 컨트랙트를 실행한 결과인 제1 출력 데이터와 제2 블록체인 노드에 포함된 제2 스마트 컨트랙트를 실행한 결과인 제2 출력 데이터가 동일한 경우, 트랜잭션에 대한 보증이 성공한 것으로 판단할 수 있다. 다른 예를 들어, 블록체인 프로세서(230)는 제1 출력 데이터와 제2 출력 데이터가 상이한 경우, 트랜잭션에 대한 보증이 실패한 것으로 판단할 수 있다. 다양한 실시 예들에 따라, 블록체인 프로세서(230)는 다양한 보증 방법 중에서 하나를 사용하여 트랜잭션에 대한 보증을 수행할 수 있다. 예를 들어, 블록체인 프로세서(230)는 상기 제1 출력 데이터와 상기 제2 출력 데이터 중에서 일부가 동일한 경우에도 보증이 성공한 것으로 판단할 수 있다. 예를 들어, 블록체인 프로세서(230)는 상기 제1 출력 데이터 및 상기 제2 출력 데이터에 포함된 데이터 중에서 스마트 컨트랙트(210)를 실행함에 따라 상태 데이터베이스(222)에서 변경된 데이터에 기반하여 보증을 수행할 수 있다. 다른 예를 들어, 블록체인 프로세서(230)는 상기 제1 출력 데이터 및 상기 제2 출력 데이터에 포함된 데이터 중에서 스마트 컨트랙트(210)를 실행함에 따라 상태 데이터베이스에서 변경된 데이터 및 상태 데이터베이스에서 삭제된 데이터에 기반하여 보증을 수행할 수 있다.According to one embodiment, the blockchain processor 230 may perform a transaction guarantee based on the first output data and the second output data obtained from the second blockchain node. For example, the blockchain processor 230 provides first output data as a result of executing the first smart contract included in the electronic device 100 and a result of executing the second smart contract included in the second blockchain node. When the second output data is the same, it may be determined that the guarantee for the transaction is successful. For another example, when the first output data and the second output data are different, the blockchain processor 230 may determine that the guarantee for the transaction has failed. According to various embodiments, the blockchain processor 230 may perform a guarantee for a transaction using one of various assurance methods. For example, the blockchain processor 230 may determine that the guarantee is successful even when some of the first output data and the second output data are the same. For example, the blockchain processor 230 performs a guarantee based on data changed in the state database 222 as the smart contract 210 is executed among the data included in the first output data and the second output data. can do. For another example, the blockchain processor 230 determines data changed in the state database and data deleted from the state database as the smart contract 210 is executed among the data included in the first output data and the second output data. warranty can be made on the basis of

일 실시 예에 따르면, 블록체인 프로세서(230)는 전자 장치(100)가 블록체인 노드로 참여한 블록체인 네트워크와 관련된 동작을 수행할 수 있다. 일 실시 예에 따르면, 블록체인 프로세서(230)는 블록체인 네트워크를 형성하고, 블록체인 네트워크에 포함된 다른 노드들(외부 장치들)과 관련된 동작을 수행할 수 있다.According to an embodiment, the blockchain processor 230 may perform an operation related to a blockchain network in which the electronic device 100 participates as a blockchain node. According to one embodiment, the blockchain processor 230 may form a blockchain network and perform operations related to other nodes (external devices) included in the blockchain network.

도 3은 일 실시 예에 따른 블록체인 네트워크를 설명하기 위한 도면이다.3 is a diagram for explaining a blockchain network according to an embodiment.

도 3를 참조하면, 복수 개의 블록체인 노드들(310, 320, 330, 340) 및 데이터 서버(350)는 블록체인 네트워크(300)를 구성할 수 있다. 블록체인 네트워크(300)를 구성하는 복수 개의 블록체인 노드들(310, 320, 330, 340)은 휴대 가능한 전자 장치를 포함할 수 있다. 예를 들어, 복수 개의 블록체인 노드들(100, 310, 320, 330)은 모바일, 태블릿 PC 및/또는 노트북에 해당할 수 있다. 일 실시 예에 따르면, 제1 블록체인 노드(310), 제2 블록체인 노드(320) 및 제2 블록 체인 노드(330)는 휴대 가능한 모바일 노드로 보증자 노드를 나타낼 수 있다. 일 실시 예에 따르면, 제4 블록체인 노드(340)는 순서 결정 노드를 나타낼 수 있다. Referring to FIG. 3 , a plurality of blockchain nodes 310 , 320 , 330 , and 340 and a data server 350 may constitute a blockchain network 300 . The plurality of blockchain nodes 310, 320, 330, and 340 constituting the blockchain network 300 may include portable electronic devices. For example, the plurality of blockchain nodes 100, 310, 320, and 330 may correspond to mobile devices, tablet PCs, and/or notebook computers. According to one embodiment, the first blockchain node 310, the second blockchain node 320, and the second blockchain node 330 may represent a surer node as a portable mobile node. According to one embodiment, the fourth blockchain node 340 may represent an order decision node.

일 실시 예에 따르면, 제1 내지 제3 블록체인 노드들(310, 320, 330)은 트랜잭션 실행을 시뮬레이션하고 읽기-쓰기 집합을 생성할 수 있다. 읽기-집합은 트랜잭션에서 부분 원장의 데이터를 읽는 작업을 시뮬레이션하고, 쓰기-집합은 트랜잭션이 실행되고 분산 원장에 커밋(commit)될 때 원장에 업데이트될 데이터 집합을 나타낼 수 있다. 다만, 이에 제한되지 않고 제1 내지 제3 블록체인 노드들(310, 320, 330)은 다양한 데이터 집합을 생성할 수 있다. 예를 들어, 제1 내지 제3 블록체인 노드들(310, 320, 330)은 트랜잭션이 실행되고 분산 원장에 커밋될 때, 원장에서 삭제될 데이터 집합인 삭제-집합(delete-set)을 생성할 수 있다.According to an embodiment, the first to third blockchain nodes 310, 320, and 330 may simulate transaction execution and generate a read-write set. A read-set simulates the operation of reading data from a partial ledger in a transaction, and a write-set can represent a set of data that will be updated to the ledger when a transaction is executed and committed to the distributed ledger. However, it is not limited thereto, and the first to third blockchain nodes 310, 320, and 330 may generate various data sets. For example, the first to third blockchain nodes 310, 320, and 330 may create a delete-set, which is a data set to be deleted from the ledger, when a transaction is executed and committed to the distributed ledger. can

일 실시 예에 따르면, 보증자 노드는 트랜잭션을 실행하고 보증할 수 있다. 또한, 보증자 노드는 커미터(committer) 노드일 수 있다. 예를 들어, 제1 내지 제3 블록체인 노드들(310, 320, 330)은 보증된 트랜잭션의 업데이트 요청에 기반하여 각각의 노드들에 저장된 부분 원장에 업데이트 할 수 있다.According to one embodiment, the endorser node may execute and vouch for transactions. Also, the endorser node may be a committer node. For example, the first to third blockchain nodes 310, 320, and 330 may update the partial ledger stored in each node based on a guaranteed transaction update request.

일 실시 예에 따르면, 제1 블록체인 노드(310)는 트랜잭션의 생성을 요청하는 리더(leader) 노드일 수 있다. 다양한 실시 예들에 따라 블록체인 네트워크(300)에서 생성되는 트랜잭션마다 리더 노드는 변경될 수 있다.According to one embodiment, the first blockchain node 310 may be a leader node requesting the creation of a transaction. According to various embodiments, a leader node may be changed for each transaction generated in the blockchain network 300.

일 실시 예에 따르면, 제1 블록체인 노드(310)(예: 전자 장치(100)), 제2 블록체인 노드(320) 및/또는 제3 블록체인 노드(330) 도 1 및 도 2를 참조하여 설명된 전자 장치(100)와 유사한 구성을 포함할 수 있다. 예를 들어, 복수 개의 블록체인 노드들(310, 320, 330, 340)은 블록체인 네트워크에서 필요한 동작들을 수행하기 위한 구성으로 블록체인 플랫폼(200)과 유사한 구성들을 포함할 수 있다. 예를 들어, 제1 내지 제3 블록체인 노드들(310, 320, 330)은 각각의 노드에 상응하는 전자 장치(예: 전자 장치(100))의 메모리(예: 메모리(110))에 스마트 컨트랙트(예: 스마트 컨트랙트(210)) 및 부분 원장(예: 부분 원장(220))을 저장할 수 있다. 예를 들어, 제1 블록체인 노드(310)는 블록체인 네트워크에 대한 분산 원장 중에서 제3 블록 및 제3 블록에 대한 상태 데이터를 포함하는 제1 부분 원장(311)을 포함할 수 있다.According to an embodiment, the first blockchain node 310 (eg, the electronic device 100), the second blockchain node 320 and/or the third blockchain node 330 see FIGS. 1 and 2 It may include a configuration similar to that of the electronic device 100 described above. For example, the plurality of blockchain nodes 310, 320, 330, and 340 may include components similar to those of the blockchain platform 200 as configurations for performing necessary operations in a blockchain network. For example, the first to third blockchain nodes 310, 320, and 330 are smart in a memory (eg, memory 110) of an electronic device (eg, electronic device 100) corresponding to each node. It can store contracts (e.g. smart contract 210) and partial ledgers (e.g. partial ledger 220). For example, the first blockchain node 310 may include a first partial ledger 311 including a third block and state data for the third block among distributed ledgers for the blockchain network.

일 실시 예에 따르면, 제4 블록체인 노드(340)는 순서 결정 노드에 해당할 수 있다. 예를 들어, 제4 블록체인 노드(340)는 보증자 노드(예: 제1 내지 제3 블록체인 노드들(310, 320, 330) 중 적어도 하나)로부터 트랜잭션과 읽기-쓰기 집합을 포함하는 트랜잭션 데이터 및 블록 생성 요청을 수신할 수 있다. 제4 블록체인 노드(340)는 블록체인 네트워크에서 보증자 노드로부터 획득한 적어도 하나의 트랜잭션 데이터를 시퀀스로 배열한 다음 순서대로 블록을 생성할 수 있다. 또는 제4 블록체인 노드(340)는 트랜잭션 데이터를 시퀀스로 배열한 다음 순서대로 블록을 생성할 수 있도록 합의를 수행하고, 커미터 노드로 블록에 대한 업데이트를 요청할 수 있다. 예를 들어, 제4 블록체인 노드(340)는 제1 블록체인 노드(310)로부터 트랜잭션과 읽기-쓰기 집합을 포함하는 트랜잭션 데이터 및 블록 생성 요청을 수신할 수 있다. 또한, 제4 블록체인 노드(340)는 트랜잭션 간에 입력 데이터(예: 읽기-집합) 및 출력 데이터에 문제가 없는지 확인할 수 있다. 예를 들어, 제4 블록체인 노드(340)는 트랜잭션 간에 입력 데이터(예: 읽기-집합) 및 출력 데이터에 충돌이 있는지 여부를 확인할 수 있다. 일 실시 예에서, 제4 블록체인 노드(340)는 충돌이 없음을 확인하고, 합의를 수행하여 블록을 확정할 수 있다.According to one embodiment, the fourth blockchain node 340 may correspond to an order decision node. For example, the fourth blockchain node 340 includes a transaction from a surer node (eg, at least one of the first to third blockchain nodes 310, 320, and 330) and a read-write set. It can receive data and block creation requests. The fourth blockchain node 340 may arrange at least one transaction data obtained from a surer node in a sequence in a blockchain network and then generate blocks in sequence. Alternatively, the fourth blockchain node 340 may arrange the transaction data in sequence, perform an agreement to generate a block in sequence, and request an update of the block to the committer node. For example, the fourth blockchain node 340 may receive transaction data including a transaction and a read-write set and a block creation request from the first blockchain node 310 . In addition, the fourth blockchain node 340 may check whether there are any problems with input data (eg, read-set) and output data between transactions. For example, the fourth blockchain node 340 may check whether there is a conflict between input data (eg, read-set) and output data between transactions. In one embodiment, the fourth blockchain node 340 may confirm that there is no collision and confirm the block by performing an agreement.

본 개시에 따르면, 설명의 편의를 위해 4개의 블록체인 노드들이 블록체인 네트워크를 구성하는 것으로 설명하였지만, 이에 제한되지 않는다.According to the present disclosure, for convenience of description, four blockchain nodes have been described as constituting a blockchain network, but are not limited thereto.

일 실시 예에 따르면, 데이터 서버(350)는 블록체인 네트워크(300)에 포함된 복수 개의 블록체인 노드들(310, 320, 330, 340)이 접근 가능한 블록체인 네트워크(300) 내부의 저장 공간을 의미할 수 있다. 다른 예에 따르면, 데이터 서버(350)는 블록체인 네트워크(300)의 외부의 저장 공간일 수 있다.According to one embodiment, the data server 350 provides storage space inside the blockchain network 300 accessible to the plurality of blockchain nodes 310, 320, 330, 340 included in the blockchain network 300. can mean According to another example, the data server 350 may be an external storage space of the blockchain network 300 .

일 실시 예에 따르면, 데이터 서버(350)는 제1 내지 제3 블록체인 노드들(310,320,330)은 트랜잭션의 합의에 필요한 데이터의 공유를 위해 데이터를 저장하고 조회할 수 있는 공간을 나타낼 수 있다. 일 실시 예에 따르면, 데이터 서버(350)는 트랜잭션의 생성 요청을 획득한 리더 노드로부터 요청을 받아 공유 원장을 생성할 수 있다. 예를 들어, 데이터 서버(350)는 트랜잭션 생성 요청을 획득한 제1 블록체인 노드(310)의 요청에 기반하여 상기 트랜잭션에 대한 공유 원장(351)을 생성할 수 있다. 상기 공유 원장(351)은 트랜잭션의 생성이 완료됨에 따라 삭제될 수 있다.According to an embodiment, the data server 350 may represent a space where the first to third blockchain nodes 310 , 320 , and 330 can store and retrieve data to share data necessary for transaction agreement. According to an embodiment, the data server 350 may generate a shared ledger by receiving a request from a leader node that has acquired a transaction creation request. For example, the data server 350 may create the shared ledger 351 for the transaction based on the request of the first blockchain node 310 that has obtained the transaction creation request. The shared ledger 351 may be deleted as the creation of transactions is completed.

일 실시 예에 따르면, 제1 내지 제3 블록체인 노드들(310,320,330)은 트랜잭션의 합의를 위해 필요한 데이터를 트랜잭션에 대한 암호키로 암호화하여 상기 공유 원장(351)에 업로드 할 수 있다. According to an embodiment, the first to third blockchain nodes 310 , 320 , and 330 may encrypt data necessary for a transaction agreement with an encryption key for the transaction and upload the data to the shared ledger 351 .

일 실시 예에 따르면, 제1 블록체인 노드(310)는 트랜잭션에 대한 암호키를 생성할 수 있다. 또한, 생성된 암호키를 블록체인 네트워크(300)에 포함된 적어도 하나의 블록체인 노드 중에서 상기 트랜잭션의 합의에 참여할 노드들(예: 제2 블록체인 노드(320) 및 제3 블록체인 노드(330))에게 공유할 수 있다. 데이터 서버(350)는 제1 내지 제3 블록체인 노드들(310,320,330)로부터 암호화된 데이터를 획득하고, 공유 원장(351)에 업로드 할 수 있다.According to one embodiment, the first blockchain node 310 may generate an encryption key for a transaction. In addition, nodes that will participate in the agreement of the transaction (e.g., the second blockchain node 320 and the third blockchain node 330) use the generated encryption key among at least one blockchain node included in the blockchain network 300. )) can be shared. The data server 350 may acquire encrypted data from the first to third blockchain nodes 310 , 320 , and 330 and upload it to the shared ledger 351 .

일 실시 예에 따르면, 제1 블록체인 노드(310)는 생성된 암호키를 공유하기 위해 다양한 방법을 이용할 수 있다. 예를 들어, 프로세서(130)는 단순한 평문 형태로 생성된 암호키를 합의에 참여할 노드들(예: 제2 블록체인 노드(320), 제3 블록체인 노드(330))에게 공유할 수 있다. According to one embodiment, the first blockchain node 310 may use various methods to share the generated encryption key. For example, the processor 130 may share an encryption key generated in a simple plaintext form with nodes participating in the agreement (eg, the second blockchain node 320 and the third blockchain node 330).

다른 예를 들어, 제1 블록체인 노드(310)는 생성된 암호키를 공유함에 있어서, 비대칭키 암호화 방식을 통해 공유할 수 있다. 예를 들어, 프로세서(130)는 생성된 암호키를 제2 블록체인 노드(320)의 공개키로 암호화하여 제2 블록체인 노드(320)에게 공유할 수 있다. 또한, 프로세서(130)는 생성된 암호키를 제3 블록체인 노드(330)의 공개키로 암호화하여 제3 블록체인 노드(320)에게 공유할 수 있다. 일 실시 예에서, 각각의 공개키로 암호화된 암호키를 공유 받은 제2 블록체인 노드(320) 및 제3 블록체인 노드(330)는 각각의 개인키로 상기 암호키를 복호화하여 사용할 수 있다. 다만, 제1 블록체인 노드(310)가 암호키를 공유하는 방법은 이에 제한되지 않는다.For another example, the first blockchain node 310 may share the generated encryption key through an asymmetric key encryption method. For example, the processor 130 may encrypt the generated encryption key with the public key of the second blockchain node 320 and share it with the second blockchain node 320 . In addition, the processor 130 may encrypt the generated encryption key with the public key of the third blockchain node 330 and share it with the third blockchain node 320 . In one embodiment, the second blockchain node 320 and the third blockchain node 330 that receive the encryption key encrypted with each public key can decrypt and use the encryption key with each private key. However, the method for the first blockchain node 310 to share the encryption key is not limited thereto.

일 실시 예에서, 제1 내지 제3 블록체인 노드들(310,320,330)은 블록체인 네트워크(300)에 모든 트랜잭션 중에서 각각의 장치들과 관련된 트랜잭션의 생성 및 블록 기록을 수행할 수 있다. 예를 들어, 제1 내지 제3 블록체인 노드들(310,320,330)은 각각의 장치들과 관련된 트랜잭션 합의에 참여하고, 각각의 장치들과 관련된 트랜잭션의 블록 및 상태 데이터만을 각각 장치 내 메모리에 저장할 수 있다. 예를 들어, 제1 블록체인 노드(310)는 전자 장치(100) 및/또는 전자 장치(100)의 사용자와 관련된 트랜잭션 합의에 참여하고, 상기 트랜잭션의 블록 및 상태 데이터만을 메모리(110)에 저장할 수 있다. 따라서, 제1 내지 제3 블록체인 노드들(310,320,330)은 블록체인 네트워크(300)의 전체 원장 중에서 각각이 참여한 트랜잭션의 블록 및 상태 데이터만을 저장하는 부분 원장을 각각의 메모리에 저장할 수 있다. 예를 들어, 제1 블록체인 노드(310)는 제3 블록에 대한 데이터를 포함하는 제1 부분 원장(311)을 저장할 수 있다. 또한, 제2 블록체인 노드(320)는 제2 블록에 대한 데이터를 포함하는 제2 부분 원장(321)을 저장할 수 있다. 또한, 제3 블록체인 노드(330)는 제1 블록 및 제4 블록에 대한 데이터를 포함하는 제3 부분 원장(331)을 저장할 수 있다. In one embodiment, the first to third blockchain nodes 310 , 320 , and 330 may generate transactions related to respective devices and record blocks among all transactions in the blockchain network 300 . For example, the first to third blockchain nodes 310 , 320 , and 330 may participate in a transaction agreement related to each device and store only block and state data of a transaction related to each device in a memory in the device, respectively. . For example, the first blockchain node 310 participates in a transaction agreement related to the electronic device 100 and/or the user of the electronic device 100, and stores only block and state data of the transaction in the memory 110. can Accordingly, the first to third blockchain nodes 310 , 320 , and 330 may store in their respective memories partial ledgers that store only blocks and state data of transactions in which each of them participated among the entire ledger of the blockchain network 300 . For example, the first blockchain node 310 may store the first partial ledger 311 including data for the third block. In addition, the second blockchain node 320 may store a second partial ledger 321 including data for the second block. In addition, the third blockchain node 330 may store a third partial ledger 331 including data for the first block and the fourth block.

일 실시 예에 따르면, 제1 내지 제3 블록체인 노드들(310,320,330) 각각은 트랜잭션 실행을 위한 스마트 컨트랙트를 각각 독립적으로 실행할 수 있다. 일 실시 예에서, 스마트 컨트랙트는 트랜잭션을 처리하기 위한 동일한 프로그램 로직을 실행할 수 있다. 일 실시 예에 따른 블록체인 네트워크(300)에 포함된 노드들은 각각 장치들과 관련된 트랜잭션의 실행에만 참여하도록 구성될 수 있다. According to an embodiment, each of the first to third blockchain nodes 310 , 320 , and 330 may independently execute a smart contract for transaction execution. In one embodiment, a smart contract can execute the same program logic to process a transaction. Nodes included in the blockchain network 300 according to an embodiment may be configured to participate only in the execution of transactions related to each device.

일 실시 예에서, 제1 내지 제3 블록체인 노드들(310,320,330)은 스마트 컨트랙트를 실행하기 위해, 제1 내지 제3 블록체인 노드들(310,320,330) 중 적어도 하나에 포함된 상태 데이터베이스에 저장된 상태 데이터를 참조할 수 있다. 예를 들어, 제1 내지 제3 블록체인 노드들(310,320,330) 각각은 스마트 컨트랙트를 실행하기 위해 제1 내지 제3 블록체인 노드들(310,320,330) 중 적어도 일부를 통해 데이터 서버(350)에 업로드된 상태 데이터를 참조할 수 있다.In one embodiment, the first to third blockchain nodes 310 , 320 , and 330 transmit state data stored in a state database included in at least one of the first to third blockchain nodes 310 , 320 , and 330 in order to execute a smart contract. can refer For example, each of the first to third blockchain nodes 310, 320, and 330 has been uploaded to the data server 350 through at least some of the first to third blockchain nodes 310, 320, and 330 to execute a smart contract. data can be referenced.

일 실시 예에 따르면, 제1 내지 제3 블록체인 노드들(310,320,330) 각각이 상태 데이터에 기초하여 스마트 컨트랙트를 실행하고, 서로간에 수행되는 보증 프로세스의 결과에 기초하여 트랜잭션을 실행할 지 여부를 결정할 수 있다. 예를 들어, 제1 내지 제3 블록체인 노드들(310,320,330) 각각에 의한 스마트 컨트랙트를 실행하여 생성된 결과 값(예: 출력 데이터)이 일치하는 경우 트랜잭션의 보증에 성공한 것으로 판단할 수 있다. 제1 내지 제3 블록체인 노드들(310,320,330) 중에서 트랜잭션 실행에 관련된 장치들 사이에 수행되는 보증을 통해 트랜잭션에 대한 블록이 생성될 수 있다. 일 실시 예에 따르면, 상기 트랜잭션 실행에 관련된 장치들 각각에 저장된 분산 원장의 블록체인에 생성된 블록이 추가될 수 있다. 예를 들어, 추가된 블록이 분산 원장의 블록체인의 말단 블록 이후의 블록으로 연결될 수 있다.According to an embodiment, each of the first to third blockchain nodes 310 , 320 , and 330 may execute a smart contract based on state data and determine whether to execute a transaction based on the result of a guarantee process performed between them. there is. For example, when the result values (eg, output data) generated by executing the smart contract by each of the first to third blockchain nodes 310, 320, and 330 match, it may be determined that the transaction guarantee is successful. A block for a transaction may be created through a guarantee performed between devices involved in transaction execution among the first to third blockchain nodes 310 , 320 , and 330 . According to one embodiment, the created block may be added to the blockchain of the distributed ledger stored in each of the devices involved in the transaction execution. For example, the added block can be linked to the block after the end block of the block chain of the distributed ledger.

일 실시 예에 따르면, 제1 내지 제3 블록체인 노드들(310,320,330) 중에서 상기 트랜잭션 실행에 관련된 장치들 각각의 상태 데이터베이스에 저장된 키 값은 상기 트랜잭션 실행에 의해 업데이트 될 수 있다. 예를 들어, 제1 내지 제3 블록체인 노드들(310,320,330)은 트랜잭션의 생성 및 실행이 완료됨에 따라 제4 블록체인 노드(340)로부터 트랜잭션에 대한 업데이트 요청을 획득할 수 있다. 상기 업데이트 요청에 기반하여, 제1 내지 제3 블록체인 노드들(310,320,330)은 각각의 부분 원장들(제1 부분 원장(311), 제2 부분 원장(321) 및 제3 부분 원장(330))을 업데이트 할 수 있다. According to an embodiment, a key value stored in the state database of each of the devices involved in the transaction execution among the first to third blockchain nodes 310 , 320 , and 330 may be updated by the transaction execution. For example, the first to third blockchain nodes 310 , 320 , and 330 may obtain a transaction update request from the fourth blockchain node 340 as the creation and execution of the transaction are completed. Based on the update request, the first to third blockchain nodes 310 , 320 , and 330 are divided into respective partial ledgers (first partial ledger 311 , second partial ledger 321 , and third partial ledger 330 ). can be updated.

일 실시 예에 따른 블록체인 네트워크(300)의 노드들은 각각 장치와 관련된 트랜잭션의 실행에만 참여하므로, 각각 장치와 관련된 트랜잭션에 대한 상태 데이터를 저장할 수 있다. 따라서, 블록체인 네트워크(300)의 노드들은 모든 트랜잭션의 실행에 따라 상태 데이터베이스를 업데이트할 필요 없이, 각각 장치들과 관련된 트랜잭션의 실행된 경우에 상태 데이터를 업데이트 할 수 있다.Since the nodes of the blockchain network 300 according to an embodiment participate only in the execution of each device-related transaction, each can store state data for each device-related transaction. Accordingly, the nodes of the blockchain network 300 may update state data when a transaction associated with each device is executed, without needing to update the state database according to the execution of every transaction.

도 4 내지 도 6은 일 실시 예에 따른 전자 장치의 트랜잭션을 생성하는 동작을 나타내는 흐름도이다. 다양한 실시 예들에 따라 도 4 내지 도 6의 동작 중에서 일부는 생략하여 수행될 수 있고, 일부 동작의 순서는 변경될 수 있다.4 to 6 are flowcharts illustrating an operation of generating a transaction of an electronic device according to an exemplary embodiment. According to various embodiments, some of the operations of FIGS. 4 to 6 may be omitted and the order of some operations may be changed.

도 4는 일 실시 예에 따른 전자 장치가 암호키를 생성하는 동작을 나타내는 흐름도(400)이다.4 is a flowchart 400 illustrating an operation of generating an encryption key by an electronic device according to an exemplary embodiment.

도 4를 참조하면, 제1 블록체인 노드(410)(예: 도 3의 제1 블록체인 노드(310)), 제2 블록체인 노드(420)(예: 도 3의 제2 블록체인 노드(420)) 및 제3 블록체인 노드(430)(예: 도 3의 제3 블록체인 노드(330))가 도시된다. 일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션의 생성 및 보증을 요청하는 리더 노드, 제2 블록체인 노드(420) 및 제3 블록체인 노드(430)는 트랜잭션의 보증에 참여하는 보증자 노드를 나타낼 수 있다.Referring to FIG. 4, a first blockchain node 410 (eg, the first blockchain node 310 of FIG. 3) and a second blockchain node 420 (eg, the second blockchain node of FIG. 3 ( 420)) and a third blockchain node 430 (eg, the third blockchain node 330 of FIG. 3) are shown. According to an embodiment, the first blockchain node 410 is a leader node requesting the creation and guarantee of a transaction, and the second blockchain node 420 and the third blockchain node 430 participate in the transaction assurance. It can represent a guarantor node.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 사용자 및/또는 제1 블록체인 노드(410)인 전자 장치(100)에 저장된 다른 어플리케이션의 요청에 따라 트랜잭션 생성 요청(451)을 획득할 수 있다. According to an embodiment, the first blockchain node 410 obtains a transaction creation request 451 according to a request of a user and/or another application stored in the electronic device 100 that is the first blockchain node 410. can

일 실시 예에서, 제1 블록체인 노드(410)는 상기 트랜잭션 생성 요청(451)에 기반하여 트랜잭션과 관련된 적어도 하나의 블록체인 노드를 식별(452)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 트랜잭션의 보증을 수행할 적어도 하나의 블록체인 노드를 식별할 수 있다. In one embodiment, the first blockchain node 410 may identify (452) at least one blockchain node related to the transaction based on the transaction creation request (451). For example, the first blockchain node 410 may identify at least one blockchain node that will perform transaction assurance.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션에 대한 제1 스마트 컨트랙트의 실행 전 입력 값으로 트랜잭션에 참여하는 노드들을 정의하도록 설계하고, 설계된 내용에 기초하여 트랜잭션의 보증을 수행할 적어도 하나의 블록체인 노드를 식별할 수 있다.According to an embodiment, the first blockchain node 410 is designed to define nodes participating in the transaction with an input value before execution of the first smart contract for the transaction, and performs assurance of the transaction based on the designed content. At least one blockchain node can be identified.

다른 실시 예에 따르면, 제1 블록체인 노드(410)는 로직적으로 스마트 컨트랙트가 실행되는 런타임에 트랜잭션의 보증을 수행할 적어도 하나의 블록체인 노드를 식별할 수 있다.According to another embodiment, the first blockchain node 410 may logically identify at least one blockchain node to perform transaction guarantee at runtime when the smart contract is executed.

다른 실시 예에 따르면, 제1 블록체인 노드(410)는 메모리(예: 도 1의 메모리(110))에 저장된 블록체인 네트워크(예: 도 3의 블록체인 네트워크(300))에 포함된 블록체인 노드들에 대한 노드 정보 또는 상기 노드 정보를 관리하는 별도의 블록체인 노드로부터 획득한 노드 정보에 기초하여 트랜잭션의 보증을 수행할 적어도 하나의 블록체인 노드를 식별할 수 있다.According to another embodiment, the first blockchain node 410 is a blockchain included in a blockchain network (eg, the blockchain network 300 of FIG. 3) stored in a memory (eg, the memory 110 of FIG. 1). It is possible to identify at least one blockchain node to perform transaction guarantee based on node information about nodes or node information obtained from a separate blockchain node that manages the node information.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 상기 트랜잭션에 대응되는 암호키를 생성(453)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 생성 요청된 트랜잭션에 대하여 고유한 암호키를 생성할 수 있다. 생성된 암호키는 트랜잭션에 대한 임시 암호키(예: temporary transaction encryption key, TTEK)를 나타낼 수 있다.According to one embodiment, the first blockchain node 410 may generate (453) an encryption key corresponding to the transaction. For example, the first blockchain node 410 may generate a unique encryption key for the transaction requested to be generated. The generated encryption key may indicate a temporary encryption key (eg, temporary transaction encryption key, TTEK) for the transaction.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션 생성 요청(451)에 응답하여 블록체인 네트워크에 포함된 데이터 서버(예: 도 3의 데이터 서버(350))에 트랜잭션에 대한 공유 원장(예: 도 3의 공유 원장(451))의 생성을 요청할 수 있다. 일 실시 예에 따르면, 제1 블록체인 노드(410)를 통해 생성된 공유 원장은 대응되는 트랜잭션에 대한 보증이 완료됨에 따라 삭제될 수 있다.According to an embodiment, the first blockchain node 410 sends a shared ledger for transactions to a data server (eg, the data server 350 of FIG. 3) included in the blockchain network in response to the transaction creation request 451. (eg, the shared ledger 451 of FIG. 3) may be requested. According to one embodiment, the shared ledger created through the first blockchain node 410 may be deleted as the guarantee for the corresponding transaction is completed.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션에 대하여 생성된 암호화키를 상기 트랜잭션의 보증에 참여하는 블록체인 노드에 공유할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 제2 블록체인 노드(420)로 암호키를 전달(454)하고, 제3 블록체인 노드(430)로 암호키를 전달(455)할 수 있다. According to an embodiment, the first blockchain node 410 may share an encryption key generated for a transaction with a blockchain node participating in guaranteeing the transaction. For example, the first blockchain node 410 may transfer 454 the encryption key to the second blockchain node 420 and transfer 455 the encryption key to the third blockchain node 430. .

도 5는 일 실시 예에 따른 전자 장치가 스마트 컨트랙트를 실행하는 동작을 나타내는 흐름도(500)이다.5 is a flowchart 500 illustrating an operation of executing a smart contract by an electronic device according to an embodiment.

도 5를 참조하면, 제1 블록체인 노드(410), 제2 블록체인 노드(420),제3 블록체인 노드(430) 및 데이터 서버(510)(예: 도 3의 데이터 서버(350))가 도시된다.Referring to FIG. 5, a first blockchain node 410, a second blockchain node 420, a third blockchain node 430, and a data server 510 (eg, data server 350 of FIG. 3) is shown

일 실시 예에 따르면, 제1 블록체인 노드(410)는 생성 요청된 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터(예: 도 2를 참조하여 설명된 읽기-집합) 중에서 메모리(예: 메모리(110))에 저장된 제1 데이터를 판단(551)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 입력 데이터 중에서 상태 데이터베이스(예: 도 2의 상태 데이터베이스(222))에 저장된 데이터를 판단할 수 있다. According to an embodiment, the first block chain node 410 may include memory (eg, read-set) among input data (eg, the read-set described with reference to FIG. 2 ) required for execution of the first smart contract for the transaction requested to be generated. : The first data stored in the memory 110 may be determined (551). For example, the first blockchain node 410 may determine data stored in a state database (eg, the state database 222 of FIG. 2 ) from among input data.

일 실시 예에 따르면, 입력 데이터는 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 제1 블록체인 노드(410)의 메모리에 저장되지 않은 데이터를 포함할 수 있다. 이하, 입력 데이터 중에서 제1 블록체인 노드에 저장된 데이터는 제1 데이터로 표현될 수 있다. 또한, 입력 데이터 중에서 제1 블록체인 노드에 저장되지 않은 데이터는 제2 데이터로 표현될 수 있다.According to one embodiment, the input data may include data not stored in the memory of the first blockchain node 410 among input data required for smart contract execution. Hereinafter, among input data, data stored in the first blockchain node may be expressed as first data. In addition, among the input data, data not stored in the first blockchain node may be expressed as second data.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션에 대한 암호키로 제1 데이터를 암호화(552)할 수 있다. 예를 들면, 제1 블록체인 노드(410)는 대칭키 암호화 알고리즘(예: 고급 암호화 표준(AES))에 기초하여 제1 데이터를 암호키로 암호화할 수 있다. According to an embodiment, the first blockchain node 410 may encrypt 552 the first data with an encryption key for the transaction. For example, the first blockchain node 410 may encrypt the first data with an encryption key based on a symmetric key encryption algorithm (eg, Advanced Encryption Standard (AES)).

일 실시 예에 따르면, 제1 블록체인 노드(410)는 데이터 서버(510)로 암호화된 제1 데이터를 업로드(553)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 데이터 서버(510)에 생성된 트랜잭션에 대한 공유 원장에 암호화된 제1 데이터를 업로드할 수 있다. 일 실시 예에 따르면, 데이터 서버(510)는 상기 업로드(553)에 기반하여, 공유 원장에 암호화된 제1 데이터를 저장할 수 있다.According to one embodiment, the first blockchain node 410 may upload (553) the encrypted first data to the data server 510. For example, the first blockchain node 410 may upload encrypted first data to a shared ledger for a transaction generated in the data server 510 . According to an embodiment, the data server 510 may store encrypted first data in a shared ledger based on the upload 553 .

일 실시 예에 따르면, 데이터 서버(510)는 공유 원장에 데이터가 업로드됨에 따라 블록체인 네트워크에 포함된 다른 블록체인 노드들에게 업로드를 알릴 수 있다. 예를 들어, 데이터 서버(510)는 제1 데이터가 업로드됨에 기반하여, 제2 블록체인 노드(420)로 제1 데이터 업로드 알림(554)을 전송하고, 제3 블록체인 노드(430)로 제1 데이터 업로드 알림(555)을 전송할 수 있다.According to an embodiment, the data server 510 may notify other blockchain nodes included in the blockchain network of the upload as data is uploaded to the shared ledger. For example, the data server 510 transmits a first data upload notification 554 to the second blockchain node 420 based on the first data being uploaded, and to the third blockchain node 430. 1 data upload notification 555 may be transmitted.

일 실시 예에 따르면, 제2 블록체인 노드(420) 및 제3 블록체인 노드(430)는 제1 블록체인 노드(410)로부터 트랜잭션에 대한 보증 요청을 수신할 수 있다. 일 실시 예에서, 제2 블록체인 노드(420)는 트랜잭션에 대한 보증 요청에 기반하여 생성 요청된 트랜잭션에 대한 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 제2 블록체인 노드(420)에 저장된 제2 데이터를 데이터 서버(510)에 업로드할 수 있다. 예를 들어, 제2 블록체인 노드(420)는 제1 블록체인 노드(410)로부터 획득한 암호키에 기반하여 상기 제2 데이터를 암호화하고, 데이터 서버(510)에 암호화된 제2 데이터를 업로드(556)할 수 있다. 일 실시 예에 따르면, 데이터 서버(510)는 상기 업로드(556)에 기반하여, 공유 원장에 제2 데이터를 저장할 수 있다. 설명의 편의를 위해 제1 블록체인 노드(410)에 저장되지 않은 제2 데이터를 제2 블록체인 노드(420)가 업로드 하는 것으로 설명하였지만, 다양한 실시 예들에 따라 제2 데이터는 블록체인 네트워크에 포함된 다양한 블록체인 노드들을 통해 업로드될 수 있다.According to an embodiment, the second blockchain node 420 and the third blockchain node 430 may receive a transaction guarantee request from the first blockchain node 410 . In one embodiment, the second blockchain node 420 stores the second blockchain node 420 among the input data required for the execution of the smart contract for the transaction requested to be created based on the request for guarantee for the transaction. Data may be uploaded to the data server 510 . For example, the second blockchain node 420 encrypts the second data based on the encryption key obtained from the first blockchain node 410 and uploads the encrypted second data to the data server 510. (556) can. According to an embodiment, the data server 510 may store the second data in a shared ledger based on the upload 556 . For convenience of description, it has been described that the second blockchain node 420 uploads the second data that is not stored in the first blockchain node 410, but according to various embodiments, the second data is included in the blockchain network It can be uploaded through various blockchain nodes.

일 실시 예에 따르면, 제2 블록체인 노드(420)는 다양한 암호화 알고리즘에 기반하여 제2 데이터를 암호화할 수 있다. 예를 들어, 제2 블록체인 노드(420)가 제1 블록체인 노드(410)로부터 암호키를 획득한 경우, 획득한 암호키로 제2 데이터를 암호화할 수 있다. 또는, 제2 블록체인 노드(420)가 제1 블록체인 노드(410)로부터 암호키에 대한 정보를 획득한 경우, 제2 블록체인 노드(420)는 암호키에 대한 정보에 기반하여 암호키를 생성하고, 생성된 암호키로 제2 데이터를 암호화할 수 있다. 예를 들어, 제2 블록체인 노드(420)가 제1 블록체인 노드(410)로부터 암호키를 생성하는데 사용되는 종자 값을 획득한 경우, 제2 블록체인 노드(420)는 획득한 종자 값을 이용하여 암호키를 생성하고, 생성된 암호키를 이용하여 제2 데이터를 암호화할 수 있다. 일 실시 예에서, 제2 블록체인 노드(420)가 암호키에 대한 정보를 이용하여 생성한 암호키는 제1 블록체인 노드(410)가 소유한 암호키와 동일한 암호키를 나타낼 수 있다.According to one embodiment, the second blockchain node 420 may encrypt the second data based on various encryption algorithms. For example, when the second blockchain node 420 obtains an encryption key from the first blockchain node 410, it can encrypt the second data with the obtained encryption key. Alternatively, when the second blockchain node 420 obtains information about the encryption key from the first blockchain node 410, the second blockchain node 420 obtains the encryption key based on the information about the encryption key. generated, and the second data may be encrypted with the generated encryption key. For example, when the second blockchain node 420 obtains a seed value used to generate an encryption key from the first blockchain node 410, the second blockchain node 420 obtains the seed value An encryption key may be generated by using the encryption key, and the second data may be encrypted using the generated encryption key. In one embodiment, the encryption key generated by the second blockchain node 420 using the information on the encryption key may indicate the same encryption key as the encryption key owned by the first blockchain node 410.

일 실시 예에 따르면, 데이터 서버(510)는 공유 원장에 데이터가 업로드됨에 따라 블록체인 네트워크에 포함된 다른 블록체인 노드들에게 업로드를 알릴 수 있다. 예를 들어, 데이터 서버(510)는 제2 데이터가 업로드됨에 기반하여, 제1 블록체인 노드(420)로 제2 데이터 업로드 알림(557)을 전송할 수 있다.According to an embodiment, the data server 510 may notify other blockchain nodes included in the blockchain network of the upload as data is uploaded to the shared ledger. For example, the data server 510 may transmit a second data upload notification 557 to the first blockchain node 420 based on the upload of the second data.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 상기 알림(557)에 응답하여, 데이터 서버(510)로 제2 데이터를 요청(558)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 제1 스마트 컨트랙트를 실행하는데 요구되는 제1 데이터 및 제2 데이터 중에서, 제2 데이터가 데이터 서버(510)에 업로드 됨에 응답하여, 데이터 서버(510)로 제2 데이터를 요청할 수 있다. According to an embodiment, the first blockchain node 410 may request 558 second data from the data server 510 in response to the notification 557 . For example, the first blockchain node 410 responds to uploading of the second data to the data server 510 among the first data and the second data required to execute the first smart contract, and the data server 510 ), the second data may be requested.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 데이터 서버(510)로부터 제2 데이터 중에서 적어도 일부가 업로드 되었음을 나타내는 알림을 획득하고, 상기 알림에 응답하여 데이터 서버(510)에 업로드된 제2 데이터 중에서 적어도 일부를 다운로드 할 수 있다. According to an embodiment, the first blockchain node 410 obtains a notification indicating that at least a part of the second data has been uploaded from the data server 510, and in response to the notification, the first blockchain node uploaded to the data server 510 2 At least part of the data can be downloaded.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 부분 원장에 저장되지 않은 제2 데이터를 식별하고, 데이터 서버(510)로 제2 데이터를 요청할 수 있다. 일 실시 예에서, 제1 블록체인 노드(410)는 데이터 서버(510)로부터 제2 데이터의 업로드 알림을 수신하기 전에 데이터 서버(510)로 제2 데이터를 요청할 수 있다. 이 경우, 제1 블록체인 노드(410)는 제2 데이터의 업로드를 대기할 수 있다.According to an embodiment, the first blockchain node 410 identifies second data not stored in the partial ledger among the input data required for execution of the first smart contract for the transaction, and transfers the second data to the data server 510. 2 Data can be requested. In one embodiment, the first blockchain node 410 may request the second data from the data server 510 before receiving a notification to upload the second data from the data server 510 . In this case, the first blockchain node 410 may wait for upload of the second data.

일 실시 예에 따르면, 데이터 서버(510)는 상기 요청(558)에 응답하여 암호화된 제2 데이터를 전송(559)할 수 있다. According to an embodiment, the data server 510 may transmit (559) encrypted second data in response to the request (558).

일 실시 예에 따르면, 제1 블록체인 노드(410)는 암호화된 제2 데이터를 암호키로 복호화(560)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 암호키에 대한 정보에 기반하여 암호화된 제2 데이터를 복호화하여 제2 데이터를 획득할 수 있다. According to an embodiment, the first blockchain node 410 may decrypt (560) the encrypted second data with an encryption key. For example, the first blockchain node 410 may obtain the second data by decrypting the encrypted second data based on the information about the encryption key.

일 실시 예에 따르면, 데이터 서버(510)에 업로드되는 데이터는 트랜잭션에 대한 암호키로 암호화되고, 복호화됨으로써 블록체인 노드들은 보안 문제 없이 트랜잭션에 대한 스마트 컨트랙트의 실행에 요구되는 상태 데이터를 교환할 수 있다.According to one embodiment, data uploaded to the data server 510 is encrypted with the encryption key for the transaction and decrypted, so that blockchain nodes can exchange state data required for smart contract execution for the transaction without security issues. .

일 실시 예에 따르면, 제1 블록체인 노드(410)는 제1 데이터 및 제2 데이터에 기초하여 제1 스마트 컨트랙트를 실행(561)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 메모리에 저장되어 있던 제1 데이터 및 데이터 서버로부터 획득한 제2 데이터를 입력 데이터로 하는 제1 스마트 컨트랙트를 실행할 수 있다. 제1 블록체인 노드(410)는 제1 스마트 컨트랙트를 실행하여 제1 출력 데이터를 획득할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 상기 입력 데이터, 제1 스마트 컨트랙트의 실행에 기초하여 상태 데이터베이스에 업데이트될 데이터(예: 쓰기-집합), 및/또는 제1 스마트 컨트랙트의 실행에 기초하여 상태 데이터베이스에서 삭제될 데이터(예: 삭제-집합)를 포함하는 제1 출력 데이터를 획득할 수 있다.According to an embodiment, the first blockchain node 410 may execute 561 the first smart contract based on the first data and the second data. For example, the first blockchain node 410 may execute a first smart contract using the first data stored in the memory and the second data acquired from the data server as input data. The first blockchain node 410 may obtain first output data by executing the first smart contract. For example, the first blockchain node 410 may use the input data, data to be updated in a state database based on execution of the first smart contract (eg, write-set), and/or execution of the first smart contract. Based on this, first output data including data to be deleted from the state database (eg, deletion-set) may be obtained.

도 4 및 도 5를 참조하여 설명된 암호키를 생성하는 동작 및 암호키를 이용하여 제1 데이터 또는 제2 데이터를 암호화 및/또는 복호화하는 동작은 도 1 및 도 2를 참조하여 설명된 암호키를 생성하는 동작 및 암호키를 이용하여 제1 데이터를 암호화 및/또는 복호화하는 동작과 유사한 동작을 나타낼 수 있다.The operation of generating the encryption key described with reference to FIGS. 4 and 5 and the operation of encrypting and/or decrypting the first data or the second data using the encryption key are the encryption keys described with reference to FIGS. 1 and 2 . It may represent an operation similar to an operation of generating and an operation of encrypting and/or decrypting the first data using an encryption key.

도 6은 일 실시 예에 따른 블록체인 네트워크의 트랜잭션 보증을 나타내는 흐름도(600)이다.6 is a flowchart 600 illustrating transaction assurance in a blockchain network according to an embodiment.

도 6을 참조하면, 제1 블록체인 노드(410), 제2 블록체인 노드(420),제3 블록체인 노드(430) 및 데이터 서버(510) 및 제4 블록체인 노드(610)(예: 도 3의 제4 블록체인 노드(340))가 도시된다.Referring to FIG. 6, a first blockchain node 410, a second blockchain node 420, a third blockchain node 430 and a data server 510 and a fourth blockchain node 610 (eg: A fourth blockchain node 340 in FIG. 3 is shown.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션의 생성 및 보증을 요청하는 리더 노드, 제2 블록체인 노드(420) 및 제3 블록체인 노드(430)는 트랜잭션의 보증에 참여하는 보증자 노드를 나타낼 수 있다. 또한, 제4 블록체인 노드(610)는 순서 결정 노드를 나타낼 수 있다.According to an embodiment, the first blockchain node 410 is a leader node requesting the creation and guarantee of a transaction, and the second blockchain node 420 and the third blockchain node 430 participate in the transaction assurance. It can represent a guarantor node. In addition, the fourth blockchain node 610 may represent an order decision node.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션의 생성 요청에 응답하여 트랜잭션에 관련된 적어도 하나의 블록체인 노드를 식별하고, 식별된 블록체인 노드로 트랜잭션에 대한 보증 요청을 전송할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 제2 블록체인 노드(420)로 트랜잭션에 대한 보증 요청(651)을 전송할 수 있다. 또한, 제1 블록체인 노드(410)는 제3 블록체인 노드(430)로 트랜잭션에 대한 보증 요청(652)을 전송할 수 있다.According to an embodiment, the first blockchain node 410 may identify at least one blockchain node related to the transaction in response to the transaction creation request, and transmit a guarantee request for the transaction to the identified blockchain node. . For example, the first blockchain node 410 may send an endorsement request 651 for the transaction to the second blockchain node 420 . In addition, the first blockchain node 410 may transmit a guarantee request 652 for the transaction to the third blockchain node 430 .

일 실시 예에 따르면, 상기 보증 요청(651)을 획득한 제2 블록체인 노드(420)는 보증 요청된 트랜잭션에 대한 제2 스마트 컨트랙트를 실행(653)할 수 있다. 일 실시 예에서, 제2 블록체인 노드(420)는 도 5를 참조하여 설명된 제1 블록체인 노드(410)의 스마트 컨트랙트 실행과 유사한 동작을 수행할 수 있다. 예를 들어, 제2 블록체인 노드(420)는 제2 스마트 컨트랙트의 실행에 요구되는 데이터 중에서 제2 블록체인 노드(420) 메모리에 저장된 데이터를 암호키로 암호화하여 데이터 서버(510)에 업로드 할 수 있다. 또한 예를 들어, 제2 블록체인 노드(420)는 제2 스마트 컨트랙트의 실행에 요구되는 데이터 중에서 제2 블록체인 노드(420) 메모리에 저장되지 않은 데이터를 데이터 서버(510)로부터 다운로드 하여, 암호키로 복호화하여 사용할 수 있다. 일 실시 예에 따르면, 제2 블록체인 노드(420)는 제2 스마트 컨트랙트를 실행함에 따라 제2 출력 데이터를 생성할 수 있다. According to an embodiment, the second blockchain node 420 that has obtained the guarantee request 651 may execute a second smart contract for the transaction for which the guarantee is requested (653). In one embodiment, the second blockchain node 420 may perform an operation similar to the smart contract execution of the first blockchain node 410 described with reference to FIG. 5 . For example, the second blockchain node 420 may encrypt data stored in the memory of the second blockchain node 420 among data required for execution of the second smart contract with an encryption key and upload it to the data server 510. there is. Also, for example, the second blockchain node 420 downloads data not stored in the memory of the second blockchain node 420 from the data server 510 among the data required for execution of the second smart contract, It can be decrypted with the key. According to one embodiment, the second blockchain node 420 may generate second output data as the second smart contract is executed.

일 실시 예에 따르면, 제2 블록체인 노드(420)는 제1 블록체인 노드(410)로 제2 출력 데이터를 포함하는 보증 데이터를 전송(654)할 수 있다. 예를 들어, 보증 데이터는 제2 출력 데이터 및/또는 트랜잭션 식별 데이터 제2 스마트 컨트랙트에 대한 입력 데이터를 포함할 수 있다.According to an embodiment, the second blockchain node 420 may transmit (654) guarantee data including the second output data to the first blockchain node 410. For example, the endorsement data may include second output data and/or transaction identification data input data for a second smart contract.

일 실시 예에 따르면, 제2 블록체인 노드(420)는 상기 전송(654) 동작 이후에 암호키를 삭제(655)할 수 있다. 예를 들어, 제2 블록체인 노드(420)는 트랜잭션에 대한 보증 동작을 위해 보증 데이터를 전송한 이후에는 암호키를 파기할 수 있다.According to one embodiment, the second blockchain node 420 may delete (655) the encryption key after the transmission (654) operation. For example, the second blockchain node 420 may destroy the encryption key after transmitting guarantee data for a guarantee operation for a transaction.

일 실시 예에 따르면, 상기 보증 요청(652)을 획득한 제3 블록체인 노드(430)는 보증 요청된 트랜잭션에 대한 제3 스마트 컨트랙트를 실행(656)할 수 있다. 일 실시 예에서, 제3 블록체인 노드(430)는 제2 블록체인 노드(420)와 유사하게 제3 스마트 컨트랙트를 실행할 수 있다. 따라서, 제3 블록체인 노드(430)는 제3 스마트 컨트랙트를 실행하여 제3 출력 데이터를 생성할 수 있다.According to an embodiment, the third blockchain node 430 that has obtained the guarantee request 652 may execute a third smart contract for the transaction for which the guarantee is requested (656). In one embodiment, the third blockchain node 430 may execute a third smart contract similarly to the second blockchain node 420 . Accordingly, the third blockchain node 430 may generate third output data by executing the third smart contract.

일 실시 예에 따르면, 제3 블록체인 노드(430)는 제1 블록체인 노드(410)로 제3 출력 데이터를 포함하는 보증 데이터를 전송(657)할 수 있다. 예를 들어, 보증 데이터는 제3 출력 데이터 및/또는 트랜잭션 식별 데이터 제3 스마트 컨트랙트에 대한 입력 데이터를 포함할 수 있다.According to an embodiment, the third blockchain node 430 may transmit (657) guarantee data including the third output data to the first blockchain node 410. For example, the endorsement data may include third output data and/or transaction identification data input data for a third smart contract.

다양한 실시 예들에 따라, 제1 블록체인 노드(410)의 보증 요청에 응답하여 제1 블록체인 노드(410)로 전송되는 보증 데이터는 다양한 데이터를 포함할 수 있다. 예를 들어, 보증 전략에 따라 제2 블록체인 노드(420)는 제2 출력 데이터 중에서 일부를 포함하는 보증 데이터를 제1 블록체인 노드(410)로 전송할 수 있다. 또한, 보증 전략에 따라 제3 블록체인 노드(430)는 제3 출력 데이터 중에서 일부를 포함하는 보증 데이터를 제1 블록체인 노드(410)로 전송할 수 있다. 상기 보증 전략은 다양한 트랜잭션에 대한 보증 방법 중에서 미리 결정된 트랜잭션에 대한 보증 방법을 나타낼 수 있다.According to various embodiments, the guarantee data transmitted to the first blockchain node 410 in response to the guarantee request of the first blockchain node 410 may include various data. For example, according to the guarantee strategy, the second blockchain node 420 may transmit guarantee data including some of the second output data to the first blockchain node 410 . In addition, according to the guarantee strategy, the third blockchain node 430 may transmit guarantee data including some of the third output data to the first blockchain node 410 . The guarantee strategy may indicate a guarantee method for a predetermined transaction among guarantee methods for various transactions.

일 실시 예에 따르면, 제3 블록체인 노드(430)는 상기 전송(657) 동작 이후에 암호키를 삭제(658)할 수 있다. 예를 들어, 제3 블록체인 노드(430)는 트랜잭션에 대한 보증 동작을 위해 보증 데이터를 전송한 이후에는 암호키를 파기할 수 있다.According to one embodiment, the third blockchain node 430 may delete (658) the encryption key after the transmission (657) operation. For example, the third blockchain node 430 may destroy the encryption key after transmitting guarantee data for a guarantee operation for a transaction.

일 실시 예에 따라, 트랜잭션에 대한 보증 동작에 참여하는 제1 내지 제3 블록체인 노드들(410,420,430)은 트랜잭션에 대한 스마트 컨트랙트를 각각 실행할 수 있다. 일 실시 예에서, 제1 내지 제3 블록체인 노드들(410,420,430)은 데이터 서버(510)의 공유 원장에 저장된 상태 데이터를 이용하여 스마트 컨트랙트를 각각 실행할 수 있다. 이때, 제1 내지 제3 블록체인 노드들(410,420,430)은 미리 공유된 암호키를 이용하여 암호화된 상태 데이터를 데이터 서버(510)에 업로드하거나 데이터 서버(510)로부터 다운로드 함으로써 상태 데이터에 대한 보안이 유지될 수 있다.According to an embodiment, the first to third blockchain nodes 410 , 420 , and 430 participating in the guarantee operation for the transaction may each execute a smart contract for the transaction. In one embodiment, the first to third blockchain nodes 410 , 420 , and 430 may each execute a smart contract using state data stored in the shared ledger of the data server 510 . At this time, the first to third blockchain nodes 410, 420, and 430 upload or download the encrypted state data to the data server 510 using a previously shared encryption key, so that the state data is secure. can be maintained

또한, 블록체인 네트워크에 포함된 부분 원장을 포함하는 적어도 하나의 블록체인 노드는 스마트 컨트랙트의 실행에 요구되는 데이터 중에서 각각의 부분 원장에 저장되지 않은 데이터를 데이터 서버(510)로부터 획득할 수 있으므로 불필요한 통신을 줄일 수 있다.In addition, at least one blockchain node including the partial ledger included in the blockchain network can obtain data not stored in each partial ledger among data required for smart contract execution from the data server 510, thereby eliminating unnecessary communication can be reduced.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 제1 출력 데이터 및 보증 데이터에 기초하여 트랜잭션에 대한 보증을 수행(659)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 제1 출력 데이터 중에서 적어도 일부를 제2 블록체인 노드(420)로부터 획득한 보증 데이터에 포함된 제2 출력 데이터 중에서 적어도 일부와 비교할 수 있다. 상기 비교되는 데이터는 보증 전략에 따라 결정될 수 있다. 비교 결과, 제1 출력 데이터 및 제2 출력 데이터가 일치하는 경우 트랜잭션에 대한 보증이 성공한 것으로 판단할 수 있다. 또한, 예를 들어, 제1 블록체인 노드(410)는 제1 출력 데이터 중에서 적어도 일부를 제3 블록체인 노드(430)로부터 획득한 보증 데이터에 포함된 제3 출력 데이터 중에서 적어도 일부와 비교할 수 있다. 비교 결과, 제1 출력 데이터 및 제3 출력 데이터가 일치하는 경우 트랜잭션에 대한 보증이 성공한 것으로 판단할 수 있다. According to an embodiment, the first blockchain node 410 may perform ( 659 ) a guarantee on the transaction based on the first output data and the guarantee data. For example, the first blockchain node 410 may compare at least some of the first output data with at least some of the second output data included in the guarantee data obtained from the second blockchain node 420 . The data to be compared may be determined according to an assurance strategy. As a result of the comparison, when the first output data and the second output data match, it may be determined that the guarantee for the transaction is successful. Also, for example, the first blockchain node 410 may compare at least some of the first output data with at least some of the third output data included in the guarantee data obtained from the third blockchain node 430. . As a result of the comparison, when the first output data and the third output data match, it may be determined that the guarantee for the transaction is successful.

다른 예를 들어, 제1 블록체인 노드(410)는 비교 결과, 제1 출력 데이터 및 제2 출력 데이터가 일치하지 않는 경우 트랜잭션에 대한 보증이 실패한 것으로 판단할 수 있다. 또한, 다른 예를 들어, 제1 블록체인 노드(410)는 제1 출력 데이터 및 제3 출력 데이터가 일치하지 않는 경우 트랜잭션에 대한 보증이 실패한 것으로 판단할 수 있다.For another example, the first blockchain node 410 may determine that the guarantee for the transaction has failed when the first output data and the second output data do not match as a result of the comparison. Also, for another example, the first blockchain node 410 may determine that the guarantee for the transaction has failed when the first output data and the third output data do not match.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 블록체인 네트워크에 포함된 다른 블록체인 노드들로부터 획득한 보증이 모두 성공하는 경우에 트랜잭션에 대한 보증이 완료된 것으로 판단할 수 있다.According to an embodiment, the first blockchain node 410 may determine that the transaction guarantee is completed when all guarantees obtained from other blockchain nodes included in the blockchain network succeed.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션에 관련된 블록체인 노드들과 동작 651 내지 동작 659를 수행하여 트랜잭션에 대한 보증을 완료할 수 있다. According to an embodiment, the first blockchain node 410 may perform operations 651 to 659 with blockchain nodes related to the transaction to complete the guarantee for the transaction.

다양한 실시 예들에 따라, 트랜잭션에 대한 보증 동작은 다양한 방법을 통해 수행될 수 있다. 다른 예에 따르면, 상기 제2 블록체인 노드(420)는 상기 제1 블록체인 노드(410)로부터 보증 요청(651)을 획득할 수 있다. 이때, 상기 보증 요청(651)은 제1 출력 데이터를 포함할 수 있다. 제2 블록체인 노드(420)는 상기 보증 요청(651)에 응답하여, 트랜잭션에 대한 제2 스마트 컨트랙트를 실행(653)할 수 있다. 또한, 제2 블록체인 노드(420)는 제1 블록체인 노드(410)로부터 획득한 제1 출력 데이터 중에서 적어도 일부와 제2 출력 데이터 중에서 적어도 일부를 비교할 수 있다. 비교 결과, 제2 블록체인 노드(420)는 제1 출력 데이터 및 제2 출력 데이터가 동일한 경우 보증이 성공한 것으로 판단하고, 상이한 경우 보증이 실패한 것으로 판단할 수 있다. 상기 다른 실시 예에서, 제2 블록체인 노드(420)는 상기 판단 결과를 포함하는 보증 데이터를 제1 블록체인 노드(410)로 전송(654)할 수 있다. According to various embodiments, a guarantee operation for a transaction may be performed through various methods. According to another example, the second blockchain node 420 may obtain a guarantee request 651 from the first blockchain node 410 . At this time, the guarantee request 651 may include first output data. The second blockchain node 420 may execute (653) a second smart contract for the transaction in response to the guarantee request (651). In addition, the second blockchain node 420 may compare at least a portion of the first output data acquired from the first blockchain node 410 with at least a portion of the second output data. As a result of the comparison, the second blockchain node 420 may determine that the guarantee has succeeded when the first output data and the second output data are the same, and may determine that the guarantee has failed when they are different. In the other embodiment, the second blockchain node 420 may transmit (654) guarantee data including the determination result to the first blockchain node 410.

또한, 상기 제3 블록체인 노드(430)는 상기 제1 블록체인 노드(410)로부터 보증 요청(652)을 획득할 수 있다. 이때, 상기 보증 요청(652)은 제1 출력 데이터를 포함할 수 있다. 제3 블록체인 노드(430)는 상기 보증 요청(652)에 응답하여, 트랜잭션에 대한 제3 스마트 컨트랙트를 실행(656)할 수 있다. 또한, 제3 블록체인 노드(430)는 제1 블록체인 노드(410)로부터 획득한 제1 출력 데이터 중에서 적어도 일부와 제3 출력 데이터 중에서 적어도 일부를 비교할 수 있다. 비교 결과, 제3 블록체인 노드(430)는 제1 출력 데이터 및 제3 출력 데이터가 동일한 경우 보증이 성공한 것으로 판단하고, 상이한 경우 보증이 실패한 것으로 판단할 수 있다. 상기 다른 실시 예에서, 제3 블록체인 노드(430)는 상기 판단 결과를 포함하는 보증 데이터를 제1 블록체인 노드(410)로 전송(657)할 수 있다. Also, the third blockchain node 430 may obtain a guarantee request 652 from the first blockchain node 410 . In this case, the guarantee request 652 may include first output data. The third blockchain node 430 may execute 656 a third smart contract for the transaction in response to the guarantee request 652 . In addition, the third blockchain node 430 may compare at least some of the first output data acquired from the first blockchain node 410 with at least some of the third output data. As a result of the comparison, the third blockchain node 430 may determine that the guarantee has succeeded when the first output data and the third output data are the same, and may determine that the guarantee has failed when they are different. In the other embodiment, the third blockchain node 430 may transmit (657) guarantee data including the determination result to the first blockchain node 410.

상기 다른 실시 예의 경우, 제1 블록체인 노드(410)는 동작 659를 생략하고 제2 블록체인 노드(420)로부터 수신된 보증 데이터 및 제3 블록체인 노드(430)로부터 수신된 보증 데이터에 기반하여 보증이 성공한 것으로 판단되는 경우 제4 블록체인 노드(610)로 트랜잭션 데이터를 포함하는 블록의 생성을 요청(660)할 수 있다.In the case of the other embodiment, the first blockchain node 410 omits operation 659 and based on the guarantee data received from the second blockchain node 420 and the guarantee data received from the third blockchain node 430 If it is determined that the guarantee is successful, the fourth blockchain node 610 may be requested to generate a block including transaction data (660).

일 실시 예에 따르면, 제1 블록체인 노드(410)는 상기 보증 동작의 결과에 대한 정보를 제1 블록체인 노드(410)에 포함된 디스플레이(예: 도 1의 디스플레이(140))를 통해 표시할 수 있다. 예를 들어, 상기 보증 동작의 실패 시, 제1 블록체인 노드(410)는 트랜잭션 수행을 중지하고 실패 알림을 제공할 수 있다. 다른 예를 들어, 제1 블록체인 노드(410)는 상기 보증 동작의 성공 시, 트랜잭션 수행의 성공에 대한 알림을 제공할 수 있다.According to an embodiment, the first blockchain node 410 displays information about the result of the guarantee operation through a display included in the first blockchain node 410 (eg, the display 140 of FIG. 1). can do. For example, upon failure of the guarantee operation, the first blockchain node 410 may stop performing the transaction and provide a failure notification. For another example, the first block chain node 410 may provide a notification of the success of the transaction when the guarantee operation succeeds.

일 실시 예에 따르면, 제1 블록체인 노드(410)는 제4 블록체인 노드(610)로 트랜잭션 데이터를 포함하는 블록의 생성을 요청(660)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 트랜잭션에 대한 합의가 완료됨에 따라 트랜잭션에 대한 블록의 생성을 요청할 수 있다. 제1 블록체인 노드(410)는 트랜잭션에 대한 블록을 생성하기 위해 필요한 다양한 데이터(예: 입력 데이터, 제1 출력 데이터)를 포함하는 트랜잭션 데이터를 제4 블록체인 노드(610)로 전송할 수 있다.According to one embodiment, the first blockchain node 410 may request 660 the creation of a block including transaction data to the fourth blockchain node 610 . For example, the first blockchain node 410 may request generation of a block for a transaction as consensus on the transaction is completed. The first blockchain node 410 may transmit transaction data including various data (eg, input data, first output data) required to generate a block for a transaction to the fourth blockchain node 610 .

일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션에 대한 보증이 완료됨에 따라 데이터 서버(510)로 공유 원장의 삭제를 요청(661)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 트랜잭션에 대한 보증이 완료됨에 따라 데이터 서버(510)의 데이터 베이스에 생성된 공유 원장을 삭제할 것을 요청할 수 있다. 데이터 서버(510)는 상기 요청(661)에 응답하여 공유 원장을 삭제(662)할 수 있다. 따라서, 블록체인 네트워크에서 트랜잭션의 생성에 기반하여 트랜잭션에 대한 공유 원장은 일시적으로 생성 되었다가 삭제될 수 있다.According to an embodiment, the first block chain node 410 may request 661 to delete the shared ledger to the data server 510 as the guarantee for the transaction is completed. For example, the first blockchain node 410 may request deletion of the shared ledger generated in the database of the data server 510 as the transaction guarantee is completed. The data server 510 may delete the shared ledger (662) in response to the request (661). Therefore, based on the creation of a transaction in a blockchain network, a shared ledger for a transaction can be temporarily created and then deleted.

일 실시 예에 따르면, 제4 블록체인 노드(610)는 상기 요청(660)에 응답하여 상기 트랜잭션 데이터를 블록 확정 큐(queue)에 저장할 수 있다. 다양한 실시 예들에 따라, 제4 블록체인 노드(610)는 큐에 한정되지 않고 다양한 자료 구조 중에서 하나를 이용하여 트랜잭션 데이터를 저장할 수 있다. 일 실시 예에 따르면, 제4 블록체인 노드(610)는 블록 확정 큐에 저장된 순서대로 선입선출 방식으로 블록 생성(663) 동작을 수행할 수 있다. 상기 블록 생성 동작은 오더링(ordering)으로 표현될 수 있다. 일 실시 예에 따르면, 제4 블록체인 노드(610)는 블록 확정 큐에 저장된 순서에 기초하여 생성 요청된 블록을 검증할 수 있다. 예를 들어, 제4 블록체인 노드(610)는 블록 확정 큐에 저장된 순서에 따라 트랜잭션 데이터에 기초한 블록을 생성하고, 블록에 대한 합의 동작을 수행할 수 있다. 일 실시 예에 따르면, 블록에 대한 합의 동작은 다양한 합의 알고리즘에 기초하여 수행될 수 있다. 예를 들어, proof of work(POW), proof of stake(POS), PBFT, RAFT에 기초하여 블록체인 네트워크에 포함된 순서 결정 노드들과 트랜잭션 합의를 수행할 수 있다.According to one embodiment, the fourth blockchain node 610 may store the transaction data in a block confirmation queue in response to the request 660 . According to various embodiments, the fourth blockchain node 610 may store transaction data using one of various data structures without being limited to a queue. According to an embodiment, the fourth blockchain node 610 may perform block generation operation 663 in a first-in-first-out manner in the order stored in the block confirmation queue. The block generating operation may be expressed as an ordering. According to one embodiment, the fourth blockchain node 610 may verify the block requested to be created based on the order stored in the block confirmation queue. For example, the fourth blockchain node 610 may generate a block based on the transaction data according to the order stored in the block confirmation queue and perform a consensus operation on the block. According to an embodiment, a consensus operation on a block may be performed based on various consensus algorithms. For example, based on proof of work (POW), proof of stake (POS), PBFT, and RAFT, it is possible to perform transaction agreement with order decision nodes included in the blockchain network.

일 실시 예에 따르면, 제4 블록체인 노드(610)는 블록이 생성됨에 따라 생성된 블록을 검증 완료된 블록으로 확정하고, 블록체인 네트워크에 포함된 전체 원장의 블록체인에 말단 노드로 연결할 수 있다. 또한, 제4 블록체인 노드(610)는 확정된 블록에 기초하여 부분 원장의 업데이트를 요청할 수 있다. 일 실시 예에 따르면, 제4 블록체인 노드(610)는 블록에 대한 트랜잭션의 합의에 참여한 블록체인 노드들로 블록에 대한 업데이트를 요청할 수 있다. 예를 들어, 제4 블록체인 노드(610)는 제3 블록체인 노드(430)로 부분 원장 업데이트를 요청(664)할 수 있다. 이와 유사하게, 제4 블록체인 노드(610)는 제2 블록체인 노드(420)로 부분 원장 업데이트를 요청(665)하고, 제1 블록체인 노드(410)로 부분 원장 업데이트를 요청(666)할 수 있다.According to an embodiment, the fourth block chain node 610 may determine a block generated as a block is generated as a block that has been verified, and connect it to the block chain of the entire ledger included in the block chain network as an end node. In addition, the fourth blockchain node 610 may request an update of the partial ledger based on the confirmed block. According to an embodiment, the fourth blockchain node 610 may request an update on a block from blockchain nodes participating in the agreement of the transaction on the block. For example, the fourth blockchain node 610 may request 664 a partial ledger update from the third blockchain node 430 . Similarly, the fourth blockchain node 610 requests 665 a partial ledger update from the second blockchain node 420 and requests 666 a partial ledger update from the first blockchain node 410. can

일 실시 예에 따르면, 상기 부분 원장 업데이트 요청들(664, 665, 666)에 기초하여 제1 내지 제3 블록체인 노드들(410, 420, 430)은 각각의 부분 원장을 업데이트 할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 부분 원장을 업데이트(667)할 수 있다. 예를 들어, 제1 블록체인 노드(410)는 트랜잭션에 기초하여 생성된 제1 출력 데이터를 상태 데이터베이스(예: 도 2의 상태 데이터베이스(222))에 저장하고, 생성된 블록을 블록체인(예: 도 2의 블록체인(221))의 말단 블록으로 연결할 수 있다. 일 실시 예에 따르면, 제1 블록체인 노드(410)는 트랜잭션의 생성이 완료됨에 기반하여 암호키를 파기할 수 있다.According to an embodiment, based on the partial ledger update requests 664 , 665 , and 666 , the first to third blockchain nodes 410 , 420 , and 430 may update respective partial ledgers. For example, the first blockchain node 410 may update 667 the partial ledger. For example, the first blockchain node 410 stores the first output data generated based on the transaction in a state database (eg, the state database 222 of FIG. 2), and stores the generated block in a blockchain (eg : It can be connected to the terminal block of the block chain 221 of FIG. 2). According to one embodiment, the first blockchain node 410 may destroy the encryption key based on the completion of the generation of the transaction.

도 7은 일 실시 예에 따른 전자 장치가 데이터 서버를 이용하여 스마트 컨트랙트를 실행하는 동작을 설명하기 위한 흐름도(700)이다.7 is a flowchart 700 for explaining an operation of executing a smart contract by an electronic device using a data server according to an embodiment.

이하 도 3 내지 도 6을 참조하여 설명된 동작과 유사한 동작의 중복되는 설명은 생략될 수 있다.Redundant descriptions of operations similar to those described with reference to FIGS. 3 to 6 may be omitted.

도 7을 참조하면, 전자 장치(100)(예: 제1 블록체인 노드(410))는 동작 701에서 트랜잭션의 생성 요청을 획득함에 응답하여 트랜잭션에 대응되는 암호키를 생성할 수 있다. 일 실시 예에 따르면, 전자 장치(100)의 프로세서(130)(예: 블록체인 프로세서(230))는 전자 장치(100)의 사용자 및/또는 메모리(110)에 저장된 다른 어플리케이션으로부터 트랜잭션의 생성 요청을 획득하고, 이에 기반하여 트랜잭션에 대응되는 암호키를 생성할 수 있다. 일 실시 예에서, 상기 암호키는 트랜잭션에 고유한 암호키를 나타낼 수 있다. 따라서, 복수 개의 트랜잭션이 생성되는 경우, 각각에 대응되는 암호키는 서로 상이할 수 있다.Referring to FIG. 7 , the electronic device 100 (eg, the first blockchain node 410) may generate an encryption key corresponding to the transaction in response to obtaining a transaction generation request in operation 701. According to an embodiment, the processor 130 (eg, the blockchain processor 230) of the electronic device 100 requests the creation of a transaction from the user of the electronic device 100 and/or another application stored in the memory 110. , and based on this, an encryption key corresponding to the transaction may be generated. In one embodiment, the cryptographic key may indicate a cryptographic key unique to the transaction. Accordingly, when a plurality of transactions are generated, encryption keys corresponding to each may be different from each other.

일 실시 예에 따르면, 전자 장치(100)는 동작 703에서 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 암호키에 대한 정보를 전달할 수 있다. 예를 들어, 전자 장치(100)는 블록체인 네트워크(예: 도 3의 블록체인 네트워크(300))에 포함된 블록체인 노드들 중에서 생성 요청된 트랜잭션에 관련된 적어도 하나의 블록체인 노드(예: 제2 블록체인 노드(420) 및/또는 제3 블록체인 노드(430))로 암호키에 대한 정보를 전달할 수 있다. 일 실시 예에서, 암호키에 대한 정보는 암호키를 유도할 수 있는 종자 값(root-seed) 또는 암호키의 적어도 일부를 포함할 수 있다.According to an embodiment, the electronic device 100 may transmit information about the encryption key to at least one blockchain node related to the transaction in operation 703. For example, the electronic device 100 may include at least one blockchain node (eg, the first blockchain node) related to a transaction requested to be created among blockchain nodes included in a blockchain network (eg, the blockchain network 300 of FIG. 3 ). Information on the encryption key may be transmitted to the second blockchain node 420 and/or the third blockchain node 430. In one embodiment, the information on the encryption key may include a root-seed from which the encryption key can be derived or at least a part of the encryption key.

일 실시 예에 따르면, 전자 장치(100)는 동작 705에서 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터(예: 읽기-집합) 중에서 부분 원장(220)에 저장된 제1 데이터를 암호키에 기반하여 암호화할 수 있다. 예를 들어, 전자 장치(100)는 입력 데이터 중에서 상태 데이터베이스(222)에 저장된 제1 데이터를 식별하고, 상기 제1 데이터를 비대칭 암호화 알고리즘에 기반하여 암호키로 암호화할 수 있다.According to an embodiment, in operation 705, the electronic device 100 converts first data stored in the partial ledger 220 among input data (eg, read-set) required to execute the first smart contract for the transaction as an encryption key. can be encrypted based on For example, the electronic device 100 may identify first data stored in the state database 222 among input data and encrypt the first data with an encryption key based on an asymmetric encryption algorithm.

일 실시 예에 따르면, 전자 장치(100)는 동작 707에서 제1 데이터를 암호화하여 블록체인 네트워크에 포함된 데이터 서버(예: 도 3의 데이터 서버(350))에 업로드 할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는, 데이터 서버에 저장된 트랜잭션에 대한 공유 원장에 상기 제1 데이터를 업로드할 수 있다.According to an embodiment, the electronic device 100 may encrypt the first data in operation 707 and upload the first data to a data server included in the blockchain network (eg, the data server 350 of FIG. 3 ). According to an embodiment, the electronic device 100 may upload the first data to a shared ledger for transactions stored in a data server.

일 실시 예에 따르면, 전자 장치(100)는 동작 709에서 데이터 서버로부터 암호키에 기반하여 암호화된 제2 데이터를 다운로드 할 수 있다. 일 실시 예에 따르면, 전자 장치(100)는 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터(예: 읽기-집합) 중에서 부분 원장(220)에 저장되지 않은 제2 데이터를 데이터 서버로부터 획득할 수 있다. 일 실시 예에 따르면, 암호키로 암호화된 제2 데이터는 블록체인 네트워크에 포함된 적어도 하나의 다른 블록체인 노드들을 통해 업로드된 데이터를 포함할 수 있다.According to an embodiment, the electronic device 100 may download second data encrypted based on the encryption key from the data server in operation 709 . According to an embodiment, the electronic device 100 may acquire second data not stored in the partial ledger 220 from the data server among input data (eg, read-set) required for execution of the first smart contract. there is. According to one embodiment, the second data encrypted with the encryption key may include data uploaded through at least one other blockchain node included in the blockchain network.

일 실시 예에 따르면, 전자 장치(100)는 동작 711에서 제2 데이터를 암호키에 기반하여 복호화할 수 있다. 예를 들어, 전자 장치(100)는 트랜잭션에 대한 암호키로 암호화된 상기 제2 데이터를 복호화할 수 있다.According to an embodiment, the electronic device 100 may decrypt the second data based on the encryption key in operation 711. For example, the electronic device 100 may decrypt the second data encrypted with the encryption key for the transaction.

일 실시 예에 따르면, 전자 장치(100)는 동작 713에서 제1 데이터 및 복호화된 제2 데이터에 기초하여 제1 스마트 컨트랙트를 실행할 수 있다. 예를 들어, 전자 장치(100)는 입력 데이터 중에서 부분 원장(220)에 저장된 데이터인 제1 데이터 및 부분 원장(220)에 저장되지 않아 데이터 서버로부터 획득한 제2 데이터에 기초하여 제1 스마트 컨트랙트를 실행할 수 있다. 일 실시 예에 따른 전자 장치(100)는 블록체인 네트워크의 전체 분산 원장이 아닌 부분 원장(220)을 저장함에 따라 스마트 컨트랙트의 실행에 요구되는 상태 데이터 중에서 일부를 저장하지 않을 수 있다. 따라서, 전자 장치(100)는 데이터 서버에 업로드된 입력 데이터를 이용하여 스마트 컨트랙트를 실행할 수 있다.According to an embodiment, the electronic device 100 may execute the first smart contract based on the first data and the decrypted second data in operation 713. For example, the electronic device 100 generates a first smart contract based on first data stored in the partial ledger 220 among input data and second data not stored in the partial ledger 220 and obtained from the data server. can run As the electronic device 100 according to an embodiment stores the partial ledger 220 rather than the entire distributed ledger of the blockchain network, it may not store some of the state data required for smart contract execution. Accordingly, the electronic device 100 may execute a smart contract using the input data uploaded to the data server.

일 실시 예에 따르면, 전자 장치(100)는 제1 스마트 컨트랙트를 실행함에 따라 생성되는 제1 출력 데이터 및 트랜잭션에 관련된 블록체인 노드들로부터 획득하는 보증 데이터에 기반하여 트랜잭션의 보증 동작을 완료할 수 있다.According to an embodiment, the electronic device 100 may complete a transaction guarantee operation based on first output data generated by executing the first smart contract and guarantee data obtained from blockchain nodes related to the transaction. there is.

도 8은 일 실시 예에 따른 전자 장치가 트랜잭션에 대한 보증을 수행하는 동작을 설명하기 위한 흐름도(800)이다.8 is a flowchart 800 illustrating an operation of performing a transaction guarantee by an electronic device according to an exemplary embodiment.

이하 도 3 내지 도 7을 참조하여 설명된 동작과 유사한 동작의 중복되는 설명은 생략될 수 있다.Redundant descriptions of operations similar to those described with reference to FIGS. 3 to 7 may be omitted.

도 8을 참조하면, 전자 장치(100)(예: 제1 블록체인 노드(410))는 동작 801에서 트랜잭션의 생성 요청을 획득함에 응답하여 트랜잭션에 대응되는 암호키를 생성할 수 있다.Referring to FIG. 8 , the electronic device 100 (eg, the first blockchain node 410) may generate an encryption key corresponding to the transaction in response to obtaining a transaction generation request in operation 801.

일 실시 예에 따르면, 전자 장치(100)는 동작 803에서 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 암호키에 대한 정보를 전달할 수 있다. According to an embodiment, in operation 803, the electronic device 100 may transmit information about the encryption key to at least one blockchain node related to the transaction.

일 실시 예에 따르면, 전자 장치(100)는 동작 805에서 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 부분 원장(220)에 저장된 제1 데이터를 암호키에 기반하여 암호화할 수 있다.According to an embodiment, in operation 805, the electronic device 100 may encrypt first data stored in the partial ledger 220 among input data required for execution of the first smart contract for the transaction based on the encryption key. .

일 실시 예에 따르면, 동작 807에서 전자 장치(100)는 암호화된 제1 데이터를, 블록체인 네트워크(예: 도 3의 블록체인 네트워크(300))의 공유 원장을 저장하고 적어도 하나의 블록체인 노드들이 접근할 수 있는 데이터 서버(예: 도 6의 데이터 서버(510))에 업로드 할 수 있다.According to an embodiment, in operation 807, the electronic device 100 stores the encrypted first data in a shared ledger of a blockchain network (eg, the blockchain network 300 of FIG. 3) and at least one blockchain node. It can be uploaded to a data server (eg, the data server 510 of FIG. 6) that can be accessed by others.

일 실시 예에 따르면, 동작 809에서, 전자 장치(100)는 적어도 하나의 블록체인 노드로 트랜잭션에 대한 보증 요청을 전송할 수 있다. 예를 들어, 전자 장치(100)는 생성 요청된 트랜잭션의 합의에 참여하는 블록체인 노드를 식별하고, 식별된 적어도 하나의 블록체인 노드(예: 도 6의 제2 블록체인 노드(420) 및/또는 제3 블록체인 노드(430))로 보증 요청을 전송할 수 있다.According to one embodiment, in operation 809, the electronic device 100 may transmit an assurance request for the transaction to at least one blockchain node. For example, the electronic device 100 identifies blockchain nodes participating in the consensus of the transaction requested for generation, and identifies at least one blockchain node (eg, the second blockchain node 420 of FIG. 6 and/or Alternatively, a guarantee request may be transmitted to the third blockchain node 430 .

일 실시 예에 따르면, 동작 811에서, 전자 장치(100)는 적어도 하나의 블록체인 노드로부터 보증 데이터를 획득할 수 있다. 예를 들어, 전자 장치(100)는 상기 보증 요청에 기반하여 적어도 하나의 블록체인 노드 각각에서 실행된 스마트 컨트랙트의 실행 결과인 출력 데이터 중에서 적어도 일부를 포함하는 보증 데이터를 획득할 수 있다. 일 실시 예에 따르면, 상기 적어도 하나의 블록체인 노드는 각각의 스마트 컨트랙트를 실행하기 위해, 상기 데이터 서버에 업로드된 데이터를 이용할 수 있다.According to an embodiment, in operation 811, the electronic device 100 may obtain guarantee data from at least one blockchain node. For example, the electronic device 100 may obtain guarantee data including at least a part of output data that is an execution result of a smart contract executed in each of at least one blockchain node based on the guarantee request. According to one embodiment, the at least one blockchain node may use data uploaded to the data server to execute each smart contract.

일 실시 예에 따르면, 전자 장치(100)는 동작 813에서 트랜잭션에 대한 보증을 수행할 수 있다. 예를 들어, 전자 장치(100)는 상기 보증 데이터 및 제1 스마트 컨트랙트의 실행에 따라 생성된 제1 출력 데이터에 기반하여 트랜잭션에 대한 보증을 수행할 수 있다. 예를 들어, 전자 장치(100)는 도 6을 참조하여 설명된 동작 659와 유사한 동작을 수행하여, 트랜잭션에 대한 보증을 수행할 수 있다.According to an embodiment, the electronic device 100 may perform a transaction guarantee in operation 813. For example, the electronic device 100 may perform a transaction guarantee based on the guarantee data and first output data generated according to execution of the first smart contract. For example, the electronic device 100 may perform an operation similar to operation 659 described with reference to FIG. 6 to guarantee the transaction.

일 실시 예에 따르면, 전자 장치(100)는 제1 스마트 컨트랙트의 실행에 요구되는 데이터 중에서 부분 원장(220)에 저장되지 않은 제2 데이터를 데이터 서버로부터 획득하고, 제1 데이터 및 제2 데이터에 기초하여 제1 스마트 컨트랙트를 실행할 수 있다. 예를 들어, 전자 장치(100)는 데이터 서버로부터 암호키에 기초하여 암호화된 제2 데이터를 다운로드하고, 제2 데이터를 암호키에 기반하여 복호화할 수 있다. 또한, 전자 장치(100)는 제1 데이터 및 복호화된 상기 제2 데이터에 기반하여 제1 스마트 컨트랙트를 실행할 수 있다. 전자 장치(100)는 제1 스마트 컨트랙트의 실행에 따라 생성되는 제1 출력 데이터에 기반하여 트랜잭션에 대한 보증을 수행할 수 있다.According to an embodiment, the electronic device 100 obtains second data not stored in the partial ledger 220 among data required for execution of the first smart contract from a data server, and assigns the first data and the second data to the second data. Based on this, the first smart contract can be executed. For example, the electronic device 100 may download the second data encrypted based on the encryption key from the data server and decrypt the second data based on the encryption key. In addition, the electronic device 100 may execute a first smart contract based on the first data and the decrypted second data. The electronic device 100 may perform a transaction guarantee based on the first output data generated according to the execution of the first smart contract.

일 실시 예에 따르면, 전자 장치(100)는 보증이 완료됨에 따라 블록 생성 노드(예: 제4 블록체인 노드(610))로 트랜잭션 데이터를 포함하는 블록의 생성을 요청하고, 블록 생성 요청에 응답하여 생성된 블록을 포함하는 업데이트 요청을 수신할 수 있다.According to an embodiment, upon completion of the guarantee, the electronic device 100 requests generation of a block including transaction data to a block generation node (eg, the fourth blockchain node 610), and responds to the block generation request. It is possible to receive an update request including the generated block.

일 실시 예에 따르면, 전자 장치(100)는 블록을 포함하는 업데이트 요청에 응답하여 생성된 블록 및 트랜잭션 데이터에 기반한 부분 원장(220)의 업데이트를 수행할 수 있다.According to an embodiment, the electronic device 100 may update the partial ledger 220 based on a block generated in response to an update request including a block and transaction data.

상술한 바와 같이, 일 실시 예에 따르면, 블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치(예: 도 1의 전자 장치(100))는, 상기 블록체인 네트워크와 통신하는 통신 회로(예: 도 1의 통신 회로(120)), 상기 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장(예: 도 2의 부분 원장(220))을 저장하는 메모리(예: 도 1의 메모리(110)) 및 상기 통신 회로 및 상기 메모리와 전기적으로 연결된 적어도 하나의 프로세서(예: 도 1의 프로세서(130))를 포함하고, 상기 적어도 하나의 프로세서는, 트랜잭션의 생성 요청을 획득함에 응답하여 상기 트랜잭션에 대응되는 암호키를 생성하고, 기 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하고, 상기 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 상기 부분 원장에 저장된 제1 데이터를 상기 암호키에 기반하여 암호화하고, 상기 제1 데이터를 암호화하여 상기 블록체인 네트워크에 포함된 데이터 서버에 업로드하고, 상기 데이터 서버로부터 상기 암호키에 기초하여 암호화된 제2 데이터를 다운로드하고, 상기 제2 데이터는 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 데이터이며, 상기 제2 데이터를 상기 암호키에 기반하여 복호화하고, 상기 제1 데이터 및 복호화된 상기 제2 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행할 수 있다. As described above, according to an embodiment, the electronic device constituting the first blockchain node included in the blockchain network (eg, the electronic device 100 of FIG. 1) is a communication circuit that communicates with the blockchain network. (Example: communication circuit 120 in FIG. 1), a memory for storing a partial ledger (eg, partial ledger 220 in FIG. 2) including a part of the entire distributed ledger for the blockchain network (eg, FIG. 1 A memory 110) and at least one processor (eg, the processor 130 of FIG. 1) electrically connected to the communication circuit and the memory, wherein the at least one processor obtains a request to create a transaction In response, an encryption key corresponding to the transaction is generated, information on the encryption key is transmitted to at least one blockchain node related to the previous transaction, and among the input data required for execution of the first smart contract for the transaction First data stored in the partial ledger is encrypted based on the encryption key, encrypted and uploaded to a data server included in the blockchain network, and encrypted based on the encryption key from the data server Download second data, the second data is data not stored in the partial ledger among the input data, decrypt the second data based on the encryption key, and decrypt the first data and the decrypted second data Based on the data, the first smart contract may be executed.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 제1 스마트 컨트랙트를 실행하여 제1 출력 데이터를 생성하고, 상기 트랜잭션에 관련된 제2 블록체인 노드로 상기 트랜잭션을 포함하는 보증 요청을 전송하고, 상기 보증 요청에 기초하여 제2 블록체인 노드로부터 생성된 제2 출력 데이터를 포함하는 보증 데이터를 상기 제2 블록체인 노드로부터 획득하고, 상기 제1 출력 데이터 및 상기 제2 출력 데이터에 기반하여 상기 트랜잭션에 대한 보증을 수행할 수 있다. According to an embodiment, the at least one processor executes the first smart contract to generate first output data, transmits a guarantee request including the transaction to a second blockchain node related to the transaction, Obtain guarantee data including second output data generated from a second blockchain node based on the guarantee request from the second blockchain node, and perform the transaction based on the first output data and the second output data. can provide a guarantee for

일 실시 예에 따르면, 상기 제2 출력 데이터는, 상기 제2 블록체인 노드가 상기 제2 블록체인 노드에 저장된 상기 트랜잭션에 대한 제2 스마트 컨트랙트를 실행하여 생성될 수 있다.According to an embodiment, the second output data may be generated by the second blockchain node executing a second smart contract for the transaction stored in the second blockchain node.

일 실시 예에 따르면, 암호화된 상기 제2 데이터는, 상기 제2 블록체인 노드가 상기 입력 데이터 중에서 상기 제2 블록체인 노드에 저장된 데이터를 상기 암호키에 대한 정보에 기반하여 암호화한 데이터를 포함할 수 있다. According to an embodiment, the encrypted second data may include data obtained by the second blockchain node encrypting data stored in the second blockchain node among the input data based on the information on the encryption key. can

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 입력 데이터 및 상기 제1 출력 데이터에 기초하여 트랜잭션 데이터를 생성하고, 상기 블록체인 네트워크에 포함된 제3 블록체인 노드로 상기 트랜잭션 데이터를 포함하는 블록의 생성을 요청하고, 상기 요청에 기초하여 생성된 블록을 포함하는 업데이트 요청을 상기 제3 블록체인 노드로부터 수신하고, 상기 업데이트 요청에 응답하여 상기 블록 및 상기 제1 출력 데이터에 기초한 상기 부분 원장을 저장할 수 있다. According to an embodiment, the at least one processor generates transaction data based on the input data and the first output data as the guarantee for the transaction is completed, and the third block included in the blockchain network. A chain node is requested to generate a block including the transaction data, an update request including a block generated based on the request is received from the third blockchain node, and the block and the block are received in response to the update request. The partial ledger based on the first output data may be stored.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는 상기 트랜잭션의 생성 요청에 응답하여 상기 데이터 서버에 상기 트랜잭션에 대한 공유 원장의 생성을 요청하고, 상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 데이터 서버에 포함된 상기 공유 원장의 삭제를 상기 데이터 서버로 요청하고, 상기 공유 원장은 상기 암호키에 기초하여 암호화된 상기 제1 데이터 및 상기 제2 데이터를 저장한 데이터베이스를 포함할 수 있다. According to an embodiment, the at least one processor requests the data server to create a shared ledger for the transaction in response to the transaction creation request, and includes the transaction in the data server as the guarantee for the transaction is completed. Deletion of the shared ledger may be requested to the data server, and the shared ledger may include a database storing the first data and the second data encrypted based on the encryption key.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 트랜잭션에 대한 보증이 완료됨에 응답하여 상기 암호키를 파기할 수 있다. According to an embodiment, the at least one processor may destroy the encryption key in response to completion of guarantee for the transaction.

일 실시 예에 따르면, 상기 부분 원장은, 상기 전자 장치가 합의에 참여한 적어도 하나의 트랜잭션에 상응하는 적어도 하나의 블록 및 상기 적어도 하나의 트랜잭션과 관련된 상태 데이터를 포함할 수 있다. According to an embodiment, the partial ledger may include at least one block corresponding to at least one transaction in which the electronic device participated in an agreement and state data related to the at least one transaction.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는 상기 데이터 서버로부터 상기 제2 데이터 중에서 적어도 일부가 업로드 되었음을 나타내는 알림을 획득하고, 상기 알림에 응답하여 상기 데이터 서버에 업로드된 상기 제2 데이터 중에서 적어도 일부를 다운로드할 수 있다. According to an embodiment, the at least one processor obtains a notification indicating that at least some of the second data has been uploaded from the data server, and in response to the notification, at least some of the second data uploaded to the data server. can be downloaded.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는 상기 암호키를 생성함에 응답하여 상기 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 상기 제2 데이터를 식별하고, 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 상기 제2 데이터를 상기 데이터 서버에 요청할 수 있다. According to an embodiment, the at least one processor identifies the second data not stored in the partial ledger among input data required for execution of the first smart contract in response to generating the encryption key, and the input data Among data, the second data not stored in the partial ledger may be requested from the data server.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 메모리에 저장된 상기 블록체인 네트워크에 포함된 블록체인 노드들에 대한 노드 정보 또는 상기 블록체인 네트워크에 포함된 상기 노드 정보를 관리하는 제4 블록체인 노드로부터 획득한 노드 정보에 기초하여 상기 적어도 하나의 블록체인 노드를 식별할 수 있다. According to an embodiment, the at least one processor is a fourth blockchain that manages node information about blockchain nodes included in the blockchain network stored in the memory or the node information included in the blockchain network. Based on the node information obtained from the node, the at least one blockchain node may be identified.

상술한 바와 같이, 블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치(예: 도 1의 전자 장치(100))의 동작 방법은, 트랜잭션의 생성 요청을 획득함에 응답하여 상기 트랜잭션에 대응되는 암호키를 생성하는 동작, 상기 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하는 동작, 상기 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 상기 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장에 저장된 데이터인 제1 데이터를 상기 암호키에 기반하여 암호화하는 동작, 암호화된 상기 제1 데이터를 상기 블록체인 네트워크에 포함된 데이터 서버에 업로드하는 동작, 상기 데이터 서버로부터 상기 암호키에 기초하여 암호화된 제2 데이터를 다운로드하는 동작, 상기 제2 데이터는 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 데이터이며, 상기 제2 데이터를 상기 암호키에 기반하여 복호화하는 동작 및 상기 제1 데이터 및 복호화된 상기 제2 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행하는 동작을 포함할 수 있다. As described above, the operating method of the electronic device constituting the first blockchain node included in the blockchain network (e.g., the electronic device 100 of FIG. 1), in response to obtaining a request for generating a transaction, An operation of generating a corresponding encryption key, an operation of transmitting information on the encryption key to at least one blockchain node related to the transaction, and the blockchain among input data required for execution of the first smart contract for the transaction. Encrypting first data, which is data stored in a partial ledger including a part of the entire distributed ledger for the network, based on the encryption key, and uploading the encrypted first data to a data server included in the blockchain network An operation of downloading second data encrypted based on the encryption key from the data server, wherein the second data is data not stored in the partial ledger among the input data, and the second data is stored in the encryption key. and an operation of executing the first smart contract based on the first data and the decrypted second data.

일 실시 예에 따르면, 상기 전자 장치의 동작 방법은, 상기 제1 스마트 컨트랙트를 실행하여 제1 출력 데이터를 생성하는 동작, 상기 트랜잭션에 관련된 제2 블록체인 노드로 상기 트랜잭션을 포함하는 보증 요청을 전송하는 동작, 상기 보증 요청에 기초하여 제2 블로체인 노드로부터 생성된 제2 출력 데이터를 포함하는 보증 데이터를 상기 제2 블록체인 노드로부터 획득하는 동작 및 상기 제1 출력 데이터 및 상기 제2 출력 데이터에 기반하여 상기 트랜잭션에 대한 보증을 수행하는 동작을 더 포함할 수 있다. According to an embodiment, the operating method of the electronic device includes generating first output data by executing the first smart contract, and transmitting an assurance request including the transaction to a second blockchain node related to the transaction. operation of obtaining, from the second blockchain node, guarantee data including second output data generated from the second blockchain node based on the guarantee request, and the first output data and the second output data Based on the above, an operation of performing a guarantee for the transaction may be further included.

일 실시 예에 따르면, 상기 전자 장치의 동작 방법은 상기 트랜잭션의 생성 요청에 응답하여 상기 데이터 서버에 상기 트랜잭션에 대한 공유 원장의 생성을 요청하는 동작, 상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 데이터 서버에 포함된 상기 공유 원장의 삭제를 상기 데이터 서버로 요청하는 동작을 더 포함하고, 상기 공유 원장은 상기 암호키에 기초하여 암호화된 상기 제1 데이터 및 상기 제2 데이터를 저장할 수 있다. According to an embodiment, the operating method of the electronic device may include requesting the data server to create a shared ledger for the transaction in response to the transaction creation request, and the data server when the guarantee for the transaction is completed. Further comprising requesting the data server to delete the shared ledger included in , wherein the shared ledger may store the first data and the second data encrypted based on the encryption key.

일 실시 예에 따르면, 상기 보증을 수행하는 동작은 상기 암호키를 파기하는 동작을 포함할 수 있다. According to an embodiment, the operation of performing the guarantee may include an operation of destroying the encryption key.

일 실시 예에 따르면, 상기 제2 데이터를 다운로드하는 동작은, 상기 데이터 서버로부터 상기 제2 데이터 중에서 적어도 일부가 업로드 되었음을 나타내는 알림을 획득하는 동작 및 상기 알림에 응답하여 상기 데이터 서버에 업로드된 상기 제2 데이터 중에서 적어도 일부를 다운로드하는 동작을 포함할 수 있다. According to an embodiment, the downloading of the second data may include obtaining a notification indicating that at least a part of the second data has been uploaded from the data server, and the first data uploaded to the data server in response to the notification. 2 It may include an operation of downloading at least a part of the data.

일 실시 예에 따르면, 상기 암호키에 대한 정보를 전달하는 동작은 상기 전자 장치에 저장된 상기 블록체인 네트워크에 포함된 블록체인 노드들에 대한 노드 정보 또는 상기 블록체인 네트워크에 포함된 상기 노드 정보를 관리하는 블록체인 노드로부터 획득한 노드 정보에 기초하여 상기 적어도 하나의 블록체인 노드를 식별하는 동작 및 식별된 상기 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하는 동작을 포함하고, 상기 암호키에 대한 정보는 상기 암호키를 유도할 수 있는 종자 값 또는 상기 암호키 중 적어도 하나를 포함할 수 있다. According to an embodiment, the operation of transmitting the information about the encryption key manages node information about blockchain nodes included in the blockchain network stored in the electronic device or the node information included in the blockchain network. Identifying the at least one blockchain node based on node information obtained from a blockchain node and transmitting information about the encryption key to the identified at least one blockchain node, Information about the key may include at least one of a seed value from which the encryption key can be derived or the encryption key.

상술한 바와 같이, 블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치(예: 도 1의 전자 장치(100))는, 상기 블록체인 네트워크와 통신하는 통신 회로(예: 도 1의 통신 회로(120)), 상기 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장(예: 도 2의 부분 원장(220))을 저장하는 메모리(예: 도 1의 메모리(110)) 및 상기 통신 회로 및 상기 메모리와 전기적으로 연결된 적어도 하나의 프로세서(예: 도 1의 프로세서(130))를 포함하고, 상기 적어도 하나의 프로세서는, 트랜잭션의 생성 요청을 획득함에 응답하여 상기 트랜잭션에 대응되는 암호키를 생성하여 상기 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하고, 상기 트랜잭션에 대한 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 상기 부분 원장에 저장된 데이터인 제1 데이터를 상기 암호키에 기반하여 암호화하고, 암호화된 상기 제1 데이터를 상기 블록체인 네트워크의 데이터 서버에 업로드 하고, 상기 데이터 서버는 공유 원장을 저장하며, 상기 적어도 하나의 블록체인 노드로 상기 트랜잭션에 대한 보증 요청을 전송하고, 상기 보증 요청에 응답하여, 상기 데이터 서버에 저장된 공유 원장의 적어도 일부에 기반하여 상기 적어도 하나의 블록체인 노드의 각각에 저장된 상기 트랜잭션에 대한 스마트 컨트랙트를 각각 실행함에 따라 생성된 출력 데이터를 각각 포함하는 적어도 하나의 보증 데이터를 획득하고, 상기 적어도 하나의 블록체인 노드 각각으로부터 생성된 출력 데이터 및 상기 메모리에 저장된 상기 트랜잭션에 대한 제1 스마트 컨트랙트를 실행함에 따라 생성된 출력 데이터에 기초하여 상기 트랜잭션에 대한 보증을 수행할 수 있다. As described above, the electronic device constituting the first blockchain node included in the blockchain network (eg, the electronic device 100 of FIG. 1) is a communication circuit (eg, the electronic device 100 of FIG. Communication circuit 120), a memory (eg, memory 110 in FIG. 1) that stores a partial ledger (eg, partial ledger 220 in FIG. 2) including a part of the entire distributed ledger for the blockchain network and at least one processor (eg, the processor 130 of FIG. 1) electrically connected to the communication circuit and the memory, wherein the at least one processor responds to the transaction in response to obtaining a request to create a transaction. First, which is the data stored in the partial ledger, among the input data required for the execution of the smart contract for the transaction, generating an encryption key to transmit information on the encryption key to at least one blockchain node related to the transaction. Data is encrypted based on the encryption key, the encrypted first data is uploaded to a data server of the blockchain network, the data server stores a shared ledger, and the at least one blockchain node executes the transaction. Generated by transmitting a guarantee request for the guarantee request and, in response to the guarantee request, each executing a smart contract for the transaction stored in each of the at least one blockchain node based on at least a part of the shared ledger stored in the data server. At least one guarantee data each including the generated output data is obtained, and the output data generated from each of the at least one blockchain node and the output data generated by executing the first smart contract for the transaction stored in the memory It is possible to perform a guarantee for the transaction based on.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 데이터 서버로부터 상기 암호키에 기초하여 암호화된 제2 데이터를 다운로드 하고, 상기 제2 데이터는 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 데이터이며, 상기 제2 데이터를 상기 암호키에 기반하여 복호화하고, 상기 제1 데이터 및 복호화된 상기 제2 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행할 수 있다. According to an embodiment, the at least one processor downloads second data encrypted based on the encryption key from the data server, and the second data is data not stored in the partial ledger among the input data. , The second data can be decrypted based on the encryption key, and the first smart contract can be executed based on the first data and the decrypted second data.

일 실시 예에 따르면, 상기 적어도 하나의 프로세서는, 상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 입력 데이터 및 상기 제1 스마트 컨트랙트를 실행함에 따라 생성된 출력 데이터에 기초하여 트랜잭션 데이터를 생성하고, 상기 블록체인 네트워크에 포함된 블록 생성 노드로 상기 트랜잭션 데이터를 포함하는 블록의 생성을 요청하고, 상기 요청에 응답하여 생성된 블록을 포함하는 업데이트 요청을 상기 블록 생성 노드로부터 수신하고, 상기 업데이트 요청에 응답하여, 상기 블록 및 상기 트랜잭션 데이터에 기초한 상기 부분 원장의 업데이트를 수행할 수 있다. According to an embodiment, the at least one processor generates transaction data based on the input data and output data generated by executing the first smart contract as the guarantee for the transaction is completed, and the block Request generation of a block including the transaction data to a block generation node included in the chain network, receive an update request including a block generated in response to the request from the block generation node, and respond to the update request , it is possible to perform an update of the partial ledger based on the block and the transaction data.

도 9는 다양한 실시 예들에 따른 네트워크 환경(900) 내의 전자 장치(901)의 블록도이다. 도 9을 참조하면, 네트워크 환경(900)에서 전자 장치(901)는 제1 네트워크(998)(예: 근거리 무선 통신 네트워크)를 통하여 전자 장치(902)와 통신하거나, 또는 제2 네트워크(999)(예: 원거리 무선 통신 네트워크)를 통하여 전자 장치(904) 또는 서버(908)와 통신할 수 있다. 일 실시 예에 따르면, 전자 장치(901)는 서버(908)를 통하여 전자 장치(904)와 통신할 수 있다. 일 실시 예에 따르면, 전자 장치(901)는 프로세서(920), 메모리(930), 입력 모듈(950), 음향 출력 모듈(955), 디스플레이 모듈(960), 오디오 모듈(970), 센서 모듈(976), 인터페이스(977), 연결 단자(978), 햅틱 모듈(979), 카메라 모듈(980), 전력 관리 모듈(988), 배터리(989), 통신 모듈(990), 가입자 식별 모듈(996), 또는 안테나 모듈(997)을 포함할 수 있다. 어떤 실시 예에서는, 전자 장치(901)에는 이 구성요소들 중 적어도 하나(예: 연결 단자(978))가 생략되거나, 하나 이상의 다른 구성요소가 추가될 수 있다. 어떤 실시 예에서는, 이 구성요소들 중 일부들(예: 센서 모듈(976), 카메라 모듈(980), 또는 안테나 모듈(997))은 하나의 구성요소(예: 디스플레이 모듈(960))로 통합될 수 있다.9 is a block diagram of an electronic device 901 within a network environment 900 according to various embodiments. Referring to FIG. 9 , in a network environment 900, an electronic device 901 communicates with an electronic device 902 through a first network 998 (eg, a short-range wireless communication network) or through a second network 999. It may communicate with the electronic device 904 or the server 908 through (eg, a long-distance wireless communication network). According to an embodiment, the electronic device 901 may communicate with the electronic device 904 through the server 908 . According to an embodiment, the electronic device 901 includes a processor 920, a memory 930, an input module 950, a sound output module 955, a display module 960, an audio module 970, a sensor module ( 976), interface 977, connection terminal 978, haptic module 979, camera module 980, power management module 988, battery 989, communication module 990, subscriber identification module 996 , or an antenna module 997. In some embodiments, in the electronic device 901, at least one of these components (eg, the connection terminal 978) may be omitted or one or more other components may be added. In some embodiments, some of these components (eg, sensor module 976, camera module 980, or antenna module 997) are integrated into a single component (eg, display module 960). It can be.

프로세서(920)는, 예를 들면, 소프트웨어(예: 프로그램(940))를 실행하여 프로세서(920)에 연결된 전자 장치(901)의 적어도 하나의 다른 구성요소(예: 하드웨어 또는 소프트웨어 구성요소)를 제어할 수 있고, 다양한 데이터 처리 또는 연산을 수행할 수 있다. 일 실시 예에 따르면, 데이터 처리 또는 연산의 적어도 일부로서, 프로세서(920)는 다른 구성요소(예: 센서 모듈(976) 또는 통신 모듈(990))로부터 수신된 명령 또는 데이터를 휘발성 메모리(932)에 저장하고, 휘발성 메모리(932)에 저장된 명령 또는 데이터를 처리하고, 결과 데이터를 비휘발성 메모리(934)에 저장할 수 있다. 일 실시 예에 따르면, 프로세서(920)는 메인 프로세서(921)(예: 중앙 처리 장치 또는 어플리케이션 프로세서) 또는 이와는 독립적으로 또는 함께 운영 가능한 보조 프로세서(923)(예: 그래픽 처리 장치, 신경망 처리 장치(NPU: neural processing unit), 이미지 시그널 프로세서, 센서 허브 프로세서, 또는 커뮤니케이션 프로세서)를 포함할 수 있다. 예를 들어, 전자 장치(901)가 메인 프로세서(921) 및 보조 프로세서(923)를 포함하는 경우, 보조 프로세서(923)는 메인 프로세서(921)보다 저전력을 사용하거나, 지정된 기능에 특화되도록 설정될 수 있다. 보조 프로세서(923)는 메인 프로세서(921)와 별개로, 또는 그 일부로서 구현될 수 있다.The processor 920, for example, executes software (eg, the program 940) to cause at least one other component (eg, hardware or software component) of the electronic device 901 connected to the processor 920. 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 920 transfers instructions or data received from other components (eg, sensor module 976 or communication module 990) to volatile memory 932. , processing commands or data stored in the volatile memory 932 , and storing resultant data in the non-volatile memory 934 . According to an embodiment, the processor 920 may include a main processor 921 (eg, a central processing unit or an application processor) or a secondary processor 923 (eg, a graphic processing unit, a neural network processing unit (eg, a graphic processing unit, a neural network processing unit) that may operate independently of or together with the main processor 921). NPU: neural processing unit (NPU), image signal processor, sensor hub processor, or communication processor). For example, when the electronic device 901 includes a main processor 921 and an auxiliary processor 923, the auxiliary processor 923 may use less power than the main processor 921 or be set to be specialized for a designated function. can The auxiliary processor 923 may be implemented separately from or as part of the main processor 921 .

보조 프로세서(923)는, 예를 들면, 메인 프로세서(921)가 인액티브(예: 슬립) 상태에 있는 동안 메인 프로세서(921)를 대신하여, 또는 메인 프로세서(921)가 액티브(예: 어플리케이션 실행) 상태에 있는 동안 메인 프로세서(921)와 함께, 전자 장치(901)의 구성요소들 중 적어도 하나의 구성요소(예: 디스플레이 모듈(960), 센서 모듈(976), 또는 통신 모듈(990))와 관련된 기능 또는 상태들의 적어도 일부를 제어할 수 있다. 일 실시 예에 따르면, 보조 프로세서(923)(예: 이미지 시그널 프로세서 또는 커뮤니케이션 프로세서)는 기능적으로 관련 있는 다른 구성요소(예: 카메라 모듈(980) 또는 통신 모듈(990))의 일부로서 구현될 수 있다. 일 실시 예에 따르면, 보조 프로세서(923)(예: 신경망 처리 장치)는 인공지능 모델의 처리에 특화된 하드웨어 구조를 포함할 수 있다. 인공지능 모델은 기계 학습을 통해 생성될 수 있다. 이러한 학습은, 예를 들어, 인공지능이 수행되는 전자 장치(901) 자체에서 수행될 수 있고, 별도의 서버(예: 서버(908))를 통해 수행될 수도 있다. 학습 알고리즘은, 예를 들어, 지도형 학습(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) 또는 상기 중 둘 이상의 조합 중 하나일 수 있으나, 전술한 예에 한정되지 않는다. 인공지능 모델은 하드웨어 구조 이외에, 추가적으로 또는 대체적으로, 소프트웨어 구조를 포함할 수 있다. The secondary processor 923 may, for example, take the place of the main processor 921 while the main processor 921 is in an inactive (eg, sleep) state, or the main processor 921 is active (eg, running an application). ) state, together with the main processor 921, at least one of the components of the electronic device 901 (eg, the display module 960, the sensor module 976, or the communication module 990) It is possible to control at least some of the related functions or states. According to an embodiment, the auxiliary processor 923 (eg, an image signal processor or a communication processor) may be implemented as part of other functionally related components (eg, the camera module 980 or the communication module 990). there is. According to an embodiment, the auxiliary processor 923 (eg, a neural network processing device) 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 901 itself where artificial intelligence is performed, or may be performed through a separate server (eg, the server 908). 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.

메모리(930)는, 전자 장치(901)의 적어도 하나의 구성요소(예: 프로세서(920) 또는 센서 모듈(976))에 의해 사용되는 다양한 데이터를 저장할 수 있다. 데이터는, 예를 들어, 소프트웨어(예: 프로그램(940)) 및, 이와 관련된 명령에 대한 입력 데이터 또는 출력 데이터를 포함할 수 있다. 메모리(930)는, 휘발성 메모리(932) 또는 비휘발성 메모리(934)를 포함할 수 있다. The memory 930 may store various data used by at least one component (eg, the processor 920 or the sensor module 976) of the electronic device 901 . The data may include, for example, input data or output data for software (eg, the program 940) and commands related thereto. The memory 930 may include volatile memory 932 or non-volatile memory 934 .

프로그램(940)은 메모리(930)에 소프트웨어로서 저장될 수 있으며, 예를 들면, 운영 체제(942), 미들 웨어(944) 또는 어플리케이션(946)을 포함할 수 있다. The program 940 may be stored as software in the memory 930 and may include, for example, an operating system 942 , middleware 944 , or an application 946 .

입력 모듈(950)은, 전자 장치(901)의 구성요소(예: 프로세서(920))에 사용될 명령 또는 데이터를 전자 장치(901)의 외부(예: 사용자)로부터 수신할 수 있다. 입력 모듈(950)은, 예를 들면, 마이크, 마우스, 키보드, 키(예: 버튼), 또는 디지털 펜(예: 스타일러스 펜)을 포함할 수 있다. The input module 950 may receive a command or data to be used by a component (eg, the processor 920) of the electronic device 901 from the outside of the electronic device 901 (eg, a user). The input module 950 may include, for example, a microphone, a mouse, a keyboard, a key (eg, a button), or a digital pen (eg, a stylus pen).

음향 출력 모듈(955)은 음향 신호를 전자 장치(901)의 외부로 출력할 수 있다. 음향 출력 모듈(955)은, 예를 들면, 스피커 또는 리시버를 포함할 수 있다. 스피커는 멀티미디어 재생 또는 녹음 재생과 같이 일반적인 용도로 사용될 수 있다. 리시버는 착신 전화를 수신하기 위해 사용될 수 있다. 일 실시 예에 따르면, 리시버는 스피커와 별개로, 또는 그 일부로서 구현될 수 있다.The sound output module 955 may output sound signals to the outside of the electronic device 901 . The sound output module 955 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.

디스플레이 모듈(960)은 전자 장치(901)의 외부(예: 사용자)로 정보를 시각적으로 제공할 수 있다. 디스플레이 모듈(960)은, 예를 들면, 디스플레이, 홀로그램 장치, 또는 프로젝터 및 해당 장치를 제어하기 위한 제어 회로를 포함할 수 있다. 일 실시 예에 따르면, 디스플레이 모듈(960)은 터치를 감지하도록 설정된 터치 센서, 또는 상기 터치에 의해 발생되는 힘의 세기를 측정하도록 설정된 압력 센서를 포함할 수 있다. The display module 960 may visually provide information to the outside of the electronic device 901 (eg, a user). The display module 960 may include, for example, a display, a hologram device, or a projector and a control circuit for controlling the device. According to an embodiment, the display module 960 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.

오디오 모듈(970)은 소리를 전기 신호로 변환시키거나, 반대로 전기 신호를 소리로 변환시킬 수 있다. 일 실시 예에 따르면, 오디오 모듈(970)은, 입력 모듈(950)을 통해 소리를 획득하거나, 음향 출력 모듈(955), 또는 전자 장치(901)와 직접 또는 무선으로 연결된 외부 전자 장치(예: 전자 장치(902))(예: 스피커 또는 헤드폰)를 통해 소리를 출력할 수 있다.The audio module 970 may convert sound into an electrical signal or vice versa. According to an embodiment, the audio module 970 acquires sound through the input module 950, the sound output module 955, or an external electronic device connected directly or wirelessly to the electronic device 901 (eg: Sound may be output through the electronic device 902 (eg, a speaker or a headphone).

센서 모듈(976)은 전자 장치(901)의 작동 상태(예: 전력 또는 온도), 또는 외부의 환경 상태(예: 사용자 상태)를 감지하고, 감지된 상태에 대응하는 전기 신호 또는 데이터 값을 생성할 수 있다. 일 실시 예에 따르면, 센서 모듈(976)은, 예를 들면, 제스처 센서, 자이로 센서, 기압 센서, 마그네틱 센서, 가속도 센서, 그립 센서, 근접 센서, 컬러 센서, IR(infrared) 센서, 생체 센서, 온도 센서, 습도 센서, 또는 조도 센서를 포함할 수 있다. The sensor module 976 detects an operating state (eg, power or temperature) of the electronic device 901 or an external environmental state (eg, a user state), and generates an electrical signal or data value corresponding to the detected state. can do. According to one embodiment, the sensor module 976 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 infrared (IR) sensor, a bio sensor, It may include a temperature sensor, humidity sensor, or light sensor.

인터페이스(977)는 전자 장치(901)가 외부 전자 장치(예: 전자 장치(902))와 직접 또는 무선으로 연결되기 위해 사용될 수 있는 하나 이상의 지정된 프로토콜들을 지원할 수 있다. 일 실시 예에 따르면, 인터페이스(977)는, 예를 들면, HDMI(high definition multimedia interface), USB(universal serial bus) 인터페이스, SD카드 인터페이스, 또는 오디오 인터페이스를 포함할 수 있다.The interface 977 may support one or more specified protocols that may be used to directly or wirelessly connect the electronic device 901 to an external electronic device (eg, the electronic device 902). According to one embodiment, the interface 977 may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.

연결 단자(978)는, 그를 통해서 전자 장치(901)가 외부 전자 장치(예: 전자 장치(902))와 물리적으로 연결될 수 있는 커넥터를 포함할 수 있다. 일 실시 예에 따르면, 연결 단자(978)는, 예를 들면, HDMI 커넥터, USB 커넥터, SD 카드 커넥터, 또는 오디오 커넥터(예: 헤드폰 커넥터)를 포함할 수 있다.The connection terminal 978 may include a connector through which the electronic device 901 may be physically connected to an external electronic device (eg, the electronic device 902). According to one embodiment, the connection terminal 978 may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (eg, a headphone connector).

햅틱 모듈(979)은 전기적 신호를 사용자가 촉각 또는 운동 감각을 통해서 인지할 수 있는 기계적인 자극(예: 진동 또는 움직임) 또는 전기적인 자극으로 변환할 수 있다. 일 실시 예에 따르면, 햅틱 모듈(979)은, 예를 들면, 모터, 압전 소자, 또는 전기 자극 장치를 포함할 수 있다.The haptic module 979 may convert electrical signals into mechanical stimuli (eg, vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic senses. According to one embodiment, the haptic module 979 may include, for example, a motor, a piezoelectric element, or an electrical stimulation device.

카메라 모듈(980)은 정지 영상 및 동영상을 촬영할 수 있다. 일 실시 예에 따르면, 카메라 모듈(980)은 하나 이상의 렌즈들, 이미지 센서들, 이미지 시그널 프로세서들, 또는 플래시들을 포함할 수 있다.The camera module 980 may capture still images and moving images. According to one embodiment, the camera module 980 may include one or more lenses, image sensors, image signal processors, or flashes.

전력 관리 모듈(988)은 전자 장치(901)에 공급되는 전력을 관리할 수 있다. 일 실시 예에 따르면, 전력 관리 모듈(988)은, 예를 들면, PMIC(power management integrated circuit)의 적어도 일부로서 구현될 수 있다.The power management module 988 may manage power supplied to the electronic device 901 . According to one embodiment, the power management module 988 may be implemented as at least part of a power management integrated circuit (PMIC), for example.

배터리(989)는 전자 장치(901)의 적어도 하나의 구성요소에 전력을 공급할 수 있다. 일 실시 예에 따르면, 배터리(989)는, 예를 들면, 재충전 불가능한 1차 전지, 재충전 가능한 2차 전지 또는 연료 전지를 포함할 수 있다.The battery 989 may supply power to at least one component of the electronic device 901 . According to one embodiment, the battery 989 may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.

통신 모듈(990)은 전자 장치(901)와 외부 전자 장치(예: 전자 장치(902), 전자 장치(904), 또는 서버(908)) 간의 직접(예: 유선) 통신 채널 또는 무선 통신 채널의 수립, 및 수립된 통신 채널을 통한 통신 수행을 지원할 수 있다. 통신 모듈(990)은 프로세서(920)(예: 어플리케이션 프로세서)와 독립적으로 운영되고, 직접(예: 유선) 통신 또는 무선 통신을 지원하는 하나 이상의 커뮤니케이션 프로세서를 포함할 수 있다. 일 실시 예에 따르면, 통신 모듈(990)은 무선 통신 모듈(992)(예: 셀룰러 통신 모듈, 근거리 무선 통신 모듈, 또는 GNSS(global navigation satellite system) 통신 모듈) 또는 유선 통신 모듈(994)(예: LAN(local area network) 통신 모듈, 또는 전력선 통신 모듈)을 포함할 수 있다. 이들 통신 모듈 중 해당하는 통신 모듈은 제1 네트워크(998)(예: 블루투스, WiFi 다이렉트(wireless fidelity direct) 또는 IrDA(infrared data association)와 같은 근거리 통신 네트워크) 또는 제2 네트워크(999)(예: 레거시 셀룰러 네트워크, 5G 네트워크, 차세대 통신 네트워크, 인터넷, 또는 컴퓨터 네트워크(예: LAN 또는 WAN)와 같은 원거리 통신 네트워크)를 통하여 외부의 전자 장치(904)와 통신할 수 있다. 이런 여러 종류의 통신 모듈들은 하나의 구성요소(예: 단일 칩)로 통합되거나, 또는 서로 별도의 복수의 구성요소들(예: 복수 칩들)로 구현될 수 있다. 무선 통신 모듈(992)은 가입자 식별 모듈(996)에 저장된 가입자 정보(예: 국제 모바일 가입자 식별자(IMSI))를 이용하여 제1 네트워크(998) 또는 제2 네트워크(999)와 같은 통신 네트워크 내에서 전자 장치(901)를 확인 또는 인증할 수 있다. The communication module 990 is a direct (eg, wired) communication channel or a wireless communication channel between the electronic device 901 and an external electronic device (eg, the electronic device 902, the electronic device 904, or the server 908). Establishment and communication through the established communication channel may be supported. The communication module 990 may include one or more communication processors that operate independently of the processor 920 (eg, an application processor) and support direct (eg, wired) communication or wireless communication. According to one embodiment, the communication module 990 is a wireless communication module 992 (eg, a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module 994 (eg, : a local area network (LAN) communication module or a power line communication module). Among these communication modules, a corresponding communication module is a first network 998 (eg, a short-range communication network such as Bluetooth, wireless fidelity direct, or infrared data association (IrDA)) or a second network 999 (eg, It may communicate with the external electronic device 904 through a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a telecommunications network such as a computer network (eg, a LAN or a WAN). These various types of communication modules may be integrated as one component (eg, a single chip) or implemented as a plurality of separate components (eg, multiple chips). The wireless communication module 992 uses the subscriber information (eg, International Mobile Subscriber Identifier (IMSI)) stored in the subscriber identification module 996 within a communication network such as the first network 998 or the second network 999. The electronic device 901 may be identified or authenticated.

무선 통신 모듈(992)은 4G 네트워크 이후의 5G 네트워크 및 차세대 통신 기술, 예를 들어, NR 접속 기술(new radio access technology)을 지원할 수 있다. NR 접속 기술은 고용량 데이터의 고속 전송(eMBB(enhanced mobile broadband)), 단말 전력 최소화와 다수 단말의 접속(mMTC(massive machine type communications)), 또는 고신뢰도와 저지연(URLLC(ultra-reliable and low-latency communications))을 지원할 수 있다. 무선 통신 모듈(992)은, 예를 들어, 높은 데이터 전송률 달성을 위해, 고주파 대역(예: mmWave 대역)을 지원할 수 있다. 무선 통신 모듈(992)은 고주파 대역에서의 성능 확보를 위한 다양한 기술들, 예를 들어, 빔포밍(beamforming), 거대 배열 다중 입출력(massive MIMO(multiple-input and multiple-output)), 전차원 다중 입출력(FD-MIMO: full dimensional MIMO), 어레이 안테나(array antenna), 아날로그 빔포밍, 또는 대규모 안테나(large scale antenna)와 같은 기술들을 지원할 수 있다. 무선 통신 모듈(992)은 전자 장치(901), 외부 전자 장치(예: 전자 장치(904)) 또는 네트워크 시스템(예: 제2 네트워크(999))에 규정되는 다양한 요구사항을 지원할 수 있다. 일 실시 예에 따르면, 무선 통신 모듈(992)은 eMBB 실현을 위한 피크 데이터 레이트(peak data rate)(예: 20Gbps 이상), mMTC 실현을 위한 손실 커버리지(예: 164dB 이하), 또는 URLLC 실현을 위한 U-plane latency(예: 다운링크(DL) 및 업링크(UL) 각각 0.5ms 이하, 또는 라운드 트립 1ms 이하)를 지원할 수 있다.The wireless communication module 992 may support a 5G network after a 4G network and a next-generation communication technology, such as 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 992 may support a high frequency band (eg, mmWave band) to achieve a high data rate, for example. The wireless communication module 992 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 beamforming, or large scale antenna may be supported. The wireless communication module 992 may support various requirements defined for the electronic device 901, an external electronic device (eg, the electronic device 904), or a network system (eg, the second network 999). According to an embodiment, the wireless communication module 992 is configured to achieve peak data rate (eg, 20 Gbps or more) for realizing eMBB, loss coverage (eg, 164 dB or less) for realizing mMTC, or realizing URLLC. U-plane latency (eg, downlink (DL) and uplink (UL) 0.5 ms or less, or round trip 1 ms or less) can be supported.

안테나 모듈(997)은 신호 또는 전력을 외부(예: 외부의 전자 장치)로 송신하거나 외부로부터 수신할 수 있다. 일 실시 예에 따르면, 안테나 모듈(997)은 기판(예: PCB) 위에 형성된 도전체 또는 도전성 패턴으로 이루어진 방사체를 포함하는 안테나를 포함할 수 있다. 일 실시 예에 따르면, 안테나 모듈(997)은 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다. 이런 경우, 제1 네트워크(998) 또는 제2 네트워크(999)와 같은 통신 네트워크에서 사용되는 통신 방식에 적합한 적어도 하나의 안테나가, 예를 들면, 통신 모듈(990)에 의하여 상기 복수의 안테나들로부터 선택될 수 있다. 신호 또는 전력은 상기 선택된 적어도 하나의 안테나를 통하여 통신 모듈(990)과 외부의 전자 장치 간에 송신되거나 수신될 수 있다. 어떤 실시 예에 따르면, 방사체 이외에 다른 부품(예: RFIC(radio frequency integrated circuit))이 추가로 안테나 모듈(997)의 일부로 형성될 수 있다. 다양한 실시 예에 따르면, 안테나 모듈(997)은 mmWave 안테나 모듈을 형성할 수 있다. 일 실시 예에 따르면, mmWave 안테나 모듈은 인쇄 회로 기판, 상기 인쇄 회로 기판의 제1 면(예: 아래 면)에 또는 그에 인접하여 배치되고 지정된 고주파 대역(예: mmWave 대역)을 지원할 수 있는 RFIC, 및 상기 인쇄 회로 기판의 제2 면(예: 윗면 또는 측면)에 또는 그에 인접하여 배치되고 상기 지정된 고주파 대역의 신호를 송신 또는 수신할 수 있는 복수의 안테나들(예: 어레이 안테나)을 포함할 수 있다.The antenna module 997 may transmit or receive signals or power to the outside (eg, an external electronic device). According to an embodiment, the antenna module 997 may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (eg, PCB). According to an embodiment, the antenna module 997 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 998 or the second network 999 is selected from the plurality of antennas by, for example, the communication module 990. can be chosen A signal or power may be transmitted or received between the communication module 990 and an external electronic device through the selected at least one antenna. According to some embodiments, other components (eg, a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module 997 in addition to the radiator. According to various embodiments, the antenna module 997 may form a mmWave antenna module. According to one embodiment, 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. there is.

상기 구성요소들 중 적어도 일부는 주변 기기들간 통신 방식(예: 버스, GPIO(general purpose input and output), SPI(serial peripheral interface), 또는 MIPI(mobile industry processor interface))을 통해 서로 연결되고 신호(예: 명령 또는 데이터)를 상호간에 교환할 수 있다.At least some of the components are connected to each other through a communication method between peripheral devices (eg, a bus, general purpose input and output (GPIO), serial peripheral interface (SPI), or mobile industry processor interface (MIPI)) and signal ( e.g. commands or data) can be exchanged with each other.

일 실시 예에 따르면, 명령 또는 데이터는 제2 네트워크(999)에 연결된 서버(908)를 통해서 전자 장치(901)와 외부의 전자 장치(904)간에 송신 또는 수신될 수 있다. 외부의 전자 장치(902, 또는 904) 각각은 전자 장치(901)와 동일한 또는 다른 종류의 장치일 수 있다. 일 실시 예에 따르면, 전자 장치(901)에서 실행되는 동작들의 전부 또는 일부는 외부의 전자 장치들(902, 904, 또는 908) 중 하나 이상의 외부의 전자 장치들에서 실행될 수 있다. 예를 들면, 전자 장치(901)가 어떤 기능이나 서비스를 자동으로, 또는 사용자 또는 다른 장치로부터의 요청에 반응하여 수행해야 할 경우에, 전자 장치(901)는 기능 또는 서비스를 자체적으로 실행시키는 대신에 또는 추가적으로, 하나 이상의 외부의 전자 장치들에게 그 기능 또는 그 서비스의 적어도 일부를 수행하라고 요청할 수 있다. 상기 요청을 수신한 하나 이상의 외부의 전자 장치들은 요청된 기능 또는 서비스의 적어도 일부, 또는 상기 요청과 관련된 추가 기능 또는 서비스를 실행하고, 그 실행의 결과를 전자 장치(901)로 전달할 수 있다. 전자 장치(901)는 상기 결과를, 그대로 또는 추가적으로 처리하여, 상기 요청에 대한 응답의 적어도 일부로서 제공할 수 있다. 이를 위하여, 예를 들면, 클라우드 컴퓨팅, 분산 컴퓨팅, 모바일 에지 컴퓨팅(MEC: mobile edge computing), 또는 클라이언트-서버 컴퓨팅 기술이 이용될 수 있다. 전자 장치(901)는, 예를 들어, 분산 컴퓨팅 또는 모바일 에지 컴퓨팅을 이용하여 초저지연 서비스를 제공할 수 있다. 다른 실시 예에 있어서, 외부의 전자 장치(904)는 IoT(internet of things) 기기를 포함할 수 있다. 서버(908)는 기계 학습 및/또는 신경망을 이용한 지능형 서버일 수 있다. 일 실시 예에 따르면, 외부의 전자 장치(904) 또는 서버(908)는 제2 네트워크(999) 내에 포함될 수 있다. 전자 장치(901)는 5G 통신 기술 및 IoT 관련 기술을 기반으로 지능형 서비스(예: 스마트 홈, 스마트 시티, 스마트 카, 또는 헬스 케어)에 적용될 수 있다. According to an embodiment, commands or data may be transmitted or received between the electronic device 901 and the external electronic device 904 through the server 908 connected to the second network 999 . Each of the external electronic devices 902 or 904 may be the same as or different from the electronic device 901 . According to an embodiment, all or part of operations executed in the electronic device 901 may be executed in one or more external electronic devices among the external electronic devices 902 , 904 , or 908 . For example, when the electronic device 901 needs to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device 901 instead of executing the function or service by itself. Alternatively or additionally, 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 901 . The electronic device 901 may provide the result as at least part of a response to the request as it is or additionally processed. To this end, for example, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used. The electronic device 901 may provide an ultra-low latency service using, for example, distributed computing or mobile edge computing. In another embodiment, the external electronic device 904 may include an internet of things (IoT) device. Server 908 may be an intelligent server using machine learning and/or neural networks. According to an embodiment, the external electronic device 904 or server 908 may be included in the second network 999. The electronic device 901 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 according to various embodiments disclosed in this document 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. An electronic device according to an embodiment of this document is not limited to the aforementioned devices.

본 문서의 다양한 실시 예들 및 이에 사용된 용어들은 본 문서에 기재된 기술적 특징들을 특정한 실시 예들로 한정하려는 것이 아니며, 해당 실시 예의 다양한 변경, 균등물, 또는 대체물을 포함하는 것으로 이해되어야 한다. 도면의 설명과 관련하여, 유사한 또는 관련된 구성요소에 대해서는 유사한 참조 부호가 사용될 수 있다. 아이템에 대응하는 명사의 단수 형은 관련된 문맥상 명백하게 다르게 지시하지 않는 한, 상기 아이템 한 개 또는 복수 개를 포함할 수 있다. 본 문서에서, "A 또는 B", "A 및 B 중 적어도 하나", "A 또는 B 중 적어도 하나", "A, B 또는 C", "A, B 및 C 중 적어도 하나", 및 "A, B, 또는 C 중 적어도 하나"와 같은 문구들 각각은 그 문구들 중 해당하는 문구에 함께 나열된 항목들 중 어느 하나, 또는 그들의 모든 가능한 조합을 포함할 수 있다. "제1", "제2", 또는 "첫째" 또는 "둘째"와 같은 용어들은 단순히 해당 구성요소를 다른 해당 구성요소와 구분하기 위해 사용될 수 있으며, 해당 구성요소들을 다른 측면(예: 중요성 또는 순서)에서 한정하지 않는다. 어떤(예: 제1) 구성요소가 다른(예: 제2) 구성요소에, "기능적으로" 또는 "통신적으로"라는 용어와 함께 또는 이런 용어 없이, "커플드" 또는 "커넥티드"라고 언급된 경우, 그것은 상기 어떤 구성요소가 상기 다른 구성요소에 직접적으로(예: 유선으로), 무선으로, 또는 제3 구성요소를 통하여 연결될 수 있다는 것을 의미한다.Various embodiments of this document and terms used therein are not intended to limit the technical features described in this document to specific embodiments, and should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, like reference numbers may be used for like or related elements. The singular form of a noun corresponding to an item may include one item or a plurality of items, unless the relevant context clearly dictates otherwise. In this document, "A or B", "at least one of A and B", "at least one of A or B", "A, B or C", "at least one of A, B and C", and "A Each of the phrases such as "at least one of , B, or C" may include any one of the items listed together in that phrase, or all possible combinations thereof. Terms such as "first", "second", or "first" or "secondary" may simply be used to distinguish that component from other corresponding components, and may refer to that component in other respects (eg, importance or order) is not limited. A (eg, first) component is said to be "coupled" or "connected" to another (eg, second) component, with or without the terms "functionally" or "communicatively." When mentioned, it means that the certain component may be connected to the other component directly (eg by wire), wirelessly, or through a third component.

본 문서의 다양한 실시 예들에서 사용된 용어 "모듈"은 하드웨어, 소프트웨어 또는 펌웨어로 구현된 유닛을 포함할 수 있으며, 예를 들면, 로직, 논리 블록, 부품, 또는 회로와 같은 용어와 상호 호환적으로 사용될 수 있다. 모듈은, 일체로 구성된 부품 또는 하나 또는 그 이상의 기능을 수행하는, 상기 부품의 최소 단위 또는 그 일부가 될 수 있다. 예를 들면, 일 실시 예에 따르면, 모듈은 ASIC(application-specific integrated circuit)의 형태로 구현될 수 있다. The term "module" used in various embodiments of this document may include a unit implemented in hardware, software, or firmware, and is interchangeably interchangeable with terms such as, for example, logic, logic blocks, components, or circuits. can be used A module may be an integrally constructed component or a minimal unit of components or a portion thereof that performs one or more functions. For example, according to one embodiment, the module may be implemented in the form of an application-specific integrated circuit (ASIC).

본 문서의 다양한 실시 예들은 기기(machine)(예: 전자 장치(901)) 의해 읽을 수 있는 저장 매체(storage medium)(예: 내장 메모리(936) 또는 외장 메모리(938))에 저장된 하나 이상의 명령어들을 포함하는 소프트웨어(예: 프로그램(940))로서 구현될 수 있다. 예를 들면, 기기(예: 전자 장치(901))의 프로세서(예: 프로세서(920))는, 저장 매체로부터 저장된 하나 이상의 명령어들 중 적어도 하나의 명령을 호출하고, 그것을 실행할 수 있다. 이것은 기기가 상기 호출된 적어도 하나의 명령어에 따라 적어도 하나의 기능을 수행하도록 운영되는 것을 가능하게 한다. 상기 하나 이상의 명령어들은 컴파일러에 의해 생성된 코드 또는 인터프리터에 의해 실행될 수 있는 코드를 포함할 수 있다. 기기로 읽을 수 있는 저장 매체는, 비일시적(non-transitory) 저장 매체의 형태로 제공될 수 있다. 여기서, '비일시적'은 저장 매체가 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장 매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다.Various embodiments of this document describe one or more instructions stored in a storage medium (eg, internal memory 936 or external memory 938) readable by a machine (eg, electronic device 901). It may be implemented as software (eg, the program 940) including them. For example, a processor (eg, the processor 920) of a device (eg, the electronic device 901) may call at least one command among one or more instructions stored from a storage medium and execute it. This enables the device to be operated to perform at least one function according to the at least one command invoked. 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. Here, 'non-temporary' only means that the storage medium is a tangible device and does not contain a signal (eg, electromagnetic wave), and this term is used when data is stored semi-permanently in the storage medium. It does not discriminate when it is temporarily stored.

일 실시 예에 따르면, 본 문서에 개시된 다양한 실시 예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: CD-ROM(compact disc read only memory))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어™)를 통해 또는 두 개의 사용자 장치들(예: 스마트 폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, 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 machine-readable storage medium (e.g. CD-ROM (compact disc read only memory)), or through an application store (e.g. Play Store™) or on two user devices ( It can be distributed (eg downloaded or uploaded) online, directly between smart phones. In the case of online distribution, at least part of the computer program product may be temporarily stored or temporarily created in a device-readable storage medium such as a manufacturer's server, an application store server, or a relay server's memory.

다양한 실시 예들에 따르면, 상기 기술한 구성요소들의 각각의 구성요소(예: 모듈 또는 프로그램)는 단수 또는 복수의 개체를 포함할 수 있으며, 복수의 개체 중 일부는 다른 구성요소에 분리 배치될 수도 있다. 다양한 실시 예들에 따르면, 전술한 해당 구성요소들 중 하나 이상의 구성요소들 또는 동작들이 생략되거나, 또는 하나 이상의 다른 구성요소들 또는 동작들이 추가될 수 있다. 추가적으로 또는 대체적으로, 복수의 구성요소들(예: 모듈 또는 프로그램)은 하나의 구성요소로 통합될 수 있다. 이런 경우, 통합된 구성요소는 상기 복수의 구성요소들 각각의 구성요소의 하나 이상의 기능들을 상기 통합 이전에 상기 복수의 구성요소들 중 해당 구성요소에 의해 수행되는 것과 동일 또는 유사하게 수행할 수 있다. 다양한 실시 예들에 따르면, 모듈, 프로그램 또는 다른 구성요소에 의해 수행되는 동작들은 순차적으로, 병렬적으로, 반복적으로, 또는 휴리스틱하게 실행되거나, 상기 동작들 중 하나 이상이 다른 순서로 실행되거나, 생략되거나, 또는 하나 이상의 다른 동작들이 추가될 수 있다.According to various embodiments, each component (eg, module or program) of the components described above may include a single object or a plurality of objects, and some of the multiple objects may be separately disposed in other components. . According to various embodiments, one or more components or operations among the aforementioned components may be omitted, or one or more other components or operations may be added. Additionally or alternatively, a plurality of components (eg modules or programs) may be integrated into a single component. In this case, 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. . According to various embodiments, operations performed by modules, programs, or other components are executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations are executed in a different order, omitted, or , or one or more other operations may be added.

Claims (20)

블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치에 있어서,
상기 블록체인 네트워크와 통신하는 통신 회로;
상기 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장을 저장하는 메모리; 및
상기 통신 회로 및 상기 메모리와 전기적으로 연결된 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는:
트랜잭션의 생성 요청을 획득함에 응답하여 상기 트랜잭션에 대응되는 암호키를 생성하고,
상기 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하고,
상기 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 상기 부분 원장에 저장된 제1 데이터를 상기 암호키에 기반하여 암호화하고,
상기 제1 데이터를 암호화하여 상기 블록체인 네트워크에 포함된 데이터 서버에 업로드하고,
상기 데이터 서버로부터 상기 암호키에 기초하여 암호화된 제2 데이터를 다운로드하고, 상기 제2 데이터는 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 데이터;
상기 제2 데이터를 상기 암호키에 기반하여 복호화하고,
상기 제1 데이터 및 복호화된 상기 제2 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행하는 전자 장치.
In an electronic device constituting a first blockchain node included in a blockchain network,
communication circuitry communicating with the blockchain network;
a memory for storing a partial ledger including a part of the entire distributed ledger for the blockchain network; and
at least one processor electrically coupled with the communication circuitry and the memory, the at least one processor comprising:
Generating an encryption key corresponding to the transaction in response to obtaining a request for generating the transaction;
Delivering information about the encryption key to at least one blockchain node related to the transaction;
Encrypting first data stored in the partial ledger among input data required for execution of a first smart contract for the transaction based on the encryption key;
Encrypting the first data and uploading it to a data server included in the blockchain network;
Second data encrypted based on the encryption key is downloaded from the data server, and the second data includes data not stored in the partial ledger among the input data;
Decrypting the second data based on the encryption key;
An electronic device that executes the first smart contract based on the first data and the decrypted second data.
청구항 1에 있어서,
상기 적어도 하나의 프로세서는:
상기 제1 스마트 컨트랙트를 실행하여 제1 출력 데이터를 생성하고,
상기 트랜잭션에 관련된 제2 블록체인 노드로 상기 트랜잭션을 포함하는 보증 요청을 전송하고,
상기 보증 요청에 기초하여 제2 블록체인 노드로부터 생성된 제2 출력 데이터를 포함하는 보증 데이터를 상기 제2 블록체인 노드로부터 획득하고,
상기 제1 출력 데이터 및 상기 제2 출력 데이터에 기반하여 상기 트랜잭션에 대한 보증을 수행하는 전자 장치.
The method of claim 1,
The at least one processor is:
Execute the first smart contract to generate first output data;
Sending an assurance request including the transaction to a second blockchain node related to the transaction;
obtaining guarantee data from the second blockchain node, including second output data generated from the second blockchain node based on the guarantee request;
An electronic device that guarantees the transaction based on the first output data and the second output data.
청구항 2에 있어서,
상기 제2 출력 데이터는, 상기 제2 블록체인 노드가 상기 제2 블록체인 노드에 저장된 상기 트랜잭션에 대한 제2 스마트 컨트랙트를 실행하여 생성되는 전자 장치.
The method of claim 2,
The second output data is generated when the second blockchain node executes a second smart contract for the transaction stored in the second blockchain node.
청구항 2에 있어서,
암호화된 상기 제2 데이터는, 상기 제2 블록체인 노드가 상기 입력 데이터 중에서 상기 제2 블록체인 노드에 저장된 데이터를 상기 암호키에 대한 정보에 기반하여 암호화한 데이터를 포함하는 전자 장치.
The method of claim 2,
The encrypted second data includes data obtained by the second blockchain node encrypting data stored in the second blockchain node among the input data based on information about the encryption key.
청구항 2에 있어서,
상기 적어도 하나의 프로세서는, 상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 입력 데이터 및 상기 제1 출력 데이터에 기초하여 트랜잭션 데이터를 생성하고,
상기 블록체인 네트워크에 포함된 제3 블록체인 노드로 상기 트랜잭션 데이터를 포함하는 블록의 생성을 요청하고,
상기 요청에 기초하여 생성된 블록을 포함하는 업데이트 요청을 상기 제3 블록체인 노드로부터 수신하고,
상기 업데이트 요청에 응답하여 상기 블록 및 상기 제1 출력 데이터에 기초한 상기 부분 원장을 저장하는 전자 장치.
The method of claim 2,
The at least one processor generates transaction data based on the input data and the first output data as assurance for the transaction is completed;
Requesting generation of a block including the transaction data to a third blockchain node included in the blockchain network;
Receiving an update request including a block generated based on the request from the third blockchain node;
An electronic device that stores the partial ledger based on the block and the first output data in response to the update request.
청구항 2에 있어서,
상기 적어도 하나의 프로세서는 상기 트랜잭션의 생성 요청에 응답하여 상기 데이터 서버에 상기 트랜잭션에 대한 공유 원장의 생성을 요청하고,
상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 데이터 서버에 포함된 상기 공유 원장의 삭제를 상기 데이터 서버로 요청하고,
상기 공유 원장은 상기 암호키에 기초하여 암호화된 상기 제1 데이터 및 상기 제2 데이터를 저장한 데이터베이스를 포함하는 전자 장치.
The method of claim 2,
The at least one processor requests the data server to create a shared ledger for the transaction in response to the transaction creation request,
When the guarantee for the transaction is completed, request deletion of the shared ledger included in the data server to the data server;
The shared ledger includes a database storing the first data and the second data encrypted based on the encryption key.
청구항 2에 있어서,
상기 적어도 하나의 프로세서는, 상기 트랜잭션에 대한 보증이 완료됨에 응답하여 상기 암호키를 파기하는 전자 장치.
The method of claim 2,
The at least one processor destroys the encryption key in response to completion of guarantee for the transaction.
청구항 1에 있어서,
상기 부분 원장은, 상기 전자 장치가 합의에 참여한 적어도 하나의 트랜잭션에 상응하는 적어도 하나의 블록 및 상기 적어도 하나의 트랜잭션과 관련된 상태 데이터를 포함하는 전자 장치.
The method of claim 1,
The partial ledger includes at least one block corresponding to at least one transaction in which the electronic device participated in an agreement and state data related to the at least one transaction.
청구항 1에 있어서,
상기 적어도 하나의 프로세서는 상기 데이터 서버로부터 상기 제2 데이터 중에서 적어도 일부가 업로드 되었음을 나타내는 알림을 획득하고,
상기 알림에 응답하여 상기 데이터 서버에 업로드된 상기 제2 데이터 중에서 적어도 일부를 다운로드하는 전자 장치.
The method of claim 1,
The at least one processor obtains a notification indicating that at least some of the second data has been uploaded from the data server;
An electronic device that downloads at least a portion of the second data uploaded to the data server in response to the notification.
청구항 1에 있어서,
상기 적어도 하나의 프로세서는 상기 암호키를 생성함에 응답하여 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 상기 제2 데이터를 식별하고,
상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 상기 제2 데이터를 상기 데이터 서버에 요청하는 전자 장치.
The method of claim 1,
The at least one processor identifies the second data not stored in the partial ledger from among the input data in response to generating the encryption key,
An electronic device that requests, from the data server, the second data not stored in the partial ledger among the input data.
청구항 1에 있어서,
상기 적어도 하나의 프로세서는, 상기 메모리에 저장된 상기 블록체인 네트워크에 포함된 블록체인 노드들에 대한 노드 정보 또는 상기 블록체인 네트워크에 포함된 상기 노드 정보를 관리하는 제4 블록체인 노드로부터 획득한 노드 정보에 기초하여 상기 적어도 하나의 블록체인 노드를 식별하는 전자 장치.
The method of claim 1,
The at least one processor may store node information about blockchain nodes included in the blockchain network stored in the memory or node information obtained from a fourth blockchain node managing the node information included in the blockchain network. Electronic device for identifying the at least one blockchain node based on.
블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치의 동작 방법에 있어서,
트랜잭션의 생성 요청을 획득함에 응답하여 상기 트랜잭션에 대응되는 암호키를 생성하는 동작;
상기 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하는 동작;
상기 트랜잭션에 대한 제1 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 상기 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장에 저장된 데이터인 제1 데이터를 상기 암호키에 기반하여 암호화하는 동작;
암호화된 상기 제1 데이터를 상기 블록체인 네트워크에 포함된 데이터 서버에 업로드하는 동작;
상기 데이터 서버로부터 상기 암호키에 기초하여 암호화된 제2 데이터를 다운로드하는 동작, 상기 제2 데이터는 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 데이터;
상기 제2 데이터를 상기 암호키에 기반하여 복호화하는 동작; 및
상기 제1 데이터 및 복호화된 상기 제2 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행하는 동작을 포함하는 전자 장치의 동작 방법.
A method of operating an electronic device constituting a first blockchain node included in a blockchain network,
generating an encryption key corresponding to the transaction in response to obtaining a transaction generation request;
transmitting information about the encryption key to at least one blockchain node related to the transaction;
Encrypting first data, which is data stored in a partial ledger including a part of the entire distributed ledger for the blockchain network, among input data required for execution of the first smart contract for the transaction, based on the encryption key;
Uploading the encrypted first data to a data server included in the blockchain network;
downloading second data encrypted based on the encryption key from the data server, wherein the second data includes data not stored in the partial ledger among the input data;
decrypting the second data based on the encryption key; and
and executing the first smart contract based on the first data and the decrypted second data.
청구항 12에 있어서,
상기 제1 스마트 컨트랙트를 실행하여 제1 출력 데이터를 생성하는 동작;
상기 트랜잭션에 관련된 제2 블록체인 노드로 상기 트랜잭션을 포함하는 보증 요청을 전송하는 동작;
상기 보증 요청에 기초하여 제2 블로체인 노드로부터 생성된 제2 출력 데이터를 포함하는 보증 데이터를 상기 제2 블록체인 노드로부터 획득하는 동작; 및
상기 제1 출력 데이터 및 상기 제2 출력 데이터에 기반하여 상기 트랜잭션에 대한 보증을 수행하는 동작을 더 포함하는 전자 장치의 동작 방법.
The method of claim 12,
generating first output data by executing the first smart contract;
transmitting an assurance request including the transaction to a second blockchain node related to the transaction;
obtaining, from the second blockchain node, guarantee data including second output data generated from the second blockchain node based on the guarantee request; and
The method of operating the electronic device further comprising performing a guarantee for the transaction based on the first output data and the second output data.
청구항 13에 있어서,
상기 트랜잭션의 생성 요청에 응답하여 상기 데이터 서버에 상기 트랜잭션에 대한 공유 원장의 생성을 요청하는 동작;
상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 데이터 서버에 포함된 상기 공유 원장의 삭제를 상기 데이터 서버로 요청하는 동작을 더 포함하고,
상기 공유 원장은 상기 암호키에 기초하여 암호화된 상기 제1 데이터 및 상기 제2 데이터를 저장하는 전자 장치의 동작 방법.
The method of claim 13,
requesting the data server to create a shared ledger for the transaction in response to the transaction creation request;
Requesting the data server to delete the shared ledger included in the data server as the guarantee for the transaction is completed;
The shared ledger stores the first data and the second data encrypted based on the encryption key.
청구항 13에 있어서,
상기 보증을 수행하는 동작은 상기 암호키를 파기하는 동작을 포함하는 전자 장치의 동작 방법.
The method of claim 13,
The operation of performing the guarantee includes an operation of destroying the encryption key.
청구항 12에 있어서,
상기 제2 데이터를 다운로드하는 동작은, 상기 데이터 서버로부터 상기 제2 데이터 중에서 적어도 일부가 업로드 되었음을 나타내는 알림을 획득하는 동작; 및
상기 알림에 응답하여 상기 데이터 서버에 업로드된 상기 제2 데이터 중에서 적어도 일부를 다운로드하는 동작을 포함하는 전자 장치의 동작 방법.
The method of claim 12,
The downloading of the second data may include obtaining a notification indicating that at least a part of the second data has been uploaded from the data server; and
and downloading at least a portion of the second data uploaded to the data server in response to the notification.
청구항 12에 있어서,
상기 암호키에 대한 정보를 전달하는 동작은 상기 전자 장치에 저장된 상기 블록체인 네트워크에 포함된 블록체인 노드들에 대한 노드 정보 또는 상기 블록체인 네트워크에 포함된 상기 노드 정보를 관리하는 블록체인 노드로부터 획득한 노드 정보에 기초하여 상기 적어도 하나의 블록체인 노드를 식별하는 동작; 및
식별된 상기 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하는 동작을 포함하고,
상기 암호키에 대한 정보는 상기 암호키를 유도할 수 있는 종자 값 또는 상기 암호키 중 적어도 하나를 포함하는 전자 장치의 동작 방법.
The method of claim 12,
The operation of transmitting the information on the encryption key is obtained from node information about blockchain nodes included in the blockchain network stored in the electronic device or from a blockchain node managing the node information included in the blockchain network. identifying the at least one blockchain node based on one node information; and
Including an operation of transmitting information about the encryption key to the at least one identified blockchain node,
The information on the encryption key includes at least one of a seed value from which the encryption key can be derived or the encryption key.
블록체인 네트워크에 포함된 제1 블록체인 노드를 구성하는 전자 장치에 있어서,
상기 블록체인 네트워크와 통신하는 통신 회로;
상기 블록체인 네트워크에 대한 전체 분산 원장 중에서 일부를 포함하는 부분 원장을 저장하는 메모리; 및
상기 통신 회로 및 상기 메모리와 전기적으로 연결된 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는:
트랜잭션의 생성 요청을 획득함에 응답하여 상기 트랜잭션에 대응되는 암호키를 생성하여 상기 트랜잭션에 관련된 적어도 하나의 블록체인 노드로 상기 암호키에 대한 정보를 전달하고,
상기 트랜잭션에 대한 스마트 컨트랙트의 실행에 요구되는 입력 데이터 중에서 상기 부분 원장에 저장된 데이터인 제1 데이터를 상기 암호키에 기반하여 암호화하고,
암호화된 상기 제1 데이터를 상기 블록체인 네트워크의 데이터 서버에 업로드 하고, 상기 데이터 서버는 공유 원장을 저장함;
상기 적어도 하나의 블록체인 노드로 상기 트랜잭션에 대한 보증 요청을 전송하고,
상기 보증 요청에 응답하여, 상기 데이터 서버에 저장된 공유 원장의 적어도 일부에 기반하여 상기 적어도 하나의 블록체인 노드의 각각에 저장된 상기 트랜잭션에 대한 스마트 컨트랙트를 각각 실행함에 따라 생성된 출력 데이터를 각각 포함하는 적어도 하나의 보증 데이터를 획득하고,
상기 적어도 하나의 블록체인 노드 각각으로부터 생성된 출력 데이터 및 상기 메모리에 저장된 상기 트랜잭션에 대한 제1 스마트 컨트랙트를 실행함에 따라 생성된 출력 데이터에 기초하여 상기 트랜잭션에 대한 보증을 수행하는 전자 장치.
In an electronic device constituting a first blockchain node included in a blockchain network,
communication circuitry communicating with the blockchain network;
a memory for storing a partial ledger including a part of the entire distributed ledger for the blockchain network; and
at least one processor electrically coupled with the communication circuitry and the memory, the at least one processor comprising:
In response to obtaining a transaction creation request, an encryption key corresponding to the transaction is generated and information on the encryption key is transmitted to at least one blockchain node related to the transaction;
Among the input data required for execution of the smart contract for the transaction, first data, which is data stored in the partial ledger, is encrypted based on the encryption key,
Upload the encrypted first data to a data server of the blockchain network, and the data server stores a shared ledger;
Sending an assurance request for the transaction to the at least one blockchain node;
In response to the guarantee request, output data generated by each executing a smart contract for the transaction stored in each of the at least one blockchain node based on at least a portion of the shared ledger stored in the data server, respectively. obtain at least one warranty data;
An electronic device that guarantees the transaction based on output data generated from each of the at least one blockchain node and output data generated by executing a first smart contract for the transaction stored in the memory.
청구항 18에 있어서,
상기 적어도 하나의 프로세서는,
상기 데이터 서버로부터 상기 암호키에 기초하여 암호화된 제2 데이터를 다운로드 하고, 상기 제2 데이터는 상기 입력 데이터 중에서 상기 부분 원장에 저장되지 않은 데이터이며;
상기 제2 데이터를 상기 암호키에 기반하여 복호화하고,
상기 제1 데이터 및 복호화된 상기 제2 데이터에 기초하여 상기 제1 스마트 컨트랙트를 실행하는 전자 장치.
The method of claim 18
The at least one processor,
download second data encrypted based on the encryption key from the data server, wherein the second data is data not stored in the partial ledger among the input data;
Decrypting the second data based on the encryption key;
An electronic device that executes the first smart contract based on the first data and the decrypted second data.
청구항 18에 있어서,
상기 적어도 하나의 프로세서는, 상기 트랜잭션에 대한 보증이 완료됨에 따라 상기 입력 데이터 및 상기 제1 스마트 컨트랙트를 실행함에 따라 생성된 출력 데이터에 기초하여 트랜잭션 데이터를 생성하고,
상기 블록체인 네트워크에 포함된 블록 생성 노드로 상기 트랜잭션 데이터를 포함하는 블록의 생성을 요청하고,
상기 요청에 응답하여 생성된 블록을 포함하는 업데이트 요청을 상기 블록 생성 노드로부터 수신하고,
상기 업데이트 요청에 응답하여, 상기 블록 및 상기 트랜잭션 데이터에 기초한 상기 부분 원장의 업데이트를 수행하는 전자 장치.
The method of claim 18
The at least one processor generates transaction data based on the input data and output data generated by executing the first smart contract as the guarantee for the transaction is completed,
Requesting the creation of a block including the transaction data to a block generating node included in the blockchain network;
Receiving an update request including a block generated in response to the request from the block generation node;
An electronic device that performs an update of the partial ledger based on the block and the transaction data in response to the update request.
KR1020210169754A 2021-10-12 2021-12-01 Electronic device including partial ledger and method in blockchain network KR20230052165A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/KR2022/015327 WO2023063694A1 (en) 2021-10-12 2022-10-12 Electronic device having partial ledger in blockchain network, and operation method thereof
US18/139,551 US20230261887A1 (en) 2021-10-12 2023-04-26 Electronic device having partial ledger in blockchain network and operating method thereof

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20210135099 2021-10-12
KR1020210135099 2021-10-12

Publications (1)

Publication Number Publication Date
KR20230052165A true KR20230052165A (en) 2023-04-19

Family

ID=86142131

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210169754A KR20230052165A (en) 2021-10-12 2021-12-01 Electronic device including partial ledger and method in blockchain network

Country Status (1)

Country Link
KR (1) KR20230052165A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117614707A (en) * 2023-11-29 2024-02-27 金网络(北京)数字科技有限公司 Block chain transaction method, system, electronic equipment and medium based on intelligent contract

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117614707A (en) * 2023-11-29 2024-02-27 金网络(北京)数字科技有限公司 Block chain transaction method, system, electronic equipment and medium based on intelligent contract
CN117614707B (en) * 2023-11-29 2024-05-14 金网络(北京)数字科技有限公司 Block chain transaction method, system, electronic equipment and medium based on intelligent contract

Similar Documents

Publication Publication Date Title
US11706199B2 (en) Electronic device and method for generating attestation certificate based on fused key
US11770240B2 (en) Electronic device and method for receiving push message stored in blockchain
US20230261886A1 (en) Electronic device and method for sharing data using blockchain network
KR20230052165A (en) Electronic device including partial ledger and method in blockchain network
US20230252461A1 (en) Electronic device for providing transaction in blockchain network and operating method thereof
KR20230037954A (en) Electronic device performing an encryption operation about transaction data and method in blockchain network
US20220209940A1 (en) Method for providing encrypted object and electronic device for supporting the same
EP4311162A1 (en) Electronic device for generating mnemonic words of private key and operating method of electronic device
EP4184403A1 (en) Electronic device for generating transaction including internal data, and operating method thereof
US20230261887A1 (en) Electronic device having partial ledger in blockchain network and operating method thereof
KR20230076701A (en) Electronic device including partial ledger and method in blockchain network
US20230163982A1 (en) Electronic device including partial ledger and method in blockchain network
US20230289786A1 (en) Electronic device for transmitting transaction by using external device and operation method thereof
KR20230046061A (en) Electronic device recovering block data and method in blockchain network
US20240152636A1 (en) Electronic device and method for verifying data in electronic device
KR20220167172A (en) Electronic device including partial ledger and method in blockchain network
EP4307645A1 (en) Electronic device having partial ledger in blockchain network, and operating method therefor
KR20220133533A (en) Electronic device for managing secure data through decentralized network and operating mehtod thereof
KR20220167177A (en) Electronic device including partial ledger and method in blockchain network
US20230093667A1 (en) Method of providing login information and electronic device performing thereof
US20230359530A1 (en) Electronic device for supporting data backup, and operation method thereof
KR20240063659A (en) Electronic device and method for verifying data in electronic device
KR20230027964A (en) Electronic device for generating mnemonic words of private key and method of operating the same
KR20240045032A (en) Apparatus and method for transmitting data by block-chain
KR20220129333A (en) Electronic device for managing password and operating method thereof