From 2e919c65a163a14816a799441926a417b4b2cdd7 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Wed, 3 Jan 2024 13:03:44 -0700 Subject: [PATCH 1/2] remove tx fee tracker --- app/keepers/keepers.go | 2 - app/upgrades/v21/upgrades.go | 2 +- app/upgrades/v21/upgrades_test.go | 4 +- go.sum | 2 - proto/osmosis/protorev/v1beta1/protorev.proto | 10 +- proto/osmosis/txfees/v1beta1/genesis.proto | 15 +- x/protorev/keeper/grpc_query_test.go | 2 - x/protorev/keeper/keeper.go | 7 - x/protorev/keeper/protorev.go | 7 - x/protorev/keeper/protorev_test.go | 7 - x/protorev/types/expected_keepers.go | 5 - x/protorev/types/protorev.pb.go | 206 ++++------- x/txfees/keeper/feedecorator.go | 2 - x/txfees/keeper/feedecorator_test.go | 2 - x/txfees/keeper/genesis.go | 18 - x/txfees/keeper/genesis_test.go | 19 +- x/txfees/keeper/hooks_test.go | 3 - x/txfees/keeper/protorev.go | 63 ---- x/txfees/keeper/protorev_test.go | 121 ------- x/txfees/types/expected_keepers.go | 1 - x/txfees/types/genesis.go | 4 - x/txfees/types/genesis.pb.go | 325 +----------------- 22 files changed, 112 insertions(+), 715 deletions(-) delete mode 100644 x/txfees/keeper/protorev.go delete mode 100644 x/txfees/keeper/protorev_test.go diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index f66c8f42d6f..123c70eaf0d 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -391,7 +391,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.EpochsKeeper, appKeepers.PoolManagerKeeper, appKeepers.ConcentratedLiquidityKeeper, - appKeepers.TxFeesKeeper, ) appKeepers.ProtoRevKeeper = &protorevKeeper appKeepers.PoolManagerKeeper.SetProtorevKeeper(appKeepers.ProtoRevKeeper) @@ -407,7 +406,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers( dataDir, ) appKeepers.TxFeesKeeper = &txFeesKeeper - appKeepers.ProtoRevKeeper.SetTxFeesKeeper(appKeepers.TxFeesKeeper) appKeepers.IncentivesKeeper = incentiveskeeper.NewKeeper( appKeepers.keys[incentivestypes.StoreKey], diff --git a/app/upgrades/v21/upgrades.go b/app/upgrades/v21/upgrades.go index ca0829f736d..9c0beac1430 100644 --- a/app/upgrades/v21/upgrades.go +++ b/app/upgrades/v21/upgrades.go @@ -168,7 +168,7 @@ func CreateUpgradeHandler( // Since we are now tracking all protocol rev, we set the accounting height to the current block height for each module // that generates protocol rev. keepers.PoolManagerKeeper.SetTakerFeeTrackerStartHeight(ctx, ctx.BlockHeight()) - keepers.TxFeesKeeper.SetTxFeesTrackerStartHeight(ctx, ctx.BlockHeight()) + // keepers.TxFeesKeeper.SetTxFeesTrackerStartHeight(ctx, ctx.BlockHeight()) // We start the cyclic arb tracker from the value it currently is at since it has been tracking since inception (without a start height). // This will allow us to display the amount of cyclic arb profits that have been generated from a certain block height. allCyclicArbProfits := keepers.ProtoRevKeeper.GetAllProfits(ctx) diff --git a/app/upgrades/v21/upgrades_test.go b/app/upgrades/v21/upgrades_test.go index e94f6917f40..ce9097ad3e7 100644 --- a/app/upgrades/v21/upgrades_test.go +++ b/app/upgrades/v21/upgrades_test.go @@ -50,11 +50,11 @@ func (s *UpgradeTestSuite) TestUpgrade() { // Check all accounting start heights should be the same height as the upgrade s.Require().Equal(v21UpgradeHeight, allProtocolRevenue.CyclicArbTracker.HeightAccountingStartsFrom) s.Require().Equal(v21UpgradeHeight, allProtocolRevenue.TakerFeesTracker.HeightAccountingStartsFrom) - s.Require().Equal(v21UpgradeHeight, allProtocolRevenue.TxFeesTracker.HeightAccountingStartsFrom) + // s.Require().Equal(v21UpgradeHeight, allProtocolRevenue.TxFeesTracker.HeightAccountingStartsFrom) // All values should be nill except for the cyclic arb profits, which should start at the value it was at time of upgrade s.Require().Equal(sdk.Coins(nil), allProtocolRevenue.TakerFeesTracker.TakerFeesToCommunityPool) s.Require().Equal(sdk.Coins(nil), allProtocolRevenue.TakerFeesTracker.TakerFeesToStakers) - s.Require().Equal(sdk.Coins(nil), allProtocolRevenue.TxFeesTracker.TxFees) + // s.Require().Equal(sdk.Coins(nil), allProtocolRevenue.TxFeesTracker.TxFees) s.Require().Equal(cyclicArbProfits, allProtocolRevenue.CyclicArbTracker.CyclicArb) } diff --git a/go.sum b/go.sum index 8c35e444d2e..195f88a0847 100644 --- a/go.sum +++ b/go.sum @@ -1466,8 +1466,6 @@ github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4 h1:RCd53Gnnn9yrjjdh8sBkhitqTz/ github.com/osmosis-labs/cosmos-sdk v0.47.5-osmo-4/go.mod h1:EHwCeN9IXonsjKcjpS12MqeStdZvIdxt3VYXhus3G3c= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY= github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI= -github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231231215538-1a8c243520e9 h1:uv3HgeYw9QArhkO9YQGVfsnm/xS79ldMBJAMFZwXZno= -github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231231215538-1a8c243520e9/go.mod h1:FQ45vPTc2l+NUA/gk7wZTxUh/hrDRWrRwZj8Ua5cpSU= github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231231222019-bcdabda4fc36 h1:UOpEx+lWFd9uX0goJMLaIvSjMCsWOmBzLOEVGZCi2Qk= github.com/osmosis-labs/osmosis/osmomath v0.0.7-0.20231231222019-bcdabda4fc36/go.mod h1:Ger7K14gEgLOF+4qHNqicrGkNP9Ubg2tBnKkIzvXABE= github.com/osmosis-labs/osmosis/osmoutils v0.0.7-0.20231229191315-aff18520757d h1:VKMEmZBVt6VrrjBA9dMsxqWJlbrzqbMXX69iOjuevRc= diff --git a/proto/osmosis/protorev/v1beta1/protorev.proto b/proto/osmosis/protorev/v1beta1/protorev.proto index 9114219d706..c54bd01376e 100644 --- a/proto/osmosis/protorev/v1beta1/protorev.proto +++ b/proto/osmosis/protorev/v1beta1/protorev.proto @@ -189,10 +189,12 @@ message AllProtocolRevenue { (gogoproto.moretags) = "yaml:\"taker_fees_tracker\"", (gogoproto.nullable) = false ]; - osmosis.txfees.v1beta1.TxFeesTracker tx_fees_tracker = 2 [ - (gogoproto.moretags) = "yaml:\"tx_fees_tracker\"", - (gogoproto.nullable) = false - ]; + // osmosis.txfees.v1beta1.TxFeesTracker tx_fees_tracker = 2 [ + // (gogoproto.moretags) = "yaml:\"tx_fees_tracker\"", + // (gogoproto.nullable) = false + // ]; + reserved 2; // Reserve the field number + reserved "tx_fees_tracker"; // Reserve the field name CyclicArbTracker cyclic_arb_tracker = 3 [ (gogoproto.moretags) = "yaml:\"cyclic_arb_tracker\"", (gogoproto.nullable) = false diff --git a/proto/osmosis/txfees/v1beta1/genesis.proto b/proto/osmosis/txfees/v1beta1/genesis.proto index a5412985a05..90a269623af 100644 --- a/proto/osmosis/txfees/v1beta1/genesis.proto +++ b/proto/osmosis/txfees/v1beta1/genesis.proto @@ -12,15 +12,8 @@ message GenesisState { string basedenom = 1; repeated FeeToken feetokens = 2 [ (gogoproto.nullable) = false ]; - // KVStore state - TxFeesTracker txFeesTracker = 3; + // // KVStore state + // TxFeesTracker txFeesTracker = 3; + reserved 3; + reserved "txFeesTracker"; } - -message TxFeesTracker { - repeated cosmos.base.v1beta1.Coin tx_fees = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - int64 height_accounting_starts_from = 2 - [ (gogoproto.moretags) = "yaml:\"height_accounting_starts_from\"" ]; -} \ No newline at end of file diff --git a/x/protorev/keeper/grpc_query_test.go b/x/protorev/keeper/grpc_query_test.go index f8b2e1a30d4..b0ad02d4593 100644 --- a/x/protorev/keeper/grpc_query_test.go +++ b/x/protorev/keeper/grpc_query_test.go @@ -419,7 +419,6 @@ func (s *KeeperTestSuite) TestGetAllProtocolRevenueGRPCQuery() { res, err = s.queryClient.GetAllProtocolRevenue(sdk.WrapSDKContext(s.Ctx), req) s.Require().NoError(err) s.Require().Equal(cyclicArbProfits, res.AllProtocolRevenue.CyclicArbTracker.CyclicArb) - s.Require().Equal(txFeeCharged, res.AllProtocolRevenue.TxFeesTracker.TxFees) s.Require().Equal(expectedTakerFeeToStakers, res.AllProtocolRevenue.TakerFeesTracker.TakerFeesToStakers) s.Require().Equal(expectedTakerFeeToCommunityPool, res.AllProtocolRevenue.TakerFeesTracker.TakerFeesToCommunityPool) @@ -442,7 +441,6 @@ func (s *KeeperTestSuite) TestGetAllProtocolRevenueGRPCQuery() { res, err = s.queryClient.GetAllProtocolRevenue(sdk.WrapSDKContext(s.Ctx), req) s.Require().NoError(err) s.Require().Equal(cyclicArbProfits.Add(cyclicArbProfits...), res.AllProtocolRevenue.CyclicArbTracker.CyclicArb) - s.Require().Equal(txFeeCharged.Add(txFeeCharged...), res.AllProtocolRevenue.TxFeesTracker.TxFees) s.Require().Equal(expectedTakerFeeToStakers.Add(expectedTakerFeeToStakers...), res.AllProtocolRevenue.TakerFeesTracker.TakerFeesToStakers) s.Require().Equal(expectedTakerFeeToCommunityPool.Add(expectedTakerFeeToCommunityPool...), res.AllProtocolRevenue.TakerFeesTracker.TakerFeesToCommunityPool) } diff --git a/x/protorev/keeper/keeper.go b/x/protorev/keeper/keeper.go index b227c748f7a..2f743131616 100644 --- a/x/protorev/keeper/keeper.go +++ b/x/protorev/keeper/keeper.go @@ -25,7 +25,6 @@ type ( epochKeeper types.EpochKeeper poolmanagerKeeper types.PoolManagerKeeper concentratedLiquidityKeeper types.ConcentratedLiquidityKeeper - txfeesKeeper types.TxFeesKeeper } ) @@ -39,7 +38,6 @@ func NewKeeper( epochKeeper types.EpochKeeper, poolmanagerKeeper types.PoolManagerKeeper, concentratedLiquidityKeeper types.ConcentratedLiquidityKeeper, - txfeesKeeper types.TxFeesKeeper, ) Keeper { // set KeyTable if it has not already been set if !ps.HasKeyTable() { @@ -56,14 +54,9 @@ func NewKeeper( epochKeeper: epochKeeper, poolmanagerKeeper: poolmanagerKeeper, concentratedLiquidityKeeper: concentratedLiquidityKeeper, - txfeesKeeper: txfeesKeeper, } } func (k Keeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } - -func (k *Keeper) SetTxFeesKeeper(txFeesKeeper types.TxFeesKeeper) { - k.txfeesKeeper = txFeesKeeper -} diff --git a/x/protorev/keeper/protorev.go b/x/protorev/keeper/protorev.go index 8826028caf8..12698b59564 100644 --- a/x/protorev/keeper/protorev.go +++ b/x/protorev/keeper/protorev.go @@ -6,7 +6,6 @@ import ( poolmanagertypes "github.com/osmosis-labs/osmosis/v21/x/poolmanager/types" "github.com/osmosis-labs/osmosis/v21/x/protorev/types" - txfeestypes "github.com/osmosis-labs/osmosis/v21/x/txfees/types" "github.com/cosmos/cosmos-sdk/store/prefix" @@ -503,14 +502,8 @@ func (k Keeper) GetAllProtocolRevenue(ctx sdk.Context) types.AllProtocolRevenue HeightAccountingStartsFrom: k.poolmanagerKeeper.GetTakerFeeTrackerStartHeight(ctx), } - txFeesTracker := txfeestypes.TxFeesTracker{ - TxFees: k.txfeesKeeper.GetTxFeesTrackerValue(ctx), - HeightAccountingStartsFrom: k.txfeesKeeper.GetTxFeesTrackerStartHeight(ctx), - } - return types.AllProtocolRevenue{ TakerFeesTracker: takerFeesTracker, - TxFeesTracker: txFeesTracker, CyclicArbTracker: cyclicArbTracker, } } diff --git a/x/protorev/keeper/protorev_test.go b/x/protorev/keeper/protorev_test.go index 362b5d1cd3c..c04925a6e5b 100644 --- a/x/protorev/keeper/protorev_test.go +++ b/x/protorev/keeper/protorev_test.go @@ -6,7 +6,6 @@ import ( "github.com/osmosis-labs/osmosis/osmomath" poolmanagertypes "github.com/osmosis-labs/osmosis/v21/x/poolmanager/types" "github.com/osmosis-labs/osmosis/v21/x/protorev/types" - txfeestypes "github.com/osmosis-labs/osmosis/v21/x/txfees/types" ) // TestGetTokenPairArbRoutes tests the GetTokenPairArbRoutes function. @@ -338,10 +337,6 @@ func (s *KeeperTestSuite) TestGetAllProtocolRevenue() { TakerFeesToCommunityPool: sdk.Coins(nil), HeightAccountingStartsFrom: 0, }, - TxFeesTracker: txfeestypes.TxFeesTracker{ - TxFees: sdk.Coins(nil), - HeightAccountingStartsFrom: 0, - }, CyclicArbTracker: types.CyclicArbTracker{ CyclicArb: sdk.NewCoins(), HeightAccountingStartsFrom: 0, @@ -374,7 +369,6 @@ func (s *KeeperTestSuite) TestGetAllProtocolRevenue() { // Check protocol revenue allProtoRev = s.App.ProtoRevKeeper.GetAllProtocolRevenue(s.Ctx) s.Require().Equal(cyclicArbProfits, allProtoRev.CyclicArbTracker.CyclicArb) - s.Require().Equal(txFeeCharged, allProtoRev.TxFeesTracker.TxFees) s.Require().Equal(expectedTakerFeeToStakers, allProtoRev.TakerFeesTracker.TakerFeesToStakers) s.Require().Equal(expectedTakerFeeToCommunityPool, allProtoRev.TakerFeesTracker.TakerFeesToCommunityPool) @@ -396,7 +390,6 @@ func (s *KeeperTestSuite) TestGetAllProtocolRevenue() { // Check protocol revenue allProtoRev = s.App.ProtoRevKeeper.GetAllProtocolRevenue(s.Ctx) s.Require().Equal(cyclicArbProfits.Add(cyclicArbProfits...), allProtoRev.CyclicArbTracker.CyclicArb) - s.Require().Equal(txFeeCharged.Add(txFeeCharged...), allProtoRev.TxFeesTracker.TxFees) s.Require().Equal(expectedTakerFeeToStakers.Add(expectedTakerFeeToStakers...), allProtoRev.TakerFeesTracker.TakerFeesToStakers) s.Require().Equal(expectedTakerFeeToCommunityPool.Add(expectedTakerFeeToCommunityPool...), allProtoRev.TakerFeesTracker.TakerFeesToCommunityPool) } diff --git a/x/protorev/types/expected_keepers.go b/x/protorev/types/expected_keepers.go index f7e419a48fb..6ed6981d565 100644 --- a/x/protorev/types/expected_keepers.go +++ b/x/protorev/types/expected_keepers.go @@ -81,8 +81,3 @@ type ConcentratedLiquidityKeeper interface { maxTicksCrossed uint64, ) (maxTokenIn, resultingTokenOut sdk.Coin, err error) } - -type TxFeesKeeper interface { - GetTxFeesTrackerValue(ctx sdk.Context) (currentTxFees sdk.Coins) - GetTxFeesTrackerStartHeight(ctx sdk.Context) int64 -} diff --git a/x/protorev/types/protorev.pb.go b/x/protorev/types/protorev.pb.go index d84a8dc8228..f4f5329a875 100644 --- a/x/protorev/types/protorev.pb.go +++ b/x/protorev/types/protorev.pb.go @@ -12,7 +12,7 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" types1 "github.com/osmosis-labs/osmosis/v21/x/poolmanager/types" - types2 "github.com/osmosis-labs/osmosis/v21/x/txfees/types" + _ "github.com/osmosis-labs/osmosis/v21/x/txfees/types" io "io" math "math" math_bits "math/bits" @@ -726,7 +726,6 @@ func (m *BaseDenom) GetDenom() string { type AllProtocolRevenue struct { TakerFeesTracker types1.TakerFeesTracker `protobuf:"bytes,1,opt,name=taker_fees_tracker,json=takerFeesTracker,proto3" json:"taker_fees_tracker" yaml:"taker_fees_tracker"` - TxFeesTracker types2.TxFeesTracker `protobuf:"bytes,2,opt,name=tx_fees_tracker,json=txFeesTracker,proto3" json:"tx_fees_tracker" yaml:"tx_fees_tracker"` CyclicArbTracker CyclicArbTracker `protobuf:"bytes,3,opt,name=cyclic_arb_tracker,json=cyclicArbTracker,proto3" json:"cyclic_arb_tracker" yaml:"cyclic_arb_tracker"` } @@ -770,13 +769,6 @@ func (m *AllProtocolRevenue) GetTakerFeesTracker() types1.TakerFeesTracker { return types1.TakerFeesTracker{} } -func (m *AllProtocolRevenue) GetTxFeesTracker() types2.TxFeesTracker { - if m != nil { - return m.TxFeesTracker - } - return types2.TxFeesTracker{} -} - func (m *AllProtocolRevenue) GetCyclicArbTracker() CyclicArbTracker { if m != nil { return m.CyclicArbTracker @@ -858,82 +850,81 @@ func init() { } var fileDescriptor_1e9f2391fd9fec01 = []byte{ - // 1196 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xc1, 0x6f, 0x1b, 0xc5, - 0x17, 0xce, 0xd6, 0x69, 0x5a, 0x8f, 0x5b, 0xdb, 0x9d, 0xa6, 0xad, 0xe3, 0xfe, 0x7e, 0xde, 0x30, - 0x2d, 0xe0, 0x22, 0xc5, 0x26, 0x81, 0x03, 0x2a, 0xea, 0x21, 0x1b, 0x14, 0x11, 0x21, 0x92, 0x68, - 0x62, 0xa9, 0x82, 0xcb, 0x32, 0xbb, 0x1e, 0x3b, 0x8b, 0xbd, 0x3b, 0xd6, 0xce, 0x38, 0x71, 0x8a, - 0x54, 0x21, 0x71, 0xe4, 0xc2, 0x85, 0x1b, 0x07, 0x6e, 0x48, 0x48, 0xfc, 0x1f, 0x3d, 0xf6, 0x58, - 0x71, 0x58, 0x50, 0x72, 0x41, 0x70, 0xf3, 0x5f, 0x80, 0x76, 0x66, 0x76, 0xed, 0x6c, 0xe2, 0x86, - 0x48, 0x88, 0x93, 0x77, 0xdf, 0xfb, 0xbe, 0xef, 0xcd, 0xfb, 0xde, 0xce, 0x78, 0xc0, 0xdb, 0x8c, - 0xfb, 0x8c, 0x7b, 0xbc, 0x39, 0x08, 0x99, 0x60, 0x21, 0x3d, 0x68, 0x1e, 0xac, 0x3a, 0x54, 0x90, - 0xd5, 0x34, 0xd0, 0x90, 0x0f, 0xb0, 0xa2, 0x81, 0x8d, 0x34, 0xae, 0x81, 0xd5, 0x25, 0x57, 0xa6, - 0x6c, 0x99, 0x68, 0xaa, 0x17, 0x85, 0xaa, 0x2e, 0x76, 0x59, 0x97, 0xa9, 0x78, 0xfc, 0xa4, 0xa3, - 0x35, 0x85, 0x69, 0x3a, 0x84, 0xd3, 0xb4, 0x9c, 0xcb, 0xbc, 0x40, 0xe7, 0x1f, 0xa5, 0x6b, 0x62, - 0xac, 0xef, 0x93, 0x80, 0x74, 0x69, 0x98, 0xe2, 0xba, 0x34, 0xa0, 0xe9, 0x32, 0xaa, 0x0f, 0x13, - 0xa8, 0x18, 0x75, 0x28, 0xe5, 0xe7, 0xa3, 0xd0, 0x2b, 0x03, 0xc0, 0x16, 0xeb, 0xd1, 0x60, 0x97, - 0x78, 0xe1, 0x7a, 0xe8, 0x60, 0x36, 0x14, 0x94, 0xc3, 0xcf, 0x00, 0x20, 0xa1, 0x63, 0x87, 0xf2, - 0xad, 0x62, 0x2c, 0xe7, 0xea, 0x85, 0x35, 0xb3, 0x31, 0xab, 0xcf, 0x86, 0x64, 0x59, 0x4b, 0x2f, - 0x22, 0x73, 0x6e, 0x1c, 0x99, 0xb7, 0x8e, 0x88, 0xdf, 0x7f, 0x8c, 0x26, 0x02, 0x08, 0xe7, 0x49, - 0x2a, 0xdd, 0x00, 0xd7, 0x45, 0x5c, 0xd0, 0xf6, 0x82, 0xca, 0x95, 0x65, 0xa3, 0x9e, 0xb7, 0x6e, - 0x8f, 0x23, 0xb3, 0xa4, 0x38, 0x49, 0x06, 0xe1, 0x6b, 0xf2, 0x71, 0x2b, 0x80, 0xab, 0x20, 0xaf, - 0xa2, 0x6c, 0x28, 0x2a, 0x39, 0x49, 0x58, 0x1c, 0x47, 0x66, 0x79, 0x9a, 0xc0, 0x86, 0x02, 0x61, - 0x25, 0xbb, 0x33, 0x14, 0x8f, 0xe7, 0xff, 0xf8, 0xd1, 0x34, 0xd0, 0x2f, 0x06, 0xb8, 0x2a, 0x6b, - 0xc2, 0x6d, 0xb0, 0x20, 0x42, 0xd2, 0xfe, 0x27, 0x9d, 0xb4, 0x62, 0x9c, 0x75, 0x47, 0x77, 0x72,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, 0x36, 0xab, 0x7f, 0x56, 0x78, 0xbb, - 0xd7, 0x14, 0x47, 0x03, 0xca, 0x25, 0x81, 0xe3, 0x7c, 0xba, 0x0e, 0xd8, 0x03, 0xff, 0xdf, 0x57, - 0xbb, 0x84, 0xb8, 0x2e, 0x1b, 0x06, 0xc2, 0x0b, 0xba, 0x36, 0x17, 0x24, 0x14, 0xdc, 0xee, 0x84, - 0xcc, 0x97, 0xd6, 0xe7, 0xac, 0xfa, 0x38, 0x32, 0x1f, 0xaa, 0xc6, 0x5e, 0x0b, 0x47, 0xb8, 0xaa, - 0xf2, 0xeb, 0x69, 0x7a, 0x4f, 0x66, 0x37, 0x43, 0xe6, 0x5b, 0xdb, 0x2f, 0x8e, 0x6b, 0xc6, 0xcb, - 0xe3, 0x9a, 0xf1, 0xfb, 0x71, 0xcd, 0xf8, 0xee, 0xa4, 0x36, 0xf7, 0xf2, 0xa4, 0x36, 0xf7, 0xea, - 0xa4, 0x36, 0xf7, 0xf9, 0xfb, 0x53, 0x6b, 0xd7, 0x96, 0xaf, 0xf4, 0x89, 0xc3, 0x93, 0x97, 0xe6, - 0xc1, 0xda, 0x6a, 0x73, 0x34, 0xb9, 0xec, 0xcb, 0x6e, 0x9c, 0x05, 0xf9, 0xfe, 0xde, 0xdf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x47, 0x52, 0x72, 0x8b, 0x0d, 0x0c, 0x00, 0x00, + // 1175 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0x6e, 0x1a, 0x8f, 0x5b, 0xdb, 0x99, 0xa4, 0xad, 0xe3, 0x7e, 0xbf, 0xde, 0x30, + 0xad, 0xc0, 0x45, 0x8a, 0x4d, 0x02, 0x07, 0x54, 0xd4, 0x43, 0x36, 0x28, 0x22, 0x20, 0x92, 0x68, + 0x62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fc, 0xba, 0x59, 0x9f, 0xd6, 0x67, 0x5d, 0xa2, 0xac, 0xe5, 0x17, + 0x91, 0x39, 0x33, 0x8c, 0xcc, 0x85, 0x13, 0xe2, 0xf7, 0x1e, 0xa3, 0x11, 0x01, 0xc2, 0x39, 0x92, + 0x52, 0xd7, 0xc1, 0xbc, 0x88, 0x13, 0xda, 0x5e, 0x50, 0x9e, 0x5d, 0x31, 0x6a, 0x39, 0x6b, 0x71, + 0x18, 0x99, 0x45, 0x85, 0x49, 0x3c, 0x08, 0xdf, 0x94, 0xcb, 0xed, 0x00, 0xae, 0x81, 0x9c, 0xb2, + 0xb2, 0x81, 0x28, 0x67, 0x24, 0x60, 0x69, 0x18, 0x99, 0xa5, 0x71, 0x00, 0x1b, 0x08, 0x84, 0x15, + 0xed, 0xee, 0x40, 0x3c, 0xce, 0xfe, 0xf1, 0x83, 0x69, 0xa0, 0x5f, 0x0c, 0x70, 0x43, 0xe6, 0x84, + 0x3b, 0x60, 0x4e, 0x84, 0xa4, 0xf5, 0x4f, 0x3a, 0x69, 0xc6, 0x71, 0xd6, 0x1d, 0xdd, 0xc9, 0x6d, + 0x9d, 0x44, 0x82, 0x11, 0xd6, 0x2c, 0x70, 0x07, 0xe4, 0xb8, 0xa0, 0x7d, 0x9b, 0x7b, 0xcf, 0xa8, + 0xee, 0x61, 0x2d, 0x46, 0xfc, 0x1a, 0x99, 0x77, 0xd4, 0x00, 0x79, 0xab, 0x5b, 0xf7, 0x58, 0xc3, + 0x27, 0xe2, 0xa0, 0xbe, 0x1d, 0x88, 0x51, 0xbd, 0x29, 0x0e, 0xe1, 0xf9, 0x78, 0xbd, 0xef, 0x3d, + 0xa3, 0xba, 0xde, 0xef, 0x0c, 0x70, 0x43, 0xa6, 0x87, 0x0f, 0x40, 0x36, 0x9e, 0x6f, 0xd9, 0x58, + 0x31, 0x6a, 0x59, 0xab, 0x38, 0x8c, 0xcc, 0xbc, 0x42, 0xc7, 0x56, 0x84, 0xa5, 0xf3, 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 0xab, 0x3d, 0xe2, 0xf0, 0x64, 0xd3, 0x38, 0x5c, 0x5f, 0x6b, 0x1c, + 0x8f, 0x1e, 0xe5, 0xb2, 0x1b, 0x67, 0x4e, 0xee, 0xdf, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x98, + 0xe7, 0x09, 0x70, 0xb5, 0x0b, 0x00, 0x00, } func (this *TokenPairArbRoutes) Equal(that interface{}) bool { @@ -1575,16 +1566,6 @@ func (m *AllProtocolRevenue) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x1a - { - size, err := m.TxFeesTracker.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProtorev(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 { size, err := m.TakerFeesTracker.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1866,8 +1847,6 @@ func (m *AllProtocolRevenue) Size() (n int) { _ = l l = m.TakerFeesTracker.Size() n += 1 + l + sovProtorev(uint64(l)) - l = m.TxFeesTracker.Size() - n += 1 + l + sovProtorev(uint64(l)) l = m.CyclicArbTracker.Size() n += 1 + l + sovProtorev(uint64(l)) return n @@ -3387,39 +3366,6 @@ func (m *AllProtocolRevenue) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxFeesTracker", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtorev - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProtorev - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProtorev - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TxFeesTracker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CyclicArbTracker", wireType) diff --git a/x/txfees/keeper/feedecorator.go b/x/txfees/keeper/feedecorator.go index 68075e8d2cd..c66185ef9c1 100644 --- a/x/txfees/keeper/feedecorator.go +++ b/x/txfees/keeper/feedecorator.go @@ -301,7 +301,5 @@ func DeductFees(txFeesKeeper types.TxFeesKeeper, bankKeeper types.BankKeeper, ct } } - txFeesKeeper.IncreaseTxFeesTracker(ctx, fees[0]) - return nil } diff --git a/x/txfees/keeper/feedecorator_test.go b/x/txfees/keeper/feedecorator_test.go index e2918040577..e9d446ca46d 100644 --- a/x/txfees/keeper/feedecorator_test.go +++ b/x/txfees/keeper/feedecorator_test.go @@ -149,7 +149,6 @@ func (s *KeeperTestSuite) TestFeeDecorator() { // See DeductFeeDecorator AnteHandler for how this is used s.FundAcc(sdk.MustAccAddressFromBech32("osmo1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmcn030"), sdk.NewCoins(sdk.NewInt64Coin("uosmo", 1))) - preFeeDecoratorTxFeeTrackerValue := s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx) err := s.SetupTxFeeAnteHandlerAndChargeFee(s.clientCtx, tc.minGasPrices, tc.gasRequested, tc.isCheckTx, tc.isSimulate, tc.txFee) if tc.expectPass { // ensure fee was collected @@ -160,7 +159,6 @@ func (s *KeeperTestSuite) TestFeeDecorator() { } moduleAddr := s.App.AccountKeeper.GetModuleAddress(moduleName) s.Require().Equal(tc.txFee[0], s.App.BankKeeper.GetBalance(s.Ctx, moduleAddr, tc.txFee[0].Denom), tc.name) - s.Require().Equal(preFeeDecoratorTxFeeTrackerValue.Add(tc.txFee[0]), s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx)) } s.Require().NoError(err, "test: %s", tc.name) } else { diff --git a/x/txfees/keeper/genesis.go b/x/txfees/keeper/genesis.go index fead181568d..3c47e8f8169 100644 --- a/x/txfees/keeper/genesis.go +++ b/x/txfees/keeper/genesis.go @@ -17,30 +17,12 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { if err != nil { panic(err) } - - // We track the txfees generated in the KVStore. - // If the values were exported, we set them here. - // If the values were not exported, we initialize them to zero as well as use the current block height. - if genState.TxFeesTracker != nil { - k.SetTxFeesTrackerValue(ctx, genState.TxFeesTracker.TxFees) - k.SetTxFeesTrackerStartHeight(ctx, genState.TxFeesTracker.HeightAccountingStartsFrom) - } else { - k.SetTxFeesTrackerValue(ctx, sdk.NewCoins()) - k.SetTxFeesTrackerStartHeight(ctx, ctx.BlockHeight()) - } } // ExportGenesis returns the txfees module's exported genesis. func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { - // Export KVStore values to the genesis state so they can be imported in init genesis. - txFeesTracker := types.TxFeesTracker{ - TxFees: k.GetTxFeesTrackerValue(ctx), - HeightAccountingStartsFrom: k.GetTxFeesTrackerStartHeight(ctx), - } - genesis := types.DefaultGenesis() genesis.Basedenom, _ = k.GetBaseDenom(ctx) genesis.Feetokens = k.GetFeeTokens(ctx) - genesis.TxFeesTracker = &txFeesTracker return genesis } diff --git a/x/txfees/keeper/genesis_test.go b/x/txfees/keeper/genesis_test.go index 3cc4049c2b5..186c2a0840e 100644 --- a/x/txfees/keeper/genesis_test.go +++ b/x/txfees/keeper/genesis_test.go @@ -18,11 +18,6 @@ var ( PoolID: 2, }, } - - testTxFeesTracker = types.TxFeesTracker{ - TxFees: sdk.Coins{sdk.NewCoin("uosmo", sdk.NewInt(1000))}, - HeightAccountingStartsFrom: 100, - } ) func (s *KeeperTestSuite) TestInitGenesis() { @@ -31,9 +26,8 @@ func (s *KeeperTestSuite) TestInitGenesis() { s.PrepareBalancerPoolWithCoins(sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(1000000000000000000)), sdk.NewCoin("wbtc", sdk.NewInt(1000000000000000000)))...) s.App.TxFeesKeeper.InitGenesis(s.Ctx, types.GenesisState{ - Basedenom: testBaseDenom, - Feetokens: testFeeTokens, - TxFeesTracker: &testTxFeesTracker, + Basedenom: testBaseDenom, + Feetokens: testFeeTokens, }) actualBaseDenom, err := s.App.TxFeesKeeper.GetBaseDenom(s.Ctx) @@ -41,8 +35,6 @@ func (s *KeeperTestSuite) TestInitGenesis() { s.Require().Equal(testBaseDenom, actualBaseDenom) s.Require().Equal(testFeeTokens, s.App.TxFeesKeeper.GetFeeTokens(s.Ctx)) - s.Require().Equal(testTxFeesTracker.TxFees, s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx)) - s.Require().Equal(testTxFeesTracker.HeightAccountingStartsFrom, s.App.TxFeesKeeper.GetTxFeesTrackerStartHeight(s.Ctx)) } func (s *KeeperTestSuite) TestExportGenesis() { @@ -51,14 +43,11 @@ func (s *KeeperTestSuite) TestExportGenesis() { s.PrepareBalancerPoolWithCoins(sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(1000000000000000000)), sdk.NewCoin("wbtc", sdk.NewInt(1000000000000000000)))...) s.App.TxFeesKeeper.InitGenesis(s.Ctx, types.GenesisState{ - Basedenom: testBaseDenom, - Feetokens: testFeeTokens, - TxFeesTracker: &testTxFeesTracker, + Basedenom: testBaseDenom, + Feetokens: testFeeTokens, }) genesis := s.App.TxFeesKeeper.ExportGenesis(s.Ctx) s.Require().Equal(testBaseDenom, genesis.Basedenom) s.Require().Equal(testFeeTokens, genesis.Feetokens) - s.Require().Equal(testTxFeesTracker.TxFees, genesis.TxFeesTracker.TxFees) - s.Require().Equal(testTxFeesTracker.HeightAccountingStartsFrom, genesis.TxFeesTracker.HeightAccountingStartsFrom) } diff --git a/x/txfees/keeper/hooks_test.go b/x/txfees/keeper/hooks_test.go index df628e45618..018cd0bf0ad 100644 --- a/x/txfees/keeper/hooks_test.go +++ b/x/txfees/keeper/hooks_test.go @@ -407,9 +407,6 @@ func (s *KeeperTestSuite) TestAfterEpochEnd() { preFundCollectorCoins := prepareCoinsForSwapToDenomTest(denomToSwapTo) s.FundModuleAcc(collectorName, preFundCollectorCoins) - currentTxFeesTrackerValue := s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx) - s.App.TxFeesKeeper.SetTxFeesTrackerValue(s.Ctx, currentTxFeesTrackerValue.Add(preFundCollectorCoins...)) - // Prepare pools. s.preparePoolsForSwappingToDenom(otherPreSwapDenom, preSwapDenom, denomToSwapTo) diff --git a/x/txfees/keeper/protorev.go b/x/txfees/keeper/protorev.go deleted file mode 100644 index 00b48289360..00000000000 --- a/x/txfees/keeper/protorev.go +++ /dev/null @@ -1,63 +0,0 @@ -package keeper - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - - gogotypes "github.com/cosmos/gogoproto/types" - - "github.com/osmosis-labs/osmosis/osmoutils" - poolmanagertypes "github.com/osmosis-labs/osmosis/v21/x/poolmanager/types" - "github.com/osmosis-labs/osmosis/v21/x/txfees/types" -) - -// IncreaseTxFeesTracker gets the current value of the txfees tracker, adds the given amount to it, and sets the new value. -func (k Keeper) IncreaseTxFeesTracker(ctx sdk.Context, txFees sdk.Coin) { - currentTxFees := k.GetTxFeesTrackerValue(ctx) - if !txFees.IsZero() { - newnewTxFeesCoins := currentTxFees.Add(txFees) - newTxFees := poolmanagertypes.TrackedVolume{ - Amount: newnewTxFeesCoins, - } - osmoutils.MustSet(ctx.KVStore(k.storeKey), types.KeyTxFeeProtorevTracker, &newTxFees) - } -} - -func (k Keeper) SetTxFeesTrackerValue(ctx sdk.Context, txFees sdk.Coins) { - newtxFees := poolmanagertypes.TrackedVolume{ - Amount: txFees, - } - osmoutils.MustSet(ctx.KVStore(k.storeKey), types.KeyTxFeeProtorevTracker, &newtxFees) -} - -func (k Keeper) GetTxFeesTrackerValue(ctx sdk.Context) (currentTxFees sdk.Coins) { - var txFees poolmanagertypes.TrackedVolume - txFeesFound, err := osmoutils.Get(ctx.KVStore(k.storeKey), types.KeyTxFeeProtorevTracker, &txFees) - if err != nil { - // We can only encounter an error if a database or serialization errors occurs, so we panic here. - // Normally this would be handled by `osmoutils.MustGet`, but since we want to specifically use `osmoutils.Get`, - // we also have to manually panic here. - panic(err) - } - - // If no volume was found, we treat the existing volume as 0. - // While we can technically require volume to exist, we would need to store empty coins in state for each pool (past and present), - // which is a high storage cost to pay for a weak guardrail. - currentTxFees = sdk.NewCoins() - if txFeesFound { - currentTxFees = txFees.Amount - } - - return currentTxFees -} - -// GetTxFeesTrackerStartHeight gets the height from which we started accounting for txfees. -func (k Keeper) GetTxFeesTrackerStartHeight(ctx sdk.Context) int64 { - startHeight := gogotypes.Int64Value{} - osmoutils.MustGet(ctx.KVStore(k.storeKey), types.KeyTxFeeProtorevTrackerStartHeight, &startHeight) - return startHeight.Value -} - -// SetTxFeesTrackerStartHeight sets the height from which we started accounting for txfees. -func (k Keeper) SetTxFeesTrackerStartHeight(ctx sdk.Context, startHeight int64) { - osmoutils.MustSet(ctx.KVStore(k.storeKey), types.KeyTxFeeProtorevTrackerStartHeight, &gogotypes.Int64Value{Value: startHeight}) -} diff --git a/x/txfees/keeper/protorev_test.go b/x/txfees/keeper/protorev_test.go deleted file mode 100644 index 39474bff71a..00000000000 --- a/x/txfees/keeper/protorev_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package keeper_test - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func (s *KeeperTestSuite) TestGetSetTxFeesTrackerValue() { - tests := map[string]struct { - firstTxFeesValue sdk.Coins - secondTxFeesValue sdk.Coins - }{ - "happy path: replace single coin with increased single coin": { - firstTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100))), - secondTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(200))), - }, - "replace single coin with decreased single coin": { - firstTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100))), - secondTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(50))), - }, - "replace single coin with different denom": { - firstTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100))), - secondTxFeesValue: sdk.NewCoins(sdk.NewCoin("usdc", sdk.NewInt(100))), - }, - "replace single coin with multiple coins": { - firstTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100))), - secondTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100)), sdk.NewCoin("usdc", sdk.NewInt(200))), - }, - "replace multiple coins with single coin": { - firstTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100)), sdk.NewCoin("usdc", sdk.NewInt(200))), - secondTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(200))), - }, - } - - for name, tc := range tests { - s.Run(name, func() { - s.SetupTest(false) - - s.Require().Empty(s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx)) - - s.App.TxFeesKeeper.SetTxFeesTrackerValue(s.Ctx, tc.firstTxFeesValue) - - actualFirstTxFeesValue := s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx) - - s.Require().Equal(tc.firstTxFeesValue, actualFirstTxFeesValue) - - s.App.TxFeesKeeper.SetTxFeesTrackerValue(s.Ctx, tc.secondTxFeesValue) - - actualSecondTxFeesValue := s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx) - - s.Require().Equal(tc.secondTxFeesValue, actualSecondTxFeesValue) - }) - } -} - -func (s *KeeperTestSuite) TestGetSetTxFeesTrackerStartHeight() { - tests := map[string]struct { - firstTxFeesTrackerStartHeight int64 - secondTxFeesTrackerStartHeight int64 - }{ - "replace tracker height with a higher height": { - firstTxFeesTrackerStartHeight: 100, - secondTxFeesTrackerStartHeight: 5000, - }, - "replace tracker height with a lower height": { - firstTxFeesTrackerStartHeight: 100, - secondTxFeesTrackerStartHeight: 50, - }, - "replace tracker height back to zero": { - firstTxFeesTrackerStartHeight: 100, - secondTxFeesTrackerStartHeight: 0, - }, - } - - for name, tc := range tests { - s.Run(name, func() { - s.SetupTest(false) - - s.Require().Empty(s.App.TxFeesKeeper.GetTxFeesTrackerStartHeight(s.Ctx)) - - s.App.TxFeesKeeper.SetTxFeesTrackerStartHeight(s.Ctx, tc.firstTxFeesTrackerStartHeight) - actualFirstTxFeesTrackerStartHeight := s.App.TxFeesKeeper.GetTxFeesTrackerStartHeight(s.Ctx) - s.Require().Equal(tc.firstTxFeesTrackerStartHeight, actualFirstTxFeesTrackerStartHeight) - - s.App.TxFeesKeeper.SetTxFeesTrackerStartHeight(s.Ctx, tc.secondTxFeesTrackerStartHeight) - actualSecondTxFeesTrackerStartHeight := s.App.TxFeesKeeper.GetTxFeesTrackerStartHeight(s.Ctx) - s.Require().Equal(tc.secondTxFeesTrackerStartHeight, actualSecondTxFeesTrackerStartHeight) - }) - } -} - -func (s *KeeperTestSuite) TestIncreaseTxFeesTracker() { - tests := map[string]struct { - initialTxFeesValue sdk.Coins - increaseTxFeesValueBy sdk.Coin - }{ - "happy path: increase single denom tracker": { - initialTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100))), - increaseTxFeesValueBy: sdk.NewCoin("eth", sdk.NewInt(50)), - }, - "increase multi denom tracker": { - initialTxFeesValue: sdk.NewCoins(sdk.NewCoin("eth", sdk.NewInt(100)), sdk.NewCoin("usdc", sdk.NewInt(200))), - increaseTxFeesValueBy: sdk.NewCoin("eth", sdk.NewInt(50)), - }, - } - - for name, tc := range tests { - s.Run(name, func() { - s.SetupTest(false) - - s.Require().Empty(s.App.TxFeesKeeper.GetTxFeesTrackerStartHeight(s.Ctx)) - - s.App.TxFeesKeeper.SetTxFeesTrackerValue(s.Ctx, tc.initialTxFeesValue) - actualInitialTxFeesValue := s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx) - s.Require().Equal(tc.initialTxFeesValue, actualInitialTxFeesValue) - - s.App.TxFeesKeeper.IncreaseTxFeesTracker(s.Ctx, tc.increaseTxFeesValueBy) - txFeesValueAfterIncrease := s.App.TxFeesKeeper.GetTxFeesTrackerValue(s.Ctx) - s.Require().Equal(tc.initialTxFeesValue.Add(sdk.NewCoins(tc.increaseTxFeesValueBy)...), txFeesValueAfterIncrease) - }) - } -} diff --git a/x/txfees/types/expected_keepers.go b/x/txfees/types/expected_keepers.go index 819ab0ee8c0..9e1634ec94c 100644 --- a/x/txfees/types/expected_keepers.go +++ b/x/txfees/types/expected_keepers.go @@ -71,7 +71,6 @@ type TxFeesKeeper interface { ConvertToBaseToken(ctx sdk.Context, inputFee sdk.Coin) (sdk.Coin, error) GetBaseDenom(ctx sdk.Context) (denom string, err error) GetFeeToken(ctx sdk.Context, denom string) (FeeToken, error) - IncreaseTxFeesTracker(ctx sdk.Context, txFees sdk.Coin) } type ProtorevKeeper interface { diff --git a/x/txfees/types/genesis.go b/x/txfees/types/genesis.go index e39fa74ac73..8f874dddbae 100644 --- a/x/txfees/types/genesis.go +++ b/x/txfees/types/genesis.go @@ -7,10 +7,6 @@ func DefaultGenesis() *GenesisState { return &GenesisState{ Basedenom: sdk.DefaultBondDenom, Feetokens: []FeeToken{}, - TxFeesTracker: &TxFeesTracker{ - TxFees: sdk.NewCoins(), - HeightAccountingStartsFrom: 0, - }, } } diff --git a/x/txfees/types/genesis.pb.go b/x/txfees/types/genesis.pb.go index a276878c4c2..8019bae6bc9 100644 --- a/x/txfees/types/genesis.pb.go +++ b/x/txfees/types/genesis.pb.go @@ -5,8 +5,7 @@ package types import ( fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -29,8 +28,6 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { Basedenom string `protobuf:"bytes,1,opt,name=basedenom,proto3" json:"basedenom,omitempty"` Feetokens []FeeToken `protobuf:"bytes,2,rep,name=feetokens,proto3" json:"feetokens"` - // KVStore state - TxFeesTracker *TxFeesTracker `protobuf:"bytes,3,opt,name=txFeesTracker,proto3" json:"txFeesTracker,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -80,68 +77,8 @@ func (m *GenesisState) GetFeetokens() []FeeToken { return nil } -func (m *GenesisState) GetTxFeesTracker() *TxFeesTracker { - if m != nil { - return m.TxFeesTracker - } - return nil -} - -type TxFeesTracker struct { - TxFees github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tx_fees,json=txFees,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tx_fees"` - HeightAccountingStartsFrom int64 `protobuf:"varint,2,opt,name=height_accounting_starts_from,json=heightAccountingStartsFrom,proto3" json:"height_accounting_starts_from,omitempty" yaml:"height_accounting_starts_from"` -} - -func (m *TxFeesTracker) Reset() { *m = TxFeesTracker{} } -func (m *TxFeesTracker) String() string { return proto.CompactTextString(m) } -func (*TxFeesTracker) ProtoMessage() {} -func (*TxFeesTracker) Descriptor() ([]byte, []int) { - return fileDescriptor_4423c18e3d020b37, []int{1} -} -func (m *TxFeesTracker) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TxFeesTracker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TxFeesTracker.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 *TxFeesTracker) XXX_Merge(src proto.Message) { - xxx_messageInfo_TxFeesTracker.Merge(m, src) -} -func (m *TxFeesTracker) XXX_Size() int { - return m.Size() -} -func (m *TxFeesTracker) XXX_DiscardUnknown() { - xxx_messageInfo_TxFeesTracker.DiscardUnknown(m) -} - -var xxx_messageInfo_TxFeesTracker proto.InternalMessageInfo - -func (m *TxFeesTracker) GetTxFees() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.TxFees - } - return nil -} - -func (m *TxFeesTracker) GetHeightAccountingStartsFrom() int64 { - if m != nil { - return m.HeightAccountingStartsFrom - } - return 0 -} - func init() { proto.RegisterType((*GenesisState)(nil), "osmosis.txfees.v1beta1.GenesisState") - proto.RegisterType((*TxFeesTracker)(nil), "osmosis.txfees.v1beta1.TxFeesTracker") } func init() { @@ -149,33 +86,24 @@ func init() { } var fileDescriptor_4423c18e3d020b37 = []byte{ - // 404 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcd, 0xae, 0xd2, 0x40, - 0x14, 0xc7, 0x3b, 0x17, 0x73, 0x0d, 0x73, 0xbd, 0x9b, 0xc6, 0x98, 0x4a, 0xb4, 0x34, 0x0d, 0x24, - 0xdd, 0x30, 0x23, 0x75, 0xe7, 0xce, 0x6a, 0x70, 0xa1, 0xab, 0xc2, 0xca, 0x4d, 0x33, 0x2d, 0x87, - 0xd2, 0x94, 0x76, 0x48, 0x67, 0x20, 0xe5, 0x2d, 0x7c, 0x0e, 0x5f, 0xc2, 0x2d, 0x4b, 0x96, 0xae, - 0xd0, 0x94, 0x37, 0xf0, 0x09, 0x4c, 0x3f, 0xf8, 0x4a, 0xc4, 0x55, 0x3f, 0xfe, 0xbf, 0xf3, 0x3f, - 0xff, 0x73, 0x66, 0x70, 0x8f, 0x8b, 0x84, 0x8b, 0x48, 0x50, 0x99, 0xcf, 0x00, 0x04, 0x5d, 0x0f, - 0x7d, 0x90, 0x6c, 0x48, 0x43, 0x48, 0x41, 0x44, 0x82, 0x2c, 0x33, 0x2e, 0xb9, 0xfa, 0xa2, 0xa1, - 0x48, 0x4d, 0x91, 0x86, 0xea, 0x3c, 0x0f, 0x79, 0xc8, 0x2b, 0x84, 0x96, 0x6f, 0x35, 0xdd, 0xe9, - 0xdf, 0xf0, 0x9c, 0x01, 0x48, 0x1e, 0x43, 0xda,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xeb, - 0xcf, 0xbe, 0xdb, 0xdb, 0xb0, 0x64, 0xf1, 0xce, 0xfc, 0x2f, 0x6e, 0xba, 0x9d, 0x5a, 0x7f, 0x7f, - 0x92, 0xc7, 0x95, 0x3a, 0xca, 0x78, 0xe2, 0x7c, 0xd9, 0x16, 0x3a, 0xda, 0x15, 0x3a, 0xfa, 0x5d, - 0xe8, 0xe8, 0xdb, 0x41, 0x57, 0x76, 0x07, 0x5d, 0xf9, 0x79, 0xd0, 0x95, 0xaf, 0xf6, 0x45, 0xf0, - 0x66, 0x7d, 0x83, 0x05, 0xf3, 0xc5, 0xf1, 0x83, 0xae, 0xed, 0x21, 0xcd, 0x8f, 0xb7, 0xa4, 0x1a, - 0xc4, 0xbf, 0xaf, 0xce, 0xfe, 0xed, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x46, 0x2a, 0xc3, - 0x98, 0x02, 0x00, 0x00, + // 272 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xc9, 0x2f, 0xce, 0xcd, + 0x2f, 0xce, 0x2c, 0xd6, 0x2f, 0xa9, 0x48, 0x4b, 0x4d, 0x2d, 0xd6, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, + 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, + 0x17, 0x12, 0x83, 0xaa, 0xd2, 0x83, 0xa8, 0xd2, 0x83, 0xaa, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, + 0x07, 0x2b, 0xd1, 0x07, 0xb1, 0x20, 0xaa, 0xa5, 0x54, 0x71, 0x98, 0x99, 0x96, 0x9a, 0x5a, 0x92, + 0x9f, 0x9d, 0x9a, 0x07, 0x55, 0x26, 0x97, 0x0c, 0x56, 0xa7, 0x9f, 0x94, 0x58, 0x9c, 0x0a, 0x57, + 0x93, 0x9c, 0x9f, 0x09, 0x95, 0x57, 0x6a, 0x67, 0xe4, 0xe2, 0x71, 0x87, 0x38, 0x23, 0xb8, 0x24, + 0xb1, 0x24, 0x55, 0x48, 0x86, 0x8b, 0x13, 0xa4, 0x36, 0x25, 0x35, 0x2f, 0x3f, 0x57, 0x82, 0x51, + 0x81, 0x51, 0x83, 0x33, 0x08, 0x21, 0x20, 0xe4, 0xc2, 0xc5, 0x09, 0xb3, 0xa0, 0x58, 0x82, 0x49, + 0x81, 0x59, 0x83, 0xdb, 0x48, 0x41, 0x0f, 0xbb, 0xbb, 0xf5, 0xdc, 0x52, 0x53, 0x43, 0x40, 0x0a, + 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x42, 0x68, 0xf4, 0x62, 0xe1, 0x60, 0x16, 0x60, 0x09, + 0xe2, 0x2d, 0xa9, 0x70, 0x4b, 0x4d, 0x2d, 0x0e, 0x29, 0x4a, 0x4c, 0xce, 0x4e, 0x2d, 0x72, 0xf2, + 0x39, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, + 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa3, 0xf4, 0xcc, 0x92, 0x8c, + 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, 0xa8, 0x5d, 0xba, 0x39, 0x89, 0x49, 0xc5, 0x30, 0x8e, + 0x7e, 0x99, 0x91, 0xa1, 0x7e, 0x05, 0x2c, 0x20, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, + 0xde, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x34, 0x50, 0xd1, 0x14, 0x7b, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -198,18 +126,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TxFeesTracker != nil { - { - size, err := m.TxFeesTracker.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } if len(m.Feetokens) > 0 { for iNdEx := len(m.Feetokens) - 1; iNdEx >= 0; iNdEx-- { { @@ -234,48 +150,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TxFeesTracker) 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 *TxFeesTracker) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TxFeesTracker) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HeightAccountingStartsFrom != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.HeightAccountingStartsFrom)) - i-- - dAtA[i] = 0x10 - } - if len(m.TxFees) > 0 { - for iNdEx := len(m.TxFees) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxFees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -303,28 +177,6 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if m.TxFeesTracker != nil { - l = m.TxFeesTracker.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func (m *TxFeesTracker) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TxFees) > 0 { - for _, e := range m.TxFees { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.HeightAccountingStartsFrom != 0 { - n += 1 + sovGenesis(uint64(m.HeightAccountingStartsFrom)) - } return n } @@ -429,145 +281,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxFeesTracker", 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.TxFeesTracker == nil { - m.TxFeesTracker = &TxFeesTracker{} - } - if err := m.TxFeesTracker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxFeesTracker) 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 ErrIntOverflowGenesis - } - 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: TxFeesTracker: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxFeesTracker: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxFees", 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.TxFees = append(m.TxFees, types.Coin{}) - if err := m.TxFees[len(m.TxFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HeightAccountingStartsFrom", wireType) - } - m.HeightAccountingStartsFrom = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HeightAccountingStartsFrom |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) From 378502287be6ee2a10e4f9d7ca34b14a91381fd7 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Wed, 3 Jan 2024 13:10:42 -0700 Subject: [PATCH 2/2] add change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 105f7ec6889..5bc2e3d89ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#6991](https://github.com/osmosis-labs/osmosis/pull/6991) Fix: total liquidity poolmanager grpc gateway query * [#7149](https://github.com/osmosis-labs/osmosis/pull/7149) Fix double emitting CacheCtx events (e.g. Epoch, Superfluid, CL) +* [#7237](https://github.com/osmosis-labs/osmosis/pull/7237) Removes tx_fee_tracker from the proto rev tracker, no longer tracks in state. ### Features