-
Notifications
You must be signed in to change notification settings - Fork 255
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
fix: query db instead for validator tombstoned status #411
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
10f1935
query db instead for validator tombstone status
huichiaotsou 310e12e
Merge branch 'cosmos/v0.44.x' into aaron/replace_tombstone_query
huichiaotsou b33db57
add change log
huichiaotsou 5e08283
Update database/slashing.go
MonikaCat 3dce5c3
update changelog
huichiaotsou 9d21889
Merge branch 'cosmos/v0.44.x' into aaron/replace_tombstone_query
huichiaotsou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I only have question, which I don't remember the answer to: if we're querying this value, when are we updating it? What would happen is a validator is jailed or tombstoned in a new block? Is the value updated somewhere else or what?
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.
hey Ricky it's just wingman requested to have the
tombstone
status in thevalidator_status
(x/staking) table while we used to save it only invalidator_signing_info
(x/slashing). So:tombstone
status is updated with the slashing modulevalidator_signing_info
and stored again invalidator_status
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.
@ryuash Can we have some more context on why this is needed/required/preferable?
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.
Otherwise we just get the
tombstone status
from thevalidator_signing_info
table, gql query be something like thisin this case I will remove the tomstoned column from
validator_status
table.would this be reasonable for you @yayay927 ?
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.
I remember this was requested months back. I no longer remember the purpose tbh
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.
then I think we can remove this part of codes because it keeps causing "transport is closing" error while calling the node :-/ we should then alternatively JOIN the
validator_signing_info
table fortombstone
status.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.
OH SORRY I REMEMBER NOW. Yes this was requested during the first wave of tombstones validators as we had no way of seeing who was tombstoned in bdjuno at the time.
It's currently being used in the frontend so a migration would be needed if you're making any changes.
Would moving it to a different table be better or? I figured bdjuno was listening for the tombstone event to update this but I could be wrong
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.
Cool so front end will get the tombstone from validator signing info first and then we can remove those codes from BDjuno safely :D
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.
Honestly if BD is fine as it is right now, I would avoid updating anything
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.
I see, but we actually get a lot of errors like this while running staking module
saving tombstone twice is weird no? when we can just join the tables