CN116048886A - Method and device for performing active-standby switching of block chain nodes - Google Patents

Method and device for performing active-standby switching of block chain nodes Download PDF

Info

Publication number
CN116048886A
CN116048886A CN202211736480.9A CN202211736480A CN116048886A CN 116048886 A CN116048886 A CN 116048886A CN 202211736480 A CN202211736480 A CN 202211736480A CN 116048886 A CN116048886 A CN 116048886A
Authority
CN
China
Prior art keywords
lock
information
database
information table
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211736480.9A
Other languages
Chinese (zh)
Inventor
陈骁杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202211736480.9A priority Critical patent/CN116048886A/en
Publication of CN116048886A publication Critical patent/CN116048886A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • G06F11/2028Failover techniques eliminating a faulty processor or activating a spare
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Engineering & Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Bioethics (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • Technology Law (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method and apparatus for performing active-standby switching of a blockchain node, the blockchain node including a plurality of computing devices and a database, the database storing a lock information table including device information of a lock holding device and a lock update time, the method being applied to a first computing device, one embodiment of the method comprising: reading a lock information table from a database to obtain first equipment information and first lock update time of current lock holding equipment; if the first equipment information is different from the second equipment information of the first computing equipment, determining whether the lock is overtime or not according to the first lock updating time and the preset lock lease in the lock information table; in response to determining that the lock has timed out, sending a first request to the database to update information in the lock information table; in response to determining that the first request successfully updated information in the lock information table, the primary computing device becomes the blockchain node.

Description

Method and device for performing active-standby switching of block chain nodes
Technical Field
The embodiment of the specification belongs to the technical field of block chains, and particularly relates to a method and a device for performing active-standby switching of block chain nodes.
Background
Blockchain (Blockchain) is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. In the block chain system, the data blocks are combined into a chain data structure in a sequential connection mode according to the time sequence, and the distributed account book which is not tamperable and counterfeit and is ensured in a cryptographic mode is formed. Because the blockchain has the characteristics of decentralization, non-tamperability of information, autonomy and the like, the blockchain is also receiving more and more attention and application.
For the data access scene of a certain alliance participant node of the service direct-connection blockchain, after the node fails, the service client cannot continuously acquire data from the trusted and authorized node, and continuous export of the data is interrupted. For business, it is desirable to always maintain a continuous access connection with the link point. In the data storage layer, a user can access a high-availability database process to achieve high availability guarantee of a data layer, however, when a process or a node server fails in a link point layer, new data are not written into the database by a chain, and the acquisition of the latest data by the user is directly affected. Therefore, in order to ensure real-time and uninterrupted storage of block data in the database, it is necessary to provide the link points with hot standby switching capability.
Disclosure of Invention
One or more embodiments of the present specification describe a method and apparatus for performing a blockchain node active-standby handoff.
According to a first aspect, there is provided a method of performing a master-slave switching of a blockchain node, the blockchain node including a plurality of computing devices and a database, the database having stored therein a lock information table including device information of a lock-holding device and a lock update time, the method being applied to a first computing device, the method comprising: reading the lock information table from the database to obtain first equipment information and first lock update time of the current lock holding equipment; if the first device information is different from the second device information of the first computing device, determining whether the lock is overtime according to the first lock updating time and the preset lock lease in the lock information table; in response to determining that a lock has timed out, sending a first request to the database for updating information in the lock information table, the first request including the first device information, the first lock update time, and the second device information, the database being configured to update the lock information table according to the first request when it is determined that the information in the lock information table matches the first device information and the first lock update time in the first request when the first request is processed; in response to determining that the first request successfully updates information in the lock information table, the master computing device becomes the blockchain node.
According to a second aspect, there is provided an apparatus for performing a master-slave switching of a blockchain node, the blockchain node including a plurality of computing devices and a database, the database storing a lock information table, the lock information table including device information of a lock holding device and a lock update time, the apparatus being provided in a first computing device, the apparatus comprising: a reading unit configured to read the lock information table from the database to obtain first device information and a first lock update time of a current lock holding device; a determining unit configured to determine whether a lock is overtime according to a first lock update time and a preset lock lease in the lock information table if the first device information and the second device information of the first computing device are different; a transmitting unit configured to transmit, in response to a determination that a lock times out, a first request for updating information in the lock information table to the database, the first request including the first device information, the first lock update time, and the second device information, the database being configured to update the lock information table according to the first request when it is determined that the information in the lock information table coincides with the first device information and the first lock update time in the first request when the first request is processed; and a switching unit configured to become a master computing device of the blockchain node in response to determining that the first request successfully updates information in the lock information table.
According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in the first aspect.
According to a fourth aspect, there is provided a computing device comprising a memory having executable code stored therein and a processor which, when executing the executable code, implements the method as described in the first aspect.
According to the method and the device for performing the active-standby switching of the blockchain node, which are provided by the embodiment of the specification, the blockchain node comprises a plurality of computing devices and a database, wherein a lock information table is stored in the database, and the lock information table comprises device information of a lock holding device and lock update time. First, the first computing device may read the lock information table from the database, thereby obtaining the first device information and the first lock update time of the current lock-holding device. If the first device information in the lock information table is different from the second device information of the first computing device, the first computing device is not in possession of the lock, and is not the main computing device, at this time, the first computing device may determine whether the lock is overtime according to the first lock update time in the lock information table and a preset lock lease. If the lock times out, a first request for updating information in the lock information table is sent to the database, wherein the first request can comprise first device information, first lock updating time and second device information. When the database processes the first request, the lock information table is updated according to the first request under the condition that the information in the lock information table is consistent with the first device information and the first lock updating time in the first request. If the first request successfully updates the information in the lock information table, the first computing device becomes the master computing device of the blockchain node. Therefore, by setting the lock information table in the database, smooth switching between the main computing equipment and the standby computing equipment of the block chain node is realized, and high availability of the block chain node is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a block chain architecture diagram in one embodiment;
FIG. 2 shows a schematic diagram of one application scenario in which embodiments of the present description may be applied;
FIG. 3 illustrates a schematic diagram of a first computing device preemptive lock initially;
FIG. 4 illustrates a flow diagram of a method of performing a blockchain node master-slave switch in accordance with an embodiment;
fig. 5 illustrates a schematic block diagram of an apparatus for performing a blockchain node master-slave switch in accordance with an embodiment.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
FIG. 1 illustrates a block chain architecture diagram in one embodiment. In the blockchain architecture diagram shown in fig. 1, the blockchain 100 includes N nodes, and nodes 1-8 are schematically shown in fig. 1. The connections between nodes schematically represent P2P (Peer to Peer) connections, which may be TCP connections or the like, for example, for transmitting data between nodes.
Transactions in the blockchain domain may refer to task units that execute in the blockchain and are recorded in the blockchain. The transaction typically includes a send field (From), a receive field (To), and a Data field (Data). Where the transaction is a transfer transaction, the From field indicates an account address From which the transaction was initiated (i.e., a transfer task To another account was initiated), the To field indicates an account address From which the transaction was received (i.e., a transfer was received), and the Data field includes the transfer amount.
The functionality of the smart contract may be provided in the blockchain. Intelligent contracts on blockchains are contracts on blockchain systems that can be executed by transaction triggers. The smart contracts may be defined in the form of codes. Invoking the smart contract in the blockchain initiates a transaction directed to the smart contract address such that each node in the blockchain runs the smart contract code in a distributed manner.
In the scenario of deploying contracts, for example, bob sends a transaction containing information to create an intelligent contract (i.e., deploying a contract) into a blockchain as shown in fig. 1, the data field of the transaction includes the code (e.g., bytecode or machine code) of the contract to be created, and the to field of the transaction is empty to indicate that the transaction is for deploying the contract. After agreement is reached between the nodes through a consensus mechanism, a contract address of '0 x6f8ae93 …' of the contract is determined, each node adds a contract account corresponding to the contract address of the intelligent contract in a state database, allocates a state storage corresponding to the contract account, stores a contract code, and stores a hash value of the contract code in the state storage of the contract, so that the contract creation is successful.
In the scenario of invoking a contract, for example, bob sends a transaction for invoking a smart contract into the blockchain as shown in fig. 1, the from field of the transaction is the address of the account of the transaction initiator (i.e., bob), the to field is the aforementioned "0x6f8ae93 …", i.e., the address of the invoked smart contract, and the data field of the transaction includes the method and parameters for invoking the smart contract. After the transaction is consensus in the blockchain, each node in the blockchain may execute the transaction separately, thereby executing the contract separately, updating the status database based on execution of the contract.
The consensus mechanism in the blockchain is a mechanism that the blockchain node achieves the full-network consensus on the blockinformation (or blockdata), and can ensure that the latest block is accurately added to the blockchain. The consensus mechanisms of the current mainstream include: proof of Work (POW), proof of equity (POS), proof of commission (Delegated Proof of Stake, DPOS), practical bayer fault tolerance (Practical Byzantine Fault Tolerance, PBFT) algorithms, and the like. Wherein in various consensus algorithms, the success of consensus for a consensus proposal is determined, typically after a preset number of consensus nodes agree on the data to be consensus (i.e. the consensus proposal). Specifically, in the PBFT algorithm, f malicious nodes can be tolerated for N.gtoreq.3f+1 consensus nodes, that is, when 2f+1 nodes in the N consensus nodes agree, success of the consensus can be determined.
As described above, in order to ensure real-time and uninterrupted storage of block data in a database, it is necessary to provide the link points with hot standby switching capability. For this reason, the embodiment of the present disclosure provides a method for performing active-standby switching of a blockchain node, and as an example, fig. 2 shows a schematic diagram of an application scenario in which the embodiment of the present disclosure may be applied.
As shown in fig. 2, in the present application scenario, blockchain node 2 of the blockchain includes a first computing device 201, a second computing device 202, and a database 203. The database 203 stores a lock information table 2031, and the lock information table 2031 may include a block number, device information of a lock-holding device, and a lock update time. In this example, initially, the first computing device 201 is the standby computing device and the second computing device 202 holds the lock as the primary computing device. The master computing device may write the tile data in database 203 and the slave computing device may store the tile data to the memory cache. In this example, the block number may refer to the block number of the block in which the lock update time is being written, and the device information of the lock-holding device may be an IP address (Internet Protocol Address ) of the lock-holding device. As an example, in this example, the block number "100", the first device information "1.2.3.4:8888" of the lock holding device, and the first lock update time "2022-03-3 21:00:00" may be included in the lock information table 2031. The first computing device 201 reads the lock information table 2031 from the database 203, resulting in the first device information "1.2.3.4:8888" and the first lock update time "2022-03-3:21:00:00" for the current lock holding device. In this example, the first device information "1.2.3.4:8888" and the second device information "2.4.5.6:0000" of the first computing device 201 are not the same, i.e., the first computing device 201 is not the master computing device. The first computing device 201 may determine whether the lock has timed out based on the first lock update time "2022-03-3 21:00:00" and a preset lock lease in the lock information table 2031. If it is determined that the lock has timed out, the first computing device 201 may send a first request to the database 203 to update information in the lock information table 2031, where the first request may include information such as first device information "1.2.3.4:8888", first lock update time "2022-03-3.21:00:00", second device information of the first computing device 201 "2.4.5.6:0000", and so on. When the database 203 processes the first request, if it is determined that the information in the lock information table 2031 matches the information such as the first device information "1.2.3.4:8888" and the first lock update time "2022-03-3:21:00:00" in the first request, the lock information table 2031 is updated according to the first request. If the first request successfully updates the lock information table 2031, the first computing device 201 succeeds in the master computing device of the blockchain node. Thus, by setting the lock information table 2031 in the database 203, smooth switching between the main and standby computing devices of the blockchain node is achieved, and high availability of the blockchain node is ensured.
As can be seen from the above, before switching between the primary and backup computing devices of the blockchain node, a lock information table needs to be created in the database 203, where the lock information table may include a blocknumber, device information of a lock-holding device, a lock update time, and so on. Initially, the information in the lock information table is empty, that is, a value (value) corresponding to the block number, the device information of the lock holding device, the lock update time, and the like is empty (null). Thereafter, each computing device attempts to rob a lock based on the initial information. As an example, fig. 3 shows a schematic diagram of a first computing device robbing lock initially. In the example shown in fig. 3, a first computing device 201 and a database 203 are included. As shown in fig. 3, a specific lock preemption procedure may be as follows:
s301, the first computing device 201 acquires a lock information table from the database 203. At this time, the information of the lock information table is empty.
S302, the first computing device 201 sends a request for updating information in the lock information table to the database 203 according to the information in the lock information table.
As an example, the lock information table may be stored by an atomic variable, such that the first computing device 201 may request an update of information in the lock information table by invoking a Compare And Swap (CAS) interface. The CAS algorithm is the support of hardware to share data for concurrent operations, and the CAS contains three operands: memory value V, preset value A and updated value B. Writing B to memory if and only if v= =a; otherwise, no operation is performed. For example, assuming that the lock information table is "structured_selection_table", the lock holding device is "lock_wner", and the lock update time is "update_time", the code of the first computing device 201 sending a request for updating information in the lock information table (i.e., a request for robbing a lock) to the database 203 may be as follows:
UPDATE`structured_election_table`
SET 'lock_wner= [ IP address of the present computing device ],' update_time= [ current time ]
WHERE`lock_owner`IS NULL;
That is, an attempt is made to write the IP address of the present computing device and the current time into the lock information table when the lock holding device is empty.
S303, a value is returned to the first computing device 201 for the update request database 203.
S304, the first computing device 201 determines whether to rob the lock according to the return value.
As an example, the first computing device 201 may determine whether to preempt the lock according to the return value of the UPDATE request, for example, UPDATE returns 1 after successfully updating the lock information table, otherwise returns 0. If a lock is preempted, the master computing device as a blockchain node; if the lock is not preempted, then the computing device is the backup (or slave) to the blockchain node.
With continued reference to fig. 4, fig. 4 illustrates a flow diagram of a method of performing a blockchain node master-slave handoff in accordance with an embodiment. In the example shown in FIG. 4, the blockchain node includes several computing devices and databases. The database stores a lock information table, which includes device information of the device in which the lock is held and lock update time. The database may also be used to store block data, e.g., blocks, state data, etc., for the blockchain nodes. The method illustrated in fig. 4 may be performed by a first computing device, which may be any one of a number of computing devices. The first computing device may be any apparatus, device, cluster of devices, etc. having computing, processing capabilities. As shown in fig. 4, the method for performing active-standby switching of a blockchain node may include the following steps:
Step 410, reading the lock information table from the database to obtain the first device information and the first lock update time of the current lock holding device.
In this embodiment, the first computing device may query the information in the lock information table from the database, thereby obtaining the first device information and the first lock update time of the lock holding device currently recorded in the lock information table.
Step 420, if the first device information and the second device information of the first computing device are different, determining whether the lock is overtime according to the first lock update time and the preset lock lease in the lock information table.
In this embodiment, the first computing device may determine whether the first device information of the lock-holding device recorded in the lock information table is identical to the second device information of itself, that is, the first computing device may determine whether itself holds the lock. If the first device information is the same as the second device information, the first computing device is indicated to hold a lock and is the main computing device; if not, it means that the first computing device itself does not hold the lock, and is itself a standby computing device. If the first computing device does not hold the lock, the first computing device may determine whether the lock is timeout according to a first lock update time and a preset lock lease in the lock information table. Specifically, a lock lease period, for example, N seconds, may be preset for the lock. And when the time difference between the first lock updating time and the current time in the lock information table exceeds the lock lease, indicating that the lock is overtime.
In response to determining that the lock has timed out, a first request is sent to the database to update information in the lock information table, step 430.
In this embodiment, if it is determined that the lock has timed out, the first computing device may send a first request to the database to update information in the lock information table. The first request may include first device information, a first lock update time, second device information, and the like. The database is used for updating the lock information table according to the first request when the information in the lock information table is consistent with the first device information and the first lock updating time in the first request when the first request is processed.
In some implementations, the lock information table may be stored by an atomic variable. At this time, the above-mentioned first request for updating the information in the lock information table to the database may be specifically performed as follows: and sending a first request to the database by calling the comparison and exchange interface, and requesting to write the lock information table.
In the implementation mode, the CAS writing can be carried out on the atomic variable in the database in a multithreading mode, the atomic variable is a basic unit of atomic operation, the atomic variable can ensure that a series of atomic operations are not broken, and the safety of thread operations is ensured.
In some implementations, the first computing device may request an update to the lock information table through the CAS interface. The lock information table may further include a first block number, where the first block number may be a block number of a block in which the first lock update time is being written to the database. At this time, the first request may further include the first block number and the block number of the block currently written to the database. The database is used for updating the lock information table according to the first request when the information in the lock information table is consistent with the first equipment information, the first block number and the first lock updating time in the first request when the first request is processed.
For example, assuming that the lock information table is "structured_selection_table", the lock holding device is "lock_wner", and the lock update time is "update_time", the code of the first computing device sending a request to the database for updating the information in the lock information table may be as follows:
UPDATE`structured_election_table`
SET ' block_number= [ block number of block currently written to database ], ' lock_own = [ device information of the present computing device ], ' update_time = [ current time ]
WHERE 'block_number= [ first block number ],' lock_wner= [ first device information ],
"update_time= [ first lock update time ];
in this example, the device information of the present computing device is second device information. The device information may include an IP address.
Step 440, in response to determining that the first request successfully updated the information in the lock information table, becomes the master computing device of the blockchain node.
In this embodiment, for the first request sent by the first computing device, the database may feedback a value, according to which the first computing device may determine whether the first request successfully updates the information in the lock information table. If it is determined that the first request successfully updated the information in the lock information table, the first computing device becomes the master computing device of the blockchain node. As an example, the host computing device may write the block data into the database in accordance with the conventional process flow of the blockchain node. For example, all write operations generated within each block are treated as one complete transaction, which is committed when a blocking event triggers.
In some implementations, the lock information table may also include a first block number, which may be the block number of the block that the first lock update time is writing to the database. After the slave computing device of the first computing device becomes the master computing device, the method for performing the master-slave switching of the blockchain node may further include the following steps:
1) And determining the missing block data in the database according to the first block number and the second block number of the block corresponding to the block proposal with the latest and successful block chain consensus.
For example, assuming that the first block number is 101 and the second block number of the block corresponding to the common proposal of the successful latest common proposal of the blockchain is 105, the block data with the block numbers 101, 102, 103, 104 may be determined to be missing in the database according to the first block number 101 and the second block number 105. As an example, when the original host computing device fails, the original host computing device will not be able to update the information in the lock information table, e.g., the lock update time in the lock information table. At this time, a case of switching between the active and standby may occur. In the event of a failure, the original host computing device may or may not successfully write the block data with the block number 101 in the database. Therefore, the block data with the block number of 101 may or may not be deleted in the database. At this point, for example, the new host computing device may query the database to determine if block data with block number 101 is missing from the database. Or, the new main computing device does not judge whether the block data with the block number of 101 is missing in the database by querying the database, but directly writes the block data with the block number of 101 into the database, and if the block data with the block number of 101 exists in the database, the coverage is performed. Since in a blockchain scenario, all of the write data for a single block is one complete transaction commit in the database, only full writes are successful or full writes fail. Whereas any one computing device updates to the same block number data are idempotent, the above-described overrides do not affect the results. As an example, the missing block data may include a missing block and state data corresponding to the missing block.
2) And acquiring the missing block data in the database, and storing the missing block data into the database.
In some implementations, the first computing device may also synchronize the block data of the master computing device of the blockchain node to the memory cache before becoming the master computing device of the blockchain node. And, the obtaining the block data missing in the database may be specifically implemented as follows: a) In response to determining that the memory cache includes missing first block data in the database, the first block data is retrieved from the memory cache. b) And acquiring second block data from other block chain nodes for the second block data which is not stored in the memory cache and is missing in the database. By the implementation mode, the block data which are missing in the database can be preferentially acquired from the memory cache, and the block data which are not stored in the memory cache are acquired by other block chain nodes, so that the acquisition of the block data can be quickened, and the supplementation of the database is quickened.
Optionally, the first computing device may also delete block data already in the database from the memory cache before becoming the master computing device of the blockchain node. For example, the first computing device may periodically query the block number of the block in the database that was last successfully stored, and delete a portion of the block data in the memory buffer according to the queried block number. For example, assuming that the block number of the latest successfully stored block that is queried is 105, the block data with the block number of 105 or less may be deleted from the memory cache.
It will be appreciated that the new block from the consensus proposal may be cached in the memory cache prior to the missing block data being filled. After the missing data is filled into the database, the master cut is completed, and thereafter, the first computing device, which is the master computing device of the blockchain node, writes the blockdata into the database according to the normal flow.
In some implementations, after the missing data is patched to the database, the method for performing the active-standby switching of the blockchain node may further include the following: and executing a plurality of transactions in the block of the second block number according to the consensus proposal, and updating a database according to the execution results of the plurality of transactions. Updating the database according to the execution results of the plurality of transactions comprises updating a state tree in a state database according to the execution results of the plurality of transactions, generating a block, and storing the generated block in the block database.
In some implementations, the above method for performing a primary-standby switching of a blockchain node may further include the following contents not shown in fig. 4: in response to determining that the first request did not successfully update the information in the lock information table, operation of the slave computing device as a blockchain node continues.
In this implementation, if it is determined that the first request did not successfully update the information in the lock information table, it indicates that the first computing device failed to rob the lock, at which point the first computing device will continue to operate as a slave computing device to the blockchain node. As an example, the slave computing device of the blockchain node does not need to write the blockdata to the database.
In some implementations, the above method for performing a primary-standby switching of a blockchain node may further include the following contents not shown in fig. 4:
s1, if the first device information and the second device information are the same, a second request for updating the information in the lock information table is sent to the database.
In this implementation, if the first device information of the lock holding device recorded in the lock information table is the same as the second device information of the first computing device, it indicates that the first computing device holds the lock itself, and the first computing device is the master computing device. If the first computing device itself holds the lock, the first computing device may send a second request to the database. The second request may include the first device information, the first lock update time, the current time, and so on. The database is used for updating the lock information table according to the second request when the information in the lock information table is consistent with the first device information and the first lock updating time in the second request when the second request is processed.
Optionally, the second request may further include the first block number and a block number of a block currently written to the database. The database is used for updating the lock information table according to the second request when the second request is processed and the information in the lock information table is consistent with the first equipment information, the first block number and the first lock updating time in the second request.
For example, assuming that the lock information table is "structured_selection_table", the lock holding device is "lock_wner", and the lock update time is "update_time", the code of the first computing device sending a second request to the database for updating information in the lock information table may be as follows:
UPDATE`structured_election_table`
SET ' block_number= [ block number of block currently written to database ], ' lock_own = [ device information of the present computing device ], ' update_time = [ current time ]
WHERE 'block_number= [ first block number ],' lock_wner= [ first device information ],
"update_time= [ first lock update time ];
in this example, the device information of the present computing device is second device information. The first device information and the second device information are the same. The device information may include an IP address.
S2, in response to determining that the second request successfully updates the information in the lock information table, the master computing device serving as the blockchain node continues to maintain the lock lease.
In this implementation, for the second request sent by the first computing device, the database may feed back a value to the first computing device, and according to the feedback value, the first computing device may determine whether the second request successfully updates the information in the lock information table. If the second request successfully updates the information in the lock information table, the first computing device continues to maintain the lock lease as the primary computing device of the blockchain node. That is, the first computing device holds the lock for a duration corresponding to the lock lease and operates as the master computing device.
S3, responding to the fact that the second request does not successfully update the information in the lock information table, and enabling the second request to be a slave computing device of the blockchain node.
In this implementation, if the second request fails to update the information in the lock information table, indicating that the lock of the first computing device is preempted, the first computing device becomes a slave computing device of the blockchain node. As an example, when a primary computing device fails, the primary computing device will not be able to update information in the lock information table, e.g., the lock update time in the lock information table, to continue maintaining the lock lease. In this case, a lock timeout may occur, upon which each computing device may rob the lock. A computing device that successfully preempts the lock will become the new master computing device.
Referring back to the above process, in the above-described embodiments of the present specification, a blockchain node includes a number of computing devices and a database having stored therein a lock information table including device information of a lock holding device and lock update time. First, the first computing device may read the lock information table from the database, thereby obtaining the first device information and the first lock update time of the current lock-holding device. If the first device information in the lock information table is different from the second device information of the first computing device, the first computing device is not in possession of the lock, and is not the main computing device, at this time, the first computing device may determine whether the lock is overtime according to the first lock update time in the lock information table and a preset lock lease. If the lock times out, a first request for updating information in the lock information table is sent to the database, wherein the first request can comprise first device information, first lock updating time and second device information. When the database processes the first request, the lock information table is updated according to the first request under the condition that the information in the lock information table is consistent with the first device information and the first lock updating time in the first request. If the first request successfully updates the information in the lock information table, the first computing device becomes the master computing device of the blockchain node. Therefore, by setting the lock information table in the database, smooth switching between the main computing equipment and the standby computing equipment of the block chain node is realized, and high availability of the block chain node is ensured.
According to another embodiment, an apparatus for performing a master-slave switching of a blockchain node is provided and is configured to be disposed on a first computing device.
Fig. 5 illustrates a schematic block diagram of an apparatus 500 for performing a blockchain node master-slave switch in accordance with an embodiment. The blockchain node includes a plurality of computing devices and a database, the database storing a lock information table, the lock information table including device information of a lock holding device and a lock update time, the apparatus 500 includes: a reading unit 501 configured to read the lock information table from the database to obtain first device information and a first lock update time of a current lock-holding device; a determining unit 502 configured to determine whether the lock is overtime according to the first lock update time and a preset lock lease in the lock information table if the first device information and the second device information of the first computing device are different; a transmitting unit 503 configured to transmit, in response to determining that a lock times out, a first request for updating information in the lock information table to the database, the first request including the first device information, the first lock update time, and the second device information, the database being configured to update the lock information table according to the first request when determining that the information in the lock information table coincides with the first device information and the first lock update time in the first request when processing the first request; and a switching unit 504 configured to become a master computing device of the blockchain node in response to determining that the first request successfully updates information in the lock information table.
In some optional implementations of this embodiment, the apparatus 500 further includes: a first update failure unit (not shown) configured to continue operation as a slave computing device of the blockchain node in response to determining that the first request did not successfully update the information in the lock information table.
In some optional implementations of this embodiment, the apparatus 500 further includes: a request transmitting unit (not shown in the figure) configured to transmit a second request for updating information in the lock information table to the database if the first device information and the second device information are the same, the second request including the first device information, the first lock update time, and a current time, the database being configured to update the lock information table according to the second request when determining that the information in the lock information table matches the first device information and the first lock update time in the second request when processing the second request; an updating unit (not shown) configured to continue maintaining a lock lease as a master computing device of the blockchain node in response to determining that the second request successfully updates information in the lock information table; a second update failure unit (not shown) configured to become a slave computing device of the blockchain node in response to determining that the second request did not successfully update the information in the lock information table.
In some optional implementations of this embodiment, the lock information table further includes a first block number, the first request further includes the first block number and a block number of a block currently written to the database, and the database is configured to update the lock information table according to the first request when determining that information in the lock information table is consistent with the first device information, the first block number, and the first lock update time in the first request when processing the first request.
In some optional implementations of this embodiment, the lock information table further includes a first block number; the apparatus 500 further includes: a missing data determining unit (not shown) configured to determine missing block data in the database based on the first block number and a second block number of a block corresponding to a common proposal for which the latest common recognition of the blockchain was successful; an acquisition unit (not shown) configured to acquire missing block data in the database, and store the missing block data in the database.
In some optional implementations of the present embodiment, the missing block data includes a missing block and status data corresponding to the missing block.
In some optional implementations of this embodiment, the apparatus 500 further includes: a database updating unit (not shown) configured to execute a plurality of transactions in the block of the second block number according to the consensus proposal, and update the database according to execution results of the plurality of transactions.
In some optional implementations of this embodiment, the apparatus 500 further includes: a synchronization unit (not shown) configured to synchronize the block data of the main computing device of the block chain node to the memory cache; the acquisition unit is further configured to: acquiring the first block data from the memory cache in response to determining that the memory cache includes missing first block data in the database; and acquiring second block data which is not stored in the memory cache and is missing in the database from other block link points.
In some optional implementations of this embodiment, the apparatus 500 further includes: and a deleting unit (not shown) configured to delete the block data existing in the database from the memory cache.
In some optional implementations of this embodiment, the lock information table is stored by an atomic variable, and the sending unit 503 is further configured to: and requesting to write the lock information table by calling a comparison and exchange interface.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in fig. 4.
According to an embodiment of yet another aspect, there is also provided a computing device including a memory and a processor, wherein the memory has executable code stored therein, and the processor, when executing the executable code, implements the method described in fig. 4.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation device is a server system. Of course, the present application does not exclude that as future computer technology evolves, the computer implementing the functions of the above-described embodiments may be, for example, a personal computer, a laptop computer, a car-mounted human-computer interaction device, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented in an actual device or end product, the instructions may be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment, or even in a distributed data processing environment) as illustrated by the embodiments or by the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, it is not excluded that additional identical or equivalent elements may be present in a process, method, article, or apparatus that comprises a described element. For example, if first, second, etc. words are used to indicate a name, but not any particular order.
For convenience of description, the above devices are described as being functionally divided into various modules, respectively. Of course, when one or more of the present description is implemented, the functions of each module may be implemented in the same piece or pieces of software and/or hardware, or a module that implements the same function may be implemented by a plurality of sub-modules or a combination of sub-units, or the like. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
One skilled in the relevant art will recognize that one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present description may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments. In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing is merely an example of one or more embodiments of the present specification and is not intended to limit the one or more embodiments of the present specification. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of the present specification, should be included in the scope of the claims.

Claims (13)

1. A method for performing active-standby switching of a blockchain node, the blockchain node including a plurality of computing devices and a database, the database storing a lock information table, the lock information table including device information of a lock holding device and a lock update time, the method being applied to a first computing device, the method comprising:
reading the lock information table from the database to obtain first equipment information and first lock update time of the current lock holding equipment;
if the first equipment information is different from the second equipment information of the first computing equipment, determining whether the lock is overtime or not according to the first lock updating time and the preset lock lease period in the lock information table;
in response to determining that a lock is overtime, sending a first request for updating information in the lock information table to the database, wherein the first request comprises the first device information, the first lock updating time and the second device information, and the database is used for updating the lock information table according to the first request when the information in the lock information table is consistent with the first device information and the first lock updating time in the first request when the first request is processed;
In response to determining that the first request successfully updates information in the lock information table, becomes a master computing device of the blockchain node.
2. The method of claim 1, wherein the method further comprises:
in response to determining that the first request did not successfully update the information in the lock information table, continuing to operate as a slave computing device for the blockchain node.
3. The method of claim 1, wherein the method further comprises:
if the first device information and the second device information are the same, sending a second request for updating information in the lock information table to the database, wherein the second request comprises the first device information, the first lock update time and the current time, and the database is used for updating the lock information table according to the second request when the information in the lock information table is consistent with the first device information and the first lock update time in the second request when the second request is processed;
in response to determining that the second request successfully updated information in the lock information table, continuing to maintain a lock lease by a primary computing device that is the blockchain node;
In response to determining that the second request did not successfully update the information in the lock information table, a slave computing device of the blockchain node is made.
4. The method of claim 1, wherein the lock information table further comprises a first block number, the first request further comprising the first block number and a block number of a block currently written to the database, the database to update the lock information table according to the first request if it is determined that information in the lock information table coincides with the first device information, the first block number, and the first lock update time in the first request when the first request is processed.
5. The method of claim 1, wherein the lock information table further comprises a first block number; and
after becoming the master computing device of the blockchain node, the method further includes:
determining the block data which are missing in the database according to the first block number and the second block number of the block corresponding to the common proposal of the latest common proposal of the block chain;
and acquiring the missing block data in the database, and storing the missing block data into the database.
6. The method of claim 5, wherein the missing block data comprises a missing block and state data corresponding to the missing block.
7. The method of claim 6, wherein after the missing data is patched to the database, the method further comprises:
executing a plurality of transactions in the block of the second block number according to the consensus proposal, and updating the database according to the execution result of the plurality of transactions.
8. The method of claim 5, wherein prior to becoming a master computing device of the blockchain node, the method further comprises:
synchronizing the block data of the main computing device of the blockchain node to a memory cache; and
the obtaining the block data missing in the database includes:
acquiring first block data from the memory cache in response to determining that the memory cache includes missing first block data in the database;
and for the second block data which is not stored in the memory cache and is missing in the database, acquiring the second block data from other block link points.
9. The method of claim 8, wherein prior to becoming a master computing device for the blockchain node, the method further comprises:
And deleting the block data existing in the database from the memory cache.
10. The method of claim 1, wherein the lock information table is stored via an atomic variable, the sending a first request to the database to update information in the lock information table comprising:
and requesting to write the lock information table by calling a comparison and exchange interface.
11. An apparatus for performing active-standby switching of a blockchain node, the blockchain node including a plurality of computing devices and a database, wherein a lock information table is stored in the database, the lock information table includes device information of a lock holding device and a lock update time, the apparatus is disposed in a first computing device, and the apparatus includes:
a reading unit configured to read the lock information table from the database to obtain first device information and a first lock update time of the current lock holding device;
a determining unit configured to determine whether a lock is overtime according to a first lock update time and a preset lock lease in the lock information table if the first device information and the second device information of the first computing device are different;
a transmitting unit configured to transmit, in response to determining that a lock is out of time, a first request for updating information in the lock information table to the database, the first request including the first device information, the first lock update time, the second device information, the database being configured to update the lock information table according to the first request when determining that the information in the lock information table coincides with the first device information and the first lock update time in the first request when processing the first request;
And a switching unit configured to become a master computing device of the blockchain node in response to determining that the first request successfully updates information in the lock information table.
12. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-10.
13. A computing device comprising a memory having executable code stored therein and a processor, which when executing the executable code, implements the method of any of claims 1-10.
CN202211736480.9A 2022-12-30 2022-12-30 Method and device for performing active-standby switching of block chain nodes Pending CN116048886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211736480.9A CN116048886A (en) 2022-12-30 2022-12-30 Method and device for performing active-standby switching of block chain nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211736480.9A CN116048886A (en) 2022-12-30 2022-12-30 Method and device for performing active-standby switching of block chain nodes

Publications (1)

Publication Number Publication Date
CN116048886A true CN116048886A (en) 2023-05-02

Family

ID=86125049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211736480.9A Pending CN116048886A (en) 2022-12-30 2022-12-30 Method and device for performing active-standby switching of block chain nodes

Country Status (1)

Country Link
CN (1) CN116048886A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608766A (en) * 2024-01-23 2024-02-27 杭州阿里云飞天信息技术有限公司 Distributed lock processing method, device, storage medium and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117608766A (en) * 2024-01-23 2024-02-27 杭州阿里云飞天信息技术有限公司 Distributed lock processing method, device, storage medium and system
CN117608766B (en) * 2024-01-23 2024-04-30 杭州阿里云飞天信息技术有限公司 Distributed lock processing method, device, storage medium and system

Similar Documents

Publication Publication Date Title
CA3048742C (en) Blockchain-based consensus method and device
CN114827165B (en) Method and block link point for grouping multiple transactions
CN108628688B (en) Message processing method, device and equipment
US10999283B2 (en) Addressing transaction conflict in blockchain systems
CN114679457B (en) Node grouping method in block chain and block chain link point
CN113743942B (en) Transaction execution method, blockchain, master node and master storage device
WO2023160083A1 (en) Method for executing transactions, blockchain, master node, and slave node
CN116048886A (en) Method and device for performing active-standby switching of block chain nodes
US20240232161A9 (en) Distributed table lock application methods, apparatuses, storage media, and electronic devices
US10191959B1 (en) Versioned read-only snapshots of shared state in distributed computing environments
CN115150409B (en) Method for executing transaction in blockchain system, node and computer readable storage medium
CN116366666A (en) Chain state updating method and block link point in block chain system
CN116032756A (en) Method for updating configuration information of application program based on block chain and block chain link point
CN114785800B (en) Cross-link communication method, device, storage medium and computing equipment
CN115098483A (en) Pre-execution cache data cleaning method and block link point
CN115658357A (en) Method and apparatus for replaying blockchain transactions
CN116302714A (en) Method and device for performing active-standby switching of block chain nodes
US10754710B1 (en) Transactional watch mechanism
CN114697344B (en) Method for determining consensus node in blockchain system, node, storage medium and computing device
CN114785853B (en) Method, apparatus, storage medium and computing device for cross-chain communication in a blockchain system
CN115174573B (en) Data broadcasting method in block chain system, node and block chain system
CN116647566A (en) Access management method and device based on block chain
CN116186763A (en) Method and apparatus for processing block data in a blockchain system
CN116455728A (en) State data software version switching method, blockchain node and blockchain system
CN116366429A (en) Node updating method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination