-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
EPIC: Isolated Errors #12985
Comments
This isn't the issue I have with error isolation, but this is a second high impact, easy fix dev UX problem of the SDK. The problem this issue describes is mostly solved, by wrapping all these state machine errors with errors.Wrap (which should be done, and really ought to be some extremely minimal work at the module manager work) The systemic complexity right now, is that errors & panics in begin block / end block have no fault isolation. If there is a panic in begin block or end block, the entire chain halts. This is incredibly hard to reason about, as panics can occur from all sorts of crazy locations, and in most cases, the desired effect isn't chain halt. The chain halt should be chain level opt-in. What should happen is there to by some module level specification that says:
cref: osmosis-labs/osmosis#1305 where we do this for epochs |
I think we can have this be really simple. Any panic that results due to an error in BeginBlock or EndBlock, the app should have the ability to state "I want this to halt" and we can do that by providing a simple API that handles recovery which app devs can call in their begin/end block logic. |
This is easy to be done:
|
This isn't practical IMO
What does this even mean? The proposal, #12985 (comment), should be sufficient. This is what Osmosis does and provides a clean API. |
If we return errors in Begin/End Blockers then it's easier to handle the and manage them, rather than adding more complex catches in the app. |
I don't think that makes much sense personally. Having a single API call that devs can call when executing functions is much practical and cleaner UX. |
Summary
Currently when looking at a stack trace or error in the state machine, it is fairly difficult to identify where the error came from and/or in which stage of tx execution the error occurred.
Problem Definition
Errors and their origination are not easily legible.
Proposal
Isolate errors in a way that I easy to debug and identify at which stage of the process a tx or the state machine is at.
Would love to hear from @zmanian, @ValarDragon and others on needs for what they would like to see
The text was updated successfully, but these errors were encountered: