Skip to content

v0.50.3

Compare
Choose a tag to compare
@Reecepbcups Reecepbcups released this 06 Aug 20:21
· 3 commits to main since this release
8d1a5f4

Notable changes

1) Module Authority

PoA now uses an authority instead of genesis admin params. The SDK's limit of just 1 authority per module was far to confusing to allow multiple to control the set, but only 1 admin who can upgrade the module.

Something like the following is recommended to make it easy for validators to update the PoA admin at runtime, as well as for your own testing. You can also just hardcode the address, but it does make it hard to unit & e2e test.

// GetPoAAdmin by default uses the governance address as typically expected.
// If you decide a single wallet / multisig should have control, the chain validators can set 
// POA_ADMIN_ADDRESS=address1... appd start
// or you can ignore this function and just hardcode the address1... into all the NewKeeper()'s
func GetPoAAdmin() string {
	if addr := os.Getenv("POA_ADMIN_ADDRESS"); addr != "" {
		_, err := sdk.AccAddressFromBech32(addr)
		if err != nil {
			panic(fmt.Sprintf("invalid POA_ADMIN_ADDRESS: %s", addr))
		}
		return addr
	}
	return authtypes.NewModuleAddress(govtypes.ModuleName).String()
}

2) New Ante Disable for Withdrawing Rewards

You should now use poaante.NewPOADisableWithdrawDelegatorRewards(), in your ante.go to disable validators from attempting to withdraw rewards.


What's Changed

Other

Full Changelog: v0.50.2...v0.50.3