0xPolygonMiden / miden-vm

STARK-based virtual machine
MIT License
612 stars 150 forks source link

When both values are not u32 the error for instruction u32assert2 should carry both #1327

Open hackaugusto opened 2 months ago

hackaugusto commented 2 months ago

When execution code like the following:

begin
    push.4294967297
    push.4294967296
    u32assert2
end

The VM error should carry information about all invalid values. Currently the top of the stack "wins":

https://github.com/0xPolygonMiden/miden-vm/blob/9abd8d17483dc7a3b23ebb72ab30b86426ddf19d/processor/src/operations/u32_ops.rs#L35-L40

Having both values makes a little bit easier to debug some situations.