Skip to content
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

Closed
ebuchman opened this issue Feb 17, 2018 · 4 comments
Closed

How to handle errors in some ABCI messages #468

ebuchman opened this issue Feb 17, 2018 · 4 comments
Labels
spec T:Docs Changes and features related to documentation.

Comments

@ebuchman
Copy link
Member

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.

@ebuchman
Copy link
Member Author

See long discussion about this in tendermint/abci#165

@ebuchman
Copy link
Member Author

ebuchman commented Feb 18, 2018

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.

@ebuchman
Copy link
Member Author

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

@ebuchman ebuchman added T:Docs Changes and features related to documentation. and removed question labels Feb 18, 2018
@jackzampolin
Copy link
Member

I think we have addressed this issue. Going to close. Please reopen if I'm wrong.

kocubinski pushed a commit that referenced this issue Jul 4, 2023
* Revert "fix: PowerMut incorrect precision (#451)"

This reverts commit fbf8ba8.

* Revert "perf: Speedup the sqrt function (#443)"

This reverts commit 87c955b.

(cherry picked from commit 9199153)

Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com>
Neoplayer pushed a commit to Neoplayer/cosmos-sdk that referenced this issue Jul 18, 2023
* chore: Dev/undo powermut (backport cosmos#468)

* fix test

---------

Co-authored-by: Roman <roman@osmosis.team>
kocubinski pushed a commit that referenced this issue Oct 24, 2023
* Revert "fix: PowerMut incorrect precision (#451)"

This reverts commit fbf8ba8.

* Revert "perf: Speedup the sqrt function (#443)"

This reverts commit 87c955b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec T:Docs Changes and features related to documentation.
Projects
None yet
Development

No branches or pull requests

2 participants