-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
R4R: Emit Warning Events when Validator Misses Blocks #4629
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4629 +/- ##
==========================================
+ Coverage 54.11% 54.14% +0.03%
==========================================
Files 260 260
Lines 16371 16379 +8
==========================================
+ Hits 8859 8869 +10
+ Misses 6866 6864 -2
Partials 646 646 |
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.
@@ -0,0 +1,2 @@ | |||
Added warning event that gets emitted if validator misses certain number of blocks, and re-emits periodically. |
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.
Added warning event that gets emitted if validator misses certain number of blocks, and re-emits periodically. | |
#4629 Added warning event that gets emitted if validator misses certain number of blocks, and re-emits periodically. |
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.
mhmmm, so this is slightly different than what we talked about out of band. We're adding a new parameter here which is state machine breaking.
I was under the impression we'd always emit an event whenever a validator misses a block (which is pretty low from my inspection) which makes the changes really simple and has no need for a new param:
ctx.EventManager().EmitEvent(
sdk.NewEvent(
types.EventTypeLiveness,
sdk.NewAttribute(types.AttributeKeyAddress, consAddr.String()),
sdk.NewAttribute(types.AttributeKeyPower, fmt.Sprintf("%d", power)),
sdk.NewAttribute(types.AttributeKeyHeight, fmt.Sprintf("%d", height)),
),
)
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.
The implementation per se looks fine - I question the rationale behind the decision to make this a parameter. In my view, this should be a configuration option
It shouldn't be any option at all...just simply emitted. |
Yes, agree to that. Most definitely not a parameter
…On Thu, 27 Jun 2019, 14:57 Alexander Bezobchuk, ***@***.***> wrote:
It shouldn't be any option at all...just simply emitted.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4629?email_source=notifications&email_token=AABX73FM72WWXTC66ZSBU7TP4TBMFA5CNFSM4H3WXIW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXGMIQ#issuecomment-506357282>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABX73EUSGXTNHQP6NOPKYLP4TBMFANCNFSM4H3WXIWQ>
.
|
@alexanderbez, yea I thought it might make sense to have the warning events be tunable. Even if Gaia currently doesn't have an issue with missed blocks; other chains or Gaia in the future might have too many missed blocks for an event for every missed_block for each validator to be feasible. I agree that it shouldn't be an application-level parameter tho. @fedekunze's suggestion to make this a config option seems right to me. The only potential weirdness i see is that different validators would fire events at different times because they are unilaterally setting this parameter in config. I don't think this is a huge deal tho. |
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.
ACKed
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.
ACK
Emits warning events if a validator misses a certain number of blocks
DowntimeWarning
. Continues to emit warning events for any additionalDowntimeWarning
blocks that validator misses duringSigningBlockWindow
Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
clog add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: