dojoengine / dojo

Dojo is a toolchain for building provable games and autonomous worlds with Cairo
https://dojoengine.org
Apache License 2.0
386 stars 147 forks source link

[BUG] `Out of Gas` error from contract calls #1765

Closed broody closed 3 months ago

broody commented 3 months ago

Describe the bug I'm getting Out of Gas errors on some contract calls. This only happens on katana versions 0.6.0-alpha.9+, works fine on alpha.8

40: Contract error: {"revert_error":"entry point execution error: 0x4f7574206f6620676173 ('Out of gas')"}

To Reproduce I don't have an easy way of reproduce this rn, it happens when I do a contract call to verify_webauthn_signer here. Calls that are less compute heavy works fine. I don't think there should be a gas limit on calls right?

Let me know if this is not enough info and I can try find another way to reproduce.

kariy commented 3 months ago

Ahh my bad i accidentally lowered the gas to 100M for call. it used to be 1B before.

it happens when I do a contract call to verify_webauthn_signer

How much gas does the function consume?

I don't think there should be a gas limit on calls right?

usually node would set an independent gas limit for contract calls to avoid getting DOS'd.

broody commented 3 months ago

How much gas does the function consume?

Not sure exactly, the test here indicates 20M, but maybe there are other factors

usually node would set an independent gas limit for contract calls to avoid getting DOS'd.

Ahh make sense... perhaps we can make it cmd line configurable

kariy commented 3 months ago

perhaps we can make it cmd line configurable

yes i agree