KR20230068800A - Blockchain network being able to preventing from the transaction collision and method thereof - Google Patents

Blockchain network being able to preventing from the transaction collision and method thereof Download PDF

Info

Publication number
KR20230068800A
KR20230068800A KR1020210154951A KR20210154951A KR20230068800A KR 20230068800 A KR20230068800 A KR 20230068800A KR 1020210154951 A KR1020210154951 A KR 1020210154951A KR 20210154951 A KR20210154951 A KR 20210154951A KR 20230068800 A KR20230068800 A KR 20230068800A
Authority
KR
South Korea
Prior art keywords
transaction
transactions
tree structure
memory pool
blockchain network
Prior art date
Application number
KR1020210154951A
Other languages
Korean (ko)
Inventor
장주욱
김주원
Original Assignee
서강대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 서강대학교산학협력단 filed Critical 서강대학교산학협력단
Priority to KR1020210154951A priority Critical patent/KR20230068800A/en
Publication of KR20230068800A publication Critical patent/KR20230068800A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1087Peer-to-peer [P2P] networks using cross-functional networking aspects
    • H04L67/1089Hierarchical topologies

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 하이퍼레저 패브릭 기반의 블록체인 네트워크에서의 상기 오더러에 의한 트랜잭션 충돌 방지 방법에 관한 것이다. 상기 트랜잭션 충돌 방지 방법은, 상기 오더러는 임시 메모리 풀 및 트리구조 메모리 풀을 구비하고, (a) 사용자로부터 트랜잭션에 대한 블록 처리가 요청되면, 블록 처리 요청된 트랜잭션들을 임시적으로 임시 메모리 풀에 저장하는 단계; (b) 상기 임시 메모리 풀에 저장된 트랜잭션들의 사용자 요청 시간 정보와 트랜잭션에 대한 key에 따라 정렬하여 트랜잭션 트리 구조로 정렬하여 트리 구조 메모리 풀에 저장하는 단계; (c) 상기 트리 구조 메모리 풀에 저장된 트랜잭션 트리 구조에 배치된 트랜잭션들을 사전 설정된 우선 순위에 따라 블록 처리하는 단계;를 구비하여, 트랜잭션 충돌이 발생되지 않도록 하는 것을 특징으로 한다. The present invention relates to a transaction collision prevention method by the orderer in a blockchain network based on Hyperledger Fabric. The transaction collision prevention method includes: the orderer has a temporary memory pool and a tree-structured memory pool, and (a) when block processing for a transaction is requested from a user, temporarily storing the block processing-requested transactions in the temporary memory pool. step; (b) arranging transactions stored in the temporary memory pool according to user request time information and transaction keys into a transaction tree structure and storing them in a tree structure memory pool; (c) block-processing the transactions arranged in the transaction tree structure stored in the tree-structured memory pool according to preset priorities; characterized in that transaction conflicts do not occur.

Description

트랜잭션 충돌 방지 가능한 블록체인 네트워크 및 트랜잭션 충돌 방지 방법{Blockchain network being able to preventing from the transaction collision and method thereof}Blockchain network being able to prevent transaction collision and method thereof {Blockchain network being able to prevent from the transaction collision and method thereof}

본 발명은 하이퍼레저 패브릭 기반의 블록체인 네트워크 및 상기 네트워크에서의 트랜잭션 충돌 방지 방법에 관한 것으로서, 더욱 구체적으로는 트랜잭션을 병렬 처리하는 하이퍼레저 패브릭 기반의 블록체인 네트워크에서 발생하는 트랜잭션 충돌을 방지하여 네트워크의 성능을 향상시킬 수 있도록 한 트랜잭션 충돌 방지 방법에 관한 것이다. The present invention relates to a hyperledger fabric-based blockchain network and a method for preventing transaction collisions in the network, and more specifically, to a network by preventing transaction collisions occurring in a hyperledger fabric-based blockchain network that processes transactions in parallel. It relates to a method for preventing transaction collisions to improve performance.

허가형 프라이빗 블록체인인 하이퍼레저 패브릭(Hyperledger Fabric)은 모듈러 아키텍처를 이용한 어플리케이션/솔루션 개발을 가능하게 해주는 프레임 워크이다. 하이퍼레저 패브릭에 기반한 블록체인 네트워크는 분산 원장, 체인 코드, 피어(peer), 오더러(Orderer), 채널을 구비한다. 하이퍼레저 패브릭에서의 분산 원장(Ledger)는 비즈니스 객체에 대한 중요한 사실 정보, 객체 속성의 현재 가치, 거래 이력을 저장해 놓은 것으로서, 현재의 상태를 저장해 놓은 World state와 원장 생성시점부터 현재까지의 상태 변화에 대한 모든 사용 기록을 저장해 놓은 블록체인으로 이루어진다. World state는 현재 상태를 나타내는 것으로서 전체 트랜잭션 로그를 통한 계산없이 현재 값에 직접 접근이 용이하며, 상태의 생성/업데이트/삭제 등으로 자주 변경되며, 기본적으로 key-value 쌍으로 표시된다. 블록체인은 원장 생성 시점부터 world state까지의 모든 변경사항을 기록하는 것으로서 블록체인 데이터 구조는 수정될 수 없다. Hyperledger Fabric, a permissioned private blockchain, is a framework that enables application/solution development using a modular architecture. Blockchain networks based on Hyperledger Fabric have distributed ledgers, chain codes, peers, orderers, and channels. The distributed ledger in Hyperledger Fabric stores important factual information about business objects, the current value of object properties, and transaction history. The world state that stores the current state and the state change from the time the ledger was created to the present It consists of a block chain that stores all usage records for World state represents the current state, and it is easy to access the current value directly without calculation through the entire transaction log. The blockchain records all changes from the time the ledger is created to the world state, and the blockchain data structure cannot be modified.

피어는 원장과 체인 코드를 관리하며 블록체인 네트워크를 유지하는 노드로서, 체인코드를 실행하며, 요청된 트랜잭션을 검증 및 전파하며, 원장과 체인 코드를 관리하고 저장하는 역할을 수행한다. A peer is a node that manages the ledger and chain code and maintains the blockchain network. It executes the chain code, verifies and propagates requested transactions, and manages and stores the ledger and chain code.

오더러는 각 피어들에 의해 검증되어 전파된 트랜잭션들을 모아서 정렬한 후 실제 블록을 생성하고 트랜잭션들을 처리하는 노드이다. 오더러는 트랜잭션들을 모아 블록을 생성한 후 자신에게 연결되어 있는 리더 피어(leader peer)들에게 블록을 전달하고, 리더 피어들이 자신이 속한 채널의 피어들에게 블록을 전달하면 피어들은 블록을 검증한 후 자신의 원장에 추가시키게 된다. The orderer is a node that collects and sorts the transactions that have been verified and propagated by each peer, creates actual blocks, and processes the transactions. After the orderer collects transactions to create a block, it delivers the block to the leader peers connected to it, and when the leader peers deliver the block to the peers of the channel to which they belong, the peers verify the block added to their own ledger.

전술한 바와 같이, 하이퍼레저 패브릭 기반의 블록체인 네트워크는 기존의 블록체인 네트워크에 비하여 확장성이 개선되어 병렬로 트랜잭션들을 처리하는 구조를 통해 속도 향상이 이루어졌으며, 채널이라는 네트워크 특성을 사용하여 보안성도 뛰어나기 때문에, 다양한 플랫폼과 접목하고자 하는 시도가 이루어지고 있다. 기존에 사용하던 플랫폼에 하이퍼레저 패브릭 기반의 블록체인 네트워크를 적용하기 위해서는 네트워크 자체의 성능이 일정 수준 이상으로 보장될 필요가 있는데, 최적의 네트워크 환경을 제공하기 위하여 네트워크상에서 거래 도중에 발생할 수 있는 성능 저하 요인들을 제거하는 기법들이 요구되고 있는 실정이다. As described above, the hyperledger fabric-based block chain network has improved scalability compared to the existing block chain network, and speed has been improved through a structure that processes transactions in parallel, and security is also improved by using the network characteristic of a channel. Because it is excellent, attempts are being made to integrate it with various platforms. In order to apply a Hyperledger Fabric-based blockchain network to an existing platform, the performance of the network itself needs to be guaranteed to a certain level or higher. In order to provide an optimal network environment, performance degradation that may occur during transactions on the network Techniques for removing the factors are in demand.

한편, 이더리움 블록체인 등과 같은 기존의 네트워크는 트랜잭션을 직렬로 처리하는 방식인 반면에, 하이퍼레저 패브릭 기반의 블록체인 네트워크는 트랜잭션들을 병렬적으로 처리함으로써, 합의 과정부터 구조적 변경에 의해 트랜잭션을 처리할 수 있는 속도를 획기적으로 향상시키게 되었다. 하지만, 하이퍼레저 패브릭 기반의 블록체인 네트워크는 병렬로 트랜잭션을 처리할 때 합의 과정에서 트랜잭션 충돌 문제인 MVCC(Multi-Version Concurrency Control) 충돌이 발생되어, 전체적인 성능 저하를 초래할 수 있다. On the other hand, while existing networks such as the Ethereum blockchain process transactions serially, the Hyperledger Fabric-based blockchain network processes transactions by structural change from the consensus process by processing transactions in parallel. It has dramatically improved the speed at which it can be done. However, when a blockchain network based on Hyperledger Fabric processes transactions in parallel, MVCC (Multi-Version Concurrency Control) collision, a transaction collision problem, may occur during the consensus process, resulting in overall performance degradation.

하이퍼레저 패브릭 기반의 블록체인 네트워크에서는 World state의 key라는 데이터를 이용하여 모든 트랜잭션의 신원을 확인하게 된다. 하이퍼레저 패브릭 기반의 블록체인 네트워크는 3단 합의 알고리즘에서의 검증 단계에서 하나의 블록안에 동일한 key를 갖는 트랜잭션이 입력되는 경우, 하이퍼레저 패브릭의 분산 원장 중 일부인 World state의 버전 데이터를 업데이트하지 못하게 되고, 그 결과 트랜잭션 충돌로 인한 처리 실패가 발생하게 된다. 이와 같이, 하나의 블록에 동일한 key를 갖는 트랜잭션이 입력되어 트랜잭션이 충돌되는 것을 'MVCC 충돌'이라고 하며, 이 경우 World state를 업데이트하지 못하게 된다. In a blockchain network based on Hyperledger Fabric, the identity of all transactions is verified using data called the key of the world state. In the Hyperledger Fabric-based blockchain network, when a transaction with the same key is entered in one block in the verification step of the three-stage consensus algorithm, the version data of the world state, which is part of the distributed ledger of the Hyperledger Fabric, cannot be updated. , resulting in processing failure due to transaction conflicts. In this way, when a transaction with the same key is entered into one block and the transaction collides, it is called 'MVCC collision', and in this case, the world state cannot be updated.

이에 본 발명은 하이퍼레저 패브릭 블록체인 기반의 네트워크에서 key 중복에 의한 트랜잭션 충돌 가능성을 없앰으로써 병렬 처리에 의한 고성능 네트워크 환경을 유지하고 이를 통해 신뢰성을 보장할 수 있는 방안을 제안하고자 한다. Accordingly, the present invention proposes a method for maintaining a high-performance network environment through parallel processing and guaranteeing reliability by eliminating the possibility of transaction collision due to key duplication in a Hyperledger Fabric blockchain-based network.

한국등록특허공보 제 10-2118178호Korean Registered Patent Publication No. 10-2118178 한국등록특허공보 제 10-2234128호Korean Registered Patent Publication No. 10-2234128

전술한 문제점을 해결하기 위하여 본 발명은 병렬 처리될 트랜잭션들을 키에 따른 트리 구조로 정렬하여 하나의 블록에 동일한 키를 가진 트랜잭션이 들어가지 않도록 함으로써 트랜잭션 충돌 가능성을 없애고 병렬 처리에 의한 고성능 네트워크 환경을 유지하고 신뢰성을 보장할 수 있도록 하는 하이퍼레저 패브릭 기반의 블록체인 네트워크에서의 트랜잭션 충돌 방지 방법을 제공하는 것을 목적으로 한다. In order to solve the above problems, the present invention arranges transactions to be parallelly processed in a tree structure according to keys so that transactions with the same key are not entered into one block, thereby eliminating the possibility of transaction collision and creating a high-performance network environment by parallel processing. Its purpose is to provide a transaction collision prevention method in a Hyperledger Fabric-based blockchain network that can maintain and guarantee reliability.

전술한 기술적 과제를 달성하기 위한 본 발명의 제1 특징에 따른 트랜잭션을 병렬 처리하도록 구성된 노드를 포함하는 블록체인 네트워크에 있어서, 상기 노드는 임시 메모리 풀 및 트리구조 메모리 풀을 구비하고, 상기 노드는 사용자로부터 트랜잭션에 대한 블록 처리가 요청되면, 블록 처리 요청된 트랜잭션들을 임시적으로 임시 메모리 풀에 저장하고, 상기 임시 메모리 풀에 저장된 트랜잭션들의 사용자 요청 시간 정보와 트랜잭션에 대한 식별자 값에 따라 정렬하여 트랜잭션 트리 구조로 정렬하여 트리 구조 메모리 풀에 저장하며, 상기 트리 구조 메모리 풀에 저장된 트랜잭션 트리 구조에 배치된 트랜잭션들을 사전 설정된 우선 순위에 따라 블록 처리함으로써, 트랜잭션 충돌이 발생되지 않도록 한다. In a blockchain network including a node configured to parallelly process transactions according to the first aspect of the present invention for achieving the above technical problem, the node has a temporary memory pool and a tree-structured memory pool, and the node comprises When block processing for a transaction is requested from a user, the transactions requested for block processing are temporarily stored in a temporary memory pool, and the transactions stored in the temporary memory pool are sorted according to the user request time information and the identifier value for the transaction, and the transaction tree It is sorted into a structure and stored in a tree-structured memory pool, and transactions arranged in the transaction tree structure stored in the tree-structured memory pool are block-processed according to a preset priority, so that transaction conflicts do not occur.

전술한 제1 특징에 따른 블록체인 네트워크는 하이퍼레저 패브릭을 기반으로 한 블록체인 네트워크이며, 상기 노드는 오더러(Orderer)인 것이 바람직하며, 상기 트랜잭션에 대한 식별자는 하이퍼레저 패브릭의 분산 원장의 World state의 key 인 것이 바람직하다. The blockchain network according to the first feature described above is a blockchain network based on Hyperledger Fabric, the node is preferably an orderer, and the identifier for the transaction is a World of Distributed Ledger of Hyperledger Fabric. It is desirable to be the key of the state.

전술한 제1 특징에 따른 블록체인 네트워크에 있어서, 상기 오더러는 임시 메모리 풀에 저장된 트랜잭션들을 사용자 요청 시간 순서에 따라 트랜잭션들을 1차 정렬하고, 1차 정렬된 트랜잭션들에 대하여, 동일하지 않는 식별자를 갖는 트랜잭션들은 트리 구조의 루트 레벨에 배치하고, 동일한 식별자를 갖는 트랜잭션들은 사용자 요청 시간 순서에 따라 루트 레벨의 동일한 식별자를 갖는 트랜잭션에 대해 부모-자식 노드로 연결하여 2차 정렬하여 트랜잭션 트리 구조를 형성하여 트리 구조 메모리 풀에 저장하는 것이 바람직하다. In the blockchain network according to the first feature described above, the orderer first sorts the transactions stored in the temporary memory pool according to the order of the user's request time, and assigns unequal identifiers to the first-ordered transactions. Transactions with the same identifier are placed in the root level of the tree structure, and transactions with the same identifier are connected as parent-child nodes for transactions with the same identifier in the root level according to the time order of the user's request, and secondary sorting is performed to form a transaction tree structure. and stored in a tree-structured memory pool.

전술한 제1 특징에 따른 블록체인 네트워크에 있어서, 상기 노드가 트랜잭션 트리 구조에 배치된 트랜잭션들을 블록 처리하는 우선 순위는, 트랜잭션 트리 구조의 최상위 레벨과 사용자 요청 시간 순서에 따라 결정되는 것이 바람직하다. In the blockchain network according to the first feature described above, it is preferable that the order of block processing of the transactions arranged in the transaction tree structure by the node is determined according to the top level of the transaction tree structure and the order of user request time.

본 발명의 제2 특징에 따른 트랜잭션 충돌 방지 방법은, 트랜잭션을 병렬 처리하도록 구성된 오더러(Orderer)를 포함하는 하이퍼레저 패브릭 기반의 블록체인 네트워크에서의 상기 오더러에 의한 트랜잭션 충돌 방지 방법으로서, 상기 오더러는 임시 메모리 풀 및 트리구조 메모리 풀을 구비하고, (a) 사용자로부터 트랜잭션에 대한 블록 처리가 요청되면, 블록 처리 요청된 트랜잭션들을 임시적으로 임시 메모리 풀에 저장하는 단계; (b) 상기 임시 메모리 풀에 저장된 트랜잭션들의 사용자 요청 시간 정보와 트랜잭션에 대한 key에 따라 정렬하여 트랜잭션 트리 구조로 정렬하여 트리 구조 메모리 풀에 저장하는 단계; (c) 상기 트리 구조 메모리 풀에 저장된 트랜잭션 트리 구조에 배치된 트랜잭션들을 사전 설정된 우선 순위에 따라 블록 처리하는 단계; (d) 트랜잭션 트리 구조를 갱신하는 단계;를 구비하여, 트랜잭션 충돌이 발생되지 않도록 한다. A method for preventing transaction collisions according to a second aspect of the present invention is a method for preventing transaction collisions by an orderer in a blockchain network based on Hyperledger Fabric including an orderer configured to process transactions in parallel, wherein the method includes: The orderer includes a temporary memory pool and a tree-structured memory pool, and (a) when block processing of a transaction is requested from a user, temporarily storing transactions requested for block processing in the temporary memory pool; (b) arranging transactions stored in the temporary memory pool according to user request time information and transaction keys into a transaction tree structure and storing them in a tree structure memory pool; (c) block-processing transactions arranged in a transaction tree structure stored in the tree structure memory pool according to preset priorities; (d) updating the transaction tree structure; so that transaction conflicts do not occur.

전술한 제2 특징에 따른 트랜잭션 충돌 방지 방법에 있어서, 상기 (b) 단계는 (b1) 임시 메모리 풀에 저장된 트랜잭션들을 사용자 요청 시간 순서에 따라 트랜잭션들을 1차 정렬하는 단계; (b2) 1차 정렬된 트랜잭션들에 대하여, 동일하지 않는 key를 갖는 트랜잭션들은 트리 구조의 루트 레벨에 배치하고, 동일한 key를 갖는 트랜잭션들은 사용자 요청 시간 순서에 따라 루트 레벨의 동일한 key를 갖는 트랜잭션에 대해 부모-자식 노드로 연결하여 2차 정렬하여, 트랜잭션 트리 구조를 형성하여 트리 구조 메모리 풀에 저장하는 단계;를 구비한다. In the transaction collision avoidance method according to the second aspect, the step (b) may include: (b1) first sorting the transactions stored in the temporary memory pool according to the order of user request time; (b2) Regarding the primary sorted transactions, transactions with unequal keys are placed in the root level of the tree structure, and transactions with the same key are placed in the transaction with the same key in the root level according to the user request time order. and connecting to parent-child nodes for secondary sorting, forming a transaction tree structure, and storing the transaction tree structure in a tree structure memory pool.

전술한 제2 특징에 따른 트랜잭션 충돌 방지 방법에 있어서, 상기 (c) 단계의 우선 순위는, 트랜잭션 트리 구조의 최상위 레벨과 사용자 요청 시간 순서에 따라 결정되는 것이 바람직하며, In the transaction collision prevention method according to the second feature described above, the priority of step (c) is preferably determined according to the top level of the transaction tree structure and the order of user request time,

상기 (c) 단계의 우선 순위를 결정함에 있어서, 상기 트랜잭션 트리 구조의 최상위 레벨인 루트 레벨에 위치한 트랜잭션의 개수가 블록의 최대 크기를 초과하는 경우, 루트 레벨에 위치한 트랜잭션들 중에서 사용자 요청 시간 순서가 빠른 순서를 기준으로 하여 블록 처리할 트랜잭션을 결정하는 것이 바람직하다. In determining the priority of step (c), when the number of transactions located at the root level, which is the highest level of the transaction tree structure, exceeds the maximum size of a block, the order of user request time among transactions located at the root level It is desirable to determine transactions to be processed in blocks based on the order of speed.

전술한 구성을 갖는 본 발명에 따른 블록체인 네트워크는 처리 대기 상태의 트랜잭션들을 key와 사용자 요청 시간을 기반으로 하여 트리 구조로 정렬하여 보관하고, 트리 구조를 기반으로 한 우선 순위에 따라 블록 처리함으로써, 하나의 블록에 동일한 key를 갖는 트랜잭션이 입력되지 않도록 하여 트랜잭션이 충돌되는 방지할 수 있게 된다. 그 결과, 본 발명에 따른 네트워크는 트랜잭션 충돌 가능성을 없애고 병렬 처리에 의한 고성능 환경을 유지하고 신뢰성을 보장할 수 있게 된다. The blockchain network according to the present invention having the above configuration sorts and stores transactions in a waiting state in a tree structure based on the key and user request time, and blocks them according to priority based on the tree structure, It is possible to prevent transactions from colliding by preventing transactions with the same key from entering one block. As a result, the network according to the present invention can eliminate the possibility of transaction collision, maintain a high-performance environment by parallel processing, and ensure reliability.

도 1은 본 발명의 바람직한 실시예에 따른 하이퍼레저 패브릭 기반의 블록체인 네트워크에 있어서, 오더러에 의해 수행되는 트랜잭션 충돌 방지 방법을 순차적으로 도시한 흐름도이다.
도 2는 본 발명의 바람직한 실시예에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트랜잭션 충돌을 방지하기 위한 오더러(Orderer)의 메모리 풀을 도시한 구조도이다.
도 3은 본 발명에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트리 구조 메모리 풀의 트랜잭션을 처리하기 위한 우선 순위 요소를 도시한 그림이다.
도 4는 본 발명에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트랜잭션이 블록에 처리된 이후 트리 구조 갱신 및 우선순위에 따라 처리되는 트랜잭션을 설명하기 위하여 도시한 그림이며, 도 5는 사용자에 의해 신규 트랜잭션에 대한 블록 처리가 요청된 경우 트리 구조 갱신 및 우선 순위에 따라 처리되는 트랜잭션을 설명하기 위하여 도시한 그림이다.
도 6은 본 발명에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트랜잭션들을 2차 정렬하여 트랜잭션 트리 구조를 완성하는 과정을 순차적으로 도시한 흐름도이다.
1 is a flowchart sequentially illustrating a transaction conflict prevention method performed by an orderer in a blockchain network based on Hyperledger Fabric according to a preferred embodiment of the present invention.
2 is a structural diagram showing a memory pool of an orderer for preventing transaction collisions in a Hyperledger Fabric blockchain network according to a preferred embodiment of the present invention.
3 is a diagram showing priority factors for processing transactions in a tree-structured memory pool in the Hyperledger Fabric blockchain network according to the present invention.
4 is a diagram for explaining transactions processed according to tree structure update and priority after transactions are processed in blocks in the Hyperledger Fabric blockchain network according to the present invention. FIG. When block processing for a transaction is requested, it is a figure shown to explain the transaction processed according to tree structure update and priority.
6 is a flowchart sequentially illustrating a process of completing a transaction tree structure by secondary sorting transactions in the Hyperledger Fabric blockchain network according to the present invention.

하이퍼레저 패브릭 기반의 블록체인 네트워크에 있어서, MVCC 충돌이 발생하는 경우, 모든 트랜잭션에 대한 블록 처리가 실패하는 것이 아니다. 즉, 첫번째 트랜잭션에 대한 블록 처리는 성공하게 되고, 그 이후에 요청된 트랜잭션이 key가 동일하면 분산 원장의 World state의 버전 업데이트가 실패하게 되고, 그 결과 key가 동일한 해당 트랜잭션의 블록 처리가 실패된다. 즉, key가 동일한 트랜잭션이 복수 개가 요청되더라도, 첫번째 트랜잭션의 처리는 성공하고, 그 이후의 트랜잭션들의 처리가 실패하게 된다. In a Hyperledger Fabric-based blockchain network, when an MVCC collision occurs, block processing for all transactions does not fail. That is, block processing for the first transaction succeeds, and if subsequent transactions have the same key, version update of the world state of the distributed ledger fails, and as a result, block processing of the corresponding transaction with the same key fails. . That is, even if a plurality of transactions having the same key are requested, the first transaction is processed successfully, and subsequent transactions fail.

따라서, 본 발명에 따른 네트워크에서 트랜잭션 충돌을 방지하기 위하여, 첫번째로 처리 성공한 트랜잭션 이후에 입력되는 트랜잭션들은 일시적으로 보류하여 다음 블록에 처리될 수 있게 지연시키고, 임의의 트랜잭션에 대해 블록 처리를 지연시켰을 때 남는 블록에 key가 충돌하지 않는 다른 트랜잭션을 기존에 요청된 순서보다 앞당겨 우선 처리를 진행함으로써, 전체적인 성능 지연을 방지하고 더 나아가 성능 향상을 도모할 수 있어야 한다. 이를 위하여, 본 발명에 따른 방법은 사전에 처리되지 않고 대기중인 트랜잭션들 간의 key 관계를 모두 파악하여 하나의 트리 구조로 정렬하고, 정렬된 트랜잭션 트리 구조를 이용하여 순차적으로 사전 설정된 우선 순위에 따라 처리되도록 구성된 것을 특징으로 한다. Therefore, in order to prevent transaction collisions in the network according to the present invention, transactions input after the first successfully processed transaction are temporarily suspended and delayed so that they can be processed in the next block, and block processing for any transaction is delayed. It should be possible to prevent overall performance delay and further improve performance by prioritizing other transactions whose keys do not collide with the remaining blocks ahead of the previously requested order. To this end, the method according to the present invention grasps all key relationships between queued transactions that have not been processed in advance, sorts them into a single tree structure, and sequentially processes them according to preset priorities using the sorted transaction tree structure. It is characterized in that it is configured to be.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예에 따른 하이퍼레저 패브릭 블록체인 네트워크 및 상기 네트워크에서의 트랜잭션 충돌 방지 방법에 대하여 구체적으로 설명한다. 본 발명에 따른 트랜잭션 충돌 방지 방법은 하이퍼레저 패브릭 기반의 블록체인 네트워크의 오더러(Orderer)에 의해 수행되며, 오더러는 트랜잭션 충돌 방지 방법을 구현하는 프로그램이 설치되어 실행됨에 따라, 트랜잭션들을 트리 구조로 정렬하고 사전 설정된 우선 순위에 따라 블록 처리함으로써, 트랜잭션 충돌을 방지하고 네트워크의 성능을 향상시킬 수 있게 된다. Hereinafter, a Hyperledger Fabric blockchain network according to a preferred embodiment of the present invention and a method for preventing transaction collisions in the network will be described in detail with reference to the accompanying drawings. The transaction collision avoidance method according to the present invention is performed by an orderer of a blockchain network based on Hyperledger Fabric. By sorting and processing blocks according to preset priorities, transaction collisions can be prevented and the performance of the network can be improved.

도 1은 본 발명의 바람직한 실시예에 따른 하이퍼레저 패브릭 기반의 블록체인 네트워크에 있어서, 오더러에 의해 수행되는 트랜잭션 충돌 방지 방법을 순차적으로 도시한 흐름도이다. 도 1을 참조하면, 오더러는 임시 메모리 풀과 트리 구조 메모리 풀을 구비하고, 사용자로부터 트랜잭션들에 대한 블록 처리가 신규 요청되면(단계 100), 블록 처리가 신규 요청된 트랜잭션들을 임시 메모리 풀에 보관한다(단계 110). 이때, 각 트랜잭션들은 사용자 요청 시간 정보와 분산 원장의 World state의 key 값을 보유한다. 1 is a flowchart sequentially illustrating a transaction conflict prevention method performed by an orderer in a blockchain network based on Hyperledger Fabric according to a preferred embodiment of the present invention. Referring to FIG. 1, the orderer has a temporary memory pool and a tree-structured memory pool, and when block processing for transactions is newly requested from a user (step 100), the newly requested transactions for block processing are stored in the temporary memory pool. (step 110). At this time, each transaction holds the user request time information and the key value of the world state of the distributed ledger.

다음, 임시 메모리 풀에 보관된 트랜잭션들을 사용자의 요청 시간 순서에 따라 1차 정렬하여 임시 배열에 기재한 후(단계 120), 각 트랜잭션의 key에 따라 2차 정렬하여 트리 구조 정렬을 완료함으로써(단계 130), 트랜잭션 처리 대기 상태를 유지한다(단계 140). 다음, 블록 생성 주기내에서 트랜잭션 트리 구조를 기반으로 하여, 사전 설정된 우선 순위에 따라 트랜잭션들을 블록 처리한다(단계 150). 다음, 이전 단계에서 블록 처리된 트랜잭션들을 트랜잭션 트리 구조에서 제거한 후, 트리 구조를 갱신한다(단계 160). Next, the transactions stored in the temporary memory pool are first sorted according to the user's request time order and written in the temporary array (step 120), and then the tree structure sort is completed by second order sorting according to the key of each transaction (step 120). 130), and maintains a transaction processing standby state (step 140). Next, based on the transaction tree structure within the block generation period, blocks are processed according to a preset priority (step 150). Next, after the transactions blocked in the previous step are removed from the transaction tree structure, the tree structure is updated (step 160).

다음, 사용자로부터 트랜잭션들에 대한 블록 처리가 신규 요청되면, 단계 100으로 되돌아가서 다시 해당 과정을 반복하게 되며, 신규 요청되지 않으면, 단계 140으로 되돌아가서, 트랜잭션 처리 대기 상태를 유지한 후 사전 설정된 우선 순위에 따라 블록 처리한다. Next, if block processing for transactions is newly requested from the user, the process returns to step 100 and the corresponding process is repeated again. Blocks are processed according to rank.

이하, 전술한 각 단계들에 대하여 보다 구체적으로 설명한다. Hereinafter, each step described above will be described in more detail.

먼저, 도 2를 참조하여, 전술한 단계 100 내지 단계 140에 대하여 보다 구체적으로 설명한다. 도 2는 본 발명의 바람직한 실시예에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트랜잭션 충돌을 방지하기 위한 오더러(Orderer)의 메모리 풀을 도시한 구조도이다. First, with reference to FIG. 2, steps 100 to 140 described above will be described in more detail. 2 is a structural diagram showing a memory pool of an orderer for preventing transaction collisions in a Hyperledger Fabric blockchain network according to a preferred embodiment of the present invention.

도 2를 참조하면, 본 발명에 따른 블록체인 네트워크에 있어서, 오더러(Orderer)는 피어(peer)들로부터 검증된 트랜잭션들을 모아서 정렬한 후 실제 블록을 생성하게 되는데, 트랜잭션 충돌 방지를 위한 트리 구조 형성을 위하여, 트랜잭션들이 처리되기 전에 임시적으로 보관되는 임시 메모리 풀(200)과 트랜잭션 처리 대기 상태인 트랜잭션들이 저장되는 트리 구조 메모리 풀(210)을 구비한다. Referring to FIG. 2, in the blockchain network according to the present invention, an orderer collects and sorts verified transactions from peers and then creates an actual block, which has a tree structure to prevent transaction collisions. For formation, a temporary memory pool 200 in which transactions are temporarily stored before being processed and a tree structured memory pool 210 in which transactions in a transaction processing standby state are stored are provided.

따라서, 오더러는, 사용자로부터 트랜잭션들에 대한 블록 처리가 신규 요청되면(단계 100), 신규 요청되어 아직 처리되지 않은 트랜잭션들을 임시적으로 임시 메모리 풀에 보관하게 되는데, 각 트랜잭션들은 사용자가 요청한 시간 정보 및 key 값을 보유한다. 예시적으로, 도 2의 임시 메모리 풀에는 key A를 갖는 Tx0, Tx1, Tx2, key B를 갖는 Tx3, Key C를 갖는 Tx4, key B와 key C를 갖는 Tx5가 사용자로부터 블록 처리 요청되어 저장된다. 여기서, 각 트랜잭션의 번호는 사용자에 의해 요청된 시간 순서를 의미한다. Therefore, when block processing for transactions is newly requested from the user (step 100), the orderer temporarily stores the newly requested transactions that have not yet been processed in a temporary memory pool. holds the key value. Illustratively, in the temporary memory pool of FIG. 2, Tx0, Tx1, and Tx2 with key A, Tx3 with key B, Tx4 with key C, and Tx5 with key B and key C are stored upon request from the user for block processing. . Here, the number of each transaction means the time sequence requested by the user.

다음, 임시 메모리 풀에 보관된 트랜잭션들에 대하여, 사용자 요청 시간 순서에 따라 트랜잭션들을 1차 정렬하게 되는데, Tx1, Tx2, Tx3, Tx4, Tx5의 순서로 정렬된다. 다음, 1차 정렬된 트랜잭션들을 key에 따라 트랜잭션 처리 대기 상태인 트리 구조로 2차 정렬하여, 트리 구조 메모리 풀에 저장하게 된다(단계 130). 트리 구조 메모리 풀에 저장된 트랜잭션들은 사전 설정된 우선 순위에 따라 블록 처리될 때까지 처리 대기 상태를 유지하게 된다(단계 140). 1차 정렬된 트랜잭션들을 트리 구조로 변환하는 2차 정렬 과정에 대한 구체적인 설명은 도 6을 참조하여 후술한다. Next, with respect to the transactions stored in the temporary memory pool, the transactions are first sorted according to the order of user request time, and are sorted in the order of Tx1, Tx2, Tx3, Tx4, and Tx5. Next, the primary sorted transactions are secondary sorted according to the key into a tree structure waiting for transaction processing, and stored in the tree structure memory pool (step 130). Transactions stored in the tree-structured memory pool remain in a processing standby state until they are processed as blocks according to preset priorities (step 140). A detailed description of the secondary sorting process of converting the primary sorted transactions into a tree structure will be described later with reference to FIG. 6 .

이하, 도 3을 참조하여, 단계 150에 대하여 보다 구체적으로 설명한다. 도 3은 본 발명에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트리 구조 메모리 풀의 트랜잭션을 처리하기 위한 우선 순위 요소를 도시한 그림이다. Hereinafter, with reference to FIG. 3, step 150 will be described in more detail. 3 is a diagram showing priority factors for processing transactions in a tree-structured memory pool in the Hyperledger Fabric blockchain network according to the present invention.

단계 150에서는, 전술한 과정에 의해 트랜잭션 처리 대기 상태를 유지하는 트랜잭션들은 사전 설정된 우선 순위에 따라 블록 처리된다. 도 3을 참조하면, 우선 순위는 트리 구조의 루트 레벨(a)과 사용자 요청 시간 순서(b)에 따라 결정된다. 먼저, 가장 높은 우선 순위는 트리 구조에서 최상위 레벨인 루트 레벨(Root Level)에 위치한 트랜잭션들이며, 따라서 루트 레벨에 위치한 트랜잭션들이 가장 우선적으로 처리한다. 만약, 트리 구조의 루트 레벨에 위치한 트랜잭션의 개수가 하나의 블록에서 처리될 수 있는 트랜잭션의 최대 개수를 초과하는 경우, 사용자 요청 시간이 빠른 순서에 따라 트랜잭션이 처리된다. 이는 트리 구조에서 트리 레벨(Tree Level)이 발생하는 이유가 트랜잭션의 key가 중복되었기 때문에 구분이 생기고, 루트 레벨의 하위에 있는 레벨에 위치한 트랜잭션이 함께 블록에 처리되면 트랜잭션 충돌이 발생하기 때문이다. 따라서, 트리 구조의 최상위 레벨인 루트 레벨에 있는 트랜잭션을 시간 요청이 빠른 순으로 처리하게 되면서, 처리 이후 블록에 포함된 트랜잭션 이외의 트랜잭션은 다시 정렬 과정을 거쳐 새로운 트리 구조를 형성하게 되고, 다음 블록에서 처리될 트랜잭션을 우선 순위에 따라 결정하게 된다. In step 150, transactions that remain in a transaction processing waiting state through the above-described process are block-processed according to preset priorities. Referring to FIG. 3 , the priority is determined according to the root level of the tree structure (a) and the user request time order (b). First, the highest priority is transactions located at the root level, which is the highest level in the tree structure, and therefore transactions located at the root level are processed with the highest priority. If the number of transactions located at the root level of the tree structure exceeds the maximum number of transactions that can be processed in one block, the transactions are processed according to the order of the user's request time. This is because the reason why a tree level occurs in a tree structure is that the key of a transaction is duplicated, so a distinction is made, and a transaction conflict occurs when transactions located at a level below the root level are processed together in a block. Therefore, transactions at the root level, the top level of the tree structure, are processed in order of time requests, and transactions other than those included in the block after processing are sorted again to form a new tree structure, and the next block Transactions to be processed are determined in order of priority.

이하, 도 4 및 도 5를 참조하여, 단계 160에 의하여 트랜잭션 트리 구조가 갱신되는 과정을 보다 구체적으로 설명한다. Hereinafter, the process of updating the transaction tree structure by step 160 will be described in more detail with reference to FIGS. 4 and 5 .

도 4는 본 발명에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트랜잭션이 블록에 처리된 이후 트리 구조 갱신 및 우선순위에 따라 처리되는 트랜잭션을 설명하기 위하여 도시한 그림이며, 도 5는 사용자에 의해 신규 트랜잭션에 대한 블록 처리가 요청된 경우 트리 구조 갱신 및 우선 순위에 따라 처리되는 트랜잭션을 설명하기 위하여 도시한 그림이다. 4 is a diagram for explaining transactions processed according to tree structure update and priority after transactions are processed in blocks in the Hyperledger Fabric blockchain network according to the present invention. FIG. When block processing for a transaction is requested, it is a figure shown to explain the transaction processed according to tree structure update and priority.

본 발명에 따른 트랜잭션 충돌 방법에 있어서, 트랜잭션 트리 구조가 갱신되는 경우는 두 가지가 있다. 첫 번째 경우는 도 4에 도시된 바와 같이, 우선 순위에 따라 트랜잭션들이 블록 처리되고, 남아 있는 트랜잭션 트리 구조에 대하여 다시 요청 시간 순서에 따른 1차 정렬과 key 에 따른 2차 정렬을 통해 새로운 트랜잭션 구조로 갱신하는 것이다. 그리고, 두 번째 경우는 도 5에 도시된 바와 같이, 사용자에 의해 블록 처리가 신규 요청된 트랜잭션에 대하여 블록 처리가 요청되어, 트랜잭션 트리 구조를 갱신하는 것이다. 이하, 도 4 및 도 5를 참조하여, 트리 구조가 갱신되는 2가지 경우에 대하여 각각 구체적으로 설명한다. In the transaction collision method according to the present invention, there are two cases in which the transaction tree structure is updated. In the first case, as shown in FIG. 4, transactions are block-processed according to priority, and a new transaction structure is performed through primary sorting according to request time order and secondary sorting according to key for the remaining transaction tree structure. to update with In the second case, as shown in FIG. 5 , block processing is requested for a transaction for which block processing is newly requested by a user, and the transaction tree structure is updated. Hereinafter, with reference to FIGS. 4 and 5, two cases in which the tree structure is updated will be described in detail.

먼저, 도 4를 참조하여 트랜잭션이 블록 처리된 이후의 트리 구조 갱신에 대하여 설명한다. 도 4의 (a)의 트랜잭션 트리 구조에서, Tx0와 Tx3이 루트 레벨에 위치한다. 여기서, 블록 크기가 2인 상태를 가정하고 설명한다. 따라서, 도 4의 (a)에서, Tx0와 Tx3이 첫번째 우선 순위인 루트 레벨의 트랜잭션 조건을 만족하고, 두번째 우선 순위인 사용자 시간 요청 순서에 따라 블록의 첫번째 공간은 Tx0이, 다음 공간을 Tx3이 할당되어, Tx0과 Tx3이 블록 처리된다. First, with reference to FIG. 4, a tree structure update after a transaction is blocked will be described. In the transaction tree structure of FIG. 4(a), Tx0 and Tx3 are located at the root level. Here, a state in which the block size is 2 is assumed and described. Therefore, in (a) of FIG. 4, Tx0 and Tx3 satisfy the root level transaction condition, which is the first priority, and according to the user time request order, which is the second priority, the first space of the block is Tx0 and the next space is Tx3. Allocated, Tx0 and Tx3 are blocked.

다음, 도 4의 (b)와 같이 트랜잭션 트리 구조가 갱신된다. 도 4의 (b)에서는 갱신된 트랜잭션 트리 구조의 루트 레벨에는 Tx1, Tx4, Tx5가 새로 정렬되어 배치된다. 블록의 크기가 2이므로, Tx1, Tx4, Tx5가 첫번째 우선 순위는 만족하지만, 한정된 블록 크기에 입력되기 위하여 두번째 우선 순위인 사용자 요청 시간 순서를 고려하여, Tx1, Tx4가 블록 처리된다.Next, the transaction tree structure is updated as shown in FIG. 4(b). In (b) of FIG. 4, Tx1, Tx4, and Tx5 are newly arranged and arranged at the root level of the updated transaction tree structure. Since the block size is 2, Tx1, Tx4, and Tx5 satisfy the first priority, but Tx1 and Tx4 are processed as blocks in consideration of the second priority, the user request time order, in order to be input in a limited block size.

다음, 도 4의 (c)와 같이 트랜잭션 트리 구조가 갱신되어, Tx2, Tx4가 새로 정렬되어 배치되며, 첫번째 및 두번째 우선 순위에 따라 Tx2, Tx4를 처리하게 된다. Next, as shown in (c) of FIG. 4, the transaction tree structure is updated, Tx2 and Tx4 are newly arranged and arranged, and Tx2 and Tx4 are processed according to the first and second priorities.

도 5를 참조하여, 사용자에 의해 트랜잭션에 대한 블록 처리가 신규 요청된 경우 트리 구조 갱신에 대하여 설명한다. 사용자로부터 트랜잭션에 대한 블록 처리가 신규 요청되면, 블록 생성 주기 사이에서 트랜잭션 트리 구조가 갱신된다. 도 5의 (a)에 도시된 바와 같이 예시적으로 key D를 갖는 Tx6이 신규 요청되면, 도 5의 (b)에 도시된 바와 같이 기존의 트랜잭션과 연관이 없는 새로운 트랜잭션으로서 중첩되는 key가 없기 때문에, 트랜잭션 트리 구조의 최상위 위치인 루트 레벨에 배치된다. 이 경우, 블록 크기를 2로 가정하면, Tx6은 블록 처리 과정에서 첫번째 우선 순위는 만족하지만, 두번째 우선 순위인 사용자 요청이 가장 빠른 순서에는 부합되지 않아, 블록 처리되지 않게 된다. Referring to FIG. 5 , a tree structure update will be described when block processing for a transaction is newly requested by a user. When block processing for a transaction is newly requested from a user, the transaction tree structure is updated between block creation cycles. As shown in (a) of FIG. 5, for example, if Tx6 having a key D is newly requested, as shown in (b) of FIG. 5, there is no overlapping key as a new transaction unrelated to the existing transaction. Therefore, it is placed at the root level, which is the topmost position of the transaction tree structure. In this case, assuming a block size of 2, Tx6 satisfies the first priority in the block processing process, but the second priority, the user request, does not match the earliest order, so the block is not processed.

이하, 도 6을 참조하여 전술한 단계 130에 의하여 2차 정렬하여 트랜잭션 트리 구조를 완성하는 과정을 보다 구체적으로 설명한다. 도 6은 본 발명에 따른 하이퍼레저 패브릭 블록체인 네트워크에 있어서, 트랜잭션들을 2차 정렬하여 트랜잭션 트리 구조를 완성하는 과정을 순차적으로 도시한 흐름도이다. Hereinafter, with reference to FIG. 6, the process of completing the transaction tree structure by secondary sorting by the above-described step 130 will be described in more detail. 6 is a flowchart sequentially illustrating a process of completing a transaction tree structure by secondary sorting transactions in the Hyperledger Fabric blockchain network according to the present invention.

도 6을 참조하면, 임시 메모리 풀에 저장된 처리되지 않은 트랜잭션들을 사용자 요청 시간 순서를 기반으로 하여, 사용자 요청이 빠른 시간 순서에 따라 1차 정렬하여 임시 배열에 저장한다. 이를 통해, 데이터 처리에서 발생할 수 있는 근본적인 문제인 Data starvation을 해결할 수 있다. Referring to FIG. 6 , unprocessed transactions stored in the temporary memory pool are first sorted according to the time order of the user request based on the time order of the user request, and then stored in the temporary array. Through this, data starvation, a fundamental problem that can occur in data processing, can be solved.

다음, 임시 배열의 첫번째 영역에 저장된 첫번째 트랜잭션(즉, 임시 메모리 풀에서 가장 빠른 시간에 요청된 트랜잭션)에 대하여 트랜잭션 트리 구조와 비교 단계를 수행한다. 비교 단계는 트랜잭션 트리 구조에 key가 동일한 트랜잭션이 있는지 여부를 판단한다. 만약, key가 동일한 트랜잭션이 트랜잭션 트리 구조에 없는 경우 첫번째 트랜잭션을 트리 구조의 최상위 위치에 배치한다. 만약, key가 동일한 트랜잭션이 트랜잭션 트리 구조에 있는 경우, 시간 순서로 가장 최근에 위치한 트랜잭션보다 한 단계 높은 레벨에 첫번째 트랜잭션을 배치한다. Next, a transaction tree structure and a comparison step are performed for the first transaction stored in the first area of the temporary array (that is, the transaction requested at the earliest time in the temporary memory pool). The comparison step determines whether there is a transaction with the same key in the transaction tree structure. If there is no transaction with the same key in the transaction tree structure, the first transaction is placed at the top of the tree structure. If there are transactions with the same key in the transaction tree structure, the first transaction is placed at a level higher than the most recent transaction in chronological order.

전술한 비교 과정에 의해, 첫번째 영역에 저장된 트랜잭션이 트랜잭션 트리 구조에 배치되면, 해당 트랜잭션을 임시 배열에서 삭제하고 임시 배열의 트랜잭션들의 위치를 순차적으로 앞당긴 후, 전술한 비교 과정을 반복 수행한다. 이와 같이, 임시 배열의 모든 트랜재션들이 트랜잭션 트리 구조와의 비교 과정을 거쳐, key에 따른 트랜잭션 트리 구조를 완성하게 되면, 트랜잭션 처리 대기 상태에 도달하여 블록 처리 이전까지 트랜잭션 트리 구조를 유지한다. When a transaction stored in the first area is placed in the transaction tree structure through the above-described comparison process, the corresponding transaction is deleted from the temporary array, the positions of the transactions in the temporary array are sequentially advanced, and the above-described comparison process is repeated. In this way, when all transactions in the temporary array are compared with the transaction tree structure and the transaction tree structure according to the key is completed, the transaction processing standby state is reached and the transaction tree structure is maintained until block processing.

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

200 : 임시 메모리 풀
210 : 트리 구조 메모리 풀
200: temporary memory pool
210: tree structure memory pool

Claims (10)

트랜잭션을 병렬 처리하도록 구성된 노드를 포함하는 블록체인 네트워크에 있어서,
상기 노드는 임시 메모리 풀 및 트리구조 메모리 풀을 구비하고,
상기 노드는 사용자로부터 트랜잭션에 대한 블록 처리가 요청되면, 블록 처리 요청된 트랜잭션들을 임시적으로 임시 메모리 풀에 저장하고, 상기 임시 메모리 풀에 저장된 트랜잭션들의 사용자 요청 시간 정보와 트랜잭션에 대한 식별자 값에 따라 정렬하여 트랜잭션 트리 구조로 정렬하여 트리 구조 메모리 풀에 저장하며,
상기 트리 구조 메모리 풀에 저장된 트랜잭션 트리 구조에 배치된 트랜잭션들을 사전 설정된 우선 순위에 따라 블록 처리함으로써, 트랜잭션 충돌이 발생되지 않도록 하는 것을 특징으로 하는 블록체인 네트워크.
A blockchain network comprising nodes configured to process transactions in parallel,
The node has a temporary memory pool and a tree structure memory pool,
When block processing of a transaction is requested from a user, the node temporarily stores the transactions requested for block processing in a temporary memory pool, and sorts the transactions stored in the temporary memory pool according to user request time information and transaction identifier values. are sorted into a transaction tree structure and stored in a tree structure memory pool,
Block-processing transactions arranged in a transaction tree structure stored in the tree-structure memory pool according to a preset priority, so that transaction conflicts do not occur.
제1항에 있어서, 상기 블록체인 네트워크는 하이퍼레저 패브릭을 기반으로 한 블록체인 네트워크이며,
상기 노드는 오더러(Orderer)인 것을 특징으로 하는 블록체인 네트워크.
The method of claim 1, wherein the blockchain network is a blockchain network based on Hyperledger Fabric,
The node is a block chain network, characterized in that the orderer (Orderer).
제1항에 있어서, 상기 트랜잭션에 대한 식별자는
하이퍼레저 패브릭의 분산 원장의 World state의 key 인 것을 특징으로 하는 블록체인 네트워크.
The method of claim 1, wherein the identifier for the transaction is
A blockchain network characterized by being the key of the world state of the distributed ledger of Hyperledger Fabric.
제1항에 있어서, 상기 노드는
임시 메모리 풀에 저장된 트랜잭션들을 사용자 요청 시간 순서에 따라 트랜잭션들을 1차 정렬하고,
1차 정렬된 트랜잭션들에 대하여, 동일하지 않는 식별자를 갖는 트랜잭션들은 트리 구조의 루트 레벨에 배치하고, 동일한 식별자를 갖는 트랜잭션들은 사용자 요청 시간 순서에 따라 루트 레벨의 동일한 식별자를 갖는 트랜잭션에 대해 부모-자식 노드로 연결하여 2차 정렬하여 트랜잭션 트리 구조를 형성하여 트리 구조 메모리 풀에 저장하는 것을 특징으로 하는 블록체인 네트워크.
The method of claim 1, wherein the node
The transactions stored in the temporary memory pool are primarily sorted according to the order of user request time,
For transactions in primary order, transactions with unequal identifiers are placed in the root level of the tree structure, and transactions with identical identifiers are parent-ordered to transactions with the same identifier in the root level according to user request time order. A blockchain network characterized by forming a transaction tree structure by connecting to child nodes and performing secondary sorting and storing them in a tree structure memory pool.
제1항에 있어서, 상기 노드가 트랜잭션 트리 구조에 배치된 트랜잭션들을 블록 처리하는 우선 순위는, 트랜잭션 트리 구조의 최상위 레벨과 사용자 요청 시간 순서에 따라 결정되는 것을 특징으로 하는 블록체인 네트워크. The blockchain network according to claim 1, wherein the order of block processing of the transactions arranged in the transaction tree structure by the node is determined according to the top level of the transaction tree structure and the order of user request time. 트랜잭션을 병렬 처리하도록 구성된 오더러(Orderer)를 포함하는 하이퍼레저 패브릭 기반의 블록체인 네트워크에서의 상기 오더러에 의한 트랜잭션 충돌 방지 방법에 있어서,
상기 오더러는 임시 메모리 풀 및 트리구조 메모리 풀을 구비하고,
(a) 사용자로부터 트랜잭션에 대한 블록 처리가 요청되면, 블록 처리 요청된 트랜잭션들을 임시적으로 임시 메모리 풀에 저장하는 단계;
(b) 상기 임시 메모리 풀에 저장된 트랜잭션들의 사용자 요청 시간 정보와 트랜잭션에 대한 key에 따라 정렬하여 트랜잭션 트리 구조로 정렬하여 트리 구조 메모리 풀에 저장하는 단계;
(c) 상기 트리 구조 메모리 풀에 저장된 트랜잭션 트리 구조에 배치된 트랜잭션들을 사전 설정된 우선 순위에 따라 블록 처리하는 단계;
를 구비하여, 트랜잭션 충돌이 발생되지 않도록 하는 것을 특징으로 하는 블록체인 네트워크에서의 트랜잭션 충돌 방지 방법.
A method for preventing transaction collisions by an orderer in a blockchain network based on Hyperledger Fabric including an orderer configured to process transactions in parallel,
The orderer includes a temporary memory pool and a tree structure memory pool,
(a) temporarily storing transactions requested for block processing in a temporary memory pool when block processing is requested from a user;
(b) arranging transactions stored in the temporary memory pool according to user request time information and transaction keys into a transaction tree structure and storing them in a tree structure memory pool;
(c) block-processing transactions arranged in a transaction tree structure stored in the tree structure memory pool according to preset priorities;
A method for preventing transaction collisions in a blockchain network, characterized in that for preventing transaction collisions from occurring.
제6항에 있어서, 상기 (b) 단계는
(b1) 임시 메모리 풀에 저장된 트랜잭션들을 사용자 요청 시간 순서에 따라 트랜잭션들을 1차 정렬하는 단계;
(b2) 1차 정렬된 트랜잭션들에 대하여, 동일하지 않는 key를 갖는 트랜잭션들은 트리 구조의 루트 레벨에 배치하고, 동일한 key를 갖는 트랜잭션들은 사용자 요청 시간 순서에 따라 루트 레벨의 동일한 key를 갖는 트랜잭션에 대해 부모-자식 노드로 연결하여 2차 정렬하여, 트랜잭션 트리 구조를 형성하여 트리 구조 메모리 풀에 저장하는 단계;
를 구비하는 것을 특징으로 하는 블록체인 네트워크에서의 트랜잭션 충돌 방지 방법.
The method of claim 6, wherein step (b) is
(b1) first sorting the transactions stored in the temporary memory pool according to the order of user request time;
(b2) Regarding the primary sorted transactions, transactions with unequal keys are placed in the root level of the tree structure, and transactions with the same key are placed in the transaction with the same key in the root level according to the user request time order. connecting to parent-child nodes for secondary sorting, forming a transaction tree structure, and storing the transaction tree structure in a memory pool;
Transaction collision prevention method in a blockchain network, characterized in that it comprises a.
제6항에 있어서, 상기 (c) 단계의 우선 순위는,
트랜잭션 트리 구조의 최상위 레벨과 사용자 요청 시간 순서에 따라 결정되는 것을 특징으로 하는 블록체인 네트워크에서의 트랜잭션 충돌 방지 방법.
The method of claim 6, wherein the priority of step (c) is,
A method for preventing transaction collisions in a blockchain network, characterized in that it is determined according to the top level of the transaction tree structure and the time order of user requests.
제8항에 있어서, 상기 (c) 단계의 우선 순위를 결정함에 있어서,
상기 트랜잭션 트리 구조의 최상위 레벨인 루트 레벨에 위치한 트랜잭션의 개수가 블록의 최대 크기를 초과하는 경우, 루트 레벨에 위치한 트랜잭션들 중에서 사용자 요청 시간 순서가 빠른 순서를 기준으로 하여 블록 처리할 트랜잭션을 결정하는 것을 특징으로 하는 블록체인 네트워크에서의 트랜잭션 충돌 방지 방법.
The method of claim 8, in determining the priority of step (c),
When the number of transactions located at the root level, which is the highest level of the transaction tree structure, exceeds the maximum size of the block, based on the order in which the user request time order is the fastest among the transactions located at the root level, determining a transaction to block processing Transaction collision prevention method in a blockchain network, characterized in that.
제6항에 있어서, 상기 트랜잭션 충돌 방지 방법은
(d) 트랜잭션 트리 구조를 갱신하는 단계;를 더 구비하며,
상기 (d) 단계는, 상기 (c) 단계에서 블록 처리된 트랜잭션을 트랜잭션 트리 구조에서 제거하고, 트랜잭션 트리 구조에 남아 있는 트랜잭션들에 대하여 트리 레벨을 한 단계씩 감소시키는 것을 특징으로 하는 블록체인 네트워크에서의 트랜잭션 충돌 방지 방법.
The method of claim 6, wherein the transaction conflict prevention method
(d) updating the transaction tree structure;
In the step (d), the block-processed transaction in the step (c) is removed from the transaction tree structure, and the tree level of the transactions remaining in the transaction tree structure is reduced by one step. How to avoid transaction conflicts in .
KR1020210154951A 2021-11-11 2021-11-11 Blockchain network being able to preventing from the transaction collision and method thereof KR20230068800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210154951A KR20230068800A (en) 2021-11-11 2021-11-11 Blockchain network being able to preventing from the transaction collision and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210154951A KR20230068800A (en) 2021-11-11 2021-11-11 Blockchain network being able to preventing from the transaction collision and method thereof

Publications (1)

Publication Number Publication Date
KR20230068800A true KR20230068800A (en) 2023-05-18

Family

ID=86545545

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210154951A KR20230068800A (en) 2021-11-11 2021-11-11 Blockchain network being able to preventing from the transaction collision and method thereof

Country Status (1)

Country Link
KR (1) KR20230068800A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102118178B1 (en) 2019-04-24 2020-06-02 주식회사 데이터젠 Multiple transaction parallel processing method and system for blockchain
KR102234128B1 (en) 2018-12-28 2021-04-02 어드밴스드 뉴 테크놀로지스 씨오., 엘티디. Parallel execution of transactions on the blockchain network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102234128B1 (en) 2018-12-28 2021-04-02 어드밴스드 뉴 테크놀로지스 씨오., 엘티디. Parallel execution of transactions on the blockchain network
KR102118178B1 (en) 2019-04-24 2020-06-02 주식회사 데이터젠 Multiple transaction parallel processing method and system for blockchain

Similar Documents

Publication Publication Date Title
KR102424841B1 (en) Method for generating block chain and verifying integrity in smart contract system
CN112598525B (en) Intelligent contract clustering parallel block chain implementation method and device
US7280481B2 (en) Shortest path search method “Midway”
Ailijiang et al. WPaxos: Wide area network flexible consensus
CN108984789B (en) Distributed accounting method and device, storage medium and electronic equipment
CN106981024B (en) Transaction limit calculation processing system and processing method thereof
CN111400112B (en) Writing method and device of storage system of distributed cluster and readable storage medium
CN106682215B (en) Data processing method and management node
EP3312723B1 (en) Command processing method and server
CN110233802B (en) Method for constructing block chain structure with one main chain and multiple side chains
CN107644025B (en) Method and device for distributing WAL records of distributed database
CN113064764A (en) Method and apparatus for performing blocks in a blockchain system
Saraswat et al. A comparative study of checkpointing algorithms for distributed systems
CN115988001A (en) Consensus voting processing method, device, equipment and medium for block chain system
Ailijiang et al. Multileader WAN paxos: Ruling the archipelago with fast consensus
KR20230068800A (en) Blockchain network being able to preventing from the transaction collision and method thereof
JP7416768B2 (en) Methods, apparatus and systems for non-destructively upgrading distributed coordination engines in distributed computing environments
US11366799B2 (en) Data locking method based on alternating row and column locks
CN115665174B (en) Gradient data synchronization method, system, equipment and storage medium
US11061719B2 (en) High availability cluster management of computing nodes
Burchert et al. piChain: When a blockchain meets paxos
EP4155923A1 (en) Virtualized network function deployment method, management and orchestration platform, and medium
Kumar et al. On the latency of heterogeneous MDS queue
CN115168434A (en) Data synchronization method and equipment for shared storage cluster database
Ailijiang et al. Wpaxos: Ruling the archipelago with fast consensus