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

Chore(host, client, mpt): Custom error types #60

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nhtyy
Copy link

@nhtyy nhtyy commented Oct 22, 2024

Remove all uses of eyre/anyhow from the lib, and remove any panics in fns that return results

@yuwen01
Copy link
Contributor

yuwen01 commented Oct 23, 2024

I think eyre is the appropriate choice for errors in RSP, since its primary use is as a standalone binary, not a library. For example, we're never going to publish RSP on crates.io. Open to being convinced though.

I agree with getting rid of the MPT panics -- is there a way to use eyre instead of thiserror to better handle the error?

@nhtyy
Copy link
Author

nhtyy commented Oct 23, 2024

ooo interesting.. I think in MPT I like thiserror better because it shows the discrete set of possible errors (regardless of if therye recoverable or not) but using eyre doesn't relay such information.

I have a (maybe contrived) use case actually for exposing RSP as a lib: you can use RSP to augment light client sync protocols to get execution validity proofs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants