Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Tendermint Engine #3759

Merged
merged 201 commits into from
Dec 15, 2016
Merged

Tendermint Engine #3759

merged 201 commits into from
Dec 15, 2016

Conversation

keorn
Copy link

@keorn keorn commented Dec 9, 2016

New asynchronous BFT consensus Engine with instant finality.
To do:

  • graceful TransitionHandler shutdown
  • tests for sync proposal broadcast
  • more tests for Tendermint

New par protocol version (2) is added, which supports sending consensus messages to peers.
Tendermint handles messages and issues new ones. Each round starts with a proposal block issued by one of the authorities and is broadcasted like a normal block. After verification each block is checked with Engine to check if its a proposal or a normal block that should be inserted into the blockchain. Once one round reaches enough Precommits, the block is issued sealed with a signature set which makes it possible to verify the block without referring back to the messages.

@keorn keorn added A0-pleasereview 🤓 Pull request needs code review. and removed A3-inprogress ⏳ Pull request is in progress. No review needed at this stage. labels Dec 12, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling fa504e5 on auth-bft into ** on master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 49ae375 on auth-bft into ** on master**.


pub fn new_proposal(header: &Header) -> Result<Self, ::rlp::DecoderError> {
Ok(ConsensusMessage {
signature: try!(UntrustedRlp::new(header.seal()[1].as_slice()).as_val()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to use get(1).expect("<reason why it cannot fail>") here also

0u8 => Ok(Step::Propose),
1 => Ok(Step::Prevote),
2 => Ok(Step::Precommit),
_ => Err(DecoderError::Custom("Invalid step.")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Step::Commit variant here? Is it not supposed to ever come in the RLP form?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, there is no meaning to RLP encoded Commit - its a collection of encoded Precommits.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling c96826b on auth-bft into ** on master**.

@gavofyork gavofyork added A9-FUCKYEAH!1 💯 Pull request is reviewed well and can not be compensated with any amount of beer in the galaxy ;) and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 15, 2016
@gavofyork gavofyork merged commit a74bce2 into master Dec 15, 2016
@gavofyork gavofyork deleted the auth-bft branch December 15, 2016 12:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A9-FUCKYEAH!1 💯 Pull request is reviewed well and can not be compensated with any amount of beer in the galaxy ;) B7-releasenotes 📜 Changes should be mentioned in the release notes of the next minor version release. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants