-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
send ValidatorSetUpdates event when validator set changes #2161
Conversation
"data": { | ||
"type": "tendermint/event/ValidatorSetUpdates", | ||
"value": { | ||
"validator_updates": [ |
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.
@melekes does it contains only the new validators and validators that changed their power
or the updated list with the new validator set ?
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.
Neither. It's the list of updates. So if the current validator set is A, B, C and application includes D, then ValidatorSetUpdates
will contain only D.
Is that not enough? Given you track validators from the beginning (or get them using RPC /validators
), you should be able to construct the updated set.
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.
And if the current validator set is A, B, C and and application includes D and drops A ? will ValidatorSetUpdates
only include D as well ?
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.
No. It will be A (pubkeyA, power: 0), D (pubkeyD, power: X)
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.
🎆 💯 ✔️ LGTM
|
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.
Awesome thanks Anton.
Only thing is we should consider how we feel about passing ABCI pubkey over RPC here inconsistent with other instances of pubkey over RPC.
Also, should we send this to master so we can get a hot fix release with this on testnets instead of waiting for the next breaking tendermint release?
EventTx = "Tx" | ||
EventUnlock = "Unlock" | ||
EventValidatorSetUpdates = "ValidatorSetUpdates" | ||
EventVote = "Vote" |
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.
maybe we should note in the comments that these are alphabetical for the poor soul that adds an event to this list without realizing :P
types/events.go
Outdated
@@ -92,6 +86,10 @@ type EventDataVote struct { | |||
|
|||
type EventDataString string | |||
|
|||
type EventDataValidatorSetUpdates struct { | |||
ValidatorUpdates []abci.ValidatorUpdate `json:"validator_updates"` |
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.
is it weird that we're going to be passing an ABCI validator over the RPC here ? ie. it will be different than the usual representation of pubkeys using AminoJSON
14f66f2
to
2d7d367
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2161 +/- ##
===========================================
+ Coverage 62.28% 62.37% +0.08%
===========================================
Files 212 212
Lines 17565 17562 -3
===========================================
+ Hits 10941 10954 +13
+ Misses 5718 5701 -17
- Partials 906 907 +1
|
2d7d367
to
420d8cb
Compare
…ndermint#2161) Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.28.1 to 1.29.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/bufbuild/buf-setup-action/releases">bufbuild/buf-setup-action's releases</a>.</em></p> <blockquote> <h2>v1.29.0</h2> <p>Release v1.29.0</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/bufbuild/buf-setup-action/commit/88db93f5d74ffa329bb43e42aa95cd822697d214"><code>88db93f</code></a> Release v1.29.0 (<a href="https://redirect.github.com/bufbuild/buf-setup-action/issues/181">#181</a>)</li> <li>See full diff in <a href="https://github.com/bufbuild/buf-setup-action/compare/v1.28.1...v1.29.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bufbuild/buf-setup-action&package-manager=github_actions&previous-version=1.28.1&new-version=1.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Refs #1916
REBASE AGAINST DEVELOP ONCE #2159 MERGED