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

Bugfix for validator bond updating #7

Merged
merged 2 commits into from
Aug 24, 2023
Merged

Conversation

xlab
Copy link

@xlab xlab commented Aug 10, 2023

New logic from upstream that ensures increased validator bond shares during delegation.

This allows to increase delegation after marking previous delegation as bond, thus allowing to LSM-tokenize more.

Test is in this PR:
persistenceOne/persistenceCore#225

Upstream changes:
iqlusioninc#24

…d accounting

c571075 - increment validator bond shares in cancel unbonding
846943c - increased validator bond shares during redelegation
3024452 - removed validator pointer from liquid staking accounting functions
04843f4 - moved removal of tokenize share locks outside of iterator
8f4c9dc - fixed test
+ 2 new tests
@xlab xlab requested review from ajeet97 and kruspy August 24, 2023 15:48
if delegation.ValidatorBond {
if err := k.SafelyDecreaseValidatorBond(ctx, &srcValidator, srcShares); err != nil {
// If this is a validator self-bond, the new liquid delegation cannot fall below the self-bond * bond factor
// The delegation on the new validator will not a validator bond
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will fix

@xlab xlab merged commit 1430000 into v47-lsm Aug 24, 2023
@xlab xlab deleted the b/bugfix-validator-bond branch August 24, 2023 17:48
ajeet97 pushed a commit that referenced this pull request Mar 20, 2024
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

Successfully merging this pull request may close these issues.

3 participants