R4R: Emit Warning Events when Validator Misses Blocks#4629
R4R: Emit Warning Events when Validator Misses Blocks#4629alexanderbez merged 12 commits intomasterfrom
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 |
| @@ -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.
| 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.
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)),
),
)
alessio
left a comment
There was a problem hiding this comment.
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. |
Emits warning events if a validator misses a certain number of blocks
DowntimeWarning. Continues to emit warning events for any additionalDowntimeWarningblocks that validator misses duringSigningBlockWindowTargeted 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 changedin the github PR explorerFor Admin Use: