-
Notifications
You must be signed in to change notification settings - Fork 130
Ibft2: Replace NewRound with extended Proposal #872
Conversation
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.
LGTM
return false; | ||
} | ||
} else { | ||
if (!roundChangeCertificate.isPresent()) { |
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.
be nice if this block was split out into function for validating the future proposal
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.
done.
@@ -149,19 +148,17 @@ public void whenSufficientRoundChangeMessagesAreReceivedForNewRoundLocalNodeCrea | |||
final RoundChange rc3 = peers.getNonProposing(2).injectRoundChange(targetRound, empty()); | |||
final RoundChange rc4 = peers.getProposer().injectRoundChange(targetRound, empty()); | |||
|
|||
final NewRound expectedNewRound = | |||
localNodeMessageFactory.createNewRound( | |||
final Proposal expectedNewRound = |
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.
nit: this should be renamed to expectedProposal
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.
done (plus lots of others).
@@ -55,7 +73,15 @@ public static Proposal decode(final BytesValue data) { | |||
final SignedData<ProposalPayload> payload = SignedData.readSignedProposalPayloadFrom(rlpIn); | |||
final Block proposedBlock = | |||
Block.readFrom(rlpIn, IbftBlockHashing::calculateDataHashForCommittedSeal); | |||
|
|||
RoundChangeCertificate roundChangeCertificate = null; |
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.
This is a bit nasty, be nicer if reading the round change certificate was split out into a seperate function then you could quite easily return Optional without the need for the variable initialiser.
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.
done.
consensus/ibft/src/main/java/tech/pegasys/pantheon/consensus/ibft/statemachine/IbftRound.java
Show resolved
Hide resolved
* PAN-2270: Rename password hash command * Fixing test * PR review
…to the returned CompletableFuture. (PegaSysEng#884)
…ing (PegaSysEng#876) * Reduce logging for invalid peer discovery packets. The message is enough to locate the source of the rejection. * Reduce ECIESHandshaker logging to trace since it documents a normal flow through the handshake process.
* o * add test * clean up * scaffolding * update * update * comments * add test * update * update ii * format * update ii * fix * verifyBroadcastBlockInvocation * test * update * update to difficulty calculation * remove BlockBroadcasterTest from this pr * update * update * update II
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.
All looks good from a protocol correctness perspective.
The NewRound message has been removed, and the Proposal has been extended to include the RoundChangeCertificate (for non-0 rounds).
This has required updates to:
Unit and integration tests have been summarily updated.