You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Different behaviour between vms
Running a cairo compiled program doesn´t return any error while running in the original python implementation of the vm returns an AssertionError.
To Reproduce
Steps to reproduce the behavior:
Compile the following .cairo program
func main() {
let MAX_HIGH =1;
let MAX_LOW =1;
let value =1;
hint_func(MAX_HIGH, MAX_LOW, value);
return();
}
func hint_func(MAX_HIGH: felt, MAX_LOW: felt, value: felt) -> (felt, felt) {
alloc_locals;
local low: felt;
local high: felt;
%{
from starkware.cairo.common.math_utils import assert_integer
assert ids.MAX_HIGH < 2**128 and ids.MAX_LOW < 2**128
assert PRIME - 1 == ids.MAX_HIGH * 2**128 + ids.MAX_LOW
assert_integer(ids.value)
ids.low = ids.value & ((1 << 128) - 1)
ids.high = ids.value >> 128
%}
return(low, high);
}
Run the program with the original python implementation using the command cairo-run --program 0x0.json
Run the program with the current implementation using the command /target/release/cairo-vm-cli 0x0.json
See the difference between the results
Expected behavior
Both implementations should return the same result, in this case, the AssertionError
What version/commit are you on?
v0.8.5
The text was updated successfully, but these errors were encountered:
Different behaviour between vms
Running a cairo compiled program doesn´t return any error while running in the original python implementation of the vm returns an AssertionError.
To Reproduce
Steps to reproduce the behavior:
cairo-run --program 0x0.json
/target/release/cairo-vm-cli 0x0.json
Expected behavior
Both implementations should return the same result, in this case, the AssertionError
What version/commit are you on?
v0.8.5
The text was updated successfully, but these errors were encountered: