WO2019194267A1 - ブロックチェーンシステム、登録端末、承認端末、スマートコントラクト登録方法、および、スマートコントラクト登録プログラム - Google Patents

ブロックチェーンシステム、登録端末、承認端末、スマートコントラクト登録方法、および、スマートコントラクト登録プログラム Download PDF

Info

Publication number
WO2019194267A1
WO2019194267A1 PCT/JP2019/014912 JP2019014912W WO2019194267A1 WO 2019194267 A1 WO2019194267 A1 WO 2019194267A1 JP 2019014912 W JP2019014912 W JP 2019014912W WO 2019194267 A1 WO2019194267 A1 WO 2019194267A1
Authority
WO
WIPO (PCT)
Prior art keywords
smart contract
transaction
block
abi
information
Prior art date
Application number
PCT/JP2019/014912
Other languages
English (en)
French (fr)
Inventor
大喜 渡邊
盛徳 大橋
滋 藤村
篤 中平
Original Assignee
日本電信電話株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to JP2020512316A priority Critical patent/JP7157348B2/ja
Priority to US17/045,671 priority patent/US11888985B2/en
Publication of WO2019194267A1 publication Critical patent/WO2019194267A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • 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

Definitions

  • the present invention relates to a technique for registering a smart contract in a block chain.
  • a mechanism that can guarantee reliability without requiring centralized management is spreading around digital virtual currency Bitcoin.
  • blockchain the reliability of the information exchanged is ensured by the consensus building process in the distributed network, and soundness is maintained by preventing fraud such as tampering and double use throughout the system. Be drunk.
  • transaction information (transactions) of virtual currency between participants is collected in units of “blocks”, and each block is managed in chronological order as a daisy chain. Approval of new blocks is formed by consensus algorithms in distributed networks such as Proof of Work. Approval of the new block indicates that the currency transaction recorded within the block has been agreed across the system.
  • a book of a series of transaction information managed using this block chain is called a “distributed ledger”, and each node (terminal) participating in the network holds the same distributed ledger.
  • distributed ledger A book of a series of transaction information managed using this block chain
  • each node (terminal) participating in the network holds the same distributed ledger.
  • blockchain infrastructure technology has been developed to obtain agreement on script code execution and results.
  • a blockchain infrastructure called Ethereum executes script code with transactions as input, stores the execution results in a tree-valued key-value type store (called world state or state DB), and the representative value of the store at that time is also
  • a distributed ledger is recorded in the block (Non-patent Document 1).
  • Non-Patent Document 2 discloses a technique for storing product information on a block chain at the time of manufacturing by using a single board computer that controls a 3D printer as a block chain node.
  • Non-Patent Document 3 discloses a system that detects the distribution of counterfeit goods by storing data on a block chain in a supply chain.
  • Non-Patent Document 2 and Non-Patent Document 3 in order to read data on the blockchain, it is necessary to access the smart contract registered on the distributed ledger using a dedicated application.
  • This dedicated application includes additional information necessary for reading the smart contract.
  • the dedicated application provides a user interface to the user, and uses this additional information to access information stored on the block chain.
  • the information stored in the blockchain is bytecode (machine language) encoded in ASCII for character strings and hexadecimal in the case of integers. Therefore, in order to read and decode the stored information, ABI (Application Binary Interface) information is necessary as additional information for knowing the data structure in addition to the byte code. That is, it is difficult for the user to directly read the bytecode stored in the block chain (reverse engineering), and is decoded as meaningful data for the first time using a dedicated application including ABI information.
  • ABI Application Binary Interface
  • the ABI information is information that only the creator of the smart contract who knows the data structure can originally know, and there is no way for the user to receive ABI information from the creator of the smart contract.
  • malicious authors can convey false ABI information or act fraudulently on a dedicated application that provides for retrieval, providing information that is different from the information stored on the blockchain there is a possibility.
  • the above problem is remarkable from the viewpoint of ensuring the traceability of information.
  • the traceability results eg, food producer or shipping route
  • the present invention has been made in view of the above problems, and an object of the present invention is to provide a technique that prevents tampering of ABI information and enables a user to read data on a block chain safely. is there.
  • the present invention provides a blockchain system comprising a registration terminal for registering a smart contract and an approval terminal for approving the smart contract, wherein the registration terminal accesses the smart contract.
  • ABI Application Binary Interface
  • the approval terminal uses the ABI information included in the transaction to verify whether the bytecode included in the transaction is accessible; and, if accessible, a block including the transaction.
  • the present invention is a registration terminal for registering a smart contract in a block chain, and extracts an ABI (Application Binary Interface) information for accessing the smart contract from the smart contract, and compiles the smart contract And a transaction issuing unit that issues a transaction including the bytecode generated and the ABI information.
  • ABI Application Binary Interface
  • the present invention is an approval terminal that approves a transaction in a blockchain system, and a control unit that receives a transaction including a bytecode of a smart contract and ABI (Application Binary Interface) information for accessing the smart contract; A verification unit that verifies whether the bytecode included in the transaction can be accessed using the ABI information included in the transaction, and, if accessible, generates a block including the transaction, the block and the block A block generation unit that reflects ABI information in a distributed ledger of a terminal of the block chain system.
  • ABI Application Binary Interface
  • the present invention is a smart contract registration method for registering a smart contract in a block chain, wherein a registration terminal for registering the smart contract receives ABI (Application Binary Interface) information for accessing the smart contract as the smart contract.
  • ABI Application Binary Interface
  • An approval terminal that approves the smart contract by performing an extraction step of extracting from the transaction, a transaction issuing step of issuing a transaction including the bytecode generated by compiling the smart contract, and the ABI information, A verification step for verifying whether the bytecode included in the transaction is accessible using the ABI information included in the transaction, and a block including the transaction if accessible. Generates, it performs the block and the ABI information, and the block generating step to be reflected in the variance ledger terminals connected to the block chain network.
  • ABI Application Binary Interface
  • the present invention is a smart contract registration program that causes a computer to function as the registration terminal.
  • the present invention is a smart contract registration program that causes a computer to function as the approval terminal.
  • FIG. 1 It is a figure showing the whole block chain system composition concerning an embodiment of the present invention. It is a figure which shows the structure of a management ledger. It is a block diagram which shows the structure of a smart contract registration part. It is a figure which shows an example of a smart contract. It is a block diagram which shows the structure of a block issuing part. It is a figure which shows an example of a transaction. It is a figure which shows another example of a transaction. It is a sequence diagram which shows the registration process of a smart contract.
  • FIG. 1 is a diagram showing an overall configuration of the block chain system of the present embodiment.
  • the block chain of this embodiment uses Ethereum, which is one of the block chain basic technologies. Ethereum is an application development platform for using blockchain as a distributed ledger that records state transitions.
  • the block chain system shown in FIG. 1 includes a smart contract registration terminal 1, a transaction approval terminal 2, and other terminals 3. These terminals 1 to 3 are connected to a block chain network 4 (hereinafter referred to as “network”) which is a P2P network in an autonomous and distributed manner.
  • network a block chain network 4 (hereinafter referred to as “network”) which is a P2P network in an autonomous and distributed manner.
  • the smart contract registration terminal 1 is a node of a registrant who registers a smart contract in the block chain.
  • the smart contract registration terminal 1 compiles the smart contract script code and sends it to the network 4 in a transaction.
  • the smart contract registration terminal 1 includes a distributed ledger 11, a block chain control unit 12, a transaction issuing unit 13, and a smart contract registration unit 14.
  • the distributed ledger 11 stores the latest block chain in a form close to real time by slowly synchronizing with all the terminals 1 to 3 connected to the network 4 via the block chain control unit 12. Yes.
  • the distributed ledger of this embodiment stores a block chain and a data set managed by the block chain.
  • the block chain control unit 12 maintains a block chain system in cooperation with terminals connected to the network 4 in an autonomous and distributed manner.
  • the block chain control unit 12 accesses the distributed ledger 11 and reads or updates the block chain and data set of the distributed ledger 11.
  • the transaction issuing unit 13 issues a transaction to the network 4.
  • the smart contract registration unit 14 generates a transaction for registering the smart contract in the distributed ledger 11 (block chain).
  • the transaction approval terminal 2 is a minor node, collects transactions transmitted to the network 4, and after confirming the validity, generates a block through an approval operation.
  • the transaction approval terminal 2 includes a distributed ledger 11, a block chain control unit 12, a transaction issuing unit 13, and a block issuing unit 15.
  • the distributed ledger 11, the block chain control unit 12 and the transaction issuing unit 13 of the transaction approval terminal 2 are the same as the distributed ledger 11, the block chain control unit 12 and the transaction issuing unit 13 of the smart contract registration terminal 1.
  • the block issuing unit 15 verifies a transaction issued on the network 4 and tries to generate a block according to a consensus algorithm (agreement algorithm) for block generation such as Proof of Work.
  • a consensus algorithm for block generation such as Proof of Work.
  • Other terminals 3 are terminals other than the smart contract registration terminal 1 and the transaction approval terminal 2, and include user terminals that use smart contracts.
  • a plurality of other terminals 3 are connected to the network 4.
  • the other terminal 3 includes the above-described distributed ledger 11, block chain control unit 12, and transaction issuing unit 13, and mutually verifies the data and transactions recorded in the distributed ledger 11 and maintains the system.
  • FIG. 2 shows a configuration of the distributed ledger 11 having a block chain.
  • the distributed ledger 11 of this embodiment includes a block chain composed of a plurality of blocks 111 and a data set 112 managed by the block chain.
  • the 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.
  • the summary value of the data set 112 (the hash value of the state DB, the hash value of the transaction set, the hash value of the ABI information, etc.) is set in the block header 113 as a snapshot of the data set 112 at a certain point in time. Is done. For example, when the data set is stored in a tree structure such as a Merkle tree, the root hash of the Merkle tree is set as the summary value.
  • the transaction list 114 is a list of transactions included in the block 111.
  • the use and purpose of the data set 112 are not limited.
  • the distributed ledger 11 shown in the figure includes, as the data set 112, for example, a state DB, a transaction set DB, and ABI information.
  • the state DB is a DB for managing the state (state) of the variables of the smart contract at the time of a certain block.
  • the byte code of the smart contract is stored in the state DB.
  • the transaction set DB is a DB indicating a set of transactions at a certain block.
  • a set of transactions means a Merkle tree composed of all transactions at the time of a certain block.
  • the data set 112 includes an ABI information DB that manages ABI information of all smart contracts registered in the state DB.
  • ABI information DB functions as Key-Value-Store (KVS), and when identification information that uniquely specifies a smart contract (for example, smart contract address) is input, ABI information used by the smart contract is output.
  • KVS Key-Value-Store
  • the ABI (Application Binary Interface) information is additional information for knowing the data structure of the smart contract, and includes, for example, a variable (data) type and a function.
  • identification information indicating the smart contract is given. Since the transaction can be transmitted for the identification information in the same manner as the remittance of the virtual currency, the identification information of the smart contract is also called an address. The difference from remittance to the user's address is that when a transaction is sent to the address of the smart contract, the smart contract is executed.
  • FIG. 3 is a configuration diagram showing the configuration of the smart contract registration unit 14 provided in the smart contract registration terminal 1.
  • the smart contract registration unit 14 includes a compiler 141, an ABI information extraction unit 142, and a transaction generation unit 143.
  • the compiler 141 receives and compiles the smart contract script code created by the creator of the smart contract and generates bytecode.
  • ABI information for accessing the smart contract converted into the byte code is also included in the transaction together with the byte code. Therefore, in parallel with the compilation of the script code, the ABI information extraction unit 142 analyzes the syntax of the script code input to the compiler and extracts (generates) ABI information for accessing the smart contract bytecode.
  • the transaction generation unit 143 generates a transaction including the bytecode of the smart contract and the ABI information, and passes it to the transaction issuing unit 13.
  • FIG. 4 shows an example of the script code 41 of the smart contract before compilation, the byte code 42 of the smart contract after compilation, and the ABI information 43.
  • the script code (source code) is irreversibly compressed during compilation, and the original script code cannot be restored from the bytecode.
  • the user can use bytecode functions (for example, data update, data reference, etc.) using ABI information.
  • FIG. 5 is a configuration diagram showing the configuration of the block issuing unit 15 included in the transaction approval terminal 2.
  • the block issuing unit 15 verifies the transaction, and tries to generate a block according to a consensus algorithm for block generation such as Proof of Work.
  • the illustrated block issuing unit 15 includes a consensus execution unit 151, an ABI information verification unit 152, a transaction verification unit 153, and a block generation unit 154.
  • the transaction verification unit 153 When the transaction verification unit 153 receives a transaction from the network 4, the transaction verification unit 153 verifies the transaction such as the validity of the electronic signature of the received transaction. In addition, when the received transaction includes the byte code of the smart contract, the transaction verification unit 153 verifies the validity of the byte code. Specifically, the transaction verification unit 153 verifies whether the byte code conforms to the block chain protocol specification. For example, in the case of Ethereum, it is verified whether an opcode that operates in an execution environment called EVM is used, and whether the capacity specified by the bytecode is exceeded.
  • EVM execution environment
  • the ABI information verification unit 152 also verifies the validity of the ABI information included in the same transaction. That is, the ABI information verification unit 152 verifies whether the bytecode included in the transaction is accessible using the ABI information included in the transaction. Specifically, the ABI information verification unit 152 uses the interface specification described in the ABI information included in the received transaction and conforms to the variable name and type defined by the bytecode included in the transaction. And verify whether it can be accessed.
  • the block generation unit 154 generates one block by collecting transactions issued on the network 4 within a predetermined time.
  • the block generation unit 154 succeeds in the verification by the transaction verification unit 153 and succeeds in the verification by the ABI information verification unit 152 (when the byte code can be accessed using the ABI information), the transaction Is generated, and the generated block is reflected in the distributed ledger 11 of all terminals connected to the network 4.
  • the block generation unit 154 updates each DB of the data set of its own distributed ledger 11 based on the transaction including the bytecode and the ABI information, and generates a hash value of each updated DB.
  • Set in the block header For example, the block generation unit 154 gives an address for uniquely identifying the smart contract to the bytecode of the smart contract included in the transaction.
  • the block generation unit 154 registers (stores) the assigned address and the ABI information included in the transaction in the ABI information DB of its own distributed ledger 11, and generates a hash value of the ABI information DB after registration. Set to the block header of the block.
  • the consensus execution unit 151 performs calculations necessary for consensus (agreement) such as hash calculation.
  • consensus such as hash calculation.
  • the consensus algorithm uses other consensus algorithms for block generation, such as Proof of Stake using the amount of coins held as a resource, and PBFT, which is an agreement algorithm for Byzantine failure. May be.
  • FIGS. 6 and 7 are examples of transactions issued by the smart contract registration terminal 1.
  • the transaction shown in FIG. 6 includes a destination, payment amount, smart contract bytecode, and the like, as in a normal transaction. Furthermore, ABI information is included in the transaction of this embodiment.
  • the transaction includes an electronic signature (signature values v, r, s) as in a normal transaction.
  • the originator of the transaction here, smart contract registration terminal 1 adds a signature (electronic signature) to all data (address, payment amount, byte code, ABI information) including ABI information. To do.
  • the transaction shown in FIG. 7 further includes a pre-compilation script code 71 (script code 41 in FIG. 4) corresponding to the bytecode and ABI information in the transaction data shown in FIG.
  • the script code 71 is not signed. Therefore, the signature value in FIG. 6 and the signature value in FIG. 7 are the same value.
  • the script code is used to verify the correctness of the correspondence between the bytecode and the ABI information when the transaction approval terminal 2 verifies. That is, in the case of the transaction of FIG. 7, the transaction verification unit 153 and the ABI information verification unit 152 can perform more precise transaction verification and ABI information verification.
  • the block generation unit 154 of the transaction approval terminal 2 deletes the script code 71 from the transaction and generates a block after the verification is completed. As a result, the script code 71 is not stored in the distributed ledger 11.
  • FIG. 8 is a sequence showing processing from registration to use of the smart contract in the present embodiment.
  • the smart contract registration terminal 1 (smart contract registration unit 14) generates a bytecode by compiling the smart contract script code, extracts ABI information from the smart contract script code, and includes a transaction including the bytecode and the ABI information. Is generated (S11).
  • the transaction is a registration transaction for registering the smart contract in the distributed ledger 11.
  • the smart contract registration terminal 1 (transaction issuing unit 13) issues a transaction including a bytecode and ABI information (S12). Specifically, the smart contract registration terminal 1 broadcasts the transaction generated in S11 on the network 4. As a result, the transaction is propagated to all terminals connected to the network 4.
  • the transaction approval terminal 2 (block issuing unit 15) verifies (mines) the transaction transmitted in S12 (S13). Then, the transaction approval terminal 2 generates a block by combining the transaction with other transactions that have occurred within a predetermined time, and the block is added to the block chain of its own distributed ledger 11 through nonce mining. Is done. When the transaction approval terminal 2 succeeds in generating the block, the transaction transmitted in S12 is confirmed (approved).
  • the transaction approval terminal 2 updates each DB of the data set of its own distributed ledger 11 based on the transaction of S12, and sets the hash value of each updated DB in the block header of the block to be generated. .
  • the transaction approval terminal 2 calculates and gives an address (identification information) for uniquely identifying the smart contract (byte code) included in the transaction transmitted in S12.
  • the address can be calculated deterministically by anyone using the address of the sender that sent the transaction including the smart contract.
  • the transaction approval terminal 2 registers (stores) the assigned address and the ABI information included in the transaction in the ABI information DB of its own distributed ledger 11, and generates a hash value of the ABI information DB after registration. Set to the block header of the block.
  • the transaction approval terminal 2 registers the bytecode included in the transaction in the 11 state DBs of its own distributed ledger, and sets the hash value of the state DB after registration in the block header of the block to be generated.
  • S13 is a process performed by the terminal that succeeded in generating the block earliest among all the terminals connected to the network.
  • the block including the transaction transmitted in S12 is reflected in the distributed ledger 11 (block chain) of all terminals connected to the network 4 (S14, S15). That is, the block chain control unit 12 of all terminals adds a block including the transaction of S12 to the distributed ledger 11 held by itself. Further, like the transaction approval terminal 2, the block chain control unit 12 of all terminals updates each DB of the data set of its own distributed ledger 11 based on the transaction included in the block.
  • the smart contract registration terminal 1 acquires the address of the smart contract after the smart contract (byte code and ABI information) of the transaction transmitted in S12 is registered in its own distributed ledger 11 ( S16). For example, the smart contract registration terminal 1 deterministically calculates an address by the same method as the address calculation performed by the transaction approval terminal in S13.
  • the smart contract registration terminal 1 (smart contract registration unit 14) notifies or informs the user terminal 3 of the address indicating the storage location of the smart contract (S17). Any notification timing and notification means may be used for the address to the user terminal 3.
  • the smart contract registration terminal 1 notifies the address at a predetermined timing by posting the address on a Web site or by sending a mail including the address to the user terminal 3.
  • the smart contract registration terminal 1 may notify the user terminal 3 of the address using a block chain by issuing a transaction including the address to the network.
  • the smart contract registration terminal 1 since the ABI information is stored in the distributed ledger 11 of each terminal, the smart contract registration terminal 1 does not need to notify the ABI information together with the address, and only needs to notify the address.
  • the user terminal 3 makes an inquiry to the ABI information DB of its own distributed ledger 11 with respect to the ABI information DB of the distributed ledger 11 using the notified address as a key, and acquires ABI information corresponding to the address (S18). Then, the user terminal 3 issues a transaction for requesting the execution of the smart contract using the acquired ABI information (S19). In other words, the user terminal 3 issues a transaction for executing a process (for example, changing the right holder of digital content) according to the logic described in the smart contract.
  • the transaction includes an instruction code for executing specific logic described in the smart contract, generated using ABI information.
  • the transaction approval terminal 2 (block issuing unit 15) verifies the transaction transmitted in S19 and combines the transaction with other transactions that have occurred within a predetermined time to generate one block ( S20).
  • the transaction approval terminal 2 executes the smart contract specified by the transaction by verifying the transaction transmitted in S19. Thereby, the transaction approval terminal 2 updates the state DB that manages the value (state) of the smart contract of its own distributed ledger 11 in order to rewrite the value of the smart contract managed by the block chain.
  • the block including the transaction is reflected in the distributed ledger 11 (block chain) of all the terminals connected to the network 4 by gradual synchronization between the terminals as in S14 and S15. (S21, S22). Therefore, the execution result of the smart contract requested by the user terminal 3 is reflected in the distributed ledger 11 of all terminals.
  • the smart contract registration terminal 1 extracts the ABI information for accessing the smart contract from the smart contract, and includes a transaction including the bytecode generated by compiling the smart contract and the ABI information. Is issued. Then, the transaction approval terminal 2 verifies whether the bytecode included in the transaction can be accessed using the ABI information included in the transaction, and if it can be accessed, generates a block including the transaction, and the block and ABI information Is reflected in the distributed ledger 11 of the terminal of the block chain system.
  • ABI information verified by the transaction approval terminal 2 is registered in the distributed ledger 11 of each terminal.
  • the smart contract user uses the smart contract bytecode registered in the distributed ledger 11 without using a dedicated browsing application provided by the smart contract creator (registrant). Can do.
  • the user of the smart contract can use the smart contract by using the ABI information of the distributed ledger 11 of his / her terminal even if the dedicated application by the creator is not distributed. .
  • falsification of ABI information by the creator of the smart contract is prevented, and the user can safely read the data on the block chain. That is, it is possible to prevent a malicious creator from providing a dedicated application including false ABI information to the user and presenting information different from the information stored on the block chain to the user. Further, the user can confirm whether or not the information read from the block chain using the dedicated application provided by the creator can be trusted.
  • traceability can be improved for the user of the smart contract.
  • the traditional smart contract type blockchain if there is no dedicated application including ABI information, it is unclear what variable is of what type and what it means, so tracing (tracking) the value registered in the blockchain ) Is difficult.
  • the dedicated application is not distributed, since the ABI information is included in the distributed ledger 11, it can be understood from the variable type and variable name, thereby improving traceability. can do.
  • the smart contract registration terminal 1, the transaction approval terminal 2, and the other terminals 3 described above are, for example, a CPU (Central Processing Unit), memory, and storage (HDD: Hard Disk Drive, SSD: Solid State Drive) ), A communication device, an input device, and an output device can be used.
  • each function of each device is realized by the CPU executing a predetermined program loaded on the memory.
  • each function of the smart contract registration terminal 1, the transaction approval terminal 2, and the other terminals 3 is a program for the smart contract registration terminal 1, and the CPU of the smart contract registration terminal 1 executes the program for the transaction approval terminal 2.
  • the CPU of the transaction approval terminal 2 executes, and in the case of a program for the other terminal 3, the CPU of the other terminal 3 executes it.
  • the program for the smart contract registration terminal 1, the program for the transaction approval terminal 2, and the other program for the terminal 3 can be read by a computer such as an HDD, SSD, USB memory, CD-ROM, DVD-ROM, MO, etc. It can be stored in a recording medium or distributed via a network.
  • the ABI information included in the transaction generated by the smart contract registration terminal 1 may not be the ABI information itself but may be information converted from the ABI information or a part of the ABI information.
  • the information converted from the ABI information for example, in order to reduce the data amount, the ABI information may be compressed and the compressed ABI information may be included in the transaction.
  • the function part may be deleted from the ABI information and the variable type may be included in the transaction.
  • Smart contract registration terminal 2 Transaction approval terminal 3: User terminal 11: Distributed ledger 12: Block chain control unit 13: Transaction issue unit 14: Smart contract registration unit 141: Compiler 142: ABI information extraction unit 143: Transaction generation Unit 15: Block issuing unit 151: Consensus execution unit 152: ABI information verification unit 153: Transaction verification unit 154: Block generation unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

ABI情報の改ざんを防ぎ、ユーザが安全にブロックチェーン上のデータを読み取ることを可能とする。登録端末1は、スマートコントラクトにアクセスするためのABI情報を、前記スマートコントラクトから抽出する抽出部142と、スマートコントラクトをコンパイルすることで生成されたバイトコードと、ABI情報とを含むトランザクションを発行するトランザクション発行部13とを備え、承認端末2は、トランザクションに含まれるABI情報を用いてバイトコードにアクセス可能かを検証する検証部152と、アクセス可能な場合、トランザクションを含むブロックを生成し、前記ブロックおよび前記ABI情報を、ブロックチェーンシステムの端末の分散台帳11に反映させるブロック生成部154と、を備える。

Description

ブロックチェーンシステム、登録端末、承認端末、スマートコントラクト登録方法、および、スマートコントラクト登録プログラム
 本発明は、ブロックチェーンにスマートコントラクトを登録する技術に関する。
 中央集権的な管理を必要とせずに、信頼性を担保可能な仕組みがデジタル仮想通貨ビットコインを中心に普及しつつある。ブロックチェーンと呼ばれるこの仕組みにおいては、やり取りされる情報の信頼性が分散ネットワーク内の合意形成のプロセスによって担保され、かつ、改ざんや二重使用などの不正を系全体で防ぐことで健全性が保たれる。
 ブロックチェーンでは、参加者間の仮想通貨の取引情報(トランザクション)が「ブロック」という単位でまとめられ、各ブロックは数珠つなぎとなって時系列順に管理される。新たなブロックの承認は、Proof of Workなどの分散ネットワークにおける合意アルゴリズムによって形成される。新たなブロックの承認は、ブロック内部に記録された通貨取引が系全体で合意されたことを示す。
 このブロックチェーンを用いて管理される一連の取引情報の帳簿を「分散台帳」と呼び、ネットワークに参加する各ノード(端末)は同一の分散台帳を保持している。近年では、分散台帳に通貨取引だけでなく、高度なスクリプトコードを登録し、スクリプトコードの実行とその結果についても合意を得るブロックチェーン基盤技術も開発されている。例えばEthereumと呼ばれるブロックチェーン基盤は、トランザクションを入力としてスクリプトコードを実行し、その実行結果をツリー構造のキーバリュー型ストア(ワールドステートまたはステートDBと呼ぶ)に格納し、その時のストアの代表値もブロックに記録する分散台帳を持つ(非特許文献1)。
 仮想通貨では、トランザクションは「誰から誰へいくら渡した」といった通貨の取引記録のみに限定されたが、これら後継のブロックチェーン技術では、利用者自身がトランザクションとスクリプトコードによって記録する情報をプログラマブルに設定することができる。このようにブロックチェーン上に登録され、分散ノードに登録および実行されるスクリプトコードは「スマートコントラクト」と呼ばれている。
 一方で、ブロックチェーン技術の高い改ざん耐性、および、取引の追跡が容易であるという特徴を活かし、情報のトレーサビリティを確保する試みは多くなされている。例えば、非特許文献2には、3D プリンタを制御するシングルボードコンピュータをブロックチェーンノードとすることで、製造時にブロックチェーン上に製造物の情報を保存する技術が開示されている。また、非特許文献3には,サプライチェーンにおいて、ブロックチェーン上にデータを保存することで偽物商品の流通を検知するシステムが示されている。
「Ethereumはどのように動いているのか」、http://coffeetimes.hatenadiary.jp/entry/2017/11/07/082426 阿部 涼介、斉藤 賢爾、村井 純、「パーソナルファブリケーション時代におけるBlockchainを用いた製造情報保存システム」、マルチメディア,分散,協調とモバイル(DICOMO2017)シンポジウム,2017年6月 Toyoda, Kentaroh, et al. "A Novel Blockchain-Based Product Ownership Management System (POMS) for Anti-Counterfeits in The Post Supply Chain." IEEE Access (2017).
 非特許文献2および非特許文献3で示されているように、ブロックチェーン上のデータを読み出すためには、分散台帳上に登録されたスマートコントラクトに対して、専用のアプリケーションを用いてアクセスする必要がある。この専用のアプリケーションには、スマートコントラクトの読み出しのために必要な付加情報が含まれている。専用のアプリケーションは、ユーザにユーザインタフェースを提供すると共に、この付加情報を用いてブロックチェーン上に格納された情報にアクセスする。
 例えば、ブロックチェーン基盤の一つの実装であるEthereumでは、ブロックチェーンに格納する情報は、文字列の場合はASCII、整数の場合は16 進数などにエンコーディングされたバイトコード(機械語)である。そのため、格納された情報を読み出し、デコードするためには、バイトコードの他に、データ構造を知るための付加情報としてABI(Application Binary Interface)情報が必要である。すなわち、ユーザにとっては、ブロックチェーンに格納されたバイトコードを直に読み取ること(リバースエンジニアリング)は難しく、ABI情報を含む専用アプリケーションを用いて初めて意味のあるデータとしてデコードされる。
 ABI情報は、データ構造を知るスマートコントラクトの作成者しか本来知りえない情報であり、ユーザは、スマートコントラクトの作成者からABI情報を受け取る以外に方法はない。しかし、悪意のある作成者が、虚偽のABI情報を伝える可能性、または、読み出しのために提供する専用のアプリケーション上で不正を働き、ブロックチェーン上に保存された情報とは異なる情報を提供する可能性がある。
 特に、情報のトレーサビリティを確保するという観点において、上記の問題は顕著である。ユーザは、作成者から提供された専用のアプリケーションに表示されたトレーサビリティの結果(例えば食材の生産者や出荷経路)が真に信用できるかどうかを確認する手段はない。 
 本発明は、上記課題を鑑みてなされたものであり、本発明の目的は、ABI情報の改ざんを防ぎ、ユーザが安全にブロックチェーン上のデータを読み取ることを可能とする技術を提供することにある。
 上記目的を達成するため、本発明は、スマートコントラクトを登録する登録端末と、前記スマートコントラクトを承認する承認端末とを備えるブロックチェーンシステムであって、前記登録端末は、前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報を、前記スマートコントラクトから抽出する抽出部と、前記スマートコントラクトをコンパイルすることで生成されたバイトコードと、前記ABI情報とを含むトランザクションを発行するトランザクション発行部と、を備え、前記承認端末は、前記トランザクションに含まれる前記ABI情報を用いて、前記トランザクションに含まれる前記バイトコードにアクセス可能かを検証する検証部と、アクセス可能な場合、前記トランザクションを含むブロックを生成し、前記ブロックおよび前記ABI情報を、前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部と、を備える。
 本発明は、ブロックチェーンにスマートコントラクトを登録する登録端末であって、 前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報を、前記スマートコントラクトから抽出する抽出部と、前記スマートコントラクトをコンパイルすることで生成されたバイトコードと、前記ABI情報とを含むトランザクションを発行するトランザクション発行部と、を備える。
 本発明は、ブロックチェーンシステムにおいてトランザクションを承認する承認端末であって、スマートコントラクトのバイトコードと、前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報とを含むトランザクションを受信する制御部と、前記トランザクションに含まれる前記ABI情報を用いて、前記トランザクションに含まれる前記バイトコードにアクセス可能かを検証する検証部と、アクセス可能な場合、前記トランザクションを含むブロックを生成し、前記ブロックおよび前記ABI情報を、前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部と、を備える。
 本発明は、ブロックチェーンにスマートコントラクトを登録するスマートコントラクト登録方法であって、前記スマートコントラクトを登録する登録端末は、前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報を、前記スマートコントラクトから抽出する抽出ステップと、前記スマートコントラクトをコンパイルすることで生成されたバイトコードと、前記ABI情報とを含むトランザクションを発行するトランザクション発行ステップと、を行い、前記スマートコントラクトを承認する承認端末は、前記トランザクションに含まれる前記ABI情報を用いて、前記トランザクションに含まれる前記バイトコードにアクセス可能かを検証する検証ステップと、アクセス可能な場合、前記トランザクションを含むブロックを生成し、前記ブロックおよび前記ABI情報を、ブロックチェーンネットワークに接続された端末の分散台帳に反映させるブロック生成ステップと、を行う。
 本発明は、上記登録端末として、コンピュータを機能させることを特徴とするスマートコントラクト登録プログラムである。
 本発明は、上記承認端末として、コンピュータを機能させることを特徴とするスマートコントラクト登録プログラムである。
 本発明によれば、ABI情報の改ざんを防ぎ、ユーザが安全にブロックチェーン上のデータを読み取ることを可能とする技術を提供することができる。
本発明の実施形態に係るブロックチェーンシステムの全体構成を示す図である。 管理台帳の構成を示す図である。 スマートコントラクト登録部の構成を示す構成図である。 スマートコントラクトの一例を示す図である。 ブロック発行部の構成を示す構成図である。 トランザクションの一例を示す図である。 トランザクションの他の一例を示す図である。 スマートコントラクトの登録処理を示すシーケンス図である。
 以下、本発明の実施の形態について、図面を参照して説明する。
 図1は、本実施形態のブロックチェーンシステムの全体構成を示す図である。本実施形態のブロックチェーンは、ブロックチェーン基盤技術の1つであるEthereumを用いる。Ethereumは、ブロックチェーンを、状態遷移を記録する分散台帳として用いるためのアプリケーション開発プラットフォームである。
 図1に示すブロックチェーンシステムは、スマートコントラクト登録端末1と、トランザクション承認端末2と、その他の端末3とを備える。これらの端末1~3は、P2Pネットワークであるブロックチェーンネットワーク4(以下、「ネットワーク」という)に自律分散的に接続される。
 スマートコントラクト登録端末1は、スマートコントラクトをブロックチェーンに登録する登録者のノードである。スマートコントラクト登録端末1は、スマートコントラクトのスクリプトコードをコンパイルし、トランザクションに含めてネットワーク4に送信する。
 スマートコントラクト登録端末1は、分散台帳11と、ブロックチェーン制御部12と、トランザクション発行部13と、スマートコントラクト登録部14とを備える。分散台帳11には、ブロックチェーン制御部12を介して、当該ネットワーク4に接続された全ての端末1~3と緩やかに同期することによって、リアルタイムに近い形で最新状態のブロックチェーンが記憶されている。本実施形態の分散台帳には、ブロックチェーンと、ブロックチェーンで管理されるデータ集合とが記憶されている。
 ブロックチェーン制御部12は、ネットワーク4に接続された端末と自律分散的に協調してブロックチェーンの系を維持する。ブロックチェーン制御部12は、分散台帳11にアクセスし、分散台帳11のブロックチェーンおよびデータ集合を読み出し、または、更新する。トランザクション発行部13は、トランザクションをネットワーク4に発行する。スマートコントラクト登録部14は、スマートコントラクトを分散台帳11(ブロックチェーン)に登録するためのトランザクションを生成する。
 トランザクション承認端末2は、マイナーのノードであって、ネットワーク4に送信されたトランザクションを収集し、正当性を確認後に、承認作業を通じてブロックを生成する。トランザクション承認端末2は、分散台帳11と、ブロックチェーン制御部12と、トランザクション発行部13と、ブロック発行部15とを備える。トランザクション承認端末2の分散台帳11、ブロックチェーン制御部12およびトランザクション発行部13は、スマートコントラクト登録端末1の分散台帳11、ブロックチェーン制御部12およびトランザクション発行部13と同様である。
 ブロック発行部15は、ネットワーク4上に発行されたトランザクションを検証し、Proof of Workなどのブロック生成のためのコンセンサスアルゴリズム(合意アルゴリズム)に従い、ブロックの生成を試みる。
 その他の端末3は、スマートコントラクト登録端末1およびトランザクション承認端末2以外の端末であり、スマートコントラクトを利用する利用者端末などが含まれる。ネットワーク4には、複数のその他の端末3が接続される。その他の端末3は、前述の分散台帳11、ブロックチェーン制御部12およびトランザクション発行部13を備え、分散台帳11に記録されたデータおよびトランザクションを相互に検証し、系を維持している。
 図2は、ブロックチェーンを具備する分散台帳11の構成を示す。本実施形態の分散台帳11は、複数のブロック111から構成されるブロックチェーンと、ブロックチェーンで管理されるデータ集合112とを備える。
 ブロック111は、ブロックヘッダ113、トランザクションリスト114などを有する。ブロックヘッダ113には、当該ブロックの時点の分散台帳11全体の要約が設定される。図示する例では、ブロックヘッダ113には、データ集合112のある時点のスナップショットとして、データ集合112の要約値(ステートDBのハッシュ値、トランザクション集合のハッシュ値、ABI情報のハッシュ値など)が設定される。例えば、データ集合がマークルツリーなどのツリー構造で格納されている場合、要約値として、マークルツリーのルートハッシュが設定される。トランザクションリスト114は、当該ブロック111に含まれるトランザクションのリストである。 
 データ集合112は、その用途および目的は限定されない。図示する分散台帳11では、データ集合112として、例えば、ステートDBと、トランザクション集合DBと、ABI情報とを備える。
 ステートDBは、あるブロックの時点でのスマートコントラクトの変数の状態(ステート)を管理するためのDBである。また、ステートDBには、スマートコントラクトのバイトコードが格納される。トランザクション集合DBは、あるブロックの時点でのトランザクションの集合を示すDBである。トランザクションの集合は、あるブロックの時点での全てのトランザクションによって構成されるマークルツリーを意味する。
 本実施形態では、データ集合112として、ステートDBに登録された全てのスマートコントラクトのABI情報を管理するABI情報DBを備える。ABI情報DBは、Key-Value Store(KVS)として機能し、スマートコントラクトを一意に指定する識別情報(例えば、スマートコントラクトのアドレス)が入力されると、当該スマートコントラクトが使用するABI情報を出力する。ABI (Application Binary Interface)情報は、スマートコントラクトのデータ構造を知るための付加情報であり、例えば変数(データ)の型、関数などが含まれる。
 なお、Ethereumでは、スマートコントラクトのバイトコードを、分散台帳11(ステートDB)に登録すると、当該スマートコントラクトを示す識別情報が付与される。識別情報に対して、仮想通貨の送金と同様にトランザクションを送信することができるため、スマートコントラクトの識別情報はアドレスとも呼ばれる。ユーザのアドレスへの送金との違いは、スマートコントラクトのアドレス宛てにトランザクションを送信すると、当該スマートコントラクトが実行されることである。
 図3は、スマートコントラクト登録端末1が具備するスマートコントラクト登録部14の構成を示す構成図である。スマートコントラクト登録部14は、コンパイラ141と、ABI情報抽出部142と、トランザクション生成部143とを備える。
 コンパイラ141は、スマートコントラクトの作成者が作成した、スマートコントラクトのスクリプトコードを受け付けてコンパイルして、バイトコードを生成する。本実施形態では、バイトコードに変換されたスマートコントラクトにアクセスするためのABI情報も、バイトコードと併せてトランザクションに含める。そのため、ABI情報抽出部142が、スクリプトコードのコンパイルと並行して、コンパイラに入力されたスクリプトコードの構文を解析し、スマートコントラクトのバイトコードにアクセスするためのABI情報を抽出(生成)する。トランザクション生成部143は、スマートコントラクトのバイトコードと、ABI情報とを含むトランザクションを生成し、トランザクション発行部13に受け渡す。
 図4に、コンパイル前のスマートコントラクトのスクリプトコード41と、コンパイル後のスマートコントラクトのバイトコード42と、ABI情報43との一例を示す。スクリプトコード(ソースコード)は、コンパイル時に不可逆に圧縮され、バイトコードから元のスクリプトコードを復元することはできない。ユーザは、ABI情報を用いて、バイトコードの機能(例えば、データ更新、データ参照など)を利用することができる。
 図5は、トランザクション承認端末2が具備するブロック発行部15の構成を示す構成図である。ブロック発行部15は、トランザクションを検証し、Proof of Workなどのブロック生成のためのコンセンサスアルゴリズムに従い、ブロックの生成を試みる。図示するブロック発行部15は、コンセンサス実行部151と、ABI情報検証部152と、トランザクション検証部153と、ブロック生成部154とを備える。
 トランザクション検証部153は、ネットワーク4よりトランザクションを受け取ると、受け取ったトランザクションの電子署名の正当性などのトランザクションの検証を行う。また、トランザクション検証部153は、受け取ったトランザクションにスマートコントラクトのバイトコードが含まれる場合、当該バイトコードの正当性を検証する。具体的には、トランザクション検証部153は、ブロックチェーンのプロトコル仕様に則ったバイトコードか否かを検証する。例えば、Ethereumの場合は、EVMと呼ばれる実行環境で動作するオペコードが使われているか、バイトコードが規定する容量を超えていないか、などを検証する。
 このとき、トランザクション検証部153によるスマートコントラクトのバイトコードの検証処理と並行して、ABI情報検証部152が、同じトランザクションに含まれるABI情報の正当性についても検証する。すなわち、ABI情報検証部152は、トランザクションに含まれるABI情報を用いて、トランザクションに含まれるバイトコードにアクセス可能かを検証する。具体的には、ABI情報検証部152は、受け取ったトランザクションに含まれるABI情報に記載されているインタフェース仕様を用いて、当該トランザクションに含まれるバイトコードで定義されている変数名や型に適合してアクセス可能か否かを検証する。
 ブロック生成部154は、所定の時間内にネットワーク4上で発行されたトランザクションをまとめて1つのブロックを生成する。本実施形態では、ブロック生成部154は、トランザクション検証部153による検証に成功し、ABI情報検証部152による検証に成功した場合(ABI情報を用いてバイトコードにアクセスが可能な場合)、当該トランザクションを含むブロックを生成し、ネットワーク4に接続される全ての端末の分散台帳11に生成したブロックを反映させる。
 ここで、ブロック生成部154は、バイトコードおよびABI情報を含むトランザクションに基づいて、自身の分散台帳11のデータ集合の各DBを更新し、更新後の各DBのハッシュ値を、生成するブロックのブロックヘッダに設定する。例えば、ブロック生成部154は、トランザクションに含まれるスマートコントラクトのバイトコードに、当該スマートコントラクトを一意に識別するためのアドレスを付与する。そして、ブロック生成部154は、付与したアドレスとトランザクションに含まれるABI情報とを、自身の分散台帳11のABI情報DBに登録(格納)し、登録後のABI情報DBのハッシュ値を、生成するブロックのブロックヘッダに設定する。
 コンセンサス実行部151は、ハッシュ演算などコンセンサス(合意)に必要な計算を実施する。コンセンサスアルゴリズムは、ビットコインで用いられているProof of Work以外にも、所持コイン量をリソースとしたProof of Stake、ビザンチン故障における合意アルゴリズムであるPBFTなど、その他のブロック生成のためのコンセンサスアルゴリズムを用いても良い。
 図6および図7を用いて、スマートコントラクト登録端末1が、スマートコントラクトを登録するために発行するトランザクションの構造について説明する。図6および図7は、スマートコントラクト登録端末1が発行するトランザクションの例である。
 図6に示すトランザクションには、通常のトランザクションと同様に、宛先、支払額、スマートコントラクトのバイトコードなどが含まれる。さらに、本実施形態のトランザクションには、ABI情報が含まれる。また、トランザクションには、通常のトランザクションと同様に、電子署名(署名値v,r,s)が含まれる。本実施形態では、トランザクションの発信者(ここでは、スマートコントラクト登録端末1)は、ABI情報を含む全てのデータ(宛先、支払額、バイトコード、ABI情報)に対して署名(電子署名)を付加する。
 図7に示すトランザクションには、図6に示すトランザクションのデータに、バイトコードおよびABI情報に対応する、コンパイル前のスクリプトコード71(図4のスクリプトコード41)を、さらに含む。この場合、スクリプトコード71に対しては、署名を行わない。したがって、図6の署名値と、図7の署名値は、同じ値である。
 スクリプトコードは、トランザクション承認端末2が検証する際に、バイトコードとABI情報との対応の正当性を検証するために用いられる。すなわち、図7のトランザクションの場合、トランザクション検証部153およびABI情報検証部152は、より精緻なトランザクションの検証、および、ABI情報の検証が可能となる。
 例えば、図6のトランザクションの場合は、スマートコントラクトに対応する全てのABI情報ではなく、ABI情報の一部だけを記載して格納する可能性がある(すなわち、ABI情報の一部の変数および型を隠して公開する)。これに対し、図7のトランザクションの場合は、コンパイル前の元のスクリプトコードもトランザクションに含まれるため、トランザクション承認端末2は、完全なバイトコードとABI情報とを用いて、全ての変数およびその型が、正しく存在するか否かを検証することができる。
 なお、トランザクション承認端末2のブロック生成部154は、検証終了後に、トランザクションからスクリプトコード71を削除して、ブロックを生成する。これにより、スクリプトコード71は分散台帳11に格納されない。
 図8は、本実施形態におけるスマートコントラクトの登録から利用までの処理を示すシーケンスである。
 スマートコントラクト登録端末1(スマートコントラクト登録部14)は、スマートコントラクトのスクリプトコードをコンパイルしてバイトコードを生成するとともに、スマートコントラクトのスクリプトコードからABI情報を抽出し、バイトコードおよびABI情報を含むトランザクションを生成するする(S11)。なお、当該トランザクションは、スマートコントラクトを分散台帳11に登録するための登録用トランザクションである。
 そして、スマートコントラクト登録端末1(トランザクション発行部13)は、バイトコードおよびABI情報を含むトランザクションを発行する(S12)。具体的には、スマートコントラクト登録端末1が、S11で生成したトランザクションを、ネットワーク4上にブロードキャストする。これにより、トランザクションは、ネットワーク4に接続された全ての端末に伝搬される。
 そして、トランザクション承認端末2(ブロック発行部15)は、S12で送信されたトランザクションを検証(マイニング)する(S13)。そして、トランザクション承認端末2は、当該トランザクションを、所定の時間内に発生した他のトランザクションとまとめて1つのブロックを生成し、当該ブロックがナンスのマイニングを経て自身の分散台帳11のブロックチェーンに追加される。トランザクション承認端末2がブロックの生成に成功することにより、S12で送信されたトランザクションが確定(承認)される。
 ここで、トランザクション承認端末2は、S12のトランザクションに基づいて、自身の分散台帳11のデータ集合の各DBを更新し、更新後の各DBのハッシュ値を、生成するブロックのブロックヘッダに設定する。
 例えば、トランザクション承認端末2は、S12で送信されたトランザクションに含まれるスマートコントラクト(バイトコード)に、当該スマートコントラクトを一意に識別するためのアドレス(識別情報)を算出し、付与する。アドレスは、スマートコントラクトを含むトランザクションを送信した送信元のアドレスなどを用いて、誰でも決定論的に算出可能である。そして、トランザクション承認端末2は、付与したアドレスとトランザクションに含まれるABI情報とを、自身の分散台帳11のABI情報DBに登録(格納)し、登録後のABI情報DBのハッシュ値を、生成するブロックのブロックヘッダに設定する。
 また、トランザクション承認端末2は、トランザクションに含まれるバイトコードを自身の分散台帳の11のステートDBに登録し、登録後のステートDBのハッシュ値を、生成するブロックのブロックヘッダに設定する。
 なお、S13は、ネットワークに接続された全ての端末のうち、最も早くブロックの生成に成功した端末によって行われる処理である。
 そして、端末間のゆるやかな同期により、S12で送信されたトランザクションを含むブロックが、ネットワーク4に接続された全ての端末の分散台帳11(ブロックチェーン)に反映される(S14、S15)。すなわち、全ての端末のブロックチェーン制御部12は、自身が保持する分散台帳11に、S12のトランザクションを含むブロックを追加する。また、全ての端末のブロックチェーン制御部12は、トランザクション承認端末2と同様に、ブロックに含まれるトランザクションに基づいて、自身の分散台帳11のデータ集合の各DBを更新する。
 スマートコントラクト登録端末1(スマートコントラクト登録部14)は、S12で送信したトランザクションのスマートコントラクト(バイトコードおよびABI情報)が自身の分散台帳11に登録された後、当該スマートコントラクトのアドレスを取得する(S16)。例えば、スマートコントラクト登録端末1は、S13でトランザクション承認端末が実施したアドレスの算出と同様の方法で、決定論的にアドレスを算出する。
 そして、スマートコントラクト登録端末1(スマートコントラクト登録部14)は、利用者端末3に対し、スマートコントラクトの格納場所を示すアドレスを通知または周知する(S17)。利用者端末3へのアドレスの通知タイミングおよび通知手段は、どのようなものであってもよい。例えば、スマートコントラクト登録端末1は、アドレスをWebサイトへ掲示する、または、アドレスを含むメールを利用者端末3に送信するなどにより、所定のタイミングでアドレスを通知する。また、スマートコントラクト登録端末1は、アドレスを含むトランザクションをネットワークに発行することで、ブロックチェーンを用いてアドレスを利用者端末3に通知することとしてもよい。
 本実施形態では、各端末の分散台帳11にはABI情報が格納されているため、スマートコントラクト登録端末1は、アドレスとともにABI情報を通知する必要はなく、アドレスのみを通知すればよい。
 利用者端末3は、分散台帳11のABI情報DBに対し、通知されたアドレスをキーとして自身の分散台帳11のABI情報DBに問い合わせ、アドレスに対応するABI情報を取得する(S18)。そして、利用者端末3は、取得したABI情報を用いて、スマートコントラクトの実行を要求するためのトランザクションを発行する(S19)。すなわち、利用者端末3は、スマートコントラクトに記載のロジックに従って処理(例えば。デジタルコンテンツの権利者の変更など)を実行するためのトランザクションを発行する。当該トランザクションには、ABI情報を用いて生成した、スマートコントラクトに記載の特定のロジックを実行する命令コードなどが含まれる。
 トランザクション承認端末2(ブロック発行部15)は、S13と同様に、S19で送信されたトランザクションを検証し、当該トランザクションを所定の時間内に発生した他のトランザクションとまとめて1つのブロックを生成する(S20)。
 トランザクション承認端末2は、S19で送信されたトランザクションを検証することで、当該トランザクションで指定されたスマートコントラクトを実行する。これにより、トランザクション承認端末2は、ブロックチェーンで管理するスマートコントラクトの値を書き換えるため、自身の分散台帳11のスマートコントラクトの値(状態)を管理するステートDBを更新する。
 ブロックの生成に成功した場合、S14およびS15と同様に、端末間のゆるやかな同期により、当該トランザクションを含むブロックが、ネットワーク4に接続された全ての端末の分散台帳11(ブロックチェーン)に反映される(S21、S22)。したがって、利用者端末3が要求したスマートコントラクトの実行結果が、全ての端末の分散台帳11に反映される。
 以上説明した本実施形態では、スマートコントラクト登録端末1は、スマートコントラクトにアクセスするためのABI情報をスマートコントラクトから抽出し、スマートコントラクトをコンパイルすることで生成されたバイトコードとABI情報とを含むトランザクションを発行する。そして、トランザクション承認端末2は、トランザクションに含まれるABI情報を用いて、トランザクションに含まれるバイトコードにアクセス可能かを検証し、アクセス可能な場合、トランザクションを含むブロックを生成し、当該ブロックおよびABI情報を、ブロックチェーンシステムの端末の分散台帳11に反映させる。
 このように、本実施形態では、各端末の分散台帳11には、トランザクション承認端末2により検証済みのABI情報が登録される。このため、スマートコントラクトの利用者は、スマートコントラクトの作成者(登録者)が提供する、閲覧用の専用のアプリケーションを用いることなく、分散台帳11に登録されたスマートコントラクトのバイトコードを利用することができる。
 また、本実施形態では、スマートコントラクトの利用者は、作成者による専用のアプリケーションが配信されなくても、自身の端末の分散台帳11のABI情報を用いることで、スマートコントラクトを利用することができる。
 したがって、本実施形態では、スマートコントラクトの作成者によるABI情報の改ざんを防止し、利用者が安全にブロックチェーン上のデータを読み取ることができる。すなわち、悪意のある作成者が、虚偽のABI情報を含む専用のアプリケーションを利用者に提供し、ブロックチェーン上に保存された情報とは異なる情報を利用者に提示することを防ぐことができる。また、利用者は、作成者から提供された専用のアプリケーションを用いてブロックチェーンから読み出した情報が、信用できるかどうかを確認することができる。
 また、本実施形態では、スマートコントラクトの利用者に対して、トレーサビリティを向上することができる。従来のスマートコントラクト型ブロックチェーンでは、ABI情報を含む専用のアプリケーションがないと、どの変数が何の型で、何を意味するのかが不明であるため、ブロックチェーンに登録された値のトレース(追跡)が困難である。これに対して、本実施形態では、専用アプリケーションが配布されなくでも、分散台帳11にABI情報が含まれているため、変数の型、変数名から何を意味するかがわかるため、トレーサビリティを向上することができる。
 なお、上記説明したスマートコントラクト登録端末1、トランザクション承認端末2およびその他の端末3は、例えば、CPU(Central Processing Unit、プロセッサ)と、メモリと、ストレージ(HDD:Hard Disk Drive、SSD:Solid State Drive)と、通信装置と、入力装置と、出力装置とを備える汎用的なコンピュータシステムを用いることができる。このコンピュータシステムにおいて、CPUがメモリ上にロードされた所定のプログラムを実行することにより、各装置の各機能が実現される。例えば、スマートコントラクト登録端末1、トランザクション承認端末2およびその他の端末3の各機能は、スマートコントラクト登録端末1用のプログラムの場合はスマートコントラクト登録端末1のCPUが、トランザクション承認端末2用のプログラムの場合はトランザクション承認端末2のCPUが、そして、その他の端末3用のプログラムの場合はその他の端末3のCPUがそれぞれ実行することにより実現される。
 また、スマートコントラクト登録端末1用のプログラム、トランザクション承認端末2用のプログラムおよびその他の端末3用のプログラムは、HDD、SSD、USBメモリ、CD-ROM、DVD-ROM、MOなどのコンピュータ読取り可能な記録媒体に記憶することも、ネットワークを介して配信することもできる。
 また、本発明は上記実施形態に限定されるものではなく、その要旨の範囲内で数々の変形が可能である。
 例えば、スマートコントラクト登録端末1により生成されるトランザクションに含まれるABI情報は、ABI情報そのものではなく、ABI情報から変換された情報、または、ABI情報の一部であってもよい。ABI情報から変換された情報としては、例えば、データ量を削減するため、ABI情報を圧縮し、圧縮後のABI情報をトランザクションに含めることとしてもよい。また、ABI情報の一部の情報としては、例えば、ABI情報から関数の部分を削除し、変数の型をトランザクションに含めることとしてもよい。
 1 :スマートコントラクト登録端末
 2 :トランザクション承認端末
 3 :利用者端末
 11:分散台帳
 12:ブロックチェーン制御部
 13:トランザクション発行部
 14:スマートコントラクト登録部
 141:コンパイラ
 142:ABI情報抽出部
 143:トランザクション生成部
 15:ブロック発行部
 151:コンセンサス実行部
 152:ABI情報検証部
 153:トランザクション検証部
 154:ブロック生成部

Claims (8)

  1.  スマートコントラクトを登録する登録端末と、前記スマートコントラクトを承認する承認端末とを備えるブロックチェーンシステムであって、
     前記登録端末は、
      前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報を、前記スマートコントラクトから抽出する抽出部と、
      前記スマートコントラクトをコンパイルすることで生成されたバイトコードと、前記ABI情報とを含むトランザクションを発行するトランザクション発行部と、を備え、
     前記承認端末は、
      前記トランザクションに含まれる前記ABI情報を用いて、前記トランザクションに含まれる前記バイトコードにアクセス可能かを検証する検証部と、
      アクセス可能な場合、前記トランザクションを含むブロックを生成し、前記ブロックおよび前記ABI情報を、前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部と、を備えること
     を特徴とするブロックチェーンシステム。
  2.  請求項1記載のブロックチェーンシステムであって、
     前記分散台帳は、前記ABI情報を格納するABI情報データベースを備え、
     前記ブロック生成部は、前記スマートコントラクトのアドレスと前記ABI情報とを、自身の前記ABI情報データベースに登録し、登録後の前記ABI情報データベースのハッシュ値を、前記ブロックのヘッダに設定すること
     を特徴とするブロックチェーンシステム。
  3.  請求項1または2記載のブロックチェーンシステムであって、
     前記分散台帳は、前記バイトコードを格納するステートデータベースを備え、
     前記ブロック生成部は、前記バイトコードを自身の前記ステートデータベースに登録し、登録後の前記ステートデータベースのハッシュ値を、前記ブロックのヘッダに設定すること
     を特徴とするブロックチェーンシステム。
  4.  ブロックチェーンにスマートコントラクトを登録する登録端末であって、
     前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報を、前記スマートコントラクトから抽出する抽出部と、
     前記スマートコントラクトをコンパイルすることで生成されたバイトコードと、前記ABI情報とを含むトランザクションを発行するトランザクション発行部と、を備えること
     を特徴とする登録端末。
  5.  ブロックチェーンシステムにおいてトランザクションを承認する承認端末であって、
     スマートコントラクトのバイトコードと、前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報とを含むトランザクションを受信する制御部と、
     前記トランザクションに含まれる前記ABI情報を用いて、前記トランザクションに含まれる前記バイトコードにアクセス可能かを検証する検証部と、
     アクセス可能な場合、前記トランザクションを含むブロックを生成し、前記ブロックおよび前記ABI情報を、前記ブロックチェーンシステムの端末の分散台帳に反映させるブロック生成部と、を備えること
     を特徴とする承認端末。
  6.  ブロックチェーンにスマートコントラクトを登録するスマートコントラクト登録方法であって、
     前記スマートコントラクトを登録する登録端末は、
      前記スマートコントラクトにアクセスするためのABI(Application Binary Interface)情報を、前記スマートコントラクトから抽出する抽出ステップと、
      前記スマートコントラクトをコンパイルすることで生成されたバイトコードと、前記ABI情報とを含むトランザクションを発行するトランザクション発行ステップと、を行い、
     前記スマートコントラクトを承認する承認端末は、
      前記トランザクションに含まれる前記ABI情報を用いて、前記トランザクションに含まれる前記バイトコードにアクセス可能かを検証する検証ステップと、
      アクセス可能な場合、前記トランザクションを含むブロックを生成し、前記ブロックおよび前記ABI情報を、ブロックチェーンネットワークに接続された端末の分散台帳に反映させるブロック生成ステップと、を行うこと
     を特徴とするスマートコントラクト登録方法。
  7.  請求項4に記載の登録端末として、コンピュータを機能させることを特徴とするスマートコントラクト登録プログラム。
  8.  請求項5に記載の承認端末として、コンピュータを機能させることを特徴とするスマートコントラクト登録プログラム。
PCT/JP2019/014912 2018-04-06 2019-04-04 ブロックチェーンシステム、登録端末、承認端末、スマートコントラクト登録方法、および、スマートコントラクト登録プログラム WO2019194267A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2020512316A JP7157348B2 (ja) 2018-04-06 2019-04-04 ブロックチェーンシステム、承認端末、スマートコントラクト登録方法、および、スマートコントラクト登録プログラム
US17/045,671 US11888985B2 (en) 2018-04-06 2019-04-04 Blockchain system, registration terminal, approval terminal, smart contract registration method, and smart contract registration program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018073700 2018-04-06
JP2018-073700 2018-04-06

Publications (1)

Publication Number Publication Date
WO2019194267A1 true WO2019194267A1 (ja) 2019-10-10

Family

ID=68100502

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/014912 WO2019194267A1 (ja) 2018-04-06 2019-04-04 ブロックチェーンシステム、登録端末、承認端末、スマートコントラクト登録方法、および、スマートコントラクト登録プログラム

Country Status (3)

Country Link
US (1) US11888985B2 (ja)
JP (1) JP7157348B2 (ja)
WO (1) WO2019194267A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6808109B1 (ja) * 2020-03-04 2021-01-06 三菱電機株式会社 管理装置、管理方法、及び、管理プログラム
WO2022075154A1 (ja) * 2020-10-08 2022-04-14 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 制御方法、制御装置、およびプログラム

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7181455B2 (ja) * 2018-11-13 2022-12-01 日本電信電話株式会社 ブロックチェーンシステム、承認端末、利用者端末、履歴管理方法、および、履歴管理プログラム
US11676143B2 (en) * 2019-05-16 2023-06-13 Coinbase, Inc. Systems and methods for blockchain transaction management
CN110633076B (zh) * 2019-09-16 2021-05-04 杭州趣链科技有限公司 一种自动生成Solidity智能合约Java客户端程序的方法
US11573951B2 (en) * 2019-10-03 2023-02-07 Curvegrid, Inc. Systems, methods, and storage media for interfacing a user device with a decentralized architecture
WO2021188765A1 (en) * 2020-03-20 2021-09-23 Mastercard International Incorporated Method and system for auditing smart contracts

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160357550A1 (en) * 2015-06-08 2016-12-08 402 Technologies S.A. System and method for executing software
US9870508B1 (en) * 2017-06-01 2018-01-16 Unveiled Labs, Inc. Securely authenticating a recording file from initial collection through post-production and distribution
US20180082256A1 (en) * 2016-09-19 2018-03-22 Sap Se Decentralized credentials verification network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109154885B (zh) * 2016-03-21 2023-05-12 澳大利亚国家Ict有限公司 区块链平台上的业务处理执行
EP3479519B1 (en) * 2016-08-30 2022-11-02 Commonwealth Scientific and Industrial Research Organisation Dynamic access control on blockchain
US10447770B2 (en) * 2017-05-30 2019-10-15 Verizon Patent And Licensing Inc. Blockchain micro-services framework
CN111512658B (zh) * 2017-12-19 2023-05-02 海拉有限双合股份公司 用于分散式数字认证的方法和系统
US20190303623A1 (en) * 2018-04-02 2019-10-03 Ca, Inc. Promotion smart contracts for software development processes

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160357550A1 (en) * 2015-06-08 2016-12-08 402 Technologies S.A. System and method for executing software
US20180082256A1 (en) * 2016-09-19 2018-03-22 Sap Se Decentralized credentials verification network
US9870508B1 (en) * 2017-06-01 2018-01-16 Unveiled Labs, Inc. Securely authenticating a recording file from initial collection through post-production and distribution

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MACHINO, AKINORI: "Ethereum : geth Hello World", 9 January 2018 (2018-01-09), Retrieved from the Internet <URL:https://qiita.com/amachino/items/b59ec8e46863ce2ebd4a> [retrieved on 20190604] *
WATANABE, HIROKI ET AL.,: "Disclosure Control Method with Consideration for authority Decentralization for Structured Data in Blockchain", PROCEEDINGS OF THE 80TH NATIONAL CONVENTION OF IPSJ (3), vol. 6D-01, 13 March 2018 (2018-03-13), pages 53 - 54 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6808109B1 (ja) * 2020-03-04 2021-01-06 三菱電機株式会社 管理装置、管理方法、及び、管理プログラム
WO2022075154A1 (ja) * 2020-10-08 2022-04-14 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 制御方法、制御装置、およびプログラム

Also Published As

Publication number Publication date
US11888985B2 (en) 2024-01-30
US20210160069A1 (en) 2021-05-27
JPWO2019194267A1 (ja) 2021-03-25
JP7157348B2 (ja) 2022-10-20

Similar Documents

Publication Publication Date Title
WO2019194267A1 (ja) ブロックチェーンシステム、登録端末、承認端末、スマートコントラクト登録方法、および、スマートコントラクト登録プログラム
US11431486B2 (en) System or method to implement consensus on read on distributed ledger/blockchain
EP3776208B1 (en) Runtime self-correction for blockchain ledgers
US20220006705A1 (en) Systems, methods, and apparatuses for implementing a metadata driven rules engine on blockchain using distributed ledger technology (dlt)
CN110495132B (zh) 用于在分布式网络节点内生成、上传和执行代码区块的系统和方法
JP2022110150A (ja) セキュアな投票及び配布に利用されるブロックチェーンが実装された計数システム及び方法
KR102120703B1 (ko) 블록체인 네트워크 상에서 그룹키 기반의 이중 서명 트랜잭션 구조를 구성하는 노드 그룹 관리 장치 및 컴퓨팅 장치
JP2020519983A (ja) 並列処理ブロックチェーントランザクションのためのシステムおよび方法
JP2020517200A (ja) Utxo基盤プロトコルを利用したブロックチェーン基盤の文書管理方法及びこれを利用した文書管理サーバ{method for managing document on basis of blockchain by using utxo−based protocol,and document management server using same}
US20190205121A1 (en) Distributed code repository management
KR20210003234A (ko) 분할된 블록체인 네트워크에서 블록체인의 블록을 유지하는 것
JP2023106412A (ja) ブロックチェーン通信と順序付け
WO2020035094A2 (en) System and method for consensus management
JP7137077B2 (ja) ブロックチェーンシステム、承認端末、利用者端末、履歴管理方法、および、履歴管理プログラム
JP7181455B2 (ja) ブロックチェーンシステム、承認端末、利用者端末、履歴管理方法、および、履歴管理プログラム
US20200021602A1 (en) Trace-based transaction validation and commitment
JP2023530594A (ja) 分散型データベースにおける許可されたイベント処理
CN115114372A (zh) 基于区块链的数据处理方法、装置、设备及可读存储介质
CN113132459A (zh) 分布式存储方法、系统、存储介质、信息数据处理终端
KR102139551B1 (ko) 유언장을 관리하는 서버 및 방법
CN110858211B (zh) 数据存储方法、装置及系统、存储介质
US20230308276A1 (en) Creating non-fungible token shards
CN112766971A (zh) 在区块链中发送交易和执行交易的方法和装置
Stampernas Blockchain technologies and smart contracts in the context of the Internet of Things
CN112163917A (zh) 基于区块链的票据处理方法、装置、介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19781034

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020512316

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19781034

Country of ref document: EP

Kind code of ref document: A1