Skip to content

Commit

Permalink
send: construct PreBlock instead of PreHeader to create PreCommit
Browse files Browse the repository at this point in the history
PreHeader is not enough to create PreCommit because PreCommit requires the
whole set of transactions to be available for PreCommit data
calculations. This bug leads to the fact that Primary node can't
properly construct valid PreCommit message because block's transactions are not
yet filled by dBFT by this moment.

Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Aug 28, 2024
1 parent b129031 commit 3b0a522
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Improvements:

Bugs fixed:
* context-bound PreBlock and PreHeader are not reset properly (#127)
* PreHeader is constructed instead of PreBlock to create PreCommit message (#128)

## [0.3.0] (01 August 2024)

Expand Down
2 changes: 1 addition & 1 deletion send.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (c *Context[H]) makePreCommit() ConsensusPayload[H] {
return msg
}

if preB := c.MakePreHeader(); preB != nil {
if preB := c.CreatePreBlock(); preB != nil {
var preData []byte
if err := preB.SetData(c.Priv); err == nil {
preData = preB.Data()
Expand Down

0 comments on commit 3b0a522

Please sign in to comment.