Skip to content

Latest commit

 

History

History
82 lines (64 loc) · 3.67 KB

usage.md

File metadata and controls

82 lines (64 loc) · 3.67 KB

Using Private Data Objects

This document describes what to do with your Hyperledger Private Data Objects project once you have followed the steps in the installation guide.

The easiest way to test the basic functionality is to follow the instructions in the docker guide. This document contains information about running the various services outside the containers.

Table of Contents

The environment guide describes various environment variables used mainly to build and install PDO. Configuration of the various applications that are part of the project generally combine environment variables (that describe the installation), a configuration file, and command line switches.

Configuration files are located by default in the directory ${PDO_HOME}/etc. The four primary applications each use their own configuration file:

Application Description Configuration File
eservice contract enclave service eservice.toml
pservice contract provisioning service pservice.toml
sservice state storage service associated with an enclave service sservice.toml
pdo-shell the PDO client shell for creating contracts and invoking methods pcontract.toml

Default versions of the configuration files are constructed during the build process. The default setup provides configuration files for five different service instances plus the pdo-shell client configuration.

Using PDO requires a running instance of a ledger. Documentation for building, installing and running Microsoft CCF is available.

PDO provides a script to start and configure the ledger (see ledgers/ccf/scripts/start_ccf_network.sh). If "${SGX_MODE}" == "SIM", the script configures the PDO TP to skip attestation checks. If "${SGX_MODE}" == "HW", the script configures the PDO TP to enforce attestation checks. In this case, a policy must be registered (see README).

The registration of the attestation policy is required if "${SGX_MODE}" == "HW", and irrelevant otherwise. PDO provides the private-data-objects/eservice/bin/register-with-ledger.sh script to automate this procedure. The script is meant to be use by a member of the ledger consortium, at the eservice side, once the contract enclave's MRENCLAVE is available (i.e., once enclave build is completed).

The easiest way to validate that your installation is correct is to run the test utilities in the ${PDO_SOURCE_ROOT}/build directory. With the proper environment variables set and the virtual environment activated as described in the installation guide, run these commands:

cd ${PDO_SOURCE_ROOT}/build
make test

A variety of tests are run that exercise different components of the installation. Note that the test process will start the necessary eservies, pservices and sservices. It assumes that the ledger is already running and configured.