-
Notifications
You must be signed in to change notification settings - Fork 608
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
[ValSet-Pref] Simulator Fix for RedelegateValSet & UndelegateFromValset #4073
Conversation
Task linked: CU-8669c0uzk Simulator Fix |
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.
Left some minor comments! Otherwise main logic seems smooth
x/valset-pref/simulation/sim_msgs.go
Outdated
}, nil | ||
} | ||
if sim.StakingKeeper().HasReceivingRedelegation(ctx, delAddr, val) { | ||
return nil, fmt.Errorf("receveing redelegation is not allowed for source validators") |
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.
what does it mean here by "source validators"?
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.
For redelegation, we need validators to redelegate to(target validators) and validators to redelegate from(source validators).
if sim.StakingKeeper().HasReceivingRedelegation(ctx, delAddr, val) { | ||
return nil, fmt.Errorf("receveing redelegation is not allowed for target validators") | ||
} |
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.
Why are they not allowed to receive redelegations?
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.
because this is the clause in redelegation. For ex:
ValA --- redelegation --> ValB
Val --redelegation --> ValC (ERROR: because ValB is receiving redelegation)
Addressed your comments @mattverse @czarcas7ic. Ready for rereview! |
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!
Part of : #2579
What is the purpose of the change
Simulator Fix
Logs:
Brief Changelog
n/a
Testing and Verifying
Sim test
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)