-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Estimation for contract call gas amount is too low #5156
Comments
On the estimation, it uses the contracts.call RPC and then uses the The UI itself does round the retrieved value upwards, so the passed value is slightly more than the |
Logged the actual Added a 1% factor above that, it still fails. Even at 10%/15%/25%/35%/50% above the received In this specific case, quite probably due to the termination itself? |
I tried to see if I'm doing something stoopid, but def. do call the read RPC with the selected account, i.e. same one that will execute the actual tx as well. |
Thanks for your investigation. Looks like a a bug in the pallet_contracts then. I will look into it. |
Happy to hear if I'm doing something wrong here, just cannot find out what it is atm. So eyes elsewhere would help - there is indeed an issue "somewhere". |
This issue has been open for 21 days with no activity and is not labelled as an enhancement. It will be closed in 7 days. |
There is paritytech/substrate#8976 now, which should fix this. |
Closing, tracked in Substrate. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query. |
When executing the method of some contracts the default
Max Gas Allowed
value (the estimated one) is estimated significantly too low.How to reproduce
We've found that at least the ink! examples
delegator
andcontract-terminate
are affected.contract-terminate
is the easiest to reproduce this. I've attached the contract which can be used for deployment here: contract_terminate.contract.zip.The contract has only one method
terminateMe
, the UI suggests a defaultMax Gas Allowed
of 1417, but the contract then fails withsystem.ExtrinsicFailed: contracts.OutOfGas
.It works if the max gas is set manually to 2500.
Debugging
We've used
canvas-node
with the latest SubstrateHEAD
.canvas-ui
is also affected by this.It might be that the actual bug is in Substrate, but I don't know how the logic of polkadot-js works here. Might be that we need to move the issue over to Substrate.
The text was updated successfully, but these errors were encountered: