Private XO is a demo Splinter network that allows you to play games of tic tac toe. It is a two-node network with a single circuit and two services. Each node shares state and verifies the committed transactions using a two-phase commit protocol.
Note: This demo uses the existing XO transaction processor provided in Hyperledger Sawtooth.
-
To start Private XO, run the following command from the Splinter root directory:
docker-compose -f examples/private_xo/docker-compose.yaml up
This command starts two Splinter nodes, two private XO services (
private-xo-service-a
andprivate-xo-service-b
), and a shell container for interacting with the nodes (xo-shell
). -
Run the following command in a separate terminal to connect to the
xo-shell
container:docker exec -it xo-shell bash
-
Once connected to the
xo-shell
container, you can use thexo
command to play tic tac toe. See the Sawtooth XO CLI documentation for details on how to play.IMPORTANT: Each
xo
command must identify which service to use: eitherprivate-xo-service-a
orprivate-xo-service-b
. Specify the URL for the service you want. For example:xo create game-1 --url http://private-xo-service-a:8000
-
When you are finished, shut down the demo with the following command:
docker-compose -f examples/private_xo/docker-compose.yaml down