Closed Eric-Warehime closed 3 months ago
The recent updates introduced a ValidateMarketUpdateDecorator
within the ante
package to validate market update transactions, ensuring no cross-margin markets are included. Several tests have been added to verify this new functionality. Dependencies have also been updated in go.mod
.
File | Change Summary |
---|---|
protocol/app/ante/market_update.go |
Added ValidateMarketUpdateDecorator , its constructor, and methods to handle and validate market update transactions, ensuring no cross-margin markets. |
protocol/app/ante_test.go |
Added PerpetualsKeeper and PricesKeeper to HandlerOptions struct and updated related tests. |
protocol/go.mod |
Updated the version of github.com/skip-mev/slinky . |
protocol/testutil/ante/testutil.go |
Added PerpetualsKeeper to AnteTestSuite struct. |
protocol/app/ante/market_update_test.go |
Introduced tests to validate market update transactions and decorators for handling market updates. |
sequenceDiagram
participant User
participant App
participant ValidateMarketUpdateDecorator
participant PerpetualsKeeper
participant PricesKeeper
User->>App: Submit Transaction
App->>ValidateMarketUpdateDecorator: Validate transaction
ValidateMarketUpdateDecorator->>PerpetualsKeeper: Check market info
ValidateMarketUpdateDecorator->>PricesKeeper: Check price info
ValidateMarketUpdateDecorator->>App: Return validation result
App->>User: Transaction Accepted/Rejected
In lines of code both new and bright,
We validate the markets right.
No cross-margin mix, no code of old,
New features shine, updates bold!
πβ¨
[!TIP]
AI model upgrade
## `gpt-4o` model for reviews and chat is now live OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide any feedback or to report any issues.
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?
Superseded by #1837
Changelist
Adds an antehandler to restrict market map module updates to cross collateralized perpetuals markets.
Test Plan
Tests baked in.
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
New Features
Tests