diff --git a/CHANGELOG.md b/CHANGELOG.md index f9b695a184e..7c472e36e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Bug Fixes +* [#6644](https://github.com/osmosis-labs/osmosis/pull/6644) fix: genesis bug in pool incentives linking NoLock gauges and PoolIDs + ### Misc Improvements * [#6161](https://github.com/osmosis-labs/osmosis/pull/6161) Reduce CPU time of epochs diff --git a/go.mod b/go.mod index 43adb1b2a65..a635ccc2a16 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( cosmossdk.io/errors v1.0.0 github.com/CosmWasm/wasmd v0.31.0 github.com/cosmos/cosmos-proto v1.0.0-beta.2 - github.com/cosmos/cosmos-sdk v0.47.3 + github.com/cosmos/cosmos-sdk v0.47.5 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/ibc-apps/modules/async-icq/v4 v4.0.0-20230524151648-c02fa46c2860 github.com/cosmos/ibc-go/v4 v4.3.1 diff --git a/proto/osmosis/pool-incentives/v1beta1/genesis.proto b/proto/osmosis/pool-incentives/v1beta1/genesis.proto index 94628c7f9ec..10757b57604 100644 --- a/proto/osmosis/pool-incentives/v1beta1/genesis.proto +++ b/proto/osmosis/pool-incentives/v1beta1/genesis.proto @@ -20,8 +20,18 @@ message GenesisState { (gogoproto.nullable) = true, (gogoproto.moretags) = "yaml:\"distr_info\"" ]; - PoolToGauges pool_to_gauges = 4 [ + // any_pool_to_internal_gauges defines the gauges for any pool to internal + // pool. For every pool type (e.g. LP, Concentrated, etc), there is one such + // link + AnyPoolToInternalGauges any_pool_to_internal_gauges = 4 [ (gogoproto.nullable) = true, - (gogoproto.moretags) = "yaml:\"pool_to_gauges\"" + (gogoproto.moretags) = "yaml:\"internal_pool_to_gauges\"" + ]; + // concentrated_pool_to_no_lock_gauges defines the no lock gauges for + // concentrated pool. This only exists between concentrated pool and no lock + // gauges. Both external and internal gauges are included. + ConcentratedPoolToNoLockGauges concentrated_pool_to_no_lock_gauges = 5 [ + (gogoproto.nullable) = true, + (gogoproto.moretags) = "yaml:\"concentrated_pool_to_no_lock_gauges\"" ]; } diff --git a/proto/osmosis/pool-incentives/v1beta1/incentives.proto b/proto/osmosis/pool-incentives/v1beta1/incentives.proto index df0fbb8a195..d9bab041ea7 100644 --- a/proto/osmosis/pool-incentives/v1beta1/incentives.proto +++ b/proto/osmosis/pool-incentives/v1beta1/incentives.proto @@ -53,6 +53,10 @@ message PoolToGauge { ]; } -message PoolToGauges { +message AnyPoolToInternalGauges { repeated PoolToGauge pool_to_gauge = 2 [ (gogoproto.nullable) = false ]; +} + +message ConcentratedPoolToNoLockGauges { + repeated PoolToGauge pool_to_gauge = 1 [ (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/tests/cl-genesis-positions/convert.go b/tests/cl-genesis-positions/convert.go index 96e1fc047ea..11eb1fac7fc 100644 --- a/tests/cl-genesis-positions/convert.go +++ b/tests/cl-genesis-positions/convert.go @@ -111,7 +111,7 @@ func ConvertSubgraphToOsmosisGenesis(positionCreatorAddresses []sdk.AccAddress, // Initialize first position to be 1:1 price // this is because the first position must have non-zero token0 and token1 to initialize the price // however, our data has first position with non-zero amount. - _, _, _, _, err = osmosis.App.ConcentratedLiquidityKeeper.CreateFullRangePosition(osmosis.Ctx, pool.GetId(), osmosis.TestAccs[0], sdk.NewCoins(sdk.NewCoin(msgCreatePool.Denom0, sdk.NewInt(100)), sdk.NewCoin(msgCreatePool.Denom1, sdk.NewInt(100)))) + _, err = osmosis.App.ConcentratedLiquidityKeeper.CreateFullRangePosition(osmosis.Ctx, pool.GetId(), osmosis.TestAccs[0], sdk.NewCoins(sdk.NewCoin(msgCreatePool.Denom0, sdk.NewInt(100)), sdk.NewCoin(msgCreatePool.Denom1, sdk.NewInt(100)))) if err != nil { panic(err) } diff --git a/tests/e2e/initialization/config.go b/tests/e2e/initialization/config.go index ac26a47e400..46071b5d8a3 100644 --- a/tests/e2e/initialization/config.go +++ b/tests/e2e/initialization/config.go @@ -409,7 +409,7 @@ func updatePoolIncentiveGenesis(pooliGenState *poolitypes.GenesisState) { } // START: CAN REMOVE POST v17 UPGRADE - poolToGauges := poolitypes.PoolToGauges{} + poolToGauges := poolitypes.AnyPoolToInternalGauges{} currentGaugeId := uint64(1) for _, assetPair := range AssetPairs { for _, duration := range pooliGenState.LockableDurations { @@ -422,7 +422,7 @@ func updatePoolIncentiveGenesis(pooliGenState *poolitypes.GenesisState) { poolToGauges.PoolToGauge = append(poolToGauges.PoolToGauge, poolToGauge) } } - pooliGenState.PoolToGauges = &poolToGauges + pooliGenState.AnyPoolToInternalGauges = &poolToGauges // END: CAN REMOVE POST v17 UPGRADE } diff --git a/x/pool-incentives/keeper/distr_test.go b/x/pool-incentives/keeper/distr_test.go index b49aeed950c..69f17e65975 100644 --- a/x/pool-incentives/keeper/distr_test.go +++ b/x/pool-incentives/keeper/distr_test.go @@ -6,6 +6,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) +var defaultCoins = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(10000))) + func (s *KeeperTestSuite) TestAllocateAsset() { tests := []struct { name string diff --git a/x/pool-incentives/keeper/genesis.go b/x/pool-incentives/keeper/genesis.go index 2acd9f11451..9245e37e28d 100644 --- a/x/pool-incentives/keeper/genesis.go +++ b/x/pool-incentives/keeper/genesis.go @@ -18,24 +18,28 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState) { } else { k.SetDistrInfo(ctx, *genState.DistrInfo) } - if genState.PoolToGauges != nil { - for _, record := range genState.PoolToGauges.PoolToGauge { - if record.Duration == 0 { - k.SetPoolGaugeIdNoLock(ctx, record.PoolId, record.GaugeId) - } else { - if err := k.SetPoolGaugeIdInternalIncentive(ctx, record.PoolId, record.Duration, record.GaugeId); err != nil { - panic(err) - } + if genState.AnyPoolToInternalGauges != nil { + for _, record := range genState.AnyPoolToInternalGauges.PoolToGauge { + if err := k.SetPoolGaugeIdInternalIncentive(ctx, record.PoolId, record.Duration, record.GaugeId); err != nil { + panic(err) } } } + if genState.ConcentratedPoolToNoLockGauges != nil { + for _, record := range genState.ConcentratedPoolToNoLockGauges.PoolToGauge { + k.SetPoolGaugeIdNoLock(ctx, record.PoolId, record.GaugeId) + } + } } func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { distrInfo := k.GetDistrInfo(ctx) lastPoolId := k.poolmanagerKeeper.GetNextPoolId(ctx) lockableDurations := k.GetLockableDurations(ctx) - var poolToGauges types.PoolToGauges + var ( + anyPoolToInternalGauges types.AnyPoolToInternalGauges + concentratedPoolToNoLockGauges types.ConcentratedPoolToNoLockGauges + ) for poolId := 1; poolId < int(lastPoolId); poolId++ { pool, err := k.poolmanagerKeeper.GetPool(ctx, uint64(poolId)) if err != nil { @@ -43,6 +47,8 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { } isCLPool := pool.GetType() == poolmanagertypes.Concentrated if isCLPool { + // This creates a link for the internal pool gauge. + // Every CL pool has one such gauge. incParams := k.incentivesKeeper.GetEpochInfo(ctx) gaugeID, err := k.GetPoolGaugeId(ctx, uint64(poolId), incParams.Duration) if err != nil { @@ -52,7 +58,20 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { poolToGauge.Duration = incParams.Duration poolToGauge.GaugeId = gaugeID poolToGauge.PoolId = uint64(poolId) - poolToGauges.PoolToGauge = append(poolToGauges.PoolToGauge, poolToGauge) + anyPoolToInternalGauges.PoolToGauge = append(anyPoolToInternalGauges.PoolToGauge, poolToGauge) + + // All concentrated pools need an additional link for the no-lock gauge. + gaugeIDs, err := k.GetNoLockGaugeIdsFromPool(ctx, uint64(poolId)) + if err != nil { + panic(err) + } + for _, gaugeID := range gaugeIDs { + poolToGauge := types.PoolToGauge{ + GaugeId: gaugeID, + PoolId: uint64(poolId), + } + concentratedPoolToNoLockGauges.PoolToGauge = append(concentratedPoolToNoLockGauges.PoolToGauge, poolToGauge) + } } else { for _, duration := range lockableDurations { gaugeID, err := k.GetPoolGaugeId(ctx, uint64(poolId), duration) @@ -63,15 +82,16 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { poolToGauge.Duration = duration poolToGauge.GaugeId = gaugeID poolToGauge.PoolId = uint64(poolId) - poolToGauges.PoolToGauge = append(poolToGauges.PoolToGauge, poolToGauge) + anyPoolToInternalGauges.PoolToGauge = append(anyPoolToInternalGauges.PoolToGauge, poolToGauge) } } } return &types.GenesisState{ - Params: k.GetParams(ctx), - LockableDurations: k.GetLockableDurations(ctx), - DistrInfo: &distrInfo, - PoolToGauges: &poolToGauges, + Params: k.GetParams(ctx), + LockableDurations: k.GetLockableDurations(ctx), + DistrInfo: &distrInfo, + AnyPoolToInternalGauges: &anyPoolToInternalGauges, + ConcentratedPoolToNoLockGauges: &concentratedPoolToNoLockGauges, } } diff --git a/x/pool-incentives/keeper/genesis_test.go b/x/pool-incentives/keeper/genesis_test.go index dba321b3b74..6bb58441db3 100644 --- a/x/pool-incentives/keeper/genesis_test.go +++ b/x/pool-incentives/keeper/genesis_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + lockuptypes "github.com/osmosis-labs/osmosis/v16/x/lockup/types" pool_incentives "github.com/osmosis-labs/osmosis/v16/x/pool-incentives" simapp "github.com/osmosis-labs/osmosis/v16/app" @@ -36,7 +37,7 @@ var ( }, }, }, - PoolToGauges: &types.PoolToGauges{ + AnyPoolToInternalGauges: &types.AnyPoolToInternalGauges{ PoolToGauge: []types.PoolToGauge{ { PoolId: 1, @@ -48,18 +49,14 @@ var ( GaugeId: 2, Duration: time.Second, }, - // This duplication with zero duration - // can happen with "NoLock" gauges - // where the link containing the duration - // is used to signify that the gauge is internal - // while the link without the duration is used - // for general purpose. This redundancy is - // made for convinience of plugging in the - // later added "NoLock" gauge into the existing - // logic without having to change majority of the queries. + }, + }, + ConcentratedPoolToNoLockGauges: &types.ConcentratedPoolToNoLockGauges{ + PoolToGauge: []types.PoolToGauge{ { - PoolId: 2, - GaugeId: 2, + PoolId: 3, + GaugeId: 3, + Duration: 0, }, }, }, @@ -124,7 +121,7 @@ func (s *KeeperTestSuite) TestExportGenesis() { s.App.PoolIncentivesKeeper.SetLockableDurations(ctx, durations) savedDurations := s.App.PoolIncentivesKeeper.GetLockableDurations(ctx) s.Equal(savedDurations, durations) - var expectedPoolToGauges types.PoolToGauges + var expectedPoolToGauges types.AnyPoolToInternalGauges var gauge uint64 for _, duration := range durations { gauge++ @@ -139,5 +136,57 @@ func (s *KeeperTestSuite) TestExportGenesis() { s.Equal(genesisExported.Params, genesis.Params) s.Equal(genesisExported.LockableDurations, durations) s.Equal(genesisExported.DistrInfo, genesis.DistrInfo) - s.Equal(genesisExported.PoolToGauges, &expectedPoolToGauges) + s.Equal(genesisExported.AnyPoolToInternalGauges, &expectedPoolToGauges) +} + +// This test validates that all store indexes are set correctly +// for NoLock gauges after exporting and then reimporting genesis. +func (s *KeeperTestSuite) TestImportExportGenesis_ExternalNoLock() { + s.SetupTest() + + // Prepare concentrated pool + clPool := s.PrepareConcentratedPool() + + // Fund account to create gauge + s.FundAcc(s.TestAccs[0], defaultCoins.Add(defaultCoins...)) + + // Create external non-perpetual gauge + externalGaugeID, err := s.App.IncentivesKeeper.CreateGauge(s.Ctx, false, s.TestAccs[0], defaultCoins.Add(defaultCoins...), lockuptypes.QueryCondition{ + LockQueryType: lockuptypes.NoLock, + }, s.Ctx.BlockTime(), 2, clPool.GetId()) + s.Require().NoError(err) + + // We expect internal gauge to be created first + internalGaugeID := externalGaugeID - 1 + + // Export genesis + export := s.App.PoolIncentivesKeeper.ExportGenesis(s.Ctx) + + // Validate that only one link for internal gauges is created + s.Require().Equal(1, len(export.AnyPoolToInternalGauges.PoolToGauge)) + + // Validate that 2 links, one for external and one for internal gauge, are created + s.Require().Equal(2, len(export.ConcentratedPoolToNoLockGauges.PoolToGauge)) + + // Reset state + s.SetupTest() + + // Import genesis + s.App.PoolIncentivesKeeper.InitGenesis(s.Ctx, export) + + // Get the general link between external gauge ID and pool + poolID, err := s.App.PoolIncentivesKeeper.GetPoolIdFromGaugeId(s.Ctx, externalGaugeID, 0) + s.Require().NoError(err) + s.Require().Equal(clPool.GetId(), poolID) + + // Get the general link between internal gauge ID and pool + poolID, err = s.App.PoolIncentivesKeeper.GetPoolIdFromGaugeId(s.Ctx, internalGaugeID, 0) + s.Require().NoError(err) + s.Require().Equal(clPool.GetId(), poolID) + + // Get the internal gauge + incentivesEpochDuration := s.App.IncentivesKeeper.GetEpochInfo(s.Ctx).Duration + internalGaugeIDAfterImport, err := s.App.PoolIncentivesKeeper.GetPoolGaugeId(s.Ctx, poolID, incentivesEpochDuration) + s.Require().NoError(err) + s.Require().Equal(internalGaugeID, internalGaugeIDAfterImport) } diff --git a/x/pool-incentives/types/genesis.pb.go b/x/pool-incentives/types/genesis.pb.go index 5384ba5bf01..c0aded1e372 100644 --- a/x/pool-incentives/types/genesis.pb.go +++ b/x/pool-incentives/types/genesis.pb.go @@ -33,7 +33,14 @@ type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` LockableDurations []time.Duration `protobuf:"bytes,2,rep,name=lockable_durations,json=lockableDurations,proto3,stdduration" json:"lockable_durations" yaml:"lockable_durations"` DistrInfo *DistrInfo `protobuf:"bytes,3,opt,name=distr_info,json=distrInfo,proto3" json:"distr_info,omitempty" yaml:"distr_info"` - PoolToGauges *PoolToGauges `protobuf:"bytes,4,opt,name=pool_to_gauges,json=poolToGauges,proto3" json:"pool_to_gauges,omitempty" yaml:"pool_to_gauges"` + // any_pool_to_internal_gauges defines the gauges for any pool to internal + // pool. For every pool type (e.g. LP, Concentrated, etc), there is one such + // link + AnyPoolToInternalGauges *AnyPoolToInternalGauges `protobuf:"bytes,4,opt,name=any_pool_to_internal_gauges,json=anyPoolToInternalGauges,proto3" json:"any_pool_to_internal_gauges,omitempty" yaml:"internal_pool_to_gauges"` + // concentrated_pool_to_no_lock_gauges defines the no lock gauges for + // concentrated pool. This only exists between concentrated pool and no lock + // gauges. Both external and internal gauges are included. + ConcentratedPoolToNoLockGauges *ConcentratedPoolToNoLockGauges `protobuf:"bytes,5,opt,name=concentrated_pool_to_no_lock_gauges,json=concentratedPoolToNoLockGauges,proto3" json:"concentrated_pool_to_no_lock_gauges,omitempty" yaml:"concentrated_pool_to_no_lock_gauges"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -90,9 +97,16 @@ func (m *GenesisState) GetDistrInfo() *DistrInfo { return nil } -func (m *GenesisState) GetPoolToGauges() *PoolToGauges { +func (m *GenesisState) GetAnyPoolToInternalGauges() *AnyPoolToInternalGauges { if m != nil { - return m.PoolToGauges + return m.AnyPoolToInternalGauges + } + return nil +} + +func (m *GenesisState) GetConcentratedPoolToNoLockGauges() *ConcentratedPoolToNoLockGauges { + if m != nil { + return m.ConcentratedPoolToNoLockGauges } return nil } @@ -106,32 +120,37 @@ func init() { } var fileDescriptor_cc1f078212600632 = []byte{ - // 393 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcd, 0xaa, 0xd3, 0x40, - 0x14, 0xc7, 0x13, 0x7b, 0xb9, 0x60, 0xee, 0x45, 0xb8, 0x41, 0x21, 0x2d, 0x38, 0x29, 0x01, 0xa5, - 0x82, 0x9d, 0xb1, 0x15, 0x5c, 0xe8, 0x2e, 0x14, 0x8a, 0x3b, 0x89, 0xba, 0x71, 0x13, 0x26, 0xe9, - 0x74, 0x1c, 0x4c, 0x72, 0x62, 0x66, 0x52, 0xec, 0x5b, 0xb8, 0x74, 0xe3, 0xfb, 0x74, 0xd9, 0xa5, - 0xab, 0x28,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, 0xb2, 0x16, 0x42, 0xaa, 0x22, 0x14, 0xd9, - 0x12, 0x9c, 0x9e, 0xae, 0xfe, 0xec, 0x52, 0xf5, 0x59, 0xad, 0x78, 0x9b, 0x2d, 0xc1, 0xef, 0x6f, - 0x2a, 0xd7, 0x3c, 0x54, 0xee, 0x5d, 0x13, 0x7c, 0xb4, 0xf2, 0x82, 0xfb, 0x8b, 0x8e, 0xb2, 0xbf, - 0x5a, 0x0f, 0x6a, 0xa7, 0x50, 0x41, 0xc8, 0x69, 0xc9, 0x99, 0x74, 0xae, 0x74, 0xd0, 0xf3, 0x8b, - 0x37, 0x02, 0x48, 0x3e, 0xc0, 0x5c, 0x6b, 0xfc, 0xc7, 0x6d, 0xd6, 0xa3, 0x26, 0xeb, 0x5f, 0x47, - 0x2f, 0xb8, 0xcd, 0x4f, 0xe1, 0x8f, 0x9b, 0x1d, 0x32, 0xb7, 0x3b, 0x64, 0xfe, 0xd9, 0x21, 0xf3, - 0xfb, 0x1e, 0x19, 0xdb, 0x3d, 0x32, 0x7e, 0xed, 0x91, 0xf1, 0xe9, 0x0d, 0x17, 0xea, 0x73, 0x19, - 0xe1, 0x18, 0x52, 0xd2, 0xc6, 0x8f, 0x13, 0x1a, 0xc9, 0xee, 0x41, 0x56, 0x93, 0x57, 0xe4, 0xdb, - 0xd9, 0x9f, 0xa0, 0xd6, 0x39, 0x93, 0xd1, 0xb5, 0xbe, 0xfd, 0xcb, 0xbf, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xba, 0xda, 0x03, 0x10, 0xb6, 0x02, 0x00, 0x00, + // 468 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4d, 0x6b, 0x13, 0x41, + 0x18, 0xc7, 0x33, 0xf6, 0x05, 0xdc, 0x7a, 0xe9, 0x22, 0x98, 0x54, 0x98, 0x2d, 0x2b, 0x96, 0x2a, + 0x64, 0xc6, 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x73, 0xe6, + 0xc7, 0xf9, 0x12, 0xa3, 0xb3, 0x25, 0x46, 0x7f, 0x96, 0x18, 0x7d, 0x5b, 0xe1, 0xc6, 0xd9, 0x0a, + 0x37, 0x7e, 0xad, 0x70, 0xe3, 0xd3, 0xcb, 0x42, 0xe8, 0xcf, 0x93, 0x8c, 0xe4, 0x30, 0xa2, 0x8e, + 0xbb, 0x5d, 0xb2, 0x4c, 0xf9, 0x07, 0x9d, 0x76, 0x9e, 0xd1, 0x2f, 0xd7, 0x0e, 0x5f, 0xcf, 0xc6, + 0x5c, 0x65, 0xdb, 0xe6, 0xd4, 0x9e, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x70, 0x9a, 0x4d, 0x2d, + 0xa5, 0x03, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -154,9 +173,21 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.PoolToGauges != nil { + if m.ConcentratedPoolToNoLockGauges != nil { + { + size, err := m.ConcentratedPoolToNoLockGauges.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.AnyPoolToInternalGauges != nil { { - size, err := m.PoolToGauges.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.AnyPoolToInternalGauges.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -232,8 +263,12 @@ func (m *GenesisState) Size() (n int) { l = m.DistrInfo.Size() n += 1 + l + sovGenesis(uint64(l)) } - if m.PoolToGauges != nil { - l = m.PoolToGauges.Size() + if m.AnyPoolToInternalGauges != nil { + l = m.AnyPoolToInternalGauges.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.ConcentratedPoolToNoLockGauges != nil { + l = m.ConcentratedPoolToNoLockGauges.Size() n += 1 + l + sovGenesis(uint64(l)) } return n @@ -379,7 +414,43 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolToGauges", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field AnyPoolToInternalGauges", 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 m.AnyPoolToInternalGauges == nil { + m.AnyPoolToInternalGauges = &AnyPoolToInternalGauges{} + } + if err := m.AnyPoolToInternalGauges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConcentratedPoolToNoLockGauges", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -406,10 +477,10 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.PoolToGauges == nil { - m.PoolToGauges = &PoolToGauges{} + if m.ConcentratedPoolToNoLockGauges == nil { + m.ConcentratedPoolToNoLockGauges = &ConcentratedPoolToNoLockGauges{} } - if err := m.PoolToGauges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ConcentratedPoolToNoLockGauges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/pool-incentives/types/incentives.pb.go b/x/pool-incentives/types/incentives.pb.go index 4ff05ae2751..b99f8302a0d 100644 --- a/x/pool-incentives/types/incentives.pb.go +++ b/x/pool-incentives/types/incentives.pb.go @@ -269,22 +269,22 @@ func (m *PoolToGauge) GetDuration() time.Duration { return 0 } -type PoolToGauges struct { +type AnyPoolToInternalGauges struct { PoolToGauge []PoolToGauge `protobuf:"bytes,2,rep,name=pool_to_gauge,json=poolToGauge,proto3" json:"pool_to_gauge"` } -func (m *PoolToGauges) Reset() { *m = PoolToGauges{} } -func (m *PoolToGauges) String() string { return proto.CompactTextString(m) } -func (*PoolToGauges) ProtoMessage() {} -func (*PoolToGauges) Descriptor() ([]byte, []int) { +func (m *AnyPoolToInternalGauges) Reset() { *m = AnyPoolToInternalGauges{} } +func (m *AnyPoolToInternalGauges) String() string { return proto.CompactTextString(m) } +func (*AnyPoolToInternalGauges) ProtoMessage() {} +func (*AnyPoolToInternalGauges) Descriptor() ([]byte, []int) { return fileDescriptor_a8153bad03e553d1, []int{5} } -func (m *PoolToGauges) XXX_Unmarshal(b []byte) error { +func (m *AnyPoolToInternalGauges) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PoolToGauges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AnyPoolToInternalGauges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PoolToGauges.Marshal(b, m, deterministic) + return xxx_messageInfo_AnyPoolToInternalGauges.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -294,19 +294,63 @@ func (m *PoolToGauges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *PoolToGauges) XXX_Merge(src proto.Message) { - xxx_messageInfo_PoolToGauges.Merge(m, src) +func (m *AnyPoolToInternalGauges) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnyPoolToInternalGauges.Merge(m, src) } -func (m *PoolToGauges) XXX_Size() int { +func (m *AnyPoolToInternalGauges) XXX_Size() int { return m.Size() } -func (m *PoolToGauges) XXX_DiscardUnknown() { - xxx_messageInfo_PoolToGauges.DiscardUnknown(m) +func (m *AnyPoolToInternalGauges) XXX_DiscardUnknown() { + xxx_messageInfo_AnyPoolToInternalGauges.DiscardUnknown(m) } -var xxx_messageInfo_PoolToGauges proto.InternalMessageInfo +var xxx_messageInfo_AnyPoolToInternalGauges proto.InternalMessageInfo -func (m *PoolToGauges) GetPoolToGauge() []PoolToGauge { +func (m *AnyPoolToInternalGauges) GetPoolToGauge() []PoolToGauge { + if m != nil { + return m.PoolToGauge + } + return nil +} + +type ConcentratedPoolToNoLockGauges struct { + PoolToGauge []PoolToGauge `protobuf:"bytes,1,rep,name=pool_to_gauge,json=poolToGauge,proto3" json:"pool_to_gauge"` +} + +func (m *ConcentratedPoolToNoLockGauges) Reset() { *m = ConcentratedPoolToNoLockGauges{} } +func (m *ConcentratedPoolToNoLockGauges) String() string { return proto.CompactTextString(m) } +func (*ConcentratedPoolToNoLockGauges) ProtoMessage() {} +func (*ConcentratedPoolToNoLockGauges) Descriptor() ([]byte, []int) { + return fileDescriptor_a8153bad03e553d1, []int{6} +} +func (m *ConcentratedPoolToNoLockGauges) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConcentratedPoolToNoLockGauges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConcentratedPoolToNoLockGauges.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ConcentratedPoolToNoLockGauges) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConcentratedPoolToNoLockGauges.Merge(m, src) +} +func (m *ConcentratedPoolToNoLockGauges) XXX_Size() int { + return m.Size() +} +func (m *ConcentratedPoolToNoLockGauges) XXX_DiscardUnknown() { + xxx_messageInfo_ConcentratedPoolToNoLockGauges.DiscardUnknown(m) +} + +var xxx_messageInfo_ConcentratedPoolToNoLockGauges proto.InternalMessageInfo + +func (m *ConcentratedPoolToNoLockGauges) GetPoolToGauge() []PoolToGauge { if m != nil { return m.PoolToGauge } @@ -319,7 +363,8 @@ func init() { proto.RegisterType((*DistrInfo)(nil), "osmosis.poolincentives.v1beta1.DistrInfo") proto.RegisterType((*DistrRecord)(nil), "osmosis.poolincentives.v1beta1.DistrRecord") proto.RegisterType((*PoolToGauge)(nil), "osmosis.poolincentives.v1beta1.PoolToGauge") - proto.RegisterType((*PoolToGauges)(nil), "osmosis.poolincentives.v1beta1.PoolToGauges") + proto.RegisterType((*AnyPoolToInternalGauges)(nil), "osmosis.poolincentives.v1beta1.AnyPoolToInternalGauges") + proto.RegisterType((*ConcentratedPoolToNoLockGauges)(nil), "osmosis.poolincentives.v1beta1.ConcentratedPoolToNoLockGauges") } func init() { @@ -327,43 +372,45 @@ func init() { } var fileDescriptor_a8153bad03e553d1 = []byte{ - // 566 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x73, 0x6d, 0x94, 0xb4, 0xe7, 0xf0, 0xcb, 0x05, 0x91, 0x16, 0xc9, 0x8e, 0x4e, 0x02, - 0x55, 0x8a, 0x62, 0x13, 0x90, 0x18, 0xc2, 0x16, 0x05, 0x50, 0x80, 0xa1, 0xb2, 0xa8, 0x90, 0x58, - 0x22, 0x3b, 0xbe, 0x3a, 0x56, 0x6d, 0xbf, 0xc8, 0x77, 0x09, 0xf4, 0x3f, 0x40, 0x62, 0x61, 0xec, - 0xd8, 0xff, 0x83, 0x8d, 0xa9, 0x63, 0x47, 0xc4, 0x60, 0x50, 0xb2, 0x30, 0xe7, 0x2f, 0x40, 0x3e, - 0x9f, 0xc9, 0x89, 0x4a, 0x15, 0x4c, 0xb9, 0xe7, 0x77, 0xdf, 0xf7, 0x3e, 0xdf, 0xf7, 0x4e, 0xc1, - 0x0f, 0x81, 0xc5, 0xc0, 0x42, 0x66, 0x4f, 0x01, 0xa2, 0x4e, 0x98, 0x8c, 0x69, 0xc2, 0xc3, 0x39, - 0x65, 0xf6, 0xbc, 0x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x6e, 0x28, 0xf0, 0x4c, 0x3f, 0xc4, 0xd7, 0x04, 0x24, 0x87, 0x91, 0x68, 0xfb, 0xaf, 0xeb, - 0x52, 0x8a, 0xc8, 0x75, 0x69, 0x53, 0xe5, 0xd3, 0xe1, 0xf9, 0xc2, 0x40, 0x17, 0x0b, 0x03, 0xfd, - 0x5c, 0x18, 0xe8, 0xf3, 0xd2, 0xa8, 0x5c, 0x2c, 0x8d, 0xca, 0xb7, 0xa5, 0x51, 0x79, 0xf7, 0x54, - 0x19, 0xba, 0xec, 0xd1, 0x89, 0x5c, 0x8f, 0x95, 0x81, 0x3d, 0xef, 0x3e, 0xb1, 0x3f, 0x5c, 0xfa, - 0x3b, 0x10, 0xdb, 0xf0, 0x6a, 0xc2, 0xf7, 0xe3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xef, 0xeb, - 0x89, 0x60, 0x36, 0x04, 0x00, 0x00, + // 603 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcf, 0x6e, 0xd3, 0x4e, + 0x10, 0xc7, 0xb3, 0x6d, 0x94, 0xb4, 0xeb, 0xfc, 0x7e, 0x80, 0x0b, 0x6a, 0x5a, 0x24, 0x3b, 0x5a, + 0x09, 0x54, 0x29, 0x8a, 0x4d, 0x40, 0xe2, 0x10, 0x4e, 0x84, 0x00, 0x0a, 0x20, 0x54, 0x59, 0x54, + 0x48, 0x5c, 0x22, 0x3b, 0xde, 0x3a, 0x56, 0x6d, 0x4f, 0xe4, 0xdd, 0xa4, 0xe4, 0x0d, 0x90, 0xb8, + 0x70, 0xec, 0xb1, 0xef, 0xc1, 0x8d, 0x53, 0x8f, 0x3d, 0x22, 0x0e, 0x06, 0x25, 0x17, 0xce, 0x79, + 0x02, 0xe4, 0xf5, 0x9a, 0x58, 0x54, 0x54, 0x20, 0x71, 0xca, 0xce, 0xce, 0x7e, 0x67, 0x3e, 0xf3, + 0x27, 0xc6, 0x77, 0x80, 0x85, 0xc0, 0x7c, 0x66, 0x8e, 0x01, 0x82, 0x96, 0x1f, 0x0d, 0x69, 0xc4, + 0xfd, 0x29, 0x65, 0xe6, 0xb4, 0xed, 0x50, 0x6e, 0xb7, 0xcd, 0xd5, 0x95, 0x31, 0x8e, 0x81, 0x83, + 0xaa, 0x49, 0x85, 0x91, 0x2a, 0x0a, 0x5e, 0x29, 0xd8, 0xbd, 0xee, 0x81, 0x07, 0xe2, 0xa9, 0x99, + 0x9e, 0x32, 0xd5, 0xae, 0xe6, 0x01, 0x78, 0x01, 0x35, 0x85, 0xe5, 0x4c, 0x0e, 0x4d, 0x77, 0x12, + 0xdb, 0xdc, 0x87, 0x28, 0xf3, 0x93, 0x67, 0xb8, 0xb2, 0x6f, 0xc7, 0x76, 0xc8, 0xd4, 0x0e, 0xae, + 0x85, 0x7e, 0xc4, 0xa9, 0x3b, 0x70, 0x69, 0x04, 0x61, 0x1d, 0x35, 0xd0, 0xde, 0x66, 0x77, 0x7b, + 0x99, 0xe8, 0x5b, 0x33, 0x3b, 0x0c, 0x3a, 0xa4, 0xe8, 0x25, 0x96, 0x92, 0x99, 0xbd, 0xd4, 0xea, + 0x94, 0x4f, 0x4e, 0xf5, 0x12, 0x79, 0x87, 0xf0, 0x8d, 0x17, 0x30, 0x3c, 0xb2, 0x9d, 0x80, 0xf6, + 0x64, 0x1a, 0xd6, 0x8f, 0x0e, 0x41, 0x05, 0xac, 0x06, 0xd2, 0x31, 0xc8, 0x01, 0x58, 0x1d, 0x35, + 0xd6, 0xf7, 0x94, 0xbb, 0x3b, 0x46, 0x86, 0x68, 0xe4, 0x88, 0x46, 0xae, 0xed, 0xde, 0x3a, 0x4b, + 0xf4, 0xd2, 0x32, 0xd1, 0x77, 0x32, 0x80, 0x8b, 0x21, 0xc8, 0xc9, 0x57, 0x1d, 0x59, 0xd7, 0x82, + 0x5f, 0x93, 0x92, 0x4f, 0x08, 0x6f, 0xf6,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0, 0xb6, 0xf0, 0x46, 0x3e, + 0xe1, 0xfa, 0x7a, 0x03, 0x5d, 0xbe, 0x23, 0x37, 0xe5, 0x8e, 0xc8, 0x36, 0xe4, 0xc2, 0x6c, 0x33, + 0x7e, 0xc6, 0x21, 0x63, 0xbc, 0xfd, 0x30, 0x9a, 0x65, 0xfc, 0xfd, 0x88, 0xd3, 0x38, 0xb2, 0x03, + 0x51, 0x07, 0x53, 0x0f, 0xf0, 0x7f, 0x82, 0x97, 0xc3, 0x40, 0x10, 0xfc, 0xe9, 0xe4, 0x0a, 0xcd, + 0x90, 0x93, 0x53, 0xc6, 0xab, 0x2b, 0x72, 0x8c, 0xb5, 0x47, 0x20, 0x54, 0xb1, 0xcd, 0xa9, 0x9b, + 0xbd, 0x7e, 0x09, 0xe9, 0x1f, 0xe4, 0x77, 0x89, 0xd1, 0xbf, 0x48, 0xdc, 0x3d, 0x38, 0x9b, 0x6b, + 0xe8, 0x7c, 0xae, 0xa1, 0x6f, 0x73, 0x0d, 0x7d, 0x58, 0x68, 0xa5, 0xf3, 0x85, 0x56, 0xfa, 0xbc, + 0xd0, 0x4a, 0x6f, 0x1e, 0x14, 0x06, 0x2f, 0x73, 0xb4, 0x02, 0xdb, 0x61, 0xb9, 0x61, 0x4e, 0xdb, + 0xf7, 0xcd, 0xb7, 0x17, 0x3e, 0x49, 0x62, 0x23, 0x9c, 0x8a, 0xe8, 0xfd, 0xbd, 0x1f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x57, 0xaa, 0x7a, 0xb1, 0xba, 0x04, 0x00, 0x00, } func (this *DistrRecord) Equal(that interface{}) bool { @@ -584,7 +631,7 @@ func (m *PoolToGauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PoolToGauges) Marshal() (dAtA []byte, err error) { +func (m *AnyPoolToInternalGauges) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -594,12 +641,12 @@ func (m *PoolToGauges) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PoolToGauges) MarshalTo(dAtA []byte) (int, error) { +func (m *AnyPoolToInternalGauges) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PoolToGauges) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AnyPoolToInternalGauges) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -621,6 +668,43 @@ func (m *PoolToGauges) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ConcentratedPoolToNoLockGauges) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConcentratedPoolToNoLockGauges) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConcentratedPoolToNoLockGauges) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.PoolToGauge) > 0 { + for iNdEx := len(m.PoolToGauge) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PoolToGauge[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintIncentives(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintIncentives(dAtA []byte, offset int, v uint64) int { offset -= sovIncentives(v) base := offset @@ -708,7 +792,22 @@ func (m *PoolToGauge) Size() (n int) { return n } -func (m *PoolToGauges) Size() (n int) { +func (m *AnyPoolToInternalGauges) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.PoolToGauge) > 0 { + for _, e := range m.PoolToGauge { + l = e.Size() + n += 1 + l + sovIncentives(uint64(l)) + } + } + return n +} + +func (m *ConcentratedPoolToNoLockGauges) Size() (n int) { if m == nil { return 0 } @@ -1237,7 +1336,7 @@ func (m *PoolToGauge) Unmarshal(dAtA []byte) error { } return nil } -func (m *PoolToGauges) Unmarshal(dAtA []byte) error { +func (m *AnyPoolToInternalGauges) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1260,10 +1359,10 @@ func (m *PoolToGauges) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PoolToGauges: wiretype end group for non-group") + return fmt.Errorf("proto: AnyPoolToInternalGauges: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PoolToGauges: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AnyPoolToInternalGauges: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 2: @@ -1321,6 +1420,90 @@ func (m *PoolToGauges) Unmarshal(dAtA []byte) error { } return nil } +func (m *ConcentratedPoolToNoLockGauges) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentives + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConcentratedPoolToNoLockGauges: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConcentratedPoolToNoLockGauges: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolToGauge", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowIncentives + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthIncentives + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthIncentives + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PoolToGauge = append(m.PoolToGauge, PoolToGauge{}) + if err := m.PoolToGauge[len(m.PoolToGauge)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipIncentives(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthIncentives + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipIncentives(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0