Giter Site home page Giter Site logo

haore147 / annchain Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dappledger/annchain

0.0 0.0 0.0 119.7 MB

AnnChain is the core engine of the new generation alliance chain of Zhongan Science and Technology

License: Apache License 2.0

Makefile 0.16% Shell 0.13% Go 83.71% Assembly 0.66% C 11.71% C++ 1.89% M4 0.52% Python 0.61% Java 0.61%

annchain's Introduction

AnnChain/简体中文

banner


AnnChain is the core engine of the new generation alliance chain of Zhongan Science and Technology. It has the characteristics of high security, high performance and high availability. It aims to provide a tightly integrated block chain system for enterprises. It is very suitable for business cooperation among commercial organizations with alliance nature, and also for high-frequency financial transactions and security. A demanding scene. Dozens of actual business scenarios have been applied.

version API Reference Go version Go Report Card Travis license

Branch Tests Coverage
master TravisCI codecov

Releases

Automated builds are available for stable releases.

Requirements

Requirement Notes
Go version Go1.12.0 or higher

Building the source

export GOPATH=$HOME/.gopkgs

git clone https://github.com/dappledger/AnnChain.git

cd AnnChain

./get_pkgs.sh

make

Supported Consensus

AnnChain supports bft and raft consensus as valid consensus options,and bft is the default.if you want to use raft, you can operate like this:

First, set consensus to raft in config.toml file:
consensus = "raft"
Then, add raft peers config file raft-cluster.json into the runtime dir(take four nodes for example):
{
    "advertise": "ann7939-validator8fc99df2-2.default.svc.cluster.local:23000",
    "local": {
        "bind": "0.0.0.0:23000",
        "pub_key": [
            1,
            "35EC28D113DB8D057140F903BAB049770CABAD4C2838509602552511C3F2D2E3"
        ],
        "rpc": "ann7939-validator8fc99df2-2.default.svc.cluster.local:47000"
    },
    "peers": [
        {
            "bind": "ann7939-validator480649ca-0.default.svc.cluster.local:23000",
            "pub_key": [
                1,
                "7B788FD0A5A1504C438B2D6B5602717C07F5E82D25175B4065B75C46017B770D"
            ],
            "rpc": "ann7939-validator480649ca-0.default.svc.cluster.local:47000"
        },
        {
            "bind": "ann7939-validatorb14a47dc-1.default.svc.cluster.local:23000",
            "pub_key": [
                1,
                "1FE0A5560BB9376348CB8F218BDA2011280606571DB20B841FA9F7560143796D"
            ],
            "rpc": "ann7939-validatorb14a47dc-1.default.svc.cluster.local:47000"
        },
        {
            "bind": "ann7939-validator8fc99df2-2.default.svc.cluster.local:23000",
            "pub_key": [
                1,
                "35EC28D113DB8D057140F903BAB049770CABAD4C2838509602552511C3F2D2E3"
            ],
            "rpc": "ann7939-validator8fc99df2-2.default.svc.cluster.local:47000"
        },
        {
            "bind": "ann7939-validatore78bd527-3.default.svc.cluster.local:23000",
            "pub_key": [
                1,
                "3C521E9D3D942654FA1E6C52E7B3A4EDE059E047FB4DF4F00F04C092149002EA"
            ],
            "rpc": "10.103.237.176:47000"
        }
    ]
}
  • advertise: advertise address is used for others peers to connect.

  • local.bind: local bind address for raft protocl.

  • local.pub_key: node's pubkey, same as pbft pubkey.

  • local.rpc: node's rpc bind address.

  • peers: others node's bind address and pub_key info, including it selft.

Quick Start

Single node

./build/genesis init

./build/genesis run

Local cluster using docker-compose

## start cluster
➜  docker-compose up

## remove cluster
➜  docker-compose down

Usage

Command Tool
Golang SDK
Java SDK

Applications

Contributing

If you have any questions,please report.
If you'd like to contribute code, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base

annchain's People

Contributors

needkane avatar linux2015 avatar wickyyang avatar knull-cn avatar kelezj avatar hongyuefan 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.