KR102260226B1 - Block chain system and method thereof - Google Patents

Block chain system and method thereof Download PDF

Info

Publication number
KR102260226B1
KR102260226B1 KR1020190002274A KR20190002274A KR102260226B1 KR 102260226 B1 KR102260226 B1 KR 102260226B1 KR 1020190002274 A KR1020190002274 A KR 1020190002274A KR 20190002274 A KR20190002274 A KR 20190002274A KR 102260226 B1 KR102260226 B1 KR 102260226B1
Authority
KR
South Korea
Prior art keywords
smart contract
node
processing
nodes
execution node
Prior art date
Application number
KR1020190002274A
Other languages
Korean (ko)
Other versions
KR20200086402A (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 KR1020190002274A priority Critical patent/KR102260226B1/en
Publication of KR20200086402A publication Critical patent/KR20200086402A/en
Application granted granted Critical
Publication of KR102260226B1 publication Critical patent/KR102260226B1/en

Links

Images

Classifications

    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/101Server selection for load balancing based on network conditions
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • 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/1044Group management mechanisms 
    • 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/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • 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/133Protocols for remote procedure calls [RPC]
    • H04L67/40

Abstract

본 발명은 스마트 컨트랙트를 분산 처리하기 위한 블록체인 시스템 및 그 방법에 대한 것이다.
본 발명에 따르면, 특정 시점마다 블록을 생성하는 복수의 노드, 그리고 상기 노드에서 브로드캐스팅한 블록을 제공받아 검증을 하고 이를 참여하고 있는 노드에 배포하는 블록체인 네트워크를 포함하며,
상기 복수의 노드는, 클라이언트에 의해 입력된 스마트 컨트랙트 실행 요청 신호를 수신하고, 수신된 신호에 따라 스마트 컨트랙트를 처리하는 하나의 실행 노드, 그리고 상기 실행 노드의 주변에 위치하며, 상기 실행 노드가 저장하고 있는 원장과 동일한 원장을 가지는 복수의 주변 노드를 포함한다.
이와 같이 본 발명의 실시예에 따르면, 스마트 컨트랙트 처리 요청 신호를 수신한 노드가 동일한 블록을 가지고 있는 주변 노드에게 스마트 컨트랙트 정보를 제공하여 분담 처리함으로써, 하나의 노드에 업무가 집중되는 부담을 낮추고 많은 노드가 한꺼번에 실행될 수 있는 환경을 제공하는 효과를 지닌다.
또한, 본 발명의 실시예에 따르면, 스마트 컨트랙트를 분산하여 처리하므로 처리 시간이 증대되는 것을 방지하고, 처리량이 많은 스마트 컨트랙트도 신속한 처리가 가능한 효과를 도모할 수 있다.
The present invention relates to a blockchain system and method for distributed processing of smart contracts.
According to the present invention, it includes a plurality of nodes that generate blocks at specific time points, and a block chain network that receives blocks broadcast from the nodes, verifies them, and distributes them to participating nodes,
The plurality of nodes receive a smart contract execution request signal input by the client, and one execution node that processes the smart contract according to the received signal, and is located in the vicinity of the execution node, the execution node stores It includes a plurality of neighboring nodes that have the same ledger as the current ledger.
As described above, according to the embodiment of the present invention, the node receiving the smart contract processing request signal provides smart contract information to neighboring nodes having the same block for shared processing, thereby reducing the burden of concentrating tasks on one node and reducing the burden of many tasks. It has the effect of providing an environment in which nodes can be executed at once.
In addition, according to the embodiment of the present invention, since the smart contract is processed by distributing it, it is possible to prevent an increase in processing time, and it is possible to achieve the effect that a smart contract with a large amount of processing can be processed quickly.

Description

스마트 컨트랙트를 분산 처리하기 위한 블록체인 시스템 및 그 방법{Block chain system and method thereof}A blockchain system and method thereof for distributed processing of smart contracts

본 발명은 스마트 컨트랙트를 분산 처리하기 위한 블록체인 시스템 및 그 방법에 관한 것으로서, 더욱 상세하게는 선택된 노드에서만 처리가 되던 스마트 컨트랙트를 주변의 노드에 분산하여 처리하는 스마트 컨트랙트를 분산 처리하기 위한 블록체인 시스템 및 그 방법에 관한 것이다.The present invention relates to a blockchain system and method for distributed processing of smart contracts, and more particularly, to a blockchain for distributed processing of smart contracts that are processed by distributing smart contracts that were processed only in selected nodes to neighboring nodes. It relates to a system and a method therefor.

블록체인은 블록에 데이터를 담아 체인 형태로 연결하는 것으로, 수많은 컴퓨터에 동시에 이를 복제해 저장하는 분산형 데이터 저장 기술이다. 공공 거래 장부라고도 부르며, 중앙 집중형 서버에 거래 기록을 보관하지 않고 거래에 참여하는 모든 사용자에게 거래 내역을 보내 주며, 거래 때마다 모든 거래 참여자들이 정보를 공유하고 이를 대조해 데이터 위조나 변조를 할 수 없도록 한다.Blockchain is a distributed data storage technology that stores data in blocks and connects them in a chain form. Also called public transaction ledger, it does not store transaction records on a centralized server, but sends transaction details to all users participating in the transaction. In each transaction, all transaction participants share information and collate it to prevent forgery or falsification of data. make sure not to

블록체인에 저장하는 정보는 다양하므로 전자 결제나 디지털 인증뿐만 아니라 화물 추적 시스템, P2P 대출, 원산지부터 유통까지 전 과정을 추적하거나 예술품의 진품 감정, 위조화폐 방지, 전자투표, 전자시민권 발급, 차량 공유, 부동산 등기부, 병원 간 공유되는 의료기록 관리 등 신뢰성이 요구되는 다양한 분야에 활용할 수 있다.Since the information stored in the block chain is diverse, not only electronic payment or digital authentication, but also cargo tracking system, P2P lending, tracking the entire process from origin to distribution, authenticity assessment of artworks, counterfeit currency prevention, electronic voting, electronic citizenship issuance, vehicle sharing It can be used in various fields that require reliability, such as , real estate registers, and management of medical records shared between hospitals.

한편, 블록체인은 퍼블릭 블록체인과 프라이빗 블록체인으로 나뉘어지며, 퍼블릭 블록체인은 비트코인이나 이더리움 등 모두에게 개방되어 누구나 참여할 수 있는 형태이고, 프라이빗 블록체인은 기관 또는 기업이 운영하며 사용하는 형태로 참여수가 제한된 만큼 상태적으로 속도가 빠른 장점이 있다. On the other hand, blockchain is divided into public and private blockchains. Public blockchains are open to everyone, such as Bitcoin or Ethereum, and anyone can participate, while private blockchains are operated and used by institutions or companies. As the number of participants is limited, it has the advantage of being fast in state.

일반적으로 블록체인의 처리방법을 살펴보면, 하나의 노드에서 트랜잭션이 생성되면, 이를 현재 시점에서 블록을 생성할 수 있는 노드에게 전달하고, 이를 수신한 노드는 트랜잭션에 대한 검증을 진행한다. 검증이 완료된 트랜잭션을 생성된 불록에 저장하고 저장된 블록은 해쉬값을 포함하여 다른 노드에 배포함으로써 모든 참여자의 컴퓨터에 분산 저장될 수 있도록 한다. In general, looking at the processing method of the block chain, when a transaction is created in one node, it is transmitted to a node that can generate a block at the current time, and the node that receives it proceeds to verify the transaction. By storing the verified transaction in the generated block and distributing the stored block to other nodes including the hash value, it can be distributed and stored on the computers of all participants.

한편, 종래의 블록체인에 등록되어 작동하는 스마트 컨트랙트는 별도의 게이트웨이 역할을 하는 노드가 없으므로 사용자가 선택한 노드에게서만 처리가 되었다. On the other hand, smart contracts that are registered and operated in the conventional block chain are processed only by the node selected by the user because there is no node acting as a separate gateway.

따라서, 선택을 받은 노드는 처리량이 많더라도 요청된 스마트 컨트랙트를 처리해야 하는 부담이 있었다. 그리고, 하나의 노드에 스마트 컨트랙트가 집중됨으로써, 스마트 컨트랙트를 처리하는 시간이 증가되는 문제점이 있었다. Therefore, the selected node had the burden of processing the requested smart contract even if the throughput was high. And, since the smart contract is concentrated in one node, there is a problem in that the time for processing the smart contract is increased.

상기의 문제점을 해결하기 위하여 블록체인에 스마트 컨트랙트에 대한 런타임 시간을 제약하거나, 수수료를 부과하는 방법을 이용하였다. In order to solve the above problems, a method of limiting the runtime time for smart contracts or imposing fees on the block chain was used.

그러나 종래의 방법은 이더리움 또는 EOS의 경우, 처리량이 많은 스마트 컨트랙트는 컴파일 조차 할 수 없으며, 스마트 컨트랙트를 처리하는 노드의 업무가 노드마다 크게 차이가 나는 문제점은 여전히 존재하였다. However, in the case of Ethereum or EOS in the conventional method, there was still a problem that smart contracts with high throughput could not even be compiled, and that the tasks of nodes that process smart contracts differ greatly from node to node.

본 발명의 배경이 되는 기술은 대한민국 공개특허공보 제2018-0014534호(2018. 02. 09. 공개)에 개시되어 있다.The technology that is the background of the present invention is disclosed in Korean Patent Application Laid-Open No. 2018-0014534 (published on 02.09.2018).

본 발명이 이루고자 하는 기술적 과제는, 선택된 노드에서만 처리가 되던 스마트 컨트랙트를 주변의 노드에 분산하여 처리하는 스마트 컨트랙트를 분산 처리하기 위한 블록체인 시스템 및 그 방법을 제공하기 위한 것이다.The technical problem to be achieved by the present invention is to provide a blockchain system and method for distributed processing of smart contracts that are processed by distributing smart contracts that were processed only in selected nodes to neighboring nodes.

이러한 기술적 과제를 이루기 위한 본 발명의 실시예에 따르면, 스마트 컨트랙트를 분산 처리하기 위한 블록체인 시스템에 있어서, 특정 시점마다 블록을 생성하는 복수의 노드, 그리고 상기 노드에서 브로드캐스팅한 블록을 제공받아 검증을 하고 이를 참여하고 있는 노드에 배포하는 블록체인 네트워크를 포함하며, According to an embodiment of the present invention for achieving this technical task, in a blockchain system for distributed processing of smart contracts, a plurality of nodes that generate blocks at specific time points, and blocks broadcast from the nodes are provided and verified and a blockchain network that distributes it to participating nodes,

상기 복수의 노드는, 사용자에 의해 입력된 스마트 컨트랙트 처리 요청 신호를 수신하고, 수신된 신호에 따라 스마트 컨트랙트를 처리하는 하나의 실행 노드, 그리고 상기 실행 노드의 주변에 위치하며, 상기 실행 노드가 저장하고 있는 원장과 동일한 원장을 가지는 복수의 주변 노드를 포함한다. The plurality of nodes receive a smart contract processing request signal input by a user, and one execution node that processes the smart contract according to the received signal, and is located in the vicinity of the execution node, the execution node is stored It includes a plurality of neighboring nodes that have the same ledger as the current ledger.

상기 실행 노드는, RPC (Remote Procedure Call)프로토콜에 따라, 상기 복수의 주변 노드에게 처리할 스마트 컨트랙트 정보를 전달하고, 상기 복수의 주변 노드로 하여금 전달받은 스마트 컨트랙트 정보에 따라 트랜잭션을 대신 처리할 수 있다. The execution node transmits smart contract information to be processed to the plurality of neighboring nodes according to the RPC (Remote Procedure Call) protocol, and allows the plurality of neighboring nodes to process the transaction instead according to the received smart contract information have.

상기 실행 노드는, 상기 처리 요청 신호를 수신한 N개의 스마트 컨트랙트에 대해 N개의 주변 노드를 선택하고, 선택된 주변 노드에 스마트 컨트랙트에 대한 정보를 1개씩 각각 전달할 수 있다. The execution node may select N neighboring nodes for the N smart contracts that have received the processing request signal, and may transmit information on the smart contract one by one to the selected neighboring nodes.

상기 주변 노드는, 상기 실행 노드로부터 전달받은 스마트 컨트랙트에 따라 트랜잭션을 대신 처리하고, 처리 결과에 대한 트랜잭션을 저장한 블록을 상기 블록체인 네트워크에 브로드캐스팅하여 공개 원장에 등록할 수 있다. The neighboring node may instead process the transaction according to the smart contract received from the execution node, and broadcast the block storing the transaction for the processing result to the block chain network and register it in the public ledger.

본 발명의 다른 실시예에 따르면, 블록체인 시스템을 이용한 스마트 컨트랙트를 분산 처리하는 방법에 있어서, 실행 노드는 사용자로부터 스마트 컨트랙트 처리 요청 신호를 입력받는 단계, 상기 스마트 컨트랙트 처리 요청 신호를 수신한 실행 노드는 현재의 시점에서 스마트 컨트랙트에 대해 처리 가능한지 여부를 판단하는 단계, 그리고 상기 실행 노드는 현재의 시점에서 스마트 컨트랙트에 대해 처리가 불가능한 것으로 판단된 경우, 주변에 위치한 복수의 주변 노드를 이용하여 스마트 컨트랙트를 실행하는 단계를 포함한다. According to another embodiment of the present invention, in a method for distributed processing of a smart contract using a block chain system, the execution node receives a smart contract processing request signal from a user, and the execution node receives the smart contract processing request signal determining whether processing is possible for the smart contract at the current time point, and when it is determined that the execution node cannot process the smart contract at the current time point, a smart contract using a plurality of neighboring nodes located nearby including the step of executing

이와 같이 본 발명에 따르면, 스마트 컨트랙트 처리 요청 신호를 수신한 노드가 동일한 블록을 가지고 있는 주변 노드에게 스마트 컨트랙트 정보를 제공하여 분담 처리함으로써, 하나의 노드에 업무가 집중되는 부담을 낮추고 많은 노드가 한꺼번에 실행될 수 있는 환경을 제공하는 효과를 지닌다. As described above, according to the present invention, a node that has received a smart contract processing request signal provides smart contract information to neighboring nodes having the same block for shared processing, thereby reducing the burden of concentrating work on one node and allowing many nodes to be processed at once. It has the effect of providing an environment in which it can be executed.

또한, 본 발명의 실시예에 따르면, 스마트 컨트랙트를 분산하여 처리하므로 처리 시간이 증대되는 것을 방지하고, 처리량이 많은 스마트 컨트랙트도 신속한 처리가 가능한 효과를 도모할 수 있다. In addition, according to the embodiment of the present invention, since the smart contract is processed by distributing it, it is possible to prevent an increase in processing time and achieve the effect that a smart contract with a large amount of processing can be processed quickly.

도 1은 본 발명의 실시예에 따른 블록 체인 시스템을 개략적으로 도시한 도면이다.
도 2는 본 발명의 실시예에 따른 블록체인 시스템을 이용한 스마트 컨트랙트를 분산 처리하는 방법을 개략적으로 도시한 순서도이다.
도 3은 본 발명의 실시예에 따른 블록체인 시스템을 이용한 스마트 컨트랙트를 분산 처리하는 방법에 대한 흐름도이다.
1 is a diagram schematically illustrating a block chain system according to an embodiment of the present invention.
2 is a flowchart schematically illustrating a method for distributed processing of a smart contract using a block chain system according to an embodiment of the present invention.
3 is a flowchart of a method for distributed processing of a smart contract using a block chain system according to an embodiment of the present invention.

이하 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 이 과정에서 도면에 도시된 선들의 두께나 구성요소의 크기 등은 설명의 명료성과 편의상 과장되게 도시되어 있을 수 있다. Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings. In this process, the thickness of the lines or the size of the components shown in the drawings may be exaggerated for clarity and convenience of explanation.

또한 후술되는 용어들은 본 발명에서의 기능을 고려하여 정의된 용어들로서, 이는 사용자, 운용자의 의도 또는 관례에 따라 달라질 수 있다. 그러므로 이러한 용어들에 대한 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.In addition, the terms described below are terms defined in consideration of functions in the present invention, which may vary according to the intention or custom of the user or operator. Therefore, definitions of these terms should be made based on the content throughout this specification.

이하에서는 도 1을 이용하여 본 발명의 실시예에 따른 블록체인 시스템에 대해 더욱 상세하게 설명한다. Hereinafter, a block chain system according to an embodiment of the present invention will be described in more detail with reference to FIG. 1 .

도 1은 본 발명의 실시예에 따른 블록 체인 시스템을 개략적으로 도시한 도면이다. 1 is a diagram schematically illustrating a block chain system according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 블록 체인 시스템은 복수의 노드(100)를 포함하며, 복수의 노드(100)는 상호 연결되어 하나의 네트워크 구조로 형성된다. As shown in FIG. 1 , the block chain system includes a plurality of nodes 100 , and the plurality of nodes 100 are interconnected to form a single network structure.

노드(100)는 개인 또는 기업에서 사용하는 서버 또는 단말기로서, 온라인 거래에 따라 트랜잭션을 생성하고, 생성된 트랜잭션을 블록에 저장한다. 그리고, 노드(100)는 트랜잭션이 저장된 블록을 블록체인 네트워크에 브로드캐스팅한다. 즉, 노드(100)는 블록 생성, 배포, 저장의 역할을 한다. The node 100 is a server or terminal used by an individual or a company, and generates a transaction according to an online transaction, and stores the generated transaction in a block. Then, the node 100 broadcasts the block in which the transaction is stored to the blockchain network. That is, the node 100 plays a role of block generation, distribution, and storage.

그 다음, 복수의 노드(100)는 블록체인 네트워크를 통해 브로드캐스팅된 블록을 거래에 참여하는 모든 노드(100)에게 배포하여 분산형 원장을 생성한다. Then, the plurality of nodes 100 distributes the broadcast block through the blockchain network to all nodes 100 participating in the transaction to create a distributed ledger.

따라서, 거래에 참여하는 복수의 노드(100)는 거래가 발생 할 때마다 생성된 블록을 상호 공유하고, 이를 대조하여 데이터 위조나 변조를 미연에 방지한다. Therefore, a plurality of nodes 100 participating in a transaction share the generated block each time a transaction occurs, and collate it to prevent data forgery or falsification in advance.

한편, 노드(100)는 블록체인을 기반으로 하는 온라인 거래에 특정한 기능이 실행될 수 있도록 스마트 컨트랙트를 등록하고 처리한다. On the other hand, the node 100 registers and processes the smart contract so that a specific function can be executed in the online transaction based on the block chain.

스마트 컨트랙트는 복잡한 계산은 물론, 데이터의 기록과 변경, 가치의 전송 등 목적에 따라 다양한 형태의 계약을 체결하고 이행하는 소프트웨어이자 프로그래밍 가능한 디지털 계약이다. 따라서, 스마트 컨트랙트를 처리하여 생성된 결과는 블록체인 네트워크에 전달되어 원장에 등록된다. A smart contract is a software and programmable digital contract that concludes and executes various types of contracts according to purposes such as complex calculations, data recording and change, and value transfer. Therefore, the result generated by processing the smart contract is transmitted to the blockchain network and registered in the ledger.

한편, 스마트 컨트랙트는 사용자가 입력한 스마트 컨트랙트 실행 요청신호에 따라 처리되며, 사용자는 스마트 컨트랙트를 실행하고자 하는 노드를 선택한다. Meanwhile, the smart contract is processed according to the smart contract execution request signal input by the user, and the user selects a node to execute the smart contract.

사용자에 의해 선택된 노드를 통해서만 스마트 컨트랙트를 처리하게 되면, 하나의 노드에 복수의 스마트 컨트랙트가 집중될 수 있다. 부연하자면, 지정된 노드는 스마트 컨트랙트를 처리하는 도중에 다른 스마트 컨트랙트에 대한 처리 요청을 받을 수 있다. 그러면, 지정된 노드는 과부하가 발생되어 스마트 컨트랙트에 대한 처리 시간이 지연되고, 편중된 업무 처리로 인해 노드마다 처리하는 업무량이 크게 차이가 나는 문제점이 있었다. If the smart contract is processed only through the node selected by the user, a plurality of smart contracts can be concentrated in one node. In other words, a designated node can receive processing requests for other smart contracts while processing a smart contract. Then, the designated node is overloaded and the processing time for the smart contract is delayed, and there is a problem in that the amount of work processed by each node is greatly different due to the concentrated work processing.

따라서, 본 발명의 실시예에 따른 블록체인 시스템은 RPC (Remote Procedure Call)프로토콜에 따라, 사용자가 스마트 컨트랙트를 처리하고자 노드를 지정하면, 지정된 노드는 주변에 위치한 노드에게 스마트 컨트랙트에 대한 정보를 제공하여 대신 처리시킨다. Therefore, in the blockchain system according to the embodiment of the present invention, according to the Remote Procedure Call (RPC) protocol, when a user designates a node to process a smart contract, the designated node provides information about the smart contract to nearby nodes. to deal with it instead.

이하에서는 도 2 및 도 3을 이용하여 본 발명의 실시예에 따른 블록체인 시스템을 이용한 스마트 컨트랙트를 분산 처리하는 방법에 더욱 상세하게 설명한다. Hereinafter, a method for distributed processing of a smart contract using a block chain system according to an embodiment of the present invention will be described in more detail with reference to FIGS. 2 and 3 .

도 2는 본 발명의 실시예에 따른 블록체인 시스템을 이용한 스마트 컨트랙트를 분산 처리하는 방법을 개략적으로 도시한 순서도이고, 도 3은 본 발명의 실시예에 따른 블록체인 시스템을 이용한 스마트 컨트랙트를 분산 처리하는 방법에 대한 흐름도이다. 2 is a flowchart schematically illustrating a method for distributed processing of a smart contract using a blockchain system according to an embodiment of the present invention, and FIG. 3 is a distributed processing of a smart contract using a blockchain system according to an embodiment of the present invention. Here is a flow chart on how to do it.

도 2 및 도 3에 도시된 바와 같이, 사용자는 복수의 노드 중에서 하나의 노드(100)를 선택하고, 선택된 노드(100)에 스마트 컨트랙트를 처리 요청 신호를 입력한다(S210). 이하에서는 설명의 편의상 사용자가 선택한 노드(100)를 실행 노드(100-1)라고 하고, 실행 노드(100-1)와 동일한 블록을 가지고 있으며 주변에 위치하고 있는 노드(100)를 주변 노드(100-2)라고 명명한다. 2 and 3 , the user selects one node 100 from among a plurality of nodes, and inputs a smart contract processing request signal to the selected node 100 ( S210 ). Hereinafter, for convenience of explanation, the node 100 selected by the user is referred to as the execution node 100-1, and the node 100 having the same block as the execution node 100-1 and located in the vicinity is referred to as the neighboring node 100- 2) is named.

그 다음, 실행 노드(100-1)는 처리 요청 받은 스마트 컨트랙트에 대해 처리 가능한지의 여부를 판단한다(S220). Next, the execution node 100-1 determines whether processing is possible for the received smart contract (S220).

실행 노드(100-1)는 스마트 컨트랙트에 대한 처리 요청 신호를 받은 시점에서 처리하고 있는 업무량과 현재의 업무를 처리하는데 걸리는 시간 등을 기준으로 처리 요청 신호를 받은 스마트 컨트랙트를 직접 처리할 것인지 아니면 주변 노드를 통해 분산처리할 것인지 판단한다. The execution node 100-1 directly processes the smart contract that has received the processing request signal based on the amount of work being processed at the time it receives the processing request signal for the smart contract and the time it takes to process the current task. Determines whether to distribute processing through nodes

사용자로부터 스마트 컨트랙트 처리 요청 신호를 입력받은 실행 노드(100-1)는 현재의 시점에서 스마트 컨트랙트를 처리할 수 있는지의 여부를 판단한다. The execution node 100-1 receiving the smart contract processing request signal from the user determines whether the smart contract can be processed at the current time point.

그리고 판단된 결과에 따라, 실행 노드(100―1)는 처리 요청 받은 스마트 컨트랙트를 처리한다. 부연하자면, 현재의 시점에서 처리하고 있는 스마트 컨트랙트가 없거나, 처리하고 있는 스마트 컨트랙트가 처리 완료되는 시점에 도달하였다고 판단하면, 실행 노드(100-1)는 처리 요청 신호를 수신한 스마트 컨트랙트를 직접 처리한다. And according to the determined result, the execution node 100 - 1 processes the processing request received smart contract. In other words, if there is no smart contract being processed at the current point in time, or if it is determined that the smart contract being processed has reached the point of completion, the execution node 100-1 directly processes the smart contract that has received the processing request signal. do.

그러나, 현재 시점에서 처리하고 있는 스마트 컨트랙트가 존재하여 직접 처리가 불가능하다고 판단할 경우에는, 실행 노드(100-1)는 주변에 위치하고 있으며, 실행 노드(100-1)가 저장하고 있는 블록과 동일한 블록을 저장한 주변 노드(100-2)를 조회한다. However, if it is determined that direct processing is impossible because there is a smart contract being processed at the present time, the execution node 100-1 is located in the vicinity, and the same block as the block stored by the execution node 100-1 is determined. The neighboring node 100-2 that has stored the block is inquired.

그 다음, 실행 노드(100-1)는 조회된 복수개의 주변 노드(100―2)에게 스마트 컨트랙트 처리 요청 신호를 전달한다(S230).Next, the execution node 100-1 transmits a smart contract processing request signal to the inquired plurality of neighboring nodes 100-2 (S230).

실행 노드(100-1)로부터 스마트 컨트랙트 처리 요청 신호를 전달받은 복수개의 주변 노드(100-2)는 처리 가능 여부에 대한 신호를 실행 노드(100-1)에 전달한다.A plurality of neighboring nodes 100 - 2 receiving the smart contract processing request signal from the execution node 100 - 1 transmits a signal indicating whether processing is possible to the execution node 100 - 1 .

그 다음, 실행 노드(100-1)는 처리 가능하다라는 신호를 송신한 주변 노드(100-2)를 선택하고, 선택된 주변 노드(100-2)에게 사용자로부터 처리 요청된 스마트 컨트랙트에 대한 정보를 전달한다(S240)Next, the execution node 100-1 selects the neighboring node 100-2 that has transmitted the signal that it can be processed, and provides the selected neighboring node 100-2 with information about the smart contract requested to be processed by the user. Deliver (S240)

이때, 실행 노드(100-1)가 조회한 주변 노드(100-2)로부터 처리 불가능하다는 신호를 수신한다면, 실행 노드(100-1)는 다시 주변 노드(100-2)를 조회하고, 조회된 복수의 주변 노드(100―2)에게 스마트 컨트랙트 처리 요청 신호를 전달한다.At this time, if the execution node 100-1 receives a signal that it cannot be processed from the inquired neighboring node 100-2, the execution node 100-1 inquires the neighboring node 100-2 again, and A smart contract processing request signal is transmitted to a plurality of neighboring nodes 100 - 2 .

한편, 실행 노드(100-1)는 최대 15개의 주변 노드(100-2)와 연결되어 있으므로, 실행 노드(100-1)는 15개의 주변 노드(100-2)를 통해 스마트 컨트랙트를 분산 처리한다. On the other hand, since the execution node 100-1 is connected to up to 15 peripheral nodes 100-2, the execution node 100-1 distributes the smart contract through 15 peripheral nodes 100-2. .

이때, 주변 노드(100-2)는 한번에 하나의 스마트 컨트랙트만 처리 가능하다. 따라서, 사용자로부터 N개의 스마트 컨트랙트 처리 요청신호를 수신하였다면, 실행 노드(100-1)는 대신 처리가 가능한 N개의 주변 노드(100-2)를 조회하고 선택한다. In this case, the neighboring node 100-2 can process only one smart contract at a time. Accordingly, when receiving N smart contract processing request signals from the user, the execution node 100-1 inquires and selects N neighboring nodes 100-2 that can be processed instead.

예를 들어 설명하면, 실행 노드(100-1)가 사용자로부터 15개의 스마트 컨트랙트 처리 요청을 수신하면, 실행 노드(100-1)는 주변에 위치하고 있는 복수의 주변 노드(100-2)들 중에서 15개의 주변 노드(100-2)를 선택한다. For example, when the execution node 100-1 receives 15 smart contract processing requests from the user, the execution node 100-1 selects 15 from among a plurality of neighboring nodes 100-2 located in the vicinity. Four neighboring nodes 100 - 2 are selected.

이때, 선택되는 주변 노드는 실행 노드로부터 hop 수가 적거나, 스마트 컨트랙트의 처리 가능 용량이 큰 노드를 우선적으로 선택될 수 있다. In this case, the selected neighboring node may preferentially select a node with a small number of hops from the execution node or a large processing capacity of the smart contract.

그 다음, 실행 노드(100-1)는 선택된 15개의 주변 노드(100-2)에 각각의 스마트 컨트랙트에 대한 정보를 전달한다. Then, the execution node 100-1 transmits information about each smart contract to the selected 15 neighboring nodes 100-2.

스마트 컨트랙트에 대한 정보를 전달받은 주변 노드(100-2)는 실행 노드(100-1)를 대신하여 스마트 컨트랙트를 처리 수행한다(S250).The neighboring node 100-2 that has received the information on the smart contract processes the smart contract on behalf of the execution node 100-1 (S250).

스마트 컨트랙트를 대신 처리한 주변 노드(100-2)는 처리 결과를 블록체인 원장에 등록한다. 즉, 주변 노드(100-2)는 스마트 컨트랙트를 처리한 결과에 대한 트랜잭션을 현재의 시점에서 블록을 생성할 수 있는 노드(100)에게 전달한다. The neighboring node 100-2, which processed the smart contract instead, registers the processing result in the blockchain ledger. That is, the neighboring node 100-2 transmits a transaction for the result of processing the smart contract to the node 100 capable of generating a block at the current time point.

그 다음, 현재의 시점에서 블록을 생성할 수 있는 노드(100)는 전달받은 트랜잭션을 블록에 저장하여 블록체인 네트워크에 브로드캐스팅한다(S260).Next, the node 100 capable of generating a block at the current time stores the received transaction in a block and broadcasts it to the block chain network (S260).

그러므로, 스마트 컨트랙트에 대한 처리 결과를 저장한 블록은 블록체인 네트워크로 연결된 모드 노드(100)에게 배포되고, 모든 노드(100)는 배포받은 블록을 체인형태로 연결한다. Therefore, the block storing the processing result for the smart contract is distributed to all nodes 100 connected by the block chain network, and all nodes 100 connect the distributed block in a chain form.

이때, 주변 노드(100-2)는 스마트 컨트랙트의 처리 유무 즉, 처리 성공 여부에 대한 정보만 실행 노드(100-1)에 전달하고, 실행 노드(100-1)는 전달받은 처리 유무를 사용자에게 전달한다(S270). At this time, the neighboring node 100-2 transmits only information on whether the smart contract has been processed, that is, whether the processing is successful or not, to the execution node 100-1, and the execution node 100-1 informs the user of the received processing. It transmits (S270).

이와 같이 본 발명의 실시예에 따르면, 스마트 컨트랙트 처리 요청 신호를 수신한 노드가 동일한 블록을 가지고 있는 주변 노드에게 스마트 컨트랙트 정보를 제공하여 분담 처리함으로써, 하나의 노드에 업무가 집중되는 부담을 낮추고 많은 노드가 한꺼번에 실행될 수 있는 환경을 제공하는 효과를 지닌다. As described above, according to the embodiment of the present invention, the node receiving the smart contract processing request signal provides smart contract information to neighboring nodes having the same block for shared processing, thereby reducing the burden of concentrating tasks on one node and reducing the burden of many tasks. It has the effect of providing an environment in which nodes can be executed at once.

또한, 본 발명의 실시예에 따르면, 스마트 컨트랙트를 분산하여 처리하므로 처리 시간이 증대되는 것을 방지하고, 처리량이 많은 스마트 컨트랙트도 신속한 처리가 가능한 효과를 도모할 수 있다. In addition, according to the embodiment of the present invention, since the smart contract is processed by distributing it, the processing time is prevented from increasing, and it is possible to achieve the effect that a smart contract with a large amount of processing can be processed quickly.

본 발명은 도면에 도시된 실시예를 참고로 하여 설명되었으나 이는 예시적인 것에 불과하며, 당해 기술이 속하는 분야에서 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서 본 발명의 진정한 기술적 보호범위는 아래의 특허청구범위의 기술적 사상에 의하여 정해져야 할 것이다.Although the present invention has been described with reference to the embodiment shown in the drawings, which is only exemplary, those of ordinary skill in the art will understand that various modifications and equivalent other embodiments are possible therefrom. will be. Therefore, the true technical protection scope of the present invention should be determined by the technical spirit of the following claims.

100 : 노드
100-1 : 실행 노드
100-2 : 주변 노드
100 : node
100-1 : Execution Node
100-2: peripheral node

Claims (10)

스마트 컨트랙트를 분산 처리하기 위한 블록체인 시스템에 있어서,
특정 시점마다 블록을 생성하는 복수의 노드, 그리고
상기 노드에서 브로드캐스팅한 블록을 제공받아 검증을 하고 이를 참여하고 있는 노드에 배포하는 블록체인 네트워크를 포함하며,
상기 복수의 노드는,
사용자에 의해 입력된 스마트 컨트랙트 처리 요청 신호를 수신하고, 수신된 신호에 따라 스마트 컨트랙트를 처리하는 하나의 실행 노드, 그리고
상기 실행 노드의 주변에 위치하며, 상기 실행 노드가 저장하고 있는 원장과 동일한 원장을 가지는 복수의 주변 노드를 포함하며,
상기 실행 노드는,
RPC (Remote Procedure Call)프로토콜에 따라, 상기 복수의 주변 노드에게 처리할 스마트 컨트랙트 정보를 전달하고, 상기 복수의 주변 노드로 하여금 전달받은 스마트 컨트랙트 정보에 따라 트랜잭션을 대신 처리하며,
상기 처리 요청 신호를 수신한 N개의 스마트 컨트랙트에 대해 N개의 주변 노드를 선택하는 것으로, 상기 복수의 주변 노드 중에서 상기 실행 노드로부터 hop 수가 적거나, 스마트 컨트랙트의 처리 가능 용량이 큰 N개의 주변 노드를 선택하고, 선택된 주변 노드에 스마트 컨트랙트에 대한 정보를 1개씩 각각 전달하며,
상기 주변 노드는,
상기 실행 노드로부터 전달받은 스마트 컨트랙트에 따라 트랜잭션을 대신 처리하고, 처리 결과에 대한 트랜잭션을 저장한 블록을 상기 블록체인 네트워크에 브로드캐스팅하여 공개 원장에 등록하는 블록체인 시스템.
In a blockchain system for distributed processing of smart contracts,
A plurality of nodes that generate blocks at specific points in time, and
It includes a blockchain network that receives the block broadcast from the node, verifies it, and distributes it to participating nodes,
The plurality of nodes,
One execution node that receives the smart contract processing request signal input by the user and processes the smart contract according to the received signal; and
It is located in the vicinity of the execution node and includes a plurality of peripheral nodes having the same ledger as the ledger stored by the execution node,
The execution node is
According to the RPC (Remote Procedure Call) protocol, the smart contract information to be processed is transmitted to the plurality of neighboring nodes, and the plurality of neighboring nodes process the transaction according to the received smart contract information instead,
By selecting N neighboring nodes for the N smart contracts that have received the processing request signal, N neighboring nodes with a small number of hops from the execution node or with a large processing capacity of the smart contract among the plurality of neighboring nodes are selected. It selects and delivers information about the smart contract to the selected neighboring nodes one by one,
The peripheral node is
A blockchain system that processes a transaction according to the smart contract received from the execution node instead, and broadcasts the block storing the transaction for the processing result to the blockchain network and registers it in the public ledger.
삭제delete 삭제delete 삭제delete 삭제delete 블록체인 시스템을 이용한 스마트 컨트랙트를 분산 처리하는 방법에 있어서,
실행 노드는 사용자로부터 스마트 컨트랙트 처리 요청 신호를 입력받는 단계,
상기 스마트 컨트랙트 처리 요청 신호를 수신한 실행 노드는 현재의 시점에서 스마트 컨트랙트에 대해 처리 가능한지 여부를 판단하는 단계,
상기 실행 노드는 현재의 시점에서 스마트 컨트랙트에 대해 처리가 불가능한 것으로 판단된 경우, 주변에 위치한 복수의 주변 노드를 이용하여 스마트 컨트랙트를 처리하는 단계를 포함하며,
상기 스마트 컨트랙트를 처리하는 단계는,
상기 실행 노드가 저장하고 있는 원장과 동일한 원장을 가지며, 상기 스마트 컨트랙트에 대한 실행 처리가 가능한 복수의 주변 노드를 조회하는 단계,
RPC (Remote Procedure Call)프로토콜에 따라, 상기 조회된 복수의 주변 노드 중에서 스마트 컨트랙트 처리가 가능한 주변 노드에 스마트 컨트랙트 정보를 전달하는 단계, 그리고
상기 주변 노드가 상기 실행 노드로부터 전달받은 스마트 컨트랙트를 수행하면, 상기 실행 노드는 상기 주변 노드로부터 처리한 결과를 전달받는 단계를 포함하며,
상기 스마트 컨트랙트 정보를 전달하는 단계는,
상기 처리 요청된 N개의 스마트 컨트랙트에 대해 N개의 주변 노드를 선택하는 것으로. 상기 복수의 주변 노드 중에서 상기 실행 노드로부터 hop 수가 적거나, 스마트 컨트랙트의 처리 가능 용량이 큰 N개의 주변 노드가 선택하고, 선택된 주변 노드에 스마트 컨트랙트에 대한 정보를 전달하며,
상기 주변 노드는,
상기 실행 노드로부터 전달받은 스마트 컨트랙트에 따라 트랜잭션을 대신 처리하고, 처리 결과에 대한 트랜잭션을 저장한 블록을 상기 블록체인 네트워크에 브로드캐스팅하여 공개 원장에 등록하는 스마트 컨트랙트를 분산 처리하는 방법.
In a method for distributed processing of smart contracts using a block chain system,
The execution node receives a smart contract processing request signal from the user;
determining whether the execution node that has received the smart contract processing request signal can process the smart contract at the current time point;
When it is determined that the execution node cannot process the smart contract at the current time, processing the smart contract using a plurality of neighboring nodes located nearby;
The step of processing the smart contract is,
Inquiring a plurality of neighboring nodes having the same ledger as the ledger stored by the execution node and capable of execution processing for the smart contract;
According to the RPC (Remote Procedure Call) protocol, transmitting smart contract information to a neighboring node capable of smart contract processing among the plurality of inquired neighboring nodes, and
When the neighboring node executes the smart contract received from the execution node, the execution node receives the processing result from the neighboring node,
The step of transmitting the smart contract information includes:
By selecting N neighboring nodes for the N smart contracts requested to be processed. Among the plurality of neighboring nodes, N neighboring nodes with a small number of hops or a large processing capacity of the smart contract are selected from the execution node, and information about the smart contract is transmitted to the selected neighboring nodes,
The peripheral node is
A method of distributed processing a smart contract that processes a transaction instead of the smart contract received from the execution node, and broadcasts a block storing the transaction for the processing result to the blockchain network to register it in the public ledger.
삭제delete 삭제delete 삭제delete 삭제delete
KR1020190002274A 2019-01-08 2019-01-08 Block chain system and method thereof KR102260226B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190002274A KR102260226B1 (en) 2019-01-08 2019-01-08 Block chain system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190002274A KR102260226B1 (en) 2019-01-08 2019-01-08 Block chain system and method thereof

Publications (2)

Publication Number Publication Date
KR20200086402A KR20200086402A (en) 2020-07-17
KR102260226B1 true KR102260226B1 (en) 2021-06-04

Family

ID=71832337

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190002274A KR102260226B1 (en) 2019-01-08 2019-01-08 Block chain system and method thereof

Country Status (1)

Country Link
KR (1) KR102260226B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20230036797A (en) * 2021-09-08 2023-03-15 삼성전자주식회사 Electronic device generating a transaction and method in blockchain network
WO2023204411A1 (en) * 2022-04-19 2023-10-26 주식회사 블로코 Method for verifying certificate by using blockchain and system therefor

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100696879B1 (en) * 2005-10-18 2007-03-20 (주)노매딕텍스 Network System For Traffic Decentralization Processing And Decentralization Processing Method Using The Same
KR101778768B1 (en) * 2017-04-21 2017-09-18 (주)케이사인 METHOD OF CONTROLLING IoT DEVICE AND IoT DEVICE CONTROL SYSTEM FOR PERFORMING THE SAME

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100696879B1 (en) * 2005-10-18 2007-03-20 (주)노매딕텍스 Network System For Traffic Decentralization Processing And Decentralization Processing Method Using The Same
KR101778768B1 (en) * 2017-04-21 2017-09-18 (주)케이사인 METHOD OF CONTROLLING IoT DEVICE AND IoT DEVICE CONTROL SYSTEM FOR PERFORMING THE SAME

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
신다혜, 이종협. "핀테크를 위한 스마트 컨트랙트 보안." 정보처리학회지, Vol. 22, pp. 54-62(2015.) 1부.*

Also Published As

Publication number Publication date
KR20200086402A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
US11108856B2 (en) Methods and apparatus for performing distributed computing using blockchain
US11907174B2 (en) Systems and methods for managing data generation, storage, and verification in a distributed system having a committee of validator nodes
CN110622474B (en) Secure block link routing techniques
CN110392094B (en) Method for acquiring service data and converged CDN system
CN109829718B (en) Block chain multi-level framework based on storage application scene and operation method thereof
US20090182814A1 (en) solving mixed integer programs with peer-to-peer applications
JP7041993B2 (en) Blockchain-based transaction system
CN111566992A (en) Initiation of a security enhanced blockchain transaction
CN112292681A (en) Validating and providing compensation for participation of real-time streams of multimedia over decentralized networks
US20200380050A1 (en) Method for acquiring service data and converged cdn system
CN111711526B (en) Method and system for consensus of block chain nodes
EP3763078A1 (en) Methods of electing leader nodes in a blockchain network using a role-based consensus protocol
KR102260226B1 (en) Block chain system and method thereof
US20200402026A1 (en) Blockchain management system, blockchain management apparatus, information providing apparatus, and blockchain management method
US20200082405A1 (en) Method and system for client support in a blockchain network
US20180196948A1 (en) Distributed and decentralized clound storage system and method thereof
JP2022511686A (en) Intelligent, autonomous, decentralized market for distributed computing and storage
CN110910000A (en) Block chain asset management method and device
JP2018535500A (en) Temporary consensus network in resource transfer system
US10419359B2 (en) Resource path monitoring
US20230351370A1 (en) Electronic wallet and method for atomic swapping of two different blockchain tokens by using electronic wallet
CN110351362A (en) Data verification method, equipment and computer readable storage medium
Matzutt et al. Utilizing public blockchains for the sybil-resistant bootstrapping of distributed anonymity services
CN106559474B (en) High-throughput data processing method and system for distributed general ledger
KR102137641B1 (en) Transactional Batch Processing System and Method using Block Chain

Legal Events

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