software-mansion / protostar

Protostar is a toolchain for developing and testing Starknet contracts
https://docs.swmansion.com/protostar/
MIT License
248 stars 48 forks source link

Implement caching mechanism for StarknetCompiler and CairoCompiler #1280

Open Arcticae opened 1 year ago

Arcticae commented 1 year ago

This caching mechanism should be capable of:

A performant hash function has to be chosen, and some decorators to compilation methods, that compare the parameters and check for cached values.

This task should somehow also do an assessment of performance of caching the compiled files on the FS.

Note: This is not the highest priority, should be done probably last, as it's not necessary for the new testing arch to work.

MaksymilianDemitraszek commented 1 year ago

It has low priority

kasperski95 commented 1 year ago

Reference — Caching in Buck: https://youtu.be/uvNI_E0ZgZU?t=976

kasperski95 commented 1 year ago

Scarb should be responsible for caching Cairo compilation results.

kasperski95 commented 1 year ago

Contract name in tests should resolve to the build output. Caching would be a functionality of protostar build.

MaksymilianDemitraszek commented 1 year ago

Moving it to the next milestone