/indy-node

Indy Node

Primary LanguagePythonApache License 2.0Apache-2.0

logo

About Indy Node

This codebase embodies all the functionality to run nodes (validators and/or observers) that provide a self-sovereign identity ecosystem on top of a distributed ledger. It is the core project for Indy; over time, all other indy-* projects may collapse into this one, except for indy-sdk.

Relationship with Sovrin

This code is independent from but commonly associated with Sovrin. Sovrin is a public utility for identity, built on top of this codebase. People who install sovrin packages (e.g., with sudo apt install sovrin) get prepackaged genesis transactions that integrate with an Indy validator pool using Sovrin's governance and trust framework. However, it is possible to use Indy Node with a different network, using whatever conventions a community chooses.

Getting Started Guide
  • Today, documentation for Indy is sparse. Most materials that exist were written for Sovrin. Therefore, we recommend that developers should explore Sovrin's Getting Started Guide to learn about Indy Node basics. In the future, documentation will be part of indy-sdk.
Hyperledger Wiki-Indy
  • If you haven't done so already, please visit the main resource for all things "Indy" to get acquainted with the code base, helpful resources, and up-to-date information: Hyperledger Wiki-Indy.

Indy Node Repository Structure

Indy Node repo consists of the following parts:

  • indy-node:
    • indy-plenum-based implementation of distributed ledger
    • Extends plenum's base pool functionality with specific transactions support (CLAIM_DEF, SCHEMA, POOL_UPGRADE, etc.)
  • indy-client
    • Contains client and CLI code
    • Will be deprecated soon in favor of indy-sdk, so please use indy-sdk for your own applications dealing with Indy ecosystem.
  • indy-common
    • Common code for both indy-node and indy-client parts
  • scripts
    • Some scripts that can be run for installed Node (in particular, scripts to start Nodes, generate keys, prepare test Network, etc.)
  • doc
    • a folder with documentation
  • dev-setup
    • a folder with scripts helping to configure development environment (python, dependencies, projects, virtual environment)

Dependent Projects

  • indy-plenum
    • The heart of the distributed ledger technology inside Hyperledger Indy.
    • Most probably you will need to make changes in Plenum if you want to contribute to Indy. So, if you want to work with Indy Node, you will need to have the Plenum code as well in most of the cases and work with two projects at the same time (see How to Start Working with the Code below).
  • indy-anoncreds
    • A python implementation of the anonymous credentials ideas developed by IBM Research.
    • This is quite independent from indy-node/plenum. So, in most cases you don't need this code to contribute to Indy-Node.
    • It will be deprecated soon in favor of anoncreds implementation in indy-sdk (see below).
  • indy-sdk
    • An official SDK for Indy.
    • it contains client and anoncreds implementation
    • You don't need it to contribute to Indy-Node. But please use indy-sdk for your own applications dealing with Indy ecosystem.
    • It will replace indy-client and indy-anoncreds parsts soon.
  • indy-crypto
    • A shared crypto library
    • It's based on AMCL
    • In particular, it contains BLS multi-signature crypto needed for state proofs support in Indy.

Contact us

  • Bugs, stories, and backlog for this codebase are managed in Hyperledger's Jira. Use project name INDY.
  • Join us on Jira's Rocket.Chat at #indy and/or #indy-node channels to discuss.

How to Contribute

How to Install a Test Network

You can have a look at Start Nodes to understand what needs to be done to create a Network, initialize and start Nodes, and what scripts are provided for this.

The described process is automated in one of the ways below (it allow to install a test Network):

How to Start Working with the Code

Please have a look at Dev Setup

How to Start Indy Client CLI

Once installed, you can play with the command-line interface by running Indy from a terminal.

Note: For Windows, we recommended using either cmder or conemu.

indy

Continues Integration and Delivery

Please have a look at Continues integration/delivery

How to send a PR

  • Make sure that all your commits have a DCO sign-off from the author
  • Make sure that static code validation passed (you can run flake8 . on the project root to check it; you can install flake8 from pypi: pip install flake8)
  • Provide a full description of changes in the PR including Jira ticket number if any
  • Put the link to the PR to #indy-pr-review channel in Rocket.Chat
  • A reviewer needs to start your tests first (add test this please comment to the PR)
  • You need to make sure that all the tests pass
  • A reviewer needs to review the code and approve the PR. If there are review comments, they will be put into the PR itself.
  • You must process them (feel free to reply in the PR threads, or have a discussion in Rocket.Chat if needed)
  • A reviewer or maintainer will merge the PR (we usually use Squash)

How to send a PR to both plenum and node

If you made changes in both indy-plenum and indy-node, you need to do the following:

  • Raise a PR to indy-plenum's master and wait until code is reviewed and merged (see above)
    • So, a new build of indy-plenum is created
  • Note a just built version of indy-plenum (indy-plenum-dev in pypi): X.Y.Z (you can check it either on tags/releases page, pypi or on CI server).
  • Change indy-plenum-dev's dependency version to the new one in indy-node's setup.py.
  • Raise PR to indy-node's master and wait until code is reviewed and merged (see above)
    • So, a new build of indy-node is created

How to Understand the Code