Skip to content
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

Jailed validators are not correctly removed from the set of active validators #1453

Closed
Tracked by #463
turbocrime opened this issue Jul 8, 2024 · 9 comments
Closed
Tracked by #463
Assignees
Labels
bug Something isn't working priority Important to work on next

Comments

@turbocrime
Copy link
Contributor

Not all validators are returned in a ValidatorInfoResponse, even if the flag showInactive is true.

This means that some classes of validator, including jailed validators, will fail to transition out of 'active' state.

The block processor should either

  1. clear the validator table every time it updates validator info, instead of upserting.
  2. or, compare the list of returned validators to the table, to identify validators missing from the response.

If (2) then the block processor could specifically query validator info for specific validators that the user may be interested in.

@turbocrime turbocrime added the bug Something isn't working label Jul 8, 2024
@turbocrime
Copy link
Contributor Author

validator assets will remain in the asset table. is it important to somehow identify those assets as belonging to jailed or inactive validators?

@Valentine1898
Copy link
Contributor

If (2) then the block processor could specifically query validator info for specific validators that the user may be interested in.

It sounds like a privacy leak

@erwanor
Copy link
Member

erwanor commented Jul 9, 2024

It sounds like a privacy leak

I don't think that's the case, because those extra calls are done systematically, rather than based on specific user activity.

This is an extension of the strategy of fetching the entire active set, only to account for a limited RPC response we have to detect validators that have stopped being indexed by the chain (i.e., jailed or tombstoned) and fetch specific rate data for those identities. This is done by everyone on every modern epoch transition though.

@erwanor
Copy link
Member

erwanor commented Jul 9, 2024

I think what we really want to avoid (and OP doesn't suggest this) is detecting that we have stale rate data when processing user actions, and doing an extra call then. That solves the problem of stale rate data, but telegraphs to the RPC what the user is doing in real time.

@Valentine1898
Copy link
Contributor

Valentine1898 commented Jul 9, 2024

  1. clear the validator table every time it updates validator info, instead of upserting.

We can't remove data about jailed validators, because users may have stakes in those validators, and we have to provide a way to undelegate or redelegate.
And this actually creates another sync issue, by sync only the modern block we may lose some validators and some stakes.
Example:
Epoch 2: the validator has joined the network
Epoch 3: user delegates tokens to validator
Epoch 4: validator jailed

If the user sync from the beginning after epoch 5 and the validator remains jailed, we will never know about the existence of this validator and will lose the user stake

@Valentine1898 Valentine1898 added the priority Important to work on next label Jul 9, 2024
@Valentine1898
Copy link
Contributor

Valentine1898 commented Jul 9, 2024

Given a high priority because many users are facing the effects of this issue in mainnet

fyi @grod220

Image

Image

Image

@Valentine1898
Copy link
Contributor

We can't remove data about jailed validators, because users may have stakes in those validators, and we have to provide a way to undelegate or redelegate. And this actually creates another sync issue, by sync only the modern block we may lose some validators and some stakes. Example: Epoch 2: the validator has joined the network Epoch 3: user delegates tokens to validator Epoch 4: validator jailed

If the user sync from the beginning after epoch 5 and the validator remains jailed, we will never know about the existence of this validator and will lose the user stake

@erwanor what do you think about that? I don't see a way to get jailed validators in the modern epoch. This means that if a user had a stake on a validator that is now jailed, we wouldn't be able to display it.

@turbocrime
Copy link
Contributor Author

users are complaining about this and it is now more urgent

@grod220
Copy link
Collaborator

grod220 commented Aug 6, 2024

Closed by: #1640 #1643

@grod220 grod220 closed this as completed Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority Important to work on next
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants