-
Notifications
You must be signed in to change notification settings - Fork 135
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
[CT-645] Move off chain updates and v1 to a different package #1131
Conversation
Note Currently processing new changes in this PR. This may take a few minutes, please wait... Files ignored due to path filters (3)
Files selected for processing (18)
WalkthroughThe overarching change involves a significant update to the package structure within the dYdX Protocol codebase, specifically targeting Go package references for better organization and clarity. This restructure mainly affects the Changes
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (4)
protocol/indexer/events/events.pb.go
is excluded by:!**/*.pb.go
protocol/indexer/off_chain_updates/types/off_chain_updates.pb.go
is excluded by:!**/*.pb.go
protocol/indexer/protocol/v1/types/clob.pb.go
is excluded by:!**/*.pb.go
protocol/indexer/protocol/v1/types/subaccount.pb.go
is excluded by:!**/*.pb.go
Files selected for processing (12)
- proto/dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto (1 hunks)
- proto/dydxprotocol/indexer/protocol/v1/clob.proto (1 hunks)
- proto/dydxprotocol/indexer/protocol/v1/subaccount.proto (1 hunks)
- protocol/indexer/events/perpetual_market_create_test.go (2 hunks)
- protocol/indexer/off_chain_updates/off_chain_updates.go (9 hunks)
- protocol/indexer/off_chain_updates/off_chain_updates_test.go (5 hunks)
- protocol/indexer/protocol/v1/v1_mappers.go (10 hunks)
- protocol/indexer/protocol/v1/v1_mappers_test.go (19 hunks)
- protocol/testutil/memclob/offchain_updates.go (2 hunks)
- protocol/x/clob/keeper/orders.go (2 hunks)
- protocol/x/clob/memclob/memclob.go (12 hunks)
- protocol/x/clob/memclob/memclob_test_util.go (8 hunks)
Additional comments: 62
protocol/indexer/events/perpetual_market_create_test.go (2)
- 6-6: The change in import alias from
v1
tov1types
aligns with the PR's objective of reorganizing packages to avoid circular imports. This is a good practice for maintaining clarity and modularity in the codebase.- 30-30: Using the
v1types
alias to referenceClobPairStatus_CLOB_PAIR_STATUS_ACTIVE
is correct and aligns with the updated import. Ensure that this naming convention is consistently applied across the entire codebase for clarity and maintainability.Verification successful
The verification process, based on the provided script outputs, supports the consistent use of the
v1types
alias in the examined instances within the codebase. The examples show correct usage, and the import path forv1types
is clearly identified, with no evidence of other aliases for this path in the provided context. This suggests that the naming convention is indeed being applied consistently in the areas checked.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify consistent usage of the `v1types` alias across the codebase. rg --type go 'v1types\.' | wc -lLength of output: 37
Script:
#!/bin/bash # Extract a few lines around a subset of `v1types` occurrences to assess usage. rg --type go -C 3 'v1types\.' | head -n 30Length of output: 2372
Script:
#!/bin/bash # Identify the import path associated with `v1types` and search for other aliases for the same path. rg --type go '^import' -A 10 | grep 'v1types' -B 10 -A 1Length of output: 2595
protocol/testutil/memclob/offchain_updates.go (2)
- 9-9: The addition of the
ocutypes
import aligns with the PR's objective of reorganizing packages. This change enhances modularity by clearly separating types into their respective packages.- 32-32: The usage of the
ocutypes
alias to referenceOrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
is correct. Ensure that this constant exists in the newly organized package and that theocutypes
alias is used consistently across the codebase.Verification successful
The verification process has confirmed the existence of the constant
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in the newly organized package, with 20 occurrences found. Additionally, theocutypes
alias is used 53 times across the codebase in Go files, indicating a consistent usage pattern. While this does not definitively prove that every instance of constants from the package uses theocutypes
alias, the evidence suggests a significant and consistent usage. Therefore, the review comment is considered verified based on the provided evidence.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the existence of the referenced constant in the new package. rg --type go 'OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED' | wc -l # Verify consistent usage of the `ocutypes` alias across the codebase. rg --type go 'ocutypes\.' | wc -lLength of output: 120
proto/dydxprotocol/indexer/protocol/v1/subaccount.proto (1)
- 7-7: Updating the
go_package
option to include/types
is consistent with the PR's objective of reorganizing packages to avoid circular imports. Ensure that this change is consistently applied across all relevant proto files.proto/dydxprotocol/indexer/off_chain_updates/off_chain_updates.proto (1)
- 7-7: The update to the
go_package
option inoff_chain_updates.proto
to include/types
aligns with the PR's objectives. Ensure this change is consistently applied across all proto files for clarity and modularity.protocol/indexer/protocol/v1/v1_mappers.go (2)
- 7-7: The update to use the
v1types
package prefix for type references inv1_mappers.go
is consistent with the PR's objectives of reorganizing packages. This enhances clarity and modularity in the codebase.- 94-128: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [14-181]
Throughout
v1_mappers.go
, the usage of thev1types
prefix to reference various types is correct. Ensure that these types exist in thev1types
package and that thev1types
prefix is used consistently across the codebase.proto/dydxprotocol/indexer/protocol/v1/clob.proto (1)
- 7-7: Updating the
go_package
option inclob.proto
to include/types
is consistent with the PR's objectives. Ensure this change is consistently applied across all proto files for clarity and modularity.protocol/indexer/off_chain_updates/off_chain_updates_test.go (9)
- 10-10: The import of
ocutypes
is correctly added to accommodate the new package structure and types for off-chain updates. This change aligns with the PR objectives of reorganizing packages to avoid circular imports and enhancing the orderbook streaming service.- 28-30: The declaration of
status
anddefaultRemovalReason
usingocutypes
ensures consistency with the new package structure. This change is crucial for maintaining type safety and clarity in the context of order removal operations.- 31-34: The initialization of
offchainUpdateOrderPlace
withocutypes.OrderPlaceV1
struct is correctly implemented. This change is part of the enhancements to the orderbook streaming service, ensuring that order place operations use the updated types.- 39-40: The initialization of
offchainUpdateOrderUpdate
withocutypes.OrderUpdateV1
struct is correctly implemented. This update is essential for the correct handling of order update operations within the new streaming service framework.- 47-48: The initialization of
offchainUpdateOrderRemove
withocutypes.OrderRemoveV1
struct is correctly implemented. This change ensures that order removal operations are handled using the updated types, aligning with the PR's objectives to enhance the orderbook streaming service.- 56-57: The initialization of
offchainUpdateOrderRemoveWithDefaultRemovalReason
withocutypes.OrderRemoveV1
struct is correctly implemented. This variant of the order remove operation allows for specifying a default removal reason, enhancing flexibility in order removal scenarios.- 216-216: The declaration and initialization of
actualUpdate
usingocutypes.OffChainUpdateV1
inTestNewOrderPlaceMessage
is correctly implemented. This ensures that the test accurately reflects the changes made to the order place message structure.- 238-238: The declaration and initialization of
actualUpdate
usingocutypes.OffChainUpdateV1
inTestNewOrderUpdateMessage
is correctly implemented. This change is crucial for testing the updated order update message structure within the new streaming service framework.- 260-260: The declaration and initialization of
actualUpdate
usingocutypes.OffChainUpdateV1
inTestNewOrderRemoveMessage
is correctly implemented. This ensures that the test accurately reflects the changes made to the order remove message structure, aligning with the PR's objectives.protocol/indexer/off_chain_updates/off_chain_updates.go (9)
- 12-12: The import of
ocutypes
is correctly added to accommodate the new package structure and types for off-chain updates. This change is essential for the reorganization of packages and the enhancement of the orderbook streaming service.- 118-118: The update of the
removalStatus
parameter type toocutypes.OrderRemoveV1_OrderRemovalStatus
inMustCreateOrderRemoveMessageWithReason
is correctly implemented. This change ensures type consistency and clarity in the context of order removal operations.- 133-133: The update of the
removalStatus
parameter type toocutypes.OrderRemoveV1_OrderRemovalStatus
inCreateOrderRemoveMessageWithReason
is correctly implemented. This change is crucial for maintaining type safety and clarity in the context of order removal operations.- 172-172: The update of the
removalStatus
parameter type toocutypes.OrderRemoveV1_OrderRemovalStatus
inMustCreateOrderRemoveMessage
is correctly implemented. This ensures that the function signature aligns with the updated types, enhancing the clarity and maintainability of the code.- 188-188: The update of the
removalStatus
parameter type toocutypes.OrderRemoveV1_OrderRemovalStatus
inCreateOrderRemoveMessage
is correctly implemented. This change is essential for the correct handling of order removal operations within the new streaming service framework.- 215-215: The update of the
removalStatus
parameter type toocutypes.OrderRemoveV1_OrderRemovalStatus
inCreateOrderRemoveMessageWithDefaultReason
is correctly implemented. This variant of the order remove operation allows for specifying a default removal reason, enhancing flexibility in order removal scenarios.- 248-253: The initialization of
update
withocutypes.OffChainUpdateV1
andocutypes.OrderPlaceV1
innewOrderPlaceMessage
is correctly implemented. This change is part of the enhancements to the orderbook streaming service, ensuring that order place operations use the updated types.- 266-271: The initialization of
update
withocutypes.OffChainUpdateV1
andocutypes.OrderRemoveV1
innewOrderRemoveMessage
is correctly implemented. This ensures that order removal operations are handled using the updated types, aligning with the PR's objectives to enhance the orderbook streaming service.- 289-291: The initialization of
update
withocutypes.OffChainUpdateV1
andocutypes.OrderUpdateV1
innewOrderUpdateMessage
is correctly implemented. This update is essential for the correct handling of order update operations within the new streaming service framework.protocol/indexer/protocol/v1/v1_mappers_test.go (12)
- 9-9: The import alias
v1types
is correctly introduced to reflect the new package structure. This change aligns with the PR objectives of reorganizing packages to avoid circular imports and is consistent with Go best practices for handling package imports and aliases.- 18-18: The renaming of types from
v1
tov1types
within theTestSubaccountIdToIndexerSubaccountId
function is correctly implemented. This change is necessary to reflect the updated package structure and ensures that the test function uses the correct types from the newly organized packages.- 35-35: The changes within
TestPerpetualPositionToIndexerPerpetualPosition
to usev1types
instead ofv1
for type references are correctly applied. This adjustment is part of the broader effort to reorganize the package structure and avoid circular imports, ensuring that the test function aligns with the new structure.- 62-62: The renaming of types within
TestPerpetualPositionsToIndexerPerpetualPositions
to usev1types
is correctly done. This change is consistent with the PR's objective of reorganizing the package structure to improve modularity and maintainability of the codebase.- 133-133: The changes in
TestAssetPositionToIndexerAssetPosition
to usev1types
for type references are correctly implemented. This renaming is part of the package reorganization effort and ensures that the test function is aligned with the updated package structure.- 155-155: The renaming of types within
TestAssetPositionsToIndexerAssetPositions
to usev1types
is correctly applied. This change supports the PR's goal of reorganizing the package structure to enhance the codebase's modularity and scalability.- 197-197: The changes in
TestOrderIdToIndexerOrderId
to usev1types
for type references are correctly implemented. This adjustment is necessary for aligning the test function with the new package structure, reflecting the PR's objectives of improving the codebase's organization.- 220-220: The renaming of types within
TestOrderSideToIndexerOrderSide
to usev1types
is correctly done. This change is part of the broader effort to reorganize the package structure and is consistent with the PR's objectives of enhancing the codebase's modularity.- 250-250: The changes in
TestOrderTimeInForceToIndexerOrderTimeInForce
to usev1types
for type references are correctly implemented. This renaming aligns with the updated package structure and supports the PR's goal of reorganizing packages to improve the codebase's organization.- 280-280: The renaming of types within
TestOrderConditionTypeToIndexerOrderConditionType
to usev1types
is correctly applied. This change is consistent with the PR's objective of reorganizing the package structure to avoid circular imports and enhance the codebase's modularity.- 313-313: The changes in
TestOrderToIndexerOrderV1
to usev1types
for type references are correctly implemented. This adjustment is part of the package reorganization effort and ensures that the test function aligns with the updated package structure, reflecting the PR's objectives.- 389-389: The changes in
TestConvertToClobPairStatus
to usev1types
for type references are correctly implemented. This renaming is necessary for aligning the test function with the new package structure and supports the PR's goal of reorganizing packages to improve the codebase's organization and avoid circular imports.protocol/x/clob/keeper/orders.go (3)
- 16-16: The addition of the
ocutypes
import aligns with the PR's objective to reorganize packages to avoid circular imports and to support the new streaming service for orderbook updates. This change seems correctly implemented and necessary for the updated reference that follows.- 487-487: Updating the reference from
off_chain_updates.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
toocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
is consistent with the PR's goal of reorganizing package structures to improve modularity and avoid circular imports. This change correctly reflects the new package path after movingoff_chain_updates
andv1
to a separate package. Ensure that all other references throughout the codebase are also updated to maintain consistency.- 13-19: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-487]
Given the complexity and critical nature of the operations handled in this file, it's essential to ensure comprehensive test coverage, especially for the newly added or modified functionality. The PR description mentions testing and validation but lacks specific details. It would be beneficial to verify that unit tests and integration tests adequately cover the changes and consider edge cases to ensure the robustness and reliability of the order management system.
protocol/x/clob/memclob/memclob_test_util.go (8)
- 13-13: The import alias
ocutypes
forgithub.jparrowsec.cn/dydxprotocol/v4-chain/protocol/indexer/off_chain_updates/types
is correctly added to accommodate the reorganization of packages. This change aligns with the PR objectives to avoid circular imports and enhance modularity.- 1330-1330: The replacement of
off_chain_updates.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
withocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
correctly reflects the new package structure and aliasing. This change ensures consistency in referencing the constant across the file.- 1359-1359: The usage of
ocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in the context of generating anOrderRemove
message with a specific reason is correctly updated to use the new package alias. This maintains the logical flow and correctness of the code.- 1388-1388: Again, the update to use
ocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
for generating anOrderRemove
message due to undercollateralization is correctly applied. This change is consistent with the reorganization objectives and ensures the code remains functional.- 1446-1446: The consistent use of
ocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
for generating anOrderRemove
message due to a self-trade error further demonstrates the correct application of the package reorganization. This ensures that the codebase remains coherent and modular.- 1545-1545: The application of
ocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in the context of generating anOrderRemove
message for orders crossing with a liquidation order is correctly implemented. This usage aligns with the package reorganization and maintains the integrity of the code.- 1560-1560: The use of
ocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
for generating anOrderRemove
message when an order fails collateralization checks during matching is correctly updated. This change is in line with the reorganization objectives and ensures the code's correctness.- 1479-1479: Lastly, the update to use
ocutypes.OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
for generating anOrderRemove
message when an order placement does not result in an error but has a non-success status is correctly applied. This maintains the logical consistency and functionality of the code.protocol/x/clob/memclob/memclob.go (12)
- 17-17: The import of
ocutypes
fromoff_chain_updates/types
is correctly updated to reflect the new package structure, which is part of the reorganization to avoid circular imports.- 132-132: The update of the reference to
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
fromoff_chain_updates
toocutypes
in theCancelOrder
function is correctly done, aligning with the package reorganization objectives.- 468-468: The reference to
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in thePlaceOrder
function is correctly updated to useocutypes
, which is consistent with the package reorganization and import changes.- 519-519: The usage of
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
fromocutypes
in the error handling part of thePlaceOrder
function is appropriate and follows the new package structure.- 541-541: The reference to
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in thePlaceOrder
function for handling the case where the order has no remaining size after matching is correctly updated to useocutypes
.- 588-588: The update of the reference to
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in thePlaceOrder
function for handling Immediate-or-Cancel orders is correctly done, aligning with the package reorganization.- 623-623: The usage of
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in thePlaceOrder
function for handling the add order to orderbook collateralization check failure is correctly updated to useocutypes
.- 795-795: The reference to
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in themustPerformTakerOrderMatching
function for handling maker orders that failed collateralization checks is correctly updated to useocutypes
.- 1120-1120: The usage of
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in theGenerateOffchainUpdatesForReplayPlaceOrder
helper function is correctly updated to useocutypes
, which is consistent with the package reorganization.- 1271-1271: The reference to
OrderRemoveV1_ORDER_REMOVAL_STATUS_CANCELED
in thePurgeInvalidMemclobState
function for handling expired stateful orders is correctly updated to useocutypes
. It's worth noting that this status differs from the others as it usesORDER_REMOVAL_STATUS_CANCELED
instead ofBEST_EFFORT_CANCELED
, which is appropriate for expired orders.- 1290-1290: The usage of
OrderRemoveV1_ORDER_REMOVAL_STATUS_CANCELED
in thePurgeInvalidMemclobState
function for handling expired Short-Term orders is correctly updated to useocutypes
. This is consistent with the handling of expired stateful orders and aligns with the package reorganization.- 2104-2104: The reference to
OrderRemoveV1_ORDER_REMOVAL_STATUS_BEST_EFFORT_CANCELED
in themaybeCancelReduceOnlyOrders
function for handling the cancellation of reduce-only orders when the position side changes is correctly updated to useocutypes
.
* [CT-645] Add protos for orderbook stream query service * make update not nullable * fix build
* [CT-645] Add protos for orderbook stream query service * move removal reasons to a separate package * [CT-645] Add protos for orderbook stream query service (#1133) * [CT-645] Add protos for orderbook stream query service * make update not nullable * fix build
* [CT-645] Move off chain updates and v1 to a different package (#1131) * [CT-645] Add protos for orderbook stream query service * move removal reasons to a separate package * [CT-645] Add protos for orderbook stream query service (#1133) * [CT-645] Add protos for orderbook stream query service * make update not nullable * fix build * [CT-644] instantiate grpc stream manager (#1134) * [CT-644] instantiate grpc stream manager * update type * update channel type * [CT-646] stream offchain updates through stream manager (#1138) * [CT-646] stream offchain updates through stream manager * comments * fix lint * get rid of finished * comments * comments * [CT-652] add command line flag for full node streaming (#1145) * [CT-647] construct the initial orderbook snapshot (#1147) * [CT-647] construct the initial orderbook snapshot * [CT-647] initialize new streams and send orderbook snapshot (#1152) * [CT-647] initialize new streams and send orderbook snapshot * use sync once * comments * fix test
* [CT-645] Add protos for orderbook stream query service * move removal reasons to a separate package * [CT-645] Add protos for orderbook stream query service (#1133) * [CT-645] Add protos for orderbook stream query service * make update not nullable * fix build
* [CT-645] Move off chain updates and v1 to a different package (#1131) * [CT-645] Add protos for orderbook stream query service * move removal reasons to a separate package * [CT-645] Add protos for orderbook stream query service (#1133) * [CT-645] Add protos for orderbook stream query service * make update not nullable * fix build * [CT-644] instantiate grpc stream manager (#1134) * [CT-644] instantiate grpc stream manager * update type * update channel type * [CT-646] stream offchain updates through stream manager (#1138) * [CT-646] stream offchain updates through stream manager * comments * fix lint * get rid of finished * comments * comments * [CT-652] add command line flag for full node streaming (#1145) * [CT-647] construct the initial orderbook snapshot (#1147) * [CT-647] construct the initial orderbook snapshot * [CT-647] initialize new streams and send orderbook snapshot (#1152) * [CT-647] initialize new streams and send orderbook snapshot * use sync once * comments * [CT-700] separate indexer and grpc streaming events (#1209) * [CT-700] separate indexer and grpc streaming events * fix tests * comments * update * [CT-700] only send response when there is at least one update (#1216) * [CT-712] send order update when short term order state fill amounts are pruned (#1241) * [CT-712] send fill amount updates for reverted operations (#1240) * [CT-723] add block number + stage to grpc updates (#1252) * [CT-723] add block number + stage to grpc updates * add indexer changes * [CT-727] avoid state reads when sending updates (#1261)
* [CT-645] Move off chain updates and v1 to a different package (#1131) * [CT-645] Add protos for orderbook stream query service * move removal reasons to a separate package * [CT-645] Add protos for orderbook stream query service (#1133) * [CT-645] Add protos for orderbook stream query service * make update not nullable * fix build * [CT-644] instantiate grpc stream manager (#1134) * [CT-644] instantiate grpc stream manager * update type * update channel type * [CT-646] stream offchain updates through stream manager (#1138) * [CT-646] stream offchain updates through stream manager * comments * fix lint * get rid of finished * comments * comments * [CT-652] add command line flag for full node streaming (#1145) * [CT-647] construct the initial orderbook snapshot (#1147) * [CT-647] construct the initial orderbook snapshot * [CT-647] initialize new streams and send orderbook snapshot (#1152) * [CT-647] initialize new streams and send orderbook snapshot * use sync once * comments * [CT-700] separate indexer and grpc streaming events (#1209) * [CT-700] separate indexer and grpc streaming events * fix tests * comments * update * [CT-700] only send response when there is at least one update (#1216) * [CT-712] send order update when short term order state fill amounts are pruned (#1241) * [CT-712] send fill amount updates for reverted operations (#1240) * [CT-723] add block number + stage to grpc updates (#1252) * [CT-723] add block number + stage to grpc updates * add indexer changes * [CT-727] avoid state reads when sending updates (#1261)
* [OTE-221] Add query for PendingSendPacket (backport #1176) (#1221) --------- Co-authored-by: Teddy Ding <[email protected]> (cherry picked from commit e545bbf) # Conflicts: # indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts # indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts # indexer/packages/v4-protos/src/codegen/google/bundle.ts # protocol/go.mod * fix protos * update go.mod --------- Co-authored-by: Mohammed Affan <[email protected]> Co-authored-by: affan <[email protected]> * [Backport v4.x] backport full node streaming to v4.x branch (#1270) * [CT-645] Move off chain updates and v1 to a different package (#1131) * [CT-645] Add protos for orderbook stream query service * move removal reasons to a separate package * [CT-645] Add protos for orderbook stream query service (#1133) * [CT-645] Add protos for orderbook stream query service * make update not nullable * fix build * [CT-644] instantiate grpc stream manager (#1134) * [CT-644] instantiate grpc stream manager * update type * update channel type * [CT-646] stream offchain updates through stream manager (#1138) * [CT-646] stream offchain updates through stream manager * comments * fix lint * get rid of finished * comments * comments * [CT-652] add command line flag for full node streaming (#1145) * [CT-647] construct the initial orderbook snapshot (#1147) * [CT-647] construct the initial orderbook snapshot * [CT-647] initialize new streams and send orderbook snapshot (#1152) * [CT-647] initialize new streams and send orderbook snapshot * use sync once * comments * [CT-700] separate indexer and grpc streaming events (#1209) * [CT-700] separate indexer and grpc streaming events * fix tests * comments * update * [CT-700] only send response when there is at least one update (#1216) * [CT-712] send order update when short term order state fill amounts are pruned (#1241) * [CT-712] send fill amount updates for reverted operations (#1240) * [CT-723] add block number + stage to grpc updates (#1252) * [CT-723] add block number + stage to grpc updates * add indexer changes * [CT-727] avoid state reads when sending updates (#1261) * [CT-712] send updates for both normal order matches and liquidation (#1280) (#1281) * Fix lib.ErrorLogWithError: properly pass in args (#1306) (#1310) (cherry picked from commit a91c1ca) Co-authored-by: Jonathan Fung <[email protected]> * fix broken tests (#1312) (#1316) (cherry picked from commit 5ec37d2) Co-authored-by: Jonathan Fung <[email protected]> --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Mohammed Affan <[email protected]> Co-authored-by: affan <[email protected]> Co-authored-by: jayy04 <[email protected]> Co-authored-by: Jonathan Fung <[email protected]>
Changelist
Test Plan
[Describe how this PR was tested (if applicable)]
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.