GithubHelp home page GithubHelp logo

isabella232 / hydrabadger-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from poanetwork/hydrabadger-android

0.0 0.0 0.0 973.81 MB

Mobile messenger based on hbbft consensus

License: GNU General Public License v3.0

Shell 19.69% JavaScript 80.31%

hydrabadger-android's Introduction

Hydrabadger

An experimental peer-to-peer client using the Honey Badger Byzantine Fault Tolerant consensus algorithm and Mobile messenger based on hbbft consensus

Usage

Setup


  1. git clone [email protected]:poanetwork/hydrabadger-android.git

  2. Download Android studio, NDK, rust etc..

  3. set needs environments

export ANDROID_HOME=/Users/$USER/Library/Android/sdk export NDK_HOME=$ANDROID_HOME/ndk-bundle

and etc

  1. Download rustup. We will use this to setup Rust for cross-compiling.

    curl https://sh.rustup.rs -sSf | sh
  2. Download targets for Android.

    # Android.
    rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android

Compile


  1. Create the standalone NDKs.

    ./create-ndk-standalone.sh
  2. Copy the content of cargo-config.toml (consists of linker information of the Android targets) to ~/.cargo/config

    cp cargo-config.toml ~/.cargo/config

Creating the libraries


You use the sample/ project as an example.

  1. Build the libraries.

    #!/bin/sh
    
    #set -euo pipefail
    
    # Build the rust project.
    cd cargo
    cargo clean
    #cargo test
    
    # cargo lipo --release
    $PWD/compile.sh
    $PWD/move.sh

    or

    run in sample/ directory

    build.sh
    

Android project


cd sample/android

Run this project in Android Studio, this project uses the compiled Hydrabadger.

Current State


Network initialization node addition, transaction generation, consensus, and batch outputs are all generally working. Batch outputs for each epoch are printed to the log.

Overall the client is fragile and doesn't handle deviation from simple usage very well yet.

Unimplemented


  • Many edge cases and exceptions: disconnects, reconnects, etc.
    • Connecting to a network which is in the process of key generation causes the entire network to fail. For now, wait until the network starts outputting batches before connecting additional peer nodes.
  • Error handling is atrocious, most errors are simply printed to the log.
  • Usage as a library is still a work in progress as the API settles.
  • Much, much more...

License


License: LGPL v3.0

This project is licensed under the GNU Lesser General Public License v3.0. See the LICENSE file for details.

hydrabadger-android's People

Contributors

korul 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.