cosmos-sdk/x/staking/CHANGELOG.md
Eric Mokaya 84a32cc4b3
fix(x/staking): fix validator metadata update (#23461)
Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
2025-01-20 18:52:20 +00:00

9.6 KiB

Changelog

[Unreleased]

Features

  • #23462 fixes missing data for genesis ex-/import on key rotation
  • #21315, #22556 Create metadata type and add metadata field in validator details proto
    • Add parsing of metadata-profile-pic-uri in create-validator JSON.
    • Add cli flag: metadata-profile-pic-uri to edit-validator cmd.

API Breaking Changes

  • #21315 New struct Metadata to store extra validator information.
    • New field Metadata introduced in types: Description.
    • The signature of NewDescription has changed to accept an extra argument of type Metadata.

v0.2.0-rc.1 - 2024-12-18

Features

  • #19537 Changing MinCommissionRate in MsgUpdateParams now updates the minimum commission rate for all validators.
  • #20434 Add consensus address to validator query response

Improvements

  • #19779 Allows for setting unbonding_time to zero.

  • #19277 Hooks calls on SetUnbondingDelegationEntry, SetRedelegationEntry, Slash and RemoveValidator returns errors instead of logging just like other hooks calls.

  • #18636 IterateBondedValidatorsByPower, GetDelegatorBonded, Delegate, Unbond, Slash, Jail, SlashRedelegation, ApplyAndReturnValidatorSetUpdates methods no longer panics on any kind of errors but instead returns appropriate errors.

  • #18506 Detect the length of the ed25519 pubkey in CreateValidator to prevent panic.

Bug Fixes

  • #20688 Avoid overslashing unbonding delegations after a redelegation.
  • #19226 Ensure GetLastValidators in x/staking does not return an error when MaxValidators exceeds total number of bonded validators.
  • #23461 Fix UpdateDescription to correctly update the Metadata field.

API Breaking Changes

  • #20238 NewKeeper now accepts a core/comet.Service as its last argument.
  • #19788 Remove ABCIValidatorUpdate and ABCIValidatorUpdateZero, use ModuleValidatorUpdate and ModuleValidatorUpdateIsZero instead.
  • #19754 Update to use []appmodule.ValidatorUpdate as return for ApplyAndReturnValidatorSetUpdates.
  • #19414 NewStakingKeeper takes an environment variable instead of individual services.
  • #19742 NewStakeAuthorization now takes address.Codec as argument.
  • #19735 Update genesis api to match new appmodule.HasGenesis interface.
  • #18198 Validator and Delegator interfaces were moved to github.com/cosmos/cosmos-sdk/types to avoid interface dependency on staking in other modules.
  • #17778 Use collections for Params
    • remove from Keeper: GetParams, SetParams
  • #17486 Use collections for RedelegationQueueKey:
    • remove from types: GetRedelegationTimeKey
    • remove from Keeper: RedelegationQueueIterator
  • #17562 Use collections for ValidatorQueue
    • remove from types: GetValidatorQueueKey, ParseValidatorQueueKey
    • remove from Keeper: ValidatorQueueIterator
  • #17498 Use collections for LastValidatorPower:
    • remove from types: GetLastValidatorPowerKey
    • remove from Keeper: LastValidatorsIterator, IterateLastValidators
  • #17291 Use collections for UnbondingDelegationByValIndex:
    • remove from types: GetUBDKeyFromValIndexKey, GetUBDsByValIndexKey, GetUBDByValIndexKey
  • (x/slashing) #17568 Use collections for ValidatorMissedBlockBitmap:
    • remove from types: ValidatorMissedBlockBitmapPrefixKey, ValidatorMissedBlockBitmapKey
  • #17481 Use collections for UnbondingQueue:
    • remove from Keeper: UBDQueueIterator
    • remove from types: GetUnbondingDelegationTimeKey
  • #17123 Use collections for Validators
  • #17270 Use collections for UnbondingDelegation:
    • remove from types: GetUBDsKey
    • remove from Keeper: IterateUnbondingDelegations, IterateDelegatorUnbondingDelegations
  • #17336 Use collections for RedelegationByValDstIndexKey:
    • remove from types: GetREDByValDstIndexKey, GetREDsToValDstIndexKey
  • #17332 Use collections for RedelegationByValSrcIndexKey:
    • remove from types: GetREDKeyFromValSrcIndexKey, GetREDsFromValSrcIndexKey
  • #17315 Use collections for RedelegationKey:
    • remove from keeper: GetRedelegation
  • #17260 Use collections for DelegationKey:
    • remove from types: GetDelegationKey, GetDelegationsKey
  • #17288 Use collections for UnbondingIndex:
    • remove from types: GetUnbondingIndexKey.
  • #17256 Use collections for UnbondingID.
  • #17260 Use collections for ValidatorByConsAddr:
    • remove from types: GetValidatorByConsAddrKey
  • #17248 Use collections for UnbondingType.
    • remove from types: GetUnbondingTypeKey.
  • #17062, #19788 Remove GetValidatorUpdates and ValidatorUpdates storage.
  • #17026 Use collections for LastTotalPower:
    • remove Keeper: SetLastTotalPower, GetLastTotalPower
  • #17335 Remove usage of "cosmossdk.io/x/staking/types".Infraction_* in favour of "cosmossdk.io/api/cosmos/staking/v1beta1".Infraction_ in order to remove dependency between modules on staking
  • #20295 GetValidatorByConsAddr now returns the Cosmos SDK cryptotypes.Pubkey instead of cometcrypto.Publickey. The caller is responsible to translate the returned value to the expected type.
    • Remove CmtConsPublicKey() and TmConsPublicKey() from Validator interface and as methods on the Validator struct.
  • #21480 ConsensusKeeper is required to be passed to the keeper.
  • #22795 NewUnbondingDelegationEntry, NewUnbondingDelegation, AddEntry, NewRedelegationEntry, NewRedelegation and NewRedelegationEntryResponse no longer take an ID in there function signatures.
  • #22795 AfterUnbondingInitiated hook has been removed as it is no longer required by ICS.

State Breaking changes

  • #18841 In an undelegation or redelegation if the shares being left delegated correspond to less than 1 token (in base denom) the entire delegation gets removed.
  • #18142 Introduce key_rotation_fee param to calculate fees while rotating the keys
  • #19740 InitGenesis and ExportGenesis module code and keeper code do not panic but return errors.
  • #20845 Remove HistoricalInfo from the staking modules storage
  • #22795 Keys stakingtypes.UnbondingIDKey, stakingtypes.UnbondingIndexKey, stakingtypes.UnbondingTypeKey have been removed as they are no longer required by ICS.