Giter Site home page Giter Site logo

fabric-tendermint-cross-demo's Introduction

fabric tendermint cross demo

This is an example application for an atomic swap through Cross-chain transaction using Cross Framework between Hyperledger Fabric and Tendermint.

As Atomic commit protocol, Simple commit protocol is used.

Requirements

Install required tools

The below command installs Relayer, Fabric tools, Fabric CLI, Tendermint CLI

# install fabric tools and build Fabric/Tendermint CLI, Relayer
make -C demo build -j5

Chains

Chain Node Role Application
Tendermint 1 Node Coordinator/Participant ERC-20 based on CDT Module
Fabric 1 Orderer, 3 Peers Participant ERC-20 based on CDT Module

Directory structure

  • cmds
    • alpha ... Tendermint CLI
    • beta ... Fabric CLI
  • contracts
    • erc20 ... contract modules for Tendermint/Fabric
  • demo ... demo environment including
    • chains
      • fabric ... fabric-related files including docker-compose.yaml for network
        • chaincode
          • fabibc ... fabric chaincode application
      • tendermint ... tendermint simapp working as CLI and tendermint application including docker-compose.yaml for network
    • configs ... config files for alpha cli, beta cli, fabric app, relayer
    • scripts ... shell scripts for alpha cli, beta cli, relayer, scenario
  • relayer ... Relayer CLI

How tools work

  • Relayer
    • relaying packets between different chains
  • Fabric tools
    • genesis block generation
    • configuration of a channel
    • cryptographic generation
    • deployment of chaincode
  • Fabric CLI
    • creating tx, submitting tx, querying tx on Fabric node
  • Tendermint CLI
    • creating tx, submitting tx, querying tx on Tendermint node

Startup fabric and tendermint network

# prepare fabric network and tendermint network using docker containers
make -C demo network

Testing the demo

# initialize relayer, fabric CLI, tendermint CLI, and run handshake for IBC between fabric and tendermint by creating transactions.
make -C demo run-init
# run ./scripts/scenario/sample-scenario. See the `About sample-scenario` section for more detail.
make -C demo run

End network

# down related containers, remove volumes
make -C demo network-down
# remove any generated data
make -C demo clean

Restart network if needed

make -C demo network-down
make -C demo clean
make -C demo network

About sample-scenario

See About sample-scenario

READMEs

Additional information can be found below.

fabric-tendermint-cross-demo's People

Contributors

hiromaily avatar mattsu6666 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.