Once the deck of cards are shuffled, the game will start by dealing player’s hole cards.
In Texas Hold’em, each player has two hole cards.
For example, assume we have 6 players in the game, and if you are the UTG position, you will get the 1st and the 7th card
(In our real implementation, it is simplified to the 1st and 2nd).
So before you can start, every players have to share with you the keys they applied to these two cards.
In a game with 6 players, there’re 60 keys to share in total, sounds like a bit of a lot, but fortunately the key sharing process is parallel.
During the game, for all clients, it is obvious which stage the game has reached.
And for each stage, the transactor will provide a list of key idents that can be checked by every clients.
At the mean time, each clients will share their keys.
First, key sharing for player’s hole cards, runs at the beginning of the preflop stage.
Since each shared key can only be read by one client that owns the corresponding card,
the communication will be encrypted based on the method we’ve talked in the previous article.
Second, key sharing for community cards, runs at the beginning of each following street.
Because the community cards are public information, no encryption is necessary for these keys.
Last, key sharing for showdown, runs at the end of the game.
The same as community cards, keys are not encrypted in this case.
The transactor can always identify the key owner, since the request is signed.
But for encrypted keys, it has no way to know whether or not a correct key is shared.
In fact, the transactor has no information other than the public information (community cards and showdown cards).
Only the receiver can distinguish the keys are correct or not.
If a fake key is delivered, the decryption will failed.
Following invalid situations may occur during the gaming process:
The decryption failed;
The required keys are missed;
The data from transactor is not expected;
The data on decentralized storage (after game), are not expected.
If any of those situations occur the game will be interrupted.
For both the transactor and the client, if they see an exception, they will be able to report the situation to the official server, or send the transaction to stop the game.
In a traditional online poker, the client will trust the server.
But according to the design of RACE Poker, in order to allow others to host a transactor which is open sourced.
The trust in any direction is not possible.
Essentially, the consensus exists only when the game goes normally.
For any unexpected situation, stopping the game is the best choice, and the governance from official team or the community is necessary.
Last updated 2 years ago