Method, blockchain system, apparatus, program, and medium for blockchain authority management
A method, a blockchain system, an apparatus, a program, and a medium, for blockchain authority management. Receiving, by a first node, a node operation request for a second node, the first node being a node manager in the blockchain system; voting, by the first node, on the node operation request, sending a first voting request to another node manager, obtaining a voting result and a voting signature fed back by the another node manager, packaging the obtained voting result and voting signature into a first block, and broadcasting the first block to the blockchain system; verifying, by at least one blockchain node, the voting result and voting signature in the first block, and adding the first block into a local ledger if the voting result and voting signature pass verification; and responding to the node operation request if the voting result in the first block satisfies a first preset condition.
1 . A method for blockchain authority management, which is applied to a blockchain system, comprising:
receiving, by a first node, a node operation request for a second node, the first node being a blockchain node in the blockchain system with role information being a node manager, and a node type of the second node including any one or more of a super node, a backbone node and a service node;
voting, by the first node, on the node operation request, the node operation request comprising any one or more of a first contract name to be called, the node type of the second node, a first operation and a submission account, the first contract name being a name of a system node management contract in the blockchain system, the system node management contract being deployed on a blockchain node in the blockchain system with role information being a node manager, and the first operation being an operation to be executed for the second node;
sending, by the first node, a first voting request to another node manager in the blockchain system, the first voting request requesting the another node manager to vote on the node operation request;
obtaining, by the first node, a voting result of the node manager on the node operation request and a voting signature corresponding to the voting result, packaging the obtained voting result and voting signature into a first block, and broadcasting the first block to the blockchain system;
verifying, by at least one blockchain node in the blockchain system, at least one voting result and a corresponding voting signature in the first block, and synchronizing the first block into a local ledger in a case where the at least one voting result and the corresponding voting signature in the first block pass verification;
responding, by the first node, to the node operation request in a case where the voting result in the first block satisfies a first preset condition with a number of votes passed being greater than a first preset number threshold;
sending, by the second node, a second voting request to a chain creator in the blockchain system in a case where the first operation is a creating operation, the second voting request comprising the role information of the second node and requesting the chain creator to vote on the role information of the second node; and
collecting, by a target chain creator in the blockchain system, a voting result of the chain creator for the role information of the second node and a corresponding voting signature, and setting the role information of the second node in the blockchain system based on the voting result in a case where the voting result and the corresponding voting signature for the role information of the second node pass verification.
2 . The method of claim 1 , wherein the sending, by the first node, the first voting request to another node manager in the blockchain system comprises:
sending, by the first node, a first voting request to the another node manager through the system node management contract, the another node manager being configured to vote on the node operation request through the system node management contract; and
wherein the responding, by the first node, to the node operation request comprises:
executing, by the first node, the first operation for the second node through the system node management contract, and broadcasting the node information of the second node to the blockchain system, the node information of the second node including any one or more of the node type, a node name, a node address, role information and a node status of the second node, and a voting signature of at least one node manager for the node operation request.
3 . The method of claim 2 , wherein the first operation comprises any one or more of a creating operation, an updating operation, a deleting operation or a reporting operation, wherein the node status of the second node is valid in a case where the first operation is the creating operation or the updating operation, and wherein the node status of the second node is invalid in a case where the first operation is the deleting operation or the reporting operation.
4 . The method of claim 2 , wherein the role information of the second node includes any one or more of a chain creator, a node manager, a contract manager, a parameter manager, a role manager and an ordinary user; and
wherein the chain creator is determined by voting by a blockchain node in the blockchain system, and is configured to manage the node manager, the contract manager, the parameter manager and the role manager; the node manager is configured to update the system node management contract and to vote on the node operation request; the contract manager is configured to update the system contract management contract in the blockchain system and to vote on a contract review request for any smart contract in the blockchain system; the parameter manager is configured to update the system parameter management contract in the blockchain system and to vote on a system upgrade request; the role manager is configured to update the system authority role management contract in the blockchain system and to vote on a node authority role authentication request; and the ordinary user is configured to release transactions and smart contracts in the blockchain system.
5 . The method of claim 4 , further comprising:
determining, by a third node, a smart contract to be operated, and sending a contract review request for the smart contract to be operated to the contract manager in the blockchain node, the third node being a blockchain node in the blockchain system with role information being an ordinary user, the contract review request comprising any one or more of a second contract name to be called, a contract type of the smart contract to be operated, a contract content of the smart contract to be operated, a second operation and an account of the third node, the second contract name being a name of a system contract management contract in the blockchain system, and the second operation being an operation to be executed for the smart contract to be operated;
collecting, by a fourth node, a voting result of at least one contract manager for the contract review request and a corresponding voting signature through the system contract management contract, packaging the obtained voting result of the at least one contract manager for the contract review request and the corresponding voting signatures into a second block, and broadcasting the second block to the blockchain system, the fourth node being a blockchain node in the blockchain system with role information being the contract manager;
verifying, by at least one blockchain node in the blockchain system, at least one voting result and a corresponding voting signature in the second block, and synchronizing the second block into a local ledger in a case where the at least one voting result and the corresponding voting signature in the second block pass verification; and
performing, by the fourth node, the second operation on the smart contract to be operated and broadcasting the contract information of the smart contract to be operated to the blockchain system, in a case where the voting result in the second block satisfies the first preset condition.
6 . The method of claim 5 , wherein the contract information comprises any one or more of a contract type, a contract name, a contract address, a contract function description and a contract status of the smart contract to be operated and the voting signature of the contract manager for the contract review request.
7 . The method of claim 1 , wherein the setting the role information of the second node in the blockchain system based on the voting result comprises:
updating the role information of the second node to a corresponding manager list in the blockchain system in a case where the role information of the second node includes any one or more of a node manager, a contract manager, a parameter manager and a node role manager, and where the voting result for the role information of the second node satisfies a first preset condition.
8 . The method of claim 1 , further comprising:
receiving, by a fifth node, a system upgrade request sent by the chain creator in the blockchain system, the system upgrade request comprising any one or more of a third contract name to be called, a target parameter type to be adjusted, a parameter value and an account of the chain creator sending the system upgrade request, the fifth node being a blockchain node in the blockchain system with role information being a parameter manager, the third contract name being a name of a system parameter management contract in the blockchain system, and the system parameter management contract being deployed on a blockchain node in the blockchain system with role information being the parameter manager;
obtaining, by the fifth node, a voting result of at least one parameter manager in the blockchain system for the system upgrade request and a corresponding voting signatures through the system parameter management contract, packaging the obtained voting result and corresponding voting signature into a third block, and broadcasting the third block to the blockchain system, the parameter manager being configured to update the system parameter management contract in the blockchain system and to vote on the system upgrade request;
verifying, by at least one blockchain node in the blockchain system, at least one voting result and a corresponding voting signature in the third block, and synchronizing the third block into a local ledger in a case where the at least one voting result and the corresponding voting signature in the third block pass verification; and
in a case where the voting result in the third block satisfies the first preset condition, upgrading, by the fifth node, the blockchain system based on the system upgrade request to update a value of the target parameter type of the blockchain system to the parameter value, and broadcasting any one or more of the value of the target parameter type of the upgraded blockchain system, a system status and the voting signature of at least one parameter manager for the system upgrade request to the blockchain system.
9 . The method of claim 1 , further comprising:
receiving, by a sixth node, an authority role authentication request sent by a seventh node, the sixth node being a blockchain node in the blockchain system with role information being a role manager, the seventh node being an authority node configured to issue a certificate, the authority role authentication request comprising any one or more of a fourth contract name to be called, a role type of the seventh node, a public key of the seventh node, a third operation and an account of the seventh node, the fourth contract name being a name of the system authority role management contract in the blockchain system, the system authority role management contract being deployed on a blockchain node in the blockchain system with role information being the role manager, and the third operation being an operation to be executed for the seventh node;
collecting, by the sixth node, a voting result of at least one role manager for the authority role authentication request and a corresponding voting signature through the system authority role management contract, packaging the obtained voting result of the at least one role manager for the authority role authentication request and the corresponding voting signature into a fourth block, and broadcasting the fourth block to the blockchain system;
verifying, by at least one blockchain node in the blockchain system, at least one voting result and a corresponding voting signature in the fourth block, and synchronizing the fourth block into a local ledger in a case where the at least one voting result and the corresponding voting signature in the fourth block pass verification; and
in a case where the voting result in the fourth block satisfies the first preset condition, performing, by the sixth node, the third operation on the seventh node and broadcasting the authority role information of the seventh node to the blockchain system.
10 . The method of claim 9 , wherein the authority role information of the seventh node includes any one or more of a role type, a public key, an address of the account of the seventh node, a role information description of the seventh node, a role status of the seventh node, and a voting signature of at least one role manager for the authority role authentication request.
11 . The method of claim 1 , wherein the blockchain system communicates as a first blockchain system with a second blockchain system, the first blockchain system and the second blockchain system jointly comprise a plurality of eighth nodes, and the method further comprises:
based on digital currency assets in the first blockchain system and/or the second blockchain system, determining target nodes from the plurality of eighth nodes through a proof-of-stake mechanism, and setting role information of at least one determined target node as a notary; and
processing, by a notary alliance including notary nodes, a cross-chain payment bill between the first blockchain system and the second blockchain system, the notary node being an eighth node with role information being a notary.
12 . The method of claim 11 , wherein the determining target nodes from the plurality of eighth nodes through a proof-of-stake mechanism based on digital currency assets in the first blockchain system and/or the second blockchain system comprises:
determining, based on the digital currency assets in the first blockchain system, at least one target node from the eighth nodes through the proof-of-stake mechanism; and
determining, based on the digital currency assets in the second blockchain system, at least one target node from the eighth nodes through the proof-of-stake mechanism.
13 . The method of claim 11 , wherein the processing, by the notary alliance including notary nodes, the cross-chain payment bill between the first blockchain system and the second blockchain system comprises:
generating, a first wallet multi-signed by the notary nodes in the first blockchain system, and generating a second wallet multi-signed by the notary nodes in the second blockchain system; and
in a case where at least one notary node detects the generation of a first bill for digital currency asset transfer to the first wallet, activating, in the second wallet, second assets corresponding to the amount of the first assets recorded in the first bill, generating a second bill multi-signed by the notary nodes in the second blockchain system, and transferring the second assets to an asset receiving address designated by a client in the second blockchain system.
14 . The method of claim 13 , further comprising:
in a case where at least one notary node detects that a third bill for digital currency asset transfer to the second wallet is generated, the third bill is associated with the second bill, and the digital currency assets transferred in the third bill match the second assets, generating, in the first blockchain system, a fourth bill multi-signed by the notary nodes and associated with the first bill, and transferring the first assets to an asset receiving address designated by the client in the first blockchain system.
15 . The method of claim 11 , wherein the processing, by the notary alliance including notary nodes, the cross-chain payment bill between the first blockchain system and the second blockchain system comprises:
in a case where the target nodes are determined, activating a first smart contract pre-deployed in the first blockchain system, and informing a client that needs to transfer digital currency assets from the first blockchain system to the second blockchain system through the first smart contract to configure an asset receiving address for paying bills as the first wallet preset in the first blockchain system;
in a case where the first bill for digital currency asset transfer to the first wallet is detected through the first smart contract, verifying the first bill in the notary alliance by triggering a practical Byzantine fault tolerance mechanism and announcing a verification result the second blockchain system; and
after detecting that verification of the first bill in the notary alliance is completed through a second smart contract pre-deployed in the second blockchain system, activating, in a preset second wallet of the second blockchain system, second assets corresponding to the amount of the first assets recorded in the first bill, generating a second bill in the second blockchain system, and transferring the second assets to the asset receiving address designated by the client in the second blockchain system.
16 . The method of claim 15 , further comprising:
in a case where it is detected through the second smart contract that a third bill for digital currency asset transfer to the second wallet is generated, the third bill is associated with the second bill, and digital currency assets transferred in the third bill match with the second assets, verifying the third bill in the notary alliance by triggering a practical Byzantine fault tolerance mechanism and announcing a verification result to the first blockchain system; and
in a case where it is detected through the first smart contract that the verification of the third bill is completed in the notary alliance, generating, in the first blockchain system, a fourth bill associated with the first bill, and transferring the first assets to the asset receiving address designated by the client in the first blockchain system.
17 . The method of claim 11 , wherein the processing, by the notary alliance including notary nodes, the cross-chain payment bill between the first blockchain system and the second blockchain system comprises:
detecting whether the notary node exists in a client initiating the cross-chain payment bill between the first blockchain system and the second blockchain system; and
in a case where the notary node exists in the client initiating the cross-chain payment bill, not processing the cross-chain bill payment.
18 . An electronic apparatus, comprising:
a memory storing executable instructions; and
one or more processors communicating with the memory to execute the executable instructions so as to implement operations of the method of claim 1 .
19 . A blockchain system comprising:
a first node, the first node being a blockchain node in the blockchain system with role information being a node manager, and the first node being configured to:
receive a node operation request for a second node, a node type of the second node including any one or more of a super node, a backbone node and a service node; vote on the node operation request, the node operation request comprising any one or more of a first contract name to be called, the node type of the second node, a first operation and a submission account, the first contract name being a name of a system node management contract in the blockchain system, the system node management contract being deployed on a blockchain node in the blockchain system with role information being a node manager, and the first operation being an operation to be executed for the second node; send a first voting request to another node manager in the blockchain system, the first voting request requesting the another node manager to vote on the node operation request; and obtain a voting result of the node manager on the node operation request and a voting signature corresponding to the voting result, package the obtained voting result and vote signature into a first block, and broadcast the first block to the blockchain system; and
at least one blockchain node, configured to:
verify at least one voting result and a corresponding voting signature in the first block, and synchronize the first block into a local ledger in a case where the at least one voting result and the corresponding voting signature in the first block pass verification; wherein the first node responds to the node operation request in a case where the voting result in the first block satisfies a first preset condition with a number of votes passed being greater than a first preset number threshold; and
the second node, configured to:
send a second voting request to a chain creator in the blockchain system when the first operation is a creating operation, the second voting request comprising role information of the second node and requesting the chain creator to vote on the role information of the second node;
wherein a voting result of the chain creator for the role information of the second node and a corresponding voting signature are collected by a target chain creator in the blockchain system, and the role information of the second node is set in the blockchain system based on the voting result in a case where the voting result and the corresponding voting signature for the role information of the second node pass verification.
20 . An electronic apparatus, comprising the blockchain system of claim 19 .