protostar icon indicating copy to clipboard operation
protostar copied to clipboard

Cairo1 gas estimations

Open Arcticae opened this issue 2 years ago • 10 comments

Arcticae avatar Dec 22 '22 14:12 Arcticae

As right now default test runtime won't be on-chain we may reconsider how do we want to report gas used by tests. Maybe we want to collect and sum up cost of all of the on-chain operations executed? Or we want to keep reporting explicit and add estimate cheatcode?

MaksymilianDemitraszek avatar Jan 02 '23 08:01 MaksymilianDemitraszek

@MaksymilianDemitraszek actually i think we should reconsider since all functions will be consuming a set amount of gas in cairo 1.0, so i don't know if reporting this would be either much easier or just unnecessary.

Arcticae avatar Jan 05 '23 14:01 Arcticae

I think we still need it, but I would keep it out of MVP

MaksymilianDemitraszek avatar Jan 05 '23 14:01 MaksymilianDemitraszek

I'd say it's blocked by cairo 1.0 integration, since we'll need execution resources (gas) returned by the VM

cc @MaksymilianDemitraszek

Arcticae avatar Feb 01 '23 12:02 Arcticae

Yup, I would keep it out of protostar 1.0 release

MaksymilianDemitraszek avatar Feb 03 '23 16:02 MaksymilianDemitraszek

Though i don't think it is blocked by cairo 1 integration, resources estimation is a pure-starknet thing. We may restrain until starknet 0.11 and initial protostar 1 release

MaksymilianDemitraszek avatar Feb 03 '23 16:02 MaksymilianDemitraszek

So still - it's blocked. If starknet 0.11 exposes this functionality, we might consider including it, if we have spare time.

Arcticae avatar Feb 03 '23 18:02 Arcticae

So still - it's blocked.

You can say that, blocked means we cannot work on that because of technical coinstraints, not that we decided to make it lower priority. better to be precise, it may mislead somebody

MaksymilianDemitraszek avatar Feb 08 '23 00:02 MaksymilianDemitraszek

@MaksymilianDemitraszek isn't gas consumption something that's supposed to be on the cairo-vm side (from what we've heard at the conf?)

Arcticae avatar Feb 08 '23 18:02 Arcticae

Yes it does, calculating the total gas consumption is roughly equivaltent to executing

MaksymilianDemitraszek avatar Feb 09 '23 09:02 MaksymilianDemitraszek