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

time stretch bugfix #727

Merged
merged 1 commit into from
Jan 18, 2024
Merged

time stretch bugfix #727

merged 1 commit into from
Jan 18, 2024

Conversation

dpaiton
Copy link
Contributor

@dpaiton dpaiton commented Jan 17, 2024

The rust get_time_stretch formula was an incorrect port from solidity, and the test was not sufficiently complicated to catch it. These are resolved now.

@dpaiton dpaiton force-pushed the dpaiton/time-stretch-bugfix branch from e1efc18 to bd47634 Compare January 17, 2024 23:40
@dpaiton dpaiton requested a review from jalextowle January 17, 2024 23:40
Copy link
Contributor

@jalextowle jalextowle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the nit is addressed. I'm sorry I didn't catch the issues the first time, but I'm glad you were able to land this. Next time will be less painful ❤️

@dpaiton dpaiton enabled auto-merge (squash) January 18, 2024 00:01
Copy link

github-actions bot commented Jan 18, 2024

Hyperdrive Gas Benchmark

Benchmark suite Current: 80ea7fa Previous: 2a8c81f Deviation Status
addLiquidity: min 1600 gas 1600 gas 0% 🟰
addLiquidity: avg 65278 gas 64292 gas 1.5336% 🚨
addLiquidity: max 275113 gas 275113 gas 0% 🟰
checkpoint: min 1150 gas 1150 gas 0% 🟰
checkpoint: avg 47733 gas 47670 gas 0.1322% 🚨
checkpoint: max 190992 gas 190992 gas 0% 🟰
closeLong: min 1558 gas 1558 gas 0% 🟰
closeLong: avg 28027 gas 28087 gas -0.2136%
closeLong: max 149196 gas 148328 gas 0.5852% 🚨
closeShort: min 1549 gas 1549 gas 0% 🟰
closeShort: avg 29873 gas 29855 gas 0.0603% 🚨
closeShort: max 147421 gas 147421 gas 0% 🟰
initialize: min 1538 gas 1538 gas 0% 🟰
initialize: avg 213159 gas 213159 gas 0% 🟰
initialize: max 254817 gas 254817 gas 0% 🟰
openLong: min 1487 gas 1487 gas 0% 🟰
openLong: avg 50349 gas 50366 gas -0.0338%
openLong: max 185024 gas 185024 gas 0% 🟰
openShort: min 1608 gas 1608 gas 0% 🟰
openShort: avg 49624 gas 49663 gas -0.0785%
openShort: max 179974 gas 179974 gas 0% 🟰
redeemWithdrawalShares: min 1575 gas 1575 gas 0% 🟰
redeemWithdrawalShares: avg 20161 gas 20332 gas -0.8410%
redeemWithdrawalShares: max 106163 gas 106163 gas 0% 🟰
removeLiquidity: min 1639 gas 1639 gas 0% 🟰
removeLiquidity: avg 149428 gas 148128 gas 0.8776% 🚨
removeLiquidity: max 323757 gas 323757 gas 0% 🟰

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

@dpaiton dpaiton force-pushed the dpaiton/time-stretch-bugfix branch from b2ce0e1 to 41250e9 Compare January 18, 2024 00:37
the rust get_time_stretch formulat was an incorrect port from solidity,
and the test was not sufficiently complicated to catch it.

update CI to not run solidity when rust updates

bugfix time stretch

seconds in a day

put these back

rate no longer needs to be mutable
@dpaiton dpaiton force-pushed the dpaiton/time-stretch-bugfix branch from 41250e9 to 80ea7fa Compare January 18, 2024 00:40
@dpaiton dpaiton changed the base branch from main to v0.5 January 18, 2024 00:45
@dpaiton dpaiton merged commit 570263e into v0.5 Jan 18, 2024
6 checks passed
@dpaiton dpaiton deleted the dpaiton/time-stretch-bugfix branch January 18, 2024 00:46
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