JP2022061223A - Transaction system - Google Patents

Transaction system Download PDF

Info

Publication number
JP2022061223A
JP2022061223A JP2020169096A JP2020169096A JP2022061223A JP 2022061223 A JP2022061223 A JP 2022061223A JP 2020169096 A JP2020169096 A JP 2020169096A JP 2020169096 A JP2020169096 A JP 2020169096A JP 2022061223 A JP2022061223 A JP 2022061223A
Authority
JP
Japan
Prior art keywords
chain
packet
user
unit
coordinator
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2020169096A
Other languages
Japanese (ja)
Other versions
JP6982345B1 (en
Inventor
淳 木村
Atsushi Kimura
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Datachain
Datachain Inc
Original Assignee
Datachain
Datachain Inc
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 Datachain, Datachain Inc filed Critical Datachain
Priority to JP2020169096A priority Critical patent/JP6982345B1/en
Priority to US18/022,412 priority patent/US20230316398A1/en
Priority to PCT/JP2021/034365 priority patent/WO2022075046A1/en
Application granted granted Critical
Publication of JP6982345B1 publication Critical patent/JP6982345B1/en
Publication of JP2022061223A publication Critical patent/JP2022061223A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/389Keeping log of transactions for guaranteeing non-repudiation of a transaction
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Abstract

To provide a transaction system in which a system capable of guaranteeing consistency of data across distributed transactions of a smart contract regarding a transaction on a plurality of block chains can be developed.SOLUTION: In a flow for executing a smart contract, a securities chain 11 (first block chain) which is a block chain including a coordinator 11b (coordinator part) and a participant 11c (first user part), and a settlement chain 12 (second block chain) which is a block chain including a participant 12c (second user part) are provided. On the securities chain 11, a securities token is transferred between users. On the settlement chain, a settlement token is transferred between users. Accordingly, a call of a safe smart contract can be made with atomicity between the securities chain 11 and the settlement chain 12.SELECTED DRAWING: Figure 3

Description

特許法第30条第2項適用申請有り (1)公開者 株式会社Datachain 掲載アドレス https://github.com/datachainlab/cross 掲載年月日 令和2年1月30日 (2)公開者 株式会社Datachain 掲載アドレス https://github.com/cosmos/ics/issues/408 掲載年月日 令和2年4月15日 (3)公開者 株式会社Datachain 掲載アドレス https://gitcoin.co/issue/cosmos/ics/408/4212 掲載年月日 令和2年5月1日 (4)公開者 株式会社Datachain 掲載アドレス https://github.com/datachainlab/cross-chain-hackathon 掲載年月日 令和2年5月3日 (5)公開者 株式会社Datachain 掲載アドレス https://datachainlab.github.io/about_datachain.pdf 掲載年月日 令和2年6月1日 (6)公開者 株式会社Datachain 掲載アドレス https://github.com/datachainlab/public-docs 掲載年月日 令和2年10月5日Patent Law Article 30, Paragraph 2 Application Applicable (1) Publisher Datachain Co., Ltd. Publication address https: // github. com / datachainlab / cross Publication date January 30, 2 (2) Publisher Datachain Co., Ltd. Publication address https: // github. com / cosmos / ics / issues / 408 Date of publication April 15, 2nd year (3) Publisher Datachain Co., Ltd. Publication address https://gitcoin. co / issu / cosmos / ics / 408/4212 Date of publication May 1, 2nd year (4) Publisher Datachain Co., Ltd. Publication address https: // github. com / datachainlab / cross-chain-hackathon Date of publication May 3, 2 (5) Publisher Datachain Co., Ltd. Publication address https://datachainlab. Github. io / about_datachain. pdf Publication date June 1, 2nd year (6) Publisher Datachain Co., Ltd. Publication address https: // github. com / datachainlab / public-docs Date of publication October 5, 2nd year of Reiwa

本発明は、取引システムに関する。 The present invention relates to a trading system.

暗号資産による証券売買を行うためには、暗号資産交換業の免許と、金融商品取引業の免許とが必要である。しかしながら、これら双方の免許を有している事業者が日本には存在しないため、現在は法定通貨による証券売買が行われている。つまり、現在の日本では、暗号資産による証券取引は行われていない。 In order to buy and sell securities using crypto assets, a license for crypto asset exchange business and a license for financial instruments business are required. However, since there are no businesses in Japan that have both of these licenses, securities are currently being bought and sold in legal tender. In other words, securities trading using crypto assets is not currently carried out in Japan.

ブロックチェーンを活用してスマートコントラクトを構築するプラットフォームとして広く知られたイーサリアムでは、トークンとしてERC20、ERC1400等の規格が採用されている。ERC1400は、証券(Security)トークンのための規格である。 Ethereum, which is widely known as a platform for building smart contracts using blockchain, has adopted standards such as ERC20 and ERC1400 as tokens. ERC1400 is a standard for security tokens.

日本国内では、これらのトークンを用いて証券を売買するサービス事業者は存在しないためトークンによる証券売買は行われておらず、法定通貨でのトークンの購入、検証が行われているにすぎない。 In Japan, there is no service provider that buys and sells securities using these tokens, so securities are not bought and sold using tokens, and tokens are only purchased and verified in legal currency.

一方、海外では、これらのトークンを用いた証券売買を行うためのプラットフォーム(例えば、Polymath、Harbor、Securitize)が準備されているが、これらは同一チェーン上に実装されたスマートコントラクトによってトークンが生成されるため、様々な証券や取引のデータが1つのブロックチェーン上で管理されることになり、複雑性、処理速度、他のネットワークとの接続性が課題となる。ここで、スマートコントラクトとは、ブロックチェーン上で契約を自動的に実行する仕組みのことである。 On the other hand, overseas, platforms for trading securities using these tokens (for example, Polymath, Harbor, Securitize) are prepared, but these are tokens generated by smart contracts implemented on the same chain. Therefore, data of various securities and transactions will be managed on one blockchain, and complexity, processing speed, and connectivity with other networks will be issues. Here, a smart contract is a mechanism for automatically executing a contract on a blockchain.

特開2020-57863号公報Japanese Unexamined Patent Publication No. 2020-57863

価値取引を行うためには、取引のアトミック性が担保されている必要がある。ここで、取引における「アトミック性」とは、取引の処理が全て完了されているか、もしくは全く実行されていないかのいずれかの状態になっていることを意味する。例えば、ブロックチェーンAでの取引完了が、異なる価値取引を行うブロックチェーンB上でも必ず完了できるかどうか不明であり、チェーンB上で取引の問題がある場合には、チェーンA上での取引も中止しなければならない。 In order to carry out value transactions, the atomicity of the transactions must be guaranteed. Here, the "atomic property" in a transaction means that the processing of the transaction is either completed or not executed at all. For example, it is unclear whether the completion of a transaction on blockchain A can always be completed on blockchain B, which conducts different value transactions, and if there is a transaction problem on chain B, the transaction on chain A is also possible. I have to stop.

上述の点について、証券のDvP取引を例にして詳細に説明する。ここで、DvP取引は、Delivery Versus Paymentの略で、証券の引渡し(Delivery)と代金の支払い(Payment)とを相互に条件を付け、一方が行われない限り他方も行われないようにすることを意味する。これは、証券決済において、資金(または証券)を渡したにもかかわらず、取引相手からその対価となる証券(または資金)を受け取れないという「取りはぐれ」リスクを回避するための方法・仕組みである(日本銀行のHP参照)。 The above points will be described in detail by taking DvP trading of securities as an example. Here, DvP transaction is an abbreviation of Delivery Versus Payment, which mutually conditions the delivery of securities (Delivery) and the payment of payment (Payment) so that the other is not performed unless one is performed. Means. This is a method / mechanism for avoiding the risk of "stray" in securities settlement, in which funds (or securities) are handed over, but the securities (or funds) that are the consideration for the securities are not received from the trading partner. Yes (see the Bank of Japan website).

ブロックチェーンを用いたDvP取引では、資金側のチェーン及び証券側のチェーンが設けられており、資金側のチェーンで取引が完了したからといって、証券側のチェーンでの取引も完了できるかどうか不明である。 In DvP transactions using blockchain, a chain on the fund side and a chain on the securities side are provided, and even if the transaction is completed in the chain on the fund side, can the transaction in the chain on the securities side be completed? It is unknown.

ここで、異なるブロックチェーン間での情報・価値交換を実現する方法として、2way-peg方式やHTLC方式(Hashed Time-Locked Contract)が検討されている。2way-peg方式とは、トークンの送信チェーンのロックもしくはバーンの証拠を受信チェーンが検証を行ったうえでトークンを受信チェーン上にミントすることであり、これを逆向きにも可能な方式である。この方式では、資金側のブロックチェーンで証券のトークンを発生させるが、資金側では証券側のルール(例えば、譲渡人数が上限に達していないか、移転先のユーザーはKYC済かなど)をチェックできない。そのため、再度、証券側でチェックすると、他の取引と競合し取引不可となってしまう場合がある。また、HTLC方式とは、受取側のユーザーがハッシュのプリイメージを公開することでトークンを入手することを可能にし、また期限内に受取側のユーザーがハッシュのプリイメージを公開せずタイムアウトになった場合に、送金側のユーザーがトークンを取り戻すことを可能とする方式である。この方式では、プリイメージを公開するタイミングで証券側のルール(例えば、譲渡人数が上限に達していて証券の移転が不可能)に引っかかった場合、代金の支払いは完了するが、証券の引き渡しは完了しない「取りはぐれ」リスクが存在する。 Here, a 2-way-peg method and an HTLC method (Hashed Time-Locked Contract) are being studied as a method for realizing information / value exchange between different blockchains. The 2way-peg method is a method in which the receiving chain verifies evidence of lock or burn of the sending chain of tokens and then mint the tokens on the receiving chain, which can be reversed. .. In this method, securities tokens are generated on the blockchain on the fund side, but on the fund side, the rules on the securities side (for example, whether the number of transferees has reached the upper limit, whether the transfer destination user has already been KYC, etc.) are checked. Can not. Therefore, if you check again on the securities side, it may compete with other transactions and you may not be able to trade. In addition, the HTLC method allows the receiving user to obtain the token by publishing the hash preimage, and the receiving user does not publish the hash preimage within the deadline and times out. In this case, it is a method that allows the user on the remittance side to recover the token. In this method, if the securities side rules (for example, the number of transferees has reached the upper limit and the securities cannot be transferred) are caught at the timing of releasing the pre-image, the payment will be completed, but the securities will not be delivered. There is a risk of incomplete "detachment".

(本発明を創作するに至った経緯)
ブロックチェーンは、単体では他のブロックチェーンとの相互運用性の能力に乏しいことが知られている。ブロックチェーン同士を繋ぐクロスチェーン上の接続方式として、relay方式が知られている。クロスチェーンとは、異なるチェーン同士を跨ぐことを意味する。
(Background to the creation of the present invention)
It is known that a blockchain alone lacks the ability to interoperate with other blockchains. The relay method is known as a connection method on a cross chain that connects block chains to each other. Cross-chain means straddling different chains.

これを実現するのに必要なプロトコルストックの標準化のために、ICS(Interchain Standards)がCosmosによって設計されている。ここで、現在、ブロックチェーン技術は普及期にあり、Bitcoinブロックチェーン、Ethereumブロックチェーン等様々なブロックチェーンが存在する。このような背景の下、ブロックチェーンのスピード、スケーラビリティー、相互運用性といった課題を解決するために、ブロックチェーン同士を繋ぐプロジェクトして考えられたものがICSである。 ICS (Interchain Standards) is designed by Cosmos to standardize the protocol stock needed to achieve this. Here, blockchain technology is currently in widespread use, and there are various blockchains such as Bitcoin blockchain and Ethereum blockchain. Against this background, ICS was conceived as a project to connect blockchains in order to solve issues such as blockchain speed, scalability, and interoperability.

relay方式を用いたアプリケーションプロトコルとして、PegやEscrow方式によるトークンの移動や交換のプロトコルが様々なコミュニティにおいて議論されているが、多くの方式で対象となるトークンやStateは、Fungible token(つまり、代替可能なトークン)等の単純なStateで表現可能なものとなっている。Cosmosにおいてもアプリケーションプロトコルとして、Fungible tokenの2way-pegがics‐020で提案されている。 As an application protocol using the relay method, protocols for moving and exchanging tokens using the Peg and Escrow methods are being discussed in various communities, but the tokens and states targeted by many methods are Fungible tokens (that is, alternatives). It can be expressed by a simple State such as (possible token). In Cosmos, 2way-peg of Fungible token is proposed in ics-020 as an application protocol.

そこで、本願発明は、複数のブロックチェーン上のスマートコントラクトの分散トランザクションにおいてデータの整合性を保証することが可能なシステムを開発可能にすることを目的とする。この目的を達成するために、本発明者等は、Cross Frameworkというフレームワークを開発し、以下の(1)及び(2)の要素が必要と考えた。
(1)スマートコントラクトに必要なロックメカニズムとコミットの可否についての分散合意プロトコルを設計する。
(2)分散合意プロトコルを可能とするためにコントラクト(契約)が満足すべき要件を開発者が透過的に満たすことができる仕組みを構築する。
Therefore, an object of the present invention is to make it possible to develop a system capable of guaranteeing data integrity in distributed transactions of smart contracts on a plurality of blockchains. In order to achieve this purpose, the present inventors have developed a framework called Cross Framework, and considered that the following elements (1) and (2) are necessary.
(1) Design a decentralized consensus protocol for the locking mechanism required for smart contracts and whether or not commits are possible.
(2) Build a mechanism that allows developers to transparently meet the requirements that contracts should meet in order to enable distributed consensus protocols.

また、このようなスマートコントラクトを実行するトランザクションが上述のCross-chain Transactionに相当する。Cross-chain Transactionは、複数の異なるブロックチェーン間で行う分散トランザクションと同義である。そのため、一般的な分散トランザクションと同様に、Cross-chain Transactionにおいても、ACID特性で定義されているようなトランザクション処理の信頼性を保証する必要がある。ここで、ACID特性は、“Atomicity”(原子性)、“Consistency” (一貫性)、“Isolation”(独立性)、“Durability”(耐久性)の頭文字をつなぎ合わせたものであるが、技術常識であるため、詳細な説明は省略する。 In addition, the transaction that executes such a smart contract corresponds to the above-mentioned Cross-chain Transaction. Cross-chain Transaction is synonymous with distributed transaction performed between multiple different blockchains. Therefore, it is necessary to guarantee the reliability of transaction processing as defined by the ACID property in Cross-chain Transaction as well as general distributed transaction. Here, ACID properties are a combination of the acronyms "Atomicity", "Consistency", "Isolation", and "Durability". Since it is common technical knowledge, detailed explanation is omitted.

スマートコントラクトとは、Blockchain上で実行可能なプログラムである。それらは状態をもち、多くの場合提供される機能は関数として公開され、定められた条件に従い実行可能である。ユーザが生成したトランザクションによって実行され、状態の更新を行う。Cross Frameworkにおいて、スマートコントラクトは、開発者がリクエストに応じて動的にコントラクトを呼び出し可能となるようにContract Handlerの実装によりもたらされる。それぞれの機能はコントラクト関数として定義される。Cross-chain smart contractは、この複数のチェーンのコントラクト関数の呼び出しを含むスマートコントラクトを指す。 A smart contract is a program that can be executed on the Blockchain. They have a state, and the functions provided in many cases are exposed as functions and can be executed according to the specified conditions. It is executed by a user-generated transaction and updates the state. In the Cross Framework, smart contracts are provided by implementing a Contract Handler so that developers can dynamically call contracts on request. Each function is defined as a contract function. Cross-chain smart contract refers to a smart contract that contains calls to the contract functions of this multiple chain.

そして、上記設計のサポートを可能にする以下のCross Frameworkを考えた。Cross Frameworkは、Cross-chain smart contractの開発およびこれに対するCross-chain Transactionのサポートを可能にするフレームワークである。フレームワークは、Cross-chain TransactionをサポートするためのCross Moduleとスマートコントラクトを提供するContract Moduleから構成される。Cross Moduleは、Cross-chain Transactionを実現するために必要なモジュールであり、IBCモジュールを介した他のチェーンとのアトミックコミットのためのプロトコルを実装するCross Handlerとそれらの状態を保持するストアから構成される。Contract Moduleは、スマートコントラクトを提供するContract Handler、それらの状態を保持するステイトストア(State Store)から構成される。 Then, I considered the following Cross Framework that enables support for the above design. Cross Framework is a framework that enables the development of Cross-chain smart contracts and the support of Cross-chain Transactions for them. The framework consists of a Cross Module to support Cross-chain Transaction and a Contract Module that provides smart contracts. The Cross Module is a module required to realize Cross-chain Transaction, and consists of a Cross Handler that implements a protocol for atomic commit with other chains via the IBC module and a store that holds their state. Will be done. The Contract Module consists of a Contract Handler that provides smart contracts and a State Store that holds those states.

続いて、上述のCross Frameworkの設計手順について、(1)Cross-chain smart contract、(2)Cross-chain Transaction、(3)Atomic commit Protocolに項分けして説明する。 Next, the above-mentioned Cross Framework design procedure will be described by dividing it into (1) Cross-chain smart contract, (2) Cross-chain Transaction, and (3) Atomic commit Protocol.

(1)Cross-chain smart contract
Cross-chain smart contractについて、(1―1)~(1-2)に項分けして説明する。
(1-1)Contract Handler及びステイトストア
Contract Handlerには、複数のコントラクト関数を実装可能である。各コントラクト関数には、スマートコントラクトの状態を管理するためのステイトストアが与えられる。各関数は呼び出し引数や記述したロジックに従い、決定性のある状態遷移を行い、その状態をこのステイトストアに永続化する。ステイトストアはGet(K), Set(K,V), Delete(K)といった一般的なキーバリューストア(Key-Value Store)の操作をサポートする。Get(K)は、「Kで指定したキーに対応するバリューを返す」の意味である。Set(K,V)は、「Kで指定したキーに対してVで指定したバリューをセットする」の意味である。Delete(K)は、「Kで指定したキーと対応するバリューを削除する」の意味である。単一のチェーンにおいて逐次的にコントラクト関数を実行する場合には、これらの操作のたびに、もしくは関数の実行後にトランザクションによる変更をストアに反映すれば良いが、トランザクションが処理するコントラクト関数が複数チェーンに分散している場合、すべてのコントラクトの状態遷移をアトミックに行う必要がある。利用するアトミックコミットプロトコルにより異なるが、少なくとも1つのコントラクト関数の実行はPrepare状態に遷移する必要がある。つまり、そのようなコントラクトにおいては他の並行するトランザクションと競合する可能性が発生するため、トランザクションの直列化可能性を保つための仕組みがステイトストアに必要となる。Cross Frameworkでは、デフォルトのステイトストアの実装として各変更操作に対応するロックを取得する単純なストアを提供している。このストアは、各変更操作に対して以下のロックを取得するように構成することができる。

Figure 2022061223000002
(1) Cross-chain smart contract
The Cross-chain smart contract will be described in terms of (1-1) to (1-2).
(1-1) Contract Handler and State Store
Multiple contract functions can be implemented in Contract Handler. Each contract function is given a state store for managing the state of smart contracts. Each function makes a deterministic state transition according to the call argument and the written logic, and persists that state in this state store. The state store supports general key-value store operations such as Get (K), Set (K, V), Delete (K). Get (K) means "return the value corresponding to the key specified by K". Set (K, V) means "set the value specified by V for the key specified by K". Delete (K) means "delete the value corresponding to the key specified by K". When executing contract functions sequentially in a single chain, the changes made by the transaction may be reflected in the store at each of these operations or after the function is executed, but the contract functions processed by the transaction are multiple chains. If it is distributed to, it is necessary to perform the state transition of all contracts atomically. Execution of at least one contract function needs to transition to the Prepare state, depending on the atomic commit protocol used. That is, since such contracts may conflict with other parallel transactions, the state store needs a mechanism to maintain the serializability of transactions. The Cross Framework provides a simple store that acquires locks for each change operation as an implementation of the default state store. This store can be configured to acquire the following locks for each change operation.
Figure 2022061223000002

(1-2)Cross-chain calls
各チェーンにおいて、Contract Handlerで定義されたコントラクト関数は、それぞれ別のチェーンのコントラクト関数を呼び出し可能であり、これをCross-chain callsと定義する。これにより、Cross-chain Transactionにおいて、単に複数の関数をアトミックに実行できるだけでなく、チェーン間の価値の移転などといったより複雑なプロトコルを含むスマートコントラクトの開発が可能となる。
(1-2) Cross-chain calls
In each chain, the contract function defined in the Contract Handler can call the contract function of another chain, which is defined as Cross-chain calls. This makes it possible to develop smart contracts that include more complex protocols such as value transfer between chains, as well as being able to execute multiple functions atomically in Cross-chain Transaction.

(2)Cross-chain Transaction
Cross-chain Transaction について、(2-1)~(2-4)に項分けして説明する。
(2-1)Cross-chain Transactionは、IBC channelで接続されたチェーン間で実行可能な分散トランザクションである。Cross Frameworkでは、トランザクションにおけるデータの整合性を保証するために複数のアトミックコミットプロトコルをサポートし、またそれを実現するためのロックメカニズムを実装したステイトストアを提供している。トランザクションはユーザからリクエストを受けたチェーンがその内容を検証し、指定されたチェーンに対してコントラクト呼び出しリクエストを含むパケットを送信することで開始される。ユーザのトランザクション開始のリクエストを受け取るチェーンをInitiator chainと定義する。Initiator chainは、リクエストを受け取ると、指定された形式に従ってアトミックコミットのフローを実行する。例えば、アトミックコミットとして2層コミットを選択した場合、Initiator chainが2層コミットのコーディネータの役割を担い、ユーザのリクエストに含まれる各チェーンのコントラクト関数の呼び出しを行うとともに、その結果を管理し、最終的なコミットの可否を決定し、その決定を受け取った各パーティシパントチェーンがコミットもしくはアボートを行う。
(2) Cross-chain Transaction
Cross-chain Transaction will be described in terms of (2-1) to (2-4).
(2-1) Cross-chain Transaction is a distributed transaction that can be executed between chains connected by IBC channel. The Cross Framework supports multiple atomic commit protocols to ensure data integrity in transactions, and provides a state store that implements a locking mechanism to achieve it. A transaction is started when a chain that receives a request from a user verifies its contents and sends a packet containing a contract call request to the specified chain. A chain that receives a user's request to start a transaction is defined as an Initiator chain. When the Initiator chain receives the request, it executes the atomic commit flow according to the specified format. For example, if you select a two-tier commit as the atomic commit, the Initiator chain acts as the coordinator of the two-tier commit, calls the contract function of each chain included in the user's request, manages the result, and finally. It decides whether or not to commit, and each party chain that receives the decision commits or aborts.

(2-2)Cross-chain transactionの作成と検証
Cross-chain transactionを開始するために、ユーザは以下の(i)~(iv)の要素を持つMsgInitiate を作成し、Initiator chainに提出する。
(i)Type
これはコミットフローの種別のことである。各コミットフローの詳細については、後述する。
(ii)Nonce
これはナンス値のことである。
(iii)Timeout
トランザクションが取り込むことが可能なBlock heightもしくはBlock timeの上限値のことである。
(iv)コントラクトトランザクション
これは、各コントラクトの呼び出し情報のことであり、以下の(iv-1)~(iv-6)からなる構造体の配列となっている。
(iv-1)ChainID
このコントラクトトランザクションを処理するチェーンを示すIDのことである。
(iv-2)Signers
このコントラクトのトランザクション作成に承認が必要となるアカウントの配列のことである。
(iv-3)Call Info
コントラクトの識別子、関数名、引数などを含む呼び出し情報のことである。フォーマットはContract handlerの仕様に依存する。
(iv-4)State Constraint
このコントラクトが参照する状態、更新後の状態に対して制約をかけることを意味する。ただし、これはオプションであり、省略することもできる。
(iv-5)Return Value
このコントラクトの実行の戻り値のことである。ただし、これはオプションであり、省略することもできる。
(iv-6)Links
このコントラクトの実行時に参照される他のコントラクト呼び出し結果のことである。ただし、これはオプションであり、省略することもできる。
(2-2) Creation and verification of Cross-chain transaction
In order to start the cross-chain transaction, the user creates an MsgInitiate with the following elements (i) to (iv) and submits it to the Initiator chain.
(I) Type
This is the type of commit flow. Details of each commit flow will be described later.
(Ii) Nonce
This is the nonce value.
(Iii) Timeout
It is the upper limit of Block height or Block time that a transaction can capture.
(Iv) Contract transaction This is the call information of each contract, and is an array of structures consisting of the following (iv-1) to (iv-6).
(Iv-1) ChainID
An ID that indicates the chain that processes this contract transaction.
(Iv-2) Signers
An array of accounts that must be approved to create a transaction for this contract.
(Iv-3) Call Info
Call information including contract identifiers, function names, arguments, etc. The format depends on the specifications of the Contract handler.
(Iv-4) State Constraint
It means to put a constraint on the state referenced by this contract and the state after update. However, this is optional and can be omitted.
(Iv-5) Return Value
It is the return value of the execution of this contract. However, this is optional and can be omitted.
(Iv-6) Links
It is the result of another contract call that is referenced when this contract is executed. However, this is optional and can be omitted.

ここで、アカウントは、トランザクションの実行者を定義する概念である。アカウントが適切であるかは、トランザクションの内容に応じて検証される。トランザクションの検証ロジック、およびアカウントによる承認とその識別子の仕様はブロックチェーンやDLTごと様々である。
Cross Frameworkでは、トランザクションの開始の際にSigners (上述の(iv-2))で指定された全てのアカウントの承認が必要であるが、各アカウントの承認方法およびそれぞれの検証方法は任意のロジックを実装可能であり、利用するブロックチェーンやDLTに適した方法を選択することが推奨される。例えば、既存の実装としてCosmos-SDKのauth/StdTxの署名検証を用いたものがある。
Here, an account is a concept that defines a person who executes a transaction. The appropriateness of the account is verified according to the contents of the transaction. Transaction validation logic, account authorization and its identifier specifications vary by blockchain and DLT.
Cross Framework requires approval of all accounts specified by Signers ((iv-2) above) at the beginning of a transaction, but the approval method and verification method of each account use arbitrary logic. It is possible to implement it, and it is recommended to select a method suitable for the blockchain and DLT to be used. For example, there is an existing implementation that uses the signature verification of auth / StdTx of Cosmos-SDK.

MsgInitiate を受け取ったInitiator chainは、承認が必要な全てのアカウントにより、このCross-chain transactionが承認されたことを確認する必要がある。この検証フローには、以下に示すいくつかのパターンがある。
パターン1:アカウントが鍵を持つ場合、Initiator chainに対しMsgInitiate の提出とともに各アカウントによる署名を提出してそれを検証する。
パターン2:アカウントが鍵を持たない場合、Initiator chain上に提出されたMsgInitiate の提出により発行されたトランザクションを示すIDに対して、各アカウントが非同期に承認する。
パターン3:アカウントが鍵を持たない、かつ、Initiator chainにアクセスできない場合、各アカウントはContract Moduleを含むチェーンに対して承認を行い、その結果をパケットを経由してInitiator chain上で検証する。これはパーミッションドなチェーンに適したフローである。
上記のいずれかの方式で検証をした後にInitiator chainは、Type に従いアトミックなコミットを行うフローを開始する。コントラクトトランザクションに指定された各コントラクトのトランザクションを含めたパケットをそれぞれのチェーンのContract handlerに送信する。その際のコミットのフローの種類とそれぞれの詳細については、後述する(3)のアトミックコミットプロトコルの章で説明する。コミットフローの種類にかかわらず、MsgInitiate で宣言された各コントラクトの関数の実行が全て成功し、またState Constraint などの実行時の状態に対する制約がある場合は、それを満たす場合のみ全てのトランザクションがコミットされることが保証されている。
The Initiator chain that receives the MsgInitiate must confirm that this Cross-chain transaction has been approved by all accounts that require approval. There are several patterns in this verification flow as shown below.
Pattern 1: If the account has a key, submit the signature by each account together with the submission of MsgInitiate to the Initiator chain to verify it.
Pattern 2: If the account does not have a key, each account asynchronously approves the ID indicating the transaction issued by the submission of MsgInitiate submitted on the Initiator chain.
Pattern 3: If the account does not have the key and the Initiator chain cannot be accessed, each account approves the chain including the Contract Module, and the result is verified on the Initiator chain via the packet. This is a good flow for authorized chains.
After verifying by any of the above methods, the Initiator chain starts the flow of performing atomic commit according to Type. Sends a packet containing the transaction of each contract specified in the contract transaction to the Contract handler of each chain. The types of commit flows and the details of each will be described in the chapter (3) Atomic commit protocol described later. Regardless of the type of commit flow, if the function of each contract declared in MsgInitiate is executed successfully, and if there is a constraint on the run-time state such as State Constraint, all transactions are committed only if they are satisfied. It is guaranteed to be done.

(2-3)State constraintsとSimulation
State constraintsは、トランザクションを実行する際の事前状態、事後状態、またはその両方に対して制約をかけるための機能である。この機能は、コントラクト関数の実行時に厳密な状態遷移を必要とする場合に役立つ。アプリケーションからコントラクト関数を実行するトランザクションをリクエストする際に、その処理を一度だけ実行することをより厳密に保証することができる。
Simulationはトランザクションの生成なしでコントラクトの実行を行うことができる機能である。これを利用してState constraintsで指定するための制約を生成することが可能である。Simulateのリクエスト時にStateConstraintType を指定することで制約として参照可能なステイトストアの状態を返信する。ユーザはMsgInitiate の作成時にこれをコントラクトトランザクションのStateConstraintに指定することでSimulation時の状態を利用した制約をトランザクションにかけることができる。
(2-3) State constraints and Simulation
State constraints are functions for constraining the pre-state, post-state, or both when executing a transaction. This feature is useful when you need strict state transitions when executing a contract function. When requesting a transaction to execute a contract function from an application, it can be more strictly guaranteed to execute the process only once.
Simulation is a function that can execute a contract without generating a transaction. It is possible to use this to generate constraints to be specified by State constraints. By specifying StateConstraintType at the time of Simulate request, the state of the state store that can be referenced as a constraint is returned. The user can apply a constraint using the state at the time of simulation to the transaction by specifying this in the StateConstraint of the contract transaction when creating MsgInitiate.

(2-4)LinkとCross-chain calls
上述のCross-chain callsで紹介したような他のContract handlerの外部のコントラクト関数を呼び出すには以下の要素a~cを考慮する必要がある。
a. 各Contract Handlerのコントラクト関数はそれぞれのチェーン上で並行して実行される場合がある。
b. 外部のコントラクト関数の実行はその呼び出し元の関数の実行とアトミックに行われる必要がある。
c. 外部のコントラクト関数の実行による返り値を呼び出し元関数で参照できる。
これらのうち、a, bはアトミックコミットプロトコルにより実現される。Linkは前記のcの要素を満たすための機能である。
Linkは以下の構造を持つ。
type Link struct {
SrcIndex uint8
}
SrcIndex により、呼び出し先のコントラクト関数の実行を処理するトランザクションを示すコントラクトトランザクションのインデックスを指定する。
MsgInitiate を受け取ったInitiator chainは、コントラクトトランザクションの各要素のLinkの情報を呼び出し先のコントラクト関数のChainIDと返り値を含むオブジェクト ConstantValueObject として解決し、Linkの参照元のコントラクト関数内の外部呼び出しはこのConstantValueObject に置き換えられる。
そして、以下のようなステップ1~3で実行される。
ステップ1:Contract Handlerの外部コントラクトを参照する関数は呼び出し情報に加え、参照先チェーンを示すChainID を設定する必要がある。これはChannelIDやInterchain DNSのドメインネームなどで実装される。
type ChainID interface {
Equal(ChainID) bool
}
ステップ2:Initiator chainは、コントラクトトランザクションの各要素のLinks の情報を元に呼び出し先のコントラクト関数のChainIDと返り値を含むオブジェクトConstantValueObject として解決する。
type ConstantValueObject struct {
ChainID ChainID
Value []byte
}
ステップ3:Initiator chainは、アトミックコミットフローに従い、コーディネータとしてコントラクトトランザクションとステップ2のConstantValueObject および参照先の呼び出し情報をパケットのデータとしてセットし、各チェーンのContract handlerに送信する。
ステップ4:チェーンのContract handlerは、受け取ったパケットの呼び出し情報に従い、コントラクト関数を実行する。関数内の外部コントラクト関数の呼び出し時に、プログラム中の参照先のChainIDおよび呼び出し情報と比較し、一致している場合、ConstantValueObject のValue を返す。一致していない場合、その関数の処理は失敗となる。
(2-4) Link and Cross-chain calls
In order to call the contract function outside the other Contract handler as introduced in Cross-chain calls above, it is necessary to consider the following elements a to c.
The contract functions of each Contract Handler may be executed in parallel on their respective chains.
b. Execution of an external contract function must be atomic with the execution of the calling function.
c. The return value of executing an external contract function can be referenced by the calling function.
Of these, a and b are realized by the atomic commit protocol. Link is a function for satisfying the element of c above.
Link has the following structure.
type Link struct {
SrcIndex uint8
}
SrcIndex specifies the index of the contract transaction that indicates the transaction that handles the execution of the called contract function.
Upon receiving MsgInitiate, the Initiator chain resolves the Link information of each element of the contract transaction as an object ConstantValueObject containing the ChainID and return value of the called contract function, and the external call in the contract function that refers to the Link is this ConstantValueObject. Is replaced by.
Then, it is executed in the following steps 1 to 3.
Step 1: The function that references the external contract of the Contract Handler needs to set the ChainID indicating the referenced chain in addition to the call information. This is implemented by Channel ID, Interchain DNS domain name, etc.
type ChainID interface {
Equal (ChainID) bool
}
Step 2: The Initiator chain resolves as an object ConstantValueObject containing the ChainID and return value of the called contract function based on the Links information of each element of the contract transaction.
type ConstantValueObject struct {
ChainID ChainID
Value [] byte
}
Step 3: The Initiator chain sets the contract transaction as a coordinator, the ConstantValueObject of step 2, and the call information of the reference destination as packet data according to the atomic commit flow, and sends it to the Contract handler of each chain.
Step 4: The contract handler of the chain executes the contract function according to the call information of the received packet. When calling an external contract function in a function, it is compared with the ChainID and call information of the reference destination in the program, and if they match, the Value of ConstantValueObject is returned. If they do not match, the processing of the function fails.

(3)アトミックコミットプロトコル
アトミックコミットプロトコルは、複数の操作の集合を1つの処理として実行可能にするプロトコルであり、代表的なものとして例えば2層コミット及び3層コミットが用いられる。Cross Frameworkでは、Simple commit protocol, Two-phase commit protocolの2種類のプロトコルを用いることができる。Simple commit protocolはパーティシパントが2つに限られる。Two-phase commitはパーティシパントが3つ以上であってもサポートすることができる。
(3) Atomic commit protocol The atomic commit protocol is a protocol that enables a set of a plurality of operations to be executed as one process, and for example, two-layer commit and three-layer commit are used as typical ones. In Cross Framework, two types of protocols, Simple commit protocol and Two-phase commit protocol, can be used. The Simple commit protocol is limited to two parties. Two-phase commit can support more than two parties.

Two-phase commit protocol, Simple commit protocol についてそれぞれ以下の(3-1),(3-2)で詳細に説明する。
(3-1)Two-phase commit protocol
2層コミット(2PC)では、あるチェーンをコーディネータとして、他のコントラクト関数の実行とコミットを行うチェーン群をパーティシパントとして次のようなフローでコミット、もしくはアボート状態に至る。コーディネータがパーティシパントにコミット準備を要求し、すべてのパーティシパントが成功した場合には、全パーティシパントにコミット要求を出す。コミット準備に1人でも失敗した場合には、全パーティシパントにアボート要求を出す。
The two-phase commit protocol and the simple commit protocol will be described in detail in (3-1) and (3-2) below, respectively.
(3-1) Two-phase commit protocol
In two-layer commit (2PC), one chain is used as a coordinator, and a group of chains that execute and commit other contract functions is used as a party to commit or reach an aborted state in the following flow. The coordinator requests the party shippants to prepare for the commit, and if all the party shippants succeed, the coordinator issues a commit request to all the party shippants. If even one person fails to prepare for the commit, an abort request is made to all party sipants.

図1を参照しながら、コミットのフローを説明する。同図において、Xはコーディネータ, A, B, Cは各パーティシパント,矢印はフローの各ステップのリクエストの向きを示している。
ステップ1:Initiate step
ユーザは、トランザクション開始のリクエストである“MsgInitiate”をInitiator chainに提出する。Initiator chainは2層コミットのコーディネータとして“MsgInitiate”に指定されたコントラクトの関数を含むパーティシパントチェーンに“Prepare”を要求するパケットである“PacketPrepare”を送信する
ステップ2:Prepare step
各パーティシパントチェーンは、“PacketPrepare”を受け取ると、上述の「(2-2)Cross-chain transactionの作成と検証」で説明したコントラクトトランザクションで指定されるコントラクト関数を実行する (ただし、この際に実際のコミットはされていない)。実行に成功した場合、ステイトストアに対しての変更操作の保存と変更対象へのロックを取得する。このロックメカニズムの詳細は、上述の「(1-1)Contract Handler及びステイトストア」で説明したから、説明を繰り返さない。最後にパケット“PacketPrepareAcknowledgement”の“Status”に成功を示す“PREPARE_RESULT_OK”を
セットして返す。
一方、実行に失敗した場合、変更操作を破棄して、パケット“PacketPrepareAcknowledgement”の“Status”に失敗を示す“PREPARE_RESULT_FAILED”をセットして返す。
ステップ3:Confirm step
コーディネータチェーンは、Prepare step(ステップ2)において各パーティシパントチェーンが送信するACK“PacketPrepareAcknowledgement”を受け取る。各ACKの処理については、以下の1~3のような状態遷移を行う。
1. 次のACKの受信待ち
2. 受信したACKの“Status”が“PREPARE_RESULT_OK”かつ未受信のACKがある場合、1に遷移する。すべて受信した場合、各パーティシパントチェーンにコミット要求をするために“PacketCommit”の“Status”に”COMMIT”をセットして送信し、ステップ4のCommit stepに進む。
3. 受信したACKの“Status”が“PREPARE_RESULT_FAILED”の場合、各パーティシパントチェーンにアボート要求をするために“PacketCommit”の“Status”に“ABORT”をセットして送信し、ステップ4のCommit stepに進む
ステップ4:Commit step
各パーティシパントチェーンは、コミット要求があった場合、Prepare step(ステップ2)で保存していた変更操作をステイトストアに適用し、ロックを削除してコーディネータチェーンに完了済みを示す“PacketCommitAcknowledgement”を送信する。各パーティシパントチェーンは、アボート要求があった場合、Prepare step(ステップ2)で保存していた変更操作とロックを削除してコーディネータチェーンに完了済みを示す“PacketCommitAcknowledgement”を送信する。
The commit flow will be described with reference to FIG. In the figure, X is the coordinator, A, B, and C are the parties, and the arrows are the direction of the request for each step of the flow.
Step 1: Initiate step
The user submits a transaction start request "MsgInitiate" to the Initiator chain. The Initiator chain sends a packet "PacketPrepare" requesting "Prepare" to the party chain containing the function of the contract specified in "MsgInitiate" as the coordinator of the two-tier commit. Step 2: Prepare step
Upon receiving the "PacketPrepare", each party chain executes the contract function specified in the contract transaction described in "(2-2) Creating and verifying the Cross-chain transaction" above (however, at this time). No actual commit was made). If the execution is successful, save the change operation to the state store and acquire the lock to the change target. Since the details of this locking mechanism have been described in "(1-1) Contract Handler and State Store" above, the description will not be repeated. Finally, "PREPARE_RESULT_OK" indicating success is set in "Status" of the packet "PacketPrepareAcknowledgement" and returned.
On the other hand, if the execution fails, the change operation is discarded, and "PREPARE_RESULT_FAILED" indicating the failure is set in "Status" of the packet "PacketPrepareAcknowledgement" and returned.
Step 3: Confirm step
The coordinator chain receives the ACK “PacketPrepareAcknowledgement” transmitted by each party chain in the Prepare step (step 2). For each ACK process, the following state transitions 1 to 3 are performed.
1. Waiting for the next ACK
2. If the "Status" of the received ACK is "PREPARE_RESULT_OK" and there is an unreceived ACK, transition to 1. When all are received, set "COMMIT" in "Status" of "PacketCommit" to send a commit request to each party chain, and proceed to the Commit step of step 4.
3. If the "Status" of the received ACK is "PREPARE_RESULT_FAILED", set "ABORT" to "Status" of "PacketCommit" to make an abort request to each party chain, and send it. Go to step Step 4: Commit step
When a commit request is made, each party chain applies the change operation saved in the Prepare step (step 2) to the state store, removes the lock, and sends a “PacketCommitAcknowledgement” to the coordinator chain to indicate that it has been completed. Send. When there is an abort request, each party chain deletes the change operation and lock saved in the Prepare step (step 2) and sends a "PacketCommitAcknowledgement" indicating completion to the coordinator chain.

(3-2)Simple commit protocol
このSimple commit protocolは、パーティシパントの数に対する制約があるアトミックコミットのプロトコルである。2層コミットとは異なり、パーティシパントは2つに制限され、またそれらのどちらか一方がコーディネータの役割を担う必要がある。
図2を参照しながら、コミットのフローを説明する。
ステップ1:Initiate
ユーザは、Cross-chain transactionを開始するために“MsgInitiate”をInitiator chainに提出する。このSimple commit protocolのフローでは、Initiator chainはコーディネータとパーティシパントの役割を兼ねる。
ステップ2: Prepare(A)
Aは“MsgInitiate”で指定されたコントラクト関数をPrepare実行する。実行に成功した場合、ステイトストアに対しての変更操作の保存と変更対象へのロックを取得する。このロックメカニズムの詳細は、上述の「(1-1)Contract Handler及びステイトストア」で説明したから、説明を繰り返さない。その後、Bのコントラクト関数の呼び出し情報を含む、パケット“PacketDataCall”を作成しBとのチャンネルに送信する。実行に失敗した場合、このトランザクションの処理をアボートして終了する。
ステップ3: Commit(B)
Bは“PacketDataCall”を受け取り、指定されたコントラクト関数を実行する。実行に成功した場合、Commitを行う。その後、“PacketCallAcknowledgement“に“Status”として“COMMIT_OK”をセットして、Aとのチャンネルに送信する。実行に失敗した場合、アボートを行う。その後、“PacketCallAcknowledgement”に“Status”として“COMMIT_FAILED”をセットして、AとのChannelに送信する。
ステップ4:Commit(A)
Aは“PacketCallAcknowledgement”を受け取り、その“Status”を確認する。“Status”が“COMMIT_OK”の場合、AはPrepare時に保存していた変更操作をステイトストアに適用し、ロックを削除する。“Status”が“COMMIT_FAILED”の場合、AはPrepare時に保存していた変更操作を破棄し、ロックを削除する。
(3-2) Simple commit protocol
This Simple commit protocol is an atomic commit protocol that has restrictions on the number of parties. Unlike two-tier commits, parties are limited to two, and one of them must act as a coordinator.
The commit flow will be described with reference to FIG.
Step 1: Initiate
The user submits “MsgInitiate” to the Initiator chain to initiate a Cross-chain transaction. In this simple commit protocol flow, the Initiator chain doubles as a coordinator and a party sipant.
Step 2: Prepare (A)
A prepares the contract function specified by "MsgInitiate". If the execution is successful, save the change operation to the state store and acquire the lock to the change target. Since the details of this locking mechanism have been described in "(1-1) Contract Handler and State Store" above, the description will not be repeated. After that, a packet "PacketDataCall" containing the call information of B's contract function is created and sent to the channel with B. If execution fails, the processing of this transaction is aborted and terminated.
Step 3: Commit (B)
B receives a “PacketDataCall” and executes the specified contract function. If the execution is successful, commit. After that, set "COMMIT_OK" as "Status" in "PacketCallAcknowledgement" and send to the channel with A. If execution fails, abort. After that, set "COMMIT_FAILED" as "Status" in "PacketCallAcknowledgement" and send it to the Channel with A.
Step 4: Commit (A)
A receives "PacketCallAcknowledgement" and confirms its "Status". If "Status" is "COMMIT_OK", A applies the change operation saved at the time of Prepare to the state store and removes the lock. If "Status" is "COMMIT_FAILED", A discards the change operation saved at the time of Prepare and deletes the lock.

本発明によれば、2way-pegのように、例えば、資金側で証券側のルール等がチェックできないため、再度証券トークン側でチェックした際に、他の取引と競合して取引が不成立になるなどの問題を回避することができる。 According to the present invention, unlike the 2-way-peg, for example, the rules on the securities side cannot be checked on the fund side, so when the securities token side is checked again, the transaction competes with other transactions and the transaction is unsuccessful. You can avoid problems such as.

コミットのフローである。This is the commit flow. コミットのフローである。This is the commit flow. スマートコントラクトを実行するフローである(第1実施形態)。This is a flow for executing a smart contract (first embodiment). 模擬コードの模式図である(前半)。It is a schematic diagram of a simulated code (first half). 模擬コードの模式図である(後半)。It is a schematic diagram of a simulated code (second half). 模擬コードの模式図である。It is a schematic diagram of a simulated code. スマートコントラクトを実行するフローである(第3実施形態)。This is a flow for executing a smart contract (third embodiment).

(第1実施形態)
上記解決手段で説明した設計思想に基づく本発明の取引システムの一実施形態について、図3を参照しながら説明する。図3は、証券取引のシーケンスフロー(言い換えると、スマートコントラクトを実行するフロー)である。
(First Embodiment)
An embodiment of the transaction system of the present invention based on the design concept described in the above solution will be described with reference to FIG. FIG. 3 is a sequence flow of securities transactions (in other words, a flow of executing a smart contract).

本実施形態の取引システムは、ブロックチェーンとしての証券チェーン11(第1のブロックチェーンに相当する)と、ブロックチェーンとしての決済チェーン12(第2のブロックチェーンに相当する)とを含む。コーディネータ11b(コーディネータ部に相当する)、パーティシパント11c(第1ユーザ部に相当する)は証券チェーン11側に配設され、パーティシパント12c(第2ユーザ部に相当する)は決済チェーン12側に配設される。本実施形態では、二人のユーザー(以下ユーザーA、Bとする)間において、証券チェーン上でユーザーAからユーザーBへ100口の証券トークンが移転され、決済チェーン上でユーザーBからユーザーAへ10万円分の決済トークンが移転される指図としている。その際に、証券チェーン11及び決済チェーン12間のアトミック性を持つ安全なスマートコントラクトの呼び出しが可能なフレームワークが提供される。 The transaction system of the present embodiment includes a securities chain 11 as a blockchain (corresponding to a first blockchain) and a settlement chain 12 as a blockchain (corresponding to a second blockchain). The coordinator 11b (corresponding to the coordinator section) and the party shippant 11c (corresponding to the first user section) are arranged on the securities chain 11 side, and the party shippant 12c (corresponding to the second user section) is the settlement chain 12 Arranged on the side. In this embodiment, 100 securities tokens are transferred from User A to User B on the securities chain between two users (hereinafter referred to as Users A and B), and from User B to User A on the payment chain. The instruction is to transfer 100,000 yen worth of settlement tokens. At that time, a framework capable of calling a secure smart contract having atomicity between the securities chain 11 and the settlement chain 12 is provided.

コーディネータ11b、パーティシパント11c、パーティシパント12c、リレイアー13はそれぞれコンピュータにより実現され、コーディネータ11b、パーティシパント11c、パーティシパント12cは分散型のネットワークを構成している。コーディネータ11b及びパーティシパント11c,12cは互いに、リレイアー13を介して交信する。なお、ユーザーA及びBはそれぞれパーティシパント11c及びパーティシパント12cに対応している。 The coordinator 11b, the party shippant 11c, the party shippant 12c, and the relay 13 are each realized by a computer, and the coordinator 11b, the party shippant 11c, and the party shippant 12c form a distributed network. The coordinator 11b and the party sipants 11c, 12c communicate with each other via the relay 13. Users A and B correspond to the party shippant 11c and the party shippant 12c, respectively.

コーディネータ部11bは層構造としてIBC Module及びCross Moduleを備える。 The coordinator section 11b includes an IBC Module and a Cross Module as a layered structure.

パーティシパント11cは層構造としてIBC Module、Cross Module、Contract Moduleを備えている。証券チェーン11側のContract Module を構成するContract Handlerには証券トークンの発行コントラクト、移転コントラクトが定義されている。模擬コードを前半と後半に分けてそれぞれ図4A及び図4Bに示す。パーティシパント12cは、パーティシパント11cと同様に、層構造としてIBC Module、Cross Module、Contract Moduleを備えている。決済チェーン12側のContract Module を構成するContract Handlerには、決済トークンの発行コントラクト、移転コントラクトが定義されている。模擬コードを図5に示す。 The party sipant 11c has an IBC Module, a Cross Module, and a Contract Module as a layered structure. A securities token issuance contract and a transfer contract are defined in the Contract Handler that constitutes the Contract Module on the securities chain 11 side. The simulated code is divided into the first half and the second half and shown in FIGS. 4A and 4B, respectively. Like the party shippant 11c, the party shippant 12c includes an IBC Module, a Cross Module, and a Contract Module as a layered structure. A contract for issuing a payment token and a transfer contract are defined in the Contract Handler that constitutes the Contract Module on the payment chain 12 side. The simulated code is shown in FIG.

スマートコントラクトが実行される前提として、以下の処理が行われているものとする。証券チェーン11上で、ユーザーAからユーザーBへの証券トークンを移転するために呼び出すコントラクト関数(図4Aにおけるtransfer)並びに、決済チェーン12上で、ユーザーBからユーザーAへの決済トークンを移転するために呼び出すコントラクト関数(図5におけるtransfer)を引数にもつトランザクション(MsgInitiate)が作成され、コーディネータ11bに送信される。以上の処理が実行されていることを前提として、以下のシーケンスフローは実行される。本シーケンスフローは、主として「準備フェーズ」及び「コミットフェーズ」からなる二つのフェーズに分割することができる。 Assuming that the smart contract is executed, the following processing is performed. A contract function called to transfer a securities token from user A to user B on the securities chain 11 (transfer in FIG. 4A), and to transfer a payment token from user B to user A on the payment chain 12. A transaction (MsgInitiate) having a contract function (transfer in FIG. 5) called to is created and sent to the coordinator 11b. The following sequence flow is executed on the premise that the above processing is executed. This sequence flow can be divided into two phases, mainly a "preparation phase" and a "commit phase".

コーディネータ11bは、受信したトランザクション(MsgInitiate)を確認してトランザクションの形式に問題がないか検証する。(ステップS1)。一つでも問題があった場合は、トランザクションを直ちに破棄して、処理を終了する。問題がない場合は、処理はステップS2に進む。 The coordinator 11b confirms the received transaction (MsgInitiate) and verifies that there is no problem in the transaction format. (Step S1). If there is even one problem, the transaction is immediately discarded and the process ends. If there is no problem, the process proceeds to step S2.

コーディネーター11bは、検証したトランザクション(MsgInitiate)に基づきパケット(PacketPrepare)を作成し、リレイアー13を経由して証券チェーン11のパーティシパント11c及び決済チェーン12のパーティシパント12cに送信する(ステップS2、ステップS3)。このパケット(PacketPrepare)が請求項1に記載の「第1のパケット」に相当する。 The coordinator 11b creates a packet (PacketPrepare) based on the verified transaction (MsgInitiate) and sends it to the party shippant 11c of the securities chain 11 and the party shippant 12c of the settlement chain 12 via the relay 13 (step S2, Step S3). This packet (PacketPrepare) corresponds to the "first packet" according to claim 1.

証券チェーン11のパーティシパント11cは、リレイアー13経由で受信したパケット(PacketPrepare)を確認して、100口の証券トークンをユーザーAからユーザーBに移転することができるか否かを検証する(ステップS4)。具体的には、受け取ったパケット(PacketPrepare)内で指定されているコントラクト関数を実行する(この際、実際にコミットはされないことに注意する)。 The party 11c of the securities chain 11 confirms the packet received via the relay 13 and verifies whether or not 100 securities tokens can be transferred from the user A to the user B (step). S4). Specifically, execute the contract function specified in the received packet (PacketPrepare) (note that it is not actually committed at this time).

実行に失敗した場合、変更操作を破棄して、証券チェーン11のコーディネータ11bに対して、パケット(PacketPrepareAcknowledgement)の“Status”に“PREPARE_RESULT_FAILED”をセットして(言い換えると、“Status”を実行不可にセットして)リレイアー13を介して送信する(ステップS6、S10)。ここで送信されるパケット(PacketPrepareAcknowledgement)が請求項1に記載の「第3のパケット」に相当する。実行に成功した場合、自身のステイトストアへの変更操作の保存と変更対象へのロックを取得する(ステップS5)。ロックを取得できた後に、証券チェーン11のコーディネータ11bに対して、パケット(PacketPrepareAcknowledgement)の“Status”に “PREPARE_RESULT_OK”をセットして(言い換えると、“Status”を実行可能にセットして)リレイアー13を介して送信する(ステップS6、S10)。ここで送信されるパケット(PacketPrepareAcknowledgement)が請求項1に記載の「第2のパケット」に相当する。 If the execution fails, the change operation is discarded, and for the coordinator 11b of the securities chain 11, "PREPARE_RESULT_FAILED" is set in "Status" of the packet (PacketPrepareAcknowledgement) (in other words, "Status" cannot be executed. (Set) and transmitted via the relay 13 (steps S6 and S10). The packet (PacketPrepareAcknowledgement) transmitted here corresponds to the "third packet" according to claim 1. If the execution is successful, the change operation is saved in its own state store and the lock to the change target is acquired (step S5). After the lock is acquired, set "PREPARE_RESULT_OK" to "Status" of the packet (PacketPrepareAcknowledgement) for the coordinator 11b of the securities chain 11 (in other words, set "Status" to be executable). Is transmitted via (steps S6 and S10). The packet (PacketPrepareAcknowledgement) transmitted here corresponds to the "second packet" according to claim 1.

決済チェーン12のパーティシパント12cは、リレイアー13経由で受信したパケット(PacketPrepare)を確認して、証券トークンの対価として10万円分の決済トークンをユーザーBからユーザーAに移転することができるか検証する(ステップS7)。具体的には、受け取ったパケット(PacketPrepare)内で指定されているコントラクト関数を実行する(この際、実際にコミットはされないことに注意する)。 Can the party 12c of the payment chain 12 confirm the packet (Packet Prepare) received via the relay 13 and transfer the payment token for 100,000 yen from the user B to the user A as the consideration for the securities token? Verify (step S7). Specifically, execute the contract function specified in the received packet (PacketPrepare) (note that it is not actually committed at this time).

実行に失敗した場合、変更操作を破棄して、証券チェーン11のコーディネータ11bに対して、パケット(PacketPrepareAcknowledgement)の“Status”に“PREPARE_RESULT_FAILED”をセットして(言い換えると、“Status”を実行不可にセットして)リレイアー13を介して送信する(ステップS9、S10)。ここで送信されるパケット(PacketPrepareAcknowledgement)が請求項1に記載の「第5のパケット」に相当する。実行に成功した場合、自身のステイトストアへの変更操作の保存と変更対象へのロックを取得する(ステップS8)。ロックを取得できた後に、証券チェーン11のコーディネータ11bに対して、パケット(PacketPrepareAcknowledgement)の“Status”に“PREPARE_RESULT_OK”をセットして(言い換えると、“Status”を実行可能にセットして)リレイアー13を介して送信する(ステップS9、S10)。ここで送信されるパケット(PacketPrepareAcknowledgement)が請求項1に記載の「第4のパケット」に相当する。 If the execution fails, the change operation is discarded and "PREPARE_RESULT_FAILED" is set in "Status" of the packet (PacketPrepareAcknowledgement) for the coordinator 11b of the securities chain 11 (in other words, "Status" cannot be executed. (Set) and transmitted via the relay 13 (steps S9 and S10). The packet (PacketPrepareAcknowledgement) transmitted here corresponds to the "fifth packet" according to claim 1. If the execution is successful, the change operation is saved in its own state store and the lock to the change target is acquired (step S8). After acquiring the lock, set "PREPARE_RESULT_OK" to "Status" of the packet (PacketPrepareAcknowledgement) for the coordinator 11b of the securities chain 11 (in other words, set "Status" to be executable). Is transmitted via (steps S9 and S10). The packet (PacketPrepareAcknowledgement) transmitted here corresponds to the "fourth packet" according to claim 1.

上述の処理によって、コーディネーター11bは、パケット(PacketPrepareAcknowledgement)を各パーティシパント(本実施形態では、パーティシパント11c、12c)から受け取る。 By the above-mentioned processing, the coordinator 11b receives the packet (PacketPrepareAcknowledgement) from each party (in this embodiment, the parties 11c and 12c).

コーディネーター11bは、受け取ったパケット(PacketPrepareAcknowledgement)を確認して(ステップS11)、“Status”に応じて以下の処理を行う。すなわち、「Status=PREPARE_RESULT_FAILED」のパケットを一つでも受け取った場合には、アボート要求をするためにステップS12に進む。すべてのパーティシパント(本実施形態では、パーティシパント11c、12c)から「Status=PREPARE_RESULT_OK」のパケットを受信した場合には、コミット要求をするためにステップS12に進む。 The coordinator 11b confirms the received packet (PacketPrepareAcknowledgement) (step S11), and performs the following processing according to the “Status”. That is, if even one packet of "Status = PREPARE_RESULT_FAILED" is received, the process proceeds to step S12 in order to make an abort request. When a packet of "Status = PREPARE_RESULT_OK" is received from all the parties (parts 11c and 12c in this embodiment), the process proceeds to step S12 to make a commit request.

コミットフェーズはステップS12から開始される。ステップS12において、アボート要求を行う際には、パケット(PacketCommit)を作成し、“Status”を“ABORT”に設定して、全てのパーティシパント(本実施形態では、パーティシパント11c、12c)にリレイアー13を介してマルチキャストする(ステップS13、S14、S16)。このアボート要求を行うためのパケット(PacketCommit)が請求項1に記載の「第7のパケット」に相当する。ステップS12において、コミット要求を行う際には、パケット(PacketCommit)を作成し、“Status”を“COMMIT”に設定して、全てのパーティシパント(本実施形態では、パーティシパント11c、12c)にリレイアー13を介してマルチキャストする(ステップS13、S14、S16)。このコミット要求を行うためのパケット(PacketCommit)が請求項1に記載の「第6のパケット」に相当する。 The commit phase starts from step S12. In step S12, when making an abort request, a packet (PacketCommit) is created, "Status" is set to "ABORT", and all parties (in this embodiment, parties 11c and 12c). Multicast via the relay 13 (steps S13, S14, S16). The packet for making this abort request corresponds to the "seventh packet" according to claim 1. In step S12, when making a commit request, a packet (PacketCommit) is created, "Status" is set to "COMMIT", and all parties (in this embodiment, parties 11c and 12c). Multicast via relay 13 (steps S13, S14, S16). The packet for making this commit request corresponds to the "sixth packet" according to claim 1.

ステップS14において、パーティシパント11cは、受信したパケット(PacketCommit)のStatusが“COMMIT”である場合、準備フェーズで保存していた変更操作をステイトストアに適用し、ロックを削除してコーディネータ11bに完了済みを示すパケット(PacketCommitAcknowledgement)を送信する(ステップS15,S18)。
このコミット時に送信されるパケット(PacketCommitAcknowledgement)が、請求項1に記載の「第8のパケット」に相当する。
In step S14, when the status of the received packet (PacketCommit) is “COMMIT”, the party 11c applies the change operation saved in the preparation phase to the state store, deletes the lock, and causes the coordinator 11b. A packet (PacketCommitAcknowledgement) indicating completion is transmitted (steps S15 and S18).
The packet (PacketCommitAcknowledgement) transmitted at the time of this commit corresponds to the "eighth packet" according to claim 1.

一方、受信したパケットの“Status”が“ABORT”である場合、準備フェーズで保存していた変更操作とロックを削除してコーディネータ11bに完了済みを示すパケット(PacketCommitAcknowledgement)を送信する(ステップS15,S18)。このアボート時に送信されるパケット(PacketCommitAcknowledgement)が、請求項1に記載の「第9のパケット」に相当する。
ステップS16及びS17において行われる処理はそれぞれ、ステップS14及びS15において行われる処理と同様であるから、詳細な説明を省略する。
On the other hand, when the “Status” of the received packet is “ABORT”, the change operation and the lock saved in the preparation phase are deleted, and a packet (PacketCommitAcknowledgement) indicating completion is transmitted to the coordinator 11b (step S15, S18). The packet (PacketCommitAcknowledgement) transmitted at the time of this abort corresponds to the "nineth packet" according to claim 1.
Since the processes performed in steps S16 and S17 are the same as the processes performed in steps S14 and S15, respectively, detailed description thereof will be omitted.

このように、本実施形態によれば、証券チェーン11のパーティシパント11c及び決済チェーン12のパーティシパント12cのそれぞれに実現可能性を問い合わせており、双方で実現可能性が確認できた場合にだけ、複数チェーンでのコントラクト関数の呼び出し結果をコミットする。したがって、2way-pegのように、資金側で証券側のルール(例えば、譲渡人数が上限に達していないか、移転先のユーザーはKYC済かなど)等がチェックできないため、再度証券チェーン側でチェックした際に、他の取引と競合して取引が不成立になるなどの問題を回避することができる。 As described above, according to the present embodiment, the feasibility is inquired to each of the party shippant 11c of the securities chain 11 and the party shippant 12c of the settlement chain 12, and the feasibility can be confirmed by both parties. Only commit the result of calling the contract function in multiple chains. Therefore, unlike 2way-peg, the funds side cannot check the rules on the securities side (for example, whether the number of transferees has reached the upper limit, whether the transferee user has already completed KYC, etc.), so the securities chain side again. When checked, it is possible to avoid problems such as competition with other transactions and unsuccessful transactions.

(第2実施形態)
上述の第1実施形態で説明した処理は、取引のアトミック性が求められる他の取引(例えば、遺言信託)にも用いることができる。この場合、証券チェーン11を相続チェーン(第1のブロックチェーンに相当する)、決済チェーン12を資産チェーン(第2のブロックチェーン)と読み替えて、遺言信託の取引に適用することができる。
(Second Embodiment)
The process described in the first embodiment described above can also be used for other transactions (for example, a testamentary trust) that require the atomicity of the transaction. In this case, the securities chain 11 can be read as an inheritance chain (corresponding to the first block chain), and the settlement chain 12 can be read as an asset chain (second block chain), and can be applied to the transaction of a testamentary trust.

被相続人は、信託会社に遺言書や資産を提示して、これが相続チェーン上にスマートコントラクトして登録される。従来は、被相続人が死去した場合に、相続人から信託会社に連絡が入り、信託会社は資産管理会社に資産を問い合わせて、遺言を実行できるか否かを確認しなければならなかった。 The decedent presents a will or asset to the trust company, which is registered as a smart contract on the inheritance chain. In the past, when the decedent died, the heir contacted the trust company, and the trust company had to inquire of the asset management company about the assets to see if the will could be executed.

本実施形態では、相続チェーン上に登録された遺言書に基づく資産の移動が可能かどうかを資産チェーンに問い合わせる際に、アトミック性が担保されているため、2way-pegを用いる場合と異なり、遺産分割の条件に当てはまらず、覆って遺産分割が不可能になるなどのチェックを行う必要がなくなる。また、信託会社は、遺言内容の執行と資産分割履行の双方の実行結果を確認することができる。 In this embodiment, when inquiring to the asset chain whether it is possible to move the asset based on the will registered on the inheritance chain, the atomicity is guaranteed, so unlike the case of using 2way-peg, it is a heritage. It does not meet the conditions of division, and there is no need to check that it is impossible to divide the heritage by covering it. In addition, the trust company can confirm the execution results of both the execution of the will and the execution of the asset split.

(第3実施形態)
図6のフローチャートを参照しながら、本発明の第3実施形態について説明する。本実施形態は、コーディネータ11b及びパーティシパント11cが行う処理を、兼用部11bcが行う点で第1実施形態と相違する。その結果、一方のパーティシパントはコミット準備を省略することができる。また、第1実施形態と同様に、証券取引を例にして本実施形態の処理を説明する。ただし、本実施形態で説明した処理は、取引のアトミック性が求められる他の取引(例えば、遺言信託)にも用いることができる。この点については、第2実施形態に詳細を記載しているから、説明を省略する。本実施形態の取引システムは、一方のパーティシパントのコミット準備を省略することができるコミット方式(Simple Commit protocol)に基づき設計されている。このコミット方式は、パーティシパントの数が2つに制限されている点で、第1実施形態の2層コミットと相違する。また、いずれかのパーティシパントがコーディネータの役割を担う。
(Third Embodiment)
A third embodiment of the present invention will be described with reference to the flowchart of FIG. The present embodiment is different from the first embodiment in that the processing performed by the coordinator 11b and the party sipant 11c is performed by the combined unit 11bc. As a result, one party can skip the commit preparation. Further, as in the first embodiment, the processing of the present embodiment will be described by taking securities transactions as an example. However, the process described in this embodiment can also be used for other transactions (for example, a testamentary trust) that require the atomicity of the transaction. Since the details of this point are described in the second embodiment, the description thereof will be omitted. The trading system of the present embodiment is designed based on a commit protocol (Simple Commit protocol) that can omit the commit preparation of one party. This commit method differs from the two-layer commit of the first embodiment in that the number of parties is limited to two. In addition, one of the party sipants will play the role of coordinator.

兼用部11bcはコンピュータにより実現される。兼用部11bc及びパーティシパント12cは分散型のネットワークを構成している。兼用部11bc及びパーティシパント12cは互いに、リレイアー13を介して交信する。 The combined unit 11bc is realized by a computer. The combined unit 11bc and the party 12c form a distributed network. The dual-purpose unit 11bc and the party sipant 12c communicate with each other via the relay 13.

ステップS101の前に行う処理は、第1実施形態と同じであるから、説明を繰り返さない。ステップS101において、兼用部11bcは、受信したトランザクション(MsgInitiate)を確認してトランザクションの形式に問題がないか検証する。一つでも問題があった場合は、トランザクションを直ちに破棄して処理を終了する。 Since the process performed before step S101 is the same as that of the first embodiment, the description will not be repeated. In step S101, the combined unit 11bc confirms the received transaction (MsgInitiate) and verifies that there is no problem in the transaction format. If there is even one problem, the transaction is immediately discarded and the process ends.

ここで、本実施形態では、兼用部11bcがコーディネータとパーティシパントとの役割を兼用しているため、このタイミングで、100口の証券トークンをユーザーAからユーザーBに移転可能かをパーティシパントとして検証する(ステップS102)。 Here, in the present embodiment, since the dual-purpose unit 11bc also serves as a coordinator and a party shippant, it is possible to transfer 100 securities tokens from user A to user B at this timing. (Step S102).

具体的には、受け取ったトランザクション(MsgInitiate)内で指定されているコントラクト関数を実行する(この際、実際にコミットはされないことに注意する)。実行に失敗した場合、このトランザクションの処理をアボートして終了する。 Specifically, execute the contract function specified in the received transaction (MsgInitiate) (note that it is not actually committed at this time). If execution fails, the processing of this transaction is aborted and terminated.

実行に成功した場合、兼用部11bcは、パーティシパントとして自身のステイトストアへの変更操作の保存と変更対象へのロックを取得する(ステップS103)。ロックを取得できた後に、決済チェーンのコントラクト関数の呼び出し情報を(本実施形態では、決済チェーン上での10万円分の決済トークンをユーザーBからユーザーAへ移転するために呼び出すコントラクト関数)含むパケット(PacketDataCall)を作成し、パーティシパント12Cに送信する(ステップS104,S105)。このパケットが、請求項5に記載の「第1のパケット」に相当する。 If the execution is successful, the dual-purpose unit 11bc saves the change operation in its own state store as a party shippant and acquires a lock on the change target (step S103). After the lock can be acquired, the call information of the contract function of the payment chain is included (in this embodiment, the contract function called to transfer the payment token for 100,000 yen on the payment chain from user B to user A). A packet (PacketDataCall) is created and transmitted to the party 12C (steps S104 and S105). This packet corresponds to the "first packet" according to claim 5.

ステップS106において、パーティシパント12cは、パケット(PacketDataCall)を受け取り、指定されたコントラクト関数を実行する。実行に成功した場合、コミットを行う(ステップS107)。その後、パケット(PacketCallAcknowledgement)の“Status”に“COMMIT_OK”をセットして兼用部11bcに送信する(ステップS108,S109)。このコミット時に兼用部11bcに送信するパケット(PacketCallAcknowledgement)が、請求項5に記載の「第2のパケット」に相当する。実行に失敗した場合、アボートを行う。その後、パケット(PacketCallAcknowledgement)の“Status”に“COMMIT_FAILED”をセットして兼用部11bcに送信する(ステップS108,S109)。このアボート時に兼用部11bcに送信するパケット(PacketCallAcknowledgement)が、請求項5に記載の「第3のパケット」に相当する。 In step S106, the party 12c receives the packet (PacketDataCall) and executes the designated contract function. If the execution is successful, commit is performed (step S107). After that, "COMMIT_OK" is set in "Status" of the packet (PacketCallAcknowledgement) and transmitted to the dual-purpose unit 11bc (steps S108 and S109). The packet (PacketCallAcknowledgement) transmitted to the dual-purpose unit 11bc at the time of this commit corresponds to the "second packet" according to claim 5. If execution fails, abort. After that, "COMMIT_FAILED" is set in "Status" of the packet (PacketCallAcknowledgement) and transmitted to the dual-purpose unit 11bc (steps S108 and S109). The packet (PacketCallAcknowledgement) transmitted to the dual-purpose unit 11bc at the time of this abort corresponds to the "third packet" according to claim 5.

兼用部11bcは、パーティシパントが行う処理として、パーティシパント12cから受信したパケット(PacketCallAcknowledgement)を確認し、“Status”がCOMMIT_OKならコミットする(保存していた変更操作をステイトストアに適用し、ロックを削除する)。“Status”がCOMMIT_FAILEDならアボートする(保存していた変更操作とロックを削除する)。 The dual-purpose unit 11bc confirms the packet (PacketCallAcknowledgement) received from the party shippant 12c as a process performed by the party shippant, and commits if "Status" is COMMIT_OK (applies the saved change operation to the state store). Remove the lock). If “Status” is COMMIT_FAILED, abort (remove the saved change operation and lock).

このように、本実施形態によれば、証券チェーン11及び決済チェーン12において取引のアトミック性が担保されている。したがって、2way-pegのように、資金側で証券側のルール(例えば、私募に限定)等がチェックできないため、再度証券トークン側でチェックした際に、他の取引と競合して取引が不成立になるなどの問題を回避することができる。 As described above, according to the present embodiment, the atomicity of transactions is guaranteed in the securities chain 11 and the settlement chain 12. Therefore, unlike 2way-peg, the rules on the securities side (for example, limited to private placements) cannot be checked on the fund side, so when the securities token side is checked again, the transaction will compete with other transactions and the transaction will be unsuccessful. It is possible to avoid problems such as becoming.

(第3実施形態の変形例)
本実施形態では、証券チェーン11側のパーティシパントにコーディネータとしての役割を担当させたが、決済チェーン12側のパーティシパント12cにコーディネータとしての役割を担当させてもよい。本実施形態を遺言信託のユースケースに適用する場合には、相続チェーン側に兼用部11bc、資産チェーン側にパーティシパント12cを実装することができる。ただし、相続チェーン側にパーティシパント12c、資産チェーン側に兼用部11bcを実装してもよい。
(Modified example of the third embodiment)
In the present embodiment, the party sipant on the securities chain 11 side is in charge of the role as a coordinator, but the party sipant 12c on the settlement chain 12 side may be in charge of the role as a coordinator. When this embodiment is applied to a use case of a testamentary trust, a dual-purpose unit 11bc can be mounted on the inheritance chain side and a party sipant 12c can be mounted on the asset chain side. However, the party sipant 12c may be mounted on the inheritance chain side, and the combined portion 11bc may be mounted on the asset chain side.

11 証券チェーン、相続チェーン
11b コーディネータ
11c、12c パーティシパント
12 決済チェーン、資産チェーン
13 リレイアー










11 Securities Chain, Inheritance Chain 11b Coordinator 11c, 12c Party Shipant 12 Settlement Chain, Asset Chain 13 Relayer










Claims (8)

第1のブロックチェーンと第2のブロックチェーンとの間で取引に関わるスマートコントラクトをアトミックに実行するための取引システムであって、
前記第1のブロックチェーン側のコーディネータ部及び第1ユーザ部と、
前記第2のブロックチェーン側の第2ユーザ部と、
を有し、
前記コーディネータ部は、コントラクト関数が指定された所定のトランザクションに基づき作成した第1のパケットを前記第1及び第2ユーザ部に送信し、
前記第1ユーザ部は、前記コーディネータ部から受信した前記第1のパケットのコントラクト関数の実行に成功した場合には、自身のステイトストアへの変更操作の保存と変更対象へのロックを取得して、ステータスを実行可能にした第2のパケットを前記コーディネータ部に送信し、実行に失敗した場合には、自身のステイトストアへの変更操作を破棄して、ステータスを実行不可にした第3のパケットを前記コーディネータ部に送信し、
前記第2ユーザ部は、前記コーディネータ部から受信した前記第1のパケットのコントラクト関数の実行に成功した場合には、自身のステイトストアへの変更操作の保存と変更対象へのロックを取得して、ステータスを実行可能にした第4のパケットを前記コーディネータ部に送信し、実行に失敗した場合には、自身のステイトストアへの変更操作を破棄して、ステータスを実行不可にした第5のパケットを前記コーディネータ部に送信し、
前記コーディネータ部は、前記第1及び第2ユーザ部から受信したパケットの実行可否検証結果を元に、全てのパケットのステータスが実行可能な場合にはコミット要求を行うため第6のパケットを前記第1及び第2ユーザ部に送信し、少なくとも1つのパケットのステータスが実行不可の場合にはアボート要求を行うため第7のパケットを前記第1及び第2ユーザ部に送信し、
前記第1及び第2ユーザ部は、前記コーディネータ部から前記第6のパケットを受信すると、事前に保存していた変更操作をステイトストアに適用し、ロックを削除して第8のパケットを前記コーディネータ部に送信し、前記コーディネータ部から前記第7のパケットを受信すると、事前に保存していた変更操作とロックを削除して第9のパケットを前記コーディネータ部に送信することを
特徴とする取引システム。
A trading system for atomically executing smart contracts related to transactions between the first blockchain and the second blockchain.
The coordinator section and the first user section on the first blockchain side,
The second user part on the second blockchain side and
Have,
The coordinator unit transmits the first packet created based on a predetermined transaction to which the contract function is specified to the first and second user units.
When the first user unit succeeds in executing the contract function of the first packet received from the coordinator unit, the first user unit acquires the storage of the change operation in its own state store and the lock to the change target. , The second packet with the status made executable is sent to the coordinator section, and if the execution fails, the change operation to its own state store is discarded and the status is made unexecutable. To the coordinator section
When the second user unit succeeds in executing the contract function of the first packet received from the coordinator unit, the second user unit acquires the storage of the change operation in its own state store and the lock to the change target. , The fourth packet that made the status executable is sent to the coordinator section, and if the execution fails, the change operation to its own state store is discarded and the status is made infeasible. To the coordinator section
Based on the executionability verification results of the packets received from the first and second user units, the coordinator unit sends a sixth packet to the sixth packet in order to make a commit request when the status of all the packets is executable. It is transmitted to the first and second user units, and if the status of at least one packet is infeasible, a seventh packet is transmitted to the first and second user units in order to make an abort request.
When the first and second user units receive the sixth packet from the coordinator unit, the first and second user units apply the change operation saved in advance to the state store, remove the lock, and send the eighth packet to the coordinator. A trading system characterized in that when the 7th packet is transmitted to the coordinator unit and the 7th packet is received from the coordinator unit, the change operation and the lock stored in advance are deleted and the 9th packet is transmitted to the coordinator unit. ..
前記コーディネータ部と、前記第1及び第2ユーザ部との交信を仲介するリレイアーを有することを特徴とする請求項1に記載の取引システム。 The transaction system according to claim 1, further comprising a relay that mediates communication between the coordinator unit and the first and second user units. 前記第1のブロックチェーンは証券チェーンであり、前記第2のブロックチェーンは決済チェーンであることを特徴とする請求項1又は2に記載の取引システム。 The transaction system according to claim 1 or 2, wherein the first blockchain is a securities chain, and the second blockchain is a settlement chain. 前記第1のブロックチェーンは相続チェーンであり、前記第2のブロックチェーンは資産チェーンであることを特徴とする請求項1又は2に記載の取引システム。 The trading system according to claim 1 or 2, wherein the first blockchain is an inheritance chain, and the second blockchain is an asset chain. 第1のブロックチェーンと第2のブロックチェーンとの間で取引に関わるスマートコントラクトをアトミックに実行するための取引システムであって、
前記第1のブロックチェーン側に設けられるコーディネータ部及び第1ユーザ部を兼用する兼用部と、
前記第2のブロックチェーン側の第2ユーザ部と、
を有し、
前記兼用部は、コントラクト関数が指定された所定のトランザクションの実現が可能な場合には、前記第1ユーザ部として自身のステイトストアへの変更操作の保存と変更対象へのロックを取得して、第1のパケットを前記第2ユーザ部に送信し、実現が不可能な場合には、処理を終了し、
前記第2ユーザ部は、前記兼用部から受信した前記第1のパケットに基づき、コントラクト関数を実行し、実行に成功した場合にはコミットを行うとともに、ステータスを実行可能にした第2のパケットを前記兼用部に送信し、実行に失敗した場合にはアボートを行うとともに、ステータスを実行不可にした第3のパケットを前記兼用部に送信し、
前記兼用部は、前記第2ユーザ部から前記第2のパケットを受信した場合には、前記第1ユーザ部として事前に保存していた変更操作をステイトストアに適用し、ロックを削除し、前記第2ユーザ部から前記第3のパケットを受信した場合には、前記第1ユーザ部として事前に保存していた変更操作を破棄し、ロックを削除することを特徴とする取引システム。
A trading system for atomically executing smart contracts related to transactions between the first blockchain and the second blockchain.
A coordinator section and a first user section provided on the first blockchain side, and a dual-purpose section that also serves as a first user section.
The second user part on the second blockchain side and
Have,
When the predetermined transaction to which the contract function is specified can be realized, the dual-purpose part acquires the storage of the change operation in its own state store and the lock to the change target as the first user part. The first packet is transmitted to the second user unit, and if it cannot be realized, the process is terminated and the process is terminated.
The second user unit executes the contract function based on the first packet received from the combined unit, commits if the execution is successful, and executes the second packet whose status is made executable. It is transmitted to the dual-purpose unit, and if execution fails, it is aborted, and a third packet whose status is disabled is transmitted to the dual-purpose unit.
When the combined unit receives the second packet from the second user unit, the combined unit applies the change operation previously saved as the first user unit to the state store, deletes the lock, and displays the lock. A transaction system characterized in that when the third packet is received from the second user unit, the change operation previously stored as the first user unit is discarded and the lock is deleted.
前記兼用部と、前記第2ユーザ部との交信を仲介するリレイアーを有することを特徴とする請求項5に記載の取引システム。 The transaction system according to claim 5, further comprising a relay that mediates communication between the combined unit and the second user unit. 前記第1のブロックチェーンは証券チェーン及び決済チェーンのうちいずれか一方のチェーンであり、前記第2のブロックチェーンは他方のチェーンであることを特徴とする請求項5又は6に記載の取引システム。 The trading system according to claim 5 or 6, wherein the first block chain is one of a securities chain and a settlement chain, and the second block chain is the other chain. 前記第1のブロックチェーンは相続チェーン及び資産チェーンのうちいずれか一方のチェーンであり、前記第2のブロックチェーンは他方のチェーンであることを特徴とする請求項5又は6に記載の取引システム。 The trading system according to claim 5 or 6, wherein the first block chain is one of an inheritance chain and an asset chain, and the second block chain is the other chain.
JP2020169096A 2020-10-06 2020-10-06 Trading system Active JP6982345B1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2020169096A JP6982345B1 (en) 2020-10-06 2020-10-06 Trading system
US18/022,412 US20230316398A1 (en) 2020-10-06 2021-09-17 Trading system
PCT/JP2021/034365 WO2022075046A1 (en) 2020-10-06 2021-09-17 Transaction system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020169096A JP6982345B1 (en) 2020-10-06 2020-10-06 Trading system

Publications (2)

Publication Number Publication Date
JP6982345B1 JP6982345B1 (en) 2021-12-17
JP2022061223A true JP2022061223A (en) 2022-04-18

Family

ID=79169991

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020169096A Active JP6982345B1 (en) 2020-10-06 2020-10-06 Trading system

Country Status (3)

Country Link
US (1) US20230316398A1 (en)
JP (1) JP6982345B1 (en)
WO (1) WO2022075046A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11971903B2 (en) 2022-05-13 2024-04-30 Circle Internet Financial Limited Atomically bridging transactions across different blockchains

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019235198A1 (en) * 2018-06-06 2019-12-12 日本電信電話株式会社 Settlement system, settlement method, user device, and settlement program
JP2020071617A (en) * 2018-10-30 2020-05-07 株式会社Crypto Garage Transaction method, program, verifying apparatus and creating method
US20200177391A1 (en) * 2019-06-28 2020-06-04 Alibaba Group Holding Limited Sending cross-chain authenticatable messages

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019235198A1 (en) * 2018-06-06 2019-12-12 日本電信電話株式会社 Settlement system, settlement method, user device, and settlement program
JP2020071617A (en) * 2018-10-30 2020-05-07 株式会社Crypto Garage Transaction method, program, verifying apparatus and creating method
US20200177391A1 (en) * 2019-06-28 2020-06-04 Alibaba Group Holding Limited Sending cross-chain authenticatable messages

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
藤本 真吾 他: "ブロックチェーンの安全な連携方式の提案", 2018年 暗号と情報セキュリティシンポジウム(SCIS2018)予稿集 [USB], JPN6021030974, 23 January 2018 (2018-01-23), JP, ISSN: 0004567537 *

Also Published As

Publication number Publication date
JP6982345B1 (en) 2021-12-17
WO2022075046A1 (en) 2022-04-14
US20230316398A1 (en) 2023-10-05

Similar Documents

Publication Publication Date Title
CN111183445B (en) Method and apparatus for digital asset auto-promise settlement
EP3776441B1 (en) Digital asset exchange
US20220237611A1 (en) Resource Transfer System
CN109214818B (en) Cross-chain transaction method and device
KR102277998B1 (en) Electronic bill management method, apparatus and recording medium
CN106504094B (en) Transaction matching method and system of distributed general ledger system based on block chain technology
US20190306235A1 (en) Private Blockchain With Decentralized External Gateway
US11367072B2 (en) Private networks and content requests in a resource transfer system
JP2022547130A (en) Systems and methods for providing a blockchain-based process of record
US11481771B2 (en) One way functions in a resource transfer system
JP2023174862A (en) Systems and methods for blockchain-dependent operation sets
WO2021098251A1 (en) Asset digital certificate payment and settlement method and device based on blockchain, and medium
US20080082434A1 (en) System and Method for Making Payment
US11392944B2 (en) Transfer costs in a resource transfer system
JP2023535354A (en) Blockchain-based tax mechanism
JP2020161092A (en) Inter-system cooperation method and node
WO2022075046A1 (en) Transaction system
CA2999806A1 (en) Temporary consensus networks in a resource transfer system
CN112016114B (en) Intelligent contract generating method based on cryptocurrency, related equipment and storage medium
CN112529616A (en) Block chain-based alliance point management method and system
CN116415955A (en) Cross-chain transaction method and system based on combination of hash locking and notary
Xu et al. Existing Blockchain Platforms
KR102381697B1 (en) Method and system for servicing blockchain-based property trade
CN114270385A (en) Method, apparatus and computer readable medium for transaction management across multiple heterogeneous computing networks
Engel et al. Transferable Cross-Chain Options

Legal Events

Date Code Title Description
A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20201102

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210331

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20210402

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210810

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210813

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20211109

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211112

R150 Certificate of patent or registration of utility model

Ref document number: 6982345

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350