v0.50.3
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
- fix!: use authority admin, remove params by @Reecepbcups in #184
- feat(v2): wiring v2 by @fmorency in #202
Other
- govulncheck, go vet & bumps by @fmorency in #206
- test!: nested msg tests by @fmorency in #207
- docs: update doc to reflect latest changes by @fmorency in #212
- add simulator tests to coverage by @fmorency in #204
Full Changelog: v0.50.2...v0.50.3