forked from cometbft/cometbft
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* perf(consensus): Undo revert cometbft#3211. (Remove reactor Consensus RLocks) (backport cometbft#3341) (cometbft#3490) Pretty simple bug fix for the e2e failure on cometbft#3211. There was a race condition at iniitialization for initial height, because we didn't initialize it early on enough. The error in the E2E logs was: ``` validator03 | E[2024-06-21|21:13:20.744] Stopping peer for error module=p2p peer="Peer{MConn{10.186.73.2:34810} 4fe295e4cfad69f1247ad85975c6fd87757195db in}" err="invalid field LastCommitRound can only be negative for initial height 0" validator03 | I[2024-06-21|21:13:20.744] service stop module=p2p peer=4fe295e4cfad69f1247ad85975c6fd87757195db@10.186.73.2:34810 msg="Stopping Peer service" impl="Peer{MConn{10.186.73.2:34810} 4fe295e4cfad69f1247ad85975c6fd87757195db in}" ``` hinting at initial height not being set rpoperly. --- - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments - [ ] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec <hr>This is an automatic backport of pull request cometbft#3341 done by [Mergify](https://mergify.com). Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> * BP 3156 * use rsMtx * Fix lint --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d76422d
commit 854fd6b
Showing
7 changed files
with
71 additions
and
37 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
.changelog/unreleased/improvements/3156-make-addvote-only-take-one-ps-mtx.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- `[consensus]` Make Vote messages only take one peerstate mutex | ||
([\#3156](https://github.com/cometbft/cometbft/issues/3156)) |
4 changes: 4 additions & 0 deletions
4
.changelog/v0.38.8/improvements/3211-make-cs-reactor-no-longer-takes-cs-locks.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- `[consensus]` Make the consensus reactor no longer have packets on receive take the consensus lock. | ||
Consensus will now update the reactor's view after every relevant change through the existing | ||
synchronous event bus subscription. | ||
([\#3211](https://github.com/cometbft/cometbft/pull/3211)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ func Kill() error { | |
} | ||
|
||
func Exit(s string) { | ||
fmt.Printf(s + "\n") | ||
fmt.Println(s) | ||
os.Exit(1) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters