From 0b723b460a8444dbbec2a8cab852379ed3749b66 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Fri, 16 Feb 2024 15:16:40 -0700 Subject: [PATCH] remove BaseDenom from genState --- proto/osmosis/protorev/v1beta1/genesis.proto | 19 +-- x/protorev/keeper/genesis.go | 9 -- x/protorev/keeper/genesis_test.go | 6 - x/protorev/keeper/msg_server.go | 3 - x/protorev/keeper/protorev.go | 7 +- x/protorev/keeper/protorev_test.go | 11 +- x/protorev/types/genesis.go | 6 - x/protorev/types/genesis.pb.go | 119 ++++++++++--------- x/protorev/types/params.go | 12 ++ 9 files changed, 92 insertions(+), 100 deletions(-) diff --git a/proto/osmosis/protorev/v1beta1/genesis.proto b/proto/osmosis/protorev/v1beta1/genesis.proto index 1df1f0d5a3c..cc2a9160cb1 100644 --- a/proto/osmosis/protorev/v1beta1/genesis.proto +++ b/proto/osmosis/protorev/v1beta1/genesis.proto @@ -19,20 +19,21 @@ message GenesisState { (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"token_pair_arb_routes\"" ]; - // The base denominations being used to create cyclic arbitrage routes via the - // highest liquidity method. + // DEPRECATED: The base denominations being used to create cyclic arbitrage + // routes via the highest liquidity method. This field is deprecated and will + // be removed in a future version. repeated BaseDenom base_denoms = 3 [ (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"base_denoms\"" + (gogoproto.moretags) = "yaml:\"base_denoms\"", + deprecated = true ]; - // The pool weights that are being used to calculate the weight (compute cost) - // of each route. - // - // DEPRECATED: This field is deprecated and will be removed in the next - // release. It is replaced by the `info_by_pool_type` field. + // DEPRECATED: The pool weights that are being used to calculate the weight + // (compute cost) of each route. This field is deprecated and will be removed + // in the next release. It is replaced by the `info_by_pool_type` field. PoolWeights pool_weights = 4 [ (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"pool_weights\"" + (gogoproto.moretags) = "yaml:\"pool_weights\"", + deprecated = true ]; // The number of days since module genesis. uint64 days_since_module_genesis = 5 diff --git a/x/protorev/keeper/genesis.go b/x/protorev/keeper/genesis.go index 0a1dbb53233..9f5f0bea25e 100644 --- a/x/protorev/keeper/genesis.go +++ b/x/protorev/keeper/genesis.go @@ -25,11 +25,6 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { } } - // Configure the initial base denoms used for cyclic route building. The order of the list of base - // denoms is the order in which routes will be prioritized i.e. routes will be built and simulated in a - // first come first serve basis that is based on the order of the base denoms. - k.SetBaseDenoms(ctx, genState.BaseDenoms) - // Update the pools on genesis. if err := k.UpdatePools(ctx); err != nil { panic(err) @@ -119,10 +114,6 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { } genesis.TokenPairArbRoutes = routes - // Export the base denoms used for cyclic route building. - baseDenoms := k.GetAllBaseDenoms(ctx) - genesis.BaseDenoms = baseDenoms - // Export the developer fees that have been collected. fees, err := k.GetAllDeveloperFees(ctx) if err != nil { diff --git a/x/protorev/keeper/genesis_test.go b/x/protorev/keeper/genesis_test.go index 86eb5698f81..6470382d3ba 100644 --- a/x/protorev/keeper/genesis_test.go +++ b/x/protorev/keeper/genesis_test.go @@ -15,12 +15,6 @@ func (s *KeeperTestSuite) TestInitGenesis() { s.Require().Contains(tokenPairArbRoutes, route) } - baseDenoms := s.App.ProtoRevKeeper.GetAllBaseDenoms(s.Ctx) - s.Require().Equal(len(baseDenoms), len(exportedGenesis.BaseDenoms)) - for _, baseDenom := range exportedGenesis.BaseDenoms { - s.Require().Contains(baseDenoms, baseDenom) - } - params := s.App.ProtoRevKeeper.GetParams(s.Ctx) s.Require().Equal(params, exportedGenesis.Params) diff --git a/x/protorev/keeper/msg_server.go b/x/protorev/keeper/msg_server.go index 8cbf3660bfd..642ed1b5e68 100644 --- a/x/protorev/keeper/msg_server.go +++ b/x/protorev/keeper/msg_server.go @@ -146,9 +146,6 @@ func (m MsgServer) SetBaseDenoms(c context.Context, msg *types.MsgSetBaseDenoms) m.k.DeleteAllPoolsForBaseDenom(ctx, baseDenom.Denom) } - // // Delete the old base denoms - // m.k.DeleteBaseDenoms(ctx) - m.k.SetBaseDenoms(ctx, msg.BaseDenoms) // Update all of the pools diff --git a/x/protorev/keeper/protorev.go b/x/protorev/keeper/protorev.go index d1a8fd13209..b91d39f3897 100644 --- a/x/protorev/keeper/protorev.go +++ b/x/protorev/keeper/protorev.go @@ -117,14 +117,15 @@ func (k Keeper) DeprecatedSetBaseDenoms(ctx sdk.Context, baseDenoms []types.Base return nil } +// GetAllBaseDenoms returns all of the base denoms (sorted by priority in descending order) used to build cyclic arbitrage routes func (k Keeper) GetAllBaseDenoms(ctx sdk.Context) []types.BaseDenom { return k.GetParams(ctx).BaseDenoms } +// SetBaseDenoms sets all of the base denoms used to build cyclic arbitrage routes. The base denoms priority +// order is going to match the order of the base denoms in the slice. func (k Keeper) SetBaseDenoms(ctx sdk.Context, newBaseDenoms []types.BaseDenom) { - params := k.GetParams(ctx) - params.BaseDenoms = newBaseDenoms - k.SetParams(ctx, params) + k.SetParam(ctx, types.ParamStoreKeyBaseDenoms, newBaseDenoms) } // DeprecatedDeleteBaseDenoms deletes all of the base denoms. diff --git a/x/protorev/keeper/protorev_test.go b/x/protorev/keeper/protorev_test.go index e056bb1b5a2..a8f76f5c691 100644 --- a/x/protorev/keeper/protorev_test.go +++ b/x/protorev/keeper/protorev_test.go @@ -67,12 +67,13 @@ func (s *KeeperTestSuite) TestGetAllBaseDenoms() { s.Require().Equal(baseDenoms[2].Denom, "ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7") // Should be able to set the base denoms - s.App.ProtoRevKeeper.SetBaseDenoms(s.Ctx, []types.BaseDenom{{Denom: types.OsmosisDenomination}, {Denom: "atom"}, {Denom: "weth"}}) + newBaseDenoms := []types.BaseDenom{ + {Denom: types.OsmosisDenomination, StepSize: osmomath.NewInt(1_000_000)}, + {Denom: "atom", StepSize: osmomath.NewInt(1_000_000)}, + {Denom: "weth", StepSize: osmomath.NewInt(1_000_000)}} + s.App.ProtoRevKeeper.SetBaseDenoms(s.Ctx, newBaseDenoms) baseDenoms = s.App.ProtoRevKeeper.GetAllBaseDenoms(s.Ctx) - s.Require().Equal(3, len(baseDenoms)) - s.Require().Equal(baseDenoms[0].Denom, types.OsmosisDenomination) - s.Require().Equal(baseDenoms[1].Denom, "atom") - s.Require().Equal(baseDenoms[2].Denom, "weth") + s.Require().Equal(newBaseDenoms, baseDenoms) } // TestGetPoolForDenomPair tests the GetPoolForDenomPair, SetPoolForDenomPair, and DeleteAllPoolsForBaseDenom functions. diff --git a/x/protorev/types/genesis.go b/x/protorev/types/genesis.go index 9655408d492..4a5da9632a5 100644 --- a/x/protorev/types/genesis.go +++ b/x/protorev/types/genesis.go @@ -50,7 +50,6 @@ func DefaultGenesis() *GenesisState { return &GenesisState{ Params: DefaultParams(), TokenPairArbRoutes: DefaultTokenPairArbRoutes, - BaseDenoms: DefaultBaseDenoms, InfoByPoolType: DefaultPoolTypeInfo, DaysSinceModuleGenesis: DefaultDaysSinceModuleGenesis, DeveloperFees: DefaultDeveloperFees, @@ -71,11 +70,6 @@ func (gs GenesisState) Validate() error { return err } - // Validate the base denoms - if err := ValidateBaseDenoms(gs.BaseDenoms); err != nil { - return err - } - // Validate the pool type information if err := gs.InfoByPoolType.Validate(); err != nil { return err diff --git a/x/protorev/types/genesis.pb.go b/x/protorev/types/genesis.pb.go index 49bf3913ad7..6657b760fc0 100644 --- a/x/protorev/types/genesis.pb.go +++ b/x/protorev/types/genesis.pb.go @@ -31,15 +31,14 @@ type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // Token pair arb routes for the protorev module (hot routes). TokenPairArbRoutes []TokenPairArbRoutes `protobuf:"bytes,2,rep,name=token_pair_arb_routes,json=tokenPairArbRoutes,proto3" json:"token_pair_arb_routes" yaml:"token_pair_arb_routes"` - // The base denominations being used to create cyclic arbitrage routes via the - // highest liquidity method. - BaseDenoms []BaseDenom `protobuf:"bytes,3,rep,name=base_denoms,json=baseDenoms,proto3" json:"base_denoms" yaml:"base_denoms"` - // The pool weights that are being used to calculate the weight (compute cost) - // of each route. - // - // DEPRECATED: This field is deprecated and will be removed in the next - // release. It is replaced by the `info_by_pool_type` field. - PoolWeights PoolWeights `protobuf:"bytes,4,opt,name=pool_weights,json=poolWeights,proto3" json:"pool_weights" yaml:"pool_weights"` + // DEPRECATED: The base denominations being used to create cyclic arbitrage + // routes via the highest liquidity method. This field is deprecated and will + // be removed in a future version. + BaseDenoms []BaseDenom `protobuf:"bytes,3,rep,name=base_denoms,json=baseDenoms,proto3" json:"base_denoms" yaml:"base_denoms"` // Deprecated: Do not use. + // DEPRECATED: The pool weights that are being used to calculate the weight + // (compute cost) of each route. This field is deprecated and will be removed + // in the next release. It is replaced by the `info_by_pool_type` field. + PoolWeights PoolWeights `protobuf:"bytes,4,opt,name=pool_weights,json=poolWeights,proto3" json:"pool_weights" yaml:"pool_weights"` // Deprecated: Do not use. // The number of days since module genesis. DaysSinceModuleGenesis uint64 `protobuf:"varint,5,opt,name=days_since_module_genesis,json=daysSinceModuleGenesis,proto3" json:"days_since_module_genesis,omitempty" yaml:"days_since_module_genesis"` // The fees the developer account has accumulated over time. @@ -111,6 +110,7 @@ func (m *GenesisState) GetTokenPairArbRoutes() []TokenPairArbRoutes { return nil } +// Deprecated: Do not use. func (m *GenesisState) GetBaseDenoms() []BaseDenom { if m != nil { return m.BaseDenoms @@ -118,6 +118,7 @@ func (m *GenesisState) GetBaseDenoms() []BaseDenom { return nil } +// Deprecated: Do not use. func (m *GenesisState) GetPoolWeights() PoolWeights { if m != nil { return m.PoolWeights @@ -204,56 +205,56 @@ func init() { } var fileDescriptor_3c77fc2da5752af2 = []byte{ - // 771 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xcf, 0x4e, 0xe3, 0x46, - 0x18, 0x8f, 0x0b, 0x85, 0x32, 0x81, 0x08, 0x86, 0x06, 0x39, 0x69, 0x71, 0x5c, 0x17, 0xda, 0xa8, - 0x2a, 0xb6, 0x80, 0x9e, 0x7a, 0xa8, 0x84, 0xa9, 0x68, 0xab, 0xaa, 0x28, 0x32, 0xa9, 0x2a, 0xb5, - 0x52, 0xa7, 0x63, 0x67, 0x12, 0x2c, 0x6c, 0x8f, 0xe5, 0x99, 0x84, 0xe4, 0x01, 0x7a, 0xef, 0xc3, - 0xf4, 0x21, 0x38, 0xa2, 0xbd, 0xec, 0x9e, 0xa2, 0x15, 0xbc, 0x41, 0x9e, 0x60, 0xe5, 0x99, 0x49, - 0x02, 0x21, 0xde, 0xbd, 0x79, 0xbe, 0xef, 0xf7, 0xe7, 0xfb, 0xcd, 0x1f, 0x83, 0xaf, 0x28, 0x8b, - 0x29, 0x0b, 0x99, 0x93, 0x66, 0x94, 0xd3, 0x8c, 0x0c, 0x9c, 0xc1, 0xb1, 0x4f, 0x38, 0x3e, 0x76, - 0x7a, 0x24, 0x21, 0x2c, 0x64, 0xb6, 0x68, 0x40, 0x5d, 0xe1, 0xec, 0x29, 0xce, 0x56, 0xb8, 0xfa, - 0xa7, 0x3d, 0xda, 0xa3, 0xa2, 0xea, 0xe4, 0x5f, 0x12, 0x50, 0xff, 0xba, 0x50, 0x77, 0x26, 0x20, - 0x81, 0x87, 0xc5, 0x40, 0x9c, 0xe1, 0x58, 0x19, 0xd6, 0x6b, 0x81, 0xc0, 0x21, 0x69, 0x24, 0x17, - 0xaa, 0x65, 0xc8, 0x95, 0xe3, 0x63, 0x46, 0x66, 0xe4, 0x80, 0x86, 0x89, 0xec, 0x5b, 0xaf, 0x01, - 0xd8, 0xfc, 0x49, 0x86, 0xb9, 0xe2, 0x98, 0x13, 0xf8, 0x03, 0x58, 0x93, 0xda, 0xba, 0x66, 0x6a, - 0xcd, 0xf2, 0x89, 0x69, 0x17, 0x85, 0xb3, 0x5b, 0x02, 0xe7, 0xae, 0xde, 0x8d, 0x1b, 0x25, 0x4f, - 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4d, 0x49, 0x86, 0xba, 0x84, 0x30, 0x7d, 0x4d, 0x6c, 0x56, - 0xcd, 0x56, 0x37, 0x29, 0xcf, 0x3c, 0x0b, 0x71, 0x4e, 0xc3, 0xc4, 0xdd, 0x57, 0xd3, 0x57, 0x95, - 0xe9, 0x33, 0xba, 0xe5, 0x6d, 0xcd, 0x0a, 0x17, 0x84, 0x30, 0x78, 0x09, 0x76, 0x23, 0xcc, 0x09, - 0xe3, 0xc8, 0x8f, 0x68, 0x70, 0x83, 0xae, 0x45, 0x32, 0x7d, 0x5d, 0xcc, 0x6e, 0x4c, 0xc6, 0x8d, - 0xba, 0x94, 0x59, 0x02, 0xb2, 0xbc, 0x1d, 0x59, 0x75, 0xf3, 0xe2, 0xcf, 0xa2, 0x06, 0xff, 0x02, - 0x3b, 0x73, 0x47, 0xdc, 0xe9, 0x64, 0x84, 0x31, 0xfd, 0x13, 0x53, 0x6b, 0x6e, 0xb8, 0xf6, 0x64, - 0xdc, 0xd0, 0x17, 0x87, 0x52, 0x10, 0xeb, 0xd5, 0xff, 0x47, 0x15, 0x15, 0xe9, 0x4c, 0x96, 0xbc, - 0xed, 0x19, 0x4a, 0x55, 0xe0, 0xdf, 0xa0, 0x16, 0xe3, 0x21, 0x12, 0x07, 0x92, 0xd2, 0x30, 0xe1, - 0x0c, 0xe5, 0x1a, 0x62, 0x28, 0x7d, 0x63, 0x71, 0xbb, 0x0b, 0xa1, 0x96, 0x57, 0x8d, 0xf1, 0x30, - 0x3f, 0xf1, 0x96, 0xe8, 0xb4, 0x48, 0x26, 0x22, 0xc0, 0xdf, 0xc1, 0xde, 0x32, 0x12, 0x1f, 0xea, - 0x40, 0x88, 0x7f, 0x31, 0x19, 0x37, 0xf6, 0x8b, 0xc5, 0xf9, 0xd0, 0xf2, 0xe0, 0xa2, 0x72, 0x7b, - 0x08, 0xaf, 0x40, 0x55, 0xa0, 0x50, 0x40, 0xfb, 0x09, 0x47, 0x5d, 0x3a, 0x1d, 0xb9, 0x2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, 0xf4, 0x5d, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0xaa, 0x99, 0x66, 0x95, - 0x06, 0x00, 0x00, + // 770 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0xdf, 0x6e, 0xeb, 0x34, + 0x18, 0x6f, 0x38, 0x63, 0x87, 0xe3, 0xee, 0x54, 0x67, 0x1e, 0x9d, 0xdc, 0x6a, 0x4b, 0x43, 0xd8, + 0xa0, 0x42, 0x2c, 0xd1, 0x36, 0xae, 0xb8, 0x40, 0x5a, 0x86, 0x06, 0x08, 0x31, 0x55, 0x59, 0x11, + 0x12, 0x48, 0x58, 0x4e, 0xea, 0x76, 0xd1, 0x92, 0x38, 0x8a, 0xdd, 0xae, 0x7d, 0x00, 0xee, 0x79, + 0x18, 0x1e, 0x62, 0x97, 0x13, 0x57, 0x48, 0x48, 0x15, 0xda, 0xde, 0xa0, 0x4f, 0x80, 0x62, 0xbb, + 0xed, 0xd6, 0x35, 0x70, 0x17, 0x7f, 0xdf, 0xef, 0xcf, 0xf7, 0xf3, 0x9f, 0x80, 0x4f, 0x18, 0x4f, + 0x18, 0x8f, 0xb8, 0x9b, 0xe5, 0x4c, 0xb0, 0x9c, 0x8e, 0xdc, 0xd1, 0x71, 0x40, 0x05, 0x39, 0x76, + 0x07, 0x34, 0xa5, 0x3c, 0xe2, 0x8e, 0x6c, 0x40, 0xa4, 0x71, 0xce, 0x1c, 0xe7, 0x68, 0x5c, 0xf3, + 0xc3, 0x01, 0x1b, 0x30, 0x59, 0x75, 0x8b, 0x2f, 0x05, 0x68, 0x7e, 0x5a, 0xaa, 0xbb, 0x10, 0x50, + 0xc0, 0xc3, 0x72, 0x20, 0xc9, 0x49, 0xa2, 0x0d, 0x9b, 0x8d, 0x50, 0xe2, 0xb0, 0x32, 0x52, 0x0b, + 0xdd, 0x32, 0xd5, 0xca, 0x0d, 0x08, 0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ef, 0x8f, 0x66, 0xe5, 0xfe, 0xd1, 0xac, 0xfc, + 0xf5, 0x68, 0x56, 0x7e, 0xfe, 0x62, 0x10, 0x89, 0xeb, 0x61, 0xe0, 0x84, 0x2c, 0x71, 0xf5, 0x00, + 0x47, 0x31, 0x09, 0xf8, 0x7c, 0xe1, 0x8e, 0x4e, 0x4e, 0xdd, 0xf1, 0xf2, 0xbf, 0x5f, 0x04, 0xe3, + 0xc1, 0xa6, 0x5c, 0x9f, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x95, 0xd3, 0x55, 0x14, 0x99, 0x06, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/protorev/types/params.go b/x/protorev/types/params.go index c99ea656841..aacf127cd8d 100644 --- a/x/protorev/types/params.go +++ b/x/protorev/types/params.go @@ -54,6 +54,18 @@ func (p Params) Validate() error { return fmt.Errorf("invalid admin account address: %s", p.Admin) } + if err := ValidateBoolean(p.Enabled); err != nil { + return err + } + + if err := ValidateAccount(p.Admin); err != nil { + return err + } + + if err := ValidateBaseDenoms(p.BaseDenoms); err != nil { + return err + } + return nil }