Block generation method, device, equipment and storage medium
A technology of blocks and generation nodes, applied in the field of blockchain, can solve the problems of waste of processing and transmission resources, invalid occupation of storage space, etc., to reduce hollow blocks or invalid blocks, save storage space, and improve rationality. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0026] figure 1 It is a flow chart of a block generation method provided by Embodiment 1 of the present invention. This embodiment can be applied to the consensus mechanism where at least two nodes generate blocks in turn according to the set rules. The method is executed by the block generation node. It can be executed by a block generation device configured in the block generation node. The method specifically includes the following steps:
[0027] S110. When detecting the arrival of the initial processing time of the local node, process the transaction request through at least one transaction processing thread to generate transaction data.
[0028] In a specific embodiment of the present invention, the blockchain network can enable at least two nodes in the blockchain network to enjoy transaction processing rights through elections and other means according to the consensus mechanism and deployed parameters, and take turns as the current block The generation node processe...
Embodiment 2
[0040] On the basis of the first embodiment above, this embodiment provides a preferred implementation of the block generation method, which can detect packing points based on multi-dimensional information. figure 2 It is a flow chart of a block generation method provided by Embodiment 2 of the present invention, such as figure 2 As shown, the method includes the following specific steps:
[0041] S210. Determine the initial processing time of the local node.
[0042] In a specific embodiment of the present invention, the start processing time refers to the start time point when the local node starts a transaction processing thread to process a transaction request. It can be understood that the initial processing time can be the initial block generation time of the local node in this block generation cycle, or it can be earlier than the initial block generation time, that is, transaction processing can be started within the transition time between nodes class thread for tr...
Embodiment 3
[0083] On the basis of the first embodiment above, this embodiment provides a preferred implementation of the block generation method, which can determine the main chain when the block chain forks. Figure 4 A flowchart for determining the main chain of the block chain provided by Embodiment 3 of the present invention, such as Figure 4 As shown, the method includes the following specific steps:
[0084] S410. When detecting the arrival of the initial processing time of the local node, use at least one transaction processing thread to process the transaction request to generate transaction data.
[0085]In a specific embodiment of the present invention, after the initial processing time of the local node is obtained, the time can be detected in real time. If it is detected that the initial processing time of the local node arrives, at least one transaction processing thread is used to process the transaction request to generate transaction data, which is cached as a queue.
...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


