Gameroom is an example Splinter application that allows you to set up private, multi-party circuits (called “gamerooms”) and play tic tac toe with shared state, as managed by two-phase commit consensus between the participants. This example application, as configured, sets up Splinter nodes for two imaginary organizations: Acme Corporation and Bubba Bakery.
Running the Gameroom Demo with Docker
Note: To run the demo with prebuilt images from Docker
docker-compose-dockerhub.yaml in all commands
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 --build
Note: To run Gameroom with experimental features enabled, set an environment variable in your shell before running the command above. For example:
export 'CARGO_ARGS= --features experimental'. To go back to building with default features, unset the environment variable:
To extract private keys to use in the web application, run bash using the
generate-registryimage and read the private key. For example, to get Alice’s private key:
$ docker-compose -f examples/gameroom/docker-compose.yaml run generate-registry bash root@<container-id>:/# cat /registry/alice.priv <the private key value> root@<container-id>:/#
The keys available are
In a browser, navigate to the web application UI for each organization:
When you are finished, shut down the demo with the following command:
$ docker-compose -f examples/gameroom/docker-compose.yaml down