Skip to content

Make the ethereum firehose codec less crashy #5314

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

Merged
merged 2 commits into from
Mar 29, 2024
Merged

Make the ethereum firehose codec less crashy #5314

merged 2 commits into from
Mar 29, 2024

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Mar 29, 2024

The decoder for Ethereum firehose is full of unwrap, expect and panic. This removes two potential crashes that we encountered in production.

The code is still pretty scary as it takes in data from the network and will crash when it doesn't conform to its implicit assumptions. For example, even though the block header is in an Option in the protobuf, the code will just panic when it is ever None.

@lutter lutter merged commit 720daa1 into master Mar 29, 2024
@lutter lutter deleted the lutter/codec branch March 29, 2024 18:35
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