Creating a blockchain account and verifying blockchain transactions
AssigneeAdvanced New Technologies Co., Ltd.
InventorJun Zuo
Life of this patent
Estimating the term…
Abstract
Implementations of this specification provide a method and an apparatus for creating a blockchain account and verifying blockchain transactions. An example method performed by a blockchain platform includes receiving a transaction, the transaction including at least an initiator field that specifies an account to be created, a receiver field that specifies a pre-determined field value, and a data field that specifies a user-defined key control rule. The user-defined key control rule includes at least one 3-tuple, and each 3-tuple includes a key identifier, an action identifier, and a permission setting. The blockchain platform seals the transaction into a block, and sends the sealed transaction to at least one other full node in the blockchain network.
Claims16
A method comprising:
- receiving, by a blockchain platform serving as a full node in a blockchain network, a first transaction for creating a blockchain account, the first transaction comprising at least an initiator field that specifies the blockchain account to be created, and a data field that specifies a user-defined key control rule, wherein the user-defined key control rule specified in the data field comprises at least one tuple, and each tuple comprises a key identifier, an action identifier that indicates an action to be performed, and a permission setting that specifies whether the action indicated by the action identifier is permitted, wherein the key identifier is used to identify a key pair, the key pair comprising one public key and one private key, the key identifier having been generated based on the public key;
- sealing, by the blockchain platform, the first transaction into a block;
- sending, by the blockchain platform, the sealed first transaction to at least one other full node in the blockchain network, thereby creating the blockchain account;
- after the blockchain account has been created, receiving, by the blockchain platform, a second transaction, the second transaction comprising at least an initiator field that specifies the created blockchain account, and an extension field that includes a first-action identifier corresponding to a first action involved in the second transaction, extension data, and a digital signature of the extension field;
- obtaining, by the blockchain platform, the user-defined key control rule defined during creation of the blockchain account;
- determining, by the blockchain platform, a first tuple corresponding to the first-action identifier based on the user-defined key control rule;
- verifying, by the blockchain platform, the second transaction based on at least the first tuple, wherein verifying the second transaction comprises:
- calculating a first digest of the first-action identifier and the extension data;
- obtaining a first public key corresponding to a first key identifier in the first tuple;
- encrypting the digital signature of the extension field by using the first public key, to obtain a second digest;
- comparing the first digest and the second digest;
- and
- in response to determining that the first digest and the second digest are the same, verifying the first action based on the first tuple, wherein verifying the first action comprises:
- obtaining permission setting content in the first tuple;
- and
- in response to the permission setting content indicating that the first action is not permitted, determining that the first action is not successfully verified and that the second transaction is not successfully verified;
- and
- in response to determining that the second transaction is not successfully verified, returning prompt information to a client that initiated the second transaction, wherein the prompt information provides a notification that the second transaction has not been successfully verified.
A computer-implemented system, comprising:
- one or more computers;
- and
- one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform operations comprising:
- receiving, by a blockchain platform serving as a full node in a blockchain network, a first transaction for creating a blockchain account, the first transaction comprising at least an initiator field that specifies the blockchain account to be created, and a data field that specifies a user-defined key control rule, wherein the user-defined key control rule specified in the data field comprises at least one tuple, and each tuple comprises a key identifier, an action identifier that indicates an action to be performed, and a permission setting that specifies whether the action indicated by the action identifier is permitted, wherein the key identifier is used to identify a key pair, the key pair comprising one public key and one private key, the key identifier having been generated based on the public key;
- sealing, by the blockchain platform, the first transaction into a block;
- sending, by the blockchain platform, the sealed first transaction to at least one other full node in the blockchain network, thereby creating the blockchain account;
- after the blockchain account has been created, receiving, by the blockchain platform, a second transaction, the second transaction comprising at least an initiator field that specifies the created blockchain account, and an extension field that includes a first-action identifier corresponding to a first action involved in the second transaction, extension data, and a digital signature of the extension field;
- obtaining, by the blockchain platform, the user-defined key control rule defined during creation of the blockchain account;
- determining, by the blockchain platform, a first tuple corresponding to the first-action identifier based on the user-defined key control rule;
- verifying, by the blockchain platform, the second transaction based on at least the first tuple, wherein verifying the second transaction comprises:
- calculating a first digest of the first-action identifier and the extension data;
- obtaining a first public key corresponding to a first key identifier in the first tuple;
- encrypting the digital signature of the extension field by using the first public key, to obtain a second digest;
- comparing the first digest and the second digest;
- and
- in response to determining that the first digest and the second digest are the same, verifying the first action based on the first tuple, wherein verifying the first action comprises:
- obtaining permission setting content in the first tuple;
- and
- in response to the permission setting content indicating that the first action is not permitted, determining that the first action is not successfully verified and that the second transaction is not successfully verified;
- and
- in response to determining that the second transaction is not successfully verified, returning prompt information to a client that initiated the second transaction, wherein the prompt information provides a notification that the second transaction has not been successfully verified.
A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
- receiving, by a blockchain platform serving as a full node in a blockchain network, a first transaction for creating a blockchain account, the first transaction comprising at least an initiator field that specifies the blockchain account to be created, and a data field that specifies a user-defined key control rule, wherein the user-defined key control rule specified in the data field comprises at least one tuple, and each tuple comprises a key identifier, an action identifier that indicates an action to be performed, and a permission setting that specifies whether the action indicated by the action identifier is permitted, wherein the key identifier is used to identify a key pair, the key pair comprising one public key and one private key, the key identifier having been generated based on the public key;
- sealing, by the blockchain platform, the first transaction into a block;
- sending, by the blockchain platform, the sealed first transaction to at least one other full node in the blockchain network, thereby creating the blockchain account;
- after the blockchain account has been created, receiving, by the blockchain platform, a second transaction, the second transaction comprising at least an initiator field that specifies the created blockchain account, and an extension field that includes a first-action identifier corresponding to a first action involved in the second transaction, extension data, and a digital signature of the extension field;
- obtaining, by the blockchain platform, the user-defined key control rule defined during creation of the blockchain account;
- determining, by the blockchain platform, a first tuple corresponding to the first-action identifier based on the user-defined key control rule;
- verifying, by the blockchain platform, the second transaction based on at least the first tuple, wherein verifying the second transaction comprises:
- calculating a first digest of the first-action identifier and the extension data;
- obtaining a first public key corresponding to a first key identifier in the first tuple;
- encrypting the digital signature of the extension field by using the first public key, to obtain a second digest;
- comparing the first digest and the second digest;
- and
- in response to determining that the first digest and the second digest are the same, verifying the first action based on the first tuple, wherein verifying the first action comprises:
- obtaining permission setting content in the first tuple;
- and
- in response to the permission setting content indicating that the first action is not permitted, determining that the first action is not successfully verified and that the second transaction is not successfully verified;
- and
- in response to determining that the second transaction is not successfully verified, returning prompt information to a client that initiated the second transaction, wherein the prompt information provides a notification that the second transaction has not been successfully verified.
Dependencies are inferred from the claim text.