Giter Site home page Giter Site logo

pace's Introduction

Pace Repository

  • PACE: Asynchronous fault-tolerant protocols.

  • This repository is based on HoneyBadgerBFT and BEAT

  • This is an older version based on Python 2.7. We are currently working on a new library using Golang.

  • Please cite the following paper for this work:

    • Haibin Zhang and Sisi Duan. PACE: Fully Parallelizable Asynchronous BFT from Reproposable Byzantine Agreement. CCS 2022.

Protocols

Eight protocols are included in this repo

  • version = 1: BEAT0 (MMR) - not live
  • version = 2: ACE (Pillar)
  • version = 3: PACE (Pisa, a RABA version of Pillar)
  • version = 4: BEAT-Cobalt (Cobalt ABA)
  • version = 5:ACE (Crain20 algorithm 2 with high-threshold common coin)
  • version = 6: ACE (Crain20 algorithm 1 with low-threhsold common coin - weak coin in the original paper)
  • version = 7:PACE (RABA protocol based on Crain20 (algorithm 2 with high-threshold common coin))
  • version = 8: PACE (RABA protocol based on Crain20 (algorithm 1 with low-threhsold common coin - weak coin in the original paper))

Installation && How to run the code

Working directory is usually the parent directory of pace

  • N means the total number of parties;
  • t means the tolerance, usually N=3t+1 in our experiments;
  • B means the maximum number of transactions committed in a block (by default N log N). And therefore each party proposes B/N transactions.
  • v means the version of the protocol

Install dependencies

  • required packages (via sudo apt install): python-gevent,python3-dev,python-socksipy,flex,bison,libgmp-dev,libssl-dev
    pip install greenlet
    pip install greenlet --upgrade
    pip install gevent
    pip install --upgrade setuptools
    pip install pycrypto
    pip install pycryptodomex 
    pip install ecdsa
    pip install zfec
    pip install gipc
  • Install pbc (in this demo version, we include pbc in the repository just in case)

    wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz
    tar -xvf pbc-0.5.14.tar.gz
    cd pbc-0.5.14
    ./configure ; make ; sudo make install
    export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
  • charm (in this demo version, we include charm in the repository as some charm versions are not compatible with our codebase)

    sudo apt-get install python3-dev
    git clone https://github.com/JHUISI/charm.git 
    cd charm
    git checkout 2.7-dev
    ./configure.sh
    sudo python setup.py install

Generate the keys

  • Threshold PRF Keys (used for common coins)

    python -m pace.commoncoin.prf_generate_keys N t+1 > thsig[N]_[t].keys
    example: python -m pace.commoncoin.prf_generate_keys 4 2 > thsig4_1.keys
  • For version = 5 and 7, the threshold t+1 should be replacd with 2*t+1

    example: python -m pace.commoncoin.prf_generate_keys 4 3 > thsig4_1.keys
  • ECDSA Keys

    python -m pace.ecdsa.generate_keys_ecdsa N > ecdsa[t].keys
    example: python -m pace.ecdsa.generate_keys_ecdsa 4 > ecdsa1.keys
  • Threshold Encryption Keys

    python -m pace.threshenc.generate_keys N t+1 > thenc[N]_[t].keys
    example: python -m pace.threshenc.generate_keys 4 2 > thenc4_1.keys
Launch the code
python -m pace.test.honest_party_test -k thsig4_1.keys -e ecdsa1.keys -b 10 -n 4 -t 1 -c thenc4_1.keys -v 1

When 'Consensus Finished' is printed, it means everything works well. 

Notice that each party will expect at least NlgN many transactions. And usually there is a key exception after they finish the consensus. Please just ignore it.

How to deploy the Amazon EC2 experiment

Scripts could be found in the pace/ec2/ folder.

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.