☎️Communication

RACE Poker's

Transactors relay game data from one client to another (as commonly seen in WebRTC). The data is encrypted by players before being sent, hence not visible to transactor.

1. ED25519

2. AES-CTR

3. RSA

Communication process

When a client A needs to share a card key to player B without revealing it to other players, it reads RSA public key from player B's blockchain account and encrypts the message using it.

Player A sends the encrypted data to player B via Transactor marking:

[SENDER, MESSAGETYPE, MESSAGEDATA, RECEIVER]

Transactor does not know Player B's private part of RSA keypair, so it cannot know the card.

Player B receives the message via transactor & decrypts it with his RSA private key.

What if client loses its RSA private key?

When joing a table client checks his ability to decrypt messages with RSA keypair.

What if malicious client doesn't provide its keys?

This situation is hard to handle since there's no way to distinguish between "someone didn't provide the key" and "someone received the key but he lied". So the governance from community or official team is necessary in this case. Considering the nature of the Texas Hold'em poker and the game will be shutdown when anything is going wrong, it is not cost effective to gain by breaking the game.

Settlement

The transactor will commit the game result to solana program, the program will transfer chips among players. All client will know the result once the transaction is succeed. If a client find the game state is incorrect, it will send a transaction to lock the game, and seek for help from the community.

Community Governance

There are several cases when a exception happen.

The community governance are necessary since there are cases that clients can not reaching consensus with themselves. For example, the consensus is impossible when there are only two players in a game. The programs will only work without governance when there's no malicious client. When things going to an unexpected state, client can choose to send transaction to lock the game.

Last updated