Giter VIP home page Giter VIP logo

go-centrifuge's Introduction

Centrifuge P2P node

Tests GoDoc Reference codecov Go Report Card

go-centrifuge is the go implementation of the Centrifuge P2P protocol. It connects to other nodes via libp2p2 and uses Centrifuge Chain for on-chain interactions.

Getting help: Head over to our documentation at docs.centrifuge.io to learn how to setup a node and interact with it. If you have any questions, feel free to join our discord

Pre-requisites

Fetch dependencies

To fetch the dependencies, run make install-deps.

Install Node

To install, run make install will compile project to binary centrifuge and be placed under GOBIN.

Ensure GOBIN is under PATH to call the binary globally.

Running tests

There 4 different flavours of tests in the project

  • Unit tests(unit)
  • Command-line tests(cmd)
  • Integration tests(integration)
  • Environment tests(testworld): spins up multiple go-centrifuge nodes and local ethereum and centrifuge chains

To run all the test flavours: make run-tests

To run specific test flavour: test=unit make run-tests

To force ethereum smart contracts to be deployed again: FORCE_MIGRATE='true' test=cmd make run-tests

Note: unit tests doesn't require any smart contract deployments and when run with only unit flavour, smart contracts are not deployed.

Deploying locally

If you like to deploy all the dependencies including node, please follow below steps

Spin-up local environment:

To spin-up local environment, run make start-local-env This command will

  • Start Centrifuge chain, Geth node, and bridge using docker.
  • Deploy necessary contracts on geth node. The contracts can be found under localAddresses on the root folder.

Create config file and Start centrifuge node locally:

To start centrifuge node locally, follow the steps below:

  • Start the local test environment
  • Run make start-local-node
    • This will start a local centrifuge node and create a config if not present already
    • The default config file will be placed under ~/centrifuge/testing.
    • If you like to recreate config, then run recreate_config=true make start-local-node

Spin-down local environment:

To spin-down local environment, run make stop-local-env This command will stop Centrifuge chain node, Geth node, and bridge if running.

API definitions

Node APIs are published to swagger hub. For the latest APIs, please see here: APIs

go-centrifuge's People

Contributors

cdamian avatar charleenfei avatar dependabot[bot] avatar eswarasai avatar haritha-j avatar lucasvo avatar mikiquantum avatar mr-optimax avatar pstehlik avatar remi-tuy avatar tharsanan1 avatar vedhavyas avatar vimukthi-git avatar xmxanuel avatar zyfrank 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.