The Hash of a qbft payload is calculated by hashing the RLP'd bytes of the message-id, followed by the payload's encoded bytes.
RLP(msgCode, RLP(payload.encodedBytes()))
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
We were creating new in-memory storage segments each time we were
supposed to be retrieving it which prevented me from being able to test
what keys ended up being stored in that segment.
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
QBFT no longer validates all fields of the block header (eg nonce mixhash), as these have no bearing on the
safety model of the protocol.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Add QBFT rpc methods and namespace. At the moment, they are copied verbatim from IBFT namespace and may change in future once specifications are finalized.
Signed-off-by: Usman Saleem <usman@usmans.info>
All received QBFT messages are now validated with respect to protocol safety prior to be accepted to QBFT business logic.
This includes updates to the QBFT integration test framework.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
This supplies the necessary validation logic for parsing received RoundChange messages.
This logic is wired into the QBFT business logic.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
The code required to deserialise signed payloads for QBFT is verbose and can be reduced by templating.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Creates the validator for qbft commit messages, but does not wire it into business logic at this stage.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
Adds the Prepare validator, but does not wire it into the QBFT message validation at this stage.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
This adds the proposal and roundchange messages required for QBFT.
This does not wire in the ability to transmit/receive these messages, it just defines the message structure.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
This adds the Prepare and Commit messages used in the QBFT protocol, this is an incremental movement toward QBFT - and does not offer new functionality.
Signed-off-by: Trent Mohay <trent.mohay@consensys.net>