crypto-com / cosmos-sdk-codeql

A query suite for common bug patterns in Cosmos SDK-based applications
Apache License 2.0
20 stars 6 forks source link

Reason for only Begin/EndBlock panic checks #6

Open JasperSurmont opened 1 year ago

JasperSurmont commented 1 year ago

The beginendblock rule checks for panics in these ABCI calls. Is there a reason that this check is only performed in these 2 situations? For example, why not in the CheckTx ABCI call?

Thanks!

yihuang commented 1 year ago

Because begin/end block panic will halt the node?

JasperSurmont commented 1 year ago

Because begin/end block panic will halt the node?

I understand, but why wouldn't e.g. panics in DeliverTx halt?

yihuang commented 1 year ago

Because begin/end block panic will halt the node?

I understand, but why wouldn't e.g. panics in DeliverTx halt?

There's a panic recovery in sdk's runTx function

JasperSurmont commented 1 year ago

Ah thanks! Is there any reason why there is none in Begin/EndBlock?