-
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
[TRA-513] Deprecate exchange config json and min exchanges #2524
[TRA-513] Deprecate exchange config json and min exchanges #2524
Conversation
WalkthroughThe pull request updates various files related to market parameters and their validation within the protocol. Key changes include the modification of deprecation notes for specific properties in interfaces and messages, the removal of certain test cases that check for the validity of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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: 3
🧹 Outside diff range and nitpick comments (15)
protocol/x/prices/types/market_param_test.go (1)
35-36
: LGTM. Consider adding edge case tests.The "Invalid MinPriceChangePpm" test case has been updated correctly, aligning with the deprecation of
ExchangeConfigJson
andMinExchanges
fields.Consider adding edge case tests for
MinPriceChangePpm
, such as testing the maximum allowed value or boundary conditions, to ensure robust validation.protocol/x/prices/types/genesis.go (1)
ValidateFromParam method does not handle removed ExchangeConfigJson field
The
ValidateFromParam
method inMarketPrice
has not been updated to reflect the removal of theExchangeConfigJson
field fromMarketParam
. This oversight may lead to inconsistencies or unexpected behavior.
- File:
protocol/x/prices/types/market_price.go
- Function:
ValidateFromParam
🔗 Analysis chain
Line range hint
41-69
: VerifyValidateFromParam
method inMarketPrice
The
Validate
method remains unchanged, which is correct as it doesn't explicitly check the removedExchangeConfigJson
field. However, please ensure that theValidateFromParam
method ofMarketPrice
(called on line 66) has been updated to reflect the changes in theMarketParam
struct.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check if ValidateFromParam method has been updated # Test: Search for ValidateFromParam method definition rg -A 10 'func \(.*\) ValidateFromParam\(.*MarketParam.*\)'Length of output: 760
proto/dydxprotocol/prices/market_param.proto (4)
22-22
: LGTM. Consider adding a link to the marketmap documentation.The deprecation note and explanation for the
exponent
field are clear and informative. To further assist developers, consider adding a link to the marketmap documentation where they can find more information about how this value is now determined.
27-28
: LGTM. Consider consistent comment formatting.The deprecation note and explanation for the
min_exchanges
field are clear and informative. For consistency, consider removing the extra newline before the deprecation note to match the formatting of theexponent
field.
37-38
: LGTM. Consider consistent comment formatting and adding a link to the marketmap documentation.The deprecation note and explanation for the
exchange_config_json
field are clear and informative. For consistency:
- Consider removing the extra newline before the deprecation note to match the formatting of the
exponent
field.- Consider adding a link to the marketmap documentation where developers can find more information about how the exchange config is now determined.
Line range hint
22-38
: Summary: Deprecation of market parameter fields aligns with PR objectives.The changes to the
MarketParam
message effectively deprecate theexponent
,min_exchanges
, andexchange_config_json
fields, indicating that their values are now determined from the marketmap starting from version 8.x. These updates align with the PR objective of deprecating certain configurations related to exchanges.The deprecation notes and explanations are clear and informative, which will help developers understand the changes and adapt their code accordingly. The consistency in formatting could be improved slightly, and adding links to the marketmap documentation would further assist developers in finding the new source of these values.
Overall, these changes represent a significant shift in how market parameters are handled, moving towards a more centralized configuration through the marketmap.
Consider updating any related documentation or guides to reflect these changes and provide instructions on how to use the marketmap for these configurations in v8.x and later.
protocol/x/prices/types/message_create_oracle_market_test.go (3)
39-40
: LGTM: Updated MarketParam structureThe test case has been correctly updated to reflect the changes in the
MarketParam
structure. The removal ofMinExchanges
andExchangeConfigJson
fields aligns with the broader changes in the codebase.Consider adding a comment explaining why these fields were removed to provide context for future developers.
61-62
: LGTM: Consistent update in "Invalid MinPriceChangePpm" test caseThe
MarketParam
structure in this test case has been correctly updated to match the changes in the other test cases. The test still effectively checks for an invalidMinPriceChangePpm
value.Consider adding more test cases with different invalid
MinPriceChangePpm
values to ensure robust validation.
Incomplete Removal of
ExchangeConfigJson
andMinExchanges
FieldsThe fields
ExchangeConfigJson
andMinExchanges
are still present in multiple files across the codebase, indicating that their removal has not been fully implemented.🔗 Analysis chain
Line range hint
1-80
: Overall changes look good, consider adding more test casesThe modifications to this test file are consistent with the broader changes in the codebase, particularly the deprecation of
ExchangeConfigJson
andMinExchanges
fields. TheMarketParam
structure has been updated consistently across all test cases, and the remaining tests still cover the essential scenarios forPair
andMinPriceChangePpm
.To further improve the test coverage:
- Consider adding more test cases for edge cases of
MinPriceChangePpm
.- Add tests for any new validation logic that may have been introduced as part of these changes.
- Ensure that the removal of
ExchangeConfigJson
andMinExchanges
fields doesn't introduce any unintended side effects in the actual implementation.To verify the consistency of these changes across the codebase, please run the following script:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the removal of ExchangeConfigJson and MinExchanges fields across the codebase # Test: Search for any remaining usage of ExchangeConfigJson and MinExchanges echo "Searching for ExchangeConfigJson usage:" rg "ExchangeConfigJson" --type go echo "Searching for MinExchanges usage:" rg "MinExchanges" --type go # Test: Verify MarketParam structure in other files echo "Checking MarketParam structure in other files:" rg "type MarketParam struct" -A 10 --type goLength of output: 40504
protocol/x/prices/types/genesis_test.go (1)
71-72
: LGTM: Consistent removal of ExchangeConfigJson field.The
ExchangeConfigJson
field has been consistently removed from theMarketParam
struct in the "invalid: market param invalid (pair unset)" test case. The test case still effectively checks for an invalid market param with an unset pair.Consider initializing the
MinPriceChangePpm
field to ensure all non-tested fields have valid values:{ Id: 0, Pair: "", + MinPriceChangePpm: 1, },
protocol/x/prices/keeper/slinky_adapter_test.go (1)
112-114
: LGTM. Consider adding a test forExponent
andExchangeConfigJson
.The removal of the
MinExchanges
field from theMarketParam
struct is consistent with its deprecation. The test still effectively checks for the creation of a market with invalid data.To maintain comprehensive test coverage, consider adding test cases for the
Exponent
andExchangeConfigJson
fields, which were also mentioned as deprecated in the AI-generated summary. This would ensure that all deprecated fields are properly handled.indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/market_param.ts (2)
22-22
: LGTM. Consider adding a link to the marketmap documentation.The updated deprecation comment clearly indicates that the
exponent
value is now determined from the marketmap starting from v8.x. This aligns with the PR objectives.To further improve the documentation, consider adding a link to the marketmap documentation or specification, if available. This would help developers understand where to find the new source of this value.
45-46
: LGTM. Consider rephrasing for consistency.The updated deprecation comment for
exchangeConfigJson
aligns with the PR objectives and is consistent with the changes made to theexponent
andminExchanges
properties.For consistency with the other deprecation comments, consider rephrasing to:
/** Deprecated since v8.x. This value is now determined from the marketmap. */
This would maintain a uniform style across all deprecated properties.
protocol/daemons/pricefeed/client/types/price_feed_mutable_market_configs_test.go (1)
Line range hint
1-445
: LGTM: Overall changes align well with the pull request objectives.The remaining tests still provide good coverage for market parameter validation. To further improve code clarity, consider adding a comment explaining the reason for removing the
exchangeConfigJson
-related test cases, referencing the deprecation of this field.Consider adding a comment like this at the beginning of the
TestValidateAndTransformParams_Mixed
function:// Note: Test cases for invalid exchangeConfigJson have been removed due to the deprecation of this field.
protocol/app/ante/market_update_test.go (1)
Line range hint
922-954
: Avoid usingpanic
when setting messages inCreateTestTx
In the
CreateTestTx
function, usingpanic(err)
whentxBuilder.SetMsgs(msgs...)
fails may cause the test suite to exit unexpectedly. Instead, return the error to allow for proper error handling and reporting.Apply this diff to handle the error appropriately:
func CreateTestTx( ctx sdk.Context, msgs []sdk.Msg, privs []cryptotypes.PrivKey, accNums, accSeqs []uint64, chainID string, signMode signing.SignMode, txConfig client.TxConfig, ) (xauthsigning.Tx, error) { txBuilder := txConfig.NewTxBuilder() err := txBuilder.SetMsgs(msgs...) if err != nil { - panic(err) + return nil, err } // Rest of the code }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
protocol/x/prices/types/market_param.pb.go
is excluded by!**/*.pb.go
📒 Files selected for processing (18)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/market_param.ts (6 hunks)
- proto/dydxprotocol/prices/market_param.proto (2 hunks)
- protocol/app/ante/market_update_test.go (1 hunks)
- protocol/app/testdata/default_genesis_state.json (0 hunks)
- protocol/daemons/pricefeed/client/types/price_feed_mutable_market_configs_test.go (1 hunks)
- protocol/scripts/genesis/sample_pregenesis.json (0 hunks)
- protocol/testing/genesis.sh (0 hunks)
- protocol/x/prices/keeper/market_param_test.go (0 hunks)
- protocol/x/prices/keeper/market_test.go (0 hunks)
- protocol/x/prices/keeper/slinky_adapter_test.go (1 hunks)
- protocol/x/prices/module_test.go (2 hunks)
- protocol/x/prices/types/genesis.go (1 hunks)
- protocol/x/prices/types/genesis_test.go (5 hunks)
- protocol/x/prices/types/market_param.go (0 hunks)
- protocol/x/prices/types/market_param_test.go (1 hunks)
- protocol/x/prices/types/message_create_oracle_market_test.go (4 hunks)
- protocol/x/prices/types/message_update_market_param_test.go (2 hunks)
- protocol/x/rewards/keeper/keeper_test.go (1 hunks)
💤 Files with no reviewable changes (6)
- protocol/app/testdata/default_genesis_state.json
- protocol/scripts/genesis/sample_pregenesis.json
- protocol/testing/genesis.sh
- protocol/x/prices/keeper/market_param_test.go
- protocol/x/prices/keeper/market_test.go
- protocol/x/prices/types/market_param.go
🧰 Additional context used
🔇 Additional comments (19)
protocol/x/prices/types/market_param_test.go (2)
27-28
: LGTM. Consistent with field deprecation.The "Empty pair" test case has been updated correctly, removing the deprecated fields while maintaining the essential validation for the
Pair
field.
Line range hint
1-52
: Summary: Test suite updated to reflect field deprecations.The changes in this file consistently remove references to the deprecated
ExchangeConfigJson
andMinExchanges
fields from all test cases. The remaining tests still cover the essential validations forPair
andMinPriceChangePpm
, maintaining the integrity of theMarketParam
validation test suite.These modifications align well with the broader changes mentioned in the PR summary, particularly the deprecation of certain fields in the
MarketParam
struct starting from version 8.x.To ensure comprehensive test coverage after these changes, consider running the following commands:
protocol/x/prices/types/genesis.go (2)
13-16
: LGTM: Removal ofExchangeConfigJson
field fromMarketParam
entries.The changes align with the deprecation of the
ExchangeConfigJson
field. This simplification of theMarketParam
struct in the default genesis state is a positive change, removing potentially sensitive or frequently changing data from the hardcoded defaults.Also applies to: 19-22
Line range hint
1-69
: Summary of changes and their implicationsThe removal of the
ExchangeConfigJson
field from theMarketParam
entries in theDefaultGenesis
function aligns with the broader changes across the codebase to deprecate this field. This change simplifies the default genesis state and removes potentially sensitive or frequently changing data from hardcoded defaults.While the
Validate
method in this file doesn't require changes, it's crucial to ensure that related validation methods (likeValidateFromParam
) and any code that depends on theExchangeConfigJson
field have been updated accordingly in other files.These changes contribute to a more streamlined and maintainable codebase, but careful testing should be conducted to ensure that the removal of this field doesn't introduce any unexpected behavior in the system.
protocol/x/prices/types/message_create_oracle_market_test.go (2)
6-7
: LGTM: Import statement cleanupThe uncommented import of
testutil
and its relocation improve code organization and indicate its usage in the tests.
50-51
: LGTM: Consistent update in "Empty pair" test caseThe
MarketParam
structure in this test case has been correctly updated to match the changes in the valid test case. The test still effectively checks for an empty pair scenario.protocol/x/prices/types/message_update_market_param_test.go (1)
6-7
: LGTM: New import and improved formatting.The addition of the
testutil
package import and the empty line for separation improves code organization and readability.protocol/x/prices/types/genesis_test.go (4)
54-56
: LGTM: Consistent removal of ExchangeConfigJson field.The
ExchangeConfigJson
field has been consistently removed from theMarketParam
structs in the "invalid: duplicate market param ids" test case. The test case still effectively checks for duplicate market param ids with the remaining fields.Also applies to: 59-61
82-84
: LGTM: Consistent removal of ExchangeConfigJson field.The
ExchangeConfigJson
field has been consistently removed from theMarketParam
structs in the "invalid: mismatched number of market params and prices" test case. The test case still effectively checks for mismatched numbers of market params and prices with the remaining fields properly initialized.Also applies to: 87-89
105-107
: LGTM: Consistent removal of ExchangeConfigJson field and maintained test integrity.The
ExchangeConfigJson
field has been consistently removed from theMarketParam
structs in the "invalid: market prices don't correspond to params" test case. The test case still effectively checks for non-corresponding market prices and params with the remaining fields properly initialized.Overall, the changes in this file consistently remove the
ExchangeConfigJson
field from all test cases while maintaining the integrity and purpose of each test. This aligns with the broader goal of deprecating theExchangeConfigJson
field as mentioned in the PR summary.Also applies to: 110-112
27-29
: LGTM: Removal of ExchangeConfigJson field is consistent with deprecation.The removal of the
ExchangeConfigJson
field from theMarketParam
struct in the "valid" test case is in line with the deprecation of this field. The remaining fields are correctly initialized.To ensure consistency across the codebase, let's verify that
ExchangeConfigJson
has been removed from allMarketParam
structs:✅ Verification successful
Verification Successful: ExchangeConfigJson field fully removed
No instances of
ExchangeConfigJson
found in anyMarketParam
structs.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for any remaining instances of ExchangeConfigJson in MarketParam structs # Test: Search for ExchangeConfigJson in MarketParam structs rg -p 'MarketParam\s*{[^}]*ExchangeConfigJson' --type goLength of output: 194
Script:
#!/bin/bash # Description: Check for any remaining instances of ExchangeConfigJson in MarketParam structs # Test: Search for ExchangeConfigJson in MarketParam structs with corrected regex rg -p 'MarketParam\s*\{[^}]*ExchangeConfigJson' --type goLength of output: 59
indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/market_param.ts (2)
31-32
: LGTM. Consistent with previous property update.The updated deprecation comment for
minExchanges
is consistent with the changes made to theexponent
property. It clearly indicates that the value is now determined from the marketmap starting from v8.x, aligning with the PR objectives.
Line range hint
1-194
: Summary: Consistent deprecation of market parametersThe changes in this file consistently update the deprecation comments for
exponent
,minExchanges
, andexchangeConfigJson
properties in bothMarketParam
andMarketParamSDKType
interfaces. These updates align with the PR objectives to deprecate certain configurations related to exchanges.Key points:
- All deprecated properties now indicate that their values are determined from the marketmap starting from v8.x.
- The changes maintain consistency across the file.
- The updates do not affect the encoding and decoding functions, ensuring backward compatibility.
These changes effectively communicate the deprecation of these properties and their new source, which should help developers adapt to the new configuration approach using the marketmap.
protocol/x/prices/module_test.go (3)
131-132
: LGTM: Test case updated to reflect simplified market parameters.The changes in this test case align with the broader modifications to simplify the market parameter structure across the codebase. The test still effectively checks for duplicate market param ids while removing the deprecated fields
minExchanges
andexchangeConfigJson
.
141-141
: LGTM: Test case updated to remove deprecated field.The removal of the
minExchanges
field from the test JSON is consistent with the deprecation of this field in the market parameters. The test case continues to effectively check for mismatches between market params and prices.
Line range hint
1-341
: LGTM: Changes appropriately scoped to affected test cases.The modifications in this file are correctly limited to the test cases directly affected by the simplification of the market parameter structure. Other test cases and module functionality remain unchanged, which is appropriate given the nature of the changes.
protocol/daemons/pricefeed/client/types/price_feed_mutable_market_configs_test.go (2)
8-9
: LGTM: Import statement reorganization.The reorganization of import statements improves code readability by grouping related imports together.
Line range hint
1-445
: Verify test coverage after removal ofexchangeConfigJson
test cases.The removal of test cases for invalid
exchangeConfigJson
inputs aligns with the deprecation of this field. However, please ensure that the remaining tests still provide adequate coverage for the current functionality of market parameter validation.To verify the test coverage, you can run the following command:
protocol/app/ante/market_update_test.go (1)
268-271
: LGTMThe initialization of
testMarketParams
appears correct and consistent with the test setup.
Pair: "BTC-USD", | ||
MinPriceChangePpm: 1_000, |
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.
💡 Codebase verification
Incomplete Removal of Deprecated Fields
The deprecated fields ExchangeConfigJson
and MinExchanges
are still referenced in multiple files. Please ensure their complete removal across the codebase:
protocol/x/prices/types/market_param.pb.go
protocol/x/prices/keeper/msg_server_update_market_param_test.go
protocol/x/perpetuals/keeper/perpetual_test.go
protocol/x/listing/keeper/listing_test.go
- (additional files as identified)
🔗 Analysis chain
LGTM. Verify removal of deprecated fields.
The changes correctly reflect the deprecation of ExchangeConfigJson
and MinExchanges
fields. The test case now focuses on the essential Pair
and MinPriceChangePpm
fields.
To ensure consistency across the codebase, let's verify the removal of these deprecated fields:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify removal of deprecated fields from MarketParam struct and related code.
# Test 1: Check for any remaining references to ExchangeConfigJson
echo "Checking for ExchangeConfigJson references:"
rg "ExchangeConfigJson" --type go
# Test 2: Check for any remaining references to MinExchanges
echo "Checking for MinExchanges references:"
rg "MinExchanges" --type go
# Test 3: Verify MarketParam struct definition
echo "Checking MarketParam struct definition:"
rg "type MarketParam struct" -A 10 --type go
Length of output: 40506
Pair: "test", | ||
MinPriceChangePpm: 1_000, |
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.
💡 Codebase verification
MinExchanges Still Referenced in Test File
The MinExchanges
field has been removed from the MarketParam
structure, but references to it are still present in message_update_market_param_test.go
. Please update the test cases to remove or adjust these references accordingly.
🔗 Analysis chain
Verify test coverage after removing MinExchanges.
The removal of the MinExchanges
field from the MarketParam
structure aligns with its deprecation. However, please ensure that this change doesn't reduce the test coverage for the MsgUpdateMarketParam
message.
To verify the test coverage, please run the following command:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check test coverage for MsgUpdateMarketParam
# Test: Verify that all fields of MarketParam are still being tested
rg -A 10 "MarketParam{" protocol/x/prices/types/message_update_market_param_test.go
# Test: Check if there are any remaining references to MinExchanges in the test file
rg "MinExchanges" protocol/x/prices/types/message_update_market_param_test.go
# Test: Verify that all fields of MsgUpdateMarketParam are being validated
ast-grep --pattern 'func TestMsgUpdateMarketParam_ValidateBasic(t *testing.T) {
$$$
}'
Length of output: 7071
Id: testRewardTokenMarketId, | ||
Pair: testRewardTokenMarket, | ||
Exponent: tc.tokenPrice.Exponent, | ||
MinPriceChangePpm: uint32(50), |
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.
Remove deprecated Exponent
and MinPriceChangePpm
fields from MarketParam
Since the Exponent
and MinPriceChangePpm
fields are deprecated starting from version 8.x, consider removing them from the test setup to align with the updated market parameter definitions.
Apply the following diff to remove the deprecated fields:
Id: testRewardTokenMarketId,
Pair: testRewardTokenMarket,
- Exponent: tc.tokenPrice.Exponent,
- MinPriceChangePpm: uint32(50),
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Id: testRewardTokenMarketId, | |
Pair: testRewardTokenMarket, | |
Exponent: tc.tokenPrice.Exponent, | |
MinPriceChangePpm: uint32(50), | |
Id: testRewardTokenMarketId, | |
Pair: testRewardTokenMarket, |
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- protocol/testing/e2e/gov/prices_test.go (0 hunks)
- protocol/x/listing/keeper/listing.go (1 hunks)
- protocol/x/listing/keeper/listing_test.go (0 hunks)
💤 Files with no reviewable changes (2)
- protocol/testing/e2e/gov/prices_test.go
- protocol/x/listing/keeper/listing_test.go
🧰 Additional context used
🔇 Additional comments (2)
protocol/x/listing/keeper/listing.go (2)
Line range hint
1-324
: Overall, the changes look good but require careful verification.The modifications to the
CreateMarket
function align with the broader goal of simplifying market parameter structures and deriving values from the market map. These changes are consistent with updates mentioned in other files of this PR.However, given the potential impact on price calculations and exchange-related operations, it's crucial to:
- Thoroughly test these changes in various scenarios.
- Update any documentation related to market creation and parameter structures.
- Ensure that all parts of the system that previously relied on
Exponent
andMinExchanges
inMarketParam
have been appropriately updated.Please run comprehensive integration tests focusing on market creation, price calculations, and any exchange-related functionalities to ensure system-wide consistency and correctness.
Line range hint
66-70
: Exponent calculation updated. Verify consistency.The
Exponent
is now set directly in theMarketPrice
struct, derived from the market map details. This change ensures that the exponent is consistently sourced from the market map.To ensure this change is applied consistently across the codebase, please run the following script:
#!/bin/bash # Search for other instances where Exponent is set in MarketPrice rg -i 'Exponent.*MarketPrice' --type go
Id: marketId, | ||
Pair: ticker, | ||
MinPriceChangePpm: types.MinPriceChangePpm_LongTail, |
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.
💡 Codebase verification
Issues Found: Residual References to Removed Fields
Residual references to Exponent
and MinExchanges
were found in the following files:
protocol/x/prices/keeper/msg_server_update_market_param_test.go
protocol/x/prices/keeper/market_price.go
protocol/testing/e2e/gov/add_new_market_test.go
protocol/testutil/prices/market_param_price.go
protocol/testutil/app/order.go
protocol/testutil/constants/pricefeed.go
protocol/daemons/pricefeed/client/types/price_feed_mutable_market_configs.go
Please update these locations to remove or refactor the usage of Exponent
and MinExchanges
to ensure consistency with the recent changes.
🔗 Analysis chain
LGTM. Simplified market parameter structure.
The removal of Exponent
and MinExchanges
from MarketParam
aligns with the deprecation notes mentioned in other files. This simplification streamlines the market creation process.
Please verify that these changes don't negatively impact price calculations or exchange-related operations elsewhere in the system. Run the following script to check for any remaining references to these removed fields:
Action Required: Correct the Verification Script
The previous script encountered a syntax error. Please run the corrected script below to search for any remaining references to Exponent
or MinExchanges
in MarketParam
:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for any remaining references to Exponent or MinExchanges in MarketParam
rg -i '(Exponent|MinExchanges).*MarketParam' --type go
Length of output: 910
Script:
# Search for any remaining references to Exponent or MinExchanges in MarketParam
rg -i "(Exponent|MinExchanges).*MarketParam" --type go
Length of output: 2522
Changelist
[Describe or list the changes made in this PR]
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
.Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
MinExchanges
andExchangeConfigJson
.Tests
Chores