Closed chenyaoy closed 2 weeks ago
The 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 ExchangeConfigJson
field, and enhancements to the test suite for market updates. Additionally, the genesis configuration and script have been significantly restructured to include new parameters and improve functionality.
File | Change Summary |
---|---|
indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/market_param.ts |
Updated deprecation notes for exponent , minExchanges , and exchangeConfigJson properties in MarketParam and MarketParamSDKType interfaces to indicate deprecation since v8.x. |
proto/dydxprotocol/prices/market_param.proto |
Modified deprecation notes for exponent , min_exchanges , and exchange_config_json fields in MarketParam message to reflect deprecation since v8.x. |
protocol/app/ante/market_update_test.go |
Enhanced test suite for market updates, adding scenarios and modifying existing tests for validation of market update messages. Added CreateTestTx function. |
protocol/daemons/pricefeed/client/types/price_feed_mutable_market_configs_test.go |
Removed specific test cases related to exchangeConfigJson and reorganized import statements. |
protocol/scripts/genesis/sample_pregenesis.json |
Comprehensive updates to the genesis file, adding new parameters across multiple sections including affiliate tiers, assets, and price configurations. |
protocol/testing/genesis.sh |
Extensive modifications to the genesis configuration script, adding market configurations, liquidity tiers, and enhancing functionality. |
protocol/x/prices/keeper/market_param_test.go |
Removed specific test cases from TestModifyMarketParam_Errors , focusing on critical error scenarios. |
protocol/x/prices/keeper/market_test.go |
Removed test case for validating minimum exchanges parameter from TestCreateMarket_Errors . |
protocol/x/prices/keeper/slinky_adapter_test.go |
Removed MinExchanges from parameters in CreateMarket function call, affecting market creation validation. |
protocol/x/prices/module_test.go |
Simplified structure of genesisJson strings in ValidateGenesisErr test case. |
protocol/x/prices/types/genesis_test.go |
Removed ExchangeConfigJson field from various test cases, streamlining validation tests. |
protocol/x/prices/types/market_param.go |
Removed checks for mp.MinExchanges being zero and JSON validity from the Validate method. |
protocol/x/prices/types/market_param_test.go |
Removed test cases validating the ExchangeConfigJson field, focusing on Pair and MinPriceChangePpm . |
protocol/x/prices/types/message_create_oracle_market_test.go |
Removed tests related to ExchangeConfigJson , adjusting MarketParam structure in test cases. |
protocol/x/prices/types/message_update_market_param_test.go |
Removed test case for "Failure: 0 MinExchanges" and adjusted MarketParam structure in tests. |
ModifyMarketParam
function to validate new market pairs, directly related to this PR's focus.pml
π In the fields where markets grow,
Changes made, as we all know.
With parameters set just right,
Our protocol shines, a true delight!
From genesis to tests, all refined,
A hop towards progress, perfectly aligned! π
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