KR102559881B1 - Method and appartaus for selecting distributed consensus node based on proof-of-nonce - Google Patents

Method and appartaus for selecting distributed consensus node based on proof-of-nonce Download PDF

Info

Publication number
KR102559881B1
KR102559881B1 KR1020220160534A KR20220160534A KR102559881B1 KR 102559881 B1 KR102559881 B1 KR 102559881B1 KR 1020220160534 A KR1020220160534 A KR 1020220160534A KR 20220160534 A KR20220160534 A KR 20220160534A KR 102559881 B1 KR102559881 B1 KR 102559881B1
Authority
KR
South Korea
Prior art keywords
nonce
node
nodes
block
chain
Prior art date
Application number
KR1020220160534A
Other languages
Korean (ko)
Other versions
KR20220164460A (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
Priority claimed from KR1020210182454A external-priority patent/KR102472874B1/en
Application filed by 한국전자통신연구원 filed Critical 한국전자통신연구원
Publication of KR20220164460A publication Critical patent/KR20220164460A/en
Application granted granted Critical
Publication of KR102559881B1 publication Critical patent/KR102559881B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Abstract

본 발명에 따른 블록체인 생성 장치의 합의노드 선정 방법은, 노드의 난스 체인으로부터 난스를 읽어오는 단계, 상기 읽혀진 난스와 이전 height 정보를 연산하는 단계, 및 상기 노드를 합의노드로 선정하기 위하여 상기 연산된 값과 기준값을 비교하는 단계를 포함할 수 있다.A method for selecting a consensus node of a blockchain generating device according to the present invention may include reading a nonce from a nonce chain of a node, calculating the read nonce and previous height information, and comparing the calculated value with a reference value to select the node as a consensus node.

Description

난스 증명 기반 분산합의 노드 선정 방법 및 장치{METHOD AND APPARTAUS FOR SELECTING DISTRIBUTED CONSENSUS NODE BASED ON PROOF-OF-NONCE}Distributed consensus node selection method and apparatus based on nonce proof {METHOD AND APPARTAUS FOR SELECTING DISTRIBUTED CONSENSUS NODE BASED ON PROOF-OF-NONCE}

본 발명은 난스 증명 기반 분산합의 노드 선정 방법 및 장치에 관한 것이다.The present invention relates to a method and apparatus for selecting a distributed agreement node based on a nonce proof.

일반적으로, 블록체인 기술은 P2P 네트워크 기술, 보안 및 암호화 기술, 및 분산 컴퓨팅 플랫폼 기술 등 다양한 기술로 구성된 융합기술이다. 특히, 블록체인 기술은 공인된 제3의 중앙기관 없이 거래에 참여하는 참가자(이하 노드)들이 거래정보를 검증하고, 이를 블록(Block) 단위로 기록/생성하고, 노드마다 동기화된 정보를 공유하도록 합의하여 하나의 분산원장(Distributed Ledger)으로 유지하기 위한 무결성(Integrity) 및 신뢰성(Reliability) 보장 기술로 정의할 수 있다. 기존 중앙 집중형 시스템에서는 제3의 중앙기관이 거래정보가 조작되지 않도록 중앙화된 원장의 독점적인 관리를 통해 간접적이고 수동적으로 신뢰를 보장하였다. 블록체인에서는 제3의 중앙기관에게 일임하였던 간접적이고 수동적인 방식을 대신해서, 노드가 직접 참여하여 합의하는 방식(합의 알고리즘)을 통해 원장을 분산으로 관리한다. 블록체인 구성기술 중 가장 중요한 핵심기술은 신뢰할 수 없는 노드들 간에 하나의 블록체인을 유지하기 위한 합의 알고리즘이다. 합의 알고리즘을 통해 모든 노드가 블록 생성(이하, 채굴이라고 함) 기회를 공평하게 갖는 공평성 및 탈중앙화, 합의 주체 노드에 대한 공격 가능성과 원장훼손 가능성 등으로부터 안전할 수 있는 보안성 등의 블록체인의 중요한 특성을 제공한다. In general, blockchain technology is a convergence technology composed of various technologies such as P2P network technology, security and encryption technology, and distributed computing platform technology. In particular, blockchain technology can be defined as an integrity and reliability guarantee technology for maintaining a single Distributed Ledger by verifying transaction information, recording/creating it in block units, and agreeing to share synchronized information for each node. In the existing centralized system, a third party indirectly and passively guaranteed trust through exclusive management of the centralized ledger to prevent transaction information from being manipulated. In blockchain, instead of the indirect and passive method entrusted to a third party central institution, the ledger is managed in a distributed manner through a method in which nodes directly participate and agree (consensus algorithm). The most important core technology among block chain construction technologies is a consensus algorithm for maintaining one block chain between untrusted nodes. It provides important characteristics of blockchain, such as fairness and decentralization in which all nodes have equal opportunities to create blocks (hereinafter referred to as mining) through consensus algorithms, and security that can be safe from the possibility of attack on the consensus node and damage to the ledger.

공개특허: 10-2017-0137388, 공개일: 2017년 12월 13일, 제목: 블록체인 기술을 이용한 무결성 보장 방법.Patent Publication: 10-2017-0137388, Publication Date: December 13, 2017, Title: Integrity Guarantee Method Using Blockchain Technology. 미국공개특허: US 2017-0344987, 공개일: 2017년 11월 30일, 제목: METHOD AND SYSTEM FOR AN EFFICIENT CONSENSUS MECHANISM FOR PERMSSIONED BLOCKCHAINS USING BLOOM FILTERS AND AUDIT GUARANTEES.US Patent Publication: US 2017-0344987, Publication Date: November 30, 2017, Title: METHOD AND SYSTEM FOR AN EFFICIENT CONSENSUS MECHANISM FOR PERMSSIONED BLOCKCHAINS USING BLOOM FILTERS AND AUDIT GUARANTEES. 미국공개특허: US 2019/0068380, 공개일: 2019년 1월 28일(최초출원일: 2017년 8월 21일, CN 2017106\736740.5), 제목: BLOCKCHAIN CONSENSUS NODE SELECTION.US Patent Publication: US 2019/0068380, Publication Date: January 28, 2019 (Initial Application Date: August 21, 2017, CN 2017106\736740.5), Title: BLOCKCHAIN CONSENSUS NODE SELECTION.

본 발명의 목적은 분산합의에 참여하는 노드(분산합의 노드)가 전체 노드의 대표로 미리 예측할 수 없는 분산합의 노드 선정 방법을 제공하는데 있다.An object of the present invention is to provide a distributed agreement node selection method in which a node participating in a distributed agreement (a distributed agreement node) cannot be predicted in advance as a representative of all nodes.

본 발명의 목적은 분산합의에 필요한 주체 개수를 제어 할 수 있는 분산합의 노드 선정 방법을 제공하는 데 있다.An object of the present invention is to provide a distributed agreement node selection method capable of controlling the number of subjects required for distributed agreement.

본 발명의 목적은 노드가 소유한 자산(연산 능력 등)이 분산합의 자격 획득에 영향을 주지 않는 분산합의 노드 선정 방법을 제공하는데 있다.An object of the present invention is to provide a distributed agreement node selection method in which assets owned by nodes (such as computing power) do not affect acquisition of distributed agreement qualifications.

본 발명의 목적은 분산합의에 참여하는 노드의 자격을 검증 할 수 있는 분산합의 노드 선정 방법을 제공하는데 있다.An object of the present invention is to provide a distributed agreement node selection method capable of verifying the qualifications of nodes participating in the distributed agreement.

본 발명의 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재들로부터 당업자에게 명확하게 이해될 수 있을 것이다The technical problems of the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the description below.

본 발명의 실시 예에 따른 블록체인 생성 장치의 합의노드 선정 방법은, 노드의 난스 체인으로부터 난스를 읽어오는 단계; 상기 읽혀진 난스와 이전 height 정보를 연산하는 단계; 및 상기 노드를 합의노드로 선정하기 위하여 상기 연산된 값과 기준값을 비교하는 단계를 포함할 수 있다.A method for selecting an agreement node of a block chain generating apparatus according to an embodiment of the present invention includes the steps of reading a nonce from a nonce chain of a node; calculating the read nonce and previous height information; and comparing the calculated value with a reference value in order to select the node as an agreement node.

실시 예에 있어서, 상기 난스 체인은 해쉬 체인(hash chain)인 것을 특징으로 한다.In an embodiment, the nonce chain is a hash chain.

실시 예에 있어서, 상기 난스 체인을 생성하는 단계를 더 포함할 수 있다.In an embodiment, the step of generating the nonce chain may be further included.

실시 예에 있어서, 상기 난스 체인을 생성하는 단계는, 상기 노드가 비공개로 유지하는 마스터 키를 이용하여 상기 난스 체인을 생성하는 단계를 포함할 수 있다.In an embodiment, generating the nonce chain may include generating the nonce chain using a master key kept private by the node.

실시 예에 있어서, 상기 마스터 키를 이용하여 상기 난스 체인을 생성하는 단계는, 상기 마스터 키를 이용하여 베이스를 생성하는 단계; 상기 베이스를 복수번 반복 해쉬함으로써 해쉬 체인을 생성하는 단계; 및 상기 해쉬 체인을 사용하기 시작할 start height을 설정하는 단계를 포함할 수 있다.In an embodiment, generating the nonce chain using the master key may include generating a base using the master key; generating a hash chain by repeatedly hashing the base a plurality of times; and setting a start height to start using the hash chain.

실시 예에 있어서, 블록이 주기적으로 생성되는 시간에 대응하는 상기 난스 체인의 길이가 결정되는 것으로 특징으로 한다.In an embodiment, it is characterized in that the length of the nonce chain corresponding to the time at which blocks are periodically generated is determined.

실시 예에 있어서, 상기 연산하는 단계는, 상기 읽혀진 난스와 이전 height 정보를 해쉬 연산하는 단계를 포함할 수 있다.In an embodiment, the calculating may include hash calculating the read nonce and previous height information.

실시 예에 있어서, 상기 이전 height 정보는 이전 블록의 헤더 해쉬 값을 포함할 수 있다.In an embodiment, the previous height information may include a header hash value of the previous block.

실시 예에 있어서, 상기 비교 결과로써 상기 연산된 값이 상기 기준값 보다 작을 때, 상기 난스 체인의 마지막 난스 값, 상기 난스 체인을 시작한 start height, 상기 노드의 주소를 다른 노드들에 공개하는 단계를 더 포함할 수 있다.In an embodiment, when the calculated value as a result of the comparison is smaller than the reference value, the step of disclosing the last nonce value of the nonce chain, the start height of the nonce chain, and the address of the node to other nodes. Can be further included.

실시 예에 있어서, elite pool에 상기 다른 노드들의 난스 체인 정보를 등록하는 단계를 더 포함하고, 상기 난스 체인 정보는 대응하는 노드의 주소, 대응하는 난스 체인의 마지막 난스 값, 및 상기 대응하는 난스 체인을 시작한 start height를 포함할 수 있다.In an embodiment, the step of registering nonce chain information of the other nodes in an elite pool may be further included, and the nonce chain information may include an address of a corresponding node, a last nonce value of a corresponding nonce chain, and a start height at which the corresponding nonce chain was started.

실시 예에 있어서, 상기 노드의 주소는 공개키 혹은 상기 노드를 한정하는 값을 포함하는 것을 특징으로 한다.In an embodiment, the address of the node is characterized in that it includes a public key or a value limiting the node.

실시 예에 있어서, 상기 노드가 포함된 모든 노드들이 이전 블록이 생성되기 전까지 다음 블록의 합의노드 선정 여부를 예측 할 수 없도록 하기 위하여 상기 이전 블록의 정보를 이용하여 합의노드를 선정하는 것을 특징으로 한다.In an embodiment, an agreement node is selected using information of the previous block so that all nodes including the node cannot predict whether or not to select an agreement node for the next block until the previous block is generated.

실시 예에 있어서, 상기 노드를 포함하는 모든 노드가 합의노드로 선택될 수 있는 계산 기회를 height 마다 1회 부여하기 위하여 상기 난스 체인에서 읽어온 난스를 해쉬 함수의 난스로 이용하는 것을 특징으로 한다.In an embodiment, a nonce read from the nonce chain is used as a nonce of the hash function in order to give a calculation opportunity for all nodes including the node to be selected as a consensus node once per height.

실시 예에 있어서, 분산합의에 참여 가능한 노드의 개수가 n이고, 상기 분산합의에 필요한 최소 노드의 개수가 x이고, 상기 분산합의에 필요한 최소 노드의 개수 이하로 선택될 누적 분포 확률 값이 k 일 때, 상기 분산합의 노드의 개수는 변수(n, x, k)에 의해 제어 되는 것을 특징으로 한다.In an embodiment, when the number of nodes capable of participating in the distributed agreement is n, the minimum number of nodes required for the distributed agreement is x, and the cumulative distribution probability value to be selected below the minimum number of nodes required for the distributed agreement is k, the number of nodes in the distributed agreement is controlled by variables (n, x, k).

실시 예에 있어서, 상기 누적 분포 확률 값 k는 이항분포 특성을 갖는 것을 특징으로 한다.In an embodiment, the cumulative distribution probability value k has a binomial distribution characteristic.

실시 예에 있어서, 상기 노드의 합의노드에 선정될 확률은 변수(n, x, k)에 의해 결정되는 베르누이 시행에 따른 확률 값 Px,k인 것을 특징으로 한다.In an embodiment, the probability of being selected as the consensus node of the node is a probability value P x,k according to a Bernoulli trial determined by variables (n, x, k).

실시 예에 있어서, 상기 노드의 elite pool에 등록된 노드의 개수가 변화할 경우, 상기 기준값을 변경하는 단계를 더 포함할 수 있다.In an embodiment, when the number of nodes registered in the elite pool of the node changes, the step of changing the reference value may be further included.

실시 예에 있어서, 상기 기준값은 상기 확률 값 Px,k와 상기 연산된 값을 곱함으로써 계산되는 것을 특징으로 한다.In an embodiment, the reference value is characterized in that it is calculated by multiplying the probability value P x,k and the calculated value.

실시 예에 있어서, 상기 노드의 합의노드 선정 여부를 판단하는 기회는 height 마다 1회로 제한되는 것을 특징으로 한다.In an embodiment, the opportunity to determine whether the node selects an agreement node is limited to once per height.

실시 예에 있어서, 상기 노드의 합의노드 선정 여부에 대한 판단 기회는 1회 이상 m회 이하로 제한되는 것을 특징으로 한다.In an embodiment, the opportunity to determine whether or not the node selects an agreement node is limited to one or more m times or less.

본 발명의 실시 예에 따른 블록체인 생성 장치의 합의노드 검증 방법은, 합의노드의 선정된 제 1 노드로부터 난스 값, 새로운 블록의 height, 및 상기 제 1 노드의 주소를 수신하는 단계; 제 2 노드의 elite pool에서 상기 제 1 노드의 주소에 대응하는 공개 난스 값 및 start height를 꺼내는 단계; 상기 새로운 블록의 height에서 상기 start height를 빼는 단계; 상기 빼어진 height 번만큼 상기 수신된 난스 값을 해쉬 연산하는 단계; 및 상기 제 1 노드의 합의노드 자격을 검증하기 위하여 상기 해쉬 연산된 값과 상기 제 1 노드로부터 공개된 상기 공개 난스 값을 비교하는 단계를 포함할 수 있다.A method for verifying a consensus node of an apparatus for generating a blockchain according to an embodiment of the present invention includes receiving a nonce value, a height of a new block, and an address of the first node from a first node selected from the consensus node; extracting a public nonce value and a start height corresponding to the address of the first node from an elite pool of a second node; subtracting the start height from the height of the new block; hashing the received nonce value by the subtracted height times; and comparing the hash calculated value with the public nonce value disclosed from the first node to verify qualification of the first node as a consensus node.

실시 예에 있어서, 상기 해쉬 연산된 값과 상기 공개 난스 값이 동일할 때, 상기 제 1 노드의 블록 생성 권한이 검증되는 것을 특징으로 한다.In an embodiment, when the hash calculated value is equal to the public nonce value, block generation authority of the first node is verified.

실시 예에 있어서, 상기 해쉬 연산된 값과 상기 공개 난스 값이 동일하지 않을 때, 상기 제 1 노드는 블록체인 생성 혹은 사용에 불이익을 받는 것을 특징으로 한다.In an embodiment, when the hash calculated value and the public nonce value are not identical, the first node is disadvantageous in creating or using a blockchain.

본 발명의 실시 예에 따른 블록체인 생성 장치의 난스 체인 업데이트 방법은, 합의노드 선정에 이상이 없었는 지 추후에 확인 가능하도록 하기 위하여 원장에 난스 체인에 대응하는 베이스 해쉬값을 기록하는 단계; 노드의 마스터 키를 이용하여 새로운 베이스 해쉬 값을 계산하는 단계; 상기 베이스 해쉬 값을 이용하여 새로운 난스 체인을 생성하는 단계; 및 상기 새로운 난스 체인의 마지막 난스 값과 start height를 다른 노드들에게 공개하는 단계를 포함할 수 있다.The method of updating the nonce chain of the block chain generating device according to an embodiment of the present invention includes the steps of recording a base hash value corresponding to the nonce chain in the ledger so that it can be later confirmed whether there is any abnormality in the selection of the consensus node; Calculating a new base hash value using the master key of the node; generating a new nonce chain using the base hash value; and disclosing the last nonce value and start height of the new nonce chain to other nodes.

실시 예에 있어서, 상기 새로운 난스 체인은 상기 난스 체인의 모든 값이 소진될 때 업데이트 되는 것을 특징으로 한다.In an embodiment, the new nonce chain is updated when all values of the nonce chain are exhausted.

실시 예에 있어서, 상기 새로운 난스 체인은 상기 노드가 블록 생성에 성공할 때 강제로 업데이트 되는 것을 특징으로 한다.In an embodiment, the new nonce chain is forcibly updated when the node succeeds in generating a block.

본 발명의 실시 예에 따른 블록체인 생성 장치의 노드 라이브니스 검증 방법은, 분산합의 노드들의 개수를 카운트하는 단계; 및 상기 카운트된 값이 사전에 결정된 값보다 작은 지를 판별하는 단계를 포함하고, 상기 분산합의 노드들의 각각은 난스 체인을 이용하여 선정되는 것을 특징으로 한다.A node liveness verification method of a block chain generating device according to an embodiment of the present invention includes counting the number of distributed agreement nodes; and determining whether the counted value is smaller than a predetermined value, wherein each of the distributed agreement nodes is selected using a nonce chain.

실시 예에 있어서, 상기 사전에 결정된 값은 노드의 블록 생성 후보 선정될 확률 분포의 평균값에 연관된 값인 것을 특징으로 한다.In an embodiment, the predetermined value is characterized in that it is a value associated with an average value of a probability distribution in which a node is selected as a block generation candidate.

실시 예에 있어서, 상기 평균값은 elite pool에 등록된 노드의 개수, 분산합의를 위하여 필요한 최소 노드의 개수, 및 상기 최소 노드 이하의 노드가 선택될 누적 분포 확률 값에 의해 결정되는 것을 특징으로 한다.In an embodiment, the average value is characterized in that it is determined by the number of nodes registered in the elite pool, the minimum number of nodes required for distributed agreement, and a cumulative distribution probability value in which nodes below the minimum node will be selected.

실시 예에 있어서, 상기 누적 분포 확률 값은 베르누이 시행에 따른 성공 확률 값인 것을 특징으로 한다.In an embodiment, the cumulative distribution probability value is a success probability value according to a Bernoulli trial.

본 발명의 실시 예에 따른 블록체인을 발생하는 분산 컴퓨팅 시스템은: 난스 체인을 해쉬 체인 기반으로 생성하고, start height, 상기 난스 체인의 난스 값, 및 노드의 주소를 갖는 난스 체인 정보를 다른 노드들에게 공개하는 적어도 하나의 제 1 노드; 및 상기 난스 체인 정보와 상기 적어도 하나의 제 1 노드로부터 수신된 난스 값과 height을 이용하여 상기 적어도 하나의 제 1 노드의 합의노드 선정 자격을 검증하는 적어도 하나의 제 2 노드를 포함할 수 있다.A distributed computing system for generating a blockchain according to an embodiment of the present invention includes: at least one first node that creates a nonce chain based on a hash chain and discloses to other nodes information about the nonce chain having a start height, a nonce value of the nonce chain, and an address of the node; and at least one second node verifying the consensus node selection qualification of the at least one first node by using the nonce chain information and the nonce value and height received from the at least one first node.

실시 예에 있어서, 상기 적어도 하나의 제 1 노드가 블록 생성에 성공할 때, 상기 난스 체인을 업데이트 되는 것을 특징으로 한다.In an embodiment, when the at least one first node succeeds in generating a block, the nonce chain is updated.

실시 예에 있어서, 상기 적어도 하나의 제 2 노드는 상기 난스 체인 정보를 등록하는 elite pool를 더 포함할 수 있다.In an embodiment, the at least one second node may further include an elite pool registering the nonce chain information.

실시 예에 있어서, 상기 elite pool 에서 상기 적어도 하나의 제 1 노드가 탈퇴함으로써 합의 주체에서 빠지는 것을 특징으로 한다.In an embodiment, it is characterized in that the at least one first node leaves the elite pool, thereby leaving the consensus body.

실시 예에 있어서, 상기 적어도 하나의 제 1 노드를 상기 elite pool에 등록하기 위하여 블록체인의 거래내역이 이용되는 것을 특징으로 한다.In an embodiment, it is characterized in that transaction details of a blockchain are used to register the at least one first node in the elite pool.

본 발명의 실시 예에 따른 블록체인 생성 장치는: 적어도 하나의 프로세서; 및 상기 적어도 하나의 프로세서에 의해 실행되는 적어도 하나의 인스트럭션을 저장하는 메모리를 포함하고, 상기 적어도 하나의 인스트럭션은, 노드의 난스 체인으로부터 난스를 읽어오고; 상기 읽혀진 난스와 이전 height 정보를 연산하고; 및 상기 노드를 합의노드로 선정하기 위하여 상기 연산된 값과 기준값을 비교하도록 상기 적어도 하나의 프로세서에서 실행되는 것을 특징으로 한다.A blockchain generating device according to an embodiment of the present invention includes: at least one processor; and a memory storing at least one instruction executed by the at least one processor, the at least one instruction reading a nonce from a nonce chain of a node; calculating the read nonce and previous height information; and comparing the calculated value with a reference value in order to select the node as an agreement node.

본 발명의 실시 예에 따른 난스 증명 기반 분산합의 노드 선정 방법 및 장치는, 분산합의에 참여하는 노드를 예측할 수 없도록 하여 다른 악의적인 노드가 분산합의 노드를 예측하여 공격하는 것이 불가능하다.The method and apparatus for selecting a distributed agreement node based on the nonce proof according to an embodiment of the present invention make it impossible to predict the nodes participating in the distributed agreement, so that it is impossible for other malicious nodes to predict and attack the distributed agreement node.

본 발명의 실시 예에 따른 난스 증명 기반 분산합의 노드 선정 방법 및 장치는, 전체 노드 중 분산합의에 필요한 최소한의 노드만 분산합의 자격을 얻을 수 있도록 하여 분산합의 참여 노드 간 빠른 합의가 가능하다.The method and apparatus for selecting distributed agreement nodes based on the nonce proof according to an embodiment of the present invention allow only the minimum number of nodes necessary for distributed agreement among all nodes to obtain distributed agreement qualifications, enabling fast agreement between nodes participating in distributed agreement.

본 발명의 실시 예에 따른 난스 증명 기반 분산합의 노드 선정 방법 및 장치는, 노드의 연산 능력과 무관하게 분산합의 자격을 얻을 수 있도록 하여 강력한 연산 능력을 확보한 일부의 노드가 분산합의 자격을 독점 할 수 없다.The distributed agreement node selection method and apparatus based on the nonce proof according to an embodiment of the present invention enable the distributed agreement qualification to be obtained regardless of the node's computing capability, so that some nodes having strong computing capability cannot monopolize the distributed agreement qualification.

본 발명의 실시 예에 따른 난스 증명 기반 분산합의 노드 선정 방법 및 장치는, 분산합의에 참여하는 노드의 자격을 검증 할 수 있도록 하여 자격 없는 노드의 분산합의 참여를 차단할 수 있다.The distributed agreement node selection method and apparatus based on the nonce proof according to an embodiment of the present invention can verify the qualifications of nodes participating in the distributed agreement, thereby preventing unqualified nodes from participating in the distributed agreement.

이하에 첨부되는 도면들은 본 실시 예에 관한 이해를 돕기 위한 것으로, 상세한 설명과 함께 실시 예들을 제공한다. 다만, 본 실시예의 기술적 특징이 특정 도면에 한정되는 것은 아니며, 각 도면에서 개시하는 특징들은 서로 조합되어 새로운 실시 예로 구성될 수 있다.
도 1은 본 발명의 실시 예에 따른 블록체인을 예시적으로 보여주는 도면이다.
도 2는 본 발명의 실시 예에 따른 PoN 기반 분산합의 알고리즘을 위한 난스 체인을 예시적으로 보여주는 도면이다.
도 3은 본 발명의 실시 예에 따른 난스 체인 사용 방법을 예시적으로 설명하기 위한 도면이다.
도 4는 본 발명의 실시 예에 따른 PoN 기반 합의노드 알고리즘에서 노드의 elite pool의 구조를 예시적으로 보여주는 도면이다.
도 5는 본 발명의 실시 예에 따른 PoN 기반 분산합의 알고리즘에서 총 노드별 평균 노드 선택에 대한 시뮬레이션 결과를 예시적으로 보여주는 도면이다.
도 6은 본 발명의 실시 예에 따른 노드의 새로운 블록 생성 권한 확인 방법을 예시적으로 보여주는 도면이다.
도 7은 본 발명의 실시 예에 따른 분산합의에 참여하는 노드의 자격 검증하는 방법을 예시적으로 보여주는 도면이다.
도 8은 본 발명의 실시 예에 따른 난스 체인 갱신하는 방법을 예시적으로 보여주는 도면이다.
도 9는 본 발명의 실시 예에 따른 노드의 liveness 확인 방법을 예시적으로 보여주는 도면이다.
도 10은 본 발명의 실시 예에 따른 블록체인 생성 장치(1000)를 예시적으로 보여주는 도면이다.
The accompanying drawings are provided to aid understanding of the present embodiment, and provide embodiments along with detailed descriptions. However, the technical features of this embodiment are not limited to specific drawings, and features disclosed in each drawing may be combined with each other to form a new embodiment.
1 is a diagram showing a block chain according to an embodiment of the present invention by way of example.
2 is a diagram exemplarily showing a nonce chain for a PoN-based distributed agreement algorithm according to an embodiment of the present invention.
3 is a diagram for illustratively explaining a method of using a nonce chain according to an embodiment of the present invention.
4 is a diagram exemplarily showing the structure of an elite pool of nodes in the PoN-based consensus node algorithm according to an embodiment of the present invention.
5 is a diagram exemplarily showing simulation results for average node selection for each total node in the PoN-based distributed agreement algorithm according to an embodiment of the present invention.
6 is a diagram exemplarily illustrating a method for checking a node's right to create a new block according to an embodiment of the present invention.
7 is a diagram exemplarily illustrating a method of verifying qualifications of nodes participating in distributed agreement according to an embodiment of the present invention.
8 is a diagram exemplarily showing a method of updating a nonce chain according to an embodiment of the present invention.
9 is a diagram exemplarily illustrating a method for verifying the liveness of a node according to an embodiment of the present invention.
10 is a diagram showing a block chain generation device 1000 according to an embodiment of the present invention by way of example.

아래에서는 도면들을 이용하여 본 발명의 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있을 정도로 본 발명의 내용을 명확하고 상세하게 기재할 것이다.In the following, the content of the present invention will be described clearly and in detail to the extent that a person skilled in the art can easily implement the present invention using drawings.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있는바, 특정 실시 예들을 도면에 예시하고 본문에 상세하게 설명하고자 한다. 그러나 이는 본 발명을 특정한 개시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 제 1, 제 2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로 사용될 수 있다. 예를 들어, 본 발명의 권리 범위로부터 이탈되지 않은 채 제 1 구성요소는 제 2 구성요소로 명명될 수 있고, 유사하게 제 2 구성요소도 제 1 구성요소로 명명될 수 있다. 어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 혹은 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. Since the present invention can have various changes and various forms, specific embodiments will be illustrated in the drawings and described in detail in the text. However, this is not intended to limit the present invention to a specific form disclosed, and should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. Terms such as first and second may be used to describe various components, but the components should not be limited by the terms. The terms may be used for the purpose of distinguishing one component from another. For example, a first element may be termed a second element, and similarly, a second element may be termed a first element, without departing from the scope of the present invention. It should be understood that when an element is referred to as being “connected” or “connected” to another element, it may be directly connected or connected to the other element, but other elements may exist in the middle. On the other hand, when an element is referred to as “directly connected” or “directly connected” to another element, it should be understood that no other element exists in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위하여 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 혹은 "가지다" 등의 용어는 실시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 혹은 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 혹은 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 혹은 이들을 조합한 것들의 존재 혹은 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. 다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미이다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미인 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Terms used in this application are only used to describe specific embodiments, and are not intended to limit the present invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this application, terms such as "comprise" or "having" are intended to designate that an embodied feature, number, step, operation, component, part, or combination thereof exists, but it should be understood that the presence or addition of one or more other features or numbers, steps, operations, components, parts, or combinations thereof is not precluded. Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs. Terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with the meaning in the context of the related art, and unless explicitly defined in the present application, they are not interpreted in an ideal or excessively formal meaning.

일반적으로 블록체인은 분산된 환경에서 각각의 노드들이 블록을 생성하고 자신이 생성한 블록의 정보를 전파하거나, 다른 노드가 생성한 블록에 대한 정합성 판별 및 검증을 수행할 수 있다. 이 과정에서, 각각의 노드들 사이에 이루어진 트랜잭션에 대한 기록이나 블록 생성 및 검증을 위한 내용들은 모든 노드에서 동일하게 기록되어야 한다. 이 때, 블록체인에 참여하는 모든 노드가 동일한 정보를 기록하고 있는 상태를 유지하기 위하여 사용되는 프로토콜이 분산합의(Distributed Consensus) 알고리즘이다. 즉, 분산합의 알고리즘이란 분산된 환경에서 복수의 주체가 협업하는 과정 중에 발생할 수 있는 불일치를 해결하여 시스템을 통일된 상태로 유지하기 위한 알고리즘이다. 또한, 분산합의주체는 블록체인에 새로운 블록을 제안하고 연결하는 분산합의 과정에 참여 자격을 얻은 노드이다.In general, in a blockchain, in a distributed environment, each node can create a block and propagate the information of the block it created, or determine and verify the consistency of the block created by other nodes. In this process, the records of transactions made between each node or contents for block creation and verification must be identically recorded in all nodes. At this time, the protocol used to maintain the state in which all nodes participating in the blockchain record the same information is the Distributed Consensus algorithm. In other words, the distributed agreement algorithm is an algorithm to maintain the system in a unified state by resolving inconsistencies that may occur during the process of collaboration between multiple subjects in a distributed environment. In addition, a distributed consensus entity is a node that is qualified to participate in the distributed consensus process that proposes and connects new blocks to the blockchain.

블록체인에서 사용되는 대표적인 합의 알고리즘은 PoW(Proof of Work) 기반 알고리즘이다. PoW는 Nakamoto(Bitcoin), Ethash(Ethereum) 등 주요 블록체인에서 사용하고 있지만, 연산 능력 독점 등으로 인한 중앙화 문제가 발생 가능하여 무의미한 전력 소모를 많이 하고 있다. 이를 극복하기 위한 PoS(Proof of Stake), DPoS(Delegated Proof of Stake), PoW+PBFT(Practical Byzantine Fault Tolerance), DPoS+PBFT 등 많은 방식이 제안되고 있지만, 여전히 중앙화 문제, 과다한 통신비용, 특정 대상 지정 공격에 취약 등의 다양한 문제가 있다.The representative consensus algorithm used in blockchain is PoW (Proof of Work) based algorithm. PoW is used in major blockchains such as Nakamoto (Bitcoin) and Ethash (Ethereum), but it consumes a lot of meaningless power because centralization problems can occur due to monopolization of computing power. To overcome this, many methods such as PoS (Proof of Stake), DPoS (Delegated Proof of Stake), PoW+PBFT (Practical Byzantine Fault Tolerance), and DPoS+PBFT have been proposed, but there are still various problems such as centralization problems, excessive communication costs, and vulnerability to specific targeted attacks.

일반적으로 PoW, PoS 방식에서는 전체 노드가 합의 주체가 되고 있다. PoW 방식의 경우, 블록을 생성하기 위하여 전체 노드가 난스(nonce)를 찾기 위한 무의미한 계산을 하기 때문에 전력 소모로 의한 비용 및 환경문제가 발생되고 있다. 또한 연산능력의 담합으로 인한 중앙화 문제, 및 거래속도를 요구하는 응용에 적용할 수 없는 Scalability 한계가 있다. PoS 방식의 경우, PoW의 전력 소모 문제를 해결하기 위하여 제안되었으나 전체노드가 합의를 위하여 과다한 트래픽 발생 등의 문제가 있다.In general, in PoW and PoS methods, all nodes become the subject of consensus. In the case of the PoW method, cost and environmental problems due to power consumption occur because all nodes perform meaningless calculations to find a nonce in order to generate a block. In addition, there are centralization problems due to collusion of computing power and scalability limitations that cannot be applied to applications that require transaction speed. In the case of the PoS method, it is proposed to solve the power consumption problem of PoW, but there is a problem such as excessive traffic generation for all nodes to agree.

DPoS 및 Tendermint는, PoW 및 PoS에서 전체 노드가 합의 주체가 되어 생긴 문제들을 해결하기 위하여 분산합의 주체를 고정된 일부 노드들에 위임한다. DPoS 및 Tendermint는 분산합의 주체의 숫자가 적기 때문에 합의 시간과 비용을 줄이고, 성능을 향상시킬 수 있다. 하지만, DPoS 및 Tendermint의 경우, 합의 주체 위임을 특정 노드에만 고정시킴으로써, 탈중앙화된 블록체인 개념에 위배소지가 있다. 게다가 권한이 소수에게 집중되어 투표에 의해 선출되는 노드의 신뢰도가 상대적으로 중요하고, 오히려 이들끼리 담합할 경우 보안에 취약한 문제가 발생할 수 있다. 이 때문에 공격해야 할 대상의 범위가 줄어들어 DoS(Denial of Service) 공격 등의 위협에 노출 될 수 있다.DPoS and Tendermint delegate the subject of distributed agreement to some fixed nodes in order to solve the problems caused by all nodes becoming the subject of consensus in PoW and PoS. DPoS and Tendermint can reduce the time and cost of consensus and improve performance because the number of distributed agreement subjects is small. However, in the case of DPoS and Tendermint, there is a violation of the decentralized blockchain concept by fixing the delegation of the consensus subject only to a specific node. In addition, since authority is concentrated in a small number of people, the reliability of nodes elected by voting is relatively important, and if they collide with each other, security vulnerabilities may occur. Because of this, the scope of the target to be attacked is reduced, and it may be exposed to threats such as DoS (Denial of Service) attacks.

종래의 분산합의 알고리즘들은, 전체 노드가 합의에 참여하는 경우, 필요 이상의 자원을 소모하고, 합의를 위하여 긴 시간이 소모되기 때문에 속도를 요하는 응용에 사용하기 어려운 단점을 갖는다. 또한, 종래의 분산합의 알고리즘들은, 위임 방식의 경우 전체 노드가 합의에 참여 할 때 보다 자원 소모가 줄고 합의 시간도 짧지만 위임 받은 노드가 고정되어 DoS등의 공격에 노출되고, 위임 받은 노드의 담합에 의한 보안 문제 등을 갖는다.Conventional distributed agreement algorithms consume more resources than necessary and take a long time for agreement when all nodes participate in the agreement, so they are difficult to use for applications requiring speed. In addition, in the case of the conventional distributed agreement algorithms, in the case of the delegation method, resource consumption is reduced and the consensus time is shorter than when all nodes participate in the agreement, but the delegated node is fixed and exposed to attacks such as DoS, and there are security problems due to collusion of the delegated node.

본 발명의 실시 예에 따른 난스 증명(Proof of Nonce; PoN) 기반 분산합의 알고리즘은 기존 분산합의 알고리즘들의 상술된 문제점들을 해결하기 위하여 다음과 같은 특징들을 갖는다.The Distributed Agreement algorithm based on Proof of Nonce (PoN) according to an embodiment of the present invention has the following characteristics in order to solve the above-described problems of existing Distributed Agreement algorithms.

첫째로, PoN 기반 분산합의 알고리즘은 탈중앙화(Decentralization)를 위하여 모든 노드에게 소유 자원 및 소유 지분과 상관없는 공평한 참여(채굴) 기회가 주어지며, 합의 과정에서 투명성, 대표성, 최적화(컴퓨팅 파워 및 통신비용 소모 최소화)를 보장할 수 있다.First, the PoN-based distributed agreement algorithm gives all nodes a fair opportunity to participate (mining) regardless of owned resources and ownership stake for decentralization, and can guarantee transparency, representativeness, and optimization (minimizing consumption of computing power and communication costs) in the consensus process.

둘째로, PoN 기반 분산합의 알고리즘은 블록체인 공격에 대한 감내가 가능하고, 합의 주체에 대한 공격이 불가능하도록 대응하는 노드 및 다른 노드에서 합의 주체 예측이 불가능하기 때문에 보안성(Security)을 제공할 수 있다.Second, the PoN-based distributed agreement algorithm can tolerate block chain attacks and can provide security because it is impossible to predict the consensus subject in the corresponding node and other nodes so that attacks on the consensus subject are impossible.

세째로, PoN 기반 분산합의 알고리즘은 최종성(Finalization)을 제공하여 위변조를 방지하며, 다양한 산업 및 응용에서 요구하는 성능 조건(TPS, 블록 크기, 블록 생성 시간)을 만족시킬 수 있다.Third, the PoN-based distributed agreement algorithm provides finalization to prevent forgery and tampering, and can satisfy performance conditions (TPS, block size, block generation time) required by various industries and applications.

상술된 특징들을 충족하기 위하여, PoN 기반 합의 알고리즘은 두 가지의 조건들을 동시에 만족시킨다. 제 1 조건은 블록 생성 권한을 갖는 노드는 미리 예측 할 수 없는 것이고, 제 2 조건은 생성된 블록은 다시 수정 할 수 없는 것이다. 먼저 제 1 조건은 노드들간 담합에 의한 공격을 방지하기 위하여 필요한 부분이다. 특히 아무도 믿을 수 없는 public block chain의 경우 블록을 생성할 노드를 미리 아는 경우 공격의 가능성이 높아지므로 이를 방지할 필요가 있다. 또한 선정된 노드는 그 자격을 확인할 수 있어야 한다. 제 2 조건은 한번 합의된 블록이 수정될 수 없도록 한 것이다.In order to satisfy the above-mentioned characteristics, the PoN-based consensus algorithm simultaneously satisfies two conditions. The first condition is that the node having block generation authority cannot be predicted in advance, and the second condition is that the created block cannot be modified again. First, the first condition is necessary to prevent an attack by collusion between nodes. In particular, in the case of a public block chain that no one can trust, if the node to create a block is known in advance, the possibility of an attack increases, so it is necessary to prevent this. Also, the selected node must be able to verify its qualifications. The second condition is that the block, once agreed upon, cannot be modified.

도 1은 본 발명의 실시 예에 따른 블록체인을 예시적으로 보여주는 도면이다. 도 1을 참조하면, 101번 블록이 생성되었고 102번 블록을 신규로 생성하는 경우, 102번 블록을 생성에 참여하는 노드를 임의로 선택하는 방법은, 101번 블록의 hash 값과 노드마다 발생한 임의의 값을 해쉬(hash)함으로써 하나의 값을 계산하고, 그 계산된 값을 임의의 기준값과 비교하는 것을 이용할 수 있다. 이때 블록 생성 참여 노드가 정당하게 해쉬된 결과를 생성하였는지에 대하여 모든 참여 노드가 확인할 수 있도록 하기 위하여, 모든 노드는 블록 생성 참여 노드가 발생한 임의의 값을 알고 있다.1 is a diagram showing a block chain according to an embodiment of the present invention by way of example. Referring to FIG. 1, when block 101 is created and block 102 is newly created, a method for randomly selecting a node participating in the generation of block 102 is to hash the hash value of block 101 and a random value generated for each node to calculate one value, and compare the calculated value with an arbitrary reference value. At this time, in order for all participating nodes to check whether the block generating nodes have legitimately generated the hashed result, all nodes know the random values generated by the block generating participating nodes.

그런데, 블록 생성 참여 노드가 가지는 임의의 값을 공개하는 경우, 두 가지 문제점들이 발생될 수 있다. 첫째로, 공개된 임의의 값을 기반으로 블록 생성에 참여할 노드를 미리 계산 함으로써 노드간의 담합에 의한 공격이 가능해지는 문제가 발생될 수 있다. 둘째로, 블록 생성 참여 노드가 사용하는 임의의 값을 알고 있을 때 악의적인 노드가 특정 노드의 임의의 값을 사용할 수 있는 문제가 발생될 수 있다. 이러한 문제점을 해결하기 위하여 노드가 사용한 임의의 값이 해당 노드의 것이라는 것을 다른 노드들이 확인할 수 있어야 하고, 동시에 새로운 블록 생성에 참여하는 노드들은 다른 노드들이 미리 예측 할 수 없어야 한다. 이에 PoN(Proof of Nonce) 기반 분산합의 알고리즘을 위한 난스 체인이 다음과 같이 구성될 수 있다.However, when an arbitrary value of a node participating in block generation is disclosed, two problems may occur. First, by pre-calculating the nodes to participate in block generation based on a public random value, an attack by collusion between nodes may be possible. Second, when the random value used by the nodes participating in block generation is known, a malicious node can use an arbitrary value of a specific node. In order to solve this problem, other nodes should be able to confirm that the random value used by the node belongs to the corresponding node, and at the same time, nodes participating in new block generation should not be able to be predicted in advance by other nodes. Accordingly, the nonce chain for the PoN (Proof of Nonce) based distributed agreement algorithm can be configured as follows.

도 2는 본 발명의 실시 예에 따른 PoN 기반 분산합의 알고리즘을 위한 난스 체인(Nonce Chain)을 예시적으로 보여주는 도면이다. 도 2를 참조하면, master key는 각 노드가 비공개로 유지하는 임의의 난수이고, Base n는 master key를 사용해서 생성하는 비공개 임의의 난수이고, 난스 체인 n은 base n을 m번 반복 해쉬를 수행하여 생성한 nonce chain과 nonce chain을 사용하기 시작할 start height으로 구성될 수 있다.2 is a diagram exemplarily showing a nonce chain for a PoN-based distributed agreement algorithm according to an embodiment of the present invention. Referring to FIG. 2, the master key is a random number kept private by each node, Base n is a non-public random number generated using the master key, and the nonce chain n is generated by hashing base n repeatedly m times. It can be composed of a nonce chain and a start height to start using the nonce chain.

예를 들어, 10 초에 한번 블록을 생성하는 경우, 3 시간 동안 1080 개의 nonce가 필요하다. 따라서 3 시간 동안 사용할 난스 체인은 1080 번 해시를 반복하여 생성될 수 있다. 한편, 도 2에서 도시된 난스 체인의 길이는 1080 개 이지만, 이는 본 발명의 실시 예에 불과하다고 이해되어야 할 것이다.For example, if a block is created once every 10 seconds, 1080 nonces are required for 3 hours. Therefore, the nonce chain to be used for 3 hours can be created by repeating the hash 1080 times. Meanwhile, although the length of the nonce chain shown in FIG. 2 is 1080, it should be understood that this is merely an embodiment of the present invention.

도 3은 본 발명의 실시 예에 따른 난스 체인 사용 방법을 예시적으로 설명하기 위한 도면이다. 도 3을 참조하면, master key는 노드가 비공개로 유지하고 임의의 난수를 시작으로 base hash를 생성할 수 있다.3 is a diagram for exemplarily explaining a method of using a nonce chain according to an embodiment of the present invention. Referring to FIG. 3, the master key can be kept private by the node and a base hash can be generated starting with a random number.

실시 예에 있어서, 난스 체인은 적어도 하나의 base chain를 포함할 수 있다. 실시 예에 있어서, base chain은 다음 base chain을 예측 할 수 없도록 유지 할 수 있다. 이때 10초에 한번 블록을 생성하는 경우 3시간에 1080개의 블록이 생성될 수 있다.In an embodiment, the nonce chain may include at least one base chain. In an embodiment, the base chain can keep the next base chain unpredictable. In this case, if a block is generated once every 10 seconds, 1080 blocks can be created in 3 hours.

실시 예에 있어서, 난스 체인에 연결된 hash 값들은 각각 하나의 블록 height에만 사용될 수있다. master key로부터 하나의 base hash가 생성되면, 이 값을 해쉬하여 다음 해쉬 값을 계산하고, 계산된 해쉬 값을 다시 해쉬하여 다음 해쉬 값이 계산될 수 있다. 이러한 해쉬 연산을 1080번 반복 수행될 수 있다.In an embodiment, hash values connected to the nonce chain can each be used only for one block height. When one base hash is generated from the master key, the next hash value can be calculated by hashing this value, and the next hash value can be calculated by hashing the calculated hash value again. This hash operation may be repeated 1080 times.

한편, 1080개의 난스 체인 길이는 설명의 편의를 위한 본 발명의 실시 예에 불과하다고 이해되어야 할 것이다.'On the other hand, it should be understood that the length of 1080 nonce chains is merely an embodiment of the present invention for convenience of description.'

이렇게 생성된 하나의 난스 체인은 base hash로부터 이전 값을 해쉬한 값이 chain 으로 연결된 구조를 갖는다. hash의 특징으로 인하여 순방향 계산은 가능하지만, 역방향 계산은 아주 어려운 특징을 가지고 있다. 생성된 1080개의 난스 체인의 마지막 hash 값(hash(0))과, 해당 체인이 사용될 블록의 height(start_height)가 모든 엘리드 노드에게 공개될 수 있다. 이후로 (블록의 현재 height - start height)에 대응하는 값을 난스 체인에서 가져와 height-1 블록의 해쉬 값과 같이 해슁하여 노드의 참여 여부가 결정될 수 있다.One nonce chain created in this way has a structure in which the hash value of the previous value from the base hash is connected as a chain. Due to the characteristics of hash, forward calculation is possible, but backward calculation has a very difficult feature. The last hash value (hash(0)) of the generated 1080 nonce chains and the height (start_height) of the block in which the chain will be used can be disclosed to all elite nodes. Afterwards, the value corresponding to (block's current height - start height) is taken from the nonce chain and hashed together with the hash value of the height-1 block to determine whether the node participates or not.

예를 들어 한 노드가 새로운 nonce chain을 생성하여 블록 height 100번부터 사용하다고 공개한 경우를 가정하여 설명하겠다. 만약 현재 102번 height 블록을 새로 생성하기 위하여 블록 생성에 참여할 노드들을 선택하고자 하는 경우, 신규 블록 height는 102가 되고, 대응하는 노드의 start height는 100이 되므로 두 값의 차이(블록의 height - start height)는 2가 될 수 있다. 따라서 노드가 가지고 있는 nonce chain에서 hash(2)를 추출하여, 이 값과 101번 블록의 hash 값을 해쉬하여 난수를 계산하고, 계산된 난수의 일부분을 기준값과 비교한 결과가 참인 경우, 대응하는 노드는 블록 생성에 참여하는 노드가 될 수 있다. 이때 대응하는 노드는 자신이 사용한 hash(2)를 공개하여 정당하게 블록 생성에 참여하였음을 증명할 수 있다.For example, it will be explained assuming that a node creates a new nonce chain and discloses that it is used from block height 100. If you want to select nodes to participate in block generation to create a new height block 102, the new block height is 102 and the start height of the corresponding node is 100, so the difference between the two values (block height - start height) can be 2. Therefore, hash(2) is extracted from the nonce chain that the node has, a random number is calculated by hashing this value and the hash value of block 101, and a part of the calculated random number is compared with the reference value. If the result is true, the corresponding node can become a node participating in block generation. At this time, the corresponding node can disclose the hash(2) it used to prove that it has legitimately participated in block generation.

또한, 대응하는 노드의 정당성을 확인하기 위하여 다른 노드는 블록 생성 참여 노드가 공개한 hash(2)를 (블록의 height - start height)번 해쉬 연산을 반복하고, 그 값이 블록 생성 참여 노드가 미리 공개한 hash(0) 값과 같음을 확인 할 수 있다. 또한 대응하는 height에서 사용할 hash(블록의 height - start height)값은 노드가 이미 공개한 마지막 해쉬값(hash(0))를 반복 계산에 의해 정당성을 할 수 있는 임의의 수이다. 따라서, 각 노드들은 대응하는 height에서 사용 가능한 하나의 hash 값을 찾도록 제한될 수 있다.In addition, to confirm the legitimacy of the corresponding node, other nodes repeat the hash operation (height - start height of the block) of hash(2) disclosed by the node participating in block generation, and confirm that the value is the same as the hash(0) value previously disclosed by the node participating in block generation. Also, the hash (block height - start height) value to be used in the corresponding height is an arbitrary number that can be justified by repeating the last hash value (hash(0)) already disclosed by the node. Therefore, each node can be restricted to find one usable hash value at the corresponding height.

자신을 제외한 모든 노드는 서로 난스 체인의 해쉬 값을 예측 할 수 없으므로, 노드들간 담합에 의해 미리 블록 생성에 참여 가능함 노드를 예측하는 것이 불가능하다. 동시에 노드가 계산에 의해 블록 생성에 참여가 결정되는 경우, 대응하는 노드는 대응하는 난스 체인 값을 공개함으로써, 정당한 hash 값을 가졌는지 증명 할 수 있다.Since all nodes other than themselves cannot predict the hash value of the nonce chain, it is impossible to predict nodes that can participate in block generation in advance by collusion between nodes. At the same time, if a node is determined to participate in block generation by calculation, the corresponding node can prove that it has a legitimate hash value by disclosing the corresponding nonce chain value.

하나의 난스 체인을 모두 소비 하는 경우, base hash 값을 원장에 기록하여 이제까지 노드 선정에 참여한 결과들이 이상 없었는지 추후 확인 가능하게 할 수 있다. 다음에 사용될 base hash(1)에서 생성된 nonce chain의 마지막 값(hash(0))와 start height가 공개될 수 있다.In the case of consuming all of one nonce chain, the base hash value can be recorded in the ledger so that it can be checked later whether the results of participating in the node selection so far are correct. The last value (hash(0)) of the nonce chain generated from the base hash(1) to be used next and the start height can be disclosed.

이때 블록 생성에 성공한 노드는 다음에 사용할 base hash를 변경함으로써 nonce chain을 생성하고, 마지막 hash 값과 start height를 공개 할 수도 있다. 이러한 작업은 모든 노드가 동시에 nonce chain 업데이트를 시도 할 경우, 네트워크 혼잡과 노드 프로세스 과부하의 문제가 발생 할 수 있으므로, 블록 생성에 성공한 노드가 nonce chain을 강제로 업데이트 하여 chain 업데이트 혼잡 문제를 해결 할 수 있다.At this time, a node that successfully creates a block can create a nonce chain by changing the base hash to be used next, and disclose the last hash value and start height. If all nodes try to update the nonce chain at the same time, network congestion and node process overload may occur. Therefore, nodes that succeed in block creation can forcibly update the nonce chain to solve the chain update congestion problem.

한편, 블록체인 합의 알고리즘의 블록 생성 후보 선정 방법은 구체적으로 아래와 같다.On the other hand, the block generation candidate selection method of the blockchain consensus algorithm is specifically described below.

블록 생성 노드를 결정하기 위하여 이전 블록 해쉬 값과 노드의 nonce chain에서 하나의 값을 가져와 해쉬하여 하나의 랜덤 값이 생성될 수 있다. 이 랜덤 값은 그 특성이 균일 분포를 갖고 랜덤 값을 일부를 취하여도 그 특성은 균일 분포를 갖는다. 아래에서는 계산의 편이성을 위하여 렌덤 값의 일부만으로 계산하는 경우를 가정하겠다. 난스 체인을 이용하는 경우, n개의 노드들이 각각 임의의 랜덤 값을 하나씩만 가지게 된다. 각 노드가 가진 값이 특정 기준값 비교에 의한 조건을 만족하는 경우에 각 노드에 블록 생성 후보의 자격을 부여될 수 있다. 반면에 조건을 만족시키지 못하는 경우 각 노드에 블록 생성 부호의 자격을 박탈될 수 있다. 자격 부여의 실패를 0, 자격 부여의 성공을 1로 하는 결과가 나오므로, 성공 확률이 p인 베르누이(Bernoulli) 시행이 될 수 있다.In order to determine a block generation node, one random value may be generated by hashing a value from the previous block hash value and the node's nonce chain. As for this random value, even if the characteristic has a uniform distribution and a part of the random value is taken, the characteristic has a uniform distribution. Below, for convenience of calculation, it will be assumed that calculation is performed with only a part of the random value. In the case of using the nonce chain, n nodes each have only one random value. When the value of each node satisfies the condition by comparing a specific reference value, each node may be qualified as a block generation candidate. On the other hand, if the condition is not satisfied, each node may be disqualified from the block generation code. Since the result is that the failure of qualification is 0 and the success of qualification is 1, it can be a Bernoulli trial with a probability of success p.

성공 확률 p인 베르누이 시행을 n번 반복 시행 할 때, 성공 횟수 X의 분포는 이항 분포(Binomial Distribution)일 수 있다. 이때, 이항분포의 평균과 분산은 각각 아래의 수학식과 같다.When a Bernoulli trial with a probability of success p is repeated n times, the distribution of the number of successes X can be a binomial distribution. At this time, the mean and variance of the binomial distribution are respectively as shown in the following equations.

이때 이 확률 분포는 반복 시행 n이 충분히 큰(n이 30 이상) 경우 중심극한정리에 의해 평균이 np이고 분산이 np(1-p)인 정규분포에 수렴된다. 평균이 μ이고 표준편차가 σ인 경우 정규분포의 확률 밀도 함수(Probability Density Function)는 다음과 같다.At this time, this probability distribution converges to a normal distribution with a mean of np and a variance of np(1-p) by the central limit theorem when the number of repeated trials n is sufficiently large (n is greater than 30). If the mean is μ and the standard deviation is σ, the probability density function of the normal distribution is:

여기서 함수 hash(이전 노드의 해쉬 값, nonce chain에서 선택한 하나의 hash 값)의 출력 값 중 일부를 특정 기준값 비교에 의한 조건을 만족하는 경우, 선택되는 경우에 모든 노드가 동일한 기준값을 사용한다면, 수학식 1의 μ는 선택되는 노드의 평균값을 의미한다.Here, if some of the output values of the function hash (hash value of the previous node, one hash value selected from the nonce chain) satisfy the condition by comparing a specific reference value, all nodes use the same reference value when selected. μ in Equation 1 means the average value of the selected nodes.

이때 수학식 5에서 x이 0인 경우 노드가 하나도 선택되지 않는 확률 값이 되며, x가 10인 경우 10개 이하의 노드가 선택될 확률이 된다. 수학식 1을 p에 대해 정리하고, 수학식 2를 σ에 대해 정리하여 수학식 5에 대입하면, 다음과 같은 수학식을 얻어진다.At this time, in Equation 5, when x is 0, it becomes a probability value that no node is selected, and when x is 10, it becomes a probability that 10 or less nodes are selected. When Equation 1 is rearranged for p and Equation 2 is rearranged for σ and substituted into Equation 5, the following equation is obtained.

따라서 수학식 6에서 노드 x 개 이하가 선택될 확률 F(x)를 상수 k 라고 하는 고정하는 경우 이식은 다음과 같이 된다.Therefore, in Equation 6, when the probability F(x) that x or less nodes are selected is fixed as a constant k, the transplantation becomes as follows.

수학식 6에서 x는 이미 위에서 노드 x 개 이하가 선택된다는 조건에 의해 상수가 된다. 따라서 수학식 7은 아래와 같은 μ에 대한 2차 방정식이 된다. In Equation 6, x becomes a constant under the condition that x or less nodes are already selected above. Therefore, Equation 7 becomes a quadratic equation for μ as follows.

수학식 8에서 (erf-1(2k-1))2 = a 라 놓고 다시 정리하면 다음과 같이 정리된다.In Equation 8, if (erf-1(2k-1))2 = a and rearranged, it is arranged as follows.

수학식 9에서 이 방정식의 해는 다음과 같다.In Equation 9, the solution of this equation is as follows.

여기서 k는 다음과 같이 계산된다. 10초에 한번 블록을 생성하는 경우 1년 동안 발생하는 누적 블록의 개수는 6Х60Х24Х365 개이다. 따라서 누적 years 동안 발생할 누적 블록 수의 역수는 years 주기로 x개 이하의 노드가 선정될 확률 k와 동일해야 한다. 따라서 k는 수학식 11과 같다. where k is calculated as: If a block is generated once every 10 seconds, the number of accumulated blocks generated in one year is 6Х60Х24Х365. Therefore, the reciprocal of the number of accumulated blocks that will occur during the accumulated years must be equal to the probability k that x or less nodes will be selected in the years period. Therefore, k is equal to Equation 11.

예를 들어 x 개 이하 노드가 선택될 주기가 백만년으로 설정하는 경우 수학식 11의 years에 106을 대입하여 k 값을 정한다. x와 k를 정하면 수학식 10에 의해 평균값 μ를 결정된다.For example, if the period in which x or less nodes are selected is set to one million years, the value k is determined by substituting 10 6 for years in Equation 11. When x and k are determined, the average value μ is determined by Equation 10.

수학식 8에 의한 계산해 보면 노드의 총수가 10억개 이하일 때 백만년에 한번만 10개 노드 이하가 선택되도록 하는 μ의 값은 70.32개 이다.Calculated by Equation 8, when the total number of nodes is 1 billion or less, the value of μ that allows 10 nodes or less to be selected only once in a million years is 70.32.

도 4는 본 발명의 실시 예에 따른 PoN 기반 분산합의 알고리즘에서 총 노드별 평균 노드 선택에 대한 시뮬레이션 결과를 예시적으로 보여주는 도면이다. 도 4를 참조하면, <10 의 의미는 10개 이하의 노드가 선택 될 확률을 의미한다. 이 값이 3.17e-13정도 되면, 백만년에 한번 10개 이하 노드들이 선택됨을 알 수 있다. 또한 계산상 7개 이하의 노드가 발생할 확률은 0이다.4 is a diagram exemplarily showing simulation results for average node selection for each total node in the PoN-based distributed agreement algorithm according to an embodiment of the present invention. Referring to FIG. 4, <10 means a probability that 10 or less nodes are selected. When this value is around 3.17e-13, it can be seen that less than 10 nodes are selected once in a million years. In addition, the probability of occurrence of 7 or less nodes in calculation is zero.

n과 μ가 결정되면, 노드가 선택될 확률 p가 수학식 12와 같이 결정된다. 모든 노드가 사용할 특정 기준값은 계산된 hash값의 일부분이 표현 할 수 있는 최대값(예를 들어 32비트를 사용하는 경우 최대값은 232이 됨)에 (μ/n)을 곱한 값이 된다. 따라서 기준값 difficulty 는 수학식 13과 같다.When n and μ are determined, the probability p that a node is selected is determined as shown in Equation 12. The specific reference value to be used by all nodes is the maximum value that a portion of the calculated hash value can represent (for example, if 32 bits are used, the maximum value is 232) multiplied by (μ/n). Therefore, the reference value difficulty is equal to Equation 13.

또한 누적분포 함수와 도 4로부터 다음과 같은 사실을 알 수 있다. half의 의미는 평균의 1/2 이하의 노드가 선택되는 확률을 의미한다. 이 확률은 알고리즘 동작 중에 선택된 노드 수에 의해 네트워크 분할이나 노드의 비활성 등을 예측하는데 사용 할 수 있다.In addition, the following fact can be seen from the cumulative distribution function and FIG. 4 . Half means the probability that a node less than 1/2 of the average is selected. This probability can be used to predict network division or node inactivity by the number of nodes selected during algorithm operation.

도 4에서 <half 값이 1.38e-5은 선택되어야 할 노드가 절반만 선택되는 확률로 매우 드물게 발생함을 알 수 있다. 따라서 선택된 노드의 수가 노드 평균의 절반 등 특정한 기준값을 넘지 못하는 경우나, 이러한 현상이 연속 발생하는 경우에, 노드의 aliveness를 확인하는 시점으로 이용 될 수 있다In FIG. 4, it can be seen that a <half value of 1.38e-5 occurs very rarely with a probability that only half of the node to be selected is selected. Therefore, when the number of selected nodes does not exceed a certain standard value, such as half of the node average, or when this phenomenon occurs continuously, it can be used as a point in time to check the aliveness of a node.

한편, PoN 기반 분산합의 알고리즘의 특징을 정리하면, 다음과 같다. 채굴 기회가 소유 자원 및 소유 지분과 무관하게 확률적으로 공평하게 제공될 수 있다. 채굴 기회를 누가 갖게 될지 자신을 포함한 어느 누구도 예측될 수 없다. 채굴이 정당한 노드에서 이루어 졌는지 다른 노드에서 검증 가능하다. 합의된 블록은 수정이 불가능하다. 전체가 참여하지 않아도 대표 속성을 가질 수 있도록 채굴 노드가 최소 N개 이상임을 확률적으로 보장될 수 있다. 합의 주체 예측을 통한 타깃 공격이 불가능하다.Meanwhile, the characteristics of the PoN-based distributed agreement algorithm are summarized as follows. Mining opportunities can be probabilistically provided equally regardless of owned resources and ownership stakes. No one, including yourself, can predict who will have a mining opportunity. Other nodes can verify that mining is done on legitimate nodes. Consensus blocks cannot be modified. It can be probabilistically guaranteed that there are at least N mining nodes so that they can have representative properties even if not all participate. It is impossible to target the attack by predicting the consensus subject.

도 5는 본 발명의 실시 예에 따른 PoN 기반 합의노드 알고리즘에서 노드의 elite pool의 구조를 예시적으로 보여주는 도면이다. 도 5을 참조하면, 분산합의에 참여하기 위하여 노드는 다른 노드의 elite pool에 난스 체인 정보를 등록해야 한다. 노드의 난스 체인 정보가 다른 노드의 elite pool에 등록될 때, 노드는 분산합의 주체가 될 수 있다.5 is a diagram exemplarily showing the structure of an elite pool of nodes in the PoN-based consensus node algorithm according to an embodiment of the present invention. Referring to Figure 5, in order to participate in distributed agreement, a node must register the nonce chain information in the elite pool of other nodes. When a node's nonce chain information is registered in the elite pool of other nodes, the node can become a subject of distributed agreement.

실시 예에 있어서, 난스 체인 정보는 노드 주소, 대응하는 chain의 마지막 해쉬 값인 Noncebase(0) 값, 및 Start height 값을 포함할 수 있다. 실시 예에 있어서, 노드가 등록한 난스 체인은 (start height + 1) height에서부터 사용 가능하다. 실시 예에 있어서, 난스 체인 정보에서 노드 주소는 노드의 공개키(public key) 혹은 노드를 한정 할 수 있는 값을 포함할 수 있다. 실시 예에 있어서, 난스 체인 등록은 블록체인의 사용되지 않은 거래 내역을 이용하여 다른 노드에 공개 할 수 있다.In an embodiment, the nonce chain information may include a node address, a Noncebase(0) value that is the last hash value of the corresponding chain, and a Start height value. In an embodiment, the nonce chain registered by the node can be used from (start height + 1) height. In an embodiment, the node address in the nonce chain information may include the public key of the node or a value capable of limiting the node. In an embodiment, registration of the nonce chain can be disclosed to other nodes using the unused transaction history of the blockchain.

도 6은 본 발명의 실시 예에 따른 노드의 새로운 블록 생성 권한 확인 방법을 예시적으로 보여주는 도면이다. 도 6을 참조하면, 블록체인에 연결할 새로운 블록의 생성 권한 획득 여부를 확인 하기 위하여 각 노드들은 아래와 같은 방법으로 진행될 수 있다.6 is a diagram exemplarily illustrating a method for checking a node's right to create a new block according to an embodiment of the present invention. Referring to FIG. 6, each node may proceed in the following way to check whether or not the right to create a new block to be connected to the blockchain has been obtained.

노드들은 자신이 갖고 있는 난스 체인에서 noncebase(새로운 블록의 height - 노드가 등록한 start height)를 가져온다. 이때 가져온 값이 nonceh 가 될 수 있다(S110). 각 노드들은 이전 블록의 해드 값의 해쉬 결과 을 계산할 수 있다(S120).Nodes bring the noncebase (the height of the new block - the start height registered by the node) from their own nonce chain. At this time, the imported value may be nonceh (S110). Each node is a hash result of the head value of the previous block. can be calculated (S120).

노드는 계산 결과가 참이면, 새로운 블록 생성 권한 획득 한 것으로 결정될 수 있다(S130). 블록체인 height h 마다 확률 p로 분산합의 노드들이 선정되도록 하기 위하여 이용될 수 있다. 여기서 는 hash 함수로 얻는 의 해쉬 값이다.은 height h-1 블록의 헤더 해쉬 값이다. 따라서 모든 노드는 height h-1 블록이 블록체인에 연결 되어야 height h 의 분산합의 노드 여부를 알 수 있다. 는 height h 에 대해 각 노드가 다르게 갖는 nonce 값으로 하기의 난스 체인을 통해 얻는 값이다. node is If the calculation result is true, it may be determined that a new block creation right has been obtained (S130). To ensure distributed consensus nodes are selected with probability p for each blockchain height h can be used here is obtained with the hash function is the hash value of is the header hash value of the height h-1 block. Therefore, all nodes can know whether the height h-1 block is connected to the blockchain to know whether the height h is a decentralized consensus node. is a nonce value that each node has differently for height h and is a value obtained through the following nonce chain.

난스 체인을 이용하면, 첫째, 노드가 임의대로 nonce 값을 바꿀 수 없게 되어 비트코인처럼 연산 능력을 이용하여 분산합의 노드가 되려는 시도를 할 수 없다. 둘째, 각 노드의 nonce 값을 다른 노드가 예측 할 수 없게 되어 악의적인 노드가 분산합의 노드를 예측하여 공격하는 것이 불가능하다. 셋째, 노드가 공개하는 nonce 값의 정당성을 다른 노드가 검증 할 수 있다. 는 분산합의에 필요한 최소한의 노드만 분산합의 자격을 얻을 수 있도록 모든 노드가 height h 에 대해 사용하는 동일한 값이다.When using the nonce chain, first, nodes cannot arbitrarily change the nonce value, so they cannot attempt to become a distributed consensus node using computational power like Bitcoin. Second, since the nonce value of each node cannot be predicted by other nodes, it is impossible for malicious nodes to predict and attack distributed consensus nodes. Third, other nodes can verify the legitimacy of the nonce value disclosed by the node. is the same value used for height h by all nodes so that only the minimum number of nodes required for distributed consensus qualify for distributed consensus.

이후에, 새로운 블록 생성 권한을 획득한 노드는 자신이 사용한 nonceh 값, 블록의 height 값, 및 노드의 주소를 공개할 수 있다(S140).Afterwards, the node that has obtained the right to create a new block can disclose the nonceh value it used, the height value of the block, and the address of the node (S140).

본 발명의 실시 예에 따른 PoN 기반 합의노드 선정 방법은, 다른 노드가 예측 불가능하게 heighth에 대한 분산합의 주체를 선택하기 위하여 이전 heighth-1 정보와 난스 체인에서 정보를 읽고, 읽혀진 두 정보를 연산하고, 연산된 결과를 특정 기준값과 비교를 통해 확률 p로 노드를 선정할 수 있다.In the PoN-based consensus node selection method according to an embodiment of the present invention, in order for other nodes to unpredictably select a distributed agreement subject for heighth, a node can be selected with probability p by reading previous heighth-1 information and information from the nonce chain, calculating the two read information, and comparing the calculated result with a specific reference value.

실시 예에 있어서, 자신을 포함한 모든 노드가 이전 블록이 생성되기 전까지 다음 블록의 합의 주체 선정 여부를 예측할 수 없도록 하기 위하여 이전 블록의 정보가 이용될 수 있다.In an embodiment, information of a previous block may be used so that all nodes including itself cannot predict whether or not to select an agreement subject for the next block until the previous block is generated.

실시 예에 있어서, 자신을 포함한 모든 노드가 합의 주체로 선택될 수 있는 계산 기회를 매 height마다 1회만 부여하기 위하여 난스 체인에서 가져온 값이 hash 함수의 nonce로 이용될 수 있다.In an embodiment, a value obtained from the nonce chain may be used as a nonce of the hash function in order to give a calculation opportunity for all nodes including itself to be selected as a consensus subject only once for each height.

실시 예에 있어서, 합의에 참여 가능한 노드 개수가 n이고, 합의에 필요한 최소 노드 개수가 x이고, 합의에 필요한 최소 노드 개수 이하가 선택될 확률 값을 k라고 할 때, 이 세개의 변수(n, x, k)를 포함하는 분산합의 주체 개수가 제어될 수 있다.In an embodiment, when the number of nodes that can participate in consensus is n, the minimum number of nodes required for consensus is x, and the probability value that a node less than or equal to the minimum number required for consensus is selected is k, the number of distributed agreement subjects including these three variables (n, x, k) can be controlled.

실시 예에 있어서, 노드가 비교에 의해 이항분포를 갖는다. 실시 예에 있어서, 세 개 변수(n, x, k)를 갖는 확률 값 px,k의 최대 값을 곱함으로써 난이도()가 계산될 수 있다.In an embodiment, the node By comparison, it has a binomial distribution. In an embodiment, a probability value p x,k having three variables (n, x, k) and Difficulty by multiplying by the maximum value of ( ) can be calculated.

도 7은 본 발명의 실시 예에 따른 분산합의에 참여하는 노드의 자격 검증하는 방법을 예시적으로 보여주는 도면이다. 도 7을 참조하면, 다른 노드는 3가지 정보를 공개한 노드가 블록 생성 권한이 있는지를 다음과 같이 검증할 수 있다.7 is a diagram exemplarily illustrating a method of verifying qualifications of nodes participating in distributed agreement according to an embodiment of the present invention. Referring to FIG. 7 , another node can verify whether the node that disclosed the three pieces of information has the right to create a block as follows.

다른 노드들은 블록 생성 노드의 난스값, height 정보 및 주소를 수신할 수 있다(S210). 다른 노드들은 대응하는 노드의 주소로 등록된 noncebase(0)값과 Start height 값을 가져 올 수 있다(S220). Other nodes may receive the nonce value, height information, and address of the block generating node (S210). Other nodes may bring the noncebase (0) value and the start height value registered as the address of the corresponding node (S220).

다른 노드는 노드가 공개한 값에서 (새로운 블록의 height - Start height)을 계산할 수 있다(S230). 노드가 공개한 nonceh를 (새로운 블록의 height - Start height)번 연속 해쉬 계산하고, 계산된 마지막 값이 noncebase(0)와 같으면, 공개 노드가 블록 생성 권한이 있는지 검증될 수 있다. 반면에, 그렇지 않으면, 정보 공개 노드는 거짓으로 판별될 것이다. 검증 결과가 거짓인 노드는 블록 생성 및 사용에 불이익을 받을 수 있다.Other nodes can calculate (height of the new block - Start height) from the value disclosed by the node (S230). If the nonceh published by the node is calculated consecutively (height of the new block - Start height) times, and the calculated final value is equal to the noncebase (0), it can be verified whether the public node has the right to create the block. On the other hand, otherwise, the information disclosure node will be determined to be false. Nodes with false verification results may be penalized for block creation and use.

본 발명의 실시 예에 따른 PoN 기반 분산노드 합의 알고리즘의 합의 주체 자격 획득 방법은, 합의에 참여 가능한 각 노드에게 노드가 가진 자산(예, 연산능력)이 합의 주체 자격 획득 확률에 영향을 주지 않도록 합의 주체 선정 여부를 판단 할 수 있는 기회를 매 height마다 노드당 1회로 제한할 수 있다.In the method for obtaining consensus subject qualification of the PoN-based distributed node consensus algorithm according to an embodiment of the present invention, the opportunity to determine whether or not to select an agreement subject can be limited to once per node for each height so that each node capable of participating in consensus does not affect the probability of obtaining the consensus subject qualification.

실시 예에 있어서, 합의 주체 선정 여부 판단 기회는 1회 이상 m회 이하로 제한할 수 있다.In an embodiment, the opportunity to determine whether to select an agreement subject may be limited to one or more m times or less.

실시 예에 있어서, 합의 주체로 선정된 노드가 자신을 식별할 수 있는 주소 정보, 자신의 난스 체인에서 얻은 nonce 정보 및 height 정보를 공개함으로써 다른 노드들은 합의 주체 자격 획들을 검증 가능하다. 실시 예에 있어서, 합의 주체 검증을 통과하지 못한 노드는 불이익을 줄 수 있다.In an embodiment, by disclosing address information by which a node selected as a consensus subject can identify itself, nonce information obtained from its own nonce chain, and height information, other nodes can verify consensus subject qualifications. In an embodiment, a node that fails to pass the consensus subject verification may be penalized.

도 8은 본 발명의 실시 예에 따른 난스 체인 갱신하는 방법을 예시적으로 보여주는 도면이다. 도 8를 참조하면, 하나의 난스 체인을 모두 소진 하는 경우 난스 체인은 다음과 같이 갱신될 수 있다.8 is a diagram exemplarily showing a method of updating a nonce chain according to an embodiment of the present invention. Referring to FIG. 8, when one nonce chain is exhausted, the nonce chain can be updated as follows.

난스 체인e이 모두 소진될 경우 base hash 값을 원장에 기록한다(S310). 이는 이제까지 노드 선정에 참여한 결과들이 이상 없었는지 추후 확인 가능할 수 있다. 하나의 난스 체인이 소진되는 경우에 base hash를 다시 계산될 수 있다(S320). 이 base hash에서 생성된 난스 체인의 마지막 값(hash(0))와 start height를 공개함으로써 난스 체인이 갱신될 수 있다(S340).When the nonce chain e is exhausted, the base hash value is recorded in the ledger (S310). This may later confirm whether or not the results of participating in node selection have been abnormal. When one nonce chain is exhausted, the base hash may be recalculated (S320). The nonce chain can be updated by disclosing the last value (hash(0)) and the start height of the nonce chain generated from this base hash (S340).

실시 예에 있어서, 노드가 생성한 난스 체인의 모든 값을 소진하고 동시에 새로운 난스 체인 업데이트를 시도 하는 경우, 블록 생성에 성공한 노드가 새로운 난스 체인을 강제로 업데이트 하여 chain 업데이트 혼잡 문제를 해결 할 수 있다.In an embodiment, when a node exhausts all values of the generated nonce chain and simultaneously attempts to update a new nonce chain, the node that successfully generates a block can forcibly update the new nonce chain to solve the chain update congestion problem.

실시 예에 있어서, 블록 생성에 성공한 노드가 난스 체인을 업데이트 하므로 과도한 트래픽 발생으로 인한 네트워크 혼잡과 노드의 업데이트 처리 과부하의 문제를 줄일 수 있다.In an embodiment, since a node that successfully generates a block updates the nonce chain, network congestion caused by excessive traffic and overload of update processing by nodes can be reduced.

한편, 본 발명은 분산 컴퓨팅 환경에 적용 가능하다. 예를 들어, 불특정 다수가 참여하는 분산 컴퓨팅 시스템은, 노드가 사용할 난스 체인을 해쉬 체인 기반으로 생성하고, start height와 nonce(0)를 미리 공개하여 노드가 nonce chain 순서대로 해쉬 값을 사용하도록 제한하고, 다른 노드들이 공개된 값을 기반으로 추후에 결과를 검증 할 수 있다.Meanwhile, the present invention is applicable to a distributed computing environment. For example, in a distributed computing system in which an unspecified number of people participate, a nonce chain to be used by nodes is created based on the hash chain, start height and nonce (0) are disclosed in advance, nodes are restricted to use hash values in the order of the nonce chain, and other nodes can verify the result later based on the published values.

본 발명의 실시 예에 따른 블록체인을 발생하는 분산 컴퓨팅 시스템은, 난스 체인을 해쉬 체인 기반으로 생성하고, start height, 난스 체인의 난스 값, 및 노드의 주소를 갖는 난스 체인 정보를 다른 노드들에게 공개하는 적어도 하나의 제 1 노드, 및 난스 체인 정보와 적어도 하나의 제 1 노드로부터 수신된 난스 값과 height을 이용하여 적어도 하나의 제 1 노드의 합의노드 선정 자격을 검증하는 적어도 하나의 제 2 노드를 포함할 수 있다.A distributed computing system generating a blockchain according to an embodiment of the present invention may include at least one first node that creates a nonce chain based on a hash chain and discloses to other nodes information about the nonce chain including a start height, a nonce value of the nonce chain, and an address of the node, and at least one second node that verifies qualification for selection of the consensus node of the at least one first node using the nonce chain information and the nonce value and height received from the at least one first node.

실시 예에 있어서, 적어도 하나의 제 1 노드가 블록 생성에 성공할 때, 난스 체인이 업데이트 될 수 있다. 실시 예에 있어서, 적어도 하나의 제 2 노드는 난스 체인 정보를 등록하는 elite pool를 더 포함할 수 있다. 실시 예에 있어서, elite pool에서 적어도 하나의 제 1 노드가 탈퇴함으로써 합의 주체에서 빠질 수 있다. 실시 예에 있어서, 적어도 하나의 제 1 노드를 elite pool에 등록하기 위하여 블록체인의 거래내역이 이용될 수 있다.In an embodiment, when at least one first node succeeds in generating a block, the nonce chain may be updated. In an embodiment, at least one second node may further include an elite pool registering nonce chain information. In an embodiment, when at least one first node leaves the elite pool, it may be excluded from the consensus body. In an embodiment, transaction details of the block chain may be used to register at least one first node in the elite pool.

한편, 아래에서는 난이도(Difficulty)에 대하여 자세하게 설명하겠다. 난이도라는 개념은 단순히 설명하면 노드로 선정될 확률을 일컫는다. 즉, 노드로 선정될 확률이 낮아지는 것과 난이도가 높아졌다는 것은 동일한 의미이다.Meanwhile, difficulty will be explained in detail below. The concept of difficulty simply refers to the probability of being selected as a node. That is, a decrease in the probability of being selected as a node and an increase in difficulty mean the same thing.

참여 노드들은 수학식을 이용하여 분산합의 주체 선정 여부를 판단할 수 있다. 이때, Difficulty 값이 너무 큰 경우, 지나치게 많은 노드가 분산합의 주체로 선정되어 네트워크 트래픽이 증가하고 합의를 위하여 긴 시간이 소모 될 수 있다. 반대로 Difficulty 값이 너무 작은 경우, 분산합의 주체로 선정 될 확률이 매우 적어 합의에 필요한 최소 노드 이하가 선정되어 합의가 불가능 해질 수 있다. 따라서 분산합의에 필요한 주체 개수를 제어할 수 있는 적합한 difficulty 값을 정할 수 있는 방법이 필요하다.participating nodes It is possible to determine whether or not to select a distributed agreement subject using a mathematical formula. At this time, if the Difficulty value is too large, too many nodes are selected as subjects of distributed agreement, increasing network traffic and taking a long time for consensus. Conversely, if the Difficulty value is too small, the probability of being selected as a distributed consensus subject is very small, and consensus may become impossible because nodes below the minimum required for consensus are selected. Therefore, a method for determining an appropriate difficulty value that can control the number of subjects required for distributed agreement is needed.

따라서, 분산합의에 필요한 주체 개수를 제어하는 확률 p 결정 방법은 다음과 같다. 임의의 난수를 하나 선택하여 그 임의의 수를 특정 기준값과 비교하여 pass 혹은 fail로 선택하는 것을 성공 확률 p인 베르누이 시행이라 한다.Therefore, the method for determining the probability p for controlling the number of subjects required for distributed agreement is as follows. Selecting a random number and comparing the random number with a specific reference value to pass or fail is called a Bernoulli trial with a probability of success p.

분산합의 주체를 선정하기 위하여 사용한 수학식 의 왼쪽은 해쉬 함수의 결과로 하나의 랜덤한 수가 되며, 오른쪽은 특정한 기준값(difficulty, 혹은 난이도)가 된다. 특정 랜덤 수와 기준값을 비교하여 분산합의 주체로 선정 되는 것을 pass, 선정되지 않는 것을 fail로 하면 위 수학식의 결과는 성공 확률 p인 베르누이 시행이 된다. 성공 확률 p인 베르누이 시행을 n번 수행할 때 x번 성공하는 경우에 누적 분포 함수는 아래와 같다.Equation used to select the subject of the distributed agreement The left side of is a random number as a result of the hash function, and the right side is a specific reference value (difficulty, or difficulty). If a specific random number and a reference value are compared, and selecting as the subject of the variance sum is pass and not being selected as fail, the result of the above equation becomes a Bernoulli trial with a success probability p. The cumulative distribution function in the case of x successes out of n Bernoulli trials with probability p of success is:

분산 노드들이 성공적으로 합의에 이르기 위하여 확률적으로 최소한의 노드는 반드시 필요하다. 따라서 최소노드수(x)와 최소노드이하가 선택될 확률값 Fx(x)를 선택 할 수 있다. 이때 이 확률 값을 k라 하고 확률 p를 구할 수 있다.In order for distributed nodes to successfully reach consensus, a minimum number of nodes is absolutely necessary. Therefore, it is possible to select the minimum number of nodes (x) and the probability value Fx(x) in which the minimum node or less is selected. At this time, this probability value is called k and the probability p can be obtained.

합의에 필요한 최소노드수(x)와 최소 노드이하가 선택될 확률값(K)에 대한 확률 px,k는 아래 수학식과 같다The probability px,k for the minimum number of nodes (x) required for consensus and the probability value (K) for a minimum node or less to be selected is as follows:

여기서 n 은 elite pool에 등록된 노드의 개수이고, x 는 합의를 위하여 필요한 최소 노드 개수이고, k는 x 노드 이하의 노드가 선택될 누적 분포 확률 값이고, px,k는 (n, x, k) 3개의 변수로 결정될 수 있다.Here, n is the number of nodes registered in the elite pool, x is the minimum number of nodes required for consensus, k is the cumulative distribution probability that nodes below x nodes will be selected, and px,k is (n, x, k) It can be determined by three variables.

이때 에서 분산합의 주체로 선택되는 노드의 확률이px,k가 되기 위하여는 의 최대 값을 px,k 에 곱하여 로 사용하면 된다. 이때 이 최대 값을 maxslice로 표기 하면 아래의 수학식과 같이 를 결정 할 수 있다. 예를 들어 위 수학식의 연산을 위하여 hash 결과에서 32 비트만 연산에 사용하는 경우 maxslice = 232 이 된다.At this time In order for the probability of the node selected as the subject of distributed agreement to be p x,k by multiplying the maximum value of p x,k can be used as At this time, if this maximum value is expressed as maxslice, as shown in the following equation can decide For example, if only 32 bits of the hash result are used for the operation of the above equation, maxslice = 232.

노드에 공개된 elite pool에 등록된 노드 수에 변화가 있는 경우에 를 새로 계산될 수 있다.When there is a change in the number of nodes registered in the elite pool open to the node can be newly calculated.

한편, 상술된 difficulty 를 만족하는 px,k 확률로 동작하는 시스템에서 누적분포 함수 Fx(x)의 x 가 평균(μ)의 절반 이하(μ/2)의 노드가 선택될 확률이 매우 낮다. 따라서 분산합의 주체로 선택된 노드의 수가 μ/2 등 특정 노드 개수의 이하로 선택되는 경우나 혹은 연속으로 두번 이상 이러한 현상이 발생하는 경우, 네트워크 분할이나 노드 비활성 등의 노드 liveness 확인에 사용 될 수 있다. 한편, difficulty의 기준값이 확률 분포의 평균값의 절반(μ/2)으로 제한될 필요는 없다고 이해되어야 할 것이다. 본 발명의 difficulty의 기준값은 확률 분포의 평균값에 연관된 임의의 값일 수 있다.On the other hand, in a system operating with p x,k probability that satisfies the above-mentioned difficulty, the probability that x of the cumulative distribution function Fx(x) is less than half (μ / 2) of the average (μ) is selected is very low. Therefore, when the number of nodes selected as the subject of distributed agreement is less than or equal to a certain number of nodes, such as μ/2, or when this phenomenon occurs more than twice in a row, it can be used to check node liveness such as network splitting or node inactivation. Meanwhile, it should be understood that the reference value of difficulty is not necessarily limited to half (μ/2) of the average value of the probability distribution. The reference value of the difficulty of the present invention may be an arbitrary value related to the average value of the probability distribution.

도 9는 본 발명의 실시 예에 따른 노드의 liveness 확인 방법을 예시적으로 보여주는 도면이다. 도 9를 참조하면, 노드의 liveness를 확인하는 방법은 다음과 같다. 분산합의 노드로 선정된 노들의 개수가 카운트될 수 있다(S410). 카운트된 값이 특정 노드의 개수(예를 들어, μ/2)보다 작은지 판별될 수 있다(S420). 만일, 카운트된 값이 특정 노드의 개수보다 작을 때 합의 노드 알고리즘의 liveness는 보장되지 않는다. 반면에, 카운트 된 값이 특정 노드의 개수보다 같거나 클 때, 합의 노드 알고리즘의 liveness는 보장될 수 있다.9 is a diagram exemplarily illustrating a method for confirming the liveness of a node according to an embodiment of the present invention. Referring to FIG. 9 , a method for checking the liveness of a node is as follows. The number of nodes selected as distributed sum nodes may be counted (S410). It may be determined whether the counted value is smaller than the number of specific nodes (eg, μ/2) (S420). If the counted value is smaller than the number of specific nodes, the liveness of the consensus node algorithm is not guaranteed. On the other hand, when the counted value is equal to or greater than the number of specific nodes, the liveness of the consensus node algorithm can be guaranteed.

본 발명의 실시 예에 따른 PoN 기반 합의노드 알고리즘의 노드의 liveness 확인 방법은, 합의 주체로 선택된 노드의 수를 기반으로 네트워크 분할이나 노드 비활성 등의 문제 가능성을 실시간 인지할 수 있다.The method for verifying node liveness of the PoN-based consensus node algorithm according to an embodiment of the present invention can recognize the possibility of problems such as network division or node inactivity in real time based on the number of nodes selected as consensus subjects.

도 10은 본 발명의 실시 예에 따른 블록체인 생성 장치(1000)를 예시적으로 보여주는 도면이다. 도 10을 참조하면, 블록체인 생성 장치(1000)는 적어도 하나의 프로세서(1100), 네트워크 인터페이스(1200), 메모리(1300), 디스플레이(1400), 및 입출력 장치(1500)를 포함할 수 있다.10 is a diagram showing a block chain generation device 1000 according to an embodiment of the present invention by way of example. Referring to FIG. 10 , the block chain generating device 1000 may include at least one processor 1100, a network interface 1200, a memory 1300, a display 1400, and an input/output device 1500.

프로세서(1100)는 도 1 내지 도 9를 통하여 적어도 하나의 장치를 포함하거나, 도 1 내지 도 9을 통하여 전술한 적어도 하나의 방법으로 구현될 수 있다. 프로세서(1100)는, 상술된 바와 같이, 난스 체인을 해쉬 체인 기반으로 생성하고, start height, 상기 난스 체인의 난스 값, 및 노드의 주소를 갖는 난스 체인 정보를 다른 노드들에게 공개하거나, 상기 난스 체인 정보와 상기 적어도 하나의 제 1 노드로부터 수신된 난스 값과 height을 이용하여 상기 적어도 하나의 제 1 노드의 합의노드 선정 자격을 검증하도록 인스트럭션들(instructions)을 실행할 수 있다.The processor 1100 may include at least one device through FIGS. 1 to 9 or may be implemented in at least one method described above through FIGS. 1 to 9 . As described above, the processor 1100 may generate a nonce chain based on a hash chain, disclose nonce chain information including a start height, a nonce value of the nonce chain, and a node address to other nodes, or execute instructions to verify qualification of the at least one first node to select an agreement node by using the nonce chain information and the nonce value and height received from the at least one first node.

프로세서(1100)는 프로그램을 실행하고, 생성 장치(1000)를 제어할 수 있다. 생성 장치(1000)는 입출력 장치(1500)를 통하여 외부 장치(예를 들어, 퍼스널 컴퓨터 혹은 네트워크)에 연결되고, 데이터를 교환할 수 있다. 생성 장치(1000)는 이동 전화, 스마트 폰, PDA, 태블릿 컴퓨터, 랩톱 컴퓨터 등 모바일 장치, 퍼스널 컴퓨터, 태블릿 컴퓨터, 넷북 등 컴퓨팅 장치, 혹은 텔레비전, 스마트 텔레비전, 게이트 제어를 위한 보안 장치 등 전자 제품 등 다양한 전자 시스템을 포함할 수 있다.The processor 1100 may execute a program and control the generating device 1000 . The generating device 1000 may be connected to an external device (eg, a personal computer or network) through the input/output device 1500 and exchange data. The generation device 1000 may include various electronic systems, such as mobile phones, smart phones, PDAs, tablet computers, laptop computers, computing devices such as personal computers, tablet computers, and netbooks, or electronic products such as televisions, smart televisions, and security devices for gate control.

네트워크 인터페이스(1200)는 외부의 네트워크와 다양한 유/무선 방식에 의해 통신을 수행하도록 구현될 수 있다.The network interface 1200 may be implemented to perform communication with an external network through various wired/wireless methods.

메모리(1300)는 컴퓨터에서 읽을 수 있는 명령어(instruction)를 포함할 수 있다. 프로세서(1100)는 메모리(1300)에 저장된 명령어가 프로세서(1100)에서 실행됨에 따라 앞서 언급된 동작들을 수행할 수 있다. 메모리(1300)는 휘발성 메모리 혹은 비휘발성 메모리일 수 있다. 메모리(1300)는 사용자의 데이터를 저장하도록 저장 장치를 포함할 수 있다. 저장 장치는 eMMC(embedded multimedia card), SSD(solid state drive), UFS(universal flash storage) 등 일 수 있다. 저장 장치는 적어도 하나의 비휘발성 메모리 장치를 포함할 수 있다. 비휘발성 메모리 장치는, 낸드 플래시 메모리(NAND Flash Memory), 수직형 낸드 플래시 메모리(Vertical NAND; VNAND), 노아 플래시 메모리(NOR Flash Memory), 저항성 램(Resistive Random Access Memory: RRAM), 상변화 메모리(Phase-Change Memory: PRAM), 자기저항 메모리(Magnetoresistive Random Access Memory: MRAM), 강유전체 메모리(Ferroelectric Random Access Memory: FRAM), 스핀주입 자화반전 메모리(Spin Transfer Torque Random Access Memory: STT-RAM) 등이 될 수 있다.The memory 1300 may include computer readable instructions. The processor 1100 may perform the aforementioned operations as instructions stored in the memory 1300 are executed in the processor 1100 . The memory 1300 may be a volatile memory or a non-volatile memory. The memory 1300 may include a storage device to store user data. The storage device may be an embedded multimedia card (eMMC), a solid state drive (SSD), or universal flash storage (UFS). The storage device may include at least one non-volatile memory device. Non-volatile memory devices include NAND flash memory, vertical NAND (VNAND), NOR flash memory, resistive random access memory (RRAM), phase-change memory (PRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), and spin injection magnetization reversal. memory (Spin Transfer Torque Random Access Memory: STT-RAM).

이상에서 설명된 실시 예들은 하드웨어 구성요소, 소프트웨어 구성요소, 및/혹은 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(Arithmetic Logic Unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(Field Programmable Gate Array), PLU(Programmable Logic Unit), 마이크로프로세서, 혹은 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 혹은 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(Operating System; OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. The embodiments described above may be implemented as hardware components, software components, and/or a combination of hardware components and software components. For example, the devices, methods, and components described in the embodiments may be implemented using one or more general-purpose computers or special-purpose computers, such as, for example, a processor, controller, arithmetic logic unit (ALU), digital signal processor, microcomputer, field programmable gate array (FPGA), programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. A processing device may run an Operating System (OS) and one or more software applications running on the Operating System.

또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 대응하는 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소 (processing element) 및/혹은 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수의 프로세서 혹은 하나의 프로세서 및 하나의 제어기(controller)를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.A processing device may also access, store, manipulate, process, and generate data in response to execution of software. For convenience of understanding, there are cases in which a single processing device is used, but those skilled in the art may recognize that the processing device may include a plurality of processing elements and/or multiple types of processing elements. For example, the processing device may include a plurality of processors or one processor and one controller. Other processing configurations are also possible, such as parallel processors.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 혹은 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 혹은 결합적으로 (collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/혹은 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 혹은 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 혹은 장치, 혹은 전송되는 신호파(signal wave)에 영구적으로, 혹은 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, and may configure a processing device to operate as desired, or may independently or collectively direct a processing device. Software and/or data may be permanently or temporarily embodied in any tangible machine, component, physical device, virtual equipment, computer storage medium or device, or transmitted signal wave, to be interpreted by or to provide instructions or data to a processing device. Software may be distributed on networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer readable media.

본 발명의 실시 예에 따른 블록체인 생성 장치(1000)는, 적어도 하나의 프로세서(1100) 및 적어도 하나의 프로세서(1100)에 의해 실행되는 적어도 하나의 인스트럭션을 저장하는 메모리(1300)를 포함하고, 상기 적어도 하나의 인스트럭션은, 노드의 난스 체인으로부터 난스를 읽어오고, 읽혀진 난스와 이전 height 정보를 연산하고, 및 상기 노드를 합의노드로 선정하기 위하여 상기 연산된 값과 기준값을 비교하도록 적어도 하나의 프로세서(1100)에서 실행될 수 있다.The block chain generation apparatus 1000 according to an embodiment of the present invention includes at least one processor 1100 and a memory 1300 storing at least one instruction executed by the at least one processor 1100, wherein the at least one instruction reads a nonce from a nonce chain of a node, calculates the read nonce and previous height information, and compares the calculated value with a reference value to select the node as an agreement node. 1100).

실시 예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 혹은 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시 예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체 (magneto-optical media), 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위하여 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. Program instructions recorded on the medium may be specially designed and configured for the embodiment, or may be known and usable to those skilled in computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROM and DVD, magneto-optical media such as floptical disks, hardware devices specially configured to store and execute program instructions such as ROM, RAM, and flash memory. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

본 발명은, 분산합의에 참여하는 노드를 예측할 수 없도록 하여 다른 악의적인 노드가 분산합의 노드를 예측하여 공격하는 것이 불가능하다.The present invention makes it impossible to predict the nodes participating in the distributed agreement, so that it is impossible for other malicious nodes to predict and attack the distributed agreement nodes.

또한, 본 발명은, 전체 노드 중 분산합의에 필요한 최소한의 노드만 분산합의 자격을 얻을 수 있도록 하여 분산합의 참여 노드 간 빠른 합의가 가능하다.In addition, the present invention allows only the minimum number of nodes necessary for distributed agreement among all nodes to obtain qualifications for distributed agreement, thereby enabling rapid agreement between nodes participating in distributed agreement.

또한 본 발명은, 노드의 연산 능력과 무관하게 분산합의 자격을 얻을 수 있도록 하여 강력한 연산 능력을 확보한 일부의 노드가 분산합의 자격을 독점 할 수 없다.In addition, the present invention makes it possible to obtain distributed agreement qualifications regardless of the node's computing power, so that some nodes with strong computing capabilities cannot monopolize the distributed agreement qualifications.

또한 본 발명은, 분산합의에 참여하는 노드의 자격을 검증 할 수 있도록 하여 자격 없는 노드의 분산합의 참여를 차단할 수 있다.In addition, the present invention makes it possible to verify the qualifications of nodes participating in distributed agreements, thereby blocking participation in distributed agreements by nodes without qualifications.

한편, 상술된 바와 같이 각 노드의 난스 체인은 합의노드 선정 혹은 검증에 이용하였다. 난스 체인은 임의의 사드(shard)에 노드를 배정하고, 각 샤드에서 최소의 노드가 합의 주체로 선정되도록 이용될 수 있다.On the other hand, as described above, the nonce chain of each node was used to select or verify the consensus node. The nonce chain can be used to assign nodes to a random shard and select the minimum node in each shard as a consensus body.

한편, 상술 된 본 발명의 내용은 발명을 실시하기 위한 구체적인 실시 예들에 불과하다. 본 발명은 구체적이고 실제로 이용할 수 있는 수단 자체뿐 아니라, 장차 기술로 활용할 수 있는 추상적이고 개념적인 아이디어인 기술적 사상을 포함할 것이다.On the other hand, the above-described content of the present invention is only specific embodiments for carrying out the invention. The present invention will include technical ideas, which are abstract and conceptual ideas that can be utilized as technology in the future, as well as concrete and practically usable means themselves.

100, 101, 102: 블록
1000: 블록체인 생성 장치
1100: 프로세서
1300: 메모리
100, 101, 102: block
1000: block chain generating device
1100: processor
1300: memory

Claims (8)

블록체인 생성 장치의 블록 생성 방법에 있어서,
후보노드의 난스 체인에 상응하는, 난스를 읽어오는 단계;
상기 난스와 이전 블록 정보를 이용한 연산을 수행하는 단계;
상기 후보노드의 블록 생성 권한을 확인하기 위하여 상기 연산의 결과와 기준값을 비교하는 단계; 및
상기 후보노드 이외의 다른 노드들 중 적어도 하나 이상에 의하여 상기 후보노드의 자격이 검증된 후, 상기 후보노드가 블록 생성 참여 노드로서 상기 블록의 생성에 참여하는 단계를 포함하고,
상기 난스 체인은
복수개의 난스 값들을 포함하고,
상기 난스 값들은 해쉬 체인을 통해 연결되고, 나중에 생성된 것일수록 먼저 생성된 블록에 상응하는, 블록 생성 방법.
In the block generating method of the block chain generating device,
reading a nonce corresponding to a nonce chain of a candidate node;
performing an operation using the nonce and previous block information;
comparing the result of the operation with a reference value in order to check block generation authority of the candidate node; and
After the qualification of the candidate node is verified by at least one of the nodes other than the candidate node, the candidate node participates in the generation of the block as a block generation participation node,
The nonce chain is
Includes a plurality of nonce values,
The nonce values are linked through a hash chain, and the later generated corresponds to the first generated block.
제 1 항에 있어서,
상기 난스 체인은 시작 높이(start height)와 함께 상기 다른 노드들에게 공개되는 마지막 난스 값을 포함하고, 상기 마지막 난스 값은 상기 다른 노드들 중 적어도 하나 이상에서 상기 후보노드의 자격을 검증하는데 사용되는, 블록 생성 방법.
According to claim 1,
The nonce chain includes a start height and a last nonce value disclosed to the other nodes, and the last nonce value is used to verify the qualification of the candidate node in at least one or more of the other nodes. Block generation method.
제 2 항에 있어서,
상기 후보노드의 자격은
상기 난스에 상응하는 상기 블록의 높이와 상기 시작 높이 사이의 차이값을 이용하여 상기 난스를 해쉬 연산하고,
상기 해쉬 연산의 결과와 상기 마지막 난스 값을 비교한 결과에 기반하여 검증되는, 블록 생성 방법.
According to claim 2,
The qualifications of the candidate node
A hash operation is performed on the nonce using a difference between a height of the block corresponding to the nonce and the starting height;
Block generation method, which is verified based on a result of comparing the result of the hash operation with the last nonce value.
제 1 항에 있어서,
상기 연산을 수행하는 단계는,
상기 난스와 상기 이전 블록 정보를 이용한 해쉬 연산을 수행하는, 블록 생성 방법.
According to claim 1,
The step of performing the above calculation is,
A block generation method of performing a hash operation using the nonce and the previous block information.
제 1 항에 있어서,
상기 이전 블록 정보는 이전 블록의 헤더 해쉬 값인, 블록 생성 방법.
According to claim 1,
Wherein the previous block information is a header hash value of a previous block.
제 1 항에 있어서,
상기 블록 생성을 위한 분산합의에 참여 가능한 노드의 개수가 n이고, 상기 분산합의에 필요한 최소 노드의 개수가 x이고, 상기 분산합의에 필요한 최소 노드의 개수 이하로 선택될 누적 분포 확률 값이 k 일 때, 상기 분산합의 노드의 개수는 변수(n, x, k)에 의해 제어 되는, 블록 생성 방법.
According to claim 1,
When the number of nodes that can participate in the distributed agreement for block generation is n, the minimum number of nodes required for the distributed agreement is x, and the cumulative distribution probability value to be selected below the minimum number of nodes required for the distributed agreement is k, the number of distributed agreement nodes is controlled by variables (n, x, k).
제 6 항에 있어서,
상기 누적 분포 확률 값 k는 이항분포 특성을 갖는, 블록 생성 방법.
According to claim 6,
Wherein the cumulative distribution probability value k has a binomial distribution characteristic.
블록체인 생성 장치에 있어서,
적어도 하나의 프로세서; 및
상기 적어도 하나의 프로세서에 의해 실행되는 적어도 하나의 인스트럭션을 저장하는 메모리를 포함하고,
상기 적어도 하나의 인스트럭션은, 후보노드의 난스 체인에 상응하는 난스를 읽어오고; 상기 난스와 이전 블록 정보를 이용한 연산을 수행하고; 및 상기 후보노드의 블록 생성 권한을 확인하기 위하여 상기 연산의 결과와 기준값을 비교하고, 상기 후보노드 이외의 다른 노드들 중 적어도 하나 이상에 의하여 상기 후보노드의 자격이 검증된 후, 상기 후보노드가 블록 생성 참여 노드로서 상기 블록의 생성에 참여하도록 상기 적어도 하나의 프로세서에서 실행되고,
상기 난스 체인은
복수개의 난스 값들을 포함하고,
상기 난스 값들은 해쉬 체인을 통해 연결되고, 나중에 생성된 것일수록 먼저 생성된 블록에 상응하는, 블록체인 생성 장치.
In the block chain generating device,
at least one processor; and
a memory storing at least one instruction to be executed by the at least one processor;
The at least one instruction reads a nonce corresponding to a nonce chain of a candidate node; performing an operation using the nonce and previous block information; and comparing a result of the operation with a reference value in order to confirm the authority of the candidate node to generate a block, and after the qualification of the candidate node is verified by at least one or more of nodes other than the candidate node, the candidate node is executed in the at least one processor so as to participate in generation of the block as a block generation participating node;
The nonce chain is
Includes a plurality of nonce values,
The nonce values are connected through a hash chain, and the later generated corresponds to the first generated block.
KR1020220160534A 2018-06-12 2022-11-25 Method and appartaus for selecting distributed consensus node based on proof-of-nonce KR102559881B1 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
KR20180067594 2018-06-12
KR1020180067594 2018-06-12
KR1020210182454A KR102472874B1 (en) 2018-06-12 2021-12-20 Method and appartaus for selecting distributed consensus node based on proof-of-nonce

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR1020210182454A Division KR102472874B1 (en) 2018-06-12 2021-12-20 Method and appartaus for selecting distributed consensus node based on proof-of-nonce

Publications (2)

Publication Number Publication Date
KR20220164460A KR20220164460A (en) 2022-12-13
KR102559881B1 true KR102559881B1 (en) 2023-07-27

Family

ID=69062834

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020190050365A KR102342840B1 (en) 2018-06-12 2019-04-30 Method and appartaus for selecting distributed consensus node based on proof-of-nonce
KR1020220160534A KR102559881B1 (en) 2018-06-12 2022-11-25 Method and appartaus for selecting distributed consensus node based on proof-of-nonce

Family Applications Before (1)

Application Number Title Priority Date Filing Date
KR1020190050365A KR102342840B1 (en) 2018-06-12 2019-04-30 Method and appartaus for selecting distributed consensus node based on proof-of-nonce

Country Status (1)

Country Link
KR (2) KR102342840B1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11646879B2 (en) 2018-06-12 2023-05-09 Electronics And Telecommunications Research Institute Method and apparatus for selecting distributed consensus node based on proof of nonce
KR102342840B1 (en) * 2018-06-12 2021-12-24 한국전자통신연구원 Method and appartaus for selecting distributed consensus node based on proof-of-nonce
US11343073B2 (en) 2019-06-18 2022-05-24 Electronics And Telecommunications Research Institute Apparatus and method for achieving distributed consensus based on decentralized byzantine fault tolerance
CN111711526B (en) * 2020-06-16 2024-03-26 深圳前海微众银行股份有限公司 Method and system for consensus of block chain nodes
CN113076375B (en) * 2021-03-29 2023-07-25 湖北央中巨石信息技术有限公司 Multi-party synchronous sampling consensus method, system and device based on block chain and medium
CN115334172B (en) * 2022-07-20 2024-04-19 新疆丝路智汇信息科技有限公司 Block chain protocol processing system and processing method thereof
CN115643043B (en) * 2022-09-09 2024-04-19 北京航空航天大学 Cross-chain consensus election method and system based on verification delay function

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106682907A (en) 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
WO2017095920A1 (en) 2015-12-02 2017-06-08 Pcms Holdings, Inc. System and method for tamper-resistant device usage metering
US20180089683A1 (en) 2016-09-29 2018-03-29 Microsoft Technology Licensing, Llc. Heartbeats and consensus in verifiable outsourced ledgers
KR102342840B1 (en) * 2018-06-12 2021-12-24 한국전자통신연구원 Method and appartaus for selecting distributed consensus node based on proof-of-nonce

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170137388A (en) 2016-06-03 2017-12-13 (주) 블록체인오에스 A method for ensuring integrity by using a blockchain technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017095920A1 (en) 2015-12-02 2017-06-08 Pcms Holdings, Inc. System and method for tamper-resistant device usage metering
US20180089683A1 (en) 2016-09-29 2018-03-29 Microsoft Technology Licensing, Llc. Heartbeats and consensus in verifiable outsourced ledgers
CN106682907A (en) 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
KR102342840B1 (en) * 2018-06-12 2021-12-24 한국전자통신연구원 Method and appartaus for selecting distributed consensus node based on proof-of-nonce

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Emanuel Ferreira Jesus et al. "A Survey of How to Use Blockchain to Secure Internet of Things and the Stalker Attack." Security and Communication Networks 2018 (2018.04.08.)
Tien Tuan Anh Dinh et al., "Untangling Blockchain: A Data Processing View of Blockchain Systems." IEEE transactions on knowledge and data engineering 30.7 (2018.01.04.)

Also Published As

Publication number Publication date
KR102342840B1 (en) 2021-12-24
KR20220164460A (en) 2022-12-13
KR20190140826A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
KR102472874B1 (en) Method and appartaus for selecting distributed consensus node based on proof-of-nonce
KR102559881B1 (en) Method and appartaus for selecting distributed consensus node based on proof-of-nonce
KR102561726B1 (en) Method for selecting consensus node using nonse, method and apparatus for generating blockchain using the same
CN108694665B (en) Block chain management device, data processing system and instant transaction processing method
US20190303622A1 (en) Bicameral framework for fast and tamper-resistant blockchain validation
KR102451115B1 (en) Method for selecting consensus node using nonse, method and apparatus for generating blockchain using the same
KR102578019B1 (en) Blockchain-based data detection method and device, and computer-readable storage medium
Ray et al. BLWN: Blockchain-based lightweight simplified payment verification in IoT-assisted e-healthcare
He et al. Securing over-the-air IoT firmware updates using blockchain
WO2020115496A2 (en) A node testing method and apparatus for a blockchain system
Salman et al. Probabilistic blockchains: a blockchain paradigm for collaborative decision-making
He et al. Consensus mechanism design based on structured directed acyclic graphs
Reno et al. Solving blockchain trilemma using off‐chain storage protocol
KR20210077136A (en) A Program for operation of blockchain network system
Mahmood et al. Survey of consensus protocols
KR20210066348A (en) A terminal device and a method for consturcting secure block chain based on neural block clusters
US20230100485A1 (en) Neural consensus-based blockchain network system for performing random consensus proof using non-random consensus proof-based blockchain network
Anceaume et al. UTXOs as a proof of membership for Byzantine Agreement based Cryptocurrencies
Yoo Analysis and Design of an Incentive Scheme for a Proof-of-Work Blockchain
KR20230071790A (en) A Neural consensus-based blockchain network system that performs random consensus proof using non-random consensus proof-based blockchain network
Andersen RELATIONSHIPS BETWEEN BLOCKCHAIN CONSENSUS PARAMETERS AND NETWORK EXTERNALITIES
Shtennikov et al. Development and Analysis of Authentication Method for Iot Devices Software on the Network Using Blockchain Technologies
Chen et al. On Designs of Decentralized Reputation Management for Permissioned Blockchain Networks.
Anita et al. Proof-of-Improved-Participation: A New Consensus Protocol for Blockchain Technology.
Sathya et al. Consensus and Mining in a Nutshell

Legal Events

Date Code Title Description
A107 Divisional application of patent
E701 Decision to grant or registration of patent right