0xPolygonMiden / compiler

Compiler from MidenIR to Miden Assembly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed assertion while executing `get_inputs` ABI transformation test (`clk=17`) on VM

greenhat opened this issue · comments

Error:

FailedAssertion { clk: 17, err_code: 0, err_msg: None }

Somewhere in the following code:

...
export."miden_tx_kernel_sys::get_inputs"
    mem_load.0x00000000
    push.16
    u32wrapping_sub
    dup.0
    dup.0
    push.2147483648
    u32and
    eq.2147483648
    assertz
    add.8
    u32assert
    dup.0
    u32mod.16
    dup.0
    u32mod.4
    swap.1
    u32div.4
    movup.2
    u32div.16
    exec.::intrinsics::mem::load_sw
    dup.1
    dup.0
    push.2147483648
    u32and
    eq.2147483648
    assertz
    add.12
    u32assert
...

To pinpoint the failing op I'm exploring the following options:

  • Pull out a better error message from the VM;
  • Execute the VM via the iterator and print the VM state after every op.

@bitwalker I confirmed this is caused by #174