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

fix: added errors to internal implementation of ReadStorage #292

Merged
merged 3 commits into from
Jun 25, 2024

Conversation

vbar
Copy link
Contributor

@vbar vbar commented Jun 6, 2024

What 💻

Make functions implementing ReadStorage for ForkStorage return Result::Err on failure, and call them in preference to the panicking interface.

Why ✋

Showing a network error is preferable to server panic.

Evidence 📷

Both unit and e2e tests pass.

Notes 📝

Unfortunately the ReadStorage trait cannot be removed, because it's used by zkSync Era - for a clean solution, it should be updated (so that its methods return Result) there.

@vbar vbar requested a review from a team as a code owner June 6, 2024 08:36
Copy link
Collaborator

@MexicanAce MexicanAce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MexicanAce MexicanAce merged commit 2832bef into matter-labs:main Jun 25, 2024
10 checks passed
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