Code Monkey home page Code Monkey logo

Band Chain

Blockchain Platform for Decentralize Data Curation

C++17 Tendermint Apache-2.0

Band Chain is a decentralized, permissionless blockchain implementation based on Band Protocol for decentralised data curation. We incentivise trusted, high-quality data sharing in online community via token staking and bonding curve mechanism. See https://bandprotocol.com for more info.

Running with Docker

Getting the containers up and running

The most convenient way to run Band Chain is to use Docker. Under docker directory, you'll find the docker-compose.yaml file which defines the two containers needed to run the blockchain. Make sure you have Docker installed, then run:

$> cd docker
$> docker-compose up -d

The -d tag signals docker-compose to run the containers in detached mode. This allows us to observe the logs from both bandchain and tendermint container individually.

Note that you can change ubuntu's apt-get mirror by changing the country_code in the docker-compose.yaml file

Attaching to the containers

At this point the containers should be up and running. To observe each container, simply attach to it by using the command:

$> docker attach bandchain
   # OR
$> docker attach tendermint

To detach yourself back, use Ctrl+P Ctrl+Q key combination.

Stopping the containers

Under docker directory, run:

$> docker-compose down

Running on Local Machine

Installing Dependencies

To build locally, Band Chain requires the following dependencies. Be sure to have them available in your local system (versions as listed in CMakeLists.txt).

Installing RocksDB

  • OS X:

    • Install via homebrew.
    • run brew install rocksdb
  • Linux - Ubuntu

    • Install Dependencies
      apt-get update
      apt-get -y install build-essential libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev
    • Install rocksdb by source code:
      git clone https://github.com/facebook/rocksdb.git
      cd rocksdb & make shared_lib && make install-shared

Building the Source Code

Starting off, you'll have to configure ProtoBuff and cmake by running:

$> protoc --cpp_out=. abci/abci.proto
$> mkdir build
$> cd build
$> cmake ..

Then to compile, under the same build directory, run:

$> make

Running the node

To run the node, make sure you have Tendermint v0.22.3 on your machine, then start it with:

$> tendermint init # First time only
$> tendermint node

Note that you need to keep the Tendermint session running at all time. tmux and similar tools are handy for this purpose.

Then we can run the core Band Chain logic via:

$> cd build
$> ./band -v

Basic Usage

Typically all the commands to Band Chain are sent through Tendermint ABCI, which is exposed on http://localhost:26657.

The transactions need to be generated in a specific way. Please check out the 🛠️ Official Python Client and 🛠️ Official Javascript Client to start interacting with the blockchain.

License

Band Protocol is released under the terms of Apache License 2.0. See LICENSE for more information or see http://www.apache.org/licenses/LICENSE-2.0.

Band Protocol's Projects

band icon band

Monolithic repository of everything Band Protocol

band.js icon band.js

🔋 Javascript library for interacting with Band Protocol

bandchain icon bandchain

BandChain - Decentralized Data Delivery Network

bandpress icon bandpress

📚 Technical documentation / whitepaper / developer reference for Band Protocol

bootstrap icon bootstrap

⛷ Fast React boostraper - Build and deploy in minutes

bounties icon bounties

🎁 A collection of public bounties and developer info for Band Protocol

campbase icon campbase

📱 [DEPRECATED] Campbase - Community-driven Data Curation (TCR) via Band Protocol

chain icon chain

BandChain blockchain reference implementation

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.