-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Tendermint Engine #3759
Tendermint Engine #3759
Conversation
Conflicts: ethcore/src/error.rs
Conflicts: ethcore/src/client/client.rs
Changes Unknown when pulling fa504e5 on auth-bft into ** on master**. |
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()), |
There was a problem hiding this comment.
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.")), |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 Precommit
s.
Changes Unknown when pulling c96826b on auth-bft into ** on master**. |
New asynchronous BFT consensus
Engine
with instant finality.To do:
TransitionHandler
shutdownsync
proposal broadcastTendermint
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 withEngine
to check if its a proposal or a normal block that should be inserted into the blockchain. Once one round reaches enoughPrecommit
s, the block is issued sealed with a signature set which makes it possible to verify the block without referring back to the messages.