delvtech / hyperdrive

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

Etching Tool #959

Closed jalextowle closed 4 months ago

jalextowle commented 4 months ago

Description

This PR adds a debugging tool to the repo that can be used to debug failing or successful transactions on the Sepolia testnet. The debugger updates the file test/debug/Debugging.t.sol with the appropriate transaction values from a failing or successful transaction, and the test suite will create a Sepolia fork, etch the correct contracts onto the provided Hyperdrive instance, and run the transaction. The debugger can add logs to the Hyperdrive repo to investigate the failure and can change Hyperdrive's logic to verify a potential bug-fix.

image

h/t @jrhea for the dank meme

github-actions[bot] commented 4 months ago

Hyperdrive Gas Benchmark

Benchmark suite Current: f69e81bc4a74fe9191b54df2d3187be7e403545c Previous: 1eb96f2b45c0e4a544d400a13cbf5f449a3401b8 Deviation Status
addLiquidity: min 33783 gas 33783 gas 0% 🟰
addLiquidity: avg 144160 gas 144183 gas -0.0160% ✅
addLiquidity: max 428209 gas 428185 gas 0.0056% 🚨
checkpoint: min 40242 gas 40242 gas 0% 🟰
checkpoint: avg 104036 gas 104041 gas -0.0048% ✅
checkpoint: max 212176 gas 212176 gas 0% 🟰
closeLong: min 31495 gas 31495 gas 0% 🟰
closeLong: avg 137930 gas 138121 gas -0.1383% ✅
closeLong: max 2640413 gas 2640413 gas 0% 🟰
closeShort: min 31416 gas 31416 gas 0% 🟰
closeShort: avg 132894 gas 132805 gas 0.0670% 🚨
closeShort: max 227575 gas 227575 gas 0% 🟰
initialize: min 31327 gas 31327 gas 0% 🟰
initialize: avg 253655 gas 253654 gas 0.0004% 🚨
initialize: max 322672 gas 322672 gas 0% 🟰
openLong: min 33547 gas 33547 gas 0% 🟰
openLong: avg 167521 gas 167414 gas 0.0639% 🚨
openLong: max 253272 gas 253272 gas 0% 🟰
openShort: min 33937 gas 33937 gas 0% 🟰
openShort: avg 170291 gas 170538 gas -0.1448% ✅
openShort: max 385628 gas 385628 gas 0% 🟰
redeemWithdrawalShares: min 31227 gas 31227 gas 0% 🟰
redeemWithdrawalShares: avg 61993 gas 61829 gas 0.2652% 🚨
redeemWithdrawalShares: max 167572 gas 167572 gas 0% 🟰
removeLiquidity: min 31169 gas 31169 gas 0% 🟰
removeLiquidity: avg 223867 gas 224096 gas -0.1022% ✅
removeLiquidity: max 398865 gas 398865 gas 0% 🟰

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