☎️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.
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