Skip to content

Commit

Permalink
ABCI calls should crash/exit in all cases when the call itself report…
Browse files Browse the repository at this point in the history
…s and error (backport #496) (#520)

* ABCI calls should crash/exit in all cases when the call itself reports and error (#496)

* Review call hierarchies of ABCI methods to make sure they panic on error

* Added changelog

* Trying 1.20.2 explicitly

(cherry picked from commit 2ab8598)

# Conflicts:
#	.github/workflows/govulncheck.yml
#	state/execution.go

* Revert "ABCI calls should crash/exit in all cases when the call itself reports and error (#496)"

This reverts commit d2fae794533dd2552af89268e39763f7b63ea26d.

* [partial cherry-pick] ABCI calls should crash/exit in all cases when the call itself reports and error (#496)

* Review call hierarchies of ABCI methods to make sure they panic on error

* Added changelog

* Trying 1.20.2 explicitly

---------

Co-authored-by: Sergio Mena <[email protected]>
  • Loading branch information
mergify[bot] and sergio-mena authored Mar 15, 2023
1 parent ed8a053 commit ca09456
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `[consensus]` Unexpected error conditions in `ApplyBlock` are non-recoverable, so ignoring the error and carrying on is a bug. We replaced a `return` that disregarded the error by a `panic`.
([\#496](https://github.com/cometbft/cometbft/pull/496))
3 changes: 1 addition & 2 deletions consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -1667,8 +1667,7 @@ func (cs *State) finalizeCommit(height int64) {
block,
)
if err != nil {
logger.Error("failed to apply block", "err", err)
return
panic(fmt.Sprintf("failed to apply block; error %v", err))
}

fail.Fail() // XXX
Expand Down

0 comments on commit ca09456

Please sign in to comment.