Giter Site home page Giter Site logo

supersj / chain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onyx-protocol/onyx

0.0 3.0 0.0 97.24 MB

Chain Core Developer Edition

Home Page: https://chain.com

License: GNU Affero General Public License v3.0

Shell 0.02% Go 99.51% PLpgSQL 0.03% Protocol Buffer 0.01% JavaScript 0.21% CSS 0.03% Java 0.20%

chain's Introduction

Chain Core Developer Edition

Chain Core Developer Edition is a free, downloadable version of Chain Core that is open source and licensed under the AGPL. Individuals and organizations use Chain Core Developer Edition to learn, experiment, and build prototypes.

Chain Core Developer Edition can be run locally on Mac, Windows, or Linux to create a new blockchain network, connect to an existing blockchain network, or connect to the public Chain testnet, operated by Chain, Microsoft, and Cornell University’s IC3.

For more information about how to use Chain Core Developer Edition, see the docs: https://chain.com/docs

Download

To install Chain Core Developer Edition on Mac, Windows, or Linux, please visit our downloads page.

Contributing

Chain has adopted the code of conduct defined by the Contributor Covenant. It can be read in full here. This repository is the canonical source for Chain Core Developer Edition. Consequently, Chain engineers actively maintain this repository. If you are interested in contributing to this code base, please read our issue and pull request templates first.

Building from source

Environment

Set the CHAIN environment variable, in .profile in your home directory, to point to the root of the Chain source code repo:

export CHAIN=$GOPATH/src/chain

You should also add $CHAIN/bin to your path (as well as $GOPATH/bin, if it isn't already):

PATH=$GOPATH/bin:$CHAIN/bin:$PATH

You might want to open a new terminal window to pick up the change.

Installation

Build and install from source:

$ git clone https://github.com/chain/chain $CHAIN
$ cd $CHAIN
$ go install ./cmd/...

Set up the database:

$ createdb core

Start Chain Core:

$ cored

Access the dashboard:

$ open http://localhost:1999/

Run tests:

$ go test $(go list ./... | grep -v vendor)

Developing Chain Core

Updating the schema with migrations

$ dumpschema

Dependencies

To add or update a Go dependency, do the following:

Copy the code from $GOPATH/src/x to $CHAIN/vendor/x. For example, to vendor the package github.com/kr/pretty, run

$ mkdir -p $CHAIN/vendor/github.com/kr
$ rm -r $CHAIN/vendor/github.com/kr/pretty
$ cp -r $GOPATH/src/github.com/kr/pretty $CHAIN/vendor/github.com/kr/pretty
$ rm -rf $CHAIN/vendor/github.com/kr/pretty/.git

(Note: don't put a trailing slash (/) on these paths. It can change the behavior of cp and put the files in the wrong place.)

In your commit message, include the commit hash of the upstream repo for the dependency. (You can find this with git rev-parse HEAD in the upstream repo.) Also, make sure the upstream working tree is clean. (Check with git status.)

Deploy Options

Deploy

When Chain Core is deployed to a non-local host, all requests require authentication. To generate a client access token on Heroku, run the following command:

$ heroku run -a <your-heroku-app> corectl create-token <token-name>
<token-name>:<your-token>

License

Chain Core Developer Edition is licensed under the terms of the GNU Affero General Public License Version 3 (AGPL).

The Chain Java SDK (/sdk/java) is licensed under the terms of the Apache License Version 2.0.

chain's People

Contributors

kr avatar jbowens avatar erykwalder avatar jeffomatic avatar tessr avatar dominic avatar boymanjor avatar ryandotsmith avatar zaryafaraj avatar danrobinson avatar oleganza avatar marjoriekasten avatar bobg avatar

Watchers

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