Real-name contract address generation method, device and computer equipment

By generating real-name contract addresses and using real-name certificates to make the contract addresses traceable, the problem of anonymous contracts on the blockchain cannot be supervised, and the legality and security of the contract are achieved.

CN111986028BActive Publication Date: 2024-11-12WEALEDGER NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010850938.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-21
Publication Date
2024-11-12
Estimated Expiration
2040-08-21

AI Technical Summary

Technical Problem

The anonymous feature of smart contracts on the blockchain makes it impossible to confirm the identity of the contract publisher and to track and regulate illegal contracts.

Method used

By obtaining real-name certificates and contract codes, encrypting operations and encoding to generate real-name contract addresses, introducing real-name certificates to make the contract addresses traceable, real-name certificates to achieve the legality and security of the contract.

Benefits of technology

It realizes the supervision of blockchain online transactions, ensures the legality and security of contracts, and prevents the emergence of illegal contracts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111986028B_ABST
    Figure CN111986028B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of blockchain technology, and in particular, relates to a method, device and computer equipment for generating a real-name contract address. The real-name contract address generation method comprises the following steps: obtaining a real-name certificate and a contract code; performing encryption operations on the public key in the real-name certificate and the contract code, and encoding the encryption operation results to obtain a real-name contract address. The real-name contract address generation method provided by the present invention introduces a real-name certificate when generating a real-name contract address, so that the subsequent series of transactions carried out based on the real-name contract address can be traced back to their sources, and the blockchain network transactions can be supervised, ensuring the legality of the contract, safety and speed, and the real-name data cannot be tampered with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of blockchain technology, and in particular relates to a method, device and computer equipment for generating a real-name contract address. Background Art

[0002] At present, with the continuous development and popularity of blockchain technology, blockchain smart contracts as an important technology are gradually becoming more and more well-known. Smart contracts on blockchain have the characteristics of decentralization, programmability, and immutability. They can flexibly embed various data and assets to help achieve safe and efficient information exchange, value transfer and asset management.

[0003] The blockchain contract triggers the contract call through the blockchain transaction, and then returns the result after the contract is independently executed. The contract execution result is then published on the blockchain through the transaction and the contract result is permanently stored. This ensures that the contract execution result cannot be tampered with and is unique, while ensuring that the contract execution is traceable.

[0004] Today, blockchain provides anonymous contracts to protect personal privacy and ensure that transaction information is reliable and secure. However, due to the encryption and anonymity of the contract, all contracts are anonymized and the identity of the contract publisher cannot be confirmed. When an illegal contract is generated, the publisher of the illegal contract cannot be tracked or identified. Summary of the invention

[0005] The purpose of the embodiment of the present invention is to provide a real-name contract address generation method, which aims to solve the problem that the current blockchain provides an anonymous contract method to protect personal privacy and ensure the reliability and security of transaction information. However, due to the encryption and anonymity characteristics of the contract, all contracts are anonymized and the identity of the contract issuer cannot be confirmed. When an illegal contract is generated, the issuer of the illegal contract cannot be tracked and the identity cannot be located.

[0006] The embodiment of the present invention is implemented as follows: a method for generating a real-name contract address, the method comprising the following steps:

[0007] Obtain real-name certificate and contract code;

[0008] An encryption operation is performed on the public key in the real-name certificate and the contract code, and the encryption operation result is encoded to obtain the real-name contract address.

[0009] Another object of an embodiment of the present invention is to provide a real-name contract address generation device, the real-name contract address generation device comprising:

[0010] Acquisition module, used to obtain real-name certificate and contract code;

[0011] The generation module is used to perform encryption operation on the public key in the real-name certificate and the contract code, and encode the encryption operation result to obtain the real-name contract address.

[0012] Another object of an embodiment of the present invention is to provide a computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the real-name contract address generation method described in any one of the above embodiments.

[0013] The real-name contract address generation method provided in the embodiment of the present invention introduces a real-name certificate when generating a real-name contract address, so that the subsequent series of transactions based on the real-name contract address can be traced back to their sources, and the blockchain network transactions can be supervised, ensuring the legality of the contract, safety and speed, and the real-name data cannot be tampered with. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 An application environment diagram of the real-name contract address generation method provided by an embodiment of the present invention;

[0015] Figure 2 A flowchart of a method for generating a real-name contract address provided in an embodiment of the present invention;

[0016] Figure 3 for Figure 2 A specific flow chart for generating a real-name contract address;

[0017] Figure 4 A flowchart of creating a contract using a real-name contract address provided by an embodiment of the present invention;

[0018] Figure 5 A flowchart of using a real-name contract address to call a contract provided by an embodiment of the present invention;

[0019] Figure 6 A flowchart of creating a real-name contract or invoking a transaction provided by an embodiment of the present invention;

[0020] Figure 7 A flowchart of using a real-name contract address to query a balance provided by an embodiment of the present invention;

[0021] Figure 8 A structural block diagram of a real-name contract address generation device provided in an embodiment of the present invention;

[0022] Fig. 9 for Figure 7 The structural block diagram of the generated module;

[0023] Fig.10 The present invention provides an internal structure block diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0025] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.

[0026] Figure 1 The application environment diagram of the real-name contract address generation method provided by the embodiment of the present invention is as follows: Figure 1 As shown, in the application environment, a creation node 110 , a call node 120 and other nodes 130 are included.

[0027] In the embodiments of the present invention, each node can be an independent physical server or terminal, or a server cluster composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage, and CDN; wherein the terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc. that has the ability to participate in the blockchain network, but is not limited to this. Each node communicates with each other through the blockchain network.

[0028] In the embodiment of the present invention, the naming of each node is based on the role it plays in a transaction process. The same node may play different roles in different transactions. In a transaction, at least one creation node 110, one call node 120 and several other nodes 130 are included. In fact, other nodes 130 do not necessarily exist in a transaction process, but in reality, there are many other nodes 130. In the embodiment of the present invention, other nodes 130 include but are not limited to packaging nodes and verification nodes.

[0029] In the embodiment of the present invention, the real-name contract address generation method provided by the present invention is mainly applied to the creation node 110. The creation node follows the method provided by the present invention in the process of creating a contract, and can generate a real-name contract address, and trace all subsequent transactions related to the real-name contract address according to the real-name contract address. It should be understood that the method provided by the embodiment of the present invention is not necessarily executed by the same node, and can be executed by multiple nodes in a blockchain network.

[0030] like Figure 2 As shown, in one embodiment, a real-name contract address generation method is proposed. This embodiment mainly applies this method to the above Figure 1 The creation node 110 in is used as an example. A method for generating a real-name contract address may specifically include steps S202 to S204.

[0031] Step S202, obtaining a real-name certificate and a contract code.

[0032] In the embodiment of the present invention, the real-name certificate is issued by a third-party organization that has been certified by community voting after verifying the real-name information. After the real-name certificate is issued, the use of the real-name certificate is time-limited. After the real-name certificate expires, the owner of the real-name certificate can resubmit an application to obtain a new real-name certificate using the private key of the old certificate. The contract code can be written by the user or obtained by other means, which is not specifically limited in the embodiment of the present invention.

[0033] Step S204, performing encryption operation on the public key in the real-name certificate and the contract code, and encoding the encryption operation result to obtain the real-name contract address.

[0034] In the embodiment of the present invention, since the real-name certificate is issued by an authoritative organization, the public key on the real-name certificate can be used to verify the identity. The real-name contract address points to a real-name contract, and a series of transactions related to the contract include the real-name contract address, so that the transaction can be traced. In the embodiment of the present invention, there are multiple algorithms for encryption operations, and the specific algorithm used is not specifically limited in the embodiment of the present invention.

[0035] The real-name contract address generation method provided in the embodiment of the present invention introduces a real-name certificate when generating a real-name contract address, so that the subsequent series of transactions based on the real-name contract address can be traced back to their sources, and the blockchain network transactions can be supervised, ensuring the legality of the contract, safety and speed, and the real-name data cannot be tampered with.

[0036] In one embodiment, Figure 3 As shown, step S204 may specifically include the following steps:

[0037] Step S302: Perform an encryption operation on the public key in the real-name certificate using a hash operation to obtain a public key hash value.

[0038] Step S304: Perform a hash operation on the contract code to obtain a contract code hash value.

[0039] In the embodiment of the present invention, the encryption operation adopts a hash algorithm, which transforms an input of any length into an output of a fixed length through a hash algorithm, and the output is a hash value. This conversion is a compression mapping, and the space of hash values ​​is usually much smaller than the space of inputs. Different inputs may hash to the same output, so it is impossible to determine the unique input value from the hash value. Simply put, it is a function that compresses a message of any length into a message digest of a fixed length. The hash algorithm is currently recognized as a relatively safe and reliable encryption algorithm.

[0040] Step S306: Combine the address header of the contract code, the public key hash value, and the code hash value in order and encode them according to preset rules to obtain the real-name contract address.

[0041] In the embodiment of the present invention, the encoding may adopt the BASE58 encoding rule, and of course other encoding rules may also be adopted; in particular, the order of the address header, public key hash value and code hash value of the contract code may also be adjusted accordingly, which is not necessarily carried out in accordance with the embodiment of the present invention. The embodiment of the present invention only provides a specific and feasible implementation method and is not intended to limit the scope of protection of the present invention.

[0042] The real-name contract address generation method provided in the embodiment of the present invention generates a real-name contract address through the address header, public key hash value and code hash value of the contract code after encoding, so that the real-name contract address carries the public key hash information that can trace the user's identity, and realizes the traceability of a series of transactions based on the real-name contract address, so that transactions can be carried out under supervision.

[0043] In one embodiment, Figure 4 As shown, a real-name contract address generation method is Figure 2 The difference compared with the method shown is that it also includes steps S402~S410.

[0044] Step S402, selecting a balance from a blockchain wallet and verifying whether the balance is available.

[0045] In the embodiment of the present invention, blockchain money is a functional module in the blockchain node for managing virtual currency. The balance in the embodiment of the present invention is the balance of virtual currency. The balance is the basis for the blockchain node to conduct transactions. This is the basic setting of the blockchain network and will not be elaborated in this article.

[0046] Step S404, verify whether the real-name contract address is valid.

[0047] In an embodiment of the present invention, verifying the real-name contract address includes verifying whether the term of the corresponding real-name certificate is within the validity period, and also including verifying whether the public key is consistent. As a specific implementation method, the verification may include the following steps: obtaining the real-name contract address; comparing the real-name contract address public key with the obtained certificate public key, if they are consistent, the verification is passed; otherwise, the verification fails.

[0048] Step S406: If the balance is available and the real-name contract address is valid, additional information including the real-name contract address and code is generated, and the real-name contract creation transaction is broadcast.

[0049] In an embodiment of the present invention, broadcasting a creation transaction refers to sending a message to the blockchain network that the node has created a contract. The message may include relevant information such as the address of the newly created contract. If the node that receives the message wants to call the contract, it can initiate a contract call transaction based on the message.

[0050] Step S408: calling the virtual machine to execute the real-name contract creation transaction to generate a real-name contract return transaction and broadcasting the real-name contract return transaction.

[0051] In the embodiment of the present invention, the virtual machine is a transaction execution module in the node, which can be only a software module or can include necessary hardware structures, and the embodiment of the present invention does not specifically limit this. In the embodiment of the present invention, the role of the virtual machine is to execute the contract, which actually runs the code in the contract to generate the corresponding return transaction.

[0052] Step S410: Pack the real-name system contract return transaction into a block, update the real-name system state information, and store the real-name system certificate.

[0053] In the embodiment of the present invention, packaging the real-name contract return transaction into the block is not necessarily performed at the contract creation node. After the return transaction is broadcast, it is received by the packaging node, which searches for the package and writes it into the block.

[0054] The real-name contract address generation method provided by the embodiment of the present invention can create a contract through the above steps after generating the real-name contract address, which is actually the beginning of the transaction using the real-name contract address. This process is based on the existence of the real-name contract address and is different from the existing contract creation process. It mainly includes the verification of the validity of the real-name contract address and the real-name contract address contains information on the real-name certificate that can be traced back to the source. Through this setting, the constructed contract can be effectively supervised.

[0055] In one embodiment, Figure 5 As shown, a real-name contract address generation method is Figure 2Compared with the method shown in the figure, the difference is that it also includes steps S502~S412.

[0056] Step S502, selecting a balance from a blockchain wallet and verifying whether the balance is available.

[0057] In the embodiment of the present invention, blockchain money is a functional module in the blockchain node for managing virtual currency. The balance in the embodiment of the present invention is the balance of virtual currency. The balance is the basis for the blockchain node to conduct transactions. This is the basic setting of the blockchain network and will not be elaborated in this article.

[0058] Step S504, verify whether the real-name contract address is valid.

[0059] In an embodiment of the present invention, verifying the real-name contract address includes verifying whether the term of the corresponding real-name certificate is within the validity period, and also including verifying whether the public key is consistent. As a specific implementation method, the verification may include the following steps: obtaining the real-name contract address; comparing the real-name contract address public key with the obtained certificate public key, if they are consistent, the verification is passed; otherwise, the verification fails.

[0060] Step S506: If the balance is available and the real-name contract address is valid, the real-name contract call transaction input and output and the real-name call additional information are generated, and the real-name contract call transaction is broadcast.

[0061] Step S508, obtain the real-name contract call transaction from the memory pool and parse the transaction input.

[0062] Step S510: calling a virtual machine to execute the real-name contract creation transaction to generate a real-name contract return transaction and broadcasting the real-name contract return transaction.

[0063] In the embodiment of the present invention, the virtual machine is a transaction execution module in the node, which can be only a software module or can include necessary hardware structures, and the embodiment of the present invention does not specifically limit this. In the embodiment of the present invention, the role of the virtual machine is to execute the contract, which actually runs the code in the contract to generate the corresponding return transaction.

[0064] Step S512: Pack the real-name system contract return transaction into the block and update the real-name system state information.

[0065] In the embodiment of the present invention, packaging the real-name contract return transaction into the block is not necessarily performed at the contract creation node. After the return transaction is broadcast, it is received by the packaging node, which searches for the package and writes it into the block.

[0066] The real-name contract address generation method provided in the embodiment of the present invention can perform contract calls through the above steps after generating the real-name contract address, which actually uses the real-name contract address to initiate a transaction process. This process is based on the existence of the real-name contract address and is different from the existing transaction initiation process. It mainly includes the verification of the validity of the real-name contract address and the real-name contract address contains information on the real-name certificate that can be traced back to the source. Through this setting, the constructed contract can be effectively supervised.

[0067] In one embodiment, Figure 6 As shown, a real-name contract address generation method is Figure 2 Compared with the method shown in FIG. 1 , the difference is that it further includes steps S602 to S612:

[0068] Step S602, select the real-name contract address balance from the blockchain wallet.

[0069] Step S604, verifying the validity of the real-name contract address.

[0070] In the embodiment of the present invention, the verification of the validity of the real-name contract address can refer to the relevant description of the embodiment of the present invention, and the embodiment of the present invention will not be repeated here.

[0071] Step S606: If the verification is successful, check whether the balance of the real-name contract address is available.

[0072] Step S608: If available, generate the real-name contract call transaction input and output or generate the real-name contract address and code additional information.

[0073] In the embodiment of the present invention, it can be understood that if it is a real-name contract creation process, the real-name contract address and code additional information are generated, and if it is a call transaction creation, the real-name contract call transaction input and output are generated.

[0074] Step S610: Generate additional information for real-name system call.

[0075] Step S612, broadcast the contract creation or call.

[0076] In one embodiment, Figure 7 As shown, a real-name contract address generation method is Figure 2 Compared with the method shown in FIG. 1 , the difference is that it further includes steps S702 to S706:

[0077] Step S702, filter the available real-name contract address balance.

[0078] In the embodiment of the present invention, the available real-name contract address balance means that the balance is in a usable state, is not frozen and can be queried.

[0079] Step S704: Verify the validity of the real-name contract address for the available real-name contract address balance.

[0080] In an embodiment of the present invention, verifying the validity of the real-name contract address may specifically include the following steps: obtaining the real-name contract address; comparing the real-name contract address public key with the obtained certificate public key, if they are consistent, the verification is successful; otherwise, the verification fails.

[0081] Step S706: The balance of the real-name contract address is divided into two states: available and unavailable according to the verification result, and the types and quantities of all TOKENs held by the real-name contract address in the two states are returned.

[0082] In the embodiment of the present invention, the type and quantity of TOKENs determine the type and quantity of resources that can be called. The result returned by the balance query is the type and quantity of TOKENs.

[0083] like Figure 8 As shown, in one embodiment, a real-name contract address generation device is provided, which can be integrated into the above-mentioned creation node 110, and specifically can include an acquisition module 810 and a generation module 820.

[0084] The acquisition module 810 is used to obtain the real-name certificate and the contract code.

[0085] In the embodiment of the present invention, the real-name certificate is issued by a third-party organization that has been certified by community voting after verifying the real-name information. After the real-name certificate is issued, the use of the real-name certificate is time-limited. After the real-name certificate expires, the owner of the real-name certificate can resubmit an application to obtain a new real-name certificate using the private key of the old certificate. The contract code can be written by the user or obtained by other means, which is not specifically limited in the embodiment of the present invention.

[0086] The generation module 820 is used to perform encryption operation on the public key in the real-name certificate and the contract code, and encode the encryption operation result to obtain the real-name contract address.

[0087] In the embodiment of the present invention, since the real-name certificate is issued by an authoritative organization, the public key on the real-name certificate can be used to verify the identity. The real-name contract address points to a real-name contract, and a series of transactions related to the contract include the real-name contract address, so that the transaction can be traced. In the embodiment of the present invention, there are multiple algorithms for encryption operations, and the specific algorithm used is not specifically limited in the embodiment of the present invention.

[0088] The real-name contract address generation device provided in the embodiment of the present invention introduces a real-name certificate when generating a real-name contract address, so that the subsequent series of transactions based on the real-name contract address can be traced back to their sources, and the blockchain network transactions can be supervised, ensuring the legality of the contract, safety and speed, and the real-name data cannot be tampered with.

[0089] like Fig. 9 As shown, in one embodiment, the generation module 820 specifically includes: an encryption unit 821, a calculation unit 822 and a coding unit 823.

[0090] The encryption unit 821 is used for the encryption unit, which is used to perform encryption operation on the public key in the real-name certificate by using a hash operation, and obtain a public key hash value after the encryption operation.

[0091] The operation unit 822 is used to perform a hash operation on the contract code to obtain a contract code hash value.

[0092] In the embodiment of the present invention, the encryption operation adopts a hash algorithm, which transforms an input of any length into an output of a fixed length through a hash algorithm, and the output is a hash value. This conversion is a compression mapping, and the space of hash values ​​is usually much smaller than the space of inputs. Different inputs may hash to the same output, so it is impossible to determine the unique input value from the hash value. Simply put, it is a function that compresses a message of any length into a message digest of a fixed length. The hash algorithm is currently recognized as a relatively safe and reliable encryption algorithm.

[0093] The encoding unit 823 is used to combine the address header of the contract code, the public key hash value and the code hash value in sequence and encode them according to preset rules to obtain the real-name contract address.

[0094] In the embodiment of the present invention, the encoding may adopt the BASE58 encoding rule, and of course other encoding rules may also be adopted; in particular, the order of the address header, public key hash value and code hash value of the contract code may also be adjusted accordingly, which is not necessarily carried out in accordance with the embodiment of the present invention. The embodiment of the present invention only provides a specific and feasible implementation method and is not intended to limit the scope of protection of the present invention.

[0095] The real-name contract address generation device provided by the embodiment of the present invention generates a real-name contract address through the address header, public key hash value and code hash value of the contract code after encoding, so that the real-name contract address carries the public key hash information that can trace the user's identity, thereby realizing the traceability of a series of transactions based on the real-name contract address, so that transactions can be carried out under supervision.

[0096] Fig.10The internal structure diagram of a computer device in one embodiment is shown. The computer device may specifically be Figure 1 In the creation node 110. Fig.10 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the real-name contract address generation method provided in the embodiment of the present invention. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute the real-name contract address generation method. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0097] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0098] In one embodiment, the xx device provided by the present application can be implemented in the form of a computer program, and the computer program can be Fig.10 The computer device shown in FIG. 1 is run on the computer device shown in FIG. The memory of the computer device may store various program modules constituting the real-name contract address generation device, for example, Figure 8 The acquisition module and generation module shown. The computer program composed of each program module enables the processor to execute the steps in the real-name contract address generation method of each embodiment of the present application described in this specification.

[0099] For example, Fig.10 The computer device shown can be Figure 8 The acquisition module in the real-name contract address generation device shown executes step S202; the computer device can execute step S204 through the generation module.

[0100] In one embodiment, a computer device is provided, the computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0101] Step S202, obtaining a real-name certificate and a contract code.

[0102] Step S204, performing encryption operation on the public key in the real-name certificate and the contract code, and encoding the encryption operation result to obtain the real-name contract address.

[0103] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following steps:

[0104] Step S202, obtaining a real-name certificate and a contract code.

[0105] Step S204, performing encryption operation on the public key in the real-name certificate and the contract code, and encoding the encryption operation result to obtain the real-name contract address.

[0106] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0107] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0108] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0109] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating a real-name contract address, characterized in that: The real-name contract address generation method comprises the following steps: Obtain real-name certificate and contract code; Performing encryption operation on the public key in the real-name certificate and the contract code, and encoding the encryption operation result to obtain the real-name contract address; The public key in the real-name certificate and the contract code are encrypted, and the encryption result is encoded to obtain the real-name contract address, and then the following steps are further included: Select a balance from a blockchain wallet and verify whether the balance is available; Verify whether the real-name contract address is valid; If the balance is available and the real-name contract address is valid, additional information including the real-name contract address and code is generated, and the real-name contract creation transaction is broadcast; Calling a virtual machine to execute the real-name contract creation transaction to generate a real-name contract return transaction and broadcasting the real-name contract return transaction; Pack the real-name contract return transaction into the block, update the real-name state information, and store the real-name certificate; The creation of a real-name contract or a transaction call includes the following steps: Select the real-name contract address balance from the blockchain wallet; Verify the validity of the real-name contract address; If the verification is successful, check whether the balance of the real-name contract address is available; If available, generate real-name contract call transaction input and output or generate real-name contract address and code additional information; Generate additional information for real-name system call; Broadcast the creation or call of a contract; The balance query of the real-name contract address includes the following steps: Filter the available real-name contract address balance; For the available real-name contract address balance, verify the validity of the real-name contract address; According to the verification results, the balance of the real-name contract address is divided into two states: available and unavailable, and the types and quantities of all TOKENs held by the real-name contract address in the two states are returned.

2. The method for generating a real-name contract address according to claim 1, characterized in that: The encryption operation is performed on the public key in the real-name certificate and the contract code, and the encryption operation result is encoded to obtain the real-name contract address, which specifically includes the following steps: Performing an encryption operation on the public key in the real-name certificate by using a hash operation, and obtaining a public key hash value after the encryption operation; Performing a hash operation on the contract code to obtain a contract code hash value; The address header of the contract code, the public key hash value and the code hash value are combined in sequence and encoded according to preset rules to obtain the real-name contract address.

3. The method for generating a real-name contract address according to claim 1, characterized in that: The verification of the real-name contract address includes the following steps: Get the real-name contract address; The real-name contract address public key is compared with the obtained certificate public key. If they are consistent, the verification passes; otherwise, the verification fails.

4. A real-name contract address generation device, characterized in that: The real-name contract address generating device comprises: Acquisition module, used to obtain real-name certificate and contract code; A generation module, used to perform encryption operation on the public key in the real-name certificate and the contract code, and encode the encryption operation result to obtain the real-name contract address; The public key in the real-name certificate and the contract code are encrypted, and the encryption result is encoded to obtain the real-name contract address, and then the following steps are further included: Select a balance from a blockchain wallet and verify whether the balance is available; Verify whether the real-name contract address is valid; If the balance is available and the real-name contract address is valid, additional information including the real-name contract address and code is generated, and the real-name contract creation transaction is broadcast; Calling a virtual machine to execute the real-name contract creation transaction to generate a real-name contract return transaction and broadcasting the real-name contract return transaction; Pack the real-name contract return transaction into the block, update the real-name state information, and store the real-name certificate; The creation of a real-name contract or a transaction call includes the following steps: Select the real-name contract address balance from the blockchain wallet; Verify the validity of the real-name contract address; If the verification is successful, check whether the balance of the real-name contract address is available; If available, generate real-name contract call transaction input and output or generate real-name contract address and code additional information; Generate additional information for real-name system call; Broadcast the creation or call of a contract; The balance query of the real-name contract address includes the following steps: Filter the available real-name contract address balance; For the available real-name contract address balance, verify the validity of the real-name contract address; According to the verification results, the balance of the real-name contract address is divided into two states: available and unavailable, and the types and quantities of all TOKENs held by the real-name contract address in the two states are returned.

5. The real-name contract address generation device according to claim 4, characterized in that: The generation module specifically includes: An encryption unit, used to perform an encryption operation on the public key in the real-name certificate using a hash operation, and obtain a public key hash value after the encryption operation; A computing unit, used for performing a hash operation on the contract code to obtain a contract code hash value; The encoding unit is used to combine the address header of the contract code, the public key hash value and the code hash value in sequence and encode them according to preset rules to obtain the real-name contract address.

6. A computer device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the real-name contract address generation method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Ring signature-based block chain anonymous trading method

    CN106779704A

  • Digital asset transaction method and device, medium and equipment

    CN108694668A

  • Intelligent contract address generation method, device, computer device, and readable storage medium

    CN109040341A

  • Method for realizing blockchain transaction real-name system

    CN110517043A