cairo-vm is a Rust implementation of the Cairo VM. Cairo (CPU Algebraic Intermediate Representation) is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly without the need for this party to re-execute the same program.
Basic dynamic layout support has been implemented in #1824. This issue is to track missing features, and estimate remaining work.
There are a few fields in dynamic layout params that are not being used yet:
cpu_component_step: I couldn't find an equivalent for this field in our VM.
memory_units_per_step: Right now, this value is taken from the constant MEMORY_UNITS_PER_STEP. Adding field to CairoLayout instead shouldn't take much work.
ratio_den: The new builtins can have a ratio smaller than one. Our VM doesn't have support for this yet. My suggestion is to add a method ratio_den() -> Option<usize> to BuiltinRunner, and use that method in get_allocated_instances
log_diluted_units_per_step: This field should support negative values. Our VM doesn't have support for this yet. My suggestion is to add a field inverse to DilutedPoolInstanceDef (true if negative) and use it in check_diluted_check_usage to calculate the diluted units.
Also, I found out that a high value of log_diluted_units_per_step (32) hangs our VM. I don't know the cause of this.
Basic dynamic layout support has been implemented in #1824. This issue is to track missing features, and estimate remaining work.
There are a few fields in dynamic layout params that are not being used yet:
cpu_component_step
: I couldn't find an equivalent for this field in our VM.memory_units_per_step
: Right now, this value is taken from the constant MEMORY_UNITS_PER_STEP. Adding field to CairoLayout instead shouldn't take much work.ratio_den
: The new builtins can have a ratio smaller than one. Our VM doesn't have support for this yet. My suggestion is to add a methodratio_den() -> Option<usize>
toBuiltinRunner
, and use that method inget_allocated_instances
log_diluted_units_per_step
: This field should support negative values. Our VM doesn't have support for this yet. My suggestion is to add a fieldinverse
toDilutedPoolInstanceDef
(true if negative) and use it incheck_diluted_check_usage
to calculate the diluted units.Also, I found out that a high value of
log_diluted_units_per_step
(32) hangs our VM. I don't know the cause of this.