Receipt storage method and node combining code labeling and user type
A user type and node technology, applied in the blockchain field, can solve problems such as high complexity, little consideration of privacy performance, and poor versatility
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
example 1
[0046]
[0047]
[0048] In the code of the smart contract based on the Solidity language, one or more objects can be identified by exposing the identifier, so that the receipt content corresponding to this part of the object in the receipt data can be stored in plain text, while the rest of the receipt content can be stored in encrypted form. stored in text form. Similarly, in the code of smart contracts written based on Serpent, LLL language, etc., one or more objects can also be marked by exposing identifiers, so as to realize the plain text storage of relevant receipt content.
[0049] The exposure identifier may be a receipt field dedicated to indicate that plaintext storage is required, for example, the keyword plain may be used to represent the exposure identifier. Then, for the receipt content that is expected to be stored in plain text, plain can be added before the corresponding object (or it can be associated with the corresponding object in other ways).
example 2
[0051]
[0052] In the above code example 2, by adding the exposed identifier plain at the front of the code of the smart contract, after the code of the smart contract is executed, if the transaction initiator belongs to the preset user type, all fields in the generated receipt data are stored in plain text.
[0053] Of course, in other embodiments, the fields that need to be stored in plain text may also be specified. For example, when the From field is marked by an exposed identifier, after the code of the smart contract is executed, if the transaction initiator belongs to the preset user type, the receipt content corresponding to the From field in the generated receipt data will be displayed in plain text. storage, and subsequent retrieval operations can be performed on the receipt content in the From field, for example, the transaction volume initiated by a certain account can be counted.
[0054] It should be pointed out that: in the above code example 2 and its rela...
example 3
[0056]
[0057] In the above code example 3, by adding the exposure identifier "plain" before the type int of the state variable "price" (or, the exposure identifier plain can be placed after the type int), so that when the transaction initiator belongs to the preset For the user type, in each field of the receipt data (usually including Topic field, Output field, etc.) generated after the code of the smart contract is executed, the receipt content related to the state variable "price" is stored in plain text, then the subsequent Retrieval operations can be performed on the receipt content associated with the state variable "price". Since the state variable "price" belongs to the contract-level object in Code Example 3, when the code of the smart contract contains multiple events, the contract-level object can be applied to all events in the smart contract, then when multiple events generate their own For the corresponding Logs field, each Logs field (such as the Topic fiel...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


