-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GRPC Full node streaming - batching protos #1626
Conversation
WalkthroughThe recent changes involve restructuring and renaming fields within several interfaces and messages related to order book updates in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range and nitpick comments (1)
indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts (1)
Line range hint
325-346
: Clarify snapshot handling in comments.The comment regarding the snapshot handling in
StreamOrderbookUpdate
has been clarified. This is a good improvement as it enhances the understandability of the code. It's important that such clarifications are accurate and reflect the intended functionality accurately. Consider adding examples or more detailed explanations if the process is complex.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
protocol/x/clob/types/query.pb.go
is excluded by!**/*.pb.go
Files selected for processing (3)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts (15 hunks)
- proto/dydxprotocol/clob/query.proto (4 hunks)
- protocol/streaming/grpc/grpc_streaming_manager.go (3 hunks)
Additional comments not posted (6)
protocol/streaming/grpc/grpc_streaming_manager.go (2)
130-131
: The changes correctly setBlockHeight
andExecMode
within theStreamUpdate
struct, aligning with the PR objectives.
169-170
: The changes correctly setBlockHeight
andExecMode
within theStreamUpdate
struct, aligning with the PR objectives.proto/dydxprotocol/clob/query.proto (3)
173-173
: The changes toStreamOrderbookUpdatesResponse
correctly reflect the removal ofblock_height
andexec_mode
, aligning with the PR objectives.
188-191
: The addition ofblock_height
andexec_mode
toStreamUpdate
is correctly implemented, aligning with the PR objectives.
204-204
: The clarification in the comment about thesnapshot
field enhances understanding and aligns with best practices for clear documentation.indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/query.ts (1)
Line range hint
360-381
: Ensure consistency in naming conventions.The changes in
StreamOrderbookFill
and its SDK type counterpart maintain consistency in naming conventions (clobMatch
vsclob_match
). This consistency is crucial for maintaining readability and preventing errors in data handling between different layers of the application.
/** Batch of updates for the clob pair. */ | ||
updates: StreamUpdate[]; | ||
/** | ||
* ---Additional fields used to debug issues--- | ||
* Block height of the updates. | ||
*/ | ||
|
||
blockHeight: number; | ||
/** Exec mode of the updates. */ | ||
|
||
execMode: number; | ||
} | ||
/** | ||
* StreamOrderbookUpdatesResponse is a response message for the | ||
* StreamOrderbookUpdates method. | ||
*/ | ||
|
||
export interface StreamOrderbookUpdatesResponseSDKType { | ||
/** Orderbook updates for the clob pair. */ | ||
/** Batch of updates for the clob pair. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor to centralize block height and exec mode data.
The restructuring of blockHeight
and execMode
from StreamOrderbookUpdatesResponse
to StreamUpdate
centralizes these properties, which could simplify data management and potentially improve data consistency across different parts of the system. Ensure that all parts of the system that interact with these properties are updated accordingly to accommodate this change.
Also applies to: 290-310
Shift the debug fields of exec mode and block height one layer deeper
Summary by CodeRabbit
New Features
blockHeight
andexecMode
to provide more detailed information.Improvements
Documentation
snapshot
field in order book updates.