Add savings to incentive genesis (#1205)

* define and generate proto types

* implement savings claim msg + test

* implement savings claim + test

* register msg and add store keys

* implement savings claim keeper methods

* update function comment

* define and generate proto types, update types dir

* update gen state with savings + test

* update legacy test data for ci test

* update proto types numbering

* update params proto types numbering
This commit is contained in:
Denali Marsh 2022-04-04 22:01:48 +02:00 committed by GitHub
parent fc3f0cfd2f
commit 72e8f2f40f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 341 additions and 159 deletions

View File

@ -3819,9 +3819,9 @@ 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) | | |
| `savings_reward_periods` | [MultiRewardPeriod](#kava.incentive.v1beta1.MultiRewardPeriod) | repeated | |
@ -3913,6 +3913,8 @@ GenesisState is the state that must be provided at genesis.
| `hard_liquidity_provider_claims` | [HardLiquidityProviderClaim](#kava.incentive.v1beta1.HardLiquidityProviderClaim) | repeated | |
| `delegator_claims` | [DelegatorClaim](#kava.incentive.v1beta1.DelegatorClaim) | repeated | |
| `swap_claims` | [SwapClaim](#kava.incentive.v1beta1.SwapClaim) | repeated | |
| `savings_reward_state` | [GenesisRewardState](#kava.incentive.v1beta1.GenesisRewardState) | | |
| `savings_claims` | [SavingsClaim](#kava.incentive.v1beta1.SavingsClaim) | repeated | |

View File

@ -56,4 +56,8 @@ message GenesisState {
[(gogoproto.castrepeated) = "DelegatorClaims", (gogoproto.nullable) = false];
repeated SwapClaim swap_claims = 10 [(gogoproto.castrepeated) = "SwapClaims", (gogoproto.nullable) = false];
GenesisRewardState savings_reward_state = 11 [(gogoproto.nullable) = false];
repeated SavingsClaim savings_claims = 12 [(gogoproto.castrepeated) = "SavingsClaims", (gogoproto.nullable) = false];
}

View File

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

View File

@ -112,6 +112,20 @@ func InitGenesis(
for _, mri := range gs.SwapRewardState.MultiRewardIndexes {
k.SetSwapRewardIndexes(ctx, mri.CollateralType, mri.RewardIndexes)
}
// Savings
for _, claim := range gs.SavingsClaims {
k.SetSavingsClaim(ctx, claim)
}
for _, gat := range gs.SavingsRewardState.AccumulationTimes {
if err := ValidateAccumulationTime(gat.PreviousAccumulationTime, ctx.BlockTime()); err != nil {
panic(err.Error())
}
k.SetSavingsRewardAccrualTime(ctx, gat.CollateralType, gat.PreviousAccumulationTime)
}
for _, mri := range gs.SavingsRewardState.MultiRewardIndexes {
k.SetSavingsRewardIndexes(ctx, mri.CollateralType, mri.RewardIndexes)
}
}
// ExportGenesis export genesis state for incentive module
@ -131,10 +145,13 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) types.GenesisState {
swapClaims := k.GetAllSwapClaims(ctx)
swapRewardState := getSwapGenesisRewardState(ctx, k)
savingsClaims := k.GetAllSavingsClaims(ctx)
savingsRewardState := getSavingsGenesisRewardState(ctx, k)
return types.NewGenesisState(
params,
usdxRewardState, hardSupplyRewardState, hardBorrowRewardState, delegatorRewardState, swapRewardState,
usdxClaims, hardClaims, delegatorClaims, swapClaims,
savingsRewardState, usdxClaims, hardClaims, delegatorClaims, swapClaims, savingsClaims,
)
}
@ -224,6 +241,22 @@ func getSwapGenesisRewardState(ctx sdk.Context, keeper keeper.Keeper) types.Gene
return types.NewGenesisRewardState(ats, mris)
}
func getSavingsGenesisRewardState(ctx sdk.Context, keeper keeper.Keeper) types.GenesisRewardState {
var ats types.AccumulationTimes
keeper.IterateSavingsRewardAccrualTimes(ctx, func(ctype string, accTime time.Time) bool {
ats = append(ats, types.NewAccumulationTime(ctype, accTime))
return false
})
var mris types.MultiRewardIndexes
keeper.IterateSavingsRewardIndexes(ctx, func(ctype string, indexes types.RewardIndexes) bool {
mris = append(mris, types.NewMultiRewardIndex(ctype, indexes))
return false
})
return types.NewGenesisRewardState(ats, mris)
}
func ValidateAccumulationTime(previousAccumulationTime, genesisTime time.Time) error {
if previousAccumulationTime.Before(genesisTime.Add(-1 * EarliestValidAccumulationTime)) {
return fmt.Errorf(

View File

@ -99,10 +99,12 @@ func (suite *GenesisTestSuite) SetupTest() {
types.DefaultGenesisRewardState,
types.DefaultGenesisRewardState,
types.DefaultGenesisRewardState,
types.DefaultGenesisRewardState,
types.DefaultUSDXClaims,
types.DefaultHardClaims,
types.DefaultDelegatorClaims,
types.DefaultSwapClaims,
types.DefaultSavingsClaims,
)
cdc := suite.app.AppCodec()
@ -197,6 +199,14 @@ func (suite *GenesisTestSuite) TestExportedGenesisMatchesImported() {
types.NewMultiRewardIndex("btcb/usdx", types.RewardIndexes{{CollateralType: "swap", RewardFactor: d("0.001")}}),
},
),
types.NewGenesisRewardState(
types.AccumulationTimes{
types.NewAccumulationTime("ukava", genesisTime.Add(-3*time.Hour)),
},
types.MultiRewardIndexes{
types.NewMultiRewardIndex("ukava", types.RewardIndexes{{CollateralType: "ukava", RewardFactor: d("0.2")}}),
},
),
types.USDXMintingClaims{
types.NewUSDXMintingClaim(
suite.addrs[0],
@ -237,6 +247,13 @@ func (suite *GenesisTestSuite) TestExportedGenesisMatchesImported() {
types.MultiRewardIndexes{{CollateralType: "btcb/usdx", RewardIndexes: types.RewardIndexes{{CollateralType: "swap", RewardFactor: d("0.0")}}}},
),
},
types.SavingsClaims{
types.NewSavingsClaim(
suite.addrs[3],
nil,
types.MultiRewardIndexes{{CollateralType: "ukava", RewardIndexes: types.RewardIndexes{{CollateralType: "ukava", RewardFactor: d("0.0")}}}},
),
},
)
tApp := app.NewTestApp()
@ -311,6 +328,12 @@ func (suite *GenesisTestSuite) TestInitGenesisPanicsWhenAccumulationTimesToLongA
SwapRewardState: invalidRewardState,
},
},
{
types.GenesisState{
Params: minimalParams,
SavingsRewardState: invalidRewardState,
},
},
}
for _, tc := range testCases {

View File

@ -223,6 +223,10 @@
}
]
},
"savings_reward_state": {
"accumulation_times": [],
"multi_reward_indexes": []
},
"usdx_minting_claims": [
{
"base_claim": {
@ -328,5 +332,6 @@
}
]
}
]
],
"savings_claims": []
}

View File

@ -10,6 +10,7 @@ var (
DefaultHardClaims = HardLiquidityProviderClaims{}
DefaultDelegatorClaims = DelegatorClaims{}
DefaultSwapClaims = SwapClaims{}
DefaultSavingsClaims = SavingsClaims{}
DefaultGenesisRewardState = NewGenesisRewardState(
AccumulationTimes{},
MultiRewardIndexes{},
@ -19,8 +20,8 @@ var (
// NewGenesisState returns a new genesis state
func NewGenesisState(
params Params,
usdxState, hardSupplyState, hardBorrowState, delegatorState, swapState GenesisRewardState,
c USDXMintingClaims, hc HardLiquidityProviderClaims, dc DelegatorClaims, sc SwapClaims,
usdxState, hardSupplyState, hardBorrowState, delegatorState, swapState, savingsState GenesisRewardState,
c USDXMintingClaims, hc HardLiquidityProviderClaims, dc DelegatorClaims, sc SwapClaims, savingsc SavingsClaims,
) GenesisState {
return GenesisState{
Params: params,
@ -30,11 +31,13 @@ func NewGenesisState(
HardBorrowRewardState: hardBorrowState,
DelegatorRewardState: delegatorState,
SwapRewardState: swapState,
SavingsRewardState: savingsState,
USDXMintingClaims: c,
HardLiquidityProviderClaims: hc,
DelegatorClaims: dc,
SwapClaims: sc,
SavingsClaims: savingsc,
}
}
@ -47,10 +50,12 @@ func DefaultGenesisState() GenesisState {
HardBorrowRewardState: DefaultGenesisRewardState,
DelegatorRewardState: DefaultGenesisRewardState,
SwapRewardState: DefaultGenesisRewardState,
SavingsRewardState: DefaultGenesisRewardState,
USDXMintingClaims: DefaultUSDXClaims,
HardLiquidityProviderClaims: DefaultHardClaims,
DelegatorClaims: DefaultDelegatorClaims,
SwapClaims: DefaultSwapClaims,
SavingsClaims: DefaultSavingsClaims,
}
}
@ -76,6 +81,9 @@ func (gs GenesisState) Validate() error {
if err := gs.SwapRewardState.Validate(); err != nil {
return err
}
if err := gs.SavingsRewardState.Validate(); err != nil {
return err
}
if err := gs.USDXMintingClaims.Validate(); err != nil {
return err
@ -86,7 +94,10 @@ func (gs GenesisState) Validate() error {
if err := gs.DelegatorClaims.Validate(); err != nil {
return err
}
return gs.SwapClaims.Validate()
if err := gs.SwapClaims.Validate(); err != nil {
return err
}
return gs.SavingsClaims.Validate()
}
// NewGenesisRewardState returns a new GenesisRewardState

View File

@ -117,6 +117,8 @@ type GenesisState struct {
HardLiquidityProviderClaims HardLiquidityProviderClaims `protobuf:"bytes,8,rep,name=hard_liquidity_provider_claims,json=hardLiquidityProviderClaims,proto3,castrepeated=HardLiquidityProviderClaims" json:"hard_liquidity_provider_claims"`
DelegatorClaims DelegatorClaims `protobuf:"bytes,9,rep,name=delegator_claims,json=delegatorClaims,proto3,castrepeated=DelegatorClaims" json:"delegator_claims"`
SwapClaims SwapClaims `protobuf:"bytes,10,rep,name=swap_claims,json=swapClaims,proto3,castrepeated=SwapClaims" json:"swap_claims"`
SavingsRewardState GenesisRewardState `protobuf:"bytes,11,opt,name=savings_reward_state,json=savingsRewardState,proto3" json:"savings_reward_state"`
SavingsClaims SavingsClaims `protobuf:"bytes,12,rep,name=savings_claims,json=savingsClaims,proto3,castrepeated=SavingsClaims" json:"savings_claims"`
}
func (m *GenesisState) Reset() { *m = GenesisState{} }
@ -163,51 +165,54 @@ func init() {
}
var fileDescriptor_8b76737885d05afd = []byte{
// 698 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x41, 0x6f, 0xd3, 0x30,
0x18, 0x86, 0x9b, 0x6d, 0x8c, 0xcd, 0x45, 0x74, 0x35, 0x63, 0x2b, 0x9d, 0x94, 0x8e, 0x0d, 0x41,
0x05, 0x22, 0xd1, 0xca, 0x95, 0x0b, 0x61, 0x12, 0x4c, 0x62, 0xd2, 0x94, 0x0e, 0x84, 0x10, 0x52,
0xe5, 0x34, 0x5e, 0x66, 0x48, 0xe2, 0x10, 0x3b, 0xed, 0x7a, 0xe3, 0xc8, 0x71, 0x3f, 0x00, 0x89,
0x3b, 0x7f, 0x84, 0x1d, 0x77, 0xe4, 0xb4, 0x41, 0xf7, 0x47, 0x90, 0x9d, 0xa4, 0x4b, 0xda, 0x65,
0x88, 0x71, 0x4b, 0x3f, 0xbf, 0xdf, 0xfb, 0xbc, 0xf6, 0xe7, 0x26, 0xe0, 0xde, 0x47, 0xd4, 0x43,
0x3a, 0xf1, 0xbb, 0xd8, 0xe7, 0xa4, 0x87, 0xf5, 0xde, 0x86, 0x85, 0x39, 0xda, 0xd0, 0x1d, 0xec,
0x63, 0x46, 0x98, 0x16, 0x84, 0x94, 0x53, 0xb8, 0x24, 0x54, 0xda, 0x48, 0xa5, 0x25, 0xaa, 0xfa,
0xa2, 0x43, 0x1d, 0x2a, 0x25, 0xba, 0x78, 0x8a, 0xd5, 0xf5, 0xf5, 0x02, 0xcf, 0xae, 0x8b, 0x88,
0xc7, 0xfe, 0x22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26, 0x8a, 0xa6, 0xbc, 0x82, 0xb9, 0x12, 0xfc, 0xaa, 0x00, 0x55, 0x0e,
0xcf, 0x25, 0x9f, 0x22, 0x62, 0x13, 0x3e, 0xe8, 0x04, 0x21, 0xed, 0x11, 0x1b, 0x87, 0x69, 0xaa,
0x39, 0x99, 0xaa, 0x55, 0x94, 0xea, 0x25, 0x0a, 0xed, 0x57, 0x69, 0xf3, 0x4e, 0xd2, 0x1b, 0xe7,
0x5b, 0x4f, 0xfe, 0x73, 0x2b, 0xc5, 0x1a, 0x66, 0xae, 0xec, 0x17, 0x2f, 0xc2, 0x0f, 0x60, 0xe1,
0x7c, 0xde, 0x49, 0x9e, 0x79, 0x99, 0xe7, 0x7e, 0x51, 0x9e, 0xcd, 0x54, 0x1f, 0x67, 0x58, 0x4e,
0x32, 0x54, 0xf2, 0x75, 0x66, 0x56, 0xec, 0x7c, 0x01, 0xbe, 0x01, 0x65, 0x39, 0xf3, 0x04, 0x03,
0x24, 0xe6, 0x6e, 0x11, 0xa6, 0xdd, 0x47, 0x41, 0x4c, 0x80, 0x09, 0x01, 0x8c, 0x4a, 0xcc, 0x04,
0x6c, 0xf4, 0x6c, 0x6c, 0x1d, 0xfd, 0x56, 0x4b, 0x47, 0x43, 0x55, 0x39, 0x1e, 0xaa, 0xca, 0xaf,
0xa1, 0xaa, 0x1c, 0x9e, 0xa9, 0xa5, 0xe3, 0x33, 0xb5, 0xf4, 0xf3, 0x4c, 0x2d, 0xbd, 0x7b, 0xe4,
0x10, 0xbe, 0x1f, 0x59, 0x5a, 0x97, 0x7a, 0xba, 0x40, 0x3d, 0x76, 0x91, 0xc5, 0xe4, 0x93, 0x7e,
0x90, 0xf9, 0xd2, 0x88, 0x0f, 0x02, 0xb3, 0x66, 0xe5, 0xfb, 0xfc, 0xc9, 0x9f, 0x00, 0x00, 0x00,
0xff, 0xff, 0xaf, 0xfb, 0x24, 0xb7, 0x01, 0x07, 0x00, 0x00,
// 744 bytes of a gzipped FileDescriptorPro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0xc9, 0x07, 0x00, 0x00,
}
func (m *AccumulationTime) Marshal() (dAtA []byte, err error) {
@ -319,6 +324,30 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.SavingsClaims) > 0 {
for iNdEx := len(m.SavingsClaims) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SavingsClaims[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x62
}
}
{
size, err := m.SavingsRewardState.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintGenesis(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x5a
if len(m.SwapClaims) > 0 {
for iNdEx := len(m.SwapClaims) - 1; iNdEx >= 0; iNdEx-- {
{
@ -527,6 +556,14 @@ func (m *GenesisState) Size() (n int) {
n += 1 + l + sovGenesis(uint64(l))
}
}
l = m.SavingsRewardState.Size()
n += 1 + l + sovGenesis(uint64(l))
if len(m.SavingsClaims) > 0 {
for _, e := range m.SavingsClaims {
l = e.Size()
n += 1 + l + sovGenesis(uint64(l))
}
}
return n
}
@ -1132,6 +1169,73 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 11:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SavingsRewardState", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.SavingsRewardState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 12:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field SavingsClaims", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowGenesis
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthGenesis
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthGenesis
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.SavingsClaims = append(m.SavingsClaims, SavingsClaim{})
if err := m.SavingsClaims[len(m.SavingsClaims)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenesis(dAtA[iNdEx:])

View File

@ -199,9 +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"`
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"`
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,8,rep,name=savings_reward_periods,json=savingsRewardPeriods,proto3,castrepeated=MultiRewardPeriods" json:"savings_reward_periods"`
}
func (m *Params) Reset() { *m = Params{} }
@ -250,55 +250,55 @@ func init() {
}
var fileDescriptor_bb8833f5d745eac9 = []byte{
// 758 bytes of a gzipped FileDescriptorProto
// 760 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, 0xe9, 0xee, 0xb0, 0x6c, 0xd8, 0xdd, 0xd9, 0xcc, 0x4c, 0x0b, 0x8d, 0x07, 0x13, 0x0f, 0xde,
0x4c, 0x88, 0x07, 0x5f, 0x04, 0x6f, 0xc3, 0x0b, 0x47, 0x8e, 0x46, 0x13, 0xd0, 0xf2, 0x46, 0xcc,
0xcc, 0x2e, 0x74, 0x5b, 0x0b, 0x4a, 0xd2, 0x8b, 0xa7, 0xce, 0x9f, 0xe7, 0x79, 0x3e, 0xdf, 0xf9,
0x76, 0x9e, 0xc9, 0x82, 0xc5, 0x1d, 0xd4, 0x41, 0x86, 0x17, 0xda, 0x38, 0xe4, 0x5e, 0x07, 0x1b,
0x9d, 0x95, 0x16, 0xe6, 0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5, 0xe4, 0xca, 0xd8, 0x4b,
0xfd, 0x34, 0x90, 0xaf, 0x57, 0xab, 0x28, 0xef, 0xfb, 0xe0, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff,
0x8f, 0x22, 0xdc, 0x69, 0x39, 0x08, 0x00, 0x00,
}
func (m *RewardPeriod) Marshal() (dAtA []byte, err error) {
@ -546,18 +546,10 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ClaimEnd, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimEnd):])
if err6 != nil {
return 0, err6
}
i -= n6
i = encodeVarintParams(dAtA, i, uint64(n6))
i--
dAtA[i] = 0x42
if len(m.ClaimMultipliers) > 0 {
for iNdEx := len(m.ClaimMultipliers) - 1; iNdEx >= 0; iNdEx-- {
if len(m.SavingsRewardPeriods) > 0 {
for iNdEx := len(m.SavingsRewardPeriods) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.ClaimMultipliers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
size, err := m.SavingsRewardPeriods[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@ -565,13 +557,21 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintParams(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
dAtA[i] = 0x42
}
}
if len(m.SavingsRewardPeriods) > 0 {
for iNdEx := len(m.SavingsRewardPeriods) - 1; iNdEx >= 0; iNdEx-- {
n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ClaimEnd, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimEnd):])
if err6 != nil {
return 0, err6
}
i -= n6
i = encodeVarintParams(dAtA, i, uint64(n6))
i--
dAtA[i] = 0x3a
if len(m.ClaimMultipliers) > 0 {
for iNdEx := len(m.ClaimMultipliers) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.SavingsRewardPeriods[iNdEx].MarshalToSizedBuffer(dAtA[:i])
size, err := m.ClaimMultipliers[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
@ -787,12 +787,6 @@ 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()
@ -801,6 +795,12 @@ func (m *Params) Size() (n int) {
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ClaimEnd)
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))
}
}
return n
}
@ -1663,40 +1663,6 @@ 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)
}
@ -1730,7 +1696,7 @@ func (m *Params) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 8:
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ClaimEnd", wireType)
}
@ -1763,6 +1729,40 @@ func (m *Params) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 8:
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
default:
iNdEx = preIndex
skippy, err := skipParams(dAtA[iNdEx:])