JP7181455B2 - Blockchain system, approval terminal, user terminal, history management method, and history management program - Google Patents

Blockchain system, approval terminal, user terminal, history management method, and history management program Download PDF

Info

Publication number
JP7181455B2
JP7181455B2 JP2018213190A JP2018213190A JP7181455B2 JP 7181455 B2 JP7181455 B2 JP 7181455B2 JP 2018213190 A JP2018213190 A JP 2018213190A JP 2018213190 A JP2018213190 A JP 2018213190A JP 7181455 B2 JP7181455 B2 JP 7181455B2
Authority
JP
Japan
Prior art keywords
block
block number
value
transaction
distributed ledger
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.)
Active
Application number
JP2018213190A
Other languages
Japanese (ja)
Other versions
JP2020080061A (en
Inventor
大喜 渡邊
達郎 石田
盛徳 大橋
滋 藤村
篤 中平
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2018213190A priority Critical patent/JP7181455B2/en
Priority to US17/293,583 priority patent/US20220004562A1/en
Priority to PCT/JP2019/042658 priority patent/WO2020100602A1/en
Publication of JP2020080061A publication Critical patent/JP2020080061A/en
Application granted granted Critical
Publication of JP7181455B2 publication Critical patent/JP7181455B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、スマートコントラクト型のブロックチェーンの履歴を管理する技術に関する。 The present invention relates to technology for managing the history of a smart contract type blockchain.

中央集権的な管理を必要とせずに、信頼性を担保可能な仕組みがデジタル仮想通貨ビットコインを中心に普及しつつある。ブロックチェーンと呼ばれるこの仕組みにおいては、やり取りされる情報の信頼性が分散ネットワーク内の合意形成のプロセスによって担保され、かつ、改ざんや二重使用などの不正を系全体で防ぐことで健全性が保たれる。 A mechanism that can guarantee reliability without the need for centralized management is spreading, centering on the digital virtual currency bitcoin. In this mechanism, called blockchain, the reliability of exchanged information is guaranteed by the process of consensus building within the distributed network, and the soundness is ensured by preventing fraud such as falsification and double use throughout the system. drip.

ブロックチェーンでは、参加者間の取引情報(トランザクション)が「ブロック」という単位でまとめられ、各ブロックは数珠つなぎとなって時系列順に管理される。新たなブロックの承認は、Proof of Workなどの分散ネットワークにおける合意アルゴリズムによって形成される。新たなブロックの承認は、ブロック内部に記録された取引が系全体で合意されたことを示す。 In a blockchain, transaction information (transactions) between participants is organized in units called "blocks", and each block is linked together and managed in chronological order. New block approvals are formed by consensus algorithms in distributed networks such as Proof of Work. Approval of a new block indicates that the transactions recorded within the block have been agreed across the system.

このブロックチェーンを用いて管理される一連の取引情報の帳簿を「分散台帳」と呼び、ネットワークに参加する各端末は同一の分散台帳を保持している。近年では、分散台帳に高度なスクリプトコードを登録し、スクリプトコードの実行とその結果についても合意を得るブロックチェーン基盤技術も開発されている。例えばEthereumと呼ばれるブロックチェーン基盤は、トランザクションを入力としてスクリプトコードを実行し、その実行結果をツリー構造のキーバリュー型ストア(ステートDBと呼ぶ)に格納し、その時のストアの代表値もブロックに記録する分散台帳を持つ。このようにブロックチェーン上に登録され、各端末に登録および実行されるスクリプトコードは「スマートコントラクト」と呼ばれている。 A series of transaction information ledger managed using this blockchain is called a "distributed ledger", and each terminal participating in the network holds the same distributed ledger. In recent years, blockchain-based technology has also been developed that registers advanced script code on a distributed ledger and obtains consensus on the execution of the script code and its results. For example, the blockchain platform called Ethereum executes script code with transactions as input, stores the execution results in a tree-structured key-value store (called a state DB), and records the representative value of the store at that time in a block. have a distributed ledger that Script code that is registered on the blockchain in this way and that is registered and executed on each terminal is called a "smart contract."

スマートコントラクト型のブロックチェーンは、各ブロックと、そのブロック時点でスマートコントラクトのステートDBとが対応づけて管理されている(非特許文献1)。 In a smart contract type blockchain, each block is managed in association with the state DB of the smart contract at the time of the block (Non-Patent Document 1).

「JavaScript API・ethereum/wiki Wiki・GitHub」、https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-methods"JavaScript API/ethereum/wiki Wiki/GitHub", https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-methods

ブロックチェーンのデータ構造上、ブロック番号を指定し、そのブロック時点のステートを参照することは容易である。しかしながら、当該ブロックのステートの値が、過去のどのブロックでどのように遷移したのかを知ることは困難である。特に、情報のトレーサビリティを確保するという観点において、この問題は重要である。 Due to the data structure of the blockchain, it is easy to specify the block number and refer to the state at the time of that block. However, it is difficult to know how the value of the state of the block in question transitioned in which block in the past. This problem is particularly important from the viewpoint of ensuring the traceability of information.

例えば、ステートのある値の変化を追跡する等の高度な探索・追跡を行う場合、RDBMS等の外部データベースを用意して、ブロックチェーンから抽出した全てのデータを外部データベースに落とし込み、外部データベース上でインデックスを構築し所望のデータを探索・追跡する方法が考えられる。しかしながら、外部データベースを用いた探索システムを構築および維持することは、一般ユーザにとって高いコストを要することになる。 For example, when performing advanced search/tracking such as tracking changes in values in a state, prepare an external database such as RDBMS, drop all the data extracted from the blockchain into the external database, and A method of building an index to search and track desired data is conceivable. However, building and maintaining a search system using an external database requires high costs for general users.

本発明は、上記課題を鑑みてなされたものであり、本発明の目的は、ブロックチェーン上で、データの履歴を容易に追跡することを可能とする技術を提供することにある。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a technology that enables easy tracing of data history on a blockchain.

上記目的を達成するため、本発明の一態様は、利用者端末と、承認端末とを備えるブロックチェーンシステムであって、前記利用者端末は、スマートコントラクトの変数の値を更新するトランザクションを発行するトランザクション発行部を備え、前記承認端末は、前記トランザクションを含むブロックを生成するとともに前記変数の値を更新し、前記ブロックと、前記変数の値を更新した当該ブロックの更新ブロック番号とを前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部を備える。 To achieve the above object, one aspect of the present invention is a blockchain system comprising a user terminal and an approval terminal, wherein the user terminal issues a transaction to update the value of a smart contract variable. a transaction issuing unit, wherein the approval terminal generates a block containing the transaction and updates the value of the variable; It has a block generator that reflects it in the distributed ledger of the terminal of the system.

本発明の一態様は、ブロックチェーンシステムにおいてトランザクションを承認する承認端末であって、スマートコントラクトの変数の値を更新するトランザクションを受信する受信部と、前記トランザクションを含むブロックを生成するとともに前記変数の値を更新し、前記ブロックと、前記変数の値を更新した当該ブロックの更新ブロック番号とを前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部と、を備える。 One aspect of the present invention is an approval terminal that approves a transaction in a blockchain system, comprising: a receiving unit that receives a transaction that updates a value of a variable of a smart contract; a block that includes the transaction; and a block generation unit that updates a value and reflects the block and the update block number of the block whose value of the variable is updated to a distributed ledger of the terminal of the blockchain system.

本発明の一態様は、ブロックチェーンシステムにおける利用者端末であって、ブロックチェーンの分散台帳と、スマートコントラクトの変数の値を更新するトランザクションを発行するトランザクション発行部と、前記分散台帳から前記変数の値が更新されたブロックの更新ブロック番号を取得し、前記更新ブロック番号から算出される検索ブロック番号を指定して、前記検索ブロック番号の時点のブロックにおける前記スマートコントラクトの変数の値および更新ブロック番号を、前記分散台帳から取得する履歴検索部と、を備える。 One aspect of the present invention is a user terminal in a blockchain system, comprising a blockchain distributed ledger, a transaction issuing unit that issues a transaction that updates the value of a smart contract variable, and Acquire the update block number of the block whose value has been updated, specify the search block number calculated from the update block number, and obtain the value of the smart contract variable and the update block number in the block at the time of the search block number from the distributed ledger.

本発明の一態様は、ブロックチェーンの履歴を管理する履歴管理方法であって、利用者端末は、スマートコントラクトの変数の値を更新するトランザクションを発行するトランザクション発行ステップを行い、承認端末は、前記トランザクションを含むブロックを生成し、前記変数の値を更新する生成ステップと、前記ブロックと、前記変数の値を更新した当該ブロックの更新ブロック番号とを、ブロックチェーンネットワークに接続された端末の分散台帳に反映させる同期ステップとを行う。 One aspect of the present invention is a history management method for managing blockchain history, wherein a user terminal performs a transaction issuing step of issuing a transaction for updating the value of a variable of a smart contract, and an approval terminal performs the A generation step of generating a block containing a transaction and updating the value of the variable, and storing the block and the update block number of the block that updated the value of the variable in a distributed ledger of terminals connected to a blockchain network. and a synchronization step to reflect the

本発明の一態様は、上記承認端末として、コンピュータを機能させることを特徴とするスマートコントラクト登録プログラムである。 One aspect of the present invention is a smart contract registration program characterized by causing a computer to function as the approval terminal.

本発明によれば、ブロックチェーン上で、データの履歴を容易に追跡することを可能とする技術を提供することができる。 ADVANTAGE OF THE INVENTION According to this invention, the technique which makes it possible to trace the history of data easily on a block chain can be provided.

本発明の実施形態に係るブロックチェーンシステムの全体構成を示す図である。1 is a diagram showing the overall configuration of a blockchain system according to an embodiment of the present invention; FIG. 分散台帳の構成を示す図である。It is a figure which shows the structure of a distributed ledger. ブロック発行部の構成を示す構成図である。4 is a configuration diagram showing the configuration of a block issuing unit; FIG. ステートDBの更新ブロック番号の設定方法を説明する説明図である。FIG. 10 is an explanatory diagram for explaining a method of setting an update block number of a state DB; ブロック生成および履歴検索を示すシーケンス図である。FIG. 10 is a sequence diagram showing block generation and history retrieval; トランザクションの一例を示す図である。FIG. 4 is a diagram showing an example of a transaction; FIG.

以下、本発明の実施の形態について、図面を参照して説明する。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本実施形態のブロックチェーンシステムの全体構成を示す図である。本実施形態のブロックチェーンは、スマートコントラクト型ブロックチェーンであって、ブロックチェーン基盤技術の1つであるEthereumを用いる。Ethereumは、ブロックチェーンを、状態遷移を記録する分散台帳として用いるためのアプリケーション開発プラットフォームである。ただし、本願発明は、Ethereumに限定されるものではなく、Ethereum以外のブロックチェーンに用いてもよい。 FIG. 1 is a diagram showing the overall configuration of the blockchain system of this embodiment. The blockchain of this embodiment is a smart contract type blockchain, and uses Ethereum, which is one of the blockchain base technologies. Ethereum is an application development platform for using blockchain as a distributed ledger that records state transitions. However, the present invention is not limited to Ethereum, and may be used for blockchains other than Ethereum.

図1に示すブロックチェーンシステムは、利用者端末1と、承認端末2とを備える。これらの端末1、2は、P2Pネットワークであるブロックチェーンネットワーク4(以下、「ネットワーク」という)に自律分散的に接続される。なお、ネットワーク4には、図示する端末1、2の他にも、複数の端末が接続される。例えば、複数の利用者端末1、および、複数の承認端末2が接続されていてもよい。ネットワーク4に接続される端末は、後述する分散台帳11、ブロックチェーン制御部12およびトランザクション発行部13を備え、分散台帳11に記録されたデータおよびトランザクションを相互に検証し、系を維持している。 The blockchain system shown in FIG. 1 has a user terminal 1 and an approval terminal 2 . These terminals 1 and 2 are connected to a block chain network 4 (hereinafter referred to as "network"), which is a P2P network, in an autonomous distributed manner. A plurality of terminals are connected to the network 4 in addition to the terminals 1 and 2 shown in the figure. For example, multiple user terminals 1 and multiple approval terminals 2 may be connected. A terminal connected to the network 4 includes a distributed ledger 11, a blockchain control unit 12, and a transaction issuing unit 13, which will be described later, and mutually verifies the data and transactions recorded in the distributed ledger 11 to maintain the system. .

利用者端末1は、ブロックチェーンおよびスマートコントラクトを利用する利用者が使用する端末(ノード)である。利用者端末1は、分散台帳11と、ブロックチェーン制御部12と、トランザクション発行部13と、履歴検索部14とを備える。 The user terminal 1 is a terminal (node) used by a user who uses blockchain and smart contracts. The user terminal 1 includes a distributed ledger 11 , a blockchain control unit 12 , a transaction issuing unit 13 and a history search unit 14 .

分散台帳11には、ブロックチェーン制御部12を介して、ネットワーク4に接続された全ての端末と緩やかに同期することによって、リアルタイムに近い形で最新状態のブロックチェーンが記憶されている。本実施形態の分散台帳11には、ブロックチェーンと、ブロックチェーンで管理されるデータ集合とが記憶されている。 The distributed ledger 11 stores the latest state of the blockchain in near-real time by loosely synchronizing with all the terminals connected to the network 4 via the blockchain control unit 12 . A blockchain and a set of data managed by the blockchain are stored in the distributed ledger 11 of the present embodiment.

ブロックチェーン制御部12は、ネットワーク4に接続された端末と自律分散的に協調してブロックチェーンの系を維持する。ブロックチェーン制御部12は、分散台帳11にアクセスし、分散台帳11のブロックチェーンおよびデータ集合を読み出し、または、更新する。 The blockchain control unit 12 cooperates with terminals connected to the network 4 in an autonomous decentralized manner to maintain the blockchain system. The blockchain control unit 12 accesses the distributed ledger 11 and reads or updates the blockchain and data set of the distributed ledger 11 .

トランザクション発行部13は、トランザクションをネットワーク4に発行する。本実施形態では、トランザクション発行部13は、スマートコントラクトのステート(変数)の値を更新するトランザクションを発行する。 A transaction issuing unit 13 issues a transaction to the network 4 . In this embodiment, the transaction issuing unit 13 issues a transaction for updating the state (variable) value of the smart contract.

履歴検索部14は、自身の分散台帳11からスマートコントラクトのステートの値が更新されたブロックの更新ブロック番号を取得し、更新ブロック番号から算出される検索ブロック番号を指定して、検索ブロック番号の時点のブロックにおけるスマートコントラクトのステートの値および更新ブロック番号を、分散台帳11から取得する。履歴検索部14は、ブロックチェーン制御部12を介して、分散台帳11にアクセスする。 The history search unit 14 acquires the update block number of the block whose smart contract state value has been updated from its own distributed ledger 11, designates the search block number calculated from the update block number, and retrieves the search block number. Get the value of the state of the smart contract at the current block and the update block number from the distributed ledger 11 . The history search unit 14 accesses the distributed ledger 11 via the blockchain control unit 12 .

承認端末2は、例えばマイナーと呼ばれるトランザクションの検証者が使用する端末であって、ネットワーク4に送信されたトランザクションを収集し、正当性を確認後に、承認作業を通じてブロックを生成する。承認端末2は、分散台帳11と、ブロックチェーン制御部12と、トランザクション発行部13と、ブロック発行部15とを備える。承認端末2の分散台帳11、ブロックチェーン制御部12およびトランザクション発行部13は、利用者端末1の分散台帳11、ブロックチェーン制御部12およびトランザクション発行部13と同様である。 The approval terminal 2 is a terminal used by, for example, a transaction verifier called a miner, collects transactions sent to the network 4, verifies their validity, and generates blocks through approval work. The approval terminal 2 includes a distributed ledger 11 , a blockchain control unit 12 , a transaction issuing unit 13 and a block issuing unit 15 . The distributed ledger 11 , blockchain control unit 12 and transaction issuing unit 13 of the approval terminal 2 are the same as the distributed ledger 11 , blockchain control unit 12 and transaction issuing unit 13 of the user terminal 1 .

ブロック発行部15は、ネットワーク4上に発行されたトランザクションを検証し、Proof of Workなどのブロック生成のためのコンセンサスアルゴリズム(合意アルゴリズム)に従い、ブロックの生成を試みる。 The block issuing unit 15 verifies transactions issued on the network 4 and tries to generate blocks according to a consensus algorithm for block generation such as Proof of Work.

図2は、承認端末2が備えるブロック発行部15の構成を示す構成図である。図示するブロック発行部15は、コンセンサス実行部151と、トランザクション検証部152と、ブロック生成部153とを備える。 FIG. 2 is a configuration diagram showing the configuration of the block issuing unit 15 provided in the approval terminal 2. As shown in FIG. The illustrated block issuing unit 15 includes a consensus executing unit 151 , a transaction verifying unit 152 , and a block generating unit 153 .

コンセンサス実行部151は、ハッシュ演算などコンセンサス(合意)に必要な計算を実施する。コンセンサスアルゴリズムは、ビットコインで用いられているProof of Work以外にも、所持コイン量をリソースとしたProof of Stake、ビザンチン故障における合意アルゴリズムであるPBFTなど、その他のブロック生成のためのコンセンサスアルゴリズムを用いても良い。 The consensus execution unit 151 performs calculations necessary for consensus (agreement) such as hash calculation. In addition to Proof of Work used in Bitcoin, the consensus algorithm uses other consensus algorithms for block generation, such as Proof of Stake, which uses the amount of owned coins as a resource, and PBFT, which is a consensus algorithm for Byzantine failures. can be

トランザクション検証部152は、ネットワーク4よりトランザクションを受け取ると、受け取ったトランザクションの電子署名の正当性などのトランザクションの検証を行う。 Upon receiving a transaction from the network 4, the transaction verification unit 152 verifies the transaction such as the legitimacy of the electronic signature of the received transaction.

ブロック生成部153は、所定の時間内にネットワーク4上で発行されたトランザクションをまとめて1つのブロックを生成する。すなわち、ブロック生成部153は、トランザクション検証部152による検証に成功した場合、当該トランザクションを含むブロックを生成し、ネットワーク4に接続される全ての端末の分散台帳11に生成したブロックを反映させる。 The block generation unit 153 generates one block by collecting transactions issued on the network 4 within a predetermined period of time. That is, when the transaction verification unit 152 succeeds in verification, the block generation unit 153 generates a block including the transaction, and reflects the generated block in the distributed ledger 11 of all terminals connected to the network 4 .

本実施形態のブロック生成部153は、スマートコントラクトのステート(変数)の値を更新するトランザクションを含むブロックを生成するとともに前記ステートの値を更新し、前記ブロックと、前記ステートの値を更新した当該ブロックの更新ブロック番号とをブロックチェーンシステムの端末の分散台帳に反映させる。 The block generation unit 153 of this embodiment generates a block including a transaction that updates the value of the state (variable) of the smart contract, updates the value of the state, and updates the value of the state (variable) of the smart contract. The updated block number of the block is reflected in the distributed ledger of the terminal of the blockchain system.

具体的には、ブロック生成部153は、スマートコントラクトのステートの値を更新するトランザクションに基づいて、自身の分散台帳11のデータ集合の1つであるステートDBを更新し、更新後のステートDBのハッシュ値を、生成するブロックのブロックヘッダに設定する。すなわち、ブロック生成部153は、トランザクションに従って更新したステートの値と、更新を行った当該ブロックの更新ブロック番号とをステートDBに設定する。 Specifically, the block generation unit 153 updates the state DB, which is one of the data sets of its own distributed ledger 11, based on the transaction that updates the state value of the smart contract, and updates the state DB after the update. Set the hash value in the block header of the block to be generated. That is, the block generation unit 153 sets the value of the state updated according to the transaction and the update block number of the updated block in the state DB.

図3は、各端末の分散台帳11の構成を示す。本実施形態の分散台帳11は、複数のブロック111から構成されるブロックチェーンと、各ブロックに対応して管理されるデータ集合112とを備える。 FIG. 3 shows the configuration of the distributed ledger 11 of each terminal. The distributed ledger 11 of this embodiment comprises a block chain composed of a plurality of blocks 111 and a data set 112 managed corresponding to each block.

ブロック111は、ブロックヘッダ113、トランザクションリスト114などを有する。ブロックヘッダ113には、当該ブロックの時点の分散台帳11全体の要約が設定される。図示する例では、ブロックヘッダ113には、データ集合112のある時点のスナップショットとして、データ集合112の要約値(ステートDBのハッシュ値、トランザクション集合のハッシュ値など)が設定される。例えば、データ集合がマークルツリーなどのツリー構造で格納されている場合、要約値として、マークルツリーのルートハッシュが設定される。トランザクションリスト114は、当該ブロック111に含まれるトランザクションのリストである。 A block 111 has a block header 113, a transaction list 114, and the like. A summary of the entire distributed ledger 11 at the time of the block is set in the block header 113 . In the illustrated example, the block header 113 is set with a summary value of the data set 112 (state DB hash value, transaction set hash value, etc.) as a snapshot of the data set 112 at a certain point in time. For example, if the data set is stored in a tree structure such as a Merkle tree, the summary value is set to the root hash of the Merkle tree. The transaction list 114 is a list of transactions included in the block 111 concerned.

データ集合112は、その用途および目的は限定されない。図示する分散台帳11では、データ集合112として、ステートDBと、トランザクション集合DBとを備える。 Data set 112 is not limited in its use and purpose. The illustrated distributed ledger 11 includes a state DB and a transaction set DB as data sets 112 .

ステートDBは、あるブロックの時点でのスマートコントラクトのステート(変数)の値または状態を管理するためのDBである。また、ステートDBには、スマートコントラクトのバイトコードが格納される。本実施形態では、トークンというデータ単位でステートDBに情報が記録されている。ここでトークンとはスマートコントラクトで表現されるデータ構造であり、少なくとも「トークンID」と「所有者のアドレス」といったパラメータを持ち、トークンの移転が所有者の権限によってブロックチェーン上で管理されるデータを示す。すなわち、本実施形態のステートDBには、トークン毎に、スマートコントラクトのステート(例えば、所有者のアドレス等)の値が格納される。 A state DB is a DB for managing the values or states of smart contract states (variables) at the time of a certain block. Also, the state DB stores the bytecode of the smart contract. In this embodiment, information is recorded in the state DB in units of data called tokens. Here, a token is a data structure represented by a smart contract, which has at least parameters such as "token ID" and "owner's address", and data whose transfer of the token is managed on the blockchain by the authority of the owner. indicates That is, the state DB of the present embodiment stores the value of the smart contract state (for example, the owner's address, etc.) for each token.

また、本実施形態のステートDBは、承認端末2のブロック生成部153により、トークン毎に、ステートの値が更新されたブロックのブロック番号である更新ブロック番号が更新後のステートの値と対応付けて設定される。ステートDBは、Key-Value Store(KVS)として機能し、トークンを一意に指定する識別情報(例えば、トークンID)が入力されると、当該トークンのステートの値および更新ブロック番号を出力する。 In the state DB of this embodiment, the block generation unit 153 of the approval terminal 2 associates the updated block number, which is the block number of the block whose state value is updated, with the updated state value for each token. is set. The state DB functions as a Key-Value Store (KVS), and when identification information (for example, token ID) that uniquely specifies a token is input, it outputs the state value and update block number of the token.

なお、Ethereumでは、スマートコントラクトのバイトコードを、分散台帳11(ステートDB)に登録すると、当該スマートコントラクトを示す識別情報が付与される。識別情報に対して、トランザクションを送信することができるため、スマートコントラクトの識別情報はアドレスとも呼ばれる。ユーザのアドレスへの送金との違いは、スマートコントラクトのアドレス宛てにトランザクションを送信すると、当該スマートコントラクトが実行されることである。 In Ethereum, when the bytecode of a smart contract is registered in the distributed ledger 11 (state DB), identification information indicating the smart contract is given. A smart contract's identity is also called an address, as transactions can be sent to it. The difference from sending money to a user's address is that sending a transaction to a smart contract's address will cause the smart contract to be executed.

トランザクション集合DBは、あるブロックの時点でのトランザクションの集合を示すDBである。トランザクションの集合は、あるブロックの時点での全てのトランザクションによって構成されるマークルツリーを意味する。 A transaction set DB is a DB that indicates a set of transactions at the time of a certain block. A set of transactions means a Merkle tree composed of all transactions at the time of a certain block.

次に、承認端末2が、ステートDBのステートの値を更新する際に、更新時点の更新ブロック番号を、当該ステートに付与する処理を説明する。 Next, a process will be described in which the approval terminal 2 assigns an update block number at the time of update to the state when updating the value of the state in the state DB.

図4は、更新ブロック番号をステートの値に付与する処理を説明するための模式図である。図示する例では、各端末の分散台帳11には、#26001番までのブロックが登録されているものとする。 FIG. 4 is a schematic diagram for explaining the process of assigning update block numbers to state values. In the illustrated example, it is assumed that blocks up to #26001 are registered in the distributed ledger 11 of each terminal.

本実施形態の分散台帳11には、前述のとおり、ブロックと、ステートDBとが対応付けて保持されている。図示する例では、#25768のブロックのステートDB51と、#25770のブロックのステートDB52と、#26000のステートDB53と、#26001のステートDB54とを示している。 As described above, the distributed ledger 11 of the present embodiment stores blocks and state DBs in association with each other. In the illustrated example, the state DB 51 of block #25768, the state DB 52 of block #25770, the state DB 53 of #26000, and the state DB 54 of #26001 are shown.

図示する各ステートDBは、トークン毎に、トークンIDと、所有者アドレスと、更新ブロック番号とを有する。本実施形態では、ステートのキーとしてトークンIDを用いるが、ステートのキーはトークンIDに限定されない。また、トークンは、代替不可能なトークン(Non-Fungible Token)であっても、代替可能なトークン(Fungible Token)であってもよい。 Each state DB shown has a token ID, an owner address, and an update block number for each token. In this embodiment, the token ID is used as the state key, but the state key is not limited to the token ID. Also, the token may be either a non-fungible token or a fungible token.

所有者アドレスは、ステート(変数)である。所有者アドレスは、対応するブロックの時点における、トークンの所有者のアドレスが設定される。更新ブロック番号には、トークンの所有者が更新(変更)された際のブロック番号が設定される。 The owner address is a state (variable). The owner address is set to the address of the token owner at the time of the corresponding block. The update block number is set to the block number when the owner of the token is updated (changed).

例えば、#25768のステートDB51を見ると、トークンID:0005については、所有者は利用者Cで、所有者が利用者Cに更新されたトランザクションを含む更新ブロック番号は#25007であることがわかる。また、トークンID:0006については、所有者は利用者Dで、所有者が利用者Dに更新されたトランザクションを含む更新ブロック番号は#24991であることがわかる。 For example, looking at the state DB 51 of #25768, for token ID: 0005, the owner is user C, and the update block number containing the transaction updated by user C is #25007. . For token ID: 0006, the owner is user D, and the updated block number including the transaction updated by user D is #24991.

次に、ブロック#25769では、当該ブロックに含まれるトランザクションにより、トークンID:0005および0006の所有者アドレスは更新されないものとする。この場合、図示しないステートDBのトークンID:0005および0006の更新ブロック番号には、直前のブロック#25768の更新ブロック番号に設定されたブロック番号が引き続き設定されている。また、トークンID:0005、0006の所有者アドレスには、直前のブロックの所有者アドレスに設定されたアドレスが引き続き設定されている。 Next, in block #25769, it is assumed that the owner addresses of token IDs: 0005 and 0006 are not updated by the transactions included in that block. In this case, the update block numbers of the token IDs 0005 and 0006 of the state DB (not shown) continue to be the block numbers set to the update block number of the previous block #25768. Also, the owner addresses of token IDs: 0005 and 0006 are still set to the addresses set as the owner addresses of the previous block.

そして、ブロック#25770に含まれるトランザクションにより、トークンID:0005および0006の所有者アドレスが更新される。この場合、承認端末2は、トークンID:0005および0006の所有者アドレスを更新するとともに、更新ブロック番号を更新する。具体的には、承認端末2は、当該ブロックのブロック番号(#25770)を、トークンID:0005および0006の更新ブロック番号に設定する。 Then, the transaction contained in block #25770 updates the owner addresses of token IDs: 0005 and 0006. In this case, the approval terminal 2 updates the owner addresses of the token IDs: 0005 and 0006 and updates the update block number. Specifically, the approval terminal 2 sets the block number (#25770) of the block to the updated block number of the token IDs: 0005 and 0006.

そして、ブロック#25771から#25999では、各ブロックに含まれるトランザクションにより、トークンID:0005および0006の所有者アドレスは更新されないものとする。この場合、直前のブロックの更新ブロック番号に設定されたブロック番号が、引き続き設定されている。すなわち、ブロック#25771から#25999のステートDBでは、トークンID:0005、0006については、#25770のステートDB52と同じ所有者アドレスおよび更新ブロック番号が引き続き設定されている。 In blocks #25771 to #25999, the owner addresses of token IDs: 0005 and 0006 are not updated by the transactions included in each block. In this case, the block number set as the update block number of the previous block is still set. That is, in the state DB of blocks #25771 to #25999, the same owner address and update block number as in the state DB 52 of #25770 are set for token IDs: 0005 and 0006.

そして、ブロック#26000に含まれるトランザクションにより、トークンID:0005の所有者アドレスが更新される。この場合、承認端末2は、トークンID:0005の所有者アドレスを更新するとともに、更新ブロック番号を更新する。具体的には、承認端末2は、当該ブロックのブロック番号(#26000)を、トークンID:0005更新ブロック番号に設定する。なお、トークンID:0006については、承認端末2は、直前のブロックと同じ所有者アドレスおよび更新ブロック番号を設定する。 Then, the transaction included in block #26000 updates the owner address of token ID: 0005. In this case, the approval terminal 2 updates the owner address of token ID: 0005 and updates the update block number. Specifically, the approval terminal 2 sets the block number (#26000) of the block to the token ID: 0005 update block number. For token ID: 0006, the approval terminal 2 sets the same owner address and update block number as the previous block.

このように、本実施形態では、キー(トークンID)に対するステート(所有者アドレス)の値とともに、更新ブロック番号を設定する。これにより、本実施形態では、利用者端末1は、最新のステートDB54を参照すると、最後に変更があった更新ブロック番号を取得することができる。例えば、トークンID:0006の場合は#25770を取得することができる。 Thus, in this embodiment, the update block number is set together with the state (owner address) value for the key (token ID). As a result, in this embodiment, the user terminal 1 can obtain the latest updated block number by referring to the latest state DB 54 . For example, for token ID: 0006, #25770 can be obtained.

そして、利用者端末1は、更新ブロック番号から算出される検索ブロック番号を指定して、検索ブロック番号で指定された所有者アドレスおよび更新ブロック番号を取得する。例えば、検索ブロック番号は、更新ブロック番号から1減算したブロック番号とする。例えば、トークンID:0006の場合は更新ブロック番号#25770から1減算した検索ブロック番号#25769を指定して当該ブロック番号に設定された所有者アドレス(利用者D)および更新ブロック番号(#24991)を取得する。このように、本実施形態では、ステートの値に変更があったブロックの付近のブロックのみを辿ることで、探索コストを大幅に低減し、容易にステートの値の変更履歴を取得することができる。 Then, the user terminal 1 specifies a search block number calculated from the update block number, and acquires the owner address and update block number specified by the search block number. For example, the search block number is the block number obtained by subtracting 1 from the update block number. For example, in the case of token ID: 0006, specify the search block number #25769 that is obtained by subtracting 1 from the update block number #25770, and specify the owner address (user D) and update block number (#24991) set to that block number. to get As described above, in this embodiment, by tracing only the blocks near the block in which the state value has been changed, the search cost can be greatly reduced, and the change history of the state value can be easily obtained. .

図5は、本実施形態のブロック生成および履歴検索を示すシーケンス図である。 FIG. 5 is a sequence diagram showing block generation and history retrieval according to this embodiment.

図示する処理では、利用者Aが利用者Bにトークンを移動(譲渡)し、利用者Bが利用者Aから受け取ったトークンの履歴を探索する処理を示す。 In the illustrated process, user A transfers (transfers) a token to user B, and user B searches the history of the token received from user A. FIG.

利用者Aの利用者端末1Aは、所定のトークンを利用者Aから利用者Bに移動するためのトランザクションを生成し、を発行する(S11)。具体的には、利用者端末1Aはトランザクションをネットワーク4上にブロードキャストする。これにより、トランザクションは、ネットワーク4に接続された全ての端末に伝搬される。 The user terminal 1A of the user A generates and issues a transaction for transferring a predetermined token from the user A to the user B (S11). Specifically, the user terminal 1A broadcasts the transaction over the network 4. FIG. The transaction is thereby propagated to all terminals connected to the network 4 .

図6は、S11のトランザクションの一例を示す図である。図示するトランザクションは、宛先と、支払額と、データと、電子署名とを有する。宛先には、スマートコントラクトのアドレスが設定される。支払額には、スマートコントラクトを実行するために支払われる金額(手数料)が設定される。 FIG. 6 is a diagram showing an example of the transaction of S11. The illustrated transaction has a destination, a payment amount, data, and an electronic signature. The address of the smart contract is set as the destination. The payment amount is set to the amount (commission) to be paid for executing the smart contract.

データには、スマートコントラクト内の「指定されたアドレスへ所定のトークンの所有権を移動する」機能を提供する関数を実行することを指定するデータが設定される。なお、引数としてトークンのIDと利用者Bのアドレスを指定する。電子署名には、トランザクションの発行者である利用者Aの秘密鍵で当該トランザクションが署名された署名値が設定される。 The data is populated with data that specifies executing a function that provides the ability to "move ownership of a given token to a specified address" within the smart contract. Note that the ID of the token and the address of user B are specified as arguments. A signature value obtained by signing the transaction with the secret key of user A who is the issuer of the transaction is set in the electronic signature.

そして、承認端末2(ブロック発行部15)は、S11で送信されたトランザクションを検証(マイニング)する(S12)。そして、承認端末2は、当該トランザクションを、所定の時間内に発生した他のトランザクションとまとめて1つのブロックを生成する。当該ブロックは、ナンスのマイニングを経て自身の分散台帳11のブロックチェーンに追加される(S13)。承認端末2がブロックの生成に成功することにより、S11で送信されたトランザクションが確定(承認)される。 Then, the approval terminal 2 (block issuing unit 15) verifies (mines) the transaction transmitted in S11 (S12). Then, the approval terminal 2 generates one block by combining the transaction with other transactions that occurred within a predetermined period of time. The block is added to the blockchain of its own distributed ledger 11 through nonce mining (S13). When the approval terminal 2 succeeds in generating the block, the transaction transmitted in S11 is confirmed (approved).

ここで、承認端末2は、S11のトランザクションに基づいて、自身の分散台帳11のデータ集合の各DBを更新し、更新後の各DBのハッシュ値を、生成するブロックのブロックヘッダに設定する。 Here, the approval terminal 2 updates each DB in the data set of its own distributed ledger 11 based on the transaction of S11, and sets the hash value of each DB after updating to the block header of the generated block.

また、承認端末2は、データ集合のステートDBを更新する際に、S11のトランザクションに従って、所有権を移動したトークンの所有者アドレスを、利用者Aのアドレスから利用者Bのアドレスに更新・変更する。また、本実施形態では、承認端末2は、所有者アドレスを更新した当該ブロックのブロック番号を、ステートDBに記憶する。例えば、図4のステートDB54に示すように、所有権を移動するトークンのトークンIDが0005で、生成するブロックが#26000の場合、承認端末2は、所有者アドレスに利用者Bのアドレスを設定し、更新ブロック番号に当該ブロックの番号#26000をステートDBに設定する。 Also, when updating the state DB of the data set, the approval terminal 2 updates/changes the owner address of the token whose ownership has been transferred from the address of user A to the address of user B according to the transaction of S11. do. Also, in this embodiment, the approval terminal 2 stores the block number of the block whose owner address has been updated in the state DB. For example, as shown in the state DB 54 of FIG. 4, when the token ID of the token whose ownership is to be transferred is 0005 and the block to be generated is #26000, the approval terminal 2 sets the address of user B as the owner address. and set the block number #26000 as the update block number in the state DB.

そして、承認端末2は、更新後のステートDBのハッシュ値を、生成するブロックのブロックヘッダに設定する。なお、S13は、ネットワークに接続された全ての端末のうち、最も早くブロックの生成に成功した端末によって行われる処理である。 Then, the approval terminal 2 sets the hash value of the updated state DB in the block header of the generated block. Note that S13 is a process performed by the terminal that has succeeded in generating the block earliest among all the terminals connected to the network.

そして、端末間のゆるやかな同期により、S11で送信されたトランザクションを含むブロックが、ネットワーク4に接続された全ての端末の分散台帳11に反映される(S14、S15)。すなわち、全ての端末のブロックチェーン制御部12は、自身が保持する分散台帳11に、S11のトランザクションを含むブロックを追加する。また、全ての端末のブロックチェーン制御部12は、承認端末2と同様に、ブロックに含まれるトランザクションに基づいて、自身の分散台帳11のデータ集合のステートDBを更新する。 Then, by loose synchronization between terminals, the block containing the transaction sent in S11 is reflected in the distributed ledger 11 of all terminals connected to the network 4 (S14, S15). That is, the blockchain control units 12 of all terminals add a block including the transaction of S11 to the distributed ledger 11 held by themselves. In addition, the blockchain control units 12 of all terminals update the state DB of the data set of their own distributed ledger 11 based on the transactions included in the blocks, like the approval terminal 2 .

次に、トークンの所有権となった利用者Bが、利用者Aから譲渡されたトークンの過去の履歴を探索する場合、S16以降の処理を行う。具体的には、利用者端末1Bは、最新のブロックにおける、前記トークンの所有者アドレス(ステートの値)を自身の分散台帳に問合せ(S16)、分散台帳から最新のブロックの所有者アドレスと、更新ブロック番号とを取得する(S17)。 Next, when User B, who has become the owner of the token, searches for the past history of the token transferred from User A, the process from S16 onwards is performed. Specifically, the user terminal 1B queries its own distributed ledger for the owner address (state value) of the token in the latest block (S16), and from the distributed ledger, the owner address of the latest block, An update block number is acquired (S17).

例えば、最新ブロックが図4に示す#26001で、問い合わせ対象のトークンIDが0005の場合、利用者端末1Bは、自身の分散台帳のステートDB54を参照し、所有者として利用者Bのアドレスと、更新ブロック番号として#26000とを取得する。これにより、利用者Bは、現在のトークンの所有者が自分であり、また、所有者の更新が#26000のブロックで行われたことを確認することができる。 For example, when the latest block is #26001 shown in FIG. 4 and the token ID to be queried is 0005, the user terminal 1B refers to the state DB 54 of its own distributed ledger, and the address of the user B as the owner, Get #26000 as update block number. As a result, user B can confirm that he is the current token owner and that the owner has been updated in block #26000.

そして、利用者Bは、トークンの過去の履歴を検索したい場合、S18およびS19の処理を繰り返し行う。すなわち、利用者端末1Bは、S17で取得した更新ブロック番号に基づいて検索ブロック番号を算出する。ここでは、更新ブロック番号から「1」減算したブロック番号を検索ブロック番号とする。そして、利用者端末1Bは、検索ブロック番号を指定し、検索ブロック番号における、トークンの所有者アドレスを自身の分散台帳に問合せ(S18)、分散台帳から指定したブロックにおける所有者アドレスと、更新ブロック番号とを取得する(S19)。 Then, when user B wants to search the past history of the token, user B repeats the processes of S18 and S19. That is, the user terminal 1B calculates the search block number based on the update block number obtained in S17. Here, the block number obtained by subtracting "1" from the update block number is used as the search block number. Then, the user terminal 1B designates the search block number, inquires of its own distributed ledger about the owner address of the token in the search block number (S18), the owner address in the block specified from the distributed ledger, and the update block number is acquired (S19).

例えば、図4のステートDBにおいて、S17取得した更新ブロック番号が#26000でトークンIDが0005の場合、利用者端末1Bは、#26000から「1」減算したブロック番号#259999を指定して、分散台帳に問い合わせる。#259999のステートDBは、図4に示していないが、トークンID:0005に対する更新は#25771から#259999までは行われていないため、トークンID:0005に関する#259999のステートは、#25770のステートDB52と同じである。したがって、利用者端末1Bは、#259999の分散台帳のステートDBを参照し、所有者アドレスとして利用者Aのアドレス、および、更新ブロック番号として#25770を取得する。これにより、利用者Bは、トークンID:0005の前の所有者が利用者Aであり、また、利用者Aへの所有者の変更が#25770のブロックで行われたことを確認することができる。 For example, in the state DB of FIG. 4, if the update block number acquired in S17 is #26000 and the token ID is 0005, the user terminal 1B designates block number #259999 obtained by subtracting "1" from #26000, and distributes Query the ledger. Although the state DB of #259999 is not shown in Fig. 4, since no update for token ID: 0005 is performed from #25771 to #259999, the state of #259999 related to token ID: 0005 is the state of #25770 Same as DB52. Therefore, the user terminal 1B refers to the state DB of the distributed ledger #259999, and acquires the address of user A as the owner address and #25770 as the update block number. As a result, user B can confirm that the previous owner of token ID: 0005 was user A, and that the owner was changed to user A in block #25770. can.

そして、利用者端末1Bは、それ以前の過去の履歴を検索したい場合は、S18およびS19の処理を繰り返し行う。これにより、利用者Bは、トークンの過去の履歴を効率よく辿ることができる。 Then, if the user terminal 1B wishes to search for the past history before that, the user terminal 1B repeats the processes of S18 and S19. Thereby, the user B can efficiently trace the past history of the token.

以上説明した本実施形態では、利用者端末1と、承認端末2とを備えるブロックチェーンシステムであって、利用者端末1は、スマートコントラクトのステート(変数)の値を更新するトランザクションを発行するトランザクション発行部13を備え、承認端末2は、前記トランザクションを含むブロックを生成するとともに前記ステートの値を更新し、前記ブロックと、前記ステートの値を更新した当該ブロックの更新ブロック番号とをブロックチェーンシステムの端末の分散台帳11に反映させるブロック生成部153を備える。 In the embodiment described above, the blockchain system includes the user terminal 1 and the approval terminal 2, and the user terminal 1 issues a transaction to update the value of the state (variable) of the smart contract. An issuing unit 13 is provided, and the approval terminal 2 generates a block containing the transaction, updates the state value, and sends the block and an update block number of the block whose state value has been updated to the blockchain system. A block generation unit 153 is provided for reflecting on the distributed ledger 11 of the terminal.

このように、本実施形態では、各端末の分散台帳11のステートDBには、スマートコントラクトのステートの値が更新された時点で、更新のあったブロックの更新ブロック番号を、更新されたステートの値に付与する。これにより、利用者は、更新ブロック番号を辿ることで、過去の全てのブロックおよびトランザクションを参照することなく、分散台帳(ブロックチェーン)上で、データの履歴を容易に追跡することができる。すなわち、本実施形態では、スマートコントラクトのステートの値の過去の履歴および変遷を容易に取得することができる。 In this way, in this embodiment, when the state value of the smart contract is updated, the updated block number of the updated block is stored in the state DB of the distributed ledger 11 of each terminal. Give value. As a result, users can easily trace the history of data on the distributed ledger (blockchain) by tracing the update block number without referring to all past blocks and transactions. That is, in the present embodiment, it is possible to easily acquire the past history and transition of the value of the state of the smart contract.

また、本実施形態では、スマートコントラクトの利用者に対して、トレーサビリティを向上することができる。従来のステートDBでは、過去のどのブロックでステートの値が更新または変更されたかの情報は保持されていなく、ステートの値がどのブロックの時点で遷移したのかを利用者は知ることは容易ではない。従来では、変更のあったブロック番号を知るためには、全てのブロックまたはトランザクションを探索する必要があり、利用者にとって大きな負荷となっていた。これに対して、本実施形態では、ステートDBにステートの値の変化点として、ブロック生成時点(採掘時点)のブロック番号を追跡したいステートの値に付加することで、当該ステートのトレーサビリティを向上することができる。 Moreover, in this embodiment, traceability can be improved for smart contract users. In a conventional state DB, information on which block in the past the state value was updated or changed is not retained, and it is not easy for the user to know at which block the state value transitioned. Conventionally, in order to know the changed block number, it was necessary to search for all blocks or transactions, which was a heavy burden on the user. On the other hand, in this embodiment, as a change point of the state value in the state DB, the block number at the time of block creation (at the time of mining) is added to the value of the state to be tracked, thereby improving the traceability of the state. be able to.

なお、上記説明した利用者端末1および承認端末2は、例えば、CPU(Central Processing Unit、プロセッサ)と、メモリと、ストレージ(HDD:Hard Disk Drive、SSD:Solid State Drive)と、通信装置と、入力装置と、出力装置とを備える汎用的なコンピュータシステムを用いることができる。このコンピュータシステムにおいて、CPUがメモリ上にロードされた所定のプログラムを実行することにより、各装置の各機能が実現される。例えば、利用者端末1および承認端末2の各機能は、利用者端末1用のプログラムの場合は利用者端末1のCPUが、承認端末2用のプログラムの場合は承認端末2のCPUが、それぞれ実行することにより実現される。 The user terminal 1 and the approval terminal 2 described above are, for example, a CPU (Central Processing Unit, processor), a memory, a storage (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device, A general-purpose computer system with an input device and an output device can be used. In this computer system, each function of each device is realized by the CPU executing a predetermined program loaded on the memory. For example, each function of the user terminal 1 and the approval terminal 2 is executed by the CPU of the user terminal 1 in the case of the program for the user terminal 1, and by the CPU of the approval terminal 2 in the case of the program for the approval terminal 2. It is realized by executing

また、利用者端末1用のプログラムおよび承認端末2用のプログラムは、HDD、SSD、USBメモリ、CD-ROM、DVD-ROM、MOなどのコンピュータ読取り可能な記録媒体に記憶することも、ネットワークを介して配信することもできる。 In addition, the program for the user terminal 1 and the program for the approval terminal 2 can be stored in a computer-readable recording medium such as HDD, SSD, USB memory, CD-ROM, DVD-ROM, MO, etc. It can also be delivered via

また、本発明は上記実施形態に限定されるものではなく、その要旨の範囲内で数々の変形が可能である。 Moreover, the present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the gist of the present invention.

例えば、本実施形態では、承認端末2は、更新ブロック番号として、ステートの値が更新されたブロックのブロック番号を更新ブロック番号としてステートDBに設定した。しかしながら、更新ブロック番号の代わりに、検索用ブロック番号をステートDBに設定することとしてもよい。すなわち、承認端末2は、更新ブロック番号の代わりに、更新ブロック番号から「1」減算した検索ブロック番号をステートDBに設定することとしてもよい。この場合、利用者端末1は、ステートの過去の履歴を取得する際(図5のS18)に、更新ブロック番号から検索ブロック番号を算出することなく、分散台帳から取得した検索ブロック番号をそのまま用いて、過去の履歴を辿ることができる。 For example, in this embodiment, the approval terminal 2 sets the block number of the block whose state value has been updated in the state DB as the update block number. However, instead of the update block number, the search block number may be set in the state DB. That is, instead of the update block number, the approval terminal 2 may set the search block number obtained by subtracting "1" from the update block number in the state DB. In this case, when acquiring the past history of the state (S18 in FIG. 5), the user terminal 1 uses the search block number obtained from the distributed ledger as it is without calculating the search block number from the update block number. can trace past history.

また、本実施形態のステートDBは、図4に示すように1つのステート(所有者アドレス)を保持し、当該ステートに対応する1つの更新ブロック番号を保持することとした。しかしながら、ステートDBは複数のステートを保持することとしてもよい。この場合、複数のステートのそれぞれの追跡を行う場合、ステートDBは、各ステートごとに更新ブロック番号を備えるものとする。 Also, the state DB of this embodiment holds one state (owner address) as shown in FIG. 4, and holds one update block number corresponding to the state. However, the state DB may hold multiple states. In this case, when tracking each of a plurality of states, the state DB shall have an update block number for each state.

1 :利用者端末
2 :承認端末
11:分散台帳
12:ブロックチェーン制御部
13:トランザクション発行部
14:履歴検索部
15:ブロック発行部
151:コンセンサス実行部
152:トランザクション検証部
153:ブロック生成部
4 :ブロックチェーンネットワーク
1: User terminal 2: Approval terminal 11: Distributed ledger 12: Blockchain control unit 13: Transaction issuing unit 14: History search unit 15: Block issuing unit 151: Consensus execution unit 152: Transaction verification unit 153: Block generation unit 4 : Blockchain network

Claims (9)

利用者端末と、承認端末とを備えるブロックチェーンシステムであって、
前記利用者端末は、
スマートコントラクトの変数の値を更新するトランザクションを発行するトランザクション発行部を備え、
前記承認端末は、
前記トランザクションを含むブロックを生成するとともに前記変数の値を更新し、前記ブロックと、前記変数の値を更新した当該ブロックの更新ブロック番号とを前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部を備えること
を特徴とするブロックチェーンシステム。
A blockchain system comprising a user terminal and an approval terminal,
The user terminal is
Equipped with a transaction issuing unit that issues a transaction that updates the value of the smart contract variable,
The approval terminal,
Block generation that generates a block containing the transaction, updates the value of the variable, and reflects the block and an update block number of the block in which the value of the variable is updated to a distributed ledger of a terminal of the blockchain system. A blockchain system characterized by comprising a part.
請求項1記載のブロックチェーンシステムであって、
前記分散台帳は、前記変数の値をトークン毎に格納するステートデータベースを備え、
前記ブロック生成部は、前記トークン毎に前記更新ブロック番号を前記ステートデータベースに設定すること
を特徴とするブロックチェーンシステム。
The blockchain system according to claim 1,
The distributed ledger comprises a state database that stores the value of the variable for each token,
The block chain system, wherein the block generation unit sets the update block number in the state database for each token.
請求項1または2記載のブロックチェーンシステムであって、
前記利用者端末は、
自身の前記分散台帳から前記更新ブロック番号を取得し、前記更新ブロック番号から算出される検索ブロック番号を指定して、前記検索ブロック番号の時点のブロックにおける前記変数の値および更新ブロック番号を、自身の前記分散台帳から取得する履歴検索部を備えること
を特徴とするブロックチェーンシステム。
The blockchain system according to claim 1 or 2,
The user terminal is
Obtain the update block number from the distributed ledger of its own, specify the search block number calculated from the update block number, and store the value of the variable and the update block number in the block at the time of the search block number. A blockchain system characterized by comprising a history search unit that acquires from the distributed ledger of .
請求項1または2記載のブロックチェーンシステムであって、
前記ブロック生成部は、前記更新ブロック番号の代わりに、前記更新ブロック番号から算出される検索ブロック番号を、前記ブロックチェーンシステムの端末の前記分散台帳に反映させること
を特徴とするブロックチェーンシステム。
The blockchain system according to claim 1 or 2,
A blockchain system, wherein the block generation unit reflects a search block number calculated from the update block number in the distributed ledger of a terminal of the blockchain system, instead of the update block number.
ブロックチェーンシステムにおいてトランザクションを承認する承認端末であって、
スマートコントラクトの変数の値を更新するトランザクションを受信する受信部と、
前記トランザクションを含むブロックを生成するとともに前記変数の値を更新し、前記ブロックと、前記変数の値を更新した当該ブロックの更新ブロック番号とを前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部と、を備えること
を特徴とする承認端末。
An approval terminal that approves transactions in a blockchain system,
a receiver that receives a transaction that updates the value of a smart contract variable;
Block generation that generates a block containing the transaction, updates the value of the variable, and reflects the block and an update block number of the block in which the value of the variable is updated to a distributed ledger of a terminal of the blockchain system. and an approval terminal.
ブロックチェーンシステムにおける利用者端末であって、
ブロックチェーンの分散台帳と、
スマートコントラクトの変数の値を更新するトランザクションを発行するトランザクション発行部と、
前記分散台帳から前記変数の値が更新されたブロックの更新ブロック番号を取得し、前記更新ブロック番号から算出される検索ブロック番号を指定して、前記検索ブロック番号の時点のブロックにおける前記スマートコントラクトの変数の値および更新ブロック番号を、前記分散台帳から取得する履歴検索部と、を備えること
を特徴とする利用者端末。
A user terminal in a blockchain system,
blockchain distributed ledger,
a transaction issuing unit that issues a transaction that updates the value of a smart contract variable;
Acquire the update block number of the block in which the value of the variable has been updated from the distributed ledger, specify the search block number calculated from the update block number, and execute the smart contract in the block at the time of the search block number. A user terminal, comprising: a history search unit that acquires a value of a variable and an update block number from the distributed ledger.
ブロックチェーンの履歴を管理する履歴管理方法であって、
利用者端末は、
スマートコントラクトの変数の値を更新するトランザクションを発行するトランザクション発行ステップを行い、
承認端末は、
前記トランザクションを含むブロックを生成し、前記変数の値を更新する生成ステップと、
前記ブロックと、前記変数の値を更新した当該ブロックの更新ブロック番号とを、ブロックチェーンネットワークに接続された端末の分散台帳に反映させる同期ステップとを行うこと
を特徴とする履歴管理方法。
A history management method for managing the history of a blockchain,
The user terminal
Perform a transaction issuance step to issue a transaction that updates the value of the smart contract variable,
Approved terminal
a generating step of generating a block containing the transaction and updating the value of the variable;
A history management method, characterized by performing a synchronization step of reflecting the block and the update block number of the block in which the value of the variable is updated in a distributed ledger of terminals connected to a blockchain network.
請求項5に記載の承認端末として、コンピュータを機能させることを特徴とする履歴管理プログラム。 6. A history management program that causes a computer to function as the approval terminal according to claim 5. 請求項6に記載の利用者端末として、コンピュータを機能させることを特徴とする履歴管理プログラム。 7. A history management program that causes a computer to function as the user terminal according to claim 6.
JP2018213190A 2018-11-13 2018-11-13 Blockchain system, approval terminal, user terminal, history management method, and history management program Active JP7181455B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2018213190A JP7181455B2 (en) 2018-11-13 2018-11-13 Blockchain system, approval terminal, user terminal, history management method, and history management program
US17/293,583 US20220004562A1 (en) 2018-11-13 2019-10-30 Blockchain system, approval terminal, user terminal, history management method, and history management program
PCT/JP2019/042658 WO2020100602A1 (en) 2018-11-13 2019-10-30 Blockchain system, approval terminal, user terminal, history management method, and history management program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018213190A JP7181455B2 (en) 2018-11-13 2018-11-13 Blockchain system, approval terminal, user terminal, history management method, and history management program

Publications (2)

Publication Number Publication Date
JP2020080061A JP2020080061A (en) 2020-05-28
JP7181455B2 true JP7181455B2 (en) 2022-12-01

Family

ID=70731548

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018213190A Active JP7181455B2 (en) 2018-11-13 2018-11-13 Blockchain system, approval terminal, user terminal, history management method, and history management program

Country Status (3)

Country Link
US (1) US20220004562A1 (en)
JP (1) JP7181455B2 (en)
WO (1) WO2020100602A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
SG11201903533QA (en) * 2018-11-30 2019-05-30 Alibaba Group Holding Ltd Blockchain smart contract updates using decentralized decision
JP6915934B1 (en) 2019-12-26 2021-08-11 シビラ株式会社 Transaction delegation methods, transaction delegation systems, and computer programs
JP6797450B1 (en) 2020-06-04 2020-12-09 みんな電力株式会社 Electric power trading support system, electric power trading support method and program
KR102561341B1 (en) * 2021-11-12 2023-07-28 펜타시큐리티시스템 주식회사 Apparatus for data tracking in an edge cloud environment and method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018128723A (en) 2017-02-06 2018-08-16 株式会社日立製作所 Credibility management system and credibility management method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6095714A (en) * 1983-10-28 1985-05-29 Matsushita Electric Ind Co Ltd Manufacture of magnetic head
KR101849917B1 (en) * 2016-10-13 2018-05-31 주식회사 코인플러그 Method for providing certificate service based on smart contract and server using the same
WO2018154713A1 (en) * 2017-02-24 2018-08-30 日本電気株式会社 Information verification system, information verification device, method and program
WO2019194267A1 (en) * 2018-04-06 2019-10-10 日本電信電話株式会社 Blockchain system, registration terminal, approval terminal, smart contract registration method, and smart contract registration program
US20200143365A1 (en) * 2018-11-03 2020-05-07 International Business Machines Corporation Real-time monitoring of objects in blockchain networks
US11539527B2 (en) * 2019-05-29 2022-12-27 International Business Machines Corporation Peer node recovery via approximate hash verification

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018128723A (en) 2017-02-06 2018-08-16 株式会社日立製作所 Credibility management system and credibility management method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
中村 誠吾 外,ブロックチェーン システム設計,第1版,日本,株式会社リックテレコム,2018年08月02日,pp. 151-161
佐藤 聖,なるほどIoT新技術ブロックチェーン,Interface,日本,CQ出版株式会社,2018年08月01日, 第44巻 第8号,pp. 29--39
安坂 祐紀 外,プライバシーを考慮したブロックチェーンの取引者間事前合意プロトコル,CSS2018 コンピュータセキュリティシンポジウム2018論文集 [USB] ,日本,一般社団法人情報処理学会,2018年10月15日,Vol. 2018, No. 2,pp. 850--856

Also Published As

Publication number Publication date
US20220004562A1 (en) 2022-01-06
JP2020080061A (en) 2020-05-28
WO2020100602A1 (en) 2020-05-22

Similar Documents

Publication Publication Date Title
TWI694390B (en) Blockchain-based transaction processing method and device, and electronic equipment
TWI691919B (en) Blockchain-based transaction processing method and device, and electronic equipment
US10986177B2 (en) Systems and methods of self-forking blockchain protocol
JP7137077B2 (en) Blockchain system, approval terminal, user terminal, history management method, and history management program
JP7181455B2 (en) Blockchain system, approval terminal, user terminal, history management method, and history management program
US11973869B2 (en) Maintaining blocks of a blockchain in a partitioned blockchain network
US20220108285A1 (en) Methods and Systems for Object Validated Blockchain Accounts
CN108389129B (en) Transaction execution method and device based on block chain and electronic equipment
JP6939791B2 (en) Bulletin board information management system
Xu et al. A survey of blockchain consensus protocols
JP7157348B2 (en) Blockchain system, approval terminal, smart contract registration method, and smart contract registration program
KR102120703B1 (en) Apparatus for managing group of nodes which comprises transaction of dual signature based on group key on blockchain network and computing apparatus
JP2020519983A (en) System and method for parallel processing blockchain transactions
WO2018228973A1 (en) Improved hardware security module management
CN109598147B (en) Data processing method and device based on block chain and electronic equipment
US20190354968A1 (en) Utilization Management Method, Utilization Management System, and Node
EP3963824A1 (en) Methods and devices for recording work history and proving reputation in a blockchain network
JP2018101367A (en) Information processing system, information processing method, program and information processor
CN110599331A (en) Debt charging system, method, device and storage medium based on block chain
Dinh et al. A blueprint for interoperable blockchains
JP2020160526A (en) Data cooperation management method, data cooperation management system, and node
CN115619395A (en) Data processing method based on block chain and related equipment
JP7421443B2 (en) Data migration methods, data migration systems, and nodes
WO2021005751A1 (en) Data sharing system, management terminal, data sharing method, and data sharing program
Li et al. LVMT: An Efficient Authenticated Storage for Blockchain

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210204

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220412

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220524

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: 20221018

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20221031

R150 Certificate of patent or registration of utility model

Ref document number: 7181455

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150