A game random number generation method, application and device, equipment and storage medium
A random number and game technology, applied in the field of blockchain, can solve the problems of unstable block hash random number, inability to play blockchain games, and impossibility of data tampering, so as to achieve flexible and controllable lottery time, The game results are stable and not easy to crack
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0037] A random number generation method for games, suitable for blockchain nodes, such as figure 1 shown, including:
[0038]S101. Receive the first transaction sent by the first party; wherein, the first transaction includes the hash value of the first random number locally generated by the first party at the current block height, and the first party is in the Nth block The first random number generated locally at the previous block height, N is a positive integer, and the value of N can be the block rollback height to further strengthen the stable source of random numbers;
[0039] In different blockchain systems, the value of the block rollback height N is different, because the block rollback height in each blockchain system is different. For the public chain Chain33, it is 6 blocks. 12 for Ethereum. By limiting the locally generated first random number to be announced after the rollback interval, it is ensured that the first random number will not be announced after th...
Embodiment 2
[0069] This embodiment proposes a game random number application, which is suitable for blockchain nodes. According to the method for generating game random numbers described in Embodiment 1, as image 3 shown, including:
[0070] After the second random number has passed the specified remainder operation, it is compared with the prediction content of the second trading game that meets the set lottery conditions received before the current block, and the current block is determined according to the game rules of the first game contract. The win or loss of the second undrawn transaction that satisfies the set lottery conditions received before the block.
[0071] Take the game of guessing the size as an example, because the random number of the game of guessing the size only needs to be large or small, so the decimal value of the second random number can be taken as a standard, 1 means large, and 0 means small.
[0072] Use this standard to compare with the game prediction con...
Embodiment 3
[0075] This embodiment proposes a device for generating random numbers for games, which is suitable for blockchain nodes. According to the method for generating random numbers for games described in Embodiment 1, as Figure 4 shown, including:
[0076] The game opens an interface for receiving the first transaction sent by the first party; the first transaction includes the hash value of the first random number locally generated by the first party at the current block height, and the first party is at the Nth The first random number generated locally at the block height before the block;
[0077] It is also used to detect whether there is a second transaction that has not received a lottery that meets the set lottery conditions received before the current block;
[0078] If so, it is further used to use the first random number and the second transaction received before the current block that meets the set lottery conditions to generate a hash value as the second random number...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


