Coder Social home page Coder Social logo

fuel-bft's Introduction

fuel-bft's People

Contributors

adlerjohn avatar rakita avatar vlopes11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fuel-bft's Issues

Find a suitable name for the repo

The implementation won't reflect the strict form of pbft but instead will be based in tendermint.

We have some differences such as the block being proposed after precommit instead of commit and the round being declared as a tuple (height, round) instead of an abstract descriptor.

Having fuel-pbft is misleading because it suggests this is a general model for pbft, when in fact this is one concrete instance of pbft.

As suggestion: fuel-polka

Use associated types

Replace trait type usages such as <<Self as Message>::Keystore as Keystore>::Digest by trait provided types so the code is more readable.

Example:

from

pub trait Message: Sized {
    type Keystore: Keystore;

    fn hash(&self) -> <<Self as Message>::Keystore as Keystore>::Digest;
}

to

pub trait Message: Sized {
    type Keystore: Keystore;
    type Digest = <<Self as Message>::Keystore as Keystore>::Digest;

    fn hash(&self) -> Self::Digest;
}

blocked by: rust-lang/rust#29661

Handle timeouts

I'm fine with merging without that for now. But eventually, this should include some kind of tokio task or executor that drives progress and handles timeouts etc.
(originally posted by @Voxelot)

Define the timeout granularity

This deviates from tendermint-style algorithms and could lead to rounds being arbitrarily skipped. This also doesn't allow for the eventuality guarantees of tendermint:

The timeouts prevent the algorithm from blocking and waiting forever for some condition to be true, ensure that processes continuously transition between rounds, and guarantee that eventually (after GST) communication between correct processes is timely and reliable so they can decide. The last role is achieved by increasing the timeouts with every new round r, i.e,timeoutX(r) = initT imeoutX +r โˆ— timeoutDelta; they are reset for every new height (consensus instance).

tendermint paper

Where timeoutX could be timeoutPropose, timeoutPrevote or timeoutPrecommit.

This means we should only increment the round after properly cycling through the appropriate steps and timeouts, rather than just taking the time since the last commit and dividing it by some constant round value. Otherwise, we won't be able to increase the timeout each round.

Additionally, we may want to consider a timeout vote in the future which would allow for ddos-resistant leader selection strategies.

Originally posted by @Voxelot in #9 (comment)

Implement Passive Mode

Listen to votes and follow the consensus for the network to import new blocks. Currently, the consensus mechanism will be idle unless it can vote (the keychain provides round public key).

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.