Gameroom is a demo Splinter application that allows you to set up dynamic multi-party circuits (called "gamerooms") and play tic tac toe with shared state, as managed by two-phase-commit consensus between the parties. This example application, as configured, sets up Splinter nodes for two imaginary organizations: Acme Corporation and Bubba Bakery.
Note: This demo uses the Sabre smart contract engine provided in Sawtooth Sabre and the XO smart contract provided in the Hyperledger Sawtooth Rust SDK.
Prerequisites: This demo requires Docker Engine and Docker Compose.
-
Clone the splinter repository.
-
To start Gameroom, run the following command from the Splinter root directory:
docker-compose -f examples/gameroom/docker-compose.yaml up
-
To extract private keys to use in the web application, run bash using the
generate-key-registry
image and read the private key. For example, to get Alice's private key:$ docker-compose -f examples/gameroom/docker-compose.yaml run generate-key-registry bash root@<container-id>:/# cat /key_registry/alice.priv; echo "" <the private key value> root@<container-id>:/#
The keys available are
alice
andbob
. -
In a browser, navigate to the web application UI for each organization:
-
Acme UI: http://localhost:8080
-
Bubba Bakery UI: http://localhost:8081
-
-
When you are finished, shut down the demo with the following command:
docker-compose -f examples/gameroom/docker-compose.yaml down