Book Image

Hyperledger Cookbook

By : Xun (Brian) Wu, Chuanfeng Zhang, Zhibin (Andrew) Zhang
Book Image

Hyperledger Cookbook

By: Xun (Brian) Wu, Chuanfeng Zhang, Zhibin (Andrew) Zhang

Overview of this book

Hyperledger is an open-source project and creates private blockchain applications for a range of domains. This book will be your desk reference as you explore common and not-so-common challenges faced while building blockchain networks using Hyperledger services. We'll work through all Hyperledger platform modules to understand their services and features and build end-to-end blockchain applications using various frameworks and tools supported by Hyperledger. This book's independent, recipe-based approach (packed with real-world examples) will familiarize you with the blockchain development cycle. From modeling a business network to integrating with various tools, you will cover it all. We'll cover common and not-so-common challenges faced in the blockchain life cycle. Later, we'll delve into how we can interact with the Hyperledger Fabric blockchain, covering all the principles you need to master, such as chaincode, smart contracts, and much more. We'll also address the scalability and security issues currently faced in blockchain development. By the end of this book, you will be able to implement each recipe to plan, design, and create a full-fledged, private, decentralized application to meet organizational needs.
Table of Contents (12 chapters)

Granting permissions on the Sawtooth network

In this recipe, we will cover how to configure on-chain and off-chain permissions in the Hyperledger Sawtooth network.

How to do it...

To configure off-chain permissions, follow these steps:

  1. In the validator configuration file present in /etc/sawtooth/validator.toml, update it with the following lines to set the transactor permission for the marketplace example:
[permissions]
transactor = "policy.toml"
"transactor.transaction_signer" = "policy.toml"
  1. In the policy file present in /etc/sawtooth/policy/policy.toml, update the following lines:
PERMIT_KEY 021c9a9d3155d15e5c834b29e995d4f3fb7da54e6aa0b1f43ce753bc77cce36138
DENY_KEY 02b56f55681409e412fb57b91ba02e16760419d202db40690a6d841e879ec11ee7...