-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat(helix-57): add stream account data rpc #221
Conversation
WalkthroughThe recent updates span multiple proto files, introducing new functionalities and refining existing ones. Key highlights include a comprehensive 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: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (40)
exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go
is excluded by!**/*.pb.go
exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/accounts_rpc/pb/injective_accounts_rpc.pb.go
is excluded by!**/*.pb.go
exchange/accounts_rpc/pb/injective_accounts_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.pb.go
is excluded by!**/*.pb.go
exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/auction_rpc/pb/injective_auction_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.pb.go
is excluded by!**/*.pb.go
exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/campaign_rpc/pb/injective_campaign_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.pb.go
is excluded by!**/*.pb.go
exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.pb.go
is excluded by!**/*.pb.go
exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/exchange_rpc/pb/injective_exchange_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.pb.go
is excluded by!**/*.pb.go
exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/explorer_rpc/pb/injective_explorer_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.pb.go
is excluded by!**/*.pb.go
exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/insurance_rpc/pb/injective_insurance_rpc.pb.go
is excluded by!**/*.pb.go
exchange/insurance_rpc/pb/injective_insurance_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.pb.go
is excluded by!**/*.pb.go
exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/meta_rpc/pb/injective_meta_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.pb.go
is excluded by!**/*.pb.go
exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/oracle_rpc/pb/injective_oracle_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.pb.go
is excluded by!**/*.pb.go
exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/portfolio_rpc/pb/injective_portfolio_rpc.pb.go
is excluded by!**/*.pb.go
exchange/portfolio_rpc/pb/injective_portfolio_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.pb.go
is excluded by!**/*.pb.go
exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.pb.go
is excluded by!**/*.pb.go
exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/trading_rpc/pb/injective_trading_rpc.pb.go
is excluded by!**/*.pb.go
exchange/trading_rpc/pb/injective_trading_rpc.pb.gw.go
is excluded by!**/*.pb.gw.go
Files selected for processing (13)
- exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (1 hunks)
- exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.proto (1 hunks)
- exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.proto (5 hunks)
- exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.proto (2 hunks)
- exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.proto (2 hunks)
- exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.proto (3 hunks)
- exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.proto (3 hunks)
- exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.proto (1 hunks)
- exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.proto (1 hunks)
- exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.proto (3 hunks)
- exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.proto (1 hunks)
- exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.proto (3 hunks)
- exchange/trading_rpc/pb/injective_trading_rpc_grpc.pb_mock.go (1 hunks)
Files not reviewed due to errors (1)
- exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.proto (no review received)
Files skipped from review due to trivial changes (7)
- exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.proto
- exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.proto
- exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.proto
- exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.proto
- exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.proto
- exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.proto
- exchange/trading_rpc/pb/injective_trading_rpc_grpc.pb_mock.go
Additional comments not posted (19)
exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.proto (3)
18-19
: Addition of theFund
RPC method looks good.
71-74
: TheFundRequest
message is well-defined.
76-79
: TheFundResponse
message is well-defined.exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.proto (3)
16-17
: Addition of theTokenHolders
RPC method looks good.
26-32
: TheTokenHoldersRequest
message is well-defined.
34-45
: TheTokenHoldersResponse
andHolder
messages are well-defined.exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.proto (3)
39-42
: The new fields in theListTradingStrategiesRequest
message are well-defined.
103-117
: The new fields in theTradingStrategy
message are well-defined.
120-124
: TheExitConfig
message is well-defined.exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.proto (4)
37-38
: The new field in theRankingRequest
message is well-defined.
66-80
: The new fields in theCampaign
message are well-defined.
108-109
: The new field in theCampaignUser
message is well-defined.
139-140
: The new field in theCampaignsResponse
message is well-defined.exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (6)
1-38
: The file header and service definition look good. The new RPC methods are well-documented and comprehensive.
40-48
: ThePortfolioRequest
andPortfolioResponse
message types are well-defined and include all necessary fields.
74-83
: TheOrderStatesRequest
andOrderStatesResponse
message types are well-defined and include all necessary fields.
113-120
: TheSubaccountsListRequest
andSubaccountsListResponse
message types are well-defined and include all necessary fields.
162-174
: TheStreamSubaccountBalance
RPC method and related message types are well-defined and include all necessary fields.
278-289
: TheStreamAccountData
RPC method and related message types are well-defined and include all necessary fields.
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: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go
is excluded by!**/*.pb.go
Files selected for processing (1)
- exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto
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: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go
is excluded by!**/*.pb.go
Files selected for processing (1)
- exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.proto
@proofofze Is there an urgent issue or other reason to create a PR pointing to |
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.
LGTM
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: 6
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (24)
exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc.pb.go
is excluded by!**/*.pb.go
exchange/accounts_rpc/pb/goadesign_goagen_injective_accounts_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc.pb.go
is excluded by!**/*.pb.go
exchange/auction_rpc/pb/goadesign_goagen_injective_auction_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc.pb.go
is excluded by!**/*.pb.go
exchange/campaign_rpc/pb/goadesign_goagen_injective_campaign_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc.pb.go
is excluded by!**/*.pb.go
exchange/derivative_exchange_rpc/pb/goadesign_goagen_injective_derivative_exchange_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc.pb.go
is excluded by!**/*.pb.go
exchange/exchange_rpc/pb/goadesign_goagen_injective_exchange_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc.pb.go
is excluded by!**/*.pb.go
exchange/explorer_rpc/pb/goadesign_goagen_injective_explorer_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc.pb.go
is excluded by!**/*.pb.go
exchange/insurance_rpc/pb/goadesign_goagen_injective_insurance_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc.pb.go
is excluded by!**/*.pb.go
exchange/meta_rpc/pb/goadesign_goagen_injective_meta_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc.pb.go
is excluded by!**/*.pb.go
exchange/oracle_rpc/pb/goadesign_goagen_injective_oracle_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc.pb.go
is excluded by!**/*.pb.go
exchange/portfolio_rpc/pb/goadesign_goagen_injective_portfolio_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc.pb.go
is excluded by!**/*.pb.go
exchange/spot_exchange_rpc/pb/goadesign_goagen_injective_spot_exchange_rpc_grpc.pb.go
is excluded by!**/*.pb.go
exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc.pb.go
is excluded by!**/*.pb.go
exchange/trading_rpc/pb/goadesign_goagen_injective_trading_rpc_grpc.pb.go
is excluded by!**/*.pb.go
Files selected for processing (12)
- exchange/accounts_rpc/pb/injective_accounts_rpc.proto (3 hunks)
- exchange/auction_rpc/pb/injective_auction_rpc.proto (1 hunks)
- exchange/campaign_rpc/pb/injective_campaign_rpc.proto (5 hunks)
- exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto (2 hunks)
- exchange/exchange_rpc/pb/injective_exchange_rpc.proto (2 hunks)
- exchange/explorer_rpc/pb/injective_explorer_rpc.proto (3 hunks)
- exchange/insurance_rpc/pb/injective_insurance_rpc.proto (3 hunks)
- exchange/meta_rpc/pb/injective_meta_rpc.proto (1 hunks)
- exchange/oracle_rpc/pb/injective_oracle_rpc.proto (1 hunks)
- exchange/portfolio_rpc/pb/injective_portfolio_rpc.proto (3 hunks)
- exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto (1 hunks)
- exchange/trading_rpc/pb/injective_trading_rpc.proto (3 hunks)
Files not summarized due to errors (1)
- exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto: Error: Server error. Please try again later.
Files not reviewed due to errors (2)
- exchange/accounts_rpc/pb/injective_accounts_rpc.proto (Error: Server error. Please try again later.)
- exchange/explorer_rpc/pb/injective_explorer_rpc.proto (Error: Server error. Please try again later.)
Files skipped from review due to trivial changes (5)
- exchange/auction_rpc/pb/injective_auction_rpc.proto
- exchange/exchange_rpc/pb/injective_exchange_rpc.proto
- exchange/meta_rpc/pb/injective_meta_rpc.proto
- exchange/oracle_rpc/pb/injective_oracle_rpc.proto
- exchange/spot_exchange_rpc/pb/injective_spot_exchange_rpc.proto
Additional comments not posted (9)
exchange/insurance_rpc/pb/injective_insurance_rpc.proto (2)
1-1
: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.
71-79
: New message typesFundRequest
andFundResponse
introduced for theFund
RPC method. Verify that these types are properly handled in the backend logic and unit tests.exchange/portfolio_rpc/pb/injective_portfolio_rpc.proto (2)
1-1
: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.
26-45
: New message typesTokenHoldersRequest
,TokenHoldersResponse
, andHolder
introduced for theTokenHolders
RPC method. Verify these are properly implemented and tested.exchange/trading_rpc/pb/injective_trading_rpc.proto (2)
1-1
: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.
103-118
: Introduced new fields and message types inTradingStrategy
to handle exit strategies and configurations. This is a significant change; ensure all related components are updated and tested.exchange/campaign_rpc/pb/injective_campaign_rpc.proto (2)
1-1
: Updated to goa v3.7.0 as per the protocol buffer definition files update across the repository.
66-80
: Significant changes in theCampaign
message with new fields and renaming. This requires careful integration to ensure data consistency and correct functionality.exchange/derivative_exchange_rpc/pb/injective_derivative_exchange_rpc.proto (1)
673-673
: Updated the comment for clarity and consistency.
// Funds returns an insurance fund for a given insurance fund token denom. | ||
rpc Fund (FundRequest) returns (FundResponse); |
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.
New RPC method Fund
introduced to retrieve insurance funds for specific tokens. Ensure corresponding backend logic and unit tests are implemented.
// Provide a list of addresses holding a specific token | ||
rpc TokenHolders (TokenHoldersRequest) returns (TokenHoldersResponse); |
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.
Introduced new RPC method TokenHolders
to provide a list of addresses holding specific tokens. Ensure backend logic and unit tests are updated accordingly.
// Filter by strategy type | ||
repeated string strategy_type = 10; | ||
// Filter by market type | ||
string market_type = 11; |
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.
Introduced new fields in ListTradingStrategiesRequest
to filter by strategy type and market type. Ensure these fields are utilized correctly in the backend logic.
// Contract address that manages the round and reward | ||
string contract_address = 6; |
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.
Introduced a new field contract_address
in RankingRequest
to specify the contract managing the round and reward. Confirm this field is utilized correctly in the backend.
// Round ID, if not specified, it will return latest roundId | ||
sint64 round_id = 1; | ||
// Address of login account, if not specified it will return no user rewards | ||
string account_address = 2; | ||
// This will return campaign x where x.roundId <= toRoundId. Useful for listing | ||
// multiple rounds | ||
sint32 to_round_id = 3; | ||
// Contract address that manages the round and reward | ||
string contract_address = 4; |
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.
New fields introduced in CampaignsRequest
to handle multiple rounds and rewards management. Ensure these fields are correctly implemented and integrated.
repeated Coin accumulated_rewards = 2; | ||
sint32 reward_count = 3; |
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.
Tip
Codebase Verification
The renaming from account_rewards
to accumulated_rewards
in CampaignsResponse
has been implemented correctly in the exchange/campaign_rpc/pb/injective_campaign_rpc.proto
file. However, there is still a reference to account_rewards
in proto/injective/exchange/v1beta1/events.proto
.
exchange/campaign_rpc/pb/injective_campaign_rpc.proto
:repeated Coin accumulated_rewards = 2;
proto/injective/exchange/v1beta1/events.proto
:repeated AccountRewards account_rewards = 1;
Please ensure that the reference in proto/injective/exchange/v1beta1/events.proto
is reviewed and updated if necessary.
Analysis chain
Renamed field account_rewards
to accumulated_rewards
in CampaignsResponse
. Verify that this change is reflected in all relevant parts of the application.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the renaming from `account_rewards` to `accumulated_rewards` in `CampaignsResponse`.
# Test: Search for the use of `accumulated_rewards`.
rg --type proto $'accumulated_rewards'
Length of output: 67
Script:
#!/bin/bash
# Description: Verify the renaming from `account_rewards` to `accumulated_rewards` in `CampaignsResponse`.
# Test: Search for the use of `accumulated_rewards`.
rg 'accumulated_rewards' --glob '*.proto'
# Test: Search for the use of `account_rewards` to ensure it has been fully replaced.
rg 'account_rewards' --glob '*.proto'
Length of output: 266
Summary by CodeRabbit
New Features
Updates
goa v3.7.0
.sequence
field in transaction preparation requests.Enhancements