Coder Social home page Coder Social logo

delphi-fabric's Introduction

Delphi-fabric

Build Status

About

This project is not related to delphi program language

This project aims to provide a user-friendly fabric application development toolset including

  • fabric network simulation (alternative of Build your first network)
  • chaincode lifecycle tools
  • adopt stateless fashion when using multiple fabric-sdk, to power fabric proxy server second-development
  • as a major integration testing environment for fabric-common, which is a pure helper to fabric-sdk user.

Why

  • No multiple config file confusing anymore. All magic in orgs.json and chaincode.json
    • no crypto-config.yaml
    • no docker-compose.yaml
    • auto-generated and managed configtx.yaml and genesis blocks for each channel.
    • named docker volume to avoid infinite file path hell
  • No need to copy and paste to have a proper connection profile from existing network. Now you are simulation your own network
  • No need to global find all appearance of org1 and replace it with orgA, organization names and mspid are put together
  • Forget to cleanup legacy configs after you restart your network? It is impossible here thanks to our carefully tested cleaning-up process
  • Production-level and long run maintenance
    • This project is the research facility of a active blockchain product
  • Perfect same crypto-material file structure as you use cryptogen. We have place fabric-ca response in good manner.

Features

  • use fabric-ca to generate all crypto material, instead of cryptogen
  • use config-less fabric-ca
  • use npm dockerode to run docker container with comprehensive JSON configuration file, instead of docker-compose on yaml file
  • JSON config cater for both application and network structure (superset of connection profile and network-yaml)
  • channel update support (covering system channel)
  • chaincode language support
    • nodeJS
    • golang
  • Fixed security leakage (wallet remaining) on development machine: priv-file, crypto-store in .hfc-key-store
  • support hybrid data storage model (couchdb|leveldb), you could specify it for each peer
  • update anchor peers as a normal channel config instead of using configtx
  • use npm:js-yaml to read|write YAML files instead of jq

Major configuration

  • we cluster network and channel config in config/orgs.json, enjoy!
  • chaincodes configurations: config/chaincode.json

sample chaincode source

Installation

Compatible OS ubuntu xenial/bionic

Installation Script

  1. $ ./install.sh gitSync
    after first time clone this repository, submodule should be initialize
  2. $ ./install.sh

Requirements & dependencies

  • fabric: 1.4.5 (for docker image, binary tool and fabric-sdk)
  • docker-ce 18.x
  • golang 1.12
  • node 10.17, npm 6.11 : npm install卡死的话,可以考虑添加淘宝的源 - $ npm config set registry https://registry.npm.taobao.org/
  • java 1.8.0_151 (optional for java-sdk)
  • jq 1.5:a command line tool for parsing json format https://github.com/mikefarah/yq

Test on single host

  • run $ ./docker.sh to restart network

Finished

  • use npm:js-yaml to write YAML files instead of jq
  • new orderer with same org
  • chaincode version,ID string RegX
  • peer, orderer backup and instant recover: "stateVolume": "Documents/delphi-fabric/stateVolumes/orderer1",
  • Suggestion from Paul: Question: are your repos more to do with Fabric itself, rather than pure Fabric developer resources (ie go/js/java/typescript chaincode/sdk work)? (I'm only concentrating on Fabric Developer resources in particular) If so - I would suggest to contact someone like Silona Bonewald to find a suitable home/new page on Confluence for that? I'm just asking where its 'natural' home is 🙂 Also I would suggest the README explains 1) what it is 2) what it does (as a goal of 'studying Fabric' resources) 3) what the consumer would get from trying it out or hope to achieve?
  • chaincode uninstall

TODO


go: downloading github.com/hyperledger/fabric v1.4.4
verifying github.com/hyperledger/[email protected]: checksum mismatch
        downloaded: h1:Joa6eO9HEGnzcuZF5RD+dZBPeYqxGF+ehYb7OSs3glY=
        go.sum:     h1:2m+tDXB5QWyZL1UTyYs3fxUhkgvKD88yVE6sIwYf1KM=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

Notes

  • configtxlator Rest server is deprecated but kept. Refer to following when reuse
      const binManager = new BinManager();
      binManager.configtxlatorRESTServer('down|start'); // as async function

New feature, patch required for node-sdk

  • patch: configtxgen binary allow upper case channelName
  • fabric-ca: cannot change csr.cn via '--csr.cn=${container_name}' TLS CSR: {CN:example.com Names:[{C:US ST:North Carolina L: O:Hyperledger OU:Fabric SerialNumber:}] Hosts:[02cf209b65fb localhost] KeyRequest: CA: SerialNumber:}

Abandoned tasks

  • docker volume plugin
  • endorsement policy config: too flexible to build template
  • docker swarm deployment
  • cooperate with official network_config.json
  • adding kafka/zookeeper online: use etcdRaft
  • grafana

delphi-fabric's People

Contributors

davidkhala avatar

Watchers

 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.