Open IlyasRidhuan opened 2 months ago
Additionally, we will need to update the way #[KERNEL_OUTPUT_LOOKUP]
works, specifically the columns
ia
and kernel_value_out
, as well as side_effect_counter
and kernel_side_effect_out
.
The former has to change since TreeReadRequests now has the following behaviour if checking that value a
exists at index i
.
value_at(i) == a
then kernel_value_out
and ia
will contain a
value_at(i) == b
then kernel_value_out = b
and ia
will break since it b
wont be part of the opcode.
Kernel outputs in the AVM are organised into columns based on a specific offset and are sorted by an incrementing
side_effect_counter
.Changes to
NOTEHASHEXISTS
andL1TOL2MSGEXISTS
means we no longer use theside_effect_counter
here but instead use theleaf_index
to check against. For now, I've replaced theside_effect_counter
withleaf_index
so that the columns contain the correct information when verifying. However, I've also had to relax some constraints as well as not make the full set of changes to the AVM hints structure.To properly handle this we need to re-organise the kernel outputs columns, where the
side_effect_counter
based opcodes are kept contiguous. This means that theNOTEHASHEXISTS
andL1TOL2MSGEXISTS
would likely be in their own structure.side_effect_trace.ts
to accomodate "hinting" for leaf index based opcodeskernel_trace.pil
- maybe putting the leaf index based slots at the start or relaxing the incrementing constraints for these two opcodeshints_map
, no longer keyed byside_effect_counter