Skip to content

Conversation

@dapplion
Copy link
Collaborator

Issue Addressed

In process_gossip_unverified block we match the verification error and we should always:

  • log something
  • propagate_validation_result to libp2p

However, for some variants we don't do that. This PR refactors the match to always:

  • Log something (at least one debug log per error)
  • propagate_validation_result to libp2p
  • Explicitly specify a penalty or set the penalty to None (force you to think about it)

If others thumbs up this style I can extend to the other gossip messages. This style makes gossip handling more consistent and less chance of forgetting to propagate results or penalize peers.

For some variants like Slashable we penalize the peer in our internal scoring but we don't penalize in the gossip layer. This is odd, anyone knows why?

@dapplion dapplion requested a review from jxs as a code owner October 27, 2025 12:41
@dapplion dapplion added the work-in-progress PR is a work-in-progress label Oct 27, 2025
Copy link
Member

@pawanjay176 pawanjay176 left a comment

Choose a reason for hiding this comment

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

I like this pattern. Easier to keep track

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

work-in-progress PR is a work-in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants