Open
Description
Describe the bug
A clear and concise description of what the bug is.
In this code:
// Prepare arguments
// MARK: args assignment
[ap] = range_check_ptr, ap++;
[ap] = bitwise_ptr, ap++;
[ap] = keccak_ptr, ap++;
[ap] = poseidon_ptr, ap++;
[ap] = range_check96_ptr, ap++;
[ap] = add_mod_ptr, ap++;
[ap] = mul_mod_ptr, ap++;
[ap] = evm.value, ap++;
call abs precompile_fn;
let range_check_ptr = [ap - 9];
let bitwise_ptr = cast([ap - 8], BitwiseBuiltin*);
let keccak_ptr = cast([ap - 7], KeccakBuiltin*);
let poseidon_ptr = cast([ap - 6], PoseidonBuiltin*);
let range_check96_ptr = cast([ap - 5], felt*);
let add_mod_ptr = cast([ap - 4], ModBuiltin*);
let mul_mod_ptr = cast([ap - 3], ModBuiltin*);
let evm = Evm(cast([ap - 2], EvmStruct*));
let err = cast([ap - 1], EthereumException*);
%{
precompile_address_bytes = ids.precompile_address.to_bytes(20, "little")
print(f"[CAIRO] PrecompileEnd: {precompile_address_bytes}")
%}
When executing the hint, we load up all the ids_data
into an ids
dict, based on the HintReference for each object in scope. However, for the Evm object, we get:
reference: HintReference { offset1: Value(0), offset2: Value(0), inner_dereference: false, outer_dereference: false, ap_tracking_data: None, cairo_type: Some("ethereum.cancun.vm.evm_impl.Evm") }
I'm unable to get any relevant information regarding evm
here - I cannot get the address of the variable as a relocatable (as it's a let
reference), and i'm unable to get it's ap offset, because offset1 and offset2 are zero)
Expected behavior
I should have proper offsets in the HintReference data
What version/commit are you on?
For example: 5c56712
Additional context
I can't provide an easy repro. But I can check periodically how things go.