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

AUDIT: InitGenesis with mainnet state break x/distribution invariant #227

Open
hieuvubk opened this issue Aug 12, 2023 · 0 comments
Open

Comments

@hieuvubk
Copy link

Description

I got this err when try to init new app with state that export from mainnet:

calculated final stake for delegator persistence1qxrztmfe2pevv8nam2znfe5p3eep3r4qv2n6nc greater than current stake final stake: 1.000000000000000000 current stake: 0.999900035965954883

This address is a validator, link: https://www.mintscan.io/persistence/validators/persistencevaloper1qxrztmfe2pevv8nam2znfe5p3eep3r4q9wn86p.

Problem Scenarios

This error coming from the CanWithdrawInvariant of the x/distribution module. It is a new invariant added in cosmos-sdk v47, maybe this error is a hidden bug from previous versions that has not been discovered until now. But this is a very dangerous error, which can lead to the chain being halted.

Recommendation

Since we don’t know specifically what’s causing this problem, we don’t have the best solution yet. But fortunately, this validator has been jailed and inactive for many years. We have a temporary solution to delete this validator from the validator set and also all related delegation entries.

Status

Its still pending, created issue link for people can track

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant