-
Notifications
You must be signed in to change notification settings - Fork 9
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
Deployment count cap #142
Deployment count cap #142
Conversation
aalavandhan
commented
Apr 10, 2023
- Added deployment count limit to prevent large loops which might run out of gas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the problem of unbounded loops causing gas limit problems, but I'm not sure I see this as a right solution for it. If there's no hard limit in the code, then it will be implicitly enforced anyway by the block gas limit. This change would simply make the limit lower?
I could see this working if, instead of reverting, it executed as much as it could up to some limit, then left the rest for followup calls, though.
I'm guessing if either this code limit or block gas limit were reached, it could brick the contract until somehow the tranches were redeemed from the side. To make sure we have a recovery step--Is there a non-permissioned way to redeem the tranches to underlying for the vault?
Hmm. Makes sense. We don't yet have a non-permissioned way to redeem individual tranches I think we should add public methods to redeem tranches. The additional benefit of the limit is that it guarantees the vault share holder can always "redeem" shares for the underlying (as the redemption loops through all the assets and could be bricked if the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM