move-language / move

Apache License 2.0
2.25k stars 684 forks source link

[status code] add EXECUTION_LIMIT_REACHED, IO_LIMIT_REACHED and STORAGE_LIMIT_REACHED #915

Closed vgao1996 closed 1 year ago

vgao1996 commented 1 year ago

This adds a few status codes that can be used by downstream clients to represent errors caused transactions exceeding certain resource limits.

wrwg commented 1 year ago

I wonder as you are with this, could we also do https://github.com/aptos-labs/aptos-core/issues/6347. It is rather important and I wish we had done it already a while ago.

movekevin commented 1 year ago

I wonder as you are with this, could we also do aptos-labs/aptos-core#6347. It is rather important and I wish we had done it already a while ago.

+1

vgao1996 commented 1 year ago

@wrwg @movekevin we are already under a tight schedule (branch cut on Wednesday) to land the mission-critical gas changes so I'd suggest we try not to squeeze it in this time. I like the idea of having adapter-reserved status codes though.

vgao1996 commented 1 year ago

In other words, I have a feeling that the ADAPTER_CODEs may require some special conversion logic + special handling by the clients (wallet, indexer etc.). Let's study those a bit more and then come up with a proper implementation.

wrwg commented 1 year ago

@wrwg @movekevin we are already under a tight schedule (branch cut on Wednesday) to land the mission-critical gas changes so I'd suggest we try not to squeeze it in this time. I like the idea of having adapter-reserved status codes though.

Fixing this bug I linked is a release blocker by itself. But if you do not want to fold it in here, sure go ahead and someone else will do it.