Skip to content

fix: ignore stale OutboundFailure events in bcast behaviour#336

Merged
iamquang95 merged 1 commit into
NethermindEth:mainfrom
pinebit:pinebit/bcast-outbound-failure
Apr 16, 2026
Merged

fix: ignore stale OutboundFailure events in bcast behaviour#336
iamquang95 merged 1 commit into
NethermindEth:mainfrom
pinebit:pinebit/bcast-outbound-failure

Conversation

@pinebit
Copy link
Copy Markdown
Collaborator

@pinebit pinebit commented Apr 16, 2026

Summary

  • Fix a bug where a stale OutboundFailure from a previously failed broadcast could kill a subsequent active broadcast
  • When a broadcast fails (e.g. one peer times out), in-flight requests to other peers are still running. Their eventual failures would unconditionally call complete_active_broadcast, taking down whatever broadcast was active at that point
  • The fix checks whether the op_id belongs to the current broadcast before acting. If it doesn't match, the event is logged and ignored — consistent with how SigResponse and MessageSent already handle stale events

Test plan

  • cargo clippy --workspace --all-targets --all-features -- -D warnings passes
  • cargo +nightly fmt --all --check passes
  • cargo test --workspace --all-features passes

@iamquang95 iamquang95 merged commit 614f647 into NethermindEth:main Apr 16, 2026
6 checks passed
@emlautarom1
Copy link
Copy Markdown
Collaborator

@iamquang95 Any chance we could add a test for this edge case, or is it very complicated to reproduce?

@iamquang95
Copy link
Copy Markdown
Collaborator

@emlautarom1 let me try to add an unit test for this scenario

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.

3 participants