Skip to content

Latest commit

 

History

History
 
 

gameroom

How to Run the Gameroom Demo

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.

  1. Clone the splinter repository.

  2. To start Gameroom, run the following command from the Splinter root directory:

    docker-compose -f examples/gameroom/docker-compose.yaml up
    
  3. 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 and bob.

  4. In a browser, navigate to the web application UI for each organization:

  5. When you are finished, shut down the demo with the following command:

    docker-compose -f examples/gameroom/docker-compose.yaml down