From e700de90bee00b9f051d174797993b10a5472a2d Mon Sep 17 00:00:00 2001 From: jayy04 <103467857+jayy04@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:12:58 -0500 Subject: [PATCH] [CT-1320] proto for FNS price updates (#2586) --- .../src/codegen/dydxprotocol/bundle.ts | 362 +++++++------- .../src/codegen/dydxprotocol/clob/query.ts | 45 +- .../codegen/dydxprotocol/clob/streaming.ts | 15 +- .../codegen/dydxprotocol/prices/streaming.ts | 92 ++++ .../v4-protos/src/codegen/gogoproto/bundle.ts | 4 +- .../v4-protos/src/codegen/google/bundle.ts | 22 +- proto/dydxprotocol/clob/query.proto | 5 + proto/dydxprotocol/clob/streaming.proto | 2 + proto/dydxprotocol/prices/streaming.proto | 19 + protocol/x/clob/types/query.pb.go | 449 +++++++++++++----- protocol/x/clob/types/streaming.pb.go | 117 ++++- protocol/x/prices/types/streaming.pb.go | 405 ++++++++++++++++ 12 files changed, 1198 insertions(+), 339 deletions(-) create mode 100644 indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/streaming.ts create mode 100644 proto/dydxprotocol/prices/streaming.proto create mode 100644 protocol/x/prices/types/streaming.pb.go diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts index 42aaa1e67a..69bef10149 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts @@ -80,109 +80,110 @@ import * as _83 from "./prices/genesis"; import * as _84 from "./prices/market_param"; import * as _85 from "./prices/market_price"; import * as _86 from "./prices/query"; -import * as _87 from "./prices/tx"; -import * as _88 from "./ratelimit/capacity"; -import * as _89 from "./ratelimit/genesis"; -import * as _90 from "./ratelimit/limit_params"; -import * as _91 from "./ratelimit/pending_send_packet"; -import * as _92 from "./ratelimit/query"; -import * as _93 from "./ratelimit/tx"; -import * as _94 from "./revshare/genesis"; -import * as _95 from "./revshare/params"; -import * as _96 from "./revshare/query"; -import * as _97 from "./revshare/revshare"; -import * as _98 from "./revshare/tx"; -import * as _99 from "./rewards/genesis"; -import * as _100 from "./rewards/params"; -import * as _101 from "./rewards/query"; -import * as _102 from "./rewards/reward_share"; -import * as _103 from "./rewards/tx"; -import * as _104 from "./sending/genesis"; -import * as _105 from "./sending/query"; -import * as _106 from "./sending/transfer"; -import * as _107 from "./sending/tx"; -import * as _108 from "./stats/genesis"; -import * as _109 from "./stats/params"; -import * as _110 from "./stats/query"; -import * as _111 from "./stats/stats"; -import * as _112 from "./stats/tx"; -import * as _113 from "./subaccounts/asset_position"; -import * as _114 from "./subaccounts/genesis"; -import * as _115 from "./subaccounts/perpetual_position"; -import * as _116 from "./subaccounts/query"; -import * as _117 from "./subaccounts/streaming"; -import * as _118 from "./subaccounts/subaccount"; -import * as _119 from "./vault/genesis"; -import * as _120 from "./vault/params"; -import * as _121 from "./vault/query"; -import * as _122 from "./vault/share"; -import * as _123 from "./vault/tx"; -import * as _124 from "./vault/vault"; -import * as _125 from "./vest/genesis"; -import * as _126 from "./vest/query"; -import * as _127 from "./vest/tx"; -import * as _128 from "./vest/vest_entry"; -import * as _136 from "./accountplus/query.lcd"; -import * as _137 from "./affiliates/query.lcd"; -import * as _138 from "./assets/query.lcd"; -import * as _139 from "./blocktime/query.lcd"; -import * as _140 from "./bridge/query.lcd"; -import * as _141 from "./clob/query.lcd"; -import * as _142 from "./delaymsg/query.lcd"; -import * as _143 from "./epochs/query.lcd"; -import * as _144 from "./feetiers/query.lcd"; -import * as _145 from "./listing/query.lcd"; -import * as _146 from "./perpetuals/query.lcd"; -import * as _147 from "./prices/query.lcd"; -import * as _148 from "./ratelimit/query.lcd"; -import * as _149 from "./revshare/query.lcd"; -import * as _150 from "./rewards/query.lcd"; -import * as _151 from "./stats/query.lcd"; -import * as _152 from "./subaccounts/query.lcd"; -import * as _153 from "./vault/query.lcd"; -import * as _154 from "./vest/query.lcd"; -import * as _155 from "./accountplus/query.rpc.Query"; -import * as _156 from "./affiliates/query.rpc.Query"; -import * as _157 from "./assets/query.rpc.Query"; -import * as _158 from "./blocktime/query.rpc.Query"; -import * as _159 from "./bridge/query.rpc.Query"; -import * as _160 from "./clob/query.rpc.Query"; -import * as _161 from "./delaymsg/query.rpc.Query"; -import * as _162 from "./epochs/query.rpc.Query"; -import * as _163 from "./feetiers/query.rpc.Query"; -import * as _164 from "./govplus/query.rpc.Query"; -import * as _165 from "./listing/query.rpc.Query"; -import * as _166 from "./perpetuals/query.rpc.Query"; -import * as _167 from "./prices/query.rpc.Query"; -import * as _168 from "./ratelimit/query.rpc.Query"; -import * as _169 from "./revshare/query.rpc.Query"; -import * as _170 from "./rewards/query.rpc.Query"; -import * as _171 from "./sending/query.rpc.Query"; -import * as _172 from "./stats/query.rpc.Query"; -import * as _173 from "./subaccounts/query.rpc.Query"; -import * as _174 from "./vault/query.rpc.Query"; -import * as _175 from "./vest/query.rpc.Query"; -import * as _176 from "./accountplus/tx.rpc.msg"; -import * as _177 from "./affiliates/tx.rpc.msg"; -import * as _178 from "./blocktime/tx.rpc.msg"; -import * as _179 from "./bridge/tx.rpc.msg"; -import * as _180 from "./clob/tx.rpc.msg"; -import * as _181 from "./delaymsg/tx.rpc.msg"; -import * as _182 from "./feetiers/tx.rpc.msg"; -import * as _183 from "./govplus/tx.rpc.msg"; -import * as _184 from "./listing/tx.rpc.msg"; -import * as _185 from "./perpetuals/tx.rpc.msg"; -import * as _186 from "./prices/tx.rpc.msg"; -import * as _187 from "./ratelimit/tx.rpc.msg"; -import * as _188 from "./revshare/tx.rpc.msg"; -import * as _189 from "./rewards/tx.rpc.msg"; -import * as _190 from "./sending/tx.rpc.msg"; -import * as _191 from "./stats/tx.rpc.msg"; -import * as _192 from "./vault/tx.rpc.msg"; -import * as _193 from "./vest/tx.rpc.msg"; -import * as _194 from "./lcd"; -import * as _195 from "./rpc.query"; -import * as _196 from "./rpc.tx"; +import * as _87 from "./prices/streaming"; +import * as _88 from "./prices/tx"; +import * as _89 from "./ratelimit/capacity"; +import * as _90 from "./ratelimit/genesis"; +import * as _91 from "./ratelimit/limit_params"; +import * as _92 from "./ratelimit/pending_send_packet"; +import * as _93 from "./ratelimit/query"; +import * as _94 from "./ratelimit/tx"; +import * as _95 from "./revshare/genesis"; +import * as _96 from "./revshare/params"; +import * as _97 from "./revshare/query"; +import * as _98 from "./revshare/revshare"; +import * as _99 from "./revshare/tx"; +import * as _100 from "./rewards/genesis"; +import * as _101 from "./rewards/params"; +import * as _102 from "./rewards/query"; +import * as _103 from "./rewards/reward_share"; +import * as _104 from "./rewards/tx"; +import * as _105 from "./sending/genesis"; +import * as _106 from "./sending/query"; +import * as _107 from "./sending/transfer"; +import * as _108 from "./sending/tx"; +import * as _109 from "./stats/genesis"; +import * as _110 from "./stats/params"; +import * as _111 from "./stats/query"; +import * as _112 from "./stats/stats"; +import * as _113 from "./stats/tx"; +import * as _114 from "./subaccounts/asset_position"; +import * as _115 from "./subaccounts/genesis"; +import * as _116 from "./subaccounts/perpetual_position"; +import * as _117 from "./subaccounts/query"; +import * as _118 from "./subaccounts/streaming"; +import * as _119 from "./subaccounts/subaccount"; +import * as _120 from "./vault/genesis"; +import * as _121 from "./vault/params"; +import * as _122 from "./vault/query"; +import * as _123 from "./vault/share"; +import * as _124 from "./vault/tx"; +import * as _125 from "./vault/vault"; +import * as _126 from "./vest/genesis"; +import * as _127 from "./vest/query"; +import * as _128 from "./vest/tx"; +import * as _129 from "./vest/vest_entry"; +import * as _137 from "./accountplus/query.lcd"; +import * as _138 from "./affiliates/query.lcd"; +import * as _139 from "./assets/query.lcd"; +import * as _140 from "./blocktime/query.lcd"; +import * as _141 from "./bridge/query.lcd"; +import * as _142 from "./clob/query.lcd"; +import * as _143 from "./delaymsg/query.lcd"; +import * as _144 from "./epochs/query.lcd"; +import * as _145 from "./feetiers/query.lcd"; +import * as _146 from "./listing/query.lcd"; +import * as _147 from "./perpetuals/query.lcd"; +import * as _148 from "./prices/query.lcd"; +import * as _149 from "./ratelimit/query.lcd"; +import * as _150 from "./revshare/query.lcd"; +import * as _151 from "./rewards/query.lcd"; +import * as _152 from "./stats/query.lcd"; +import * as _153 from "./subaccounts/query.lcd"; +import * as _154 from "./vault/query.lcd"; +import * as _155 from "./vest/query.lcd"; +import * as _156 from "./accountplus/query.rpc.Query"; +import * as _157 from "./affiliates/query.rpc.Query"; +import * as _158 from "./assets/query.rpc.Query"; +import * as _159 from "./blocktime/query.rpc.Query"; +import * as _160 from "./bridge/query.rpc.Query"; +import * as _161 from "./clob/query.rpc.Query"; +import * as _162 from "./delaymsg/query.rpc.Query"; +import * as _163 from "./epochs/query.rpc.Query"; +import * as _164 from "./feetiers/query.rpc.Query"; +import * as _165 from "./govplus/query.rpc.Query"; +import * as _166 from "./listing/query.rpc.Query"; +import * as _167 from "./perpetuals/query.rpc.Query"; +import * as _168 from "./prices/query.rpc.Query"; +import * as _169 from "./ratelimit/query.rpc.Query"; +import * as _170 from "./revshare/query.rpc.Query"; +import * as _171 from "./rewards/query.rpc.Query"; +import * as _172 from "./sending/query.rpc.Query"; +import * as _173 from "./stats/query.rpc.Query"; +import * as _174 from "./subaccounts/query.rpc.Query"; +import * as _175 from "./vault/query.rpc.Query"; +import * as _176 from "./vest/query.rpc.Query"; +import * as _177 from "./accountplus/tx.rpc.msg"; +import * as _178 from "./affiliates/tx.rpc.msg"; +import * as _179 from "./blocktime/tx.rpc.msg"; +import * as _180 from "./bridge/tx.rpc.msg"; +import * as _181 from "./clob/tx.rpc.msg"; +import * as _182 from "./delaymsg/tx.rpc.msg"; +import * as _183 from "./feetiers/tx.rpc.msg"; +import * as _184 from "./govplus/tx.rpc.msg"; +import * as _185 from "./listing/tx.rpc.msg"; +import * as _186 from "./perpetuals/tx.rpc.msg"; +import * as _187 from "./prices/tx.rpc.msg"; +import * as _188 from "./ratelimit/tx.rpc.msg"; +import * as _189 from "./revshare/tx.rpc.msg"; +import * as _190 from "./rewards/tx.rpc.msg"; +import * as _191 from "./sending/tx.rpc.msg"; +import * as _192 from "./stats/tx.rpc.msg"; +import * as _193 from "./vault/tx.rpc.msg"; +import * as _194 from "./vest/tx.rpc.msg"; +import * as _195 from "./lcd"; +import * as _196 from "./rpc.query"; +import * as _197 from "./rpc.tx"; export namespace dydxprotocol { export const accountplus = { ..._5, ..._6, @@ -190,33 +191,33 @@ export namespace dydxprotocol { ..._8, ..._9, ..._10, - ..._136, - ..._155, - ..._176 + ..._137, + ..._156, + ..._177 }; export const affiliates = { ..._11, ..._12, ..._13, ..._14, - ..._137, - ..._156, - ..._177 + ..._138, + ..._157, + ..._178 }; export const assets = { ..._15, ..._16, ..._17, ..._18, - ..._138, - ..._157 + ..._139, + ..._158 }; export const blocktime = { ..._19, ..._20, ..._21, ..._22, ..._23, - ..._139, - ..._158, - ..._178 + ..._140, + ..._159, + ..._179 }; export const bridge = { ..._24, ..._25, @@ -224,9 +225,9 @@ export namespace dydxprotocol { ..._27, ..._28, ..._29, - ..._140, - ..._159, - ..._179 + ..._141, + ..._160, + ..._180 }; export const clob = { ..._30, ..._31, @@ -244,9 +245,9 @@ export namespace dydxprotocol { ..._43, ..._44, ..._45, - ..._141, - ..._160, - ..._180 + ..._142, + ..._161, + ..._181 }; export namespace daemons { export const bridge = { ..._46 @@ -261,29 +262,29 @@ export namespace dydxprotocol { ..._51, ..._52, ..._53, - ..._142, - ..._161, - ..._181 + ..._143, + ..._162, + ..._182 }; export const epochs = { ..._54, ..._55, ..._56, - ..._143, - ..._162 + ..._144, + ..._163 }; export const feetiers = { ..._57, ..._58, ..._59, ..._60, - ..._144, - ..._163, - ..._182 + ..._145, + ..._164, + ..._183 }; export const govplus = { ..._61, ..._62, ..._63, - ..._164, - ..._183 + ..._165, + ..._184 }; export namespace indexer { export const events = { ..._64 @@ -310,101 +311,102 @@ export namespace dydxprotocol { ..._75, ..._76, ..._77, - ..._145, - ..._165, - ..._184 + ..._146, + ..._166, + ..._185 }; export const perpetuals = { ..._78, ..._79, ..._80, ..._81, ..._82, - ..._146, - ..._166, - ..._185 + ..._147, + ..._167, + ..._186 }; export const prices = { ..._83, ..._84, ..._85, ..._86, ..._87, - ..._147, - ..._167, - ..._186 + ..._88, + ..._148, + ..._168, + ..._187 }; - export const ratelimit = { ..._88, - ..._89, + export const ratelimit = { ..._89, ..._90, ..._91, ..._92, ..._93, - ..._148, - ..._168, - ..._187 + ..._94, + ..._149, + ..._169, + ..._188 }; - export const revshare = { ..._94, - ..._95, + export const revshare = { ..._95, ..._96, ..._97, ..._98, - ..._149, - ..._169, - ..._188 + ..._99, + ..._150, + ..._170, + ..._189 }; - export const rewards = { ..._99, - ..._100, + export const rewards = { ..._100, ..._101, ..._102, ..._103, - ..._150, - ..._170, - ..._189 + ..._104, + ..._151, + ..._171, + ..._190 }; - export const sending = { ..._104, - ..._105, + export const sending = { ..._105, ..._106, ..._107, - ..._171, - ..._190 + ..._108, + ..._172, + ..._191 }; - export const stats = { ..._108, - ..._109, + export const stats = { ..._109, ..._110, ..._111, ..._112, - ..._151, - ..._172, - ..._191 + ..._113, + ..._152, + ..._173, + ..._192 }; - export const subaccounts = { ..._113, - ..._114, + export const subaccounts = { ..._114, ..._115, ..._116, ..._117, ..._118, - ..._152, - ..._173 + ..._119, + ..._153, + ..._174 }; - export const vault = { ..._119, - ..._120, + export const vault = { ..._120, ..._121, ..._122, ..._123, ..._124, - ..._153, - ..._174, - ..._192 - }; - export const vest = { ..._125, - ..._126, - ..._127, - ..._128, + ..._125, ..._154, ..._175, ..._193 }; - export const ClientFactory = { ..._194, - ..._195, - ..._196 + export const vest = { ..._126, + ..._127, + ..._128, + ..._129, + ..._155, + ..._176, + ..._194 + }; + export const ClientFactory = { ..._195, + ..._196, + ..._197 }; } \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts index 41ca0c872a..acd5104528 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts @@ -7,6 +7,7 @@ import { EquityTierLimitConfiguration, EquityTierLimitConfigurationSDKType } fro import { BlockRateLimitConfiguration, BlockRateLimitConfigurationSDKType } from "./block_rate_limit_config"; import { LiquidationsConfig, LiquidationsConfigSDKType } from "./liquidations_config"; import { StreamSubaccountUpdate, StreamSubaccountUpdateSDKType } from "../subaccounts/streaming"; +import { StreamPriceUpdate, StreamPriceUpdateSDKType } from "../prices/streaming"; import { OffChainUpdateV1, OffChainUpdateV1SDKType } from "../indexer/off_chain_updates/off_chain_updates"; import { ClobMatch, ClobMatchSDKType } from "./matches"; import * as _m0 from "protobufjs/minimal"; @@ -256,6 +257,9 @@ export interface StreamOrderbookUpdatesRequest { /** Subaccount ids to stream subaccount updates for. */ subaccountIds: SubaccountId[]; + /** Market ids for price updates. */ + + marketIds: number[]; } /** * StreamOrderbookUpdatesRequest is a request message for the @@ -268,6 +272,9 @@ export interface StreamOrderbookUpdatesRequestSDKType { /** Subaccount ids to stream subaccount updates for. */ subaccount_ids: SubaccountIdSDKType[]; + /** Market ids for price updates. */ + + market_ids: number[]; } /** * StreamOrderbookUpdatesResponse is a response message for the @@ -302,6 +309,7 @@ export interface StreamUpdate { orderFill?: StreamOrderbookFill; takerOrder?: StreamTakerOrder; subaccountUpdate?: StreamSubaccountUpdate; + priceUpdate?: StreamPriceUpdate; } /** * StreamUpdate is an update that will be pushed through the @@ -318,6 +326,7 @@ export interface StreamUpdateSDKType { order_fill?: StreamOrderbookFillSDKType; taker_order?: StreamTakerOrderSDKType; subaccount_update?: StreamSubaccountUpdateSDKType; + price_update?: StreamPriceUpdateSDKType; } /** * StreamOrderbookUpdate provides information on an orderbook update. Used in @@ -1191,7 +1200,8 @@ export const QueryLiquidationsConfigurationResponse = { function createBaseStreamOrderbookUpdatesRequest(): StreamOrderbookUpdatesRequest { return { clobPairId: [], - subaccountIds: [] + subaccountIds: [], + marketIds: [] }; } @@ -1209,6 +1219,13 @@ export const StreamOrderbookUpdatesRequest = { SubaccountId.encode(v!, writer.uint32(18).fork()).ldelim(); } + writer.uint32(26).fork(); + + for (const v of message.marketIds) { + writer.uint32(v); + } + + writer.ldelim(); return writer; }, @@ -1238,6 +1255,19 @@ export const StreamOrderbookUpdatesRequest = { message.subaccountIds.push(SubaccountId.decode(reader, reader.uint32())); break; + case 3: + if ((tag & 7) === 2) { + const end2 = reader.uint32() + reader.pos; + + while (reader.pos < end2) { + message.marketIds.push(reader.uint32()); + } + } else { + message.marketIds.push(reader.uint32()); + } + + break; + default: reader.skipType(tag & 7); break; @@ -1251,6 +1281,7 @@ export const StreamOrderbookUpdatesRequest = { const message = createBaseStreamOrderbookUpdatesRequest(); message.clobPairId = object.clobPairId?.map(e => e) || []; message.subaccountIds = object.subaccountIds?.map(e => SubaccountId.fromPartial(e)) || []; + message.marketIds = object.marketIds?.map(e => e) || []; return message; } @@ -1308,7 +1339,8 @@ function createBaseStreamUpdate(): StreamUpdate { orderbookUpdate: undefined, orderFill: undefined, takerOrder: undefined, - subaccountUpdate: undefined + subaccountUpdate: undefined, + priceUpdate: undefined }; } @@ -1338,6 +1370,10 @@ export const StreamUpdate = { StreamSubaccountUpdate.encode(message.subaccountUpdate, writer.uint32(50).fork()).ldelim(); } + if (message.priceUpdate !== undefined) { + StreamPriceUpdate.encode(message.priceUpdate, writer.uint32(58).fork()).ldelim(); + } + return writer; }, @@ -1374,6 +1410,10 @@ export const StreamUpdate = { message.subaccountUpdate = StreamSubaccountUpdate.decode(reader, reader.uint32()); break; + case 7: + message.priceUpdate = StreamPriceUpdate.decode(reader, reader.uint32()); + break; + default: reader.skipType(tag & 7); break; @@ -1391,6 +1431,7 @@ export const StreamUpdate = { message.orderFill = object.orderFill !== undefined && object.orderFill !== null ? StreamOrderbookFill.fromPartial(object.orderFill) : undefined; message.takerOrder = object.takerOrder !== undefined && object.takerOrder !== null ? StreamTakerOrder.fromPartial(object.takerOrder) : undefined; message.subaccountUpdate = object.subaccountUpdate !== undefined && object.subaccountUpdate !== null ? StreamSubaccountUpdate.fromPartial(object.subaccountUpdate) : undefined; + message.priceUpdate = object.priceUpdate !== undefined && object.priceUpdate !== null ? StreamPriceUpdate.fromPartial(object.priceUpdate) : undefined; return message; } diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/streaming.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/streaming.ts index 1600c2e39c..d0ad4cd6ed 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/streaming.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/streaming.ts @@ -1,5 +1,6 @@ import { StreamOrderbookFill, StreamOrderbookFillSDKType, StreamOrderbookUpdate, StreamOrderbookUpdateSDKType } from "./query"; import { StreamSubaccountUpdate, StreamSubaccountUpdateSDKType } from "../subaccounts/streaming"; +import { StreamPriceUpdate, StreamPriceUpdateSDKType } from "../prices/streaming"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial } from "../../helpers"; /** StagedFinalizeBlockEvent is an event staged during `FinalizeBlock`. */ @@ -8,6 +9,7 @@ export interface StagedFinalizeBlockEvent { orderFill?: StreamOrderbookFill; subaccountUpdate?: StreamSubaccountUpdate; orderbookUpdate?: StreamOrderbookUpdate; + priceUpdate?: StreamPriceUpdate; } /** StagedFinalizeBlockEvent is an event staged during `FinalizeBlock`. */ @@ -15,13 +17,15 @@ export interface StagedFinalizeBlockEventSDKType { order_fill?: StreamOrderbookFillSDKType; subaccount_update?: StreamSubaccountUpdateSDKType; orderbook_update?: StreamOrderbookUpdateSDKType; + price_update?: StreamPriceUpdateSDKType; } function createBaseStagedFinalizeBlockEvent(): StagedFinalizeBlockEvent { return { orderFill: undefined, subaccountUpdate: undefined, - orderbookUpdate: undefined + orderbookUpdate: undefined, + priceUpdate: undefined }; } @@ -39,6 +43,10 @@ export const StagedFinalizeBlockEvent = { StreamOrderbookUpdate.encode(message.orderbookUpdate, writer.uint32(26).fork()).ldelim(); } + if (message.priceUpdate !== undefined) { + StreamPriceUpdate.encode(message.priceUpdate, writer.uint32(34).fork()).ldelim(); + } + return writer; }, @@ -63,6 +71,10 @@ export const StagedFinalizeBlockEvent = { message.orderbookUpdate = StreamOrderbookUpdate.decode(reader, reader.uint32()); break; + case 4: + message.priceUpdate = StreamPriceUpdate.decode(reader, reader.uint32()); + break; + default: reader.skipType(tag & 7); break; @@ -77,6 +89,7 @@ export const StagedFinalizeBlockEvent = { message.orderFill = object.orderFill !== undefined && object.orderFill !== null ? StreamOrderbookFill.fromPartial(object.orderFill) : undefined; message.subaccountUpdate = object.subaccountUpdate !== undefined && object.subaccountUpdate !== null ? StreamSubaccountUpdate.fromPartial(object.subaccountUpdate) : undefined; message.orderbookUpdate = object.orderbookUpdate !== undefined && object.orderbookUpdate !== null ? StreamOrderbookUpdate.fromPartial(object.orderbookUpdate) : undefined; + message.priceUpdate = object.priceUpdate !== undefined && object.priceUpdate !== null ? StreamPriceUpdate.fromPartial(object.priceUpdate) : undefined; return message; } diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/streaming.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/streaming.ts new file mode 100644 index 0000000000..185fe8dc4f --- /dev/null +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/streaming.ts @@ -0,0 +1,92 @@ +import { MarketPrice, MarketPriceSDKType } from "./market_price"; +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial } from "../../helpers"; +/** StreamPriceUpdate provides information on a price update. */ + +export interface StreamPriceUpdate { + /** The `Id` of the `Market`. */ + marketId: number; + /** The updated price. */ + + price?: MarketPrice; + /** Snapshot indicates if the response is from a snapshot of the price. */ + + snapshot: boolean; +} +/** StreamPriceUpdate provides information on a price update. */ + +export interface StreamPriceUpdateSDKType { + /** The `Id` of the `Market`. */ + market_id: number; + /** The updated price. */ + + price?: MarketPriceSDKType; + /** Snapshot indicates if the response is from a snapshot of the price. */ + + snapshot: boolean; +} + +function createBaseStreamPriceUpdate(): StreamPriceUpdate { + return { + marketId: 0, + price: undefined, + snapshot: false + }; +} + +export const StreamPriceUpdate = { + encode(message: StreamPriceUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.marketId !== 0) { + writer.uint32(8).uint32(message.marketId); + } + + if (message.price !== undefined) { + MarketPrice.encode(message.price, writer.uint32(18).fork()).ldelim(); + } + + if (message.snapshot === true) { + writer.uint32(24).bool(message.snapshot); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): StreamPriceUpdate { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseStreamPriceUpdate(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.marketId = reader.uint32(); + break; + + case 2: + message.price = MarketPrice.decode(reader, reader.uint32()); + break; + + case 3: + message.snapshot = reader.bool(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): StreamPriceUpdate { + const message = createBaseStreamPriceUpdate(); + message.marketId = object.marketId ?? 0; + message.price = object.price !== undefined && object.price !== null ? MarketPrice.fromPartial(object.price) : undefined; + message.snapshot = object.snapshot ?? false; + return message; + } + +}; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts b/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts index 675007986c..7268721d90 100644 --- a/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts +++ b/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts @@ -1,3 +1,3 @@ -import * as _129 from "./gogo"; -export const gogoproto = { ..._129 +import * as _130 from "./gogo"; +export const gogoproto = { ..._130 }; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/google/bundle.ts b/indexer/packages/v4-protos/src/codegen/google/bundle.ts index 4617ba1a6e..c730dc4e52 100644 --- a/indexer/packages/v4-protos/src/codegen/google/bundle.ts +++ b/indexer/packages/v4-protos/src/codegen/google/bundle.ts @@ -1,16 +1,16 @@ -import * as _130 from "./api/annotations"; -import * as _131 from "./api/http"; -import * as _132 from "./protobuf/descriptor"; -import * as _133 from "./protobuf/duration"; -import * as _134 from "./protobuf/timestamp"; -import * as _135 from "./protobuf/any"; +import * as _131 from "./api/annotations"; +import * as _132 from "./api/http"; +import * as _133 from "./protobuf/descriptor"; +import * as _134 from "./protobuf/duration"; +import * as _135 from "./protobuf/timestamp"; +import * as _136 from "./protobuf/any"; export namespace google { - export const api = { ..._130, - ..._131 + export const api = { ..._131, + ..._132 }; - export const protobuf = { ..._132, - ..._133, + export const protobuf = { ..._133, ..._134, - ..._135 + ..._135, + ..._136 }; } \ No newline at end of file diff --git a/proto/dydxprotocol/clob/query.proto b/proto/dydxprotocol/clob/query.proto index 9d47ea4641..380336bbf9 100644 --- a/proto/dydxprotocol/clob/query.proto +++ b/proto/dydxprotocol/clob/query.proto @@ -14,6 +14,7 @@ import "dydxprotocol/clob/mev.proto"; import "dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto"; import "dydxprotocol/subaccounts/streaming.proto"; import "dydxprotocol/subaccounts/subaccount.proto"; +import "dydxprotocol/prices/streaming.proto"; option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/clob/types"; @@ -170,6 +171,9 @@ message StreamOrderbookUpdatesRequest { // Subaccount ids to stream subaccount updates for. repeated dydxprotocol.subaccounts.SubaccountId subaccount_ids = 2; + + // Market ids for price updates. + repeated uint32 market_ids = 3; } // StreamOrderbookUpdatesResponse is a response message for the @@ -195,6 +199,7 @@ message StreamUpdate { StreamOrderbookFill order_fill = 4; StreamTakerOrder taker_order = 5; dydxprotocol.subaccounts.StreamSubaccountUpdate subaccount_update = 6; + dydxprotocol.prices.StreamPriceUpdate price_update = 7; } } diff --git a/proto/dydxprotocol/clob/streaming.proto b/proto/dydxprotocol/clob/streaming.proto index ae3811134e..ad4ce7cc24 100644 --- a/proto/dydxprotocol/clob/streaming.proto +++ b/proto/dydxprotocol/clob/streaming.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package dydxprotocol.clob; import "dydxprotocol/subaccounts/streaming.proto"; +import "dydxprotocol/prices/streaming.proto"; import "dydxprotocol/clob/query.proto"; option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/clob/types"; @@ -13,5 +14,6 @@ message StagedFinalizeBlockEvent { StreamOrderbookFill order_fill = 1; dydxprotocol.subaccounts.StreamSubaccountUpdate subaccount_update = 2; StreamOrderbookUpdate orderbook_update = 3; + dydxprotocol.prices.StreamPriceUpdate price_update = 4; } } diff --git a/proto/dydxprotocol/prices/streaming.proto b/proto/dydxprotocol/prices/streaming.proto new file mode 100644 index 0000000000..fb5d44c1fe --- /dev/null +++ b/proto/dydxprotocol/prices/streaming.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; +package dydxprotocol.prices; + +import "gogoproto/gogo.proto"; +import "dydxprotocol/prices/market_price.proto"; + +option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/prices/types"; + +// StreamPriceUpdate provides information on a price update. +message StreamPriceUpdate { + // The `Id` of the `Market`. + uint32 market_id = 1; + + // The updated price. + MarketPrice price = 2 [ (gogoproto.nullable) = false ]; + + // Snapshot indicates if the response is from a snapshot of the price. + bool snapshot = 3; +} \ No newline at end of file diff --git a/protocol/x/clob/types/query.pb.go b/protocol/x/clob/types/query.pb.go index 4f4d01af14..a6f0c83c55 100644 --- a/protocol/x/clob/types/query.pb.go +++ b/protocol/x/clob/types/query.pb.go @@ -11,7 +11,8 @@ import ( _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" - types1 "github.com/dydxprotocol/v4-chain/protocol/indexer/off_chain_updates/types" + types2 "github.com/dydxprotocol/v4-chain/protocol/indexer/off_chain_updates/types" + types1 "github.com/dydxprotocol/v4-chain/protocol/x/prices/types" types "github.com/dydxprotocol/v4-chain/protocol/x/subaccounts/types" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" @@ -773,6 +774,8 @@ type StreamOrderbookUpdatesRequest struct { ClobPairId []uint32 `protobuf:"varint,1,rep,packed,name=clob_pair_id,json=clobPairId,proto3" json:"clob_pair_id,omitempty"` // Subaccount ids to stream subaccount updates for. SubaccountIds []*types.SubaccountId `protobuf:"bytes,2,rep,name=subaccount_ids,json=subaccountIds,proto3" json:"subaccount_ids,omitempty"` + // Market ids for price updates. + MarketIds []uint32 `protobuf:"varint,3,rep,packed,name=market_ids,json=marketIds,proto3" json:"market_ids,omitempty"` } func (m *StreamOrderbookUpdatesRequest) Reset() { *m = StreamOrderbookUpdatesRequest{} } @@ -822,6 +825,13 @@ func (m *StreamOrderbookUpdatesRequest) GetSubaccountIds() []*types.SubaccountId return nil } +func (m *StreamOrderbookUpdatesRequest) GetMarketIds() []uint32 { + if m != nil { + return m.MarketIds + } + return nil +} + // StreamOrderbookUpdatesResponse is a response message for the // StreamOrderbookUpdates method. type StreamOrderbookUpdatesResponse struct { @@ -885,6 +895,7 @@ type StreamUpdate struct { // *StreamUpdate_OrderFill // *StreamUpdate_TakerOrder // *StreamUpdate_SubaccountUpdate + // *StreamUpdate_PriceUpdate UpdateMessage isStreamUpdate_UpdateMessage `protobuf_oneof:"update_message"` } @@ -939,11 +950,15 @@ type StreamUpdate_TakerOrder struct { type StreamUpdate_SubaccountUpdate struct { SubaccountUpdate *types.StreamSubaccountUpdate `protobuf:"bytes,6,opt,name=subaccount_update,json=subaccountUpdate,proto3,oneof" json:"subaccount_update,omitempty"` } +type StreamUpdate_PriceUpdate struct { + PriceUpdate *types1.StreamPriceUpdate `protobuf:"bytes,7,opt,name=price_update,json=priceUpdate,proto3,oneof" json:"price_update,omitempty"` +} func (*StreamUpdate_OrderbookUpdate) isStreamUpdate_UpdateMessage() {} func (*StreamUpdate_OrderFill) isStreamUpdate_UpdateMessage() {} func (*StreamUpdate_TakerOrder) isStreamUpdate_UpdateMessage() {} func (*StreamUpdate_SubaccountUpdate) isStreamUpdate_UpdateMessage() {} +func (*StreamUpdate_PriceUpdate) isStreamUpdate_UpdateMessage() {} func (m *StreamUpdate) GetUpdateMessage() isStreamUpdate_UpdateMessage { if m != nil { @@ -994,6 +1009,13 @@ func (m *StreamUpdate) GetSubaccountUpdate() *types.StreamSubaccountUpdate { return nil } +func (m *StreamUpdate) GetPriceUpdate() *types1.StreamPriceUpdate { + if x, ok := m.GetUpdateMessage().(*StreamUpdate_PriceUpdate); ok { + return x.PriceUpdate + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*StreamUpdate) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -1001,6 +1023,7 @@ func (*StreamUpdate) XXX_OneofWrappers() []interface{} { (*StreamUpdate_OrderFill)(nil), (*StreamUpdate_TakerOrder)(nil), (*StreamUpdate_SubaccountUpdate)(nil), + (*StreamUpdate_PriceUpdate)(nil), } } @@ -1014,7 +1037,7 @@ type StreamOrderbookUpdate struct { Snapshot bool `protobuf:"varint,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` // Orderbook updates for the clob pair. Can contain order place, removals, // or updates. - Updates []types1.OffChainUpdateV1 `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates"` + Updates []types2.OffChainUpdateV1 `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates"` } func (m *StreamOrderbookUpdate) Reset() { *m = StreamOrderbookUpdate{} } @@ -1057,7 +1080,7 @@ func (m *StreamOrderbookUpdate) GetSnapshot() bool { return false } -func (m *StreamOrderbookUpdate) GetUpdates() []types1.OffChainUpdateV1 { +func (m *StreamOrderbookUpdate) GetUpdates() []types2.OffChainUpdateV1 { if m != nil { return m.Updates } @@ -1333,111 +1356,114 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/clob/query.proto", fileDescriptor_3365c195b25c5bc0) } var fileDescriptor_3365c195b25c5bc0 = []byte{ - // 1661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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, 0xfb, 0x95, 0x3e, 0x26, 0xbe, 0xf9, 0x77, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1, 0x46, 0x6b, 0x53, 0x00, 0x14, 0x00, 0x00, + // 1708 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x41, 0x4c, 0x1c, 0xc9, + 0x15, 0x9d, 0x06, 0x6c, 0xc3, 0x1f, 0xe3, 0xc5, 0xe5, 0xb5, 0x77, 0x76, 0x0c, 0x03, 0x6e, 0xc7, + 0x18, 0xd8, 0x78, 0x1a, 0xd8, 0xd5, 0x6a, 0x63, 0xa2, 0x8d, 0x80, 0x04, 0x83, 0x62, 0xb2, 0x6c, + 0xc3, 0x7a, 0x51, 0xb2, 0x52, 0xab, 0xa6, 0xbb, 0x18, 0x4a, 0x74, 0x77, 0x0d, 0xdd, 0xd5, 0x23, + 0x50, 0x14, 0x45, 0xca, 0x61, 0x2f, 0x49, 0xa4, 0x48, 0x39, 0xe4, 0x10, 0x29, 0x97, 0x9c, 0xa3, + 0xe4, 0x92, 0x63, 0x94, 0xe4, 0xb6, 0x47, 0x4b, 0xb9, 0xe4, 0x10, 0x45, 0x91, 0x9d, 0x73, 0x8e, + 0x39, 0xaf, 0xba, 0xaa, 0x7a, 0xa6, 0x7b, 0xba, 0x7b, 0xc0, 0x5c, 0xa0, 0xeb, 0xd7, 0xff, 0xaf, + 0xde, 0xff, 0xf5, 0xeb, 0xd7, 0xaf, 0x81, 0x19, 0xe7, 0xdc, 0x39, 0xeb, 0x04, 0x8c, 0x33, 0x9b, + 0xb9, 0x86, 0xed, 0xb2, 0x96, 0x71, 0x1a, 0x91, 0xe0, 0xbc, 0x29, 0x64, 0xe8, 0x76, 0x7a, 0xba, + 0x19, 0x4f, 0xd7, 0xdf, 0x6e, 0xb3, 0x36, 0x13, 0x22, 0x23, 0xfe, 0x92, 0x8a, 0xf5, 0xe9, 0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d, 0x26, 0xe2, 0xd3, 0x62, 0xec, + 0xe4, 0x33, 0x79, 0x95, 0x26, 0x1b, 0x99, 0x3f, 0xc0, 0xa3, 0x03, 0x07, 0x78, 0x17, 0x6e, 0xf5, + 0x2f, 0x4b, 0x8b, 0x3a, 0x71, 0x75, 0x1b, 0xcd, 0x97, 0xce, 0xd4, 0xe5, 0xda, 0xdc, 0xef, 0x7d, + 0xef, 0x38, 0xe6, 0x64, 0x98, 0x1a, 0x85, 0x68, 0x06, 0xc0, 0xc3, 0xc1, 0x09, 0x91, 0x50, 0xa3, + 0x62, 0xb9, 0x09, 0x29, 0xd9, 0x71, 0x42, 0x1d, 0x43, 0xa3, 0x8c, 0xb0, 0x8a, 0xd8, 0x77, 0xe0, + 0x86, 0x6a, 0x07, 0x54, 0xc9, 0x9b, 0x2d, 0x88, 0x92, 0xc4, 0x90, 0xa6, 0x49, 0xfa, 0x29, 0x2b, + 0xfd, 0xff, 0xa3, 0x70, 0x33, 0x3d, 0x8f, 0x1e, 0xc0, 0x4d, 0x79, 0xac, 0x8e, 0x09, 0x6d, 0x1f, + 0x73, 0x55, 0xc4, 0xaa, 0x42, 0xb6, 0x2d, 0x44, 0xe8, 0x3e, 0x4c, 0x90, 0x33, 0x62, 0x5b, 0x1e, + 0x73, 0x88, 0xc8, 0x9b, 0x49, 0x73, 0x3c, 0x16, 0xec, 0x32, 0x87, 0xa0, 0xcf, 0x60, 0x8a, 0x25, + 0x6c, 0x55, 0xab, 0x22, 0x92, 0xa7, 0xba, 0xba, 0x50, 0x4a, 0x6d, 0xc0, 0xbd, 0xed, 0x8a, 0xf9, + 0x16, 0xcb, 0x8a, 0xe2, 0x8b, 0x52, 0x9e, 0x83, 0x38, 0x41, 0x6b, 0x63, 0xa5, 0xf7, 0xd5, 0x00, + 0xe0, 0x16, 0x75, 0xdd, 0xed, 0x8a, 0x39, 0x21, 0x6c, 0xe3, 0x01, 0xda, 0x82, 0x2a, 0xc7, 0x27, + 0x24, 0xb0, 0x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0xd8, 0xf7, 0xa1, 0xe5, 0xcb, 0xf6, 0x50, 0x49, 0x4f, 0x5b, 0x5f, 0x79, 0x03, 0x0b, + 0x49, 0x60, 0x59, 0xdb, 0xd8, 0xfb, 0xea, 0x55, 0x43, 0x7b, 0xf9, 0xaa, 0xa1, 0xfd, 0xe7, 0x55, + 0x43, 0xfb, 0xd5, 0xeb, 0x46, 0xe5, 0xe5, 0xeb, 0x46, 0xe5, 0x9f, 0xaf, 0x1b, 0x95, 0x1f, 0x7e, + 0xd8, 0xa6, 0xfc, 0x38, 0x6a, 0x35, 0x6d, 0xe6, 0x65, 0x83, 0xd7, 0xfd, 0xe0, 0x89, 0xb8, 0xf0, + 0x8d, 0x9e, 0xe4, 0x4c, 0x06, 0x94, 0x9f, 0x77, 0x48, 0xd8, 0xba, 0x2e, 0xc4, 0xef, 0x7f, 0x1d, + 0x00, 0x00, 0xff, 0xff, 0x04, 0xfd, 0x8b, 0xa4, 0x91, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2355,6 +2381,24 @@ func (m *StreamOrderbookUpdatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, _ = i var l int _ = l + if len(m.MarketIds) > 0 { + dAtA12 := make([]byte, len(m.MarketIds)*10) + var j11 int + for _, num := range m.MarketIds { + for num >= 1<<7 { + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + dAtA12[j11] = uint8(num) + j11++ + } + i -= j11 + copy(dAtA[i:], dAtA12[:j11]) + i = encodeVarintQuery(dAtA, i, uint64(j11)) + i-- + dAtA[i] = 0x1a + } if len(m.SubaccountIds) > 0 { for iNdEx := len(m.SubaccountIds) - 1; iNdEx >= 0; iNdEx-- { { @@ -2370,20 +2414,20 @@ func (m *StreamOrderbookUpdatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, } } if len(m.ClobPairId) > 0 { - dAtA12 := make([]byte, len(m.ClobPairId)*10) - var j11 int + dAtA14 := make([]byte, len(m.ClobPairId)*10) + var j13 int for _, num := range m.ClobPairId { for num >= 1<<7 { - dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + dAtA14[j13] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j11++ + j13++ } - dAtA12[j11] = uint8(num) - j11++ + dAtA14[j13] = uint8(num) + j13++ } - i -= j11 - copy(dAtA[i:], dAtA12[:j11]) - i = encodeVarintQuery(dAtA, i, uint64(j11)) + i -= j13 + copy(dAtA[i:], dAtA14[:j13]) + i = encodeVarintQuery(dAtA, i, uint64(j13)) i-- dAtA[i] = 0xa } @@ -2553,6 +2597,27 @@ func (m *StreamUpdate_SubaccountUpdate) MarshalToSizedBuffer(dAtA []byte) (int, } return len(dAtA) - i, nil } +func (m *StreamUpdate_PriceUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamUpdate_PriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PriceUpdate != nil { + { + size, err := m.PriceUpdate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + return len(dAtA) - i, nil +} func (m *StreamOrderbookUpdate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2621,20 +2686,20 @@ func (m *StreamOrderbookFill) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.FillAmounts) > 0 { - dAtA18 := make([]byte, len(m.FillAmounts)*10) - var j17 int + dAtA21 := make([]byte, len(m.FillAmounts)*10) + var j20 int for _, num := range m.FillAmounts { for num >= 1<<7 { - dAtA18[j17] = uint8(uint64(num)&0x7f | 0x80) + dAtA21[j20] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j17++ + j20++ } - dAtA18[j17] = uint8(num) - j17++ + dAtA21[j20] = uint8(num) + j20++ } - i -= j17 - copy(dAtA[i:], dAtA18[:j17]) - i = encodeVarintQuery(dAtA, i, uint64(j17)) + i -= j20 + copy(dAtA[i:], dAtA21[:j20]) + i = encodeVarintQuery(dAtA, i, uint64(j20)) i-- dAtA[i] = 0x1a } @@ -3014,6 +3079,13 @@ func (m *StreamOrderbookUpdatesRequest) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if len(m.MarketIds) > 0 { + l = 0 + for _, e := range m.MarketIds { + l += sovQuery(uint64(e)) + } + n += 1 + sovQuery(uint64(l)) + l + } return n } @@ -3098,6 +3170,18 @@ func (m *StreamUpdate_SubaccountUpdate) Size() (n int) { } return n } +func (m *StreamUpdate_PriceUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PriceUpdate != nil { + l = m.PriceUpdate.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} func (m *StreamOrderbookUpdate) Size() (n int) { if m == nil { return 0 @@ -4612,6 +4696,82 @@ func (m *StreamOrderbookUpdatesRequest) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + 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.MarketIds = append(m.MarketIds, 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.MarketIds) == 0 { + m.MarketIds = 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.MarketIds = append(m.MarketIds, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field MarketIds", wireType) + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4924,6 +5084,41 @@ func (m *StreamUpdate) Unmarshal(dAtA []byte) error { } m.UpdateMessage = &StreamUpdate_SubaccountUpdate{v} iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types1.StreamPriceUpdate{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.UpdateMessage = &StreamUpdate_PriceUpdate{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -5023,7 +5218,7 @@ func (m *StreamOrderbookUpdate) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Updates = append(m.Updates, types1.OffChainUpdateV1{}) + m.Updates = append(m.Updates, types2.OffChainUpdateV1{}) if err := m.Updates[len(m.Updates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/protocol/x/clob/types/streaming.pb.go b/protocol/x/clob/types/streaming.pb.go index 1f6f552fb3..68bb706ca7 100644 --- a/protocol/x/clob/types/streaming.pb.go +++ b/protocol/x/clob/types/streaming.pb.go @@ -6,6 +6,7 @@ package types import ( fmt "fmt" proto "github.com/cosmos/gogoproto/proto" + types1 "github.com/dydxprotocol/v4-chain/protocol/x/prices/types" types "github.com/dydxprotocol/v4-chain/protocol/x/subaccounts/types" io "io" math "math" @@ -31,6 +32,7 @@ type StagedFinalizeBlockEvent struct { // *StagedFinalizeBlockEvent_OrderFill // *StagedFinalizeBlockEvent_SubaccountUpdate // *StagedFinalizeBlockEvent_OrderbookUpdate + // *StagedFinalizeBlockEvent_PriceUpdate Event isStagedFinalizeBlockEvent_Event `protobuf_oneof:"event"` } @@ -82,10 +84,14 @@ type StagedFinalizeBlockEvent_SubaccountUpdate struct { type StagedFinalizeBlockEvent_OrderbookUpdate struct { OrderbookUpdate *StreamOrderbookUpdate `protobuf:"bytes,3,opt,name=orderbook_update,json=orderbookUpdate,proto3,oneof" json:"orderbook_update,omitempty"` } +type StagedFinalizeBlockEvent_PriceUpdate struct { + PriceUpdate *types1.StreamPriceUpdate `protobuf:"bytes,4,opt,name=price_update,json=priceUpdate,proto3,oneof" json:"price_update,omitempty"` +} func (*StagedFinalizeBlockEvent_OrderFill) isStagedFinalizeBlockEvent_Event() {} func (*StagedFinalizeBlockEvent_SubaccountUpdate) isStagedFinalizeBlockEvent_Event() {} func (*StagedFinalizeBlockEvent_OrderbookUpdate) isStagedFinalizeBlockEvent_Event() {} +func (*StagedFinalizeBlockEvent_PriceUpdate) isStagedFinalizeBlockEvent_Event() {} func (m *StagedFinalizeBlockEvent) GetEvent() isStagedFinalizeBlockEvent_Event { if m != nil { @@ -115,12 +121,20 @@ func (m *StagedFinalizeBlockEvent) GetOrderbookUpdate() *StreamOrderbookUpdate { return nil } +func (m *StagedFinalizeBlockEvent) GetPriceUpdate() *types1.StreamPriceUpdate { + if x, ok := m.GetEvent().(*StagedFinalizeBlockEvent_PriceUpdate); ok { + return x.PriceUpdate + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*StagedFinalizeBlockEvent) XXX_OneofWrappers() []interface{} { return []interface{}{ (*StagedFinalizeBlockEvent_OrderFill)(nil), (*StagedFinalizeBlockEvent_SubaccountUpdate)(nil), (*StagedFinalizeBlockEvent_OrderbookUpdate)(nil), + (*StagedFinalizeBlockEvent_PriceUpdate)(nil), } } @@ -131,26 +145,29 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/clob/streaming.proto", fileDescriptor_cecf6ffcf2554dee) } var fileDescriptor_cecf6ffcf2554dee = []byte{ - // 303 bytes of a gzipped FileDescriptorProto + // 339 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xa9, 0x4c, 0xa9, 0x28, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x4f, 0xce, 0xc9, 0x4f, 0xd2, 0x2f, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0xcd, 0xcc, 0x4b, 0xd7, 0x03, 0x8b, 0x0b, 0x09, 0x22, 0x2b, 0xd1, 0x03, 0x29, 0x91, 0xd2, 0x40, 0xd1, 0x55, 0x5c, 0x9a, 0x94, 0x98, 0x9c, 0x9c, 0x5f, 0x9a, 0x57, 0x52, - 0x8c, 0xae, 0x59, 0x4a, 0x16, 0xd3, 0xfc, 0xc2, 0xd2, 0xd4, 0xa2, 0x4a, 0x88, 0xb4, 0xd2, 0x12, - 0x26, 0x2e, 0x89, 0xe0, 0x92, 0xc4, 0xf4, 0xd4, 0x14, 0xb7, 0xcc, 0xbc, 0xc4, 0x9c, 0xcc, 0xaa, - 0x54, 0xa7, 0x9c, 0xfc, 0xe4, 0x6c, 0xd7, 0xb2, 0xd4, 0xbc, 0x12, 0x21, 0x77, 0x2e, 0xae, 0xfc, - 0xa2, 0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0xbc, 0x6c, 0x00, 0x02, 0x00, 0x00, + 0x8c, 0xae, 0x59, 0x4a, 0x19, 0x45, 0x65, 0x41, 0x51, 0x66, 0x72, 0x2a, 0xa6, 0x22, 0x59, 0x4c, + 0x47, 0x14, 0x96, 0xa6, 0x16, 0x55, 0x42, 0xa4, 0x95, 0x3e, 0x32, 0x71, 0x49, 0x04, 0x97, 0x24, + 0xa6, 0xa7, 0xa6, 0xb8, 0x65, 0xe6, 0x25, 0xe6, 0x64, 0x56, 0xa5, 0x3a, 0xe5, 0xe4, 0x27, 0x67, + 0xbb, 0x96, 0xa5, 0xe6, 0x95, 0x08, 0xb9, 0x73, 0x71, 0xe5, 0x17, 0xa5, 0xa4, 0x16, 0xc5, 0xa7, + 0x65, 0xe6, 0xe4, 0x48, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0xa9, 0xe9, 0x61, 0x38, 0x59, 0x2f, + 0x18, 0x6c, 0xa7, 0x3f, 0x48, 0x69, 0x52, 0x7e, 0x7e, 0xb6, 0x5b, 0x66, 0x4e, 0x8e, 0x07, 0x43, + 0x10, 0x27, 0x58, 0x2f, 0x88, 0x23, 0x14, 0xcf, 0x25, 0x88, 0xf0, 0x48, 0x7c, 0x69, 0x41, 0x4a, + 0x62, 0x49, 0xaa, 0x04, 0x13, 0xd8, 0x3c, 0x03, 0x54, 0xf3, 0x90, 0xfc, 0x0b, 0x35, 0x36, 0x18, + 0x2e, 0x12, 0x0a, 0xd6, 0xe7, 0xc1, 0x10, 0x24, 0x50, 0x8c, 0x26, 0x26, 0x14, 0xca, 0x25, 0x90, + 0x0f, 0xb3, 0x1e, 0x66, 0x3e, 0x33, 0xd8, 0x7c, 0x0d, 0xc2, 0xee, 0x85, 0x9b, 0xcb, 0x9f, 0x8f, + 0x2a, 0x24, 0xe4, 0xcd, 0xc5, 0x03, 0x0e, 0x56, 0x98, 0x91, 0x2c, 0xd8, 0x82, 0x00, 0x12, 0xf0, + 0x50, 0x43, 0x03, 0x40, 0x1c, 0xb8, 0x81, 0xdc, 0x05, 0x08, 0xae, 0x13, 0x3b, 0x17, 0x6b, 0x2a, + 0x28, 0x58, 0x9d, 0x02, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, + 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x2c, + 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x25, 0xde, 0xca, 0x4c, 0x74, + 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0xe1, 0x22, 0x15, 0x90, 0xb8, 0x2c, 0xa9, 0x2c, 0x48, 0x2d, + 0x4e, 0x62, 0x03, 0x0b, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x8f, 0x58, 0x41, 0x72, + 0x02, 0x00, 0x00, } func (m *StagedFinalizeBlockEvent) Marshal() (dAtA []byte, err error) { @@ -248,6 +265,27 @@ func (m *StagedFinalizeBlockEvent_OrderbookUpdate) MarshalToSizedBuffer(dAtA []b } return len(dAtA) - i, nil } +func (m *StagedFinalizeBlockEvent_PriceUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StagedFinalizeBlockEvent_PriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.PriceUpdate != nil { + { + size, err := m.PriceUpdate.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStreaming(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} func encodeVarintStreaming(dAtA []byte, offset int, v uint64) int { offset -= sovStreaming(v) base := offset @@ -307,6 +345,18 @@ func (m *StagedFinalizeBlockEvent_OrderbookUpdate) Size() (n int) { } return n } +func (m *StagedFinalizeBlockEvent_PriceUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PriceUpdate != nil { + l = m.PriceUpdate.Size() + n += 1 + l + sovStreaming(uint64(l)) + } + return n +} func sovStreaming(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 @@ -448,6 +498,41 @@ func (m *StagedFinalizeBlockEvent) Unmarshal(dAtA []byte) error { } m.Event = &StagedFinalizeBlockEvent_OrderbookUpdate{v} iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceUpdate", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStreaming + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStreaming + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStreaming + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &types1.StreamPriceUpdate{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Event = &StagedFinalizeBlockEvent_PriceUpdate{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipStreaming(dAtA[iNdEx:]) diff --git a/protocol/x/prices/types/streaming.pb.go b/protocol/x/prices/types/streaming.pb.go new file mode 100644 index 0000000000..64dedb5aee --- /dev/null +++ b/protocol/x/prices/types/streaming.pb.go @@ -0,0 +1,405 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: dydxprotocol/prices/streaming.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// StreamPriceUpdate provides information on a price update. +type StreamPriceUpdate struct { + // The `Id` of the `Market`. + MarketId uint32 `protobuf:"varint,1,opt,name=market_id,json=marketId,proto3" json:"market_id,omitempty"` + // The updated price. + Price MarketPrice `protobuf:"bytes,2,opt,name=price,proto3" json:"price"` + // Snapshot indicates if the response is from a snapshot of the price. + Snapshot bool `protobuf:"varint,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"` +} + +func (m *StreamPriceUpdate) Reset() { *m = StreamPriceUpdate{} } +func (m *StreamPriceUpdate) String() string { return proto.CompactTextString(m) } +func (*StreamPriceUpdate) ProtoMessage() {} +func (*StreamPriceUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_4061dbad169b98fa, []int{0} +} +func (m *StreamPriceUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StreamPriceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StreamPriceUpdate.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 *StreamPriceUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamPriceUpdate.Merge(m, src) +} +func (m *StreamPriceUpdate) XXX_Size() int { + return m.Size() +} +func (m *StreamPriceUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_StreamPriceUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamPriceUpdate proto.InternalMessageInfo + +func (m *StreamPriceUpdate) GetMarketId() uint32 { + if m != nil { + return m.MarketId + } + return 0 +} + +func (m *StreamPriceUpdate) GetPrice() MarketPrice { + if m != nil { + return m.Price + } + return MarketPrice{} +} + +func (m *StreamPriceUpdate) GetSnapshot() bool { + if m != nil { + return m.Snapshot + } + return false +} + +func init() { + proto.RegisterType((*StreamPriceUpdate)(nil), "dydxprotocol.prices.StreamPriceUpdate") +} + +func init() { + proto.RegisterFile("dydxprotocol/prices/streaming.proto", fileDescriptor_4061dbad169b98fa) +} + +var fileDescriptor_4061dbad169b98fa = []byte{ + // 250 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xa9, 0x4c, 0xa9, + 0x28, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x2f, 0x28, 0xca, 0x4c, 0x4e, 0x2d, 0xd6, + 0x2f, 0x2e, 0x29, 0x4a, 0x4d, 0xcc, 0xcd, 0xcc, 0x4b, 0xd7, 0x03, 0xcb, 0x08, 0x09, 0x23, 0x2b, + 0xd2, 0x83, 0x28, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x0b, 0xea, 0x83, 0x58, 0x10, 0xa5, + 0x52, 0x6a, 0xd8, 0xcc, 0xcb, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0x89, 0x07, 0xf3, 0x20, 0xea, 0x94, + 0xba, 0x18, 0xb9, 0x04, 0x83, 0xc1, 0xd6, 0x04, 0x80, 0x44, 0x43, 0x0b, 0x52, 0x12, 0x4b, 0x52, + 0x85, 0xa4, 0xb9, 0x38, 0xa1, 0x6a, 0x33, 0x53, 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x83, 0x38, + 0x20, 0x02, 0x9e, 0x29, 0x42, 0x36, 0x5c, 0xac, 0x60, 0x13, 0x24, 0x98, 0x14, 0x18, 0x35, 0xb8, + 0x8d, 0x14, 0xf4, 0xb0, 0xb8, 0x4a, 0xcf, 0x17, 0xac, 0x1a, 0x6c, 0xa6, 0x13, 0xcb, 0x89, 0x7b, + 0xf2, 0x0c, 0x41, 0x10, 0x4d, 0x42, 0x52, 0x5c, 0x1c, 0xc5, 0x79, 0x89, 0x05, 0xc5, 0x19, 0xf9, + 0x25, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0x1c, 0x41, 0x70, 0xbe, 0x53, 0xd0, 0x89, 0x47, 0x72, 0x8c, + 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, + 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44, 0x59, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, + 0xe7, 0xea, 0xa3, 0xf8, 0xac, 0xcc, 0x44, 0x37, 0x39, 0x23, 0x31, 0x33, 0x4f, 0x1f, 0x2e, 0x52, + 0x01, 0xf3, 0x6d, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x58, 0xc2, 0x18, 0x10, 0x00, 0x00, + 0xff, 0xff, 0xc4, 0xc9, 0xfb, 0xd0, 0x61, 0x01, 0x00, 0x00, +} + +func (m *StreamPriceUpdate) 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 *StreamPriceUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StreamPriceUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Snapshot { + i-- + if m.Snapshot { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x18 + } + { + size, err := m.Price.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintStreaming(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.MarketId != 0 { + i = encodeVarintStreaming(dAtA, i, uint64(m.MarketId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintStreaming(dAtA []byte, offset int, v uint64) int { + offset -= sovStreaming(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StreamPriceUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.MarketId != 0 { + n += 1 + sovStreaming(uint64(m.MarketId)) + } + l = m.Price.Size() + n += 1 + l + sovStreaming(uint64(l)) + if m.Snapshot { + n += 2 + } + return n +} + +func sovStreaming(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozStreaming(x uint64) (n int) { + return sovStreaming(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *StreamPriceUpdate) 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 ErrIntOverflowStreaming + } + 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: StreamPriceUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StreamPriceUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MarketId", wireType) + } + m.MarketId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStreaming + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MarketId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStreaming + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthStreaming + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthStreaming + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Snapshot", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowStreaming + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Snapshot = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipStreaming(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthStreaming + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipStreaming(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStreaming + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStreaming + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowStreaming + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthStreaming + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupStreaming + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthStreaming + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthStreaming = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowStreaming = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupStreaming = fmt.Errorf("proto: unexpected end of group") +)