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

refactor perps order modules #2340

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

refactor perps order modules #2340

wants to merge 7 commits into from

Conversation

kaleb-keny
Copy link
Member

No description provided.

seems like just having an issue with keeper rewards mismatch
my computer is having issues running them all
@dbeal-eth dbeal-eth changed the title refactor-check-2-delete refactor perps order modules Nov 27, 2024
@dbeal-eth
Copy link
Contributor

dbeal-eth commented Nov 28, 2024

gas report:
running a small subset of the tests locally to get an idea

new gas (this branch):

·-------------------------------------------------------------------|---------------------------|-------------|----------------------------·
|                       Solc version: 0.8.22                        ·  Optimizer enabled: true  ·  Runs: 200  ·  Block limit: 6718946 gas  │
····································································|···························|·············|·····························
|  Methods                                                                                                                                 │
···································|································|·············|·············|·············|·············|···············
|  Contract                        ·  Method                        ·  Min        ·  Max        ·  Avg        ·  # calls    ·  eur (avg)   │
···································|································|·············|·············|·············|·············|···············
|  AsyncOrderModule                ·  commitOrder                   ·     515150  ·     659313  ·     606879  ·          3  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  AsyncOrderSettlementPythModule  ·  settleOrder                   ·     732539  ·    1337301  ·     926947  ·         21  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  LiquidationModule               ·  liquidate                     ·          -  ·          -  ·    1822126  ·          9  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MarketConfigurationModule       ·  setSettlementStrategyEnabled  ·          -  ·          -  ·      76362  ·          3  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MockPythERC7412Wrapper          ·  setAlwaysRevertFlag           ·          -  ·          -  ·      43564  ·          3  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MockPythERC7412Wrapper          ·  setBenchmarkPrice             ·          -  ·          -  ·      45828  ·          1  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MockPythExternalNode            ·  mockSetCurrentPrice           ·          -  ·          -  ·      26499  ·          4  ·           -  │
·----------------------------------|--------------------------------|-------------|-------------|-------------|-------------|--------------·

old gas:

·-------------------------------------------------------------------|---------------------------|-------------|----------------------------·
|                       Solc version: 0.8.22                        ·  Optimizer enabled: true  ·  Runs: 200  ·  Block limit: 6718946 gas  │
····································································|···························|·············|·····························
|  Methods                                                                                                                                 │
···································|································|·············|·············|·············|·············|···············
|  Contract                        ·  Method                        ·  Min        ·  Max        ·  Avg        ·  # calls    ·  eur (avg)   │
···································|································|·············|·············|·············|·············|···············
|  AsyncOrderModule                ·  commitOrder                   ·     504355  ·     610602  ·     571656  ·          3  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  AsyncOrderSettlementPythModule  ·  settleOrder                   ·     716627  ·    1098015  ·     867143  ·         21  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  LiquidationModule               ·  liquidate                     ·          -  ·          -  ·    1603603  ·          9  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MarketConfigurationModule       ·  setSettlementStrategyEnabled  ·          -  ·          -  ·      76384  ·          3  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MockPythERC7412Wrapper          ·  setAlwaysRevertFlag           ·          -  ·          -  ·      43564  ·          3  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MockPythERC7412Wrapper          ·  setBenchmarkPrice             ·          -  ·          -  ·      45828  ·          1  ·           -  │
···································|································|·············|·············|·············|·············|···············
|  MockPythExternalNode            ·  mockSetCurrentPrice           ·          -  ·          -  ·      26499  ·          4  ·           -  │
·----------------------------------|--------------------------------|-------------|-------------|-------------|-------------|--------------·

(the purpose of this refactor was not to try and reduce gas usage. but its a nice side effect)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants