Learning of software upgrade methods and devices for blockchain
Glossary
Term Definitions Blockchain network is a distributed ledger system maintained by multiple nodes. User node is a computer node connected to the blockchain network and participates in maintaining the ledger. Proposing user node is a user node that initiates a software upgrade proposal. Verifying user node is a user node that votes on the software upgrade proposal. The software upgrade proposal contains the information of the new version of the software and the proposal of the upgrade plan. Voting is the process of verifying that the user node expresses approval or disapproval of the software upgrade proposal. Preset passing condition The conditions that need to be met for the voting result, such as the number of votes in favor reaching a certain proportion. The software version to be upgraded to the new version of the software. Software version information is used to identify the code of the software version, such as the version number. Preset numerical range The range that the number of user nodes of the new version of the software needs to reach, such as more than 90%. Blockchain token Digital assets circulated on the blockchain network, which can be used for operations such as mortgage and voting. Token mortgage uses blockchain tokens as collateral to ensure the seriousness of the proposal. Mortgage amount The number of blockchain tokens mortgaged. Preset mortgage amount The minimum mortgage amount required to initiate a software upgrade proposal. Token mortgage stay period The maximum stay time of the software upgrade proposal in the token mortgage stage. Blockchain number of new blocks generated in a blockchain network within a specific time period. Staking cycle Blockchain threshold The maximum number of blocks allowed during the token staking retention period. Block height The serial number of a block in a blockchain, used to identify the position of a block on the chain. Voting cycle Block number The number of blocks that are voted on after a software upgrade proposal enters the voting phase. Upgrade cycle The number of blocks from the time the software upgrade proposal is passed to the time the new version of the software is officially switched to. Application layer Part of the blockchain network user node software architecture, responsible for processing business logic. Consensus layer Part of the blockchain network user node software architecture, responsible for maintaining network consensus. Network layer Part of the blockchain network user node software architecture, responsible for communication between nodes. Basic type definition layer Part of the application layer, defining the data types used in the blockchain network. Data access object layer Part of the application layer, responsible for storing and reading data. Transaction processing controller layer Part of the application layer, responsible for processing different types of transaction requests. Application management layer Part of the application layer, responsible for managing the life cycle of applications. Software architecture The structure and organization of a software system. Modularity divides a software system into independent modules for easy development and maintenance. Hierarchy divides the software system into different layers, each responsible for different functions. Configurability allows users to configure the software system as needed. Byzantine Fault Tolerance Algorithm A consensus algorithm that can tolerate partial node failures. Loosely coupled modules have weak dependencies, reducing the impact between modules. Handler A function or method that processes a specific type of transaction request. Pluggable Software modules can be added or removed dynamically. Block header A part of a block that contains block metadata information, such as version number and previous block hash value. Consensus state stores the structure of data generated during the consensus process. Short answer questions
Please briefly describe the main steps of the blockchain-based software upgrade method proposed in this invention.
Compared with traditional software upgrade methods, what are the advantages of the method proposed in this invention?
What are the proposing user nodes and verifying user nodes? What roles do they play in the method proposed in this invention?
What conditions must the software upgrade proposal meet to enter the voting stage?
What conditions must the voting result meet to pass the software upgrade proposal?
How does the user node switch to the new version of the protocol after the new version of the software is installed?
What is the software architecture of the user node of the blockchain network?
Why is it said that the method proposed in the present invention can achieve smooth upgrade of blockchain network software?
How does the method proposed in the present invention ensure the security of software upgrade?
What impact does the method proposed in the present invention have on nodes newly added to the blockchain network?
Answers to short-answer questions
The blockchain-based software upgrade method proposed in the present invention mainly includes: the proposing user node initiates a software upgrade proposal, the verifying user node votes on the proposal, decides whether to upgrade the software according to the voting results, the user node downloads and installs the new version of the software, and finally counts the number of upgraded nodes to confirm the success of the upgrade.
Compared with the traditional software upgrade method that requires exporting snapshots to restart the network, the method proposed in the present invention can avoid bifurcation, retain all historical block data, and the newly added nodes can also correctly synchronize and execute all blocks, which is more secure.
The proposing user node is the user node that initiates the software upgrade proposal, and the verifying user node is the user node that votes on the software upgrade proposal. The proposing user node initiates an upgrade proposal, and the verifying user node votes on the proposal to decide whether to upgrade.
The software upgrade proposal needs to meet two conditions to enter the voting stage: one is that the number of pledged blockchain tokens reaches the preset minimum pledge amount; the other is that the time the software upgrade proposal stays in the pledge period does not exceed the maximum number of pledge cycle blockchains.
The voting result needs to meet two conditions to pass the software upgrade proposal: one is that the number of verification user nodes participating in the vote exceeds 2/3 of the total number of nodes; the other is that the number of votes in favor exceeds half of the number of voting nodes.
After the new version of the software is installed, the user node will check whether the upgrade conditions are met at the agreed upgrade block height. If the conditions are met, the configuration information of the new version of the protocol is activated, and the storage partition and transaction processing controller of the new version are bound to the application entry to complete the protocol switch.
The software architecture of the blockchain network user node is divided into the application layer, the consensus layer and the network layer. The application layer is responsible for processing business logic, and is divided from bottom to top into the basic type definition layer, the data access object layer, the transaction processing controller layer and the application management layer.
The method proposed in the present invention performs software upgrades through on-chain governance, and all nodes participate in collaboration and switch to the new version of the protocol at the agreed block height, ensuring a smooth transition of the upgrade process without forks or data loss.
The method proposed in the present invention ensures the security of software upgrades through token pledge and voting mechanisms. Token pledge can prevent malicious nodes from initiating invalid upgrade proposals, and the voting mechanism ensures that only proposals that obtain consensus from most nodes can be executed.
Nodes newly added to the blockchain network can start with the new version of the software and catch up with the network progress by synchronizing historical block data. At the historical block height of the software upgrade, the new node can also correctly switch to the corresponding version of the protocol without affecting its normal operation.
Discussion question
Detailed description of the complete process of the blockchain-based software upgrade method proposed in the present invention, and explain the specific operation and function of each step.
Analyze the advantages and disadvantages of the method proposed in the present invention in solving the problem of blockchain software upgrade, and compare it with other common software upgrade solutions.
Discuss the impact of the method proposed in the present invention on blockchain network governance, and how to use the method to achieve safer and more efficient on-chain governance.
Explain the design concept of the blockchain network user node software architecture, and the significance of modular, hierarchical and configurable design for software upgrades.
Explore the potential challenges and future development directions of the method proposed in the present invention in practical applications, such as how to improve upgrade efficiency and reduce upgrade costs.