KR20220021576A - A TEE-based decentralized oracle system and method of transferring external data in the oracle system - Google Patents

A TEE-based decentralized oracle system and method of transferring external data in the oracle system Download PDF

Info

Publication number
KR20220021576A
KR20220021576A KR1020200102278A KR20200102278A KR20220021576A KR 20220021576 A KR20220021576 A KR 20220021576A KR 1020200102278 A KR1020200102278 A KR 1020200102278A KR 20200102278 A KR20200102278 A KR 20200102278A KR 20220021576 A KR20220021576 A KR 20220021576A
Authority
KR
South Korea
Prior art keywords
oracle
node
data
blockchain network
transaction
Prior art date
Application number
KR1020200102278A
Other languages
Korean (ko)
Other versions
KR102565850B1 (en
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 KR1020200102278A priority Critical patent/KR102565850B1/en
Publication of KR20220021576A publication Critical patent/KR20220021576A/en
Application granted granted Critical
Publication of KR102565850B1 publication Critical patent/KR102565850B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/18Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits
    • G06F11/183Error detection or correction of the data by redundancy in hardware using passive fault-masking of the redundant circuits by voting, the voting not being performed by the redundant components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1834Distributed file systems implemented based on peer-to-peer networks, e.g. gnutella
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1093Some peer nodes performing special functions

Abstract

The present invention provides a trust execution environment (TEE)-based decentralized oracle system capable of ensuring data integrity, data availability, and a response time of oracle during a procedure of receiving external data from an external data source, and a method of transferring external data in the same. The TEE-based decentralized oracle system provides data of an external data source according to request from an external blockchain network by configuring a plurality of oracle nodes by a private blockchain network. The oracle node comprises: a transaction processor to perform a transaction requested from an external blockchain network in a TEE; a consensus engine module to randomly elect a leader oracle node according to a PoET consensus algorithm; and a block management module to generate a block every predetermined period as a validator when a leader orabcle node is elected as the validator and connecting with a blockchain to distribute a block. A leader oracle node elected as a validator from oracle nodes may be operated as a validator node according to a PoET consensus algorithm.

Description

신뢰 실행 환경을 기반으로 한 탈중앙형 오라클 시스템 및 상기 시스템에서의 외부 데이터 전달 방법{A TEE-based decentralized oracle system and method of transferring external data in the oracle system} {A TEE-based decentralized oracle system and method of transferring external data in the oracle system}

본 발명은 블록체인 네트워크의 오라클 시스템에 관한 것으로서, 더욱 구체적으로는 데이터 무결설을 보장하고 데이터 조작이 불가능하며, 중앙화로 인한 단일 장애점 문제와 분산 오라클에서의 확장성과 성능 문제를 해결하기 위하여, 프라이빗 블록체인인 하이퍼레저를 이용하여 신뢰 실행 환경(Trusted Execution Environment; TEE)을 기반으로 하여 구성된 탈중앙형 오라클 시스템에 관한 것이다. The present invention relates to an oracle system of a block chain network, and more specifically, to ensure data integrity, impossible to manipulate data, and solve single point of failure problems due to centralization and scalability and performance problems in distributed oracles, It is about a decentralized oracle system configured based on a Trusted Execution Environment (TEE) using Hyperledger, a private blockchain.

블록체인은 비트코인에서 처음으로 등장한 기술로서, 모든 네트워크 참가자가 원장을 소유하고 합의 알고리즘을 통해 거래를 검증함으로써, 제3자의 개입 없이도 무결성 및 신뢰성을 확보하는 동등 계층간 통신망(Peer-to-Peer Network, P2P) 기반 분산원장 기술이다. 블록체인은 네트워크에서 발생한 입력과 출력, 즉 트랜잭션(Transaction)들을 블록체인 네트워크의 모든 참여자가 저장하고, 저장한 트랜잭션 내용을 바탕으로, 발생한 트랜잭션의 실행(혹은 결과)에 대한 유효성을 검증함으로써 트랜잭션의 무결성(Integrity)을 보장하는 장점을 가진다. 이때, 트랜잭션은 다수의 트랜잭션을 블록(Block)에 담아 합의(Consensus) 과정을 거친다. 합의는 모든 참여자가 동일한 트랜잭션의 실행 결과를 공유하기 위해 어떤 블록(혹은 결과)으로 통일할지 채택하는 과정이다. Blockchain is a technology that first appeared in Bitcoin, a peer-to-peer communication network (Peer-to-Peer) in which all network participants own a ledger and verify transactions through a consensus algorithm, thereby ensuring integrity and reliability without the intervention of a third party. Network, P2P) based distributed ledger technology. The blockchain stores the inputs and outputs that occur in the network, that is, transactions by all participants in the blockchain network, and verifies the validity of the execution (or result) of the transaction based on the stored transaction contents. It has the advantage of ensuring integrity. At this time, the transaction goes through a consensus process by putting a number of transactions in a block. Consensus is a process in which all participants adopt which block (or result) to unify in order to share the execution result of the same transaction.

이러한 특성을 갖는 블록체인 기술은 이중 지불 문제를 해결하는 P2P 전자화폐 거래시스템인 비트코인의 기술로 개발되었지만, 최근에는 건강 관리, 사물인터넷 또는 의료데이터 관리와 같은 다양한 분야를 지원할 수 있는 혁신적인 기술로 등장하게 되었다. Blockchain technology with these characteristics was developed as a technology of Bitcoin, a peer-to-peer electronic money transaction system that solves the double payment problem. came to appear.

한편, 블록체인기술에 스마트 컨트랙트가 도입되면서 블록체인의 응용분야가 더 다양해지게 되었다. 스마트 컨트랙트(Smart contract)는 블록체인 네트워크에서 실행되는 응용 프로그램의 실행 코드이며, 코드가 공개적으로 블록체인에 저장되고 코드의 실행이 참여자간의 합의를 통해 일관성과 무결성을 보장받게 된다. 따라서, 스마트 컨트랙트를 이용하여, 다양한 분야의 탈중앙 어플리케이션이 개발되고 있다. On the other hand, as smart contracts are introduced into blockchain technology, the application fields of blockchain have become more diverse. A smart contract is an executable code of an application running on a blockchain network. The code is publicly stored on the blockchain, and the code execution is guaranteed consistency and integrity through consensus among participants. Therefore, using smart contracts, decentralized applications in various fields are being developed.

한편, 블록체인의 스마트 컨트랙트는 일반 응용 프로그램과 달리 특수한 한계점이 존재한다. 모든 참여자가 트랜잭션의 실행과 검증에 참여하는 블록체인의 특징상, 어떤 참여자의 환경에서 실행해도 같은 입력에 같은 결과가 나오는 결정성(Deterministic)이 보장되어야 하나의 실행 결과로 합의가 가능하다. 실행 결과의 결정성을 위해 스마트 컨트랙트는 네트워크를 통해 외부 데이터에 접근이 불가능하고, 오직 원장(혹은 블록)에 저장된 데이터만 접근이 가능하다. On the other hand, blockchain smart contracts have special limitations unlike general applications. Due to the characteristics of the blockchain in which all participants participate in the execution and verification of a transaction, a consensus is possible as a result of execution only when deterministic in which the same result is obtained for the same input regardless of the environment of any participant. For the determinism of execution results, smart contracts cannot access external data through the network, and only data stored in the ledger (or block) can be accessed.

이와 같이, 블록체인 외부 데이터(이하 외부 데이터)에 접근이 불가능한 한계점을 오라클 문제(Oracle problem)라고 하고, 이런 한계점을 극복하기 위해 외부 데이터를 블록체인에 제공하는 데이터 중개자 또는 미들웨어(middle-ware)를 오라클(Oracle)이라고 한다. 외부 데이터를 블록체인 내부로 가져오기 위하여 블록체인과 동일한 수준의 보안성이 보장되거나 데이터 제공자인 오라클을 신뢰할 수 있어야 한다. 따라서, 오라클은 데이터 중개자로서, 외부 출처로부터 받은 외부 데이터에 변조가 없다는 무결성(Integrity)을 증명해야 한다.In this way, the limit of being unable to access data outside the block chain (hereinafter referred to as the Oracle problem) is called the Oracle problem, and a data intermediary or middle-ware that provides external data to the block chain to overcome this limitation is called Oracle. In order to bring external data into the blockchain, the same level of security as the blockchain must be guaranteed or the data provider, oracle, must be trusted. Therefore, Oracle, as a data intermediary, must prove the integrity of external data received from external sources that there is no tampering.

따라서, 블록체인 오라클 문제를 해결하기 위하여 Oraclize, Town-crier, Chainlink 등과 같은 다양한 오라클 프로토콜이 제안되었다. 그러나, 기존의 오라클 프로토콜에는 중앙 집중식 문제 또는 데이터를 가져오기 위한 보안 채널 및 사물 인터넷 데이터와 같이 시간에 따라 가치가 다른 시변(Time-variant) 데이터를 제공하는 데 한계가 있다. 또한, 이더리움과 같은 외부 데이터를 제공할 블록체인에서 일부 검증 과정이 불가능하며 과도한 연산을 요구하게 되는 문제점이 있다. Therefore, various oracle protocols such as Oraclize, Town-crier, and Chainlink have been proposed to solve the blockchain oracle problem. However, existing oracle protocols have limitations in providing time-variant data whose value varies over time, such as centralized issues or secure channels to fetch data and data from the Internet of Things. In addition, there is a problem in that some verification processes are impossible in a block chain that will provide external data such as Ethereum, and excessive computation is required.

한국등록특허공보 제 10-2023101호Korean Patent Publication No. 10-2023101 한국공개특허공보 제 10-2018-0069856호Korean Patent Publication No. 10-2018-0069856 미국공개특허공보 US 2019/0095879US Patent Publication US 2019/0095879

전술한 문제점을 해결하기 위한 본 발명의 목적은 외부 데이터 소스로부터 외부 데이터를 가져오는 과정에서 데이터 무결성, 데이터 가용성 및 오라클의 응답시간을 보장할 수 있도록 하는 신뢰 실행 환경을 기반으로 한 탈중앙형 오라클 시스템을 제공하는 것이다. SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-mentioned problems, a decentralized oracle based on a trusted execution environment to ensure data integrity, data availability, and Oracle's response time in the process of importing external data from an external data source. to provide a system.

전술한 기술적 과제를 달성하기 위한 본 발명의 제1 특징에 따른 신뢰 실행 환경을 기반으로 한 탈중앙형 오라클 시스템은, 복수 개의 오라클 노드들이 프라이빗 블록체인 네트워크로 구성되어 외부의 블록체인 네트워크로부터의 요청에 따라 외부 데이터 소스의 데이터를 제공하는 것을 특징으로 하며, A decentralized oracle system based on a trusted execution environment according to the first aspect of the present invention for achieving the above-described technical problem, a plurality of oracle nodes are composed of a private blockchain network, and a request from an external blockchain network is provided. It is characterized in that it provides data from an external data source according to the

상기 오라클 노드는, 외부의 블록체인 네트워크에 의해 요청된 트랜잭션을 신뢰 실행 환경(TEE)에서 수행하는 트랜잭션 처리 장치; PoET(Proof-of-Elapsed-Time) 합의 알고리즘에 따라 상기 복수 개의 오라클 노드들 중 리더 오라클 노드를 무작위로 선출하는 합의 엔진 모듈; 리더 오라클 노드로 선출되면, 검증자로서 일정 주기마다 블록을 생성하고 블록체인에 연결하여 블록을 배포하도록 구성된 블록 매니지먼트 모듈; 를 구비하여, PoET 합의 알고리즘에 따라 오라클 노드들 중에서 선출된 리더 오라클 노드가 검증자 노드로서 동작할 수 있도록 구성된다. The oracle node includes: a transaction processing device that performs a transaction requested by an external blockchain network in a trusted execution environment (TEE); a consensus engine module for randomly selecting a leader oracle node from among the plurality of oracle nodes according to a Proof-of-Elapsed-Time (PoET) consensus algorithm; When elected as a leader oracle node, a block management module configured to generate blocks at regular intervals as a validator and distribute blocks by connecting to the block chain; is configured so that the leader oracle node selected from among the oracle nodes according to the PoET consensus algorithm can operate as a verifier node.

전술한 제1 특징에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템에 있어서, 상기 오라클 노드들은 프라이빗 블록체인 내트워크인 하이퍼레저를 이용하여 peer-to-peer(P2P) 블록체인 네트워크를 구성한 것이 바람직하다. In the TEE-based decentralized oracle system according to the first aspect described above, it is preferable that the oracle nodes configure a peer-to-peer (P2P) blockchain network using Hyperledger, which is a private blockchain network. Do.

전술한 제1 특징에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템에 있어서, 상기 PoET 합의 알고리즘은 각 오라클 노드들이 동일한 연산을 푸는 수행 시간만큼의 시드값을 기반으로 하여 리더 오라클 노드를 무작위로 선출하고, 무작위로 선출된 리더 오라클 노드가 블록을 생성하고 트랜잭션을 검증하는 것이 바람직하다. In the TEE-based decentralized oracle system according to the first aspect, the PoET consensus algorithm randomly selects a leader oracle node based on a seed value equal to the execution time for each oracle node to solve the same operation. In addition, it is desirable for a randomly elected leader oracle node to generate blocks and verify transactions.

전술한 제1 특징에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템은, 외부의 블록체인 네트워크의 전달 스마트 컨트랙트를 모니터링하는 클라이언트를 더 구비하고, 상기 클라이언트는 블록체인 네트워크로부터 오라클 요청에 대한 트랜잭션을 발생시키는 것을 특징으로 하며, 상기 오라클 노드는 상기 클라이언트로부터 발생된 트랜잭션을 트랜잭션 처리 장치에서 수행하여 외부 데이터 소스로부터 데이터를 받아오는 것이 바람직하다. The TEE-based decentralized oracle system according to the first aspect described above further includes a client for monitoring a delivery smart contract of an external blockchain network, wherein the client performs a transaction for an oracle request from the blockchain network. Preferably, the Oracle node receives data from an external data source by performing a transaction generated from the client in a transaction processing device.

전술한 제1 특징에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템에 있어서, 상기 오라클 노드가 오라클 요청에 따른 트랜잭션을 수행하여 외부 데이터 소스로부터 데이터를 전달받으면, 리더 오라클 노드에게 트랜잭션 처리 장치에서 수행된 코드와 데이터가 포함된 리포트 데이터(Report Data)를 보내는 것을 특징으로 하며, In the TEE-based decentralized oracle system according to the first aspect, when the Oracle node performs a transaction according to the Oracle request and receives data from an external data source, the transaction processing unit performs the transaction to the leader Oracle node It is characterized by sending the report data (Report Data) including the code and data,

상기 리더 오라클 노드는 리포트 데이터를 신뢰 실행 환경에서 원격 증명을 수행하여 검증하고, 검증된 트랜잭션을 포함한 블록을 생성하여 자신의 블록체인에 연결하고, 생성된 블록을 P2P 블록체인 네트워크를 통해 전파하고, 블록체인 네트워크의 전달 스마트 컨트랙트에 트랜잭션을 발생시켜 상기 데이터를 블록체인 네트워크로 전송하는 것이 바람직하다. The leader oracle node verifies the report data by performing remote verification in a trusted execution environment, creates a block including the verified transaction and connects it to its own block chain, and propagates the generated block through the P2P block chain network, It is desirable to transmit the data to the blockchain network by generating a transaction in the delivery smart contract of the blockchain network.

본 발명의 제2 특징에 따른 탈중앙형 오라클 시스템에서의 외부 데이터 전달 방법은, 프라이빗 블록체인 네트워크를 구성한 복수 개의 오라클 노드들 및 오라클 노드에 연결된 클라이언트를 구비하여, 외부의 블록체인 네트워크로부터의 요청에 따라 외부 데이터 소스의 데이터를 제공하는 탈중앙형 오라클 시스템에서의 오라클 노드 및 클라이언트에 의해 수행되는 외부 데이터 전달 방법에 관한 것으로서, (a) 클라이언트가 전달 스마트 컨트랙트를 모니터링하여 오라클 요청에 대한 트랜잭션을 발생시키는 단계; (b) 오라클 노드가 클라이언트로부터 발생된 트랜잭션을 트랜잭션 처리 장치에서 수행하여 외부 데이터 소스로부터 데이터를 받아오는 단계; (c) 상기 오라클 노드가 트랜잭션 처리 장치에서 수행된 코드와 데이터가 포함된 리포트 데이터를 리더 오라클 노드에게 전송하는 단계;를 구비한다. The method for transmitting external data in a decentralized oracle system according to the second aspect of the present invention includes a plurality of oracle nodes constituting a private blockchain network and a client connected to the oracle node, and includes a request from an external blockchain network. It relates to an external data delivery method performed by an oracle node and a client in a decentralized oracle system that provides data from an external data source according to generating; (b) receiving, by the Oracle node, data from an external data source by performing a transaction generated from a client in a transaction processing device; (c) transmitting, by the Oracle node, report data including codes and data executed by the transaction processing device to the leader Oracle node;

전술한 제2 특징에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템에서의 외부 데이터 전달 방법에 있어서, 상기 리더 오라클 노드는 PoET 합의 알고리즘에 따라 상기 복수 개의 오라클 노드들 중에서 선출되는 것이 바람직하다. In the method for transmitting external data in a TEE-based decentralized oracle system according to the second aspect, the leader oracle node is preferably selected from among the plurality of oracle nodes according to a PoET consensus algorithm.

전술한 제2 특징에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템에서의 외부 데이터 전달 방법은, (d) 오라클 노드로부터 리포트 데이터를 전달받은 상기 리더 오라클 노드는, 리포트 데이터를 신뢰 실행 환경에서 원격 증명을 수행하여 검증하고, 검증된 트랜잭션을 포함한 블록을 생성하여 자신의 블록체인에 연결하고, 생성된 블록을 P2P 블록체인 네트워크를 통해 전파하고, 블록체인 네트워크의 전달 스마트 컨트랙트에 트랜잭션을 발생시켜 상기 데이터를 블록체인 네트워크로 전송하는 단계;를 더 구비하는 것이 바람직하다. The method for transmitting external data in a TEE-based decentralized oracle system according to the second aspect described above includes, (d) the leader oracle node receiving the report data from the Oracle node, and remotely transmits the report data in a trusted execution environment. Validate by performing proof, create a block containing a verified transaction and connect it to your own block chain, propagate the generated block through the P2P block chain network, and generate a transaction in the delivery smart contract of the block chain network It is preferable to further include; transmitting the data to the blockchain network.

본 발명에 따른 탈중앙형 오라클 시스템은 복수 개의 오라클 노드들을 프라이빗 블록체인 네트워크인 하이퍼레저를 이용하여 구성함으로써, 단일 오라클 서버의 중앙화로 인한 단일 장애점 문제와 분산 오라클에서의 확장성과 성능 문제를 해결할 수 있게 된다.The decentralized oracle system according to the present invention can solve the single point of failure problem caused by the centralization of a single Oracle server and the scalability and performance problems in distributed oracles by configuring a plurality of oracle nodes using Hyperledger, a private blockchain network. be able to

또한, 본 발명에 따른 탈중앙형 오라클 시스템은 오라클 노드의 트랜잭션 처리장치를 신뢰 실행 환경인 Intel-SGX에서 실행되도록 하고, 외부 데이터 소스와 TLS 통신을 함으로써, 데이터 무결성을 보장하고, 외부 데이터를 가져오기 위한 TLS 통신을 각 오라클 노드의 Intel SGX Enclave 내부에서 수행하도록 하여 데이터 조작이 불가능하게 된다. In addition, the decentralized Oracle system according to the present invention enables the transaction processing unit of the Oracle node to run in Intel-SGX, a trusted execution environment, and ensures data integrity by performing TLS communication with an external data source and bringing external data. Data manipulation becomes impossible by making TLS communication to be performed inside the Intel SGX Enclave of each Oracle node.

또한, 본 발명에 따른 탈중앙형 오라클 시스템은 합의 알고리즘으로 PoET(Proof-of-Elapsed-Time)을 사용하여 리더 오라클 노드를 선출하고, 리더 오라클 노드는 다른 오라클 노드들이 외부 데이터 소스에서 TLS 통신을 이용하여 데이터를 가져오는 절차를 합의 과정에서 Intel SGX Enclave의 기능 중 하나인 원격 증명을 통해 검증한다. 따라서, 본 발명에 따른 오라클 시스템은 오라클 응답시간을 최소화시킬 수 있게 된다. In addition, the decentralized oracle system according to the present invention selects a leader oracle node by using PoET (Proof-of-Elapsed-Time) as a consensus algorithm, and the leader oracle node allows other Oracle nodes to perform TLS communication from an external data source. The procedure of fetching data using the system is verified through remote attestation, which is one of the functions of Intel SGX Enclave during the consensus process. Accordingly, the Oracle system according to the present invention can minimize the Oracle response time.

본 발명에 따른 탈중앙형 오라클 시스템은 하이퍼레저를 사용함으로써, 성능과 오라클 응답 시간에 대한 문제를 최소화하게 되며, 오라클 노드 수의 증가에 따라 성능이 저하되던 기존의 분산 오라클의 확장성 문제를 해결할 수 있게 된다. The decentralized oracle system according to the present invention minimizes problems with performance and Oracle response time by using Hyperledger, and solves the scalability problem of the existing distributed oracle, which has deteriorated as the number of Oracle nodes increases. be able to

또한, 본 발명에 따른 탈중앙형 오라클 시스템은 이더리움과 같은 데이터 요청 블록체인에서의 연산을 최소화하고, 데이터를 가져오는 과정 검증을 대신하게 된다. 또한, 본 발명에 따른 탈중앙형 오라클 시스템은 PoET 합의 알고리즘을 통해 데이터 어뷰징(Data Abusing)을 방지하여 오라클 응답시간을 보장하게 됨에 따라, 블록체인이 오라클에 데이터를 요청하고 데이터를 받는 사이의 시간인 오라클 응답 시간을 최소화함으로써, 시간에 따라 변하는 사물인터넷 데이터를 블록체인에 제공할 수 있게 된다. In addition, the decentralized oracle system according to the present invention minimizes the operation in the data request block chain such as Ethereum, and replaces the verification of the data retrieval process. In addition, the decentralized oracle system according to the present invention guarantees the oracle response time by preventing data abusing through the PoET consensus algorithm. By minimizing the in-oracle response time, it is possible to provide time-varying IoT data to the blockchain.

도 1은 본 발명의 바람직한 실시예에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템을 전체적으로 도시한 구성도이다.
도 2는 본 발명의 바람직한 실시예에 따른 신뢰 실행 환경을 기반으로 한 탈중앙형 오라클 시스템에 있어서, 합의 엔진 모듈에서 이루어지는 PoET 합의 과정을 도시한 모식도이다.
도 3은 본 발명의 바람직한 실시예에 따른 신뢰 실행 환경을 기반으로 한 탈중앙형 오라클 시스템에 있어서, 트랜잭션 처리장치(110)의 구조를 도시한 모식도이다.
도 4는 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 검증자의 원격 증명 과정을 설명하기 위하여 도시한 모식도이다.
도 5는 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 외부 데이터 전달을 위한 오라클 요청 및 응답 과정을 설명하기 위하여 도시한 모식도이다. 도 6은 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 오라클 요청 알고리즘에 대한 의사 코드이다.
도 7은 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 오라클 응답 알고리즘에 대한 의사 코드이다.
1 is a block diagram showing the overall configuration of a decentralized oracle system based on TEE according to a preferred embodiment of the present invention.
2 is a schematic diagram illustrating a PoET consensus process in a consensus engine module in a decentralized oracle system based on a trusted execution environment according to a preferred embodiment of the present invention.
3 is a schematic diagram illustrating the structure of a transaction processing unit 110 in a decentralized oracle system based on a trusted execution environment according to a preferred embodiment of the present invention.
4 is a schematic diagram illustrating a remote verification process of a verifier in a decentralized oracle system according to a preferred embodiment of the present invention.
5 is a schematic diagram illustrating an oracle request and response process for external data transfer in a decentralized oracle system according to a preferred embodiment of the present invention. 6 is a pseudo code for an oracle request algorithm in a decentralized oracle system according to a preferred embodiment of the present invention.
7 is a pseudo code for an oracle response algorithm in a decentralized oracle system according to a preferred embodiment of the present invention.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다. 명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Hereinafter, with reference to the accompanying drawings, the embodiments of the present invention will be described in detail so that those of ordinary skill in the art to which the present invention pertains can easily implement them. However, the present invention may be embodied in several different forms and is not limited to the embodiments described herein. And in order to clearly explain the present invention in the drawings, parts irrelevant to the description are omitted, and similar reference numerals are attached to similar parts throughout the specification. Throughout the specification, when a part "includes" a certain element, it means that other elements may be further included, rather than excluding other elements, unless otherwise stated.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예에 따른 신뢰 실행 환경(Trusted Execution Environment; TEE)을 기반으로 한 탈중앙형 오라클 시스템의 구성 및 동작을 구체적으로 설명한다. Hereinafter, the configuration and operation of a decentralized Oracle system based on a Trusted Execution Environment (TEE) according to a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.

먼저, 외부 소프트웨어로부터 고립된 환경에서 안전한 실행이 가능한 TEE는 여러 형태로 구현되어 각각 용어가 상이하다. 본 발명에서는 Intel Software Guard Extensions(SGX)를 기준으로 용어를 기술한다. 또한, 스마트 컨트랙트의 설명은 스마트 컨트랙트를 지원하는 블록체인 플랫폼 중 하나인 이더리움(Ethereum)의 스마트 컨트랙트를 기준으로 기술한다. First, TEE, which can be safely executed in an environment isolated from external software, is implemented in various forms, so the terms are different for each. In the present invention, terms are described based on Intel Software Guard Extensions (SGX). In addition, the description of smart contracts is based on smart contracts of Ethereum, one of the blockchain platforms that support smart contracts.

Enclave는 악의적인 개체로부터 응용 프로그램을 보호할 수 있는 독립적이고 안정성이 보장된 메모리 영역을 의미한다. Remote attestation은 Intel SGX의 고급 기능으로, Enclave가 안전한 환경에서 설정되었음을 원격 사용자에게 증명하는 프로세스다. Remote attestation을 통해 프로세스가 Enclave 내부에서 실행되었음과, 프로세스의 신원(Identity), 그리고 데이터와 코드의 무결성을 증명할 수 있다.Enclave refers to an independent and reliable memory area that can protect applications from malicious objects. Remote attestation is an advanced feature of Intel SGX, the process of proving to remote users that an enclave has been set up in a secure environment. Through remote attestation, it is possible to prove that the process has been executed inside the enclave, the identity of the process, and the integrity of data and code.

이더리움의 스마트 컨트랙트는 고유의 주소를 갖는 응용 프로그램이며, 실행하고자 하는 스마트 컨트랙트의 주소, 함수, 그리고 인자(Argument)를 지정한 트랜잭션을 생성함으로써 실행시킬 수 있다. 소스코드와 응용 프로그램의 데이터는 원장(혹은 블록)에 저장되어 있으며, 데이터들은 오로지 트랜잭션을 통해 값을 변화시킬 수 있다.Ethereum smart contract is an application program with a unique address, and it can be executed by creating a transaction that specifies the address, function, and argument of the smart contract to be executed. Source code and application program data are stored in the ledger (or block), and data can only change values through transactions.

도 1은 본 발명의 바람직한 실시예에 따른 TEE를 기반으로 한 탈중앙형 오라클 시스템을 전체적으로 도시한 구성도이다. 도 1을 참조하면, 본 발명에 따른 탈중앙형 오라클 시스템(1)은 신뢰 실행 환경(Trusted Execution Environment; 'TEE')을 기반으로 한 복수 개의 오라클 노드들(10)이 P2P(Peer to Peer) 네트워크를 형성하여 구성된 것을 특징으로 하며, 상기 탈중앙형 오라클 시스템(1)은 외부 데이터 소스(30)들로부터 외부 데이터를 수집하여 무결성의 외부 데이터를 블록체인 네트워크로 전달하는 것을 특징으로 한다. 특히, 본 발명에 따른 탈중앙형 오라클 시스템은 프라이빗 블록체인 네트워크인 하이퍼레저 소투스(Hyper-ledger Sawtooths)를 이용하여 복수 개의 오라클 노드들이 P2P 블록체인 네트워크를 구성하는 것이 바람직하다. 한편, 상기 탈중앙형 오라클 시스템(1)은 외부의 블록체인 네트워크를 모니터링하는 클라이언트(50)를 더 구비하는 것이 바람직하다. 1 is a block diagram showing the overall configuration of a decentralized oracle system based on TEE according to a preferred embodiment of the present invention. Referring to FIG. 1 , the decentralized oracle system 1 according to the present invention provides a plurality of oracle nodes 10 based on a Trusted Execution Environment ('TEE') that are peer-to-peer (P2P). It is characterized in that it is configured by forming a network, and the decentralized oracle system (1) collects external data from external data sources (30) and delivers external data of integrity to the blockchain network. In particular, in the decentralized oracle system according to the present invention, it is preferable that a plurality of oracle nodes constitute a P2P blockchain network using Hyper-ledger Sawtooths, a private blockchain network. On the other hand, it is preferable that the decentralized oracle system 1 further includes a client 50 that monitors an external blockchain network.

본 발명에 따른 탈중앙형 오라클 시스템을 구성하는 각 오라클 노드(10)는 검증자 노드이며, 검증자 노드는 합의 엔진 모듈(Consensus engine module;100), 트랜잭션 처리장치(Transaction Processor;110), 블록 매니지먼트 모듈(Block Management Module; 120) 및 P2P 네트워크 모듈(130)를 구비한다. 이하, 전술한 각 구성 요소들에 대하여 구체적으로 설명한다. Each oracle node 10 constituting the decentralized oracle system according to the present invention is a validator node, and the validator node includes a consensus engine module 100, a transaction processor 110, and a block. It includes a management module (Block Management Module; 120) and a P2P network module (130). Hereinafter, each of the above-described components will be described in detail.

상기 합의 엔진 모듈(Consensus engine module;100)은, 블록 생성을 위한 합의 알고리즘이 구동되는 모듈이다. 도 2는 본 발명의 바람직한 실시예에 따른 신뢰 실행 환경을 기반으로 한 탈중앙형 오라클 시스템에 있어서, 합의 엔진 모듈에서 이루어지는 PoET 합의 과정을 도시한 모식도이다. The consensus engine module 100 is a module in which a consensus algorithm for block generation is driven. 2 is a schematic diagram illustrating a PoET consensus process in a consensus engine module in a decentralized oracle system based on a trusted execution environment according to a preferred embodiment of the present invention.

합의 알고리즘은 블록체인에 연결할 다음 블록을 누가 만들고 어떤 방법으로 결정할지에 대한 알고리즘이다. 종래의 일반적인 블록체인 네트워크는 합의 알고리즘으로 작업 증명(Proof-of-Work;'PoW') 방식을 주로 사용하며, PoW 방식은 모든 채굴 노드가 특정 해시값으로 이루어진 퍼즐을 풀고, 먼저 푼 노드가 블록을 생성하여 보상을 받게 된다. 하지만, 전술한 PoW 방식은 자원 낭비가 심하게 발생하게 되므로, 신뢰할 수 있는 네트워크 참여자만 참여하도록 구성된 프라이빗 블록체인 네트워크에서는 적합하지 않다. 따라서, 본 발명에 따른 탈중앙형 오라클 시스템은 프라이빗 블록체인 네트워크로 구성하고 PoET(Proof-of-Elapsed-Time) 합의 알고리즘을 사용하는 것이 바람직하다. A consensus algorithm is an algorithm that determines who will make the next block to connect to the blockchain and in what way. Conventional general blockchain networks mainly use the Proof-of-Work ('PoW') method as a consensus algorithm. In the PoW method, all mining nodes solve a puzzle consisting of a specific hash value, and the first solved node blocks the block. will be created and rewarded. However, the above-described PoW method is not suitable for a private blockchain network configured to only participate in trusted network participants because it causes severe resource waste. Therefore, it is preferable to configure the decentralized oracle system according to the present invention as a private blockchain network and use a Proof-of-Elapsed-Time (PoET) consensus algorithm.

도 2를 참조하면, PoET는 각 블록체인 노드에게 동일한 연산인, 일종의 퍼즐을 신뢰 실행 환경의 Enclave 메모리 영역내에서 풀게 하고, 수행 시간만큼의 시드(seed) 값을 주고, 시드값을 기반으로 하여 리더 노드를 랜덤하게 선출하며, 이렇게 선출된 리더 노드가 블록 생성과 트랜잭션의 검증을 맡도록 하는 합의 방법이다. 전술한 PoET 방식은 기존의 PoW 방식에 비하여 적은 연산을 사용하며, 합의에 참여하는 노드 수가 증가하더라도 상수 시간내에 합의에 도달하게 된다. 또한, 최근 퍼블릭 블록체인에서 주로 사용되고 있는 PBFT 합의는 합의에 참여하는 노드의 수가 20개 이상이 되면 합의 속도가 급격하게 감소하는데 비하여, PoET 방식은 노드 수가 증가하더라도 합의에 도달하는 시간이 빠르므로 확장성이 있는 합의 알고리즘이라 할 수 있다. Referring to Figure 2, PoET causes each blockchain node to solve a kind of puzzle, which is the same operation, within the enclave memory area of the trusted execution environment, and gives a seed value for the execution time, and based on the seed value, It is a consensus method in which a leader node is randomly selected, and the selected leader node is responsible for block generation and transaction verification. The above-described PoET method uses fewer calculations than the existing PoW method, and even if the number of nodes participating in consensus increases, consensus is reached within a constant time. In addition, in the case of PBFT consensus, which is mainly used in public blockchains, the consensus speed rapidly decreases when the number of nodes participating in the consensus exceeds 20, whereas the PoET method expands because the time to reach consensus is fast even if the number of nodes increases. It can be said to be a consensual consensus algorithm.

도 3은 본 발명의 바람직한 실시예에 따른 신뢰 실행 환경을 기반으로 한 탈중앙형 오라클 시스템에 있어서, 트랜잭션 처리장치(110)의 구조를 도시한 모식도이다.3 is a schematic diagram illustrating the structure of a transaction processing unit 110 in a decentralized oracle system based on a trusted execution environment according to a preferred embodiment of the present invention.

도 3을 참조하면, 상기 트랜잭션 처리장치(Transaction Processor;110)는 각 오라클 노드가 트랜잭션을 수행하는 공간을 의미하는 것으로서, 트랜잭션 처리장치가 외부 데이터 소스로부터 데이터를 가져오는 작업을 수행하게 된다. 오라클 요청은 클라이언트에 의해 소투스 체인의 트랜잭션으로 요청되고, 요청된 트랜잭션은 검증자 노드의 트랜잭션 처리장치에서 수행된다. 본 발명에 따른 탈중앙형 오라클 시스템에 있어서, 각 오라클 노드의 트랜잭션 처리장치에서 수행되는 트랜잭션은 신뢰 실행 환경의 Enclave 메모리 영내에서 수행된다. 트랜잭션의 입력은 요청된 오라클 데이터의 소스와 요청 시점의 블록 넘버이고, ecall을 통해 오라클 데이터 소스를 신뢰 실행 환경의 Enclave 내부로 보내면, Enclave 내에서 오라클 데이터 소스에 TLS Connection을 생성하고 데이터를 가져오게 된다. 이 후, Enclave 내에서 데이터를 가져오는 코드가 올바르게 수행된 결과물인 데이터와 수행된 코드의 바이트 코드를 저장한 Report 자료 구조를 ocall로 반환받게 된다. Referring to FIG. 3 , the transaction processor 110 refers to a space in which each Oracle node performs a transaction, and the transaction processing device fetches data from an external data source. An oracle request is requested by the client as a transaction in the Sawtooth chain, and the requested transaction is performed in the transaction processing unit of the validator node. In the decentralized oracle system according to the present invention, a transaction performed in the transaction processing unit of each Oracle node is performed in the enclave memory area of the trusted execution environment. The input of the transaction is the source of the requested oracle data and the block number at the time of the request. do. After that, the data that is the result of correctly executing the data retrieval code from within the enclave and the Report data structure storing the byte code of the executed code are returned as ocall.

한편, 본 발명에 따른 오라클 시스템을 구성하는 모든 오라클 노드는 잠재적으로 검증자가 될 자격이 있다. 따라서, 모든 오라클 노드는 검증자 기능을 갖는 블록 매니지먼트 모듈을 구비한다. 도 4는 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 검증자의 원격 증명 과정을 설명하기 위하여 도시한 모식도이다. 도 4를 참조하면, PoET 합의 알고리즘을 통해 선출된 리더 오라클 노드는 상기 블록 매니지먼트 모듈(Block Management Module; 120)을 통해, 다른 오라클 노드들이 수행한 트랜잭션을 자신의 트랜잭션 처리장치 내의 Enclave에서 원격 증명을 통해 검증하고, 해당 트랜잭션에 데이터 또는 코드 조작에 대한 문제가 없으면 블록에 포함시킨다. 이후 검증자는 일정 주기마다 블록을 생성하고 블록체인에 연결하여 블록을 배포하는 역할을 한다. On the other hand, all Oracle nodes constituting the Oracle system according to the present invention are potentially eligible to be validators. Therefore, every Oracle node is equipped with a block management module with a validator function. 4 is a schematic diagram illustrating a remote verification process of a verifier in a decentralized oracle system according to a preferred embodiment of the present invention. Referring to FIG. 4 , the leader oracle node elected through the PoET consensus algorithm performs remote authentication of transactions performed by other oracle nodes through the Block Management Module 120 in the enclave in its own transaction processing unit. It is verified through the transaction, and if there is no problem with data or code manipulation in the transaction, it is included in the block. After that, the validator creates a block at regular intervals and distributes the block by connecting it to the block chain.

한편, 오라클 시스템으로 외부 데이터를 요청하는 블록체인 네트워크의 전달 스마트 컨트랙트는 블록체인 네트워크과 오라클 시스템을 연결해 주는 역할을 하는 스마트 컨트랙트로서, 블록체인 네트워크를 구성하는 노드들에 배포된다. 블록체인 네트워크의 일례로는 이더리움 등이 포함된다. 외부 데이터를 요구하는 사용자 컨트랙트가 전달 스마트 컨트랙터에 데이터를 요청하면, 요청된 트랜잭션이 블록체인 네트워크의 블록에 담기게 된다. On the other hand, the delivery smart contract of the blockchain network that requests external data to the oracle system is a smart contract that connects the blockchain network and the oracle system, and is distributed to the nodes constituting the blockchain network. An example of a blockchain network includes Ethereum and the like. When a user contract requesting external data requests data from the forwarding smart contract, the requested transaction is put into a block in the blockchain network.

한편, 오라클 시스템의 클라이언트(50)는 블록체인 네트워크의 블록을 모니터링하면서, 해당 데이터 요청에 대한 트랜잭션을 발생시키는 형태로 오라클 요청을 진행하게 된다. On the other hand, the client 50 of the Oracle system monitors the block of the block chain network and proceeds with the Oracle request in the form of generating a transaction for the corresponding data request.

오라클 시스템의 리더 오라클 노드는 오라클 노드로부터 외부 데이터가 전달되면, 자신에 블록을 전파함과 동시에 해당 블록 넘버와 트랜잭션 해쉬, 그리고 외부 데이터를 포함시킨 이더리움 트랜잭션을 전달 스마트 컨트랙트에 발생시킨다. 이후, 전달 스마트 컨트랙트에서 콜백(Callback) 함수를 통해 사용자 컨트랙트에 데이터를 전달한다. When external data is delivered from the Oracle node, the leader Oracle node of the Oracle system propagates a block to itself and at the same time generates an Ethereum transaction including the block number, transaction hash, and external data to the delivery smart contract. Thereafter, the data is transferred to the user contract through a callback function in the transfer smart contract.

이하, 도 5 내지 도 7을 참조하여 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서의 외부 데이터 전달을 위한 오라클 요청 및 응답에 대한 동작 과정을 구체적으로 설명한다. Hereinafter, an operation process for an oracle request and response for external data transfer in a decentralized oracle system according to a preferred embodiment of the present invention will be described in detail with reference to FIGS. 5 to 7 .

오라클 요청은 블록체인 네트워크의 사용자 컨트랙트(200)로부터 외부 데이터에 대한 요청이 발생하고, 전달 스마트 컨트랙트(210)를 통해 오라클 시스템에 트랜잭션이 발생하여 오라클 노드(10)의 트랜잭션 처리장치가 외부 데이터 소스(30)로부터 외부 데이터를 가져오는 과정까지를 의미한다. 오라클 응답은 오라클 노드의 트랜잭션 처리장치가 가져온 데이터를 PoET 합의 과정을 통해 오라클 시스템의 블록에 커밋(commit)되고, 이를 전달 스마트 컨트랙트를 거쳐 이더리움의 사용자 컨트랙트에 전달하는 과정이다. Oracle request is a request for external data from the user contract 200 of the blockchain network, and a transaction occurs in the Oracle system through the delivery smart contract 210, so that the transaction processing unit of the Oracle node 10 is an external data source It refers to the process of importing external data from (30). Oracle response is a process in which the data brought by the transaction processing unit of the Oracle node is committed to the block of the Oracle system through the PoET consensus process, and it is delivered to the user contract of Ethereum through the delivery smart contract.

도 5는 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 외부 데이터 전달을 위한 오라클 요청 및 응답 과정을 설명하기 위하여 도시한 모식도이다. 도 6은 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 오라클 요청 알고리즘에 대한 의사 코드이다.5 is a schematic diagram illustrating an oracle request and response process for external data transfer in a decentralized oracle system according to a preferred embodiment of the present invention. 6 is a pseudo code for an oracle request algorithm in a decentralized oracle system according to a preferred embodiment of the present invention.

도 5 및 도 6을 참조하여, 본 발명에 따른 탈중앙형 오라클 시스템에서의 오라클 요청 과정을 보다 구체적으로 설명한다. 오라클 요청 과정은 도 5의 과정 1부터 과정 5까지의 과정이다. 먼저, 블록체인 네트워크 상의 사용자 스마트 컨트랙트에서 전달 스마트 컨트랙트에게 오라클 요청을 보낸다(과정 1). 다음, 과정 1 이후, 블록체인 네트워크의 블록을 모니터링하던 오라클 시스템의 클라이언트가 오라클 요청이 발생하였음을 확인한다(과정 2). 다음, 클라이언트가 해당 오라클 요청에 대한 오라클 시스템의 트랜잭션을 발생시킨다(과정 3). 다음, 오라클 노드는 자신의 로컬 트랜잭션 처리장치에서 해당 트랜잭션을 수행한다(과정 4). 이때, 트랜잭션 처리장치의 비신뢰영역에서 신뢰 영역으로의 ocall이 발생한다. 다음, 오라클 노드가 신뢰 실행 환경의 Enclave 내에서 오라클 요청에 대한 TLS 통신을 연결하고 외부 데이터를 받아온다(과정 5). An oracle request process in the decentralized oracle system according to the present invention will be described in more detail with reference to FIGS. 5 and 6 . The Oracle request process is a process from process 1 to process 5 of FIG. 5 . First, the user smart contract on the blockchain network sends an oracle request to the forwarding smart contract (process 1). Next, after process 1, the client of the oracle system monitoring the block of the blockchain network confirms that an oracle request has occurred (process 2). Next, the client initiates a transaction in the Oracle system for the corresponding Oracle request (Step 3). Next, the Oracle node performs the corresponding transaction in its local transaction processing unit (Step 4). At this time, an ocall from the untrusted area of the transaction processing device to the trusted area occurs. Next, the Oracle node connects the TLS communication for the Oracle request within the enclave of the trusted execution environment and receives external data (process 5).

다음, 도 5 및 도 7을 참조하여, 본 발명에 따른 탈중앙형 오라클 시스템에서의 오라클 응답 과정을 보다 구체적으로 설명한다. Next, an oracle response process in a decentralized oracle system according to the present invention will be described in more detail with reference to FIGS. 5 and 7 .

도 7은 본 발명의 바람직한 실시예에 따른 탈중앙형 오라클 시스템에 있어서, 오라클 응답 알고리즘에 대한 의사 코드이다. 오라클 응답은 트랜잭션을 수행한 오라클 노드가 외부 데이터 소스로부터 데이터를 전달받은 이후 과정부터 최종적으로 블록체인 네트워크의 사용자 컨트랙트에 데이터가 전달되기 까지의 과정이다. 도 5의 과정 6 내지 과정 11이 오라클 응답 과정이다. 먼저, PoET 합의 알고리즘에 의해 선출된 리더 오라클 노드에게 트랜잭션 처리 장치에서 수행된 코드와 데이터가 포함된 report 데이터를 보내면, 리더 오라클 노드는 자신의 로컬 Enclave에서 원격 증명을 수행하여 데이터와 코드를 검증한다(과정 6). 다음, 과정 6 이후 검증된 트랜잭션을 포함한 블록을 생성하고(과정 7), 이를 자신의 로컬 상태 데이터베이스의 블록체인에 연결한다(과정 8). 다음, 생성된 블록을 P2P 네트워크를 통해 전파하여 블록생성 과정을 마친다(과정 9). 다음, 리더 오라클 노드가 외부 데이터를 이더리움 전달 스마트 컨트랙트에 트랜잭션을 발생시켜 전송하고(과정 10), 마지막으로 전달 스마트 컨트랜트가 외부 데이터를 요청한 사용자 컨트랙트에 데이터를 보내는 트랜잭션을 생성하여(과정 11) 오라클 응답을 종료한다. 7 is a pseudo code for an oracle response algorithm in a decentralized oracle system according to a preferred embodiment of the present invention. Oracle response is the process from when the oracle node that performed the transaction receives data from an external data source until the data is finally delivered to the user contract of the blockchain network. Steps 6 to 11 of FIG. 5 are Oracle response processes. First, the leader oracle node elected by the PoET consensus algorithm sends report data containing the code and data performed by the transaction processing unit, and the leader oracle node performs remote proof in its local enclave to verify the data and code. (Process 6). Next, create a block including the transaction verified after step 6 (step 7) and connect it to the blockchain of your local state database (step 8). Next, the block generation process is completed by propagating the generated block through the P2P network (Step 9). Next, the leader oracle node sends external data to the Ethereum forwarding smart contract by generating a transaction (process 10), and finally, the forwarding smart contract creates a transaction that sends data to the user contract that requested the external data (process 11) ) end the Oracle response.

이상에서 본 발명에 대하여 그 바람직한 실시예를 중심으로 설명하였으나, 이는 단지 예시일 뿐 본 발명을 한정하는 것이 아니며, 본 발명이 속하는 분야의 통상의 지식을 가진 자라면 본 발명의 본질적인 특성을 벗어나지 않는 범위에서 이상에 예시되지 않은 여러 가지의 변형과 응용이 가능함을 알 수 있을 것이다. 그리고, 이러한 변형과 응용에 관계된 차이점들은 첨부된 청구 범위에서 규정하는 본 발명의 범위에 포함되는 것으로 해석되어야 할 것이다. In the above, the present invention has been mainly described with respect to its preferred embodiment, but this is only an example and does not limit the present invention. It will be appreciated that various modifications and applications not exemplified above in the scope are possible. And, the differences related to such modifications and applications should be construed as being included in the scope of the present invention defined in the appended claims.

1 : 탈중앙형 오라클 시스템
10 : 오라클 노드
20 : 외부 블록체인 네트워크
200 : 사용자 컨트랙트
210 : 전달 스마트 컨트랙트
50 : 클라이언트
30 : 외부 데이터 소스
100 : 합의 엔진 모듈(Consensus engine module)
110 : 트랜잭션 처리장치(Transaction Processor)
120 : 블록 매니지먼트 모듈(Block Management Module)
130 : P2P 네트워크 모듈
1: Decentralized Oracle System
10 : Oracle Node
20: External blockchain network
200: user contract
210: forwarding smart contract
50 : client
30: External data source
100: consensus engine module
110: transaction processing unit (Transaction Processor)
120: block management module (Block Management Module)
130: P2P network module

Claims (8)

복수 개의 오라클 노드들이 프라이빗 블록체인 네트워크로 구성되어 외부의 블록체인 네트워크로부터의 요청에 따라 외부 데이터 소스의 데이터를 제공하는 것을 특징으로 하며,
상기 오라클 노드는,
외부의 블록체인 네트워크에 의해 요청된 트랜잭션을 신뢰 실행 환경(TEE)에서 수행하는 트랜잭션 처리 장치;
PoET(Proof-of-Elapsed-Time) 합의 알고리즘에 따라 상기 복수 개의 오라클 노드들 중 리더 오라클 노드를 무작위로 선출하는 합의 엔진 모듈;
리더 오라클 노드로 선출되면, 검증자로서 일정 주기마다 블록을 생성하고 블록체인에 연결하여 블록을 배포하도록 구성된 블록 매니지먼트 모듈;
를 구비하여, PoET 합의 알고리즘에 따라 오라클 노드들 중에서 선출된 리더 오라클 노드가 검증자 노드로서 동작할 수 있도록 구성된 것을 특징으로 하는 탈중앙형 오라클 시스템.
A plurality of oracle nodes are configured as a private blockchain network to provide data from an external data source in response to a request from an external blockchain network,
The Oracle node is
a transaction processing device that performs a transaction requested by an external blockchain network in a trusted execution environment (TEE);
a consensus engine module for randomly selecting a leader oracle node from among the plurality of oracle nodes according to a Proof-of-Elapsed-Time (PoET) consensus algorithm;
When elected as a leader oracle node, a block management module configured to create a block at regular intervals as a validator and distribute the block by connecting to the block chain;
A decentralized oracle system, characterized in that it is configured so that a leader oracle node selected from among oracle nodes according to a PoET consensus algorithm can operate as a verifier node.
제1항에 있어서,
상기 오라클 노드들은 프라이빗 블록체인 내트워크인 하이퍼레저를 이용하여 peer-to-peer(P2P) 블록체인 네트워크를 구성한 것을 특징으로 하는 탈중앙형 오라클 시스템.
According to claim 1,
A decentralized oracle system, characterized in that the oracle nodes constitute a peer-to-peer (P2P) blockchain network using Hyperledger, a private blockchain network.
제1항에 있어서,
상기 PoET 합의 알고리즘은 각 오라클 노드들이 동일한 연산을 푸는 수행 시간만큼의 시드값을 기반으로 하여 리더 오라클 노드를 무작위로 선출하고,
무작위로 선출된 리더 오라클 노드가 블록을 생성하고 트랜잭션을 검증하는 것을 특징으로 하는 탈중앙형 오라클 시스템.
According to claim 1,
The PoET consensus algorithm randomly selects a leader oracle node based on a seed value equal to the execution time for each oracle node to solve the same operation,
A decentralized oracle system, characterized in that randomly elected leader oracle nodes create blocks and verify transactions.
제1항에 있어서, 상기 탈중앙형 오라클 시스템은,
외부의 블록체인 네트워크의 전달 스마트 컨트랙트를 모니터링하는 클라이언트를 더 구비하고, 상기 클라이언트는 블록체인 네트워크로부터 오라클 요청에 대한 트랜잭션을 발생시키는 것을 특징으로 하며,
상기 오라클 노드는 상기 클라이언트로부터 발생된 트랜잭션을 트랜잭션 처리 장치에서 수행하여 외부 데이터 소스로부터 데이터를 받아오는 것을 특징으로 하는 탈중앙형 오라클 시스템.
According to claim 1, The decentralized oracle system,
Further comprising a client for monitoring a delivery smart contract of an external blockchain network, wherein the client generates a transaction for an oracle request from the blockchain network,
The Oracle node performs a transaction generated from the client in a transaction processing unit to receive data from an external data source.
제1항에 있어서, 상기 오라클 노드가 오라클 요청에 따른 트랜잭션을 수행하여 외부 데이터 소스로부터 데이터를 전달받으면, 리더 오라클 노드에게 트랜잭션 처리 장치에서 수행된 코드와 데이터가 포함된 리포트 데이터(Report Data)를 보내는 것을 특징으로 하며,
상기 리더 오라클 노드는
리포트 데이터를 신뢰 실행 환경에서 원격 증명을 수행하여 검증하고, 검증된 트랜잭션을 포함한 블록을 생성하여 자신의 블록체인에 연결하고, 생성된 블록을 P2P 블록체인 네트워크를 통해 전파하고, 블록체인 네트워크의 전달 스마트 컨트랙트에 트랜잭션을 발생시켜 상기 데이터를 블록체인 네트워크로 전송하는 것을 특징으로 하는 탈중앙형 오라클 시스템.
The method of claim 1, wherein when the Oracle node performs a transaction according to the Oracle request and receives data from an external data source, it sends report data including codes and data executed in the transaction processing device to the leader Oracle node. It is characterized by sending
The leader oracle node is
Validate report data by performing remote proof in a trusted execution environment, create a block including verified transactions and connect it to your own blockchain, propagate the generated block through the P2P blockchain network, and deliver the blockchain network A decentralized oracle system that generates a transaction in a smart contract and transmits the data to a blockchain network.
프라이빗 블록체인 네트워크를 구성한 복수 개의 오라클 노드들 및 오라클 노드에 연결된 클라이언트를 구비하여, 외부의 블록체인 네트워크로부터의 요청에 따라 외부 데이터 소스의 데이터를 제공하는 탈중앙형 오라클 시스템에서의 오라클 노드 및 클라이언트에 의해 수행되는 외부 데이터 전달 방법에 있어서,
(a) 클라이언트가 전달 스마트 컨트랙트를 모니터링하여 오라클 요청에 대한 트랜잭션을 발생시키는 단계;
(b) 오라클 노드가 클라이언트로부터 발생된 트랜잭션을 트랜잭션 처리 장치에서 수행하여 외부 데이터 소스로부터 데이터를 받아오는 단계;
(c) 상기 오라클 노드가 트랜잭션 처리 장치에서 수행된 코드와 데이터가 포함된 리포트 데이터를 리더 오라클 노드에게 전송하는 단계;
를 구비하는 것을 특징으로 하는 TEE를 이용한 탈중앙형 오라클 시스템에서의 외부 데이터 전달 방법.
Oracle node and client in a decentralized oracle system that provides data from an external data source in response to a request from an external blockchain network, including a plurality of oracle nodes constituting a private blockchain network and a client connected to the oracle node In the external data transfer method performed by
(a) the client monitoring the forwarding smart contract to generate a transaction for the oracle request;
(b) receiving, by the Oracle node, data from an external data source by performing a transaction generated from a client in a transaction processing device;
(c) transmitting, by the Oracle node, report data including codes and data executed by the transaction processing device to a leader Oracle node;
An external data delivery method in a decentralized Oracle system using TEE, characterized in that it comprises a.
제6항에 있어서, 상기 TEE를 이용한 탈중앙형 오라클 시스템에서의 외부 데이터 전달 방법에 있어서,
상기 리더 오라클 노드는 PoET 합의 알고리즘에 따라 상기 복수 개의 오라클 노드들 중에서 선출되는 것을 특징으로 하는 TEE를 이용한 탈중앙형 오라클 시스템에서의 외부 데이터 전달 방법.
The method according to claim 6, wherein in the method of transmitting external data in a decentralized oracle system using the TEE,
The leader oracle node is an external data delivery method in a decentralized oracle system using TEE, characterized in that selected from among the plurality of oracle nodes according to a PoET consensus algorithm.
제6항에 있어서, 상기 외부 데이터 전달 방법은,
(d) 오라클 노드로부터 리포트 데이터를 전달받은 상기 리더 오라클 노드는, 리포트 데이터를 신뢰 실행 환경에서 원격 증명을 수행하여 검증하고, 검증된 트랜잭션을 포함한 블록을 생성하여 자신의 블록체인에 연결하고, 생성된 블록을 P2P 블록체인 네트워크를 통해 전파하고, 블록체인 네트워크의 전달 스마트 컨트랙트에 트랜잭션을 발생시켜 상기 데이터를 블록체인 네트워크로 전송하는 단계;를 더 구비하는 것을 특징으로 하는 TEE를 이용한 탈중앙형 오라클 시스템에서의 외부 데이터 전달 방법.

The method of claim 6, wherein the external data transfer method comprises:
(d) The leader oracle node, which has received the report data from the Oracle node, verifies the report data by performing remote proof in a trusted execution environment, creates a block including the verified transaction, connects it to its own blockchain, and creates Decentralized oracle using TEE, characterized in that it further comprises; propagating the block through the P2P blockchain network, generating a transaction in the delivery smart contract of the blockchain network, and transmitting the data to the blockchain network A method of passing external data in the system.

KR1020200102278A 2020-08-14 2020-08-14 A TEE-based decentralized oracle system and method of transferring external data in the oracle system KR102565850B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200102278A KR102565850B1 (en) 2020-08-14 2020-08-14 A TEE-based decentralized oracle system and method of transferring external data in the oracle system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200102278A KR102565850B1 (en) 2020-08-14 2020-08-14 A TEE-based decentralized oracle system and method of transferring external data in the oracle system

Publications (2)

Publication Number Publication Date
KR20220021576A true KR20220021576A (en) 2022-02-22
KR102565850B1 KR102565850B1 (en) 2023-08-09

Family

ID=80494149

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200102278A KR102565850B1 (en) 2020-08-14 2020-08-14 A TEE-based decentralized oracle system and method of transferring external data in the oracle system

Country Status (1)

Country Link
KR (1) KR102565850B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180069856A (en) 2015-12-07 2018-06-25 아마존 테크놀로지스, 인크. Chain Security Systems
US20190095879A1 (en) 2017-09-26 2019-03-28 Cornell University Blockchain payment channels with trusted execution environments
KR102023101B1 (en) 2018-12-20 2019-11-04 주식회사 엔퍼 Apparatus for preventing forgery of original data and method thereof
KR20200062889A (en) * 2018-11-27 2020-06-04 한국전자통신연구원 Method and Apparatus for performing block agreement in block chain system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180069856A (en) 2015-12-07 2018-06-25 아마존 테크놀로지스, 인크. Chain Security Systems
US20190095879A1 (en) 2017-09-26 2019-03-28 Cornell University Blockchain payment channels with trusted execution environments
KR20200062889A (en) * 2018-11-27 2020-06-04 한국전자통신연구원 Method and Apparatus for performing block agreement in block chain system
KR102023101B1 (en) 2018-12-20 2019-11-04 주식회사 엔퍼 Apparatus for preventing forgery of original data and method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A. Beniiche, A Study of Blockchain Oracles, arXiv:2004.07140v2(2020.07.14.)* *
O. Dib et al., Consortium Blockchains: Overview, Applications and Challenges, International Journal on Advances in Telecommunications Vol.11(2018)* *

Also Published As

Publication number Publication date
KR102565850B1 (en) 2023-08-09

Similar Documents

Publication Publication Date Title
JP7076682B2 (en) Data processing methods, devices, electronic devices and computer programs based on blockchain networks
TWI740423B (en) System and method for providing privacy and security protection in blockchain-based private transactions
TWI734426B (en) Retrieving public data for blockchain networks using trusted execution environments
JP6865850B2 (en) Obtaining access data to the blockchain network using a highly available and reliable execution environment
JP6775086B2 (en) Blockchain monitoring and management
Ullah et al. Towards blockchain-based secure storage and trusted data sharing scheme for IoT environment
KR20200013679A (en) Script-based Blockchain Interaction
JP2024505692A (en) Data processing methods, devices and computer equipment based on blockchain networks
KR20200019944A (en) System and method for hierarchical token distribution in blockchain network
EP3543887B1 (en) Incentivized delivery network of iot software updates based on trustless proof-of-distribution
JP6951649B2 (en) Block verification device, block verification method, and program
EP3957025A1 (en) System and method for providing privacy and security protection in blockchain-based private transactions
Leiba et al. IoTPatchPool: Incentivized delivery network of IoT software updates based on proofs-of-distribution
JP2022532764A (en) Systems and methods for deparallelized mining in proof of work blockchain networks
KR102565850B1 (en) A TEE-based decentralized oracle system and method of transferring external data in the oracle system
KR102518634B1 (en) Blockchain consensus system and method to improve transaction processing speed
CN112181599B (en) Model training method, device and storage medium
Witanto et al. Blockchain-based OCF Firmware Update
Liu et al. Improving blockchains with client-assistance
KR102534411B1 (en) Blockchain consensus system and method considering network scalability
KR102428950B1 (en) Method and system for off-chain payment
Marcer Albareda Fog-Applying blockchain to secure a distributed set of clusters
CN116561820B (en) Trusted data processing method and related device
CN115796861B (en) Cross-chain transaction method, system, equipment and storage medium on blockchain
El Abid et al. LighTx: A Lightweight Proof-of-Bandwidth Transactions Transfer System

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant