-
Notifications
You must be signed in to change notification settings - Fork 7
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
Capture broadcasted messages for re-broadcasting even at panic #627
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #627 +/- ##
==========================================
- Coverage 79.73% 79.37% -0.37%
==========================================
Files 52 52
Lines 4644 4674 +30
==========================================
+ Hits 3703 3710 +7
- Misses 584 604 +20
- Partials 357 360 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
return err | ||
// Silently log the error and proceed. This is consistent with the behaviour of | ||
// instance for regular broadcasts. | ||
i.log("failed to request rebroadcast %s at round %d: %v", mb.Payload.Step, mb.Payload.Round, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... it would be nice to sleep and/or backoff a little. But I guess that's a bit difficult.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might be able to use a simple circuit breaker at higher level (e.g. f3
) to cover this. Updated the issue description.
Fix a bug where if `Host.RequestBroadcast` panics the requested message is never added to the re-broadcast state. Fix an inconsistent behaviour where error at requested broadcasts via re-broadcast are returned instead of being silently logged. Enhance emulator to allow pluggable signign logic with two additional signing implementation: erroneous and panic. Implement tests that assert expected behaviour at signing error or panic. Fixes #236
c2a9bc4
to
fb9fe20
Compare
Fix a bug where if
Host.RequestBroadcast
panics the requested message is never added to the re-broadcast state.Fix an inconsistent behaviour where error at requested broadcasts via re-broadcast are returned instead of being silently logged.
Enhance emulator to allow pluggable signign logic with two additional signing implementation: erroneous and panic.
Implement tests that assert expected behaviour at signing error or panic.
Fixes #236