-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to handle errors in some ABCI messages #468
Comments
See long discussion about this in tendermint/abci#165 |
tendermint/abci#165 (comment) : In short, only those that take user input (CheckTx/DeliverTx/Query/SetOption) can report over the quality of the execution with codes (ie. codes for OK, Not-OK-Because-X, OK-But-Y). The rest should have no possibility for error, since it's not defined what to do in those cases. Thus it seems right that eg. InitChain, BeginBlock, etc. should panic on error - we just need to make sure the panic is caught in the right place and turned into ResponseException so Tendermint can shutdown gracefully. |
In conclusion, either it has a response.Code, or you should panic, and ABCI will return ResponseException (tendermint/abci#195). This needs to be well documented |
I think we have addressed this issue. Going to close. Please reopen if I'm wrong. |
* chore: Dev/undo powermut (backport cosmos#468) * fix test --------- Co-authored-by: Roman <roman@osmosis.team>
Eg. ResponseInitChain doesn't have any fields. Currently if we err on the initStater, we just exit. Doesn't seem like great behaviour, but maybe it's ok because it would only happen on startup ? Still probably shouldn't just exit. Also what about errors on BeginBlock, EndBlock, Commit ,etc.
The text was updated successfully, but these errors were encountered: