You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, every time that we forward a call using DelegateProxy, 10k gas are not forwarded. When multiple DelegateProxy.delegatedFwd are executed in one transaction (in an aragonOS call with an auth modifier there are at least 4 delegatedFwd), the amount of gas that the transaction needs can be up to ~10k gas * number of DelegateProxy.delegatedFwd gas that won't be used in the transaction, but that needs to be sent or the transaction will fail.
The reason for not sending all the gas when performing a delegatecall is to be able to gracefully error in case that the underlying call fails consuming all the gas (because of an invalid jump or an OOG). In our case, after the proxy's delegatecall returns we just forward the return data, which can be done with less than 10k gas in most cases.
Reducing the FWD_GAS_LIMIT to a lower number (maybe to 2,300 gas as that's the gas stipend amount that contract ETH transfers have) will reduce the amount of gas that needs to be sent to aragonOS contracts that won't be used
The text was updated successfully, but these errors were encountered:
At the moment, every time that we forward a call using
DelegateProxy
, 10k gas are not forwarded. When multipleDelegateProxy.delegatedFwd
are executed in one transaction (in an aragonOS call with anauth
modifier there are at least 4delegatedFwd
), the amount of gas that the transaction needs can be up to ~10k gas * number ofDelegateProxy.delegatedFwd
gas that won't be used in the transaction, but that needs to be sent or the transaction will fail.The reason for not sending all the gas when performing a
delegatecall
is to be able to gracefully error in case that the underlying call fails consuming all the gas (because of an invalid jump or an OOG). In our case, after the proxy'sdelegatecall
returns we just forward the return data, which can be done with less than 10k gas in most cases.Reducing the
FWD_GAS_LIMIT
to a lower number (maybe to 2,300 gas as that's the gas stipend amount that contract ETH transfers have) will reduce the amount of gas that needs to be sent to aragonOS contracts that won't be usedThe text was updated successfully, but these errors were encountered: