Add savings params to incentive module (#1201)

* update proto types

* update incentive module types

* update genesis test

* update legacy migration test for pass

* include regenerated proto docs
This commit is contained in:
Denali Marsh 2022-03-31 11:08:56 +02:00 committed by GitHub
parent 9170090f67
commit 9a389203c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 135 additions and 55 deletions

View File

@ -3800,6 +3800,7 @@ Params
| `hard_borrow_reward_periods` | [MultiRewardPeriod](#kava.incentive.v1beta1.MultiRewardPeriod) | repeated | |
| `delegator_reward_periods` | [MultiRewardPeriod](#kava.incentive.v1beta1.MultiRewardPeriod) | repeated | |
| `swap_reward_periods` | [MultiRewardPeriod](#kava.incentive.v1beta1.MultiRewardPeriod) | repeated | |
| `savings_reward_periods` | [MultiRewardPeriod](#kava.incentive.v1beta1.MultiRewardPeriod) | repeated | |
| `claim_multipliers` | [MultipliersPerDenom](#kava.incentive.v1beta1.MultipliersPerDenom) | repeated | |
| `claim_end` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | |

View File

@ -72,8 +72,11 @@ message Params {
repeated MultiRewardPeriod swap_reward_periods = 5
[(gogoproto.castrepeated) = "MultiRewardPeriods", (gogoproto.nullable) = false];
repeated MultipliersPerDenom claim_multipliers = 6
repeated MultiRewardPeriod savings_reward_periods = 6
[(gogoproto.castrepeated) = "MultiRewardPeriods", (gogoproto.nullable) = false];
repeated MultipliersPerDenom claim_multipliers = 7
[(gogoproto.castrepeated) = "MultipliersPerDenoms", (gogoproto.nullable) = false];
google.protobuf.Timestamp claim_end = 7 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
google.protobuf.Timestamp claim_end = 8 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
}

View File

@ -69,6 +69,7 @@ func (suite *GenesisTestSuite) SetupTest() {
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "bnb", suite.genesisTime.Add(-1*oneYear), suite.genesisTime.Add(oneYear), cs(c("hard", 122354)))},
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "ukava", suite.genesisTime.Add(-1*oneYear), suite.genesisTime.Add(oneYear), cs(c("hard", 122354)))},
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "btcb/usdx", suite.genesisTime.Add(-1*oneYear), suite.genesisTime.Add(oneYear), cs(c("swp", 122354)))},
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "ukava", suite.genesisTime.Add(-1*oneYear), suite.genesisTime.Add(oneYear), cs(c("hard", 122354)))},
types.MultipliersPerDenoms{
{
Denom: "ukava",
@ -131,6 +132,7 @@ func (suite *GenesisTestSuite) TestExportedGenesisMatchesImported() {
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "bnb", genesisTime.Add(-1*oneYear), genesisTime.Add(oneYear), cs(c("hard", 122354)))},
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "ukava", genesisTime.Add(-1*oneYear), genesisTime.Add(oneYear), cs(c("hard", 122354)))},
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "btcb/usdx", genesisTime.Add(-1*oneYear), genesisTime.Add(oneYear), cs(c("swp", 122354)))},
types.MultiRewardPeriods{types.NewMultiRewardPeriod(true, "ukava", genesisTime.Add(-1*oneYear), genesisTime.Add(oneYear), cs(c("hard", 122354)))},
types.MultipliersPerDenoms{
{
Denom: "ukava",

View File

@ -82,6 +82,7 @@
]
}
],
"savings_reward_periods": [],
"claim_multipliers": [
{
"denom": "hard",

View File

@ -45,6 +45,7 @@ func TestGenesisState_Validate(t *testing.T) {
DefaultMultiRewardPeriods,
DefaultMultiRewardPeriods,
DefaultMultiRewardPeriods,
DefaultMultiRewardPeriods,
MultipliersPerDenoms{
{
Denom: "ukava",

View File

@ -20,6 +20,7 @@ var (
KeyHardBorrowRewardPeriods = []byte("HardBorrowRewardPeriods")
KeyDelegatorRewardPeriods = []byte("DelegatorRewardPeriods")
KeySwapRewardPeriods = []byte("SwapRewardPeriods")
KeySavingsRewardPeriods = []byte("SavingsRewardPeriods")
KeyClaimEnd = []byte("ClaimEnd")
KeyMultipliers = []byte("ClaimMultipliers")
@ -36,14 +37,15 @@ var (
)
// NewParams returns a new params object
func NewParams(usdxMinting RewardPeriods, hardSupply, hardBorrow, delegator, swap MultiRewardPeriods,
multipliers MultipliersPerDenoms, claimEnd time.Time) Params {
func NewParams(usdxMinting RewardPeriods, hardSupply, hardBorrow, delegator, swap,
savings MultiRewardPeriods, multipliers MultipliersPerDenoms, claimEnd time.Time) Params {
return Params{
USDXMintingRewardPeriods: usdxMinting,
HardSupplyRewardPeriods: hardSupply,
HardBorrowRewardPeriods: hardBorrow,
DelegatorRewardPeriods: delegator,
SwapRewardPeriods: swap,
SavingsRewardPeriods: savings,
ClaimMultipliers: multipliers,
ClaimEnd: claimEnd,
}
@ -57,6 +59,7 @@ func DefaultParams() Params {
DefaultMultiRewardPeriods,
DefaultMultiRewardPeriods,
DefaultMultiRewardPeriods,
DefaultMultiRewardPeriods,
DefaultMultipliers,
DefaultClaimEnd,
)
@ -75,6 +78,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs {
paramtypes.NewParamSetPair(KeyHardBorrowRewardPeriods, &p.HardBorrowRewardPeriods, validateMultiRewardPeriodsParam),
paramtypes.NewParamSetPair(KeyDelegatorRewardPeriods, &p.DelegatorRewardPeriods, validateMultiRewardPeriodsParam),
paramtypes.NewParamSetPair(KeySwapRewardPeriods, &p.SwapRewardPeriods, validateMultiRewardPeriodsParam),
paramtypes.NewParamSetPair(KeySavingsRewardPeriods, &p.SavingsRewardPeriods, validateMultiRewardPeriodsParam),
paramtypes.NewParamSetPair(KeyMultipliers, &p.ClaimMultipliers, validateMultipliersPerDenomParam),
paramtypes.NewParamSetPair(KeyClaimEnd, &p.ClaimEnd, validateClaimEndParam),
}
@ -107,6 +111,10 @@ func (p Params) Validate() error {
return err
}
if err := validateMultiRewardPeriodsParam(p.SavingsRewardPeriods); err != nil {
return err
}
return nil
}

View File

@ -199,8 +199,9 @@ type Params struct {
HardBorrowRewardPeriods MultiRewardPeriods `protobuf:"bytes,3,rep,name=hard_borrow_reward_periods,json=hardBorrowRewardPeriods,proto3,castrepeated=MultiRewardPeriods" json:"hard_borrow_reward_periods"`
DelegatorRewardPeriods MultiRewardPeriods `protobuf:"bytes,4,rep,name=delegator_reward_periods,json=delegatorRewardPeriods,proto3,castrepeated=MultiRewardPeriods" json:"delegator_reward_periods"`
SwapRewardPeriods MultiRewardPeriods `protobuf:"bytes,5,rep,name=swap_reward_periods,json=swapRewardPeriods,proto3,castrepeated=MultiRewardPeriods" json:"swap_reward_periods"`
ClaimMultipliers MultipliersPerDenoms `protobuf:"bytes,6,rep,name=claim_multipliers,json=claimMultipliers,proto3,castrepeated=MultipliersPerDenoms" json:"claim_multipliers"`
ClaimEnd time.Time `protobuf:"bytes,7,opt,name=claim_end,json=claimEnd,proto3,stdtime" json:"claim_end"`
SavingsRewardPeriods MultiRewardPeriods `protobuf:"bytes,6,rep,name=savings_reward_periods,json=savingsRewardPeriods,proto3,castrepeated=MultiRewardPeriods" json:"savings_reward_periods"`
ClaimMultipliers MultipliersPerDenoms `protobuf:"bytes,7,rep,name=claim_multipliers,json=claimMultipliers,proto3,castrepeated=MultipliersPerDenoms" json:"claim_multipliers"`
ClaimEnd time.Time `protobuf:"bytes,8,opt,name=claim_end,json=claimEnd,proto3,stdtime" json:"claim_end"`
}
func (m *Params) Reset() { *m = Params{} }
@ -249,53 +250,55 @@ func init() {
}
var fileDescriptor_bb8833f5d745eac9 = []byte{
// 736 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x95, 0x4d, 0x4f, 0xd4, 0x40,
0x18, 0xc7, 0xb7, 0xfb, 0x26, 0x0c, 0xa0, 0x30, 0x10, 0xac, 0xab, 0xe9, 0x92, 0xc5, 0xe8, 0x1a,
0x42, 0x2b, 0x9a, 0x78, 0xf0, 0x66, 0x45, 0x13, 0x13, 0x49, 0x48, 0xc1, 0x44,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0x82, 0xf9, 0x33, 0xcc,
0xa0, 0x80, 0x04, 0xcc, 0xb2, 0x5d, 0x14, 0x0f, 0xb3, 0x2b, 0x57, 0xc9, 0x9e, 0x11, 0x84, 0x41,
0x6c, 0x1b, 0xcc, 0x38, 0x01, 0xf2, 0xc3, 0x56, 0xbe, 0x0d, 0xaa, 0x12, 0xba, 0xf4, 0xf7, 0x36,
0x38, 0x6b, 0x2f, 0xf3, 0x4e, 0x86, 0x9d, 0x1b, 0xb1, 0xc9, 0xac, 0x69, 0xc9, 0xc8, 0x6d, 0xc1,
0x67, 0x60, 0x3c, 0xe5, 0x8a, 0xf7, 0xee, 0xda, 0x25, 0xde, 0xbb, 0x31, 0x99, 0xf6, 0x22, 0x72,
0xcd, 0x57, 0x87, 0xbf, 0xb4, 0xc2, 0x61, 0x4f, 0x53, 0x8e, 0x7a, 0x9a, 0xf2, 0xb3, 0xa7, 0x29,
0xfb, 0x27, 0x5a, 0xe1, 0xe8, 0x44, 0x2b, 0x7c, 0x3f, 0xd1, 0x0a, 0xef, 0x97, 0x72, 0xef, 0x86,
0x38, 0xc7, 0x72, 0x80, 0x6c, 0x26, 0x47, 0xc6, 0x5e, 0xee, 0xeb, 0x2c, 0x1f, 0x10, 0xbb, 0x2a,
0x91, 0x8f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x34, 0xa7, 0x20, 0x49, 0xbc, 0x07, 0x00, 0x00,
// 758 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x96, 0x4f, 0x4f, 0x13, 0x4f,
0x18, 0xc7, 0xbb, 0xfd, 0x47, 0x19, 0xe0, 0xf7, 0x83, 0xa1, 0xa9, 0x6b, 0x35, 0x5b, 0x52, 0x8c,
0xd6, 0x10, 0x76, 0x45, 0x13, 0x0f, 0xde, 0x5c, 0xd1, 0xc4, 0x44, 0x12, 0xb2, 0x60, 0xa2, 0x5e,
0x9a,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a, 0xf2, 0xe3,
0x54, 0x50, 0x39, 0xc7, 0x0c, 0x0a, 0x68, 0x83, 0x79, 0xb6, 0x8b, 0xa2, 0x61, 0x76, 0x61, 0x9c,
0xec, 0x39, 0x41, 0x18, 0xc4, 0xbe, 0x05, 0x15, 0x86, 0x3a, 0x5e, 0xe8, 0xb2, 0x61, 0x72, 0x71,
0x9c, 0xe4, 0x72, 0x02, 0x19, 0x84, 0x77, 0xc0, 0x9c, 0xed, 0x23, 0x2f, 0x68, 0xa6, 0x7b, 0x70,
0x42, 0x72, 0x97, 0xfe, 0xdc, 0x83, 0xe7, 0xbd, 0x6d, 0xde, 0x4c, 0xc8, 0xe5, 0x11, 0x9b, 0xcc,
0x9a, 0x95, 0x8c, 0xd4, 0x16, 0x7c, 0x0c, 0x26, 0x63, 0xae, 0x78, 0x6c, 0x4b, 0x57, 0x78, 0x6c,
0x4b, 0x32, 0xed, 0x69, 0xe8, 0x98, 0xcf, 0x0f, 0x7f, 0x6a, 0x99, 0xc3, 0x9e, 0xa6, 0x1c, 0xf5,
0x34, 0xe5, 0x47, 0x4f, 0x53, 0xf6, 0x4f, 0xb5, 0xcc, 0xd1, 0xa9, 0x96, 0xf9, 0x7a, 0xaa, 0x65,
0xde, 0x2c, 0xa5, 0x1e, 0x2d, 0x71, 0x8e, 0x65, 0x1f, 0xb5, 0x98, 0x1c, 0x19, 0x7b, 0xa9, 0x4f,
0x03, 0xf9, 0x7a, 0xb5, 0x8a, 0x12, 0xf9, 0xe0, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x30, 0x0f,
0x7e, 0x30, 0x39, 0x08, 0x00, 0x00,
}
func (m *RewardPeriod) Marshal() (dAtA []byte, err error) {
@ -550,7 +553,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= n6
i = encodeVarintParams(dAtA, i, uint64(n6))
i--
dAtA[i] = 0x3a
dAtA[i] = 0x42
if len(m.ClaimMultipliers) > 0 {
for iNdEx := len(m.ClaimMultipliers) - 1; iNdEx >= 0; iNdEx-- {
{
@ -562,6 +565,20 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintParams(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
}
}
if len(m.SavingsRewardPeriods) > 0 {
for iNdEx := len(m.SavingsRewardPeriods) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SavingsRewardPeriods[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintParams(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x32
}
}
@ -770,6 +787,12 @@ func (m *Params) Size() (n int) {
n += 1 + l + sovParams(uint64(l))
}
}
if len(m.SavingsRewardPeriods) > 0 {
for _, e := range m.SavingsRewardPeriods {
l = e.Size()
n += 1 + l + sovParams(uint64(l))
}
}
if len(m.ClaimMultipliers) > 0 {
for _, e := range m.ClaimMultipliers {
l = e.Size()
@ -1640,6 +1663,40 @@ func (m *Params) Unmarshal(dAtA []byte) error {
}
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SavingsRewardPeriods", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthParams
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SavingsRewardPeriods = append(m.SavingsRewardPeriods, MultiRewardPeriod{})
if err := m.SavingsRewardPeriods[len(m.SavingsRewardPeriods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClaimMultipliers", wireType)
}
@ -1673,7 +1730,7 @@ func (m *Params) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 7:
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClaimEnd", wireType)
}

View File

@ -81,6 +81,7 @@ func (suite *ParamTestSuite) TestParamValidation() {
HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods,
DelegatorRewardPeriods: types.DefaultMultiRewardPeriods,
SwapRewardPeriods: types.DefaultMultiRewardPeriods,
SavingsRewardPeriods: types.DefaultMultiRewardPeriods,
ClaimMultipliers: types.MultipliersPerDenoms{
{
Denom: "hard",
@ -111,6 +112,7 @@ func (suite *ParamTestSuite) TestParamValidation() {
HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods,
DelegatorRewardPeriods: types.DefaultMultiRewardPeriods,
SwapRewardPeriods: types.DefaultMultiRewardPeriods,
SavingsRewardPeriods: types.DefaultMultiRewardPeriods,
ClaimMultipliers: types.DefaultMultipliers,
ClaimEnd: time.Date(2025, 10, 15, 14, 0, 0, 0, time.UTC),
},
@ -127,6 +129,7 @@ func (suite *ParamTestSuite) TestParamValidation() {
HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods,
DelegatorRewardPeriods: types.DefaultMultiRewardPeriods,
SwapRewardPeriods: types.DefaultMultiRewardPeriods,
SavingsRewardPeriods: types.DefaultMultiRewardPeriods,
ClaimMultipliers: types.DefaultMultipliers,
ClaimEnd: time.Date(2025, 10, 15, 14, 0, 0, 0, time.UTC),
},
@ -143,6 +146,7 @@ func (suite *ParamTestSuite) TestParamValidation() {
HardBorrowRewardPeriods: types.MultiRewardPeriods{rewardMultiPeriodWithInvalidRewardsPerSecond},
DelegatorRewardPeriods: types.DefaultMultiRewardPeriods,
SwapRewardPeriods: types.DefaultMultiRewardPeriods,
SavingsRewardPeriods: types.DefaultMultiRewardPeriods,
ClaimMultipliers: types.DefaultMultipliers,
ClaimEnd: time.Date(2025, 10, 15, 14, 0, 0, 0, time.UTC),
},
@ -159,6 +163,7 @@ func (suite *ParamTestSuite) TestParamValidation() {
HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods,
DelegatorRewardPeriods: types.MultiRewardPeriods{rewardMultiPeriodWithInvalidRewardsPerSecond},
SwapRewardPeriods: types.DefaultMultiRewardPeriods,
SavingsRewardPeriods: types.DefaultMultiRewardPeriods,
ClaimMultipliers: types.DefaultMultipliers,
ClaimEnd: time.Date(2025, 10, 15, 14, 0, 0, 0, time.UTC),
},
@ -175,6 +180,7 @@ func (suite *ParamTestSuite) TestParamValidation() {
HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods,
DelegatorRewardPeriods: types.DefaultMultiRewardPeriods,
SwapRewardPeriods: types.MultiRewardPeriods{rewardMultiPeriodWithInvalidRewardsPerSecond},
SavingsRewardPeriods: types.DefaultMultiRewardPeriods,
ClaimMultipliers: types.DefaultMultipliers,
ClaimEnd: time.Date(2025, 10, 15, 14, 0, 0, 0, time.UTC),
},
@ -191,6 +197,7 @@ func (suite *ParamTestSuite) TestParamValidation() {
HardBorrowRewardPeriods: types.DefaultMultiRewardPeriods,
DelegatorRewardPeriods: types.DefaultMultiRewardPeriods,
SwapRewardPeriods: types.DefaultMultiRewardPeriods,
SavingsRewardPeriods: types.DefaultMultiRewardPeriods,
ClaimMultipliers: types.MultipliersPerDenoms{
{
Denom: "hard",