diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.ts index 54219e8514..bd8ced867f 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.ts @@ -51,6 +51,7 @@ export interface QueryVaultResponse { equity: Uint8Array; inventory: Uint8Array; vaultParams?: VaultParams; + mostRecentClientIds: number[]; } /** QueryVaultResponse is a response type for the Vault RPC method. */ @@ -60,6 +61,7 @@ export interface QueryVaultResponseSDKType { equity: Uint8Array; inventory: Uint8Array; vault_params?: VaultParamsSDKType; + most_recent_client_ids: number[]; } /** QueryAllVaultsRequest is a request type for the AllVaults RPC method. */ @@ -466,7 +468,8 @@ function createBaseQueryVaultResponse(): QueryVaultResponse { subaccountId: undefined, equity: new Uint8Array(), inventory: new Uint8Array(), - vaultParams: undefined + vaultParams: undefined, + mostRecentClientIds: [] }; } @@ -492,6 +495,13 @@ export const QueryVaultResponse = { VaultParams.encode(message.vaultParams, writer.uint32(42).fork()).ldelim(); } + writer.uint32(50).fork(); + + for (const v of message.mostRecentClientIds) { + writer.uint32(v); + } + + writer.ldelim(); return writer; }, @@ -524,6 +534,19 @@ export const QueryVaultResponse = { message.vaultParams = VaultParams.decode(reader, reader.uint32()); break; + case 6: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + + while (reader.pos < end2) { + message.mostRecentClientIds.push(reader.uint32()); + } + } else { + message.mostRecentClientIds.push(reader.uint32()); + } + + break; + default: reader.skipType(tag & 7); break; @@ -540,6 +563,7 @@ export const QueryVaultResponse = { message.equity = object.equity ?? new Uint8Array(); message.inventory = object.inventory ?? new Uint8Array(); message.vaultParams = object.vaultParams !== undefined && object.vaultParams !== null ? VaultParams.fromPartial(object.vaultParams) : undefined; + message.mostRecentClientIds = object.mostRecentClientIds?.map(e => e) || []; return message; } diff --git a/proto/dydxprotocol/vault/query.proto b/proto/dydxprotocol/vault/query.proto index 1c686d1262..a700529778 100644 --- a/proto/dydxprotocol/vault/query.proto +++ b/proto/dydxprotocol/vault/query.proto @@ -89,6 +89,7 @@ message QueryVaultResponse { (gogoproto.nullable) = false ]; VaultParams vault_params = 5 [ (gogoproto.nullable) = false ]; + repeated uint32 most_recent_client_ids = 6; } // QueryAllVaultsRequest is a request type for the AllVaults RPC method. diff --git a/protocol/x/vault/keeper/grpc_query_vault.go b/protocol/x/vault/keeper/grpc_query_vault.go index f13aa81cb7..44acb3d6d6 100644 --- a/protocol/x/vault/keeper/grpc_query_vault.go +++ b/protocol/x/vault/keeper/grpc_query_vault.go @@ -50,11 +50,12 @@ func (k Keeper) Vault( } return &types.QueryVaultResponse{ - VaultId: vaultId, - SubaccountId: *vaultId.ToSubaccountId(), - Equity: dtypes.NewIntFromBigInt(equity), - Inventory: dtypes.NewIntFromBigInt(inventory), - VaultParams: vaultParams, + VaultId: vaultId, + SubaccountId: *vaultId.ToSubaccountId(), + Equity: dtypes.NewIntFromBigInt(equity), + Inventory: dtypes.NewIntFromBigInt(inventory), + VaultParams: vaultParams, + MostRecentClientIds: k.GetMostRecentClientIds(ctx, vaultId), }, nil } diff --git a/protocol/x/vault/keeper/grpc_query_vault_test.go b/protocol/x/vault/keeper/grpc_query_vault_test.go index be55a39f59..5bf6c5f828 100644 --- a/protocol/x/vault/keeper/grpc_query_vault_test.go +++ b/protocol/x/vault/keeper/grpc_query_vault_test.go @@ -28,6 +28,8 @@ func TestVault(t *testing.T) { inventory *big.Int // Vault params. vaultParams vaulttypes.VaultParams + // Client IDs. + clientIds []uint32 // Query request. req *vaulttypes.QueryVaultRequest @@ -45,6 +47,7 @@ func TestVault(t *testing.T) { perpId: 0, inventory: big.NewInt(200), vaultParams: constants.VaultParams, + clientIds: []uint32{0, 1, 2, 3}, expectedEquity: big.NewInt(500), }, "Success: close only vault status": { @@ -59,6 +62,7 @@ func TestVault(t *testing.T) { vaultParams: vaulttypes.VaultParams{ Status: vaulttypes.VaultStatus_VAULT_STATUS_CLOSE_ONLY, }, + clientIds: []uint32{}, expectedEquity: big.NewInt(500), }, "Success: negative inventory and equity": { @@ -71,6 +75,7 @@ func TestVault(t *testing.T) { perpId: 0, inventory: big.NewInt(-200), vaultParams: constants.VaultParams, + clientIds: []uint32{77, 88, 99}, expectedEquity: big.NewInt(-300), }, "Success: non-existent clob pair": { @@ -86,6 +91,7 @@ func TestVault(t *testing.T) { perpId: 0, inventory: big.NewInt(0), vaultParams: constants.VaultParams, + clientIds: []uint32{93_213, 212_092}, expectedEquity: big.NewInt(100), }, "Error: query non-existent vault": { @@ -98,6 +104,7 @@ func TestVault(t *testing.T) { perpId: 0, inventory: big.NewInt(200), vaultParams: constants.VaultParams, + clientIds: []uint32{0, 1, 2, 3}, expectedErr: "vault not found", }, "Error: nil request": { @@ -139,15 +146,22 @@ func TestVault(t *testing.T) { } }, ) + testapp.UpdateGenesisDocWithAppStateForModule( + &genesis, + func(genesisState *vaulttypes.GenesisState) { + genesisState.Vaults = []vaulttypes.Vault{ + { + VaultId: tc.vaultId, + VaultParams: tc.vaultParams, + }, + } + }, + ) return genesis }).Build() ctx := tApp.InitChain() k := tApp.App.VaultKeeper - // Set vault params. - err := k.SetVaultParams(ctx, tc.vaultId, tc.vaultParams) - require.NoError(t, err) - // Check Vault query response is as expected. response, err := k.Vault(ctx, tc.req) if tc.expectedErr != "" { @@ -155,11 +169,12 @@ func TestVault(t *testing.T) { } else { require.NoError(t, err) expectedResponse := vaulttypes.QueryVaultResponse{ - VaultId: tc.vaultId, - SubaccountId: *tc.vaultId.ToSubaccountId(), - Equity: dtypes.NewIntFromBigInt(tc.expectedEquity), - Inventory: dtypes.NewIntFromBigInt(tc.inventory), - VaultParams: tc.vaultParams, + VaultId: tc.vaultId, + SubaccountId: *tc.vaultId.ToSubaccountId(), + Equity: dtypes.NewIntFromBigInt(tc.expectedEquity), + Inventory: dtypes.NewIntFromBigInt(tc.inventory), + VaultParams: tc.vaultParams, + MostRecentClientIds: k.GetMostRecentClientIds(ctx, tc.vaultId), } require.Equal(t, expectedResponse, *response) } diff --git a/protocol/x/vault/types/query.pb.go b/protocol/x/vault/types/query.pb.go index 040eb2c1f4..59c0536601 100644 --- a/protocol/x/vault/types/query.pb.go +++ b/protocol/x/vault/types/query.pb.go @@ -188,11 +188,12 @@ func (m *QueryVaultRequest) GetNumber() uint32 { // QueryVaultResponse is a response type for the Vault RPC method. type QueryVaultResponse struct { - VaultId VaultId `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"` - SubaccountId types.SubaccountId `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"` - Equity github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,3,opt,name=equity,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"equity"` - Inventory github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,4,opt,name=inventory,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"inventory"` - VaultParams VaultParams `protobuf:"bytes,5,opt,name=vault_params,json=vaultParams,proto3" json:"vault_params"` + VaultId VaultId `protobuf:"bytes,1,opt,name=vault_id,json=vaultId,proto3" json:"vault_id"` + SubaccountId types.SubaccountId `protobuf:"bytes,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id"` + Equity github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,3,opt,name=equity,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"equity"` + Inventory github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,4,opt,name=inventory,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"inventory"` + VaultParams VaultParams `protobuf:"bytes,5,opt,name=vault_params,json=vaultParams,proto3" json:"vault_params"` + MostRecentClientIds []uint32 `protobuf:"varint,6,rep,packed,name=most_recent_client_ids,json=mostRecentClientIds,proto3" json:"most_recent_client_ids,omitempty"` } func (m *QueryVaultResponse) Reset() { *m = QueryVaultResponse{} } @@ -249,6 +250,13 @@ func (m *QueryVaultResponse) GetVaultParams() VaultParams { return VaultParams{} } +func (m *QueryVaultResponse) GetMostRecentClientIds() []uint32 { + if m != nil { + return m.MostRecentClientIds + } + return nil +} + // QueryAllVaultsRequest is a request type for the AllVaults RPC method. type QueryAllVaultsRequest struct { Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -885,86 +893,88 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/vault/query.proto", fileDescriptor_478fb8dc0ff21ea6) } var fileDescriptor_478fb8dc0ff21ea6 = []byte{ - // 1258 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xe6, 0x87, 0xfb, 0xcd, 0x4b, 0xd2, 0xf6, 0x3b, 0x4d, 0x93, 0xd4, 0x2d, 0x4e, 0xb3, - 0x94, 0x96, 0xa4, 0x8d, 0x97, 0x84, 0xb4, 0x45, 0x50, 0xa1, 0x26, 0x12, 0xa5, 0x41, 0x82, 0xd6, - 0x4e, 0x28, 0x12, 0x12, 0x2c, 0x63, 0x7b, 0xe2, 0xac, 0x58, 0xef, 0x38, 0xbb, 0xb3, 0x49, 0x4c, - 0x14, 0x09, 0x81, 0x38, 0x70, 0x43, 0xe2, 0xca, 0x05, 0xfe, 0x04, 0x84, 0x84, 0x38, 0x70, 0x40, - 0xf4, 0xd0, 0x63, 0x05, 0x17, 0xc4, 0xa1, 0x42, 0x09, 0x7f, 0x08, 0xda, 0x99, 0xb7, 0xf6, 0xae, - 0xb3, 0x76, 0xb6, 0x95, 0x7b, 0x89, 0xbc, 0x33, 0xef, 0x7d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- 0x69, 0x39, 0x1b, 0x7c, 0xa5, 0xf0, 0xe8, 0x20, 0xa7, 0x3d, 0x3e, 0xc8, 0x69, 0xff, 0x1c, 0xe4, - 0xb4, 0x6f, 0x0e, 0x73, 0x7d, 0x8f, 0x0f, 0x73, 0x7d, 0x7f, 0x1d, 0xe6, 0xfa, 0x3e, 0xbc, 0x99, - 0xbe, 0xf7, 0xef, 0x22, 0x8d, 0x1c, 0x01, 0xa5, 0x8c, 0x3c, 0x7f, 0xf5, 0xbf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x27, 0xfa, 0xf8, 0xdb, 0x22, 0x12, 0x00, 0x00, + // 1295 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0xc6, 0x89, 0x4b, 0x26, 0x49, 0x5b, 0x26, 0x69, 0xe2, 0xba, 0xc5, 0x49, 0x16, 0x68, + 0x9b, 0xb4, 0xf1, 0x92, 0x34, 0x6d, 0x11, 0x54, 0xa8, 0x09, 0xa2, 0x34, 0x48, 0xd0, 0x7a, 0x13, + 0x8a, 0x84, 0x04, 0xcb, 0xd8, 0x3b, 0x71, 0x56, 0xac, 0x77, 0x9c, 0xdd, 0xd9, 0x24, 0x26, 0x8a, + 0x84, 0x40, 0x1c, 0xb8, 0x21, 0x71, 0xe5, 0x02, 0x1f, 0x01, 0x21, 0x21, 0x0e, 0x1c, 0x10, 0x3d, + 0xf4, 0x58, 0xc1, 0x05, 0x71, 0xa8, 0x50, 0xc2, 0x99, 0xcf, 0x80, 0x76, 0xe6, 0xad, 0xbd, 0xeb, + 0xac, 0x9d, 0x6d, 0xe5, 0x5e, 0x22, 0xef, 0xcc, 0x7b, 0xbf, 0xdf, 0x7b, 0x6f, 0xde, 0xbf, 0xa0, + 0x82, 0xd9, 0x30, 0x77, 0xeb, 0x2e, 0xe3, 0xac, 0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5b, 0x4e, 0xd5, + 0x00, 0xac, 0x7e, 0x81, 0x35, 0x93, 0x84, 0x55, 0x92, 0x92, 0x00, 0x39, 0x10, 0x40, 0xea, 0xe3, + 0x00, 0x13, 0xbb, 0xc3, 0x25, 0x74, 0x8a, 0xd5, 0xa9, 0x4b, 0x38, 0x73, 0x43, 0xdc, 0x8c, 0xc0, + 0x55, 0x93, 0x70, 0xef, 0x82, 0x68, 0x0c, 0xf8, 0x24, 0x8b, 0x9d, 0xaa, 0x1f, 0xa3, 0xe7, 0x45, + 0x10, 0xee, 0x07, 0x2a, 0x10, 0x1a, 0xbc, 0x80, 0x06, 0x78, 0xa3, 0x4e, 0x45, 0x00, 0x4e, 0x2e, + 0xbe, 0x90, 0x04, 0x2e, 0xe4, 0xd7, 0x1b, 0x75, 0xaa, 0x0b, 0x51, 0x3c, 0x81, 0xb2, 0x8e, 0x5f, + 0x2b, 0x53, 0x57, 0x78, 0x3a, 0xaa, 0xc3, 0x97, 0xfa, 0x5f, 0x06, 0x82, 0x0f, 0x04, 0x10, 0xe4, + 0x9b, 0xe8, 0x39, 0x81, 0x63, 0x58, 0x26, 0x84, 0xf9, 0x5c, 0x47, 0x96, 0x55, 0x13, 0x6c, 0x3f, + 0xb1, 0x2d, 0x3f, 0x71, 0x09, 0x8d, 0xb6, 0xb2, 0x28, 0x80, 0x90, 0xd1, 0xbd, 0x10, 0x87, 0x88, + 0x24, 0x5d, 0x71, 0xad, 0xf9, 0xbb, 0x89, 0x36, 0xe2, 0x45, 0xce, 0xf0, 0x27, 0x28, 0x4b, 0xb7, + 0x7c, 0x8b, 0x37, 0x44, 0x44, 0x47, 0x56, 0xee, 0x04, 0x32, 0x7f, 0x3f, 0x9e, 0xba, 0x55, 0xb5, + 0xf8, 0xa6, 0x5f, 0x2e, 0x56, 0x58, 0x4d, 0x8b, 0xa7, 0xd9, 0xd2, 0x7c, 0x65, 0x93, 0x58, 0x8e, + 0xd6, 0x3c, 0x31, 0x83, 0x40, 0x78, 0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0x48, + 0x13, 0xe5, 0xc4, 0x21, 0x97, 0x26, 0xca, 0xc9, 0x23, 0x4a, 0xbd, 0x26, 0x5c, 0xd0, 0xf0, 0x7c, + 0xf7, 0x28, 0x37, 0xd7, 0x35, 0xdb, 0xb0, 0x9c, 0x0d, 0xb6, 0x52, 0x7a, 0x78, 0x50, 0x50, 0x1e, + 0x1d, 0x14, 0x94, 0x7f, 0x0e, 0x0a, 0xca, 0x37, 0x87, 0x85, 0xbe, 0x47, 0x87, 0x85, 0xbe, 0xbf, + 0x0e, 0x0b, 0x7d, 0x1f, 0xde, 0x48, 0xdf, 0xfb, 0x77, 0x81, 0x46, 0x8c, 0x80, 0x72, 0x56, 0x9c, + 0x5f, 0xfd, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x49, 0x93, 0xca, 0x9a, 0x57, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1444,6 +1454,24 @@ func (m *QueryVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.MostRecentClientIds) > 0 { + dAtA5 := make([]byte, len(m.MostRecentClientIds)*10) + var j4 int + for _, num := range m.MostRecentClientIds { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintQuery(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0x32 + } { size, err := m.VaultParams.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -2065,6 +2093,13 @@ func (m *QueryVaultResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) l = m.VaultParams.Size() n += 1 + l + sovQuery(uint64(l)) + if len(m.MostRecentClientIds) > 0 { + l = 0 + for _, e := range m.MostRecentClientIds { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } return n } @@ -2735,6 +2770,82 @@ func (m *QueryVaultResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MostRecentClientIds = append(m.MostRecentClientIds, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.MostRecentClientIds) == 0 { + m.MostRecentClientIds = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.MostRecentClientIds = append(m.MostRecentClientIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field MostRecentClientIds", wireType) + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:])