Skip to content
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

[CLOB-1036] organizational update for liquidation daemon #855

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

jayy04
Copy link
Contributor

@jayy04 jayy04 commented Dec 7, 2023

Changelist

  • No functional change, only organizational update

Test Plan

[Describe how this PR was tested (if applicable)]

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If the PR has breaking postgres changes to the indexer add the indexer-postgres-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Copy link

linear bot commented Dec 7, 2023

Copy link
Contributor

coderabbitai bot commented Dec 7, 2023

Walkthrough

The changes involve updates to a Go package that handles liquidation processes in a financial protocol. New functions for querying subaccounts and checking their collateralization status have been added, along with the ability to send liquidatable subaccount IDs to a gRPC server. Additionally, there's been a refactoring effort that includes the removal of certain functions and the streamlining of function calls, as well as minor adjustments to testing imports and telemetry measurements.

Changes

File Path Change Summary
.../liquidation/client/grpc_helper.go Added new functions for querying subaccounts and checking collateralization, and sending IDs to gRPC. Modified an existing function to include telemetry.
.../liquidation/client/grpc_helper_test.go Changed import statements for the "testing" package.
.../liquidation/client/sub_task_runner.go Removed unused imports, refactored the GetAllSubaccounts function call for clarity, and removed several functions related to gRPC interactions.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 834c19c and bb7be8b.
Files selected for processing (3)
  • protocol/daemons/liquidation/client/grpc_helper.go (1 hunks)
  • protocol/daemons/liquidation/client/grpc_helper_test.go (2 hunks)
  • protocol/daemons/liquidation/client/sub_task_runner.go (3 hunks)
Files skipped from review due to trivial changes (1)
  • protocol/daemons/liquidation/client/grpc_helper_test.go
Additional comments: 5
protocol/daemons/liquidation/client/grpc_helper.go (1)
  • 1-155: The changes in grpc_helper.go add new functions and modify existing ones, which is consistent with the summary's mention of significant alterations to the declarations of exported entities. However, the summary also mentions the removal of certain functions from sub_task_runner.go, which is not reflected in the provided code. Ensure that the removal of these functions is intentional and that their responsibilities have been correctly migrated to grpc_helper.go.
protocol/daemons/liquidation/client/sub_task_runner.go (4)
  • 51-55: The summary indicates that the GetAllSubaccounts function was refactored for better readability, which is consistent with the changes seen in the hunk. The parameters are now aligned in a single line, improving the readability of the function call.

  • 52-55: The function GetAllSubaccounts is still being used here, which contradicts the summary that states it was removed. This needs to be clarified as it may impact the understanding of the code changes.

  • 79-80: The summary mentions the removal of the SendLiquidatableSubaccountIds function, but it is still present and being called in the code. This discrepancy needs to be addressed.

  • 82-84: The summary also mentions the removal of the CheckCollateralizationForSubaccounts function, yet it is clearly being used within the GetLiquidatableSubaccountIds function. This is another inconsistency that should be resolved.

@jayy04 jayy04 merged commit fde92cf into main Dec 7, 2023
15 of 16 checks passed
@jayy04 jayy04 deleted the jy/clob-1036 branch December 7, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants