fabric

package module
v0.0.0-...-8619d99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

Perun's Hyperledger Fabric Chaincode and Backend

CI status

This repository provides the chaincode and go-perun backend implementation for Hyperledger Fabric.

Project structure

  • adjudicator/: On-chain logic. Memory implementations for off-chain testing.
  • chaincode/: Chaincode endpoint, ledger and asset implementation.
  • channel/: Off-chain logic. Channel interface implementations.
    • binding/ Chaincode bindings.
  • client/: Helper functions for setting up a go-perun client.
    • test/ End-2-end tests.
  • pkg/: 3rd-party helpers.
  • scripts/: Test environment setup.
  • wallet/: Wallet interface implementations.

Development Setup

If you want to locally develop with this project:

  1. Setup the fabric-samples test environment and add its directory as FABRIC_SAMPLES_DIR to your path.
curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/v2.4.6/scripts/bootstrap.sh | bash -s
FABRIC_SAMPLES_DIR=$(pwd)/fabric-samples/
  1. Clone this repo.
git clone https://github.com/perun-network/perun-fabric.git
cd perun-fabric
  1. Start the test chain and deploy the chaincode. This step needs a working Docker instance running in the background.
./scripts/deployCC.sh
  1. Run the tests. This step needs a working Go distribution, see go.mod for the required version. Always ensure that FABRIC_SAMPLES_DIR is set.
go test ./... -p 1

Further, you can shut down the test environment.

./scripts/network.sh down

Or start the test environment without chaincode deployment.

./scripts/network.sh up

Security Disclaimer

This software is still under development. The authors take no responsibility for any loss of digital assets or other damage caused by the use of it.

Copyright 2022 - See NOTICE file for copyright holders. Use of the source code is governed by the Apache 2.0 license that can be found in the LICENSE file.

Contact us at info@perun.network.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL