Assessment reports>Babylon Genesis Chain>Discussion>Panic handling in ABCI++ handlers

Panic handling in ABCI++ handlers

During the audit process, we examined the use of panic statements within ABCI++ handlers such as BeginBlock and EndBlock. Panic statements were employed in various error-handling procedures; however, this is not typically considered a best practice in Cosmos SDK--based chains. The reason is that, in the case of ABCI++ handlers, panic statements are not recovered. Consequently, when a panic statement is executed, the node process terminates, which can lead to the entire chain being halted. This is viewed as another potential DOS vector.

However, the Babylon team is aware of this and has clarified that the use of panic statements within ABCI++ handlers is intentional. In most of the node code, the Babylon team prefers to fail fast rather than continue operating in an incorrect state. Therefore, if the Babylon team's assumptions are violated or the data model is incorrect, a panic is triggered.

Zellic © 2025Back to top ↑