Overview

This tutorial shows how to use the Sawtooth Go SDK to develop a simple application (also called a transaction family). A transaction family includes these components:

  • A transaction processor to define the business logic for your application. The transaction processor is responsible for registering with the validator, handling transaction payloads and associated metadata, and getting/setting state as needed.

  • A data model to record and store data.

  • A client to handle the client logic for your application. The client is responsible for creating and signing transactions, combining those transactions into batches, and submitting them to the validator. The client can post batches through the REST API or connect directly to the validator via ZeroMQ.

The client and transaction processor must use the same data model, serialization/encoding method, and addressing scheme.

In this tutorial, you will construct a transaction handler that implements XO, a distributed version of the two-player game tic-tac-toe.

Note

This tutorial demonstrates the relevant concepts for a Sawtooth transaction processor and client, but does not create a complete implementation.

For a full Go implementation of the XO transaction family, see https://github.com/hyperledger/sawtooth-sdk-go/tree/master/examples/xo_go.