cosmos-sdk/x/distribution/CHANGELOG.md

6.2 KiB

Changelog

[Unreleased]

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

Improvements

  • #22832 Ensure the distribution module has at least as many tokens as outstanding rewards at genesis import
  • #20790 x/distribution does not depend on x/protocolpool anymore, now x/distribution only does token transfers and x/protocolpool does the rest.
  • #18636 CalculateDelegationRewards and DelegationTotalRewards methods no longer panics on any sanity checks and instead returns appropriate errors.

API Breaking Changes

  • #20790 x/distribution does not depend on x/protocolpool anymore, meaning NewAppModule and NewKeeper do not take it as an argument.
  • #20588 x/distribution now takes cometService in order to get consensus related information.
  • #19868 Removes Accounts String method
    • NewMsgSetWithdrawAddress now takes strings as argument instead of sdk.AccAddress.
    • NewGenesisState now takes a string as argument instead of sdk.ConsAddress.
  • #19445 appmodule.Environment is received on the Keeper to get access to different application services
  • #17115 Use collections for PreviousProposer and ValidatorSlashEvents:
    • remove from Keeper: GetPreviousProposerConsAddr, SetPreviousProposerConsAddr, GetValidatorHistoricalReferenceCount, GetValidatorSlashEvent, SetValidatorSlashEvent.
  • #16483 use collections for DelegatorStartingInfo state management:
    • remove Keeper: IterateDelegatorStartingInfo, GetDelegatorStartingInfo, SetDelegatorStartingInfo, DeleteDelegatorStartingInfo, HasDelegatorStartingInfo
  • #16571 use collections for ValidatorAccumulatedCommission state management:
    • remove Keeper: IterateValidatorAccumulatedCommission, GetValidatorAccumulatedCommission, SetValidatorAccumulatedCommission, DeleteValidatorAccumulatedCommission
  • #16590 use collections for ValidatorOutstandingRewards state management:
    • remove Keeper: IterateValidatorOutstandingRewards, GetValidatorOutstandingRewards, SetValidatorOutstandingRewards, DeleteValidatorOutstandingRewards
  • #16607 use collections for ValidatorHistoricalRewards state management:
    • remove Keeper: IterateValidatorHistoricalRewards, GetValidatorHistoricalRewards, SetValidatorHistoricalRewards, DeleteValidatorHistoricalRewards, DeleteValidatorHistoricalReward, DeleteAllValidatorHistoricalRewards
  • #17657 The FundCommunityPool and DistributeFromFeePool keeper methods are now removed from x/distribution.
  • #16440 use collections for DelegatorWithdrawAddresState:
    • remove Keeper: SetDelegatorWithdrawAddr, DeleteDelegatorWithdrawAddr, IterateDelegatorWithdrawAddrs.
  • #16459 use collections for ValidatorCurrentRewards state management:
    • remove Keeper: IterateValidatorCurrentRewards, GetValidatorCurrentRewards, SetValidatorCurrentRewards, DeleteValidatorCurrentRewards
  • #17657 ~The distribution module keeper now takes a new argument PoolKeeper in addition.~ Reverted on #20790
  • #17670 AllocateTokens takes comet.VoteInfos instead of []abci.VoteInfo
  • #19740 InitGenesis and ExportGenesis module code and keeper code do not panic but return errors.

CLI Breaking Changes

  • #17963 appd tx distribution withdraw-rewards now only withdraws rewards for the delegator's own delegations. For withdrawing validators commission, use appd tx distribution withdraw-validator-commission.

State Machine Breaking

  • #20735 Remove PreviousProposer from the state machine.
  • #17657 Migrate community pool funds from x/distribution to x/protocolpool.
  • #17115 Migrate PreviousProposer to collections.
  • #18539 Introduce FeePool.DecimalPool to replace FeePool.CommunityPool, which temporarily holds fractional rewards until they are distributed to the community pool every 1000 blocks.

Client Breaking Changes

  • #17657 Deprecate CommunityPool and FundCommunityPool rpc methods. Use x/protocolpool module's rpc methods instead.

Bug Fixes

  • #19301 Fix vulnerability in incrementReferenceCount in distribution.