delvtech / hyperdrive

An automated market maker for fixed and variable yield with on-demand terms.
Apache License 2.0
28 stars 3 forks source link

Improved the debugging tools #1057

Closed jalextowle closed 3 months ago

jalextowle commented 3 months ago

Description

This PR adds a new mode to the debugging tools for simulating a transaction that has already been mined. This addresses a limitation of the tool by allowing users to simulate a transaction at a specified block height and transaction height within the block. This will make the tool more useful on mainnet and testnet environments where we can't assume that each transaction will be executed in separate blocks.

In addition to adding the new debugging mode, this PR also spruces up the tool and makes it more usable by relying more heavily on debugging-specific environment variables.

Review Checklists

Please check each item before approving the pull request. While going through the checklist, it is recommended to leave comments on items that are referenced in the checklist to make sure that they are reviewed. If there are multiple reviewers, copy the checklists into sections titled ## [Reviewer Name]. If the PR doesn't touch Solidity, the corresponding checklist can be removed.

[[Reviewer Name]]

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9505286878

Details


Totals Coverage Status
Change from base Build 9504821912: 0.0%
Covered Lines: 1907
Relevant Lines: 2053

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9505329870

Details


Files with Coverage Reduction New Missed Lines %
contracts/src/libraries/LPMath.sol 1 83.14%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 9504821912: -0.05%
Covered Lines: 1906
Relevant Lines: 2053

💛 - Coveralls
github-actions[bot] commented 3 months ago

Hyperdrive Gas Benchmark

Benchmark suite Current: 7c5cdf6941f9d62454a65658c7143aa4ebd6a095 Previous: 4f023244984d203d29c42c7caac79150a65352fc Deviation Status
addLiquidity: min 33937 gas 33827 gas 0.3252% 🚨
addLiquidity: avg 156052 gas 155252 gas 0.5153% 🚨
addLiquidity: max 429437 gas 429092 gas 0.0804% 🚨
checkpoint: min 40316 gas 40292 gas 0.0596% 🚨
checkpoint: avg 144560 gas 142311 gas 1.5803% 🚨
checkpoint: max 255830 gas 253424 gas 0.9494% 🚨
closeLong: min 31361 gas 31361 gas 0% 🟰
closeLong: avg 136339 gas 136004 gas 0.2463% 🚨
closeLong: max 2621435 gas 2621386 gas 0.0019% 🚨
closeShort: min 31327 gas 31349 gas -0.0702%
closeShort: avg 132301 gas 132022 gas 0.2113% 🚨
closeShort: max 272530 gas 263302 gas 3.5047% 🚨
initialize: min 31349 gas 31371 gas -0.0701%
initialize: avg 333305 gas 330980 gas 0.7025% 🚨
initialize: max 399922 gas 397010 gas 0.7335% 🚨
openLong: min 33370 gas 33370 gas 0% 🟰
openLong: avg 174369 gas 174132 gas 0.1361% 🚨
openLong: max 335241 gas 306958 gas 9.2140% 🚨
openShort: min 33936 gas 33936 gas 0% 🟰
openShort: avg 168770 gas 168517 gas 0.1501% 🚨
openShort: max 415854 gas 415737 gas 0.0281% 🚨
redeemWithdrawalShares: min 31251 gas 31251 gas 0% 🟰
redeemWithdrawalShares: avg 75185 gas 75086 gas 0.1318% 🚨
redeemWithdrawalShares: max 305633 gas 210204 gas 45.3983% 🚨
removeLiquidity: min 31301 gas 31301 gas 0% 🟰
removeLiquidity: avg 215498 gas 214869 gas 0.2927% 🚨
removeLiquidity: max 404194 gas 403971 gas 0.0552% 🚨

This comment was automatically generated by workflow using github-action-benchmark.

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9505740981

Details


Totals Coverage Status
Change from base Build 9504821912: 0.0%
Covered Lines: 1907
Relevant Lines: 2053

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9505783860

Details


Totals Coverage Status
Change from base Build 9504821912: 0.0%
Covered Lines: 1907
Relevant Lines: 2053

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9505908141

Details


Files with Coverage Reduction New Missed Lines %
contracts/src/libraries/LPMath.sol 1 83.14%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 9504821912: -0.05%
Covered Lines: 1906
Relevant Lines: 2053

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9522112274

Details


Totals Coverage Status
Change from base Build 9510431696: 0.0%
Covered Lines: 1965
Relevant Lines: 2133

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9522219255

Details


Totals Coverage Status
Change from base Build 9510431696: 0.0%
Covered Lines: 1965
Relevant Lines: 2133

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9522519186

Details


Totals Coverage Status
Change from base Build 9510431696: 0.0%
Covered Lines: 1965
Relevant Lines: 2133

💛 - Coveralls
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9522537306

Details


Totals Coverage Status
Change from base Build 9510431696: 0.0%
Covered Lines: 1965
Relevant Lines: 2133

💛 - Coveralls