Skip to content

Commit

Permalink
docs: dust share
Browse files Browse the repository at this point in the history
  • Loading branch information
JoowonYun committed Dec 28, 2023
1 parent b195a4b commit 08570a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (simulation) [#18196](https://github.com/cosmos/cosmos-sdk/pull/18196) Fix the problem of `validator set is empty after InitGenesis` in simulation test.
* (baseapp) [#18551](https://github.com/cosmos/cosmos-sdk/pull/18551) Fix SelectTxForProposal the calculation method of tx bytes size is inconsistent with CometBFT
* (baseapp) [#18895](https://github.com/cosmos/cosmos-sdk/pull/18895) Fix de-duplicating vote extensions during validation in ValidateVoteExtensions.
* (x/staking) [#18841](https://github.com/cosmos/cosmos-sdk/pull/18841) Fix delegation state when it has dust share. Change the condition of unbond to remove delegation with less than minimum share

### API Breaking Changes

Expand Down Expand Up @@ -197,6 +198,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (x/upgrade) [#16244](https://github.com/cosmos/cosmos-sdk/pull/16244) Upgrade module no longer stores the app version but gets and sets the app version stored in the `ParamStore` of baseapp.
* (x/staking) [#17655](https://github.com/cosmos/cosmos-sdk/pull/17655) `HistoricalInfo` was replaced with `HistoricalRecord`, it removes the validator set and comet header and only keep what is needed for IBC.
* (x/staking) [#18841](https://github.com/cosmos/cosmos-sdk/pull/18841) Delegates with less than the minimum share removed.

## [v0.50.2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.2) - 2023-12-11

Expand Down
6 changes: 2 additions & 4 deletions x/staking/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -1197,10 +1197,8 @@ func (k Keeper) ValidateUnbondAmount(
return shares, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid shares amount")
}

// Cap the shares at the delegation's shares. Shares being greater could occur
// due to rounding, however we don't want to truncate the shares or take the
// minimum because we want to allow for the full withdraw of shares from a
// delegation.
// Depending on the share, amount can be smaller than unit amount(1stake).
// All shares smaller than the minimum share are unboned.
tolerance, err := validator.SharesFromTokens(math.OneInt())
if err != nil {
return shares, err
Expand Down

0 comments on commit 08570a0

Please sign in to comment.