GithubHelp home page GithubHelp logo

azmiruddin / perun-node Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hyperledger-labs/perun-node

0.0 1.0 0.0 730 KB

State channel node of the blockchain-agnostic state channels framework Perun.

Home Page: https://labs.hyperledger.org/perun-doc/

License: Apache License 2.0

Shell 0.46% Go 99.42% Makefile 0.13%

perun-node's Introduction

Perun Node - Go implementation join the chat

Develop Master
CircleCI CircleCI

Perun is an open source project that aims to increase blockchain transaction throughput by using just a handful of main chain transactions to move an entire peer-to-peer network of activity off the main chain. After an initial setup of a set of basic transaction channels, this network lets any participant transact with any other participant via virtual channels which do not require additional on-chain setup. We do this by implementing the Perun protocol, which has been formally proven to allow for secure off-chain transactions.

Project Status

At the moment the perun-node is neither ready for production nor does it implement the complete perun protocol yet. But with basic features available, the project is at a stage where you can try it out and start to get involved.

This is a complete re-implementation of the previous version (available under the previous name of the project: dst-go) in branch legacy/master. This version builds on top of the go-perun SDK that implements a state channel client based on perun protocol. See Description for more details.

Description

The perun-node is multi-user state channel node that can be used for opening, transacting on and closing state channels. It builds on the state channel client implemented by go-perun and implements the following functionalities:

  1. Payment App: For using perun protocol to establish and use bi-directional payment channels.
  2. ID Provider: For the user to define a list of known participants in the off-chain network.
  3. Key management: For managing the cryptographic keys of the user.
  4. User session: For allowing multiple users to use a single node, each with a dedicated key manager and ID provider.
  5. User API interface: For the user to interact with the perun-node.

The current version provides the following features:

Feature Implementation
Blockchain Backend Ethereum
Key management Ethereum keystore
ID Provider Local
User API Two Party Payment API
User API Adapter gRPC
Persistence LevelDB

This project currently contains two executable packages located in the cmd directory.

  • perunnode: An app for starting a running instance of perun node. It can also generate configuration artifacts for trying out the node.

  • perunnodecli is an app with interactive CLI interface that serves two purposes:

    • easy way to try out payment channel API.
    • reference implementation for using the generated grpc client stubs for payment channel API.

For detailed information on the features offered by these two applications and steps on how to try them out, see the Trying It Out article.

Getting Started

Install the following pre-requisites.

1. Go (v1.14 or later).
2. ganache-cli (v6.9.1 or later).

Clone the project and sync the dependencies:

git clone https://github.com/hyperledger-labs/perun-node.git
cd perun-node
go mod tidy

Start the ganache-cli node for running integration tests:

# These funded accounts will be used in tests. "-b 1" configures the
# ganache-cli node to mine one block every second. It is required as our
# contracts use blockchain based timeout for settling a state channel on-chain.
ganache-cli -b 1 \
--account="0x1fedd636dbc7e8d41a0622a2040b86fea8842cef9d4aa4c582aad00465b7acff,100000000000000000000" \
--account="0xb0309c60b4622d3071fad3e16c2ce4d0b1e7758316c187754f4dd0cfb44ceb33,100000000000000000000"

Run the linter and tests from the project root directory:

# Lint
golangci-lint run ./...

# Test
go test -tags=integration -count=1 ./...

# Build peurnnode and perunnodecli binaries
make

License

perun-node is open-sourced under the Apache-2.0 license. See the LICENSE file for details.

perun-node's People

Contributors

manoranjith avatar anagha-ks avatar choeppler avatar

Watchers

James Cloos 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.