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(p2p): catch rare nil Header #234

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

fix(p2p): catch rare nil Header #234

wants to merge 2 commits into from

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Dec 12, 2024

A subscription might be started without the PubSub validator fully registered, causing nil pointer deref. This was observed as a flake in tests and sometimes even on the celestia node start. It's time to fix this issue altogether.

The naive fix would check for nil, discarding a valid header message. On the other hand, this fix ensures proper order of events, guaranteeing that a valid message is never processed by subscription before the user's header verifier is set.

Related to celestiaorg/celestia-node#4001

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

Successfully merging this pull request may close these issues.

1 participant