Giter Site home page Giter Site logo

bleggett / sawtooth-next-directory Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hyperledger-archives/sawtooth-next-directory

0.0 0.0 0.0 16.97 MB

License: Other

Python 52.83% Shell 0.70% Groovy 0.09% TypeScript 29.51% JavaScript 0.61% CSS 9.39% HTML 6.87%

sawtooth-next-directory's Introduction

Hyperledger Sawtooth Hyper Directory

This repo contains multiple components which together with a Hyperledger Sawtooth validator, will comprise the "blockchain" components of the Hyper Directory project. The components include:

  • a server which provides a REST API for querying blockchain data
  • a transaction processor which handles RBAC-specific transaction logic
  • a ledger sync which writes blockchain state changes to a local database

Usage

The easiest way to run these components is with Docker. To start these components, first install Docker for your platform and clone this repo.

Next, create a server/config.py file based off the example at server/config.py.example. Pay special attention to the secret keys at the bottom of the example file. While other settings have defaults and can be omitted, these keys have no defaults and must be provided to run the server. The examples listed are insecure, and should be replaced before deployment.

Once there is a config file in place, you can simply run:

docker-compose up

This will build all components, start them in individual Docker containers, and download and run the necessary Sawtooth components. Once complete, the REST API will be available at http://localhost:8000.

Later, if the repo is updated, the local components will need to be rebuilt, which can be accomplished using the --build flag:

docker-compose up --build

Once all the docker containers are running without error, see ui/readme.md for configuring / running the UI server.

Development

Docker containers are also available for developers, and are marked with a -dev tag in their filename. There are a few differences between how these containers work compared to the defaults:

  • they do not need to be rebuilt when local files change
  • Protobuf files will need to be built locally
  • some dependencies may need to be installed locally*
  • a Sawtooth shell container is included for testing
  • Sawtooth's blockchain REST API will be available at http://localhost:8080
  • Rethink's database admin panel will be available at http://localhost:9090

To start the dev containers, from the root project directory run:

bin/build -p
docker-compose -f docker-compose-dev.yaml up

* Dependencies that may need to be locally installed include Sawtooth dependencies like thesawtooth_sdk, as well as some pip3 modules.

Testing

Tests can be run using the run_docker_test script, with the desired docker-compose file as an argument. For example:

bin/run_docker_test integration_tests/blockchain/docker-compose.yaml
bin/run_docker_test integration_tests/api/docker-compose.yaml

License

Hyperledger Sawtooth Hyper Directory software is licensed under the Apache License Version 2.0 software license.

sawtooth-next-directory's People

Contributors

chrisspanton avatar cianx avatar delventhalz avatar devsatishm avatar dplumb94 avatar ghowlett avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.