From 30665d3f94c8e7ef76b2cd2dd6ad9208f72362d1 Mon Sep 17 00:00:00 2001 From: David Terpay Date: Thu, 27 Jul 2023 18:16:11 -0400 Subject: [PATCH 1/9] init --- proto/osmosis/protorev/v1beta1/protorev.proto | 2 + x/protorev/keeper/atom | 0 x/protorev/keeper/keeper_test.go | 6 + x/protorev/keeper/posthandler_test.go | 2 +- x/protorev/keeper/routes.go | 2 + x/protorev/keeper/routes_test.go | 19 ++- x/protorev/types/genesis.go | 1 + x/protorev/types/protorev.pb.go | 123 ++++++++++++------ x/protorev/types/validate.go | 2 +- 9 files changed, 111 insertions(+), 46 deletions(-) delete mode 100644 x/protorev/keeper/atom diff --git a/proto/osmosis/protorev/v1beta1/protorev.proto b/proto/osmosis/protorev/v1beta1/protorev.proto index 9969e03b71f..4b2d2a4b55e 100644 --- a/proto/osmosis/protorev/v1beta1/protorev.proto +++ b/proto/osmosis/protorev/v1beta1/protorev.proto @@ -87,6 +87,8 @@ message PoolWeights { // The weight of a concentrated pool uint64 concentrated_weight = 3 [ (gogoproto.moretags) = "yaml:\"concentrated_weight\"" ]; + // The weight of a cosmwasm pool + uint64 cosmwasm_weight = 4 [ (gogoproto.moretags) = "yaml:\"cw_weight\"" ]; } // BaseDenom represents a single base denom that the module uses for its diff --git a/x/protorev/keeper/atom b/x/protorev/keeper/atom deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/x/protorev/keeper/keeper_test.go b/x/protorev/keeper/keeper_test.go index a19a0ac8fc5..f1874bd20b9 100644 --- a/x/protorev/keeper/keeper_test.go +++ b/x/protorev/keeper/keeper_test.go @@ -140,6 +140,8 @@ func (s *KeeperTestSuite) SetupTest() { sdk.NewCoin("hook", sdk.NewInt(9000000000000000000)), sdk.NewCoin("eth", sdk.NewInt(9000000000000000000)), sdk.NewCoin("gamm/pool/1", sdk.NewInt(9000000000000000000)), + sdk.NewCoin(apptesting.DefaultTransmuterDenomA, sdk.NewInt(9000000000000000000)), + sdk.NewCoin(apptesting.DefaultTransmuterDenomB, sdk.NewInt(9000000000000000000)), ) s.fundAllAccountsWith() s.Commit() @@ -896,6 +898,10 @@ func (s *KeeperTestSuite) setUpPools() { // Pool 49 s.PrepareConcentratedPoolWithCoinsAndFullRangePosition("epochTwo", "uosmo") + // Create a cosmwasm pool for testing + // Pool 50 + s.PrepareCosmWasmPool() + // Set all of the pool info into the stores err := s.App.ProtoRevKeeper.UpdatePools(s.Ctx) s.Require().NoError(err) diff --git a/x/protorev/keeper/posthandler_test.go b/x/protorev/keeper/posthandler_test.go index dc9571ce080..a81f9aff5c1 100644 --- a/x/protorev/keeper/posthandler_test.go +++ b/x/protorev/keeper/posthandler_test.go @@ -340,7 +340,7 @@ func (s *KeeperTestSuite) TestAnteHandle() { params: param{ trades: []types.Trade{ { - Pool: 50, + Pool: 51, TokenOut: "ibc/0CD3A0285E1341859B5E86B6AB7682F023D03E97607CCC1DC95706411D866DF7", TokenIn: "uosmo", }, diff --git a/x/protorev/keeper/routes.go b/x/protorev/keeper/routes.go index 0966e0c5f56..6cbb1b50385 100644 --- a/x/protorev/keeper/routes.go +++ b/x/protorev/keeper/routes.go @@ -174,6 +174,8 @@ func (k Keeper) CalculateRoutePoolPoints(ctx sdk.Context, route poolmanagertypes totalWeight += poolWeights.StableWeight case poolmanagertypes.Concentrated: totalWeight += poolWeights.ConcentratedWeight + case poolmanagertypes.CosmWasm: + totalWeight += poolWeights.CosmwasmWeight default: return 0, fmt.Errorf("invalid pool type") } diff --git a/x/protorev/keeper/routes_test.go b/x/protorev/keeper/routes_test.go index 7b4b4b3a7ea..cd05062e192 100644 --- a/x/protorev/keeper/routes_test.go +++ b/x/protorev/keeper/routes_test.go @@ -347,12 +347,29 @@ func (s *KeeperTestSuite) TestCalculateRoutePoolPoints() { expectedRoutePoolPoints: 11, expectedPass: false, }, + { + description: "Valid route with a cosmwasm pool", + route: []poolmanagertypes.SwapAmountInRoute{{PoolId: 1, TokenOutDenom: ""}, {PoolId: 50, TokenOutDenom: ""}, {PoolId: 2, TokenOutDenom: ""}}, + expectedRoutePoolPoints: 8, + expectedPass: true, + }, + { + description: "Valid route with cw pool, balancer, stable swap and cl pool", + route: []poolmanagertypes.SwapAmountInRoute{{PoolId: 1, TokenOutDenom: ""}, {PoolId: 50, TokenOutDenom: ""}, {PoolId: 40, TokenOutDenom: ""}, {PoolId: 49, TokenOutDenom: ""}}, + expectedRoutePoolPoints: 10, + expectedPass: true, + }, } for _, tc := range cases { s.Run(tc.description, func() { s.SetupTest() - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, types.PoolWeights{StableWeight: 3, BalancerWeight: 2, ConcentratedWeight: 1}) + s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, types.PoolWeights{ + StableWeight: 3, + BalancerWeight: 2, + ConcentratedWeight: 1, + CosmwasmWeight: 4, + }) routePoolPoints, err := s.App.ProtoRevKeeper.CalculateRoutePoolPoints(s.Ctx, tc.route) if tc.expectedPass { diff --git a/x/protorev/types/genesis.go b/x/protorev/types/genesis.go index dd302e10205..9e3c4d7417e 100644 --- a/x/protorev/types/genesis.go +++ b/x/protorev/types/genesis.go @@ -20,6 +20,7 @@ var ( StableWeight: 5, // it takes around 5 ms to simulate and execute a stable swap BalancerWeight: 2, // it takes around 2 ms to simulate and execute a balancer swap ConcentratedWeight: 2, // it takes around 2 ms to simulate and execute a concentrated swap + CosmwasmWeight: 5, // it takes around 5 ms to simulate and execute a cosmwasm swap } DefaultDaysSinceModuleGenesis = uint64(0) DefaultDeveloperFees = []sdk.Coin{} diff --git a/x/protorev/types/protorev.pb.go b/x/protorev/types/protorev.pb.go index 2a8c49d2035..7fd626da3e8 100644 --- a/x/protorev/types/protorev.pb.go +++ b/x/protorev/types/protorev.pb.go @@ -275,6 +275,8 @@ type PoolWeights struct { BalancerWeight uint64 `protobuf:"varint,2,opt,name=balancer_weight,json=balancerWeight,proto3" json:"balancer_weight,omitempty" yaml:"balancer_weight"` // The weight of a concentrated pool ConcentratedWeight uint64 `protobuf:"varint,3,opt,name=concentrated_weight,json=concentratedWeight,proto3" json:"concentrated_weight,omitempty" yaml:"concentrated_weight"` + // The weight of a CosmWasm pool + CosmwasmWeight uint64 `protobuf:"varint,4,opt,name=cosmwasm_weight,json=cosmwasmWeight,proto3" json:"cosmwasm_weight,omitempty" yaml:"cw_weight"` } func (m *PoolWeights) Reset() { *m = PoolWeights{} } @@ -331,6 +333,13 @@ func (m *PoolWeights) GetConcentratedWeight() uint64 { return 0 } +func (m *PoolWeights) GetCosmwasmWeight() uint64 { + if m != nil { + return m.CosmwasmWeight + } + return 0 +} + // BaseDenom represents a single base denom that the module uses for its // arbitrage trades. It contains the denom name alongside the step size of the // binary search that is used to find the optimal swap amount @@ -396,49 +405,50 @@ func init() { } var fileDescriptor_1e9f2391fd9fec01 = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xce, 0x35, 0xe9, 0x8f, 0x5c, 0x7f, 0xa4, 0xb8, 0xa5, 0xb8, 0x19, 0xec, 0xe8, 0x90, 0x4a, - 0x96, 0xda, 0x0a, 0x20, 0x86, 0x4a, 0x0c, 0xb8, 0x2c, 0x15, 0x52, 0x5b, 0x5d, 0x2b, 0x21, 0x58, - 0xac, 0xb3, 0x73, 0x4d, 0xad, 0x26, 0xbe, 0xc8, 0x77, 0x29, 0xb4, 0x7f, 0x05, 0x03, 0xec, 0xfc, - 0x25, 0xcc, 0x1d, 0x3b, 0x56, 0x0c, 0x16, 0x4a, 0x17, 0x66, 0xaf, 0x2c, 0xc8, 0x77, 0x67, 0x27, - 0xaa, 0x40, 0x82, 0x01, 0x26, 0xbf, 0xf7, 0xbd, 0xf7, 0x7d, 0xef, 0xde, 0x7b, 0x77, 0x86, 0x8f, - 0x18, 0x1f, 0x30, 0x1e, 0x71, 0x77, 0x98, 0x30, 0xc1, 0x12, 0x7a, 0xee, 0x9e, 0x77, 0x02, 0x2a, - 0x48, 0xa7, 0x04, 0x1c, 0x69, 0x18, 0xa6, 0x4e, 0x74, 0x4a, 0x5c, 0x27, 0x36, 0x37, 0x43, 0x19, - 0xf2, 0x65, 0xc0, 0x55, 0x8e, 0xca, 0x6a, 0xae, 0xf7, 0x58, 0x8f, 0x29, 0x3c, 0xb7, 0x34, 0x6a, - 0xa9, 0x1c, 0x37, 0x20, 0x9c, 0x96, 0xe5, 0x42, 0x16, 0xc5, 0x2a, 0x8e, 0x6e, 0x00, 0x34, 0x8e, - 0xd9, 0x19, 0x8d, 0x0f, 0x49, 0x94, 0xbc, 0x48, 0x02, 0xcc, 0x46, 0x82, 0x72, 0xe3, 0x0d, 0x84, - 0x24, 0x09, 0xfc, 0x44, 0x7a, 0x26, 0x68, 0x55, 0xdb, 0x8b, 0x8f, 0x6d, 0xe7, 0x77, 0xc7, 0x72, - 0x24, 0xcb, 0xdb, 0xbc, 0x4a, 0xed, 0x4a, 0x96, 0xda, 0xf7, 0x2e, 0xc8, 0xa0, 0xbf, 0x83, 0x26, - 0x02, 0x08, 0xd7, 0x49, 0x29, 0xed, 0xc0, 0x05, 0x91, 0x17, 0xf4, 0xa3, 0xd8, 0x9c, 0x69, 0x81, - 0x76, 0xdd, 0x5b, 0xcb, 0x52, 0xbb, 0xa1, 0x38, 0x45, 0x04, 0xe1, 0x79, 0x69, 0xee, 0xc5, 0x46, - 0x07, 0xd6, 0x15, 0xca, 0x46, 0xc2, 0xac, 0x4a, 0xc2, 0x7a, 0x96, 0xda, 0xab, 0xd3, 0x04, 0x36, - 0x12, 0x08, 0x2b, 0xd9, 0x83, 0x91, 0xd8, 0xa9, 0x7d, 0xff, 0x6c, 0x03, 0xf4, 0x05, 0xc0, 0x59, - 0x59, 0xd3, 0xd8, 0x87, 0x73, 0x22, 0x21, 0xdd, 0x3f, 0xe9, 0xe4, 0x38, 0xcf, 0xf3, 0xee, 0xeb, - 0x4e, 0x96, 0x75, 0x11, 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 0xfc, - 0x0d, 0x9a, 0x05, 0x00, 0x00, + // 686 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x4f, 0xdb, 0x4e, + 0x14, 0xcf, 0x91, 0xf0, 0x23, 0xc7, 0x8f, 0xf0, 0x35, 0x7c, 0xa9, 0xc9, 0x60, 0x47, 0x57, 0x89, + 0x66, 0xc1, 0x56, 0xda, 0xaa, 0x03, 0x12, 0x43, 0x4d, 0x17, 0x54, 0x09, 0xd0, 0x81, 0x54, 0xb5, + 0x8b, 0x75, 0x76, 0x8e, 0x60, 0x91, 0xf8, 0x22, 0xdf, 0x05, 0x0a, 0x7f, 0x45, 0x87, 0x76, 0x6f, + 0xff, 0x91, 0xce, 0x8c, 0x8c, 0xa8, 0x83, 0x55, 0xc1, 0xd2, 0xd9, 0x6b, 0x97, 0xca, 0x77, 0xe7, + 0xc4, 0x42, 0xad, 0xd4, 0x0e, 0xed, 0x94, 0x7b, 0x9f, 0xf7, 0x3e, 0x9f, 0x77, 0xef, 0xf3, 0x2e, + 0x86, 0x8f, 0x18, 0x1f, 0x30, 0x1e, 0x71, 0x77, 0x98, 0x30, 0xc1, 0x12, 0x7a, 0xe6, 0x9e, 0x75, + 0x02, 0x2a, 0x48, 0x67, 0x0c, 0x38, 0xf2, 0x60, 0x98, 0xba, 0xd0, 0x19, 0xe3, 0xba, 0xb0, 0xb9, + 0x1e, 0xca, 0x94, 0x2f, 0x13, 0xae, 0x0a, 0x54, 0x55, 0x73, 0xb5, 0xc7, 0x7a, 0x4c, 0xe1, 0xf9, + 0x49, 0xa3, 0x96, 0xaa, 0x71, 0x03, 0xc2, 0xe9, 0xb8, 0x5d, 0xc8, 0xa2, 0x58, 0xe5, 0xd1, 0x0d, + 0x80, 0xc6, 0x11, 0x3b, 0xa5, 0xf1, 0x01, 0x89, 0x92, 0xe7, 0x49, 0x80, 0xd9, 0x48, 0x50, 0x6e, + 0xbc, 0x86, 0x90, 0x24, 0x81, 0x9f, 0xc8, 0xc8, 0x04, 0xad, 0x6a, 0x7b, 0xfe, 0xb1, 0xed, 0xfc, + 0xea, 0x5a, 0x8e, 0x64, 0x79, 0xeb, 0x57, 0xa9, 0x5d, 0xc9, 0x52, 0xfb, 0xbf, 0x0b, 0x32, 0xe8, + 0x6f, 0xa1, 0x89, 0x00, 0xc2, 0x75, 0x32, 0x96, 0x76, 0xe0, 0x9c, 0xc8, 0x1b, 0xfa, 0x51, 0x6c, + 0x4e, 0xb5, 0x40, 0xbb, 0xee, 0xad, 0x64, 0xa9, 0xdd, 0x50, 0x9c, 0x22, 0x83, 0xf0, 0xac, 0x3c, + 0xee, 0xc6, 0x46, 0x07, 0xd6, 0x15, 0xca, 0x46, 0xc2, 0xac, 0x4a, 0xc2, 0x6a, 0x96, 0xda, 0xcb, + 0x65, 0x02, 0x1b, 0x09, 0x84, 0x95, 0xec, 0xfe, 0x48, 0x6c, 0xd5, 0xbe, 0x7d, 0xb4, 0x01, 0xfa, + 0x0c, 0xe0, 0xb4, 0xec, 0x69, 0xec, 0xc1, 0x19, 0x91, 0x90, 0xee, 0xef, 0x4c, 0x72, 0x94, 0xd7, + 0x79, 0xff, 0xeb, 0x49, 0x16, 0x75, 0x13, 0x49, 0x46, 0x58, 0xab, 0x18, 0x3e, 0xac, 0x73, 0x41, + 0x87, 0x3e, 0x8f, 0x2e, 0xa9, 0x9e, 0xc1, 0xcb, 0x19, 0x5f, 0x52, 0x7b, 0xa3, 0x17, 0x89, 0x93, + 0x51, 0xe0, 0x84, 0x6c, 0xa0, 0xd7, 0xa3, 0x7f, 0x36, 0x79, 0xf7, 0xd4, 0x15, 0x17, 0x43, 0xca, + 0x9d, 0xdd, 0x58, 0x4c, 0x06, 0x18, 0x0b, 0x21, 0x3c, 0x97, 0x9f, 0x0f, 0xa3, 0x4b, 0xaa, 0x07, + 0xf8, 0x00, 0xe0, 0xb4, 0xbc, 0x8f,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0x4b, 0x05, 0xa2, + 0x45, 0xf6, 0xe1, 0x4a, 0xc8, 0xe2, 0x90, 0xc6, 0x22, 0x21, 0x82, 0x76, 0x0b, 0xa1, 0xaa, 0x14, + 0xb2, 0xb2, 0xd4, 0x6e, 0x2a, 0xa1, 0x9f, 0x14, 0x21, 0x6c, 0x94, 0x51, 0x2d, 0xb8, 0x0d, 0x1b, + 0xb9, 0x9f, 0xe7, 0x84, 0x0f, 0x0a, 0xb1, 0x9a, 0x14, 0x2b, 0xbd, 0x90, 0xf0, 0x7c, 0x72, 0x9f, + 0xa2, 0x58, 0xd1, 0xd1, 0x7b, 0x00, 0xeb, 0x1e, 0xe1, 0xf4, 0x05, 0x8d, 0xd9, 0x20, 0x77, 0xb6, + 0x9b, 0x1f, 0xa4, 0x33, 0xf5, 0xb2, 0xb3, 0x12, 0x46, 0x58, 0xa5, 0xff, 0xfa, 0xdf, 0xca, 0xdb, + 0xbb, 0xba, 0xb5, 0xc0, 0xf5, 0xad, 0x05, 0xbe, 0xde, 0x5a, 0xe0, 0xdd, 0x9d, 0x55, 0xb9, 0xbe, + 0xb3, 0x2a, 0x37, 0x77, 0x56, 0xe5, 0xcd, 0xd3, 0x92, 0xbe, 0xfe, 0x36, 0x6c, 0xf6, 0x49, 0xc0, + 0x8b, 0xc0, 0x3d, 0xeb, 0x3c, 0x73, 0xdf, 0x4e, 0x3e, 0xdc, 0xb2, 0x63, 0x30, 0x23, 0xe3, 0x27, + 0x3f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x37, 0x1c, 0xa8, 0xd9, 0x05, 0x00, 0x00, } func (this *TokenPairArbRoutes) Equal(that interface{}) bool { @@ -763,6 +773,11 @@ func (m *PoolWeights) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.CosmwasmWeight != 0 { + i = encodeVarintProtorev(dAtA, i, uint64(m.CosmwasmWeight)) + i-- + dAtA[i] = 0x20 + } if m.ConcentratedWeight != 0 { i = encodeVarintProtorev(dAtA, i, uint64(m.ConcentratedWeight)) i-- @@ -931,6 +946,9 @@ func (m *PoolWeights) Size() (n int) { if m.ConcentratedWeight != 0 { n += 1 + sovProtorev(uint64(m.ConcentratedWeight)) } + if m.CosmwasmWeight != 0 { + n += 1 + sovProtorev(uint64(m.CosmwasmWeight)) + } return n } @@ -1634,6 +1652,25 @@ func (m *PoolWeights) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CosmwasmWeight", wireType) + } + m.CosmwasmWeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CosmwasmWeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipProtorev(dAtA[iNdEx:]) diff --git a/x/protorev/types/validate.go b/x/protorev/types/validate.go index 65f75253999..ce8df75707b 100644 --- a/x/protorev/types/validate.go +++ b/x/protorev/types/validate.go @@ -49,7 +49,7 @@ func (pw *PoolWeights) Validate() error { return fmt.Errorf("pool weights cannot be nil") } - if pw.BalancerWeight == 0 || pw.StableWeight == 0 || pw.ConcentratedWeight == 0 { + if pw.BalancerWeight == 0 || pw.StableWeight == 0 || pw.ConcentratedWeight == 0 || pw.CosmwasmWeight == 0 { return fmt.Errorf("pool weights cannot be 0") } From c060d1f1f9193d142068a1d6baade6237ab18dad Mon Sep 17 00:00:00 2001 From: David Terpay Date: Thu, 27 Jul 2023 18:21:54 -0400 Subject: [PATCH 2/9] add new pool weights to upgrade handler --- app/upgrades/v17/upgrades.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/upgrades/v17/upgrades.go b/app/upgrades/v17/upgrades.go index bc618884564..2072a743236 100644 --- a/app/upgrades/v17/upgrades.go +++ b/app/upgrades/v17/upgrades.go @@ -7,6 +7,7 @@ import ( "github.com/osmosis-labs/osmosis/v16/app/keepers" "github.com/osmosis-labs/osmosis/v16/app/upgrades" + "github.com/osmosis-labs/osmosis/v16/x/protorev/types" ) func CreateUpgradeHandler( @@ -23,6 +24,9 @@ func CreateUpgradeHandler( return nil, err } + // Reset the pool weights upon upgrade. This will add support for CW pools on ProtoRev. + keepers.ProtoRevKeeper.SetPoolWeights(ctx, types.DefaultPoolWeights) + return migrations, nil } } From d03d3dda16d7a3156f0bd7411afc484549e3098d Mon Sep 17 00:00:00 2001 From: David Terpay Date: Thu, 27 Jul 2023 18:32:08 -0400 Subject: [PATCH 3/9] change log --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8daf6f260b5..9016e905dae 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 * [#5532](https://github.com/osmosis-labs/osmosis/pull/5532) fix: Fix x/tokenfactory genesis import denoms reset x/bank existing denom metadata * [#5874](https://github.com/osmosis-labs/osmosis/pull/5874) Remove Partial Migration from superfluid migration to CL +* [#5901](https://github.com/osmosis-labs/osmosis/pull/5901) Adding support for CW pools in ProtoRev ### BugFix From c0163ea914a14ae7ac07846c1ff34dfb92ed0f3f Mon Sep 17 00:00:00 2001 From: David Terpay Date: Thu, 27 Jul 2023 18:43:59 -0400 Subject: [PATCH 4/9] add todo for genesis testing --- x/protorev/types/genesis.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x/protorev/types/genesis.go b/x/protorev/types/genesis.go index 9e3c4d7417e..cb7466f5ce0 100644 --- a/x/protorev/types/genesis.go +++ b/x/protorev/types/genesis.go @@ -20,7 +20,10 @@ var ( StableWeight: 5, // it takes around 5 ms to simulate and execute a stable swap BalancerWeight: 2, // it takes around 2 ms to simulate and execute a balancer swap ConcentratedWeight: 2, // it takes around 2 ms to simulate and execute a concentrated swap - CosmwasmWeight: 5, // it takes around 5 ms to simulate and execute a cosmwasm swap + + // TODO: This is a temporary weight until we can get a more accurate weight for cosmwasm swaps + // ref: https://github.com/osmosis-labs/osmosis/issues/5858 + CosmwasmWeight: 5, // it takes around 5 ms to simulate and execute a cosmwasm swap } DefaultDaysSinceModuleGenesis = uint64(0) DefaultDeveloperFees = []sdk.Coin{} From 772dbd6304dba2de58886193e28372c84a16e1aa Mon Sep 17 00:00:00 2001 From: David Terpay Date: Thu, 27 Jul 2023 18:51:14 -0400 Subject: [PATCH 5/9] proto ci --- x/protorev/types/protorev.pb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/protorev/types/protorev.pb.go b/x/protorev/types/protorev.pb.go index 7fd626da3e8..1da7ef4829a 100644 --- a/x/protorev/types/protorev.pb.go +++ b/x/protorev/types/protorev.pb.go @@ -275,7 +275,7 @@ type PoolWeights struct { BalancerWeight uint64 `protobuf:"varint,2,opt,name=balancer_weight,json=balancerWeight,proto3" json:"balancer_weight,omitempty" yaml:"balancer_weight"` // The weight of a concentrated pool ConcentratedWeight uint64 `protobuf:"varint,3,opt,name=concentrated_weight,json=concentratedWeight,proto3" json:"concentrated_weight,omitempty" yaml:"concentrated_weight"` - // The weight of a CosmWasm pool + // The weight of a cosmwasm pool CosmwasmWeight uint64 `protobuf:"varint,4,opt,name=cosmwasm_weight,json=cosmwasmWeight,proto3" json:"cosmwasm_weight,omitempty" yaml:"cw_weight"` } From ed42ce405cfe84a7a1d0684748a6357ed7f6b56f Mon Sep 17 00:00:00 2001 From: David Terpay Date: Thu, 27 Jul 2023 19:03:01 -0400 Subject: [PATCH 6/9] val basic testing --- x/protorev/types/msg_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x/protorev/types/msg_test.go b/x/protorev/types/msg_test.go index c8c006e0b52..18000f5e7dd 100644 --- a/x/protorev/types/msg_test.go +++ b/x/protorev/types/msg_test.go @@ -520,6 +520,7 @@ func TestMsgSetPoolWeights(t *testing.T) { BalancerWeight: 1, StableWeight: 1, ConcentratedWeight: 1, + CosmwasmWeight: 1, }, false, }, @@ -530,6 +531,7 @@ func TestMsgSetPoolWeights(t *testing.T) { BalancerWeight: 0, StableWeight: 1, ConcentratedWeight: 1, + CosmwasmWeight: 1, }, false, }, @@ -540,6 +542,7 @@ func TestMsgSetPoolWeights(t *testing.T) { BalancerWeight: 1, StableWeight: 1, ConcentratedWeight: 1, + CosmwasmWeight: 1, }, true, }, From 2b89b060ab54a7dfc5c39dba35dae3d41806f0eb Mon Sep 17 00:00:00 2001 From: David Terpay Date: Thu, 27 Jul 2023 20:30:42 -0400 Subject: [PATCH 7/9] e2e test --- x/protorev/keeper/msg_server_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/x/protorev/keeper/msg_server_test.go b/x/protorev/keeper/msg_server_test.go index 95aaaeff55e..921e9dc0e87 100644 --- a/x/protorev/keeper/msg_server_test.go +++ b/x/protorev/keeper/msg_server_test.go @@ -481,6 +481,7 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { StableWeight: 1, BalancerWeight: 2, ConcentratedWeight: 3, + CosmwasmWeight: 4, }, false, false, @@ -492,6 +493,7 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { StableWeight: 0, BalancerWeight: 2, ConcentratedWeight: 1, + CosmwasmWeight: 4, }, false, false, @@ -500,7 +502,8 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { "Invalid message (unset pool weight)", s.adminAccount.String(), types.PoolWeights{ - StableWeight: 1, + StableWeight: 1, + CosmwasmWeight: 4, }, false, false, @@ -512,6 +515,7 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { StableWeight: 1, BalancerWeight: 2, ConcentratedWeight: 3, + CosmwasmWeight: 4, }, true, false, @@ -523,6 +527,7 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { StableWeight: 1, BalancerWeight: 2, ConcentratedWeight: 3, + CosmwasmWeight: 4, }, true, true, From a5e731edb6eeca61927db501b6cccbaa44f44dc2 Mon Sep 17 00:00:00 2001 From: David Terpay Date: Fri, 28 Jul 2023 10:02:43 -0400 Subject: [PATCH 8/9] main update --- x/protorev/types/protorev.pb.go | 87 +++++++++++++++++---------------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/x/protorev/types/protorev.pb.go b/x/protorev/types/protorev.pb.go index 7d3a235e338..c385ccf23ff 100644 --- a/x/protorev/types/protorev.pb.go +++ b/x/protorev/types/protorev.pb.go @@ -405,49 +405,50 @@ func init() { } var fileDescriptor_1e9f2391fd9fec01 = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xce, 0x35, 0xe9, 0x8f, 0x5c, 0x7f, 0xa4, 0xb8, 0xa5, 0xb8, 0x19, 0xec, 0xe8, 0x90, 0x4a, - 0x96, 0xda, 0x0a, 0x20, 0x21, 0x55, 0x62, 0xc0, 0x65, 0xa9, 0x90, 0xda, 0xea, 0x5a, 0x09, 0xc1, - 0x62, 0x9d, 0x9d, 0x6b, 0x6a, 0x35, 0xf1, 0x45, 0xbe, 0x4b, 0xa1, 0xfd, 0x2b, 0x18, 0x60, 0xe7, - 0x2f, 0x61, 0xee, 0xd8, 0xb1, 0x62, 0xb0, 0x50, 0xba, 0x30, 0x7b, 0x65, 0x41, 0xbe, 0x3b, 0x3b, - 0x51, 0x05, 0x12, 0x0c, 0x30, 0xf9, 0xbd, 0xef, 0xbd, 0xef, 0x7b, 0xf7, 0xde, 0xbb, 0x33, 0x7c, - 0xc4, 0xf8, 0x80, 0xf1, 0x88, 0xbb, 0xc3, 0x84, 0x09, 0x96, 0xd0, 0x73, 0xf7, 0xbc, 0x13, 0x50, - 0x41, 0x3a, 0x25, 0xe0, 0x48, 0xc3, 0x30, 0x75, 0xa2, 0x53, 0xe2, 0x3a, 0xb1, 0xb9, 0x19, 0xca, - 0x90, 0x2f, 0x03,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xea, 0xbf, 0x93, 0x88, 0x5e, 0x92, 0x99, 0xa5, 0xf6, 0x7a, 0xb1, 0xe2, 0xa9, 0x30, 0xc2, - 0x4b, 0xca, 0x57, 0x7c, 0x63, 0x17, 0x36, 0x02, 0xd2, 0x27, 0x71, 0x48, 0x93, 0x42, 0x60, 0x46, - 0x0a, 0x34, 0xb3, 0xd4, 0xde, 0x50, 0x02, 0x77, 0x12, 0x10, 0x5e, 0x29, 0x10, 0x2d, 0x72, 0x00, - 0xd7, 0x42, 0x16, 0x87, 0x34, 0x16, 0x09, 0x11, 0xb4, 0x5b, 0x08, 0x55, 0xa5, 0x90, 0x95, 0xa5, - 0x76, 0x53, 0x09, 0xfd, 0x22, 0x09, 0x61, 0x63, 0x1a, 0x55, 0x82, 0xe8, 0x23, 0x80, 0x75, 0x8f, - 0x70, 0xfa, 0x92, 0xc6, 0x6c, 0x90, 0x8f, 0xa6, 0x9b, 0x1b, 0xb2, 0xb5, 0xfa, 0xf4, 0x68, 0x24, - 0x8c, 0xb0, 0x0a, 0xff, 0xf3, 0x77, 0xe1, 0xed, 0x5f, 0x8d, 0x2d, 0x70, 0x3d, 0xb6, 0xc0, 0xb7, - 0xb1, 0x05, 0x3e, 0xdc, 0x5a, 0x95, 0xeb, 0x5b, 0xab, 0x72, 0x73, 0x6b, 0x55, 0xde, 0x3e, 0x9d, - 0xd2, 0xd7, 0x8f, 0x7b, 0xbb, 0x4f, 0x02, 0x5e, 0x38, 0xee, 0x79, 0xe7, 0x99, 0xfb, 0x7e, 0xf2, - 0xe7, 0x95, 0x15, 0x83, 0x39, 0xe9, 0x3f, 0xf9, 0x19, 0x00, 0x00, 0xff, 0xff, 0x83, 0x56, 0xe1, - 0xea, 0x9a, 0x05, 0x00, 0x00, + // 686 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x4f, 0xdb, 0x4e, + 0x14, 0xc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xed, 0x4a, 0x96, 0xda, 0xff, 0x5d, 0x90, 0x41, + 0x7f, 0x0b, 0x4d, 0x04, 0x10, 0xae, 0x93, 0xb1, 0xb4, 0x03, 0xe7, 0x44, 0xde, 0xd0, 0x8f, 0x62, + 0x73, 0xaa, 0x05, 0xda, 0x75, 0x6f, 0x25, 0x4b, 0xed, 0x86, 0xe2, 0x14, 0x19, 0x84, 0x67, 0xe5, + 0x71, 0x37, 0x36, 0x3a, 0xb0, 0xae, 0x50, 0x36, 0x12, 0x66, 0x55, 0x12, 0x56, 0xb3, 0xd4, 0x5e, + 0x2e, 0x13, 0xd8, 0x48, 0x20, 0xac, 0x64, 0xf7, 0x47, 0x62, 0xab, 0xf6, 0xed, 0xa3, 0x0d, 0xd0, + 0x67, 0x00, 0xa7, 0x65, 0x4f, 0x63, 0x0f, 0xce, 0x88, 0x84, 0x74, 0x7f, 0x67, 0x92, 0xa3, 0xbc, + 0xce, 0xfb, 0x5f, 0x4f, 0xb2, 0xa8, 0x9b, 0x48, 0x32, 0xc2, 0x5a, 0xc5, 0xf0, 0x61, 0x9d, 0x0b, + 0x3a, 0xf4, 0x79, 0x74, 0x49, 0xf5, 0x0c, 0x5e, 0xce, 0xf8, 0x92, 0xda, 0x1b, 0xbd, 0x48, 0x9c, + 0x8c, 0x02, 0x27, 0x64, 0x03, 0xbd, 0x1e, 0xfd, 0xb3, 0xc9, 0xbb, 0xa7, 0xae, 0xb8, 0x18, 0x52, + 0xee, 0xec, 0xc6, 0x62, 0x32, 0xc0, 0x58, 0x08, 0xe1, 0xb9, 0xfc, 0x7c, 0x18, 0x5d, 0x52, 0x3d, + 0xc0, 0x07, 0x00, 0xa7, 0xe5, 0x7d, 0x8c, 0x87, 0xb0, 0x36, 0x64, 0xac, 0x6f, 0x82, 0x16, 0x68, + 0xd7, 0xbc, 0x46, 0x96, 0xda, 0xf3, 0x8a, 0x9d, 0xa3, 0x08, 0xcb, 0xe4, 0xbf, 0x33, 0xf6, 0x3b, + 0x80, 0x0d, 0x69, 0xec, 0xa1, 0x20, 0x22, 0xe2, 0x22, 0x0a, 0xb9, 0xf1, 0x12, 0xce, 0x0e, 0x13, + 0x76, 0x1c, 0x89, 0xc2, 0xe3, 0x75, 0x47, 0xbf, 0xce, 0xfc, 0xe5, 0x8d, 0xed, 0xdd, 0x61, 0x51, + 0xec, 0xad, 0x69, 0x77, 0x97, 0xf4, 0x0c, 0x8a, 0x87, 0x70, 0xa1, 0x60, 0x70, 0xb8, 0x1c, 0x8f, + 0x06, 0x01, 0x4d, 0x7c, 0x76, 0xec, 0xeb, 0xcd, 0xa9, 0x89, 0x76, 0xff, 0xd8, 0xe6, 0x07, 0xaa, + 0xc9, 0x7d, 0x3d, 0x84, 0x97, 0x14, 0xb4, 0x7f, 0x7c, 0xa4, 0x96, 0xba, 0x01, 0xa7, 0xe5, 0x6b, + 0x35, 0xab, 0xad, 0x6a, 0xbb, 0xe6, 0x2d, 0x67, 0xa9, 0xbd, 0xa0, 0xb8, 0x12, 0x46, 0x58, 0xa5, + 0xd1, 0xa7, 0x29, 0x38, 0x7f, 0xc0, 0x58, 0xff, 0x15, 0x8d, 0x7a, 0x27, 0x82, 0x1b, 0xdb, 0x70, + 0x91, 0x0b, 0x12, 0xf4, 0xa9, 0x7f, 0x2e, 0x11, 0xbd, 0x24, 0x33, 0x4b, 0xed, 0xd5, 0x62, 0xc5, + 0xa5, 0x34, 0xc2, 0x0b, 0x2a, 0x56, 0x7c, 0x63, 0x07, 0x36, 0x02, 0xd2, 0x27, 0x71, 0x48, 0x93, + 0x42, 0x60, 0x4a, 0x0a, 0x34, 0xb3, 0xd4, 0x5e, 0x53, 0x02, 0xf7, 0x0a, 0x10, 0x5e, 0x2a, 0x10, + 0x2d, 0xb2, 0x0f, 0x57, 0x42, 0x16, 0x87, 0x34, 0x16, 0x09, 0x11, 0xb4, 0x5b, 0x08, 0x55, 0xa5, + 0x90, 0x95, 0xa5, 0x76, 0x53, 0x09, 0xfd, 0xa4, 0x08, 0x61, 0xa3, 0x8c, 0x6a, 0xc1, 0x6d, 0xd8, + 0xc8, 0xfd, 0x3c, 0x27, 0x7c, 0x50, 0x88, 0xd5, 0xa4, 0x58, 0xe9, 0x85, 0x84, 0xe7, 0x93, 0xfb, + 0x14, 0xc5, 0x8a, 0x8e, 0xde, 0x03, 0x58, 0xf7, 0x08, 0xa7, 0x2f, 0x68, 0xcc, 0x06, 0xb9, 0xb3, + 0xdd, 0xfc, 0x20, 0x9d, 0xa9, 0x97, 0x9d, 0x95, 0x30, 0xc2, 0x2a, 0xfd, 0xd7, 0xff, 0x56, 0xde, + 0xde, 0xd5, 0xad, 0x05, 0xae, 0x6f, 0x2d, 0xf0, 0xf5, 0xd6, 0x02, 0xef, 0xee, 0xac, 0xca, 0xf5, + 0x9d, 0x55, 0xb9, 0xb9, 0xb3, 0x2a, 0x6f, 0x9e, 0x96, 0xf4, 0xf5, 0xb7, 0x61, 0xb3, 0x4f, 0x02, + 0x5e, 0x04, 0xee, 0x59, 0xe7, 0x99, 0xfb, 0x76, 0xf2, 0xe1, 0x96, 0x1d, 0x83, 0x19, 0x19, 0x3f, + 0xf9, 0x11, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x91, 0x01, 0x4f, 0xd9, 0x05, 0x00, 0x00, } func (this *TokenPairArbRoutes) Equal(that interface{}) bool { From 2d809e3c1a1d4c45860db26500658bba58791580 Mon Sep 17 00:00:00 2001 From: David Terpay Date: Fri, 28 Jul 2023 12:51:03 -0400 Subject: [PATCH 9/9] nit --- app/upgrades/v17/upgrades.go | 7 +- proto/osmosis/protorev/v1beta1/protorev.proto | 3 +- x/protorev/types/protorev.pb.go | 90 +++++++++---------- 3 files changed, 53 insertions(+), 47 deletions(-) diff --git a/app/upgrades/v17/upgrades.go b/app/upgrades/v17/upgrades.go index 7dba613867c..f29292499ac 100644 --- a/app/upgrades/v17/upgrades.go +++ b/app/upgrades/v17/upgrades.go @@ -25,7 +25,12 @@ func CreateUpgradeHandler( } // Reset the pool weights upon upgrade. This will add support for CW pools on ProtoRev. - keepers.ProtoRevKeeper.SetPoolWeights(ctx, types.DefaultPoolWeights) + keepers.ProtoRevKeeper.SetPoolWeights(ctx, types.PoolWeights{ + BalancerWeight: 1, + StableWeight: 4, + ConcentratedWeight: 300, + CosmwasmWeight: 300, + }) return migrations, nil } diff --git a/proto/osmosis/protorev/v1beta1/protorev.proto b/proto/osmosis/protorev/v1beta1/protorev.proto index 127b0bccc78..c3dbda4db31 100644 --- a/proto/osmosis/protorev/v1beta1/protorev.proto +++ b/proto/osmosis/protorev/v1beta1/protorev.proto @@ -88,7 +88,8 @@ message PoolWeights { uint64 concentrated_weight = 3 [ (gogoproto.moretags) = "yaml:\"concentrated_weight\"" ]; // The weight of a cosmwasm pool - uint64 cosmwasm_weight = 4 [ (gogoproto.moretags) = "yaml:\"cw_weight\"" ]; + uint64 cosmwasm_weight = 4 + [ (gogoproto.moretags) = "yaml:\"cosmwasm_weight\"" ]; } // BaseDenom represents a single base denom that the module uses for its diff --git a/x/protorev/types/protorev.pb.go b/x/protorev/types/protorev.pb.go index c385ccf23ff..d6409e24beb 100644 --- a/x/protorev/types/protorev.pb.go +++ b/x/protorev/types/protorev.pb.go @@ -276,7 +276,7 @@ type PoolWeights struct { // The weight of a concentrated pool ConcentratedWeight uint64 `protobuf:"varint,3,opt,name=concentrated_weight,json=concentratedWeight,proto3" json:"concentrated_weight,omitempty" yaml:"concentrated_weight"` // The weight of a cosmwasm pool - CosmwasmWeight uint64 `protobuf:"varint,4,opt,name=cosmwasm_weight,json=cosmwasmWeight,proto3" json:"cosmwasm_weight,omitempty" yaml:"cw_weight"` + CosmwasmWeight uint64 `protobuf:"varint,4,opt,name=cosmwasm_weight,json=cosmwasmWeight,proto3" json:"cosmwasm_weight,omitempty" yaml:"cosmwasm_weight"` } func (m *PoolWeights) Reset() { *m = PoolWeights{} } @@ -405,50 +405,50 @@ func init() { } var fileDescriptor_1e9f2391fd9fec01 = []byte{ - // 686 bytes of a gzipped FileDescri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0x44, 0x46, 0x26, 0x68, 0x55, 0xdb, 0xf3, 0x8f, 0x6d, 0xe7, - 0x57, 0xd7, 0x72, 0x24, 0xcb, 0x5b, 0xbf, 0x4a, 0xed, 0x4a, 0x96, 0xda, 0xff, 0x5d, 0x90, 0x41, - 0x7f, 0x0b, 0x4d, 0x04, 0x10, 0xae, 0x93, 0xb1, 0xb4, 0x03, 0xe7, 0x44, 0xde, 0xd0, 0x8f, 0x62, - 0x73, 0xaa, 0x05, 0xda, 0x75, 0x6f, 0x25, 0x4b, 0xed, 0x86, 0xe2, 0x14, 0x19, 0x84, 0x67, 0xe5, - 0x71, 0x37, 0x36, 0x3a, 0xb0, 0xae, 0x50, 0x36, 0x12, 0x66, 0x55, 0x12, 0x56, 0xb3, 0xd4, 0x5e, - 0x2e, 0x13, 0xd8, 0x48, 0x20, 0xac, 0x64, 0xf7, 0x47, 0x62, 0xab, 0xf6, 0xed, 0xa3, 0x0d, 0xd0, - 0x67, 0x00, 0xa7, 0x65, 0x4f, 0x63, 0x0f, 0xce, 0x88, 0x84, 0x74, 0x7f, 0x67, 0x92, 0xa3, 0xbc, - 0xce, 0xfb, 0x5f, 0x4f, 0xb2, 0xa8, 0x9b, 0x48, 0x32, 0xc2, 0x5a, 0xc5, 0xf0, 0x61, 0x9d, 0x0b, - 0x3a, 0xf4, 0x79, 0x74, 0x49, 0xf5, 0x0c, 0x5e, 0xce, 0xf8, 0x92, 0xda, 0x1b, 0xbd, 0x48, 0x9c, - 0x8c, 0x02, 0x27, 0x64, 0x03, 0xbd, 0x1e, 0xfd, 0xb3, 0xc9, 0xbb, 0xa7, 0xae, 0xb8, 0x18, 0x52, - 0xee, 0xec, 0xc6, 0x62, 0x32, 0xc0, 0x58, 0x08, 0xe1, 0xb9, 0xfc, 0x7c, 0x18, 0x5d, 0x52, 0x3d, - 0xc0, 0x07, 0x00, 0xa7, 0xe5, 0x7d, 0x8c, 0x87, 0xb0, 0x36, 0x64, 0xac, 0x6f, 0x82, 0x16, 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87, 0x34, 0x16, 0x09, 0x11, 0xb4, 0x5b, 0x08, 0x55, 0xa5, - 0x90, 0x95, 0xa5, 0x76, 0x53, 0x09, 0xfd, 0xa4, 0x08, 0x61, 0xa3, 0x8c, 0x6a, 0xc1, 0x6d, 0xd8, - 0xc8, 0xfd, 0x3c, 0x27, 0x7c, 0x50, 0x88, 0xd5, 0xa4, 0x58, 0xe9, 0x85, 0x84, 0xe7, 0x93, 0xfb, - 0x14, 0xc5, 0x8a, 0x8e, 0xde, 0x03, 0x58, 0xf7, 0x08, 0xa7, 0x2f, 0x68, 0xcc, 0x06, 0xb9, 0xb3, - 0xdd, 0xfc, 0x20, 0x9d, 0xa9, 0x97, 0x9d, 0x95, 0x30, 0xc2, 0x2a, 0xfd, 0xd7, 0xff, 0x56, 0xde, - 0xde, 0xd5, 0xad, 0x05, 0xae, 0x6f, 0x2d, 0xf0, 0xf5, 0xd6, 0x02, 0xef, 0xee, 0xac, 0xca, 0xf5, - 0x9d, 0x55, 0xb9, 0xb9, 0xb3, 0x2a, 0x6f, 0x9e, 0x96, 0xf4, 0xf5, 0xb7, 0x61, 0xb3, 0x4f, 0x02, - 0x5e, 0x04, 0xee, 0x59, 0xe7, 0x99, 0xfb, 0x76, 0xf2, 0xe1, 0x96, 0x1d, 0x83, 0x19, 0x19, 0x3f, - 0xf9, 0x11, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x91, 0x01, 0x4f, 0xd9, 0x05, 0x00, 0x00, + // 682 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x6f, 0xd3, 0x40, + 0x14, 0xce, 0x35, 0xe9, 0x8f, 0x5c, 0xdb, 0xa4, 0xb8, 0xa5, 0xb8, 0x19, 0xec, 0xe8, 0x90, 0x4a, + 0x96, 0xda, 0x0a, 0x20, 0x21, 0x55, 0x62, 0xc0, 0x65, 0xa9, 0x90, 0xda, 0xea,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08, 0xa7, 0x2f, 0x69, 0xcc, 0xfa, 0xb9, 0xbf, 0x9d, 0xfc, 0x20, 0xfd, 0xa9, + 0x4e, 0xfa, 0x2b, 0x61, 0x84, 0x55, 0xfa, 0x9f, 0xff, 0xb9, 0xbc, 0xbd, 0xab, 0x5b, 0x0b, 0x5c, + 0xdf, 0x5a, 0xe0, 0xdb, 0xad, 0x05, 0xde, 0xdf, 0x59, 0xa5, 0xeb, 0x3b, 0xab, 0x74, 0x73, 0x67, + 0x95, 0xde, 0x3e, 0x9d, 0xd0, 0xd7, 0x5f, 0x88, 0xad, 0x1e, 0x09, 0x78, 0x11, 0xb8, 0x67, 0xed, + 0x67, 0xee, 0xbb, 0xf1, 0xe7, 0x5b, 0x76, 0x0c, 0xe6, 0x64, 0xfc, 0xe4, 0x67, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x25, 0xcc, 0x13, 0x2b, 0xdf, 0x05, 0x00, 0x00, } func (this *TokenPairArbRoutes) Equal(that interface{}) bool {